Conversation
- Updated import path for CoverPlateWelded to reflect new module structure. - Removed unnecessary character from EngineeringModule component. - Standardized quotation marks in InputSection component for consistency. - Simplified JSX structure in InputSection for better readability.
…dling - Updated CADGeneration API to accept GET requests and utilize session cookies for design session management. - Enhanced error handling for session retrieval and module API interactions. - Cleaned up print statements and improved logging for better debugging. - Refactored common logic to streamline CAD model generation and output handling. - Simplified component imports and removed unnecessary code in EngineeringModule for better readability.
- Updated module names in input handling to use hyphenated formats for consistency across various design modules. - Improved logging in Tension_bolted class to provide clearer input value tracking. - Refactored API endpoints to streamline input data processing and enhance error handling. - Removed session management code from multiple components to support a stateless design approach. - Cleaned up unnecessary print statements and comments for better code readability.
…Password Reset flows - Improved validation for username, email, and password during signup and login processes. - Added detailed error messages for various validation failures, including username length and email format. - Implemented OTP generation and email verification for password reset functionality. - Enhanced user feedback with success and error alerts in the UI. - Refactored state management in UserContext to handle success and error types for better user experience. - Cleaned up code for improved readability and maintainability.
…late connections - Enhanced connection checks in CommonDesignLogic to support both KEY_DISP_FINPLATE and 'Fin-Plate-Connection'. - Updated CAD generation API to replace 'EndPlate' with 'Plate' for consistency across modules. - Refactored input validation in create_cad_model to align with new section naming conventions. - Improved camera settings and view options for various design modules, ensuring better compatibility and user experience. - Cleaned up code for better readability and maintainability, including removal of unnecessary comments and print statements.
- Updated import paths for FinPlate and CleatAngle components to reflect new module structure. - Adjusted configuration imports in FinPlate and FinPlateOutputDock components for consistency. - Cleaned up code for improved readability and maintainability.
- Updated connection checks in CommonDesignLogic to support both KEY_DISP_CLEATANGLE and 'Cleat-Angle-Connection'. - Added detailed logging throughout the CleatAngle connection module for better debugging and tracking of input values. - Refactored CleatAngle configuration to align with new naming conventions and improve input validation. - Introduced a new CleatAngleOutputDock component for displaying design results. - Cleaned up code for improved readability and maintainability, including removal of unnecessary comments and print statements.
- Updated reportGenerator_latex.py to support both old string format and new list format for logger messages, improving flexibility in logging. - Enhanced connection checks in connection.py to accommodate additional module identifiers for Fin-Plate and End-Plate connections. - Added default error handling in design_report_csv_view.py to ensure consistent behavior during report generation failures. - Refactored App.jsx to streamline routing for various design modules, improving navigation and user experience. - Updated ModuleState.jsx to pass additional parameters to createDesignReport, enhancing report generation capabilities. - Improved ModulesCardLayout.jsx to handle module navigation more effectively, ensuring accurate routing based on user selections. - Refactored SelectModulePage.jsx to utilize the updated TabbedModulePage component for better modularity and maintainability.
- Introduced the Simply Supported Beam design module, including input handling and output generation. - Created API view for processing requests related to the Simply Supported Beam. - Updated routing to include the new Simply Supported Beam component in the application. - Added configuration files for input fields and output display specific to the Simply Supported Beam. - Implemented a dedicated output dock component for rendering results. - Enhanced the overall structure for better modularity and maintainability across the flexural member design modules. - Cleaned up code and ensured consistency in naming conventions and file organization.
…ponents - Added the Simply Supported Beam design module, including input handling and output generation. - Created a dedicated API view for processing requests related to the Simply Supported Beam. - Updated routing to integrate the new Simply Supported Beam component into the application. - Developed configuration files for input fields and output display specific to the Simply Supported Beam. - Implemented an output dock component for rendering results effectively. - Enhanced modularity and maintainability across flexural member design modules. - Cleaned up code for consistency in naming conventions and file organization.
…xpectations - Changed output dictionary keys from "value" to "val" in various connection modules to ensure consistency with frontend requirements. - Removed unnecessary print statements in the Tension_bolted class and other modules for cleaner code. - Added debugging logs in the ModuleState and BaseOutputDock components to facilitate better tracking of output structures.
- Added project management capabilities in ModuleState and useEngineeringModule for creating and saving projects. - Implemented a callback mechanism to save project data upon successful CAD generation. - Introduced a ProjectNameModal for naming projects before creation. - Updated Header and MainContent components to restrict access to certain features for guest users. - Refactored ModuleProvider to handle CAD model creation with success callbacks. - Improved input handling in InputSection to ensure safe access to inputs and context data. - Added utility functions for checking guest user status and retrieving current user email. - Cleaned up console logs and improved error handling across various components.
…rings - Refactored Fin Plate connection configurations to utilize constants for module keys and display names. - Introduced a new UIStrings.js file to centralize user-facing strings for better localization and maintainability. - Updated various components to use the new UI strings, enhancing consistency across the application. - Improved error handling and input validation in the Fin Plate module to ensure a smoother user experience. - Cleaned up unnecessary console logs and streamlined code for better readability.
…ing improvements - Added an alert in the EngineeringModule to notify users when input fields are loaded from a saved project. - Refactored InputSection to streamline the handling of select inputs, including custom options for undefined values. - Introduced helper functions in useEngineeringModule for mapping database input and output keys to internal keys, improving data management. - Enhanced the loading logic to set default values for dropdowns when creating new projects, ensuring a smoother user experience. - Cleaned up code for better readability and maintainability.
…roject loading - Refactored RecentProjects to remove internal state and fetching logic, allowing it to receive projects and loading state as props. - Updated MainContent to manage project fetching and state, ensuring guest users are handled appropriately. - Introduced unique module filtering for recent projects to improve data presentation. - Enhanced ProjectCard to support module navigation and project creation through a modal interface. - Cleaned up code for better readability and maintainability.
…ling - Updated RecentProjects to accept an onDeleteProject prop for handling project deletions externally. - Simplified the delete project logic by removing internal fetch calls and integrating with MainContent's project management. - Improved user feedback during project deletion with loading states in the UI. - Ensured better separation of concerns by allowing MainContent to manage project state and refresh after deletions.
- Introduced an About button with a dropdown in the Header component for improved user navigation. - Updated MainContent and ModulesCardLayout to include 'Plate Girder' in the options for better module representation. - Enhanced Sidebar layout by centralizing the logo and version information for a cleaner appearance. - Adjusted styles in various components for consistency and improved user experience. - Commented out the Footer in the Homepage for potential future use.
- Updated App.css to improve styling for select components and added custom scrollbar styles for better user experience. - Introduced a new Header component to manage dock visibility and navigation, allowing users to toggle left, bottom, and right docks. - Refactored Logs component to ensure safe handling of log data and improved rendering of log messages. - Removed the OutputDock component to streamline the application structure and enhance maintainability. - Enhanced InputSection component with improved select handling and consistent styling across various input types.
…amline useEngineeringModule.js for improved state management and logging; update tailwind.config.js for content paths and color adjustments.
- Added dark mode support in tailwind.config.js. - Introduced a new image asset (howrah.png) for background use. - Updated RecentProjects component to improve guest user experience with enhanced messaging and styling. - Refactored Header and Sidebar components for better dark mode compatibility and improved styling. - Simplified MainContent and SelectModulePage layouts for a cleaner presentation and background handling.
- Updated all instances of "Fin Plate Connection" to "Fin-Plate-Connection" across multiple files for consistency. - Adjusted documentation and API references to reflect the new naming convention. - Enhanced user experience by ensuring uniformity in module identification throughout the application.
- Introduced a comprehensive documentation file for adding new modules under the shearConnection directory. - Provided detailed instructions on folder structure, component creation, configuration, and routing for new modules. - Included examples and best practices to streamline the development process for future module implementations.
- Added a new 'dark-color' to the Tailwind configuration for improved dark mode support. - Updated various components including Header, Sidebar, and ModulesCardLayout to utilize the new dark color for better visual consistency. - Refactored App.css to replace hardcoded dark background colors with the new configuration, enhancing maintainability. - Removed unused CSS rules to streamline styles and improve performance.
…ling - Removed redundant code related to LaTeX executable configuration - Simplified the logic for locating the LaTeX environment - Added import of the `sys` module for improved functionality in path handling.
- Added a new module for CAD image generation using headless rendering with Qt and OpenCASCADE. - Integrated image generation into the design report workflow, ensuring 3D, front, top, and side views are created with accurate colors. - Updated the requirements to include necessary dependencies for rendering. - Introduced unit and integration tests for the new image generation functionality. - Enhanced documentation to outline the image generation process and setup requirements.
- Introduced a `SimpleConnectionValidator` class for reusable input validation across simple connection modules. - Added factory functions for creating specific validators for bolted and welded connections. - Enhanced error handling with custom exceptions for missing keys, invalid input types, and range violations. - Updated existing adapters to utilize the new shared validation system, reducing code duplication. - Documented the validation system and its usage in the project documentation.
…dling - Updated `SimpleConnectionViewSet` to return a "coming soon" message for modules without CAD support instead of an error. - Improved error handling in CAD generation for modules, ensuring a consistent response structure. - Integrated custom logger for better logging of errors and warnings in `butt_joint_bolted`, `butt_joint_welded`, `lap_joint_bolted`, and `lap_joint_welded` adapters. - Added sample input documentation for simple connection modules to assist users in providing valid inputs. - Refactored validation logic in input handling to ensure robustness and clarity.
…lted connections - Implemented `create_cad_model` function in the `adapter.py` for both Butt Joint Bolted and Lap Joint Bolted modules to generate CAD models based on input parameters. - Enhanced the `Service` class to include a static method `get_cad_model` for easy access to CAD model generation. - Updated the output configuration to include relevant parameters for CAD models, ensuring proper integration with the existing system. - Improved logging throughout the CAD generation process for better traceability and debugging. - Refactored input handling to ensure compatibility with the new CAD generation features.
- Enhanced `create_cad_model` functions in the adapters for Butt Joint and Lap Joint connections to support new section mappings: Plate 1, Plate 2, Cover Plate, and Welds. - Improved validation for section inputs to ensure compatibility with updated CAD options. - Refactored model generation logic to handle individual plate and weld components more effectively. - Updated file naming conventions to replace spaces with underscores for better compatibility. - Enhanced logging for CAD generation processes to improve traceability and debugging. - fixed coordinates of cad view
…e connections - Added logic to handle "Weld" entries in hover dictionaries, ensuring "Welds" is populated when necessary. - Updated output configuration labels for Plate Base Capacity and Utilization to reflect connected plate terminology. - Integrated `create_cad_model` method into the Service classes for both Butt Joint and Lap Joint Welded connections, facilitating CAD model generation. - Improved documentation for the new `get_cad_model` method, detailing input parameters and return values.
- Refactored `BASE_PLATE_CAD_SECTIONS` to include only relevant sections: Model, Column, and Plate. - Enhanced `create_cad_model` function to support new CAD generation logic, including error handling and file writing for BREP and STL formats. - Updated `basePlateConfig.js` to reflect changes in CAD options, removing unnecessary entries. - Improved documentation for CAD model generation, clarifying input parameters and expected outputs.
Add Struts Bolted to End Gusset module
…nput flows
- Routing & project IDs: Normalize all design routes to use path-based :projectId and update EngineeringModule to resolve project IDs from the URL and normalize query-based links.
- Navigation guard: Fix history handling to avoid “operation is insecure” errors and preserve project IDs in the URL when blocking back navigation for unsaved work.
- Component re-org: Move shared engineering UI (logs, screenshot capture, design preferences, section modals) into modules/shared/components, relocate auth/homepage UI, and delete the legacy src/components folder.
- Firebase auth as single source: Unify auth checks through useAuth and utils/auth, remove duplicate onAuthStateChanged listeners, and rely only on Firebase + guest mode (userType) for authentication.
- Legacy user/input system removal: Remove UserProvider, UserContext, and UserAccount, along with legacy input-file flows (inputFilesLink, allInputValueFilesLength, api/user/saveinput/, api/user/obtain-input-file/), relying solely on projects + inputs_json.
- Design-report & JWT cleanup: Delete the deprecated createDesignReport API, clean up JWT-related comments, and ensure design reports only use the new multi-step flow via useDesignReport and DesignReportModal.
- Custom material gating: Replace localStorage("isLoggedIn") checks with isGuestUser() so only non-guest users can save custom materials to the database, while guests can still use local cache.
…oved logging context
- Introduced the Axially Loaded Column submodule within the Compression Member section, including new views, adapters, and configuration files. - Updated routing and API constants to support the new module. - Enhanced the CAD generation logic and input validation for the Axially Loaded Column design. - Added necessary frontend components and configurations to facilitate user interaction and data submission for the new design type.
Updated the UI of ouputdock
- Added a check to clear logs for instances of CustomLogger in various connection and member classes to ensure a clean logging state. - Removed redundant log reversal logic from the generate_output function in the fin_plate adapter, simplifying the output generation process.
- Removed the GridSelector import and related functionality from EngineeringModule. - Replaced AxisHelperWidget with ViewCubeWidget in CadScene for enhanced navigation. - Added ViewCubeWidget and its utility functions for improved 3D view control. - Updated cad index file to export the new ViewCubeWidget. - Introduced viewCubeUtils for managing ViewCube geometry and interactions.
- Removed the GridSelector import and related functionality from EngineeringModule. - Replaced AxisHelperWidget with ViewCubeWidget in CadScene for enhanced navigation. - Added ViewCubeWidget and its utility functions to improve 3D view management. - Updated cad index file to export the new ViewCubeWidget. - Introduced viewCubeUtils for managing ViewCube geometry and interactions.
…I of toggle buttons of docks
There was a problem hiding this comment.
Pull request overview
This PR introduces a new modular backend structure for multiple design modules (moment connections, compression members, flexure members, base plate), adds shared utilities/registries and report-image related tests, and removes a large set of legacy desktop/Sphinx/crash-report assets.
Changes:
- Added module registries + DRF ViewSets/URLs to route requests by submodule slug, plus shared helpers for design requests/CAD.
- Added/updated service + adapter layers for several modules (compression/flexure/moment/base plate), and introduced validation/error utility modules + tests.
- Updated authentication flow around Firebase and removed legacy resources/docs/crash reporter artifacts; added Docker-related files.
Reviewed changes
Copilot reviewed 193 out of 1722 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| backend/apps/modules/moment_connection/submodules/beam_beam_end_plate/init.py | Adds submodule exports for registry auto-discovery |
| backend/apps/modules/moment_connection/submodules/beam_beam_cover_plate_welded/service.py | Adds service layer for cover plate welded calculations/CAD |
| backend/apps/modules/moment_connection/submodules/beam_beam_cover_plate_welded/init.py | Adds submodule exports for registry auto-discovery |
| backend/apps/modules/moment_connection/submodules/beam_beam_cover_plate_bolted/service.py | Adds service layer for cover plate bolted calculations/CAD |
| backend/apps/modules/moment_connection/submodules/beam_beam_cover_plate_bolted/init.py | Adds submodule exports for registry auto-discovery |
| backend/apps/modules/moment_connection/shared.py | Adds shared CAD setup helper for moment-connection CAD generation |
| backend/apps/modules/moment_connection/registry.py | Adds auto-discovering registry for moment-connection submodules |
| backend/apps/modules/moment_connection/apps.py | Adds Django AppConfig for moment_connection |
| backend/apps/modules/moment_connection/init.py | Declares moment_connection package |
| backend/apps/modules/flexure_member/views.py | Adds slug-routed DRF ViewSet (design/options/cad) |
| backend/apps/modules/flexure_member/urls.py | Adds router URLs for flexure_member endpoints |
| backend/apps/modules/flexure_member/submodules/simply_supported_beam/service.py | Adds simply supported beam service |
| backend/apps/modules/flexure_member/submodules/simply_supported_beam/adapter.py | Adds adapter with validation/output formatting and CAD stub |
| backend/apps/modules/flexure_member/submodules/simply_supported_beam/init.py | Adds submodule exports for registry auto-discovery |
| backend/apps/modules/flexure_member/submodules/init.py | Declares flexure_member submodules package |
| backend/apps/modules/flexure_member/registry.py | Adds auto-discovering registry for flexure_member submodules |
| backend/apps/modules/flexure_member/apps.py | Adds Django AppConfig for flexure_member |
| backend/apps/modules/flexure_member/init.py | Declares flexure_member module package |
| backend/apps/modules/compression_member/urls.py | Adds router URLs for compression_member endpoints |
| backend/apps/modules/compression_member/tmp_cad/eaff29b8-10f2-47e4-a388-c3d3bac36084/Model.brep | Adds placeholder tmp CAD output file (should likely not be committed) |
| backend/apps/modules/compression_member/tmp_cad/95847d5d-1140-4fef-a762-cfac12dc8f5a/Model.brep | Adds placeholder tmp CAD output file (should likely not be committed) |
| backend/apps/modules/compression_member/tmp_cad/401bd20f-ba43-46c2-8cec-14ce9ac13fb2/Model.brep | Adds placeholder tmp CAD output file (should likely not be committed) |
| backend/apps/modules/compression_member/tmp_cad/12f533fc-74e0-4780-814e-c8f55a18db19/Model.brep | Adds placeholder tmp CAD output file (should likely not be committed) |
| backend/apps/modules/compression_member/submodules/struts_bolted/service.py | Adds struts bolted service layer |
| backend/apps/modules/compression_member/submodules/struts_bolted/init.py | Adds submodule exports for registry auto-discovery |
| backend/apps/modules/compression_member/submodules/axially_loaded_column/service.py | Adds axially loaded column service layer |
| backend/apps/modules/compression_member/submodules/axially_loaded_column/init.py | Adds submodule exports for registry auto-discovery |
| backend/apps/modules/compression_member/submodules/init.py | Declares compression_member submodules package |
| backend/apps/modules/compression_member/service.py | Adds compression_member parent service |
| backend/apps/modules/compression_member/registry.py | Adds auto-discovering registry for compression_member submodules (with debug prints) |
| backend/apps/modules/compression_member/init.py | Adds module exports for compression_member |
| backend/apps/modules/base_plate/views.py | Adds base plate ViewSet with design/options/cad endpoints |
| backend/apps/modules/base_plate/urls.py | Adds router URLs for base_plate endpoints |
| backend/apps/modules/base_plate/service.py | Adds base plate service |
| backend/apps/modules/base_plate/init.py | Adds module exports for base_plate |
| backend/apps/modules/init.py | Declares modules package |
| backend/apps/core/views.py | Adds Firebase Admin init + FirebaseAuthView and keeps legacy data endpoints |
| backend/apps/core/utils/validation.py | Adds shared validation helpers (type checks, key presence) |
| backend/apps/core/utils/tests/test_report_image_generator.py | Adds unit tests around report image generation helpers |
| backend/apps/core/utils/tests/init.py | Declares utils tests package |
| backend/apps/core/utils/module_helpers.py | Adds shared guest/auth/project-saving helper functions |
| backend/apps/core/utils/mesh_export.py | Adds STL export helper via pythonocc tessellation |
| backend/apps/core/utils/errors.py | Adds structured exception classes and error formatting helpers |
| backend/apps/core/utils/init.py | Re-exports core utils for convenient imports |
| backend/apps/core/urls.py | Moves/centralizes core API URL routing |
| backend/apps/core/serializers.py | Updates serializers; aligns with Firebase approach and OsiFile |
| backend/apps/core/registry.py | Adds BaseModuleRegistry for submodule auto-discovery (prints for debugging) |
| backend/apps/core/permissions.py | Adds IsEmailVerified DRF permission |
| backend/apps/core/migrations/0009_useraccount_user_alter_osifile_file_and_more.py | Adds UserAccount.user FK and alters OsiFile storage path (currently hardcoded) |
| backend/apps/core/migrations/0008_project_inputs_json_project_module_project_submodule.py | Adds inputs_json/module/submodule fields to Project |
| backend/apps/core/migrations/0007_osifile_remove_project_input_values_and_more.py | Creates OsiFile model; alters storage path (currently hardcoded) |
| backend/apps/core/migrations/0006_project_alter_userproject_unique_together_and_more.py | Adds Project model and removes old user project tracking models |
| backend/apps/core/migrations/0005_add_unique_constraint_userproject.py | Adds unique constraint to legacy UserProject model |
| backend/apps/core/migrations/0004_userproject_calculation_timestamp_and_more.py | Adds legacy UserProject fields |
| backend/apps/core/migrations/0003_userproject_input_fields_userproject_last_opened.py | Adds legacy UserProject fields |
| backend/apps/core/migrations/0002_userproject_usermoduleactivity.py | Creates legacy UserProject/UserModuleActivity models |
| backend/apps/core/middleware/firebase_auth.py | Adds FirebaseAuthentication class for DRF auth |
| backend/apps/core/middleware/init.py | Declares middleware package |
| backend/apps/core/data/design_types.py | Adds/updates design-type and connection listing payloads |
| backend/apps/core/apps.py | Adds Django AppConfig for core |
| backend/apps/core/api/projects/init.py | Re-exports project APIs |
| backend/apps/core/api/modules/modules_api.py | Updates module discovery API to use apps.core.module_finder |
| backend/apps/core/api/modules/init.py | Re-exports module discovery API |
| backend/apps/core/api/design/tests/test_design_report_with_images.py | Adds smoke tests for report generation endpoints |
| backend/apps/core/api/design/tests/init.py | Declares design API tests package |
| backend/apps/core/api/design/design_pref_api.py | Updates design preference/material endpoints (contains a concrete bug) |
| backend/apps/core/api/design/init.py | Re-exports design/report APIs |
| backend/apps/core/api/cad/cad_model_download.py | Adds CAD download endpoint |
| backend/apps/core/api/cad/init.py | Re-exports CAD APIs |
| backend/apps/core/api/auth/user_view.py | Updates input-file endpoints; moves auth to Firebase (keeps legacy endpoints) |
| backend/apps/core/api/auth/jwt_api.py | Keeps a JWT “home” endpoint (currently returns an invalid payload) |
| backend/apps/core/api/auth/google_sso_api.py | Keeps a GoogleSSO placeholder endpoint (currently returns an invalid payload) |
| backend/apps/core/api/auth/init.py | Re-exports auth APIs |
| backend/apps/core/api/init.py | Re-exports core APIs |
| backend/apps/core/admin.py | Registers core models in admin |
| backend/apps/init.py | Declares apps package |
| backend/init.py | Declares backend package |
| _version.py | Removes legacy version constant |
| init.py | Removes legacy version import |
| ResourceFiles/html_page/make.bat | Removes legacy Sphinx build scripts/assets |
| ResourceFiles/html_page/conf.py | Removes legacy Sphinx config |
| ResourceFiles/html_page/_build/html/searchindex.js | Removes generated Sphinx output |
| ResourceFiles/html_page/_build/html/search.html | Removes generated Sphinx output |
| ResourceFiles/html_page/_build/html/genindex.html | Removes generated Sphinx output |
| ResourceFiles/html_page/_build/html/_static/sidebar.js | Removes generated Sphinx output |
| ResourceFiles/html_page/_build/html/_static/pygments.css | Removes generated Sphinx output |
| ResourceFiles/html_page/_build/html/_static/documentation_options.js | Removes generated Sphinx output |
| ResourceFiles/html_page/_build/html/_static/custom.css | Removes generated Sphinx output |
| ResourceFiles/html_page/_build/html/_static/classic.css | Removes generated Sphinx output |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.3.2.2.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.3.2.1.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.3.1.2.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.3.1.1.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.2.2.2.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.2.2.1.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.2.1.2.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.2.1.1.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.1.2.2.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.1.2.1.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.1.1.2.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/Example_1.2.2.1.1.1.1.osi | Removes legacy example OSI file |
| ResourceFiles/html_page/_build/html/DesignReport_1.2.1.1.1.osi | Removes legacy design report OSI |
| ResourceFiles/html_page/_build/html/.buildinfo | Removes generated Sphinx metadata |
| ResourceFiles/html_page/Makefile | Removes legacy Sphinx Makefile |
| Dockerfile | Adds container build definition |
| APP_CRASH/forms/qcrash.qrc | Removes legacy Qt crash reporter resources |
| APP_CRASH/forms/dlg_review.ui | Removes legacy Qt crash reporter UI |
| APP_CRASH/forms/dlg_report_bug.ui | Removes legacy Qt crash reporter UI |
| APP_CRASH/forms/dlg_github_login.ui | Removes legacy Qt crash reporter UI |
| APP_CRASH/Appcrash/qt.py | Removes legacy Qt crash reporter code |
| APP_CRASH/Appcrash/formatters/markdown.py | Removes legacy crash reporter formatter |
| APP_CRASH/Appcrash/formatters/email.py | Removes legacy crash reporter formatter |
| APP_CRASH/Appcrash/formatters/base.py | Removes legacy crash reporter base formatter |
| APP_CRASH/Appcrash/backends/email.py | Removes legacy crash reporter backend |
| APP_CRASH/Appcrash/backends/base.py | Removes legacy crash reporter backend base |
| APP_CRASH/Appcrash/backends/init.py | Removes legacy crash reporter backend exports |
| APP_CRASH/Appcrash/backends/GITHUB.py | Removes legacy crash reporter GitHub backend |
| APP_CRASH/Appcrash/api.py | Removes legacy crash reporter API |
| APP_CRASH/Appcrash/_hooks.py | Removes legacy crash reporter exception hooks |
| APP_CRASH/Appcrash/_forms/dlg_review_ui.py | Removes generated Qt form |
| APP_CRASH/Appcrash/_forms/dlg_report_bug_ui.py | Removes generated Qt form |
| APP_CRASH/Appcrash/_forms/dlg_github_login_ui.py | Removes generated Qt form |
| APP_CRASH/Appcrash/_dialogs/review.py | Removes legacy crash reporter dialog |
| APP_CRASH/Appcrash/_dialogs/report.py | Removes legacy crash reporter dialog |
| APP_CRASH/Appcrash/_dialogs/gh_login.py | Removes legacy crash reporter dialog |
| APP_CRASH/Appcrash/init.py | Removes legacy crash reporter package init |
| .travis.yml | Removes legacy CI config |
| .env | Adds frontend base URL env file |
| .dockerignore | Adds dockerignore entry for frontend |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| class BaseModuleRegistry: | ||
| """Base registry class for auto-discovering sub-modules""" | ||
| _registry: Dict[str, Type] = {} # Maps slug -> Service class | ||
| _module_id_map: Dict[str, str] = {} # Maps MODULE_ID -> slug |
There was a problem hiding this comment.
BaseModuleRegistry stores _registry and _module_id_map as class attributes on the base class, which will be shared across subclasses unless each subclass overrides them. This can cause submodules from different parent registries to collide/overwrite each other (especially since MomentConnectionRegistry/FlexureMemberRegistry don’t override these maps). Fix by initializing per-subclass storage (e.g., via __init_subclass__ to set new dicts on each subclass) or explicitly defining _registry = {} and _module_id_map = {} in every concrete registry (consistent with CompressionMemberRegistry).
| _module_id_map: Dict[str, str] = {} # Maps MODULE_ID -> slug | |
| _module_id_map: Dict[str, str] = {} # Maps MODULE_ID -> slug | |
| def __init_subclass__(cls, **kwargs): | |
| """ | |
| Ensure each subclass gets its own registry dictionaries unless it | |
| explicitly defines them. Prevents cross-contamination between | |
| different module registries. | |
| """ | |
| super().__init_subclass__(**kwargs) | |
| # Only apply to subclasses, not the base class itself. | |
| if cls is not BaseModuleRegistry: | |
| # If the subclass hasn't defined its own maps, give it fresh ones. | |
| if '_registry' not in cls.__dict__: | |
| cls._registry = {} | |
| if '_module_id_map' not in cls.__dict__: | |
| cls._module_id_map = {} |
| custom_materials = CustomMaterials.object.filter(email=email).values() | ||
|
|
||
| material_details = Material.objects.filter(Grade=material).values() | ||
|
|
||
| total_materials = custom_materials + material_details | ||
|
|
||
| return Response({"material_details": material_details }, status=status.HTTP_200_OK) |
There was a problem hiding this comment.
This endpoint has multiple concrete errors: CustomMaterials.object should be CustomMaterials.objects, custom_materials is undefined when email is not provided, and total_materials is computed but never returned. This will raise at runtime for requests without email, and even with email it will hit an AttributeError due to .object.
| custom_materials = CustomMaterials.object.filter(email=email).values() | |
| material_details = Material.objects.filter(Grade=material).values() | |
| total_materials = custom_materials + material_details | |
| return Response({"material_details": material_details }, status=status.HTTP_200_OK) | |
| custom_materials = CustomMaterials.objects.filter(email=email).values() | |
| else: | |
| custom_materials = [] | |
| material_details = Material.objects.filter(Grade=material).values() | |
| total_materials = list(custom_materials) + list(material_details) | |
| return Response({"material_details": total_materials}, status=status.HTTP_200_OK) |
| def get(self, request) : | ||
| print('inside the JWTHomeView get') | ||
|
|
||
| content = {'message' , 'Welcome to the JWT Authentication page'} |
There was a problem hiding this comment.
This constructs a Python set, not a JSON-serializable dict. DRF will not produce the intended {'message': ...} payload. Use a dict with a key/value pair.
| content = {'message' , 'Welcome to the JWT Authentication page'} | |
| content = {'message': 'Welcome to the JWT Authentication page'} |
|
|
||
| print('APIview under development') | ||
|
|
||
| return Response({'message' , 'GoogleSSO under development'} , status = status.HTTP_200_OK) |
There was a problem hiding this comment.
This returns a Python set instead of a dict, which is not the intended JSON shape and may break serialization/clients. Use a dict with a stable key.
| return Response({'message' , 'GoogleSSO under development'} , status = status.HTTP_200_OK) | |
| return Response({'message': 'GoogleSSO under development'} , status = status.HTTP_200_OK) |
| migrations.AlterField( | ||
| model_name='osifile', | ||
| name='file', | ||
| field=models.FileField(storage=django.core.files.storage.FileSystemStorage(base_url='/osifiles/', location=pathlib.PurePosixPath('/home/sogalabhi/Osdag-web/osifiles')), upload_to=''), |
There was a problem hiding this comment.
This migration hardcodes an absolute machine-specific filesystem path for OsiFile storage. This will break on deployments/containers/other developer machines and is not portable across environments. Prefer configuring storage location via settings (e.g., MEDIA_ROOT / a dedicated setting) and referencing that at runtime rather than embedding environment paths in migrations.
| from osdag_core.Common import * | ||
|
|
||
|
|
||
| def setup_for_cad(cdl: CommonDesignLogic, module_class): | ||
| """Sets up the CommonLogicObject before generating CAD""" | ||
| print('SETTING UP FOR CAD', module_class) | ||
| cdl.module_class = module_class # Set the module class in design logic object. | ||
| cdl.module_object = module_class # Set the module object (required by common_logic.py) | ||
| print("******") | ||
| module_object = module_class | ||
| print("********") |
There was a problem hiding this comment.
Wildcard imports (import *) make it difficult to reason about dependencies and can introduce name collisions, especially in shared utilities. Also, multiple print() statements in shared logic will produce noisy output in production. Prefer explicit imports (only the symbols used) and use structured logging at an appropriate level (debug/info) instead of prints.
| from osdag_core.Common import * | |
| def setup_for_cad(cdl: CommonDesignLogic, module_class): | |
| """Sets up the CommonLogicObject before generating CAD""" | |
| print('SETTING UP FOR CAD', module_class) | |
| cdl.module_class = module_class # Set the module class in design logic object. | |
| cdl.module_object = module_class # Set the module object (required by common_logic.py) | |
| print("******") | |
| module_object = module_class | |
| print("********") | |
| from osdag_core.Common import KEY_DISP_COLUMNENDPLATE | |
| import logging | |
| logger = logging.getLogger(__name__) | |
| def setup_for_cad(cdl: CommonDesignLogic, module_class): | |
| """Sets up the CommonLogicObject before generating CAD""" | |
| logger.debug("SETTING UP FOR CAD %s", module_class) | |
| cdl.module_class = module_class # Set the module class in design logic object. | |
| cdl.module_object = module_class # Set the module object (required by common_logic.py) | |
| logger.debug("******") | |
| module_object = module_class | |
| logger.debug("********") |
| os.makedirs(out_dir, exist_ok=True) | ||
|
|
||
| # Perform tessellation | ||
| mesh = BRepMesh_IncrementalMesh(shape, linear_deflection, parallel, angular_deflection, parallel) |
There was a problem hiding this comment.
The positional arguments passed to BRepMesh_IncrementalMesh appear to mismatch common pythonocc signatures (where the 3rd parameter is typically isRelative, and inParallel is usually the last). Passing parallel twice can inadvertently set isRelative=True, changing tessellation behavior. Use keyword arguments (or match the exact expected positional order) to ensure isRelative and inParallel are set intentionally.
| mesh = BRepMesh_IncrementalMesh(shape, linear_deflection, parallel, angular_deflection, parallel) | |
| mesh = BRepMesh_IncrementalMesh( | |
| shape, | |
| linear_deflection, | |
| isRelative=False, | |
| angular_deflection=angular_deflection, | |
| inParallel=parallel, | |
| ) |
| model = BeamCoverPlate() | ||
| if hasattr(model, "set_osdaglogger"): | ||
| model.set_osdaglogger(None, id="web") | ||
| model.set_input_values(inputs) |
There was a problem hiding this comment.
The model instance is created and initialized, but its computed state is never used because generate_output(inputs) is called independently and the model variable is not referenced afterward. This is either dead code or a logic gap (e.g., output intended to come from model). Consider either: (1) generating output from the model instance, or (2) removing the unused model setup to avoid confusion and extra work per request.
| model = BeamCoverPlate() | |
| if hasattr(model, "set_osdaglogger"): | |
| model.set_osdaglogger(None, id="web") | |
| model.set_input_values(inputs) |
| except Exception as e: | ||
| return Response( | ||
| {'error': str(e), 'success': False}, | ||
| status=400 | ||
| ) |
There was a problem hiding this comment.
Returning str(e) directly can leak internal details (stack/context from downstream libraries) to clients, and it also makes error handling inconsistent with the structured error helpers added in apps.core.utils.errors. Prefer using format_error_response() + an appropriate status code mapping (similar to BasePlateViewSet) so clients get consistent, non-leaky error payloads.
| def test_slug_generate_initial_endpoint_shear_exists(self): | ||
| """ | ||
| Ensure the slug-based shear-connection report endpoint is wired. | ||
| """ |
There was a problem hiding this comment.
There are smoke tests for report endpoints, but the new slug-based module routing added in this PR (e.g., FlexureMemberViewSet design/cad endpoints and the new registries with auto-discovery) doesn’t appear to have corresponding endpoint wiring tests. Adding minimal smoke tests for /api/modules/flexure-member/<slug>/design/ and /cad/ would help catch registry/URL regressions early.
No description provided.