Skip to content

Conversation

@Zehen-249
Copy link
Contributor

@Zehen-249 Zehen-249 commented Sep 2, 2025

This pr adds the functionality to run .osi files without explicitly needing to open the modules.


Description of code - Created cli.py file

available_modules = {
    KEY_DISP_BASE_PLATE:BasePlateConnection, 
    KEY_DISP_BEAMCOVERPLATE:BeamCoverPlate, 
    KEY_DISP_CLEATANGLE:CleatAngleConnection,
    KEY_DISP_COLUMNCOVERPLATE:ColumnCoverPlate, 
    KEY_DISP_COLUMNENDPLATE:ColumnEndPlate, 
    KEY_DISP_ENDPLATE:EndPlateConnection,
    KEY_DISP_FINPLATE:FinPlateConnection, 
    KEY_DISP_SEATED_ANGLE:SeatedAngleConnection, 
    KEY_DISP_TENSION_BOLTED:Tension_bolted,
    KEY_DISP_TENSION_WELDED:Tension_welded, 
    KEY_DISP_COMPRESSION:Compression, 
    KEY_DISP_BEAMCOVERPLATEWELD:BeamCoverPlateWeld,
    KEY_DISP_COLUMNCOVERPLATEWELD:ColumnCoverPlateWeld, 
    KEY_DISP_BB_EP_SPLICE:BeamBeamEndPlateSplice,
    KEY_DISP_BCENDPLATE:BeamColumnEndPlate,
}

These are currently available modules in the osdag application. The osi file must correspond to module from one of these modules. In future if there is a new module, it has to be added here as well.

def _get_design_dictionary(osi_path:Path) -> dict:
    """return the design dictionary from an OSI file."""

def _get_output_dictionary(module_class:Main) -> dict:
    """return the output dictionary for the design"""

def _save_to_csv(output_dictionary:dict, output_file:str):
    """save the output dictionary to a csv file"""

def _save_to_pdf(module_class:Main, output_file:Path):
    """save the output dictionary to a pdf file"""

def run_module(*args, **kargs) -> dict:
    """Run the module specified in the OSI file located at osi_path."""

Added osdag function for handling application launch

Test

osadg cli run --input path/to/inout*.osi --op_type "save_pdf" --output path/to/out_file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant