-
Notifications
You must be signed in to change notification settings - Fork 140
Started making the CLI #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aumghelani
wants to merge
11
commits into
osdag-admin:master
Choose a base branch
from
aumghelani:osdag_cli
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3bdb03d
Started making the CLI
aumghelani 550ebce
Started CLI
aumghelani aaedcac
Merge branch 'master' of https://github.com/aumghelani/Osdag into osd…
aumghelani c5bf6a9
Added files setup.py and cli_tool.py
aumghelani a7c19ab
Added entry point on .toml file for testing
aumghelani 8295419
Working
aumghelani e449017
Added all necessary files for cli_shell and to make pip editable instal
aumghelani f7d7934
Made a function for verification of modules
aumghelani 0e1e08f
Autovalidation of modules
aumghelani 38fd5c4
Connected CLI to Main Software
aumghelani a7274bb
Cli_shell with automatic detection and passing osi file[WIP]
aumghelani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| Bolt.Bolt_Hole_Type: Standard | ||
| Bolt.Diameter: | ||
| - '20' | ||
| Bolt.Grade: | ||
| - '6.8' | ||
| Bolt.Slip_Factor: '0.3' | ||
| Bolt.TensionType: Non pre-tensioned | ||
| Bolt.Type: Bearing Bolt | ||
| Connectivity: Column Flange-Beam Web | ||
| Connector.Material: E 300 (Fe 440) | ||
| Connector.Plate.Thickness_List: | ||
| - '14' | ||
| Design.Design_Method: Limit State Design | ||
| Detailing.Corrosive_Influences: 'No' | ||
| Detailing.Edge_type: Sheared or hand flame cut | ||
| Detailing.Gap: '10' | ||
| Load.Axial: '35' | ||
| Load.Shear: '175' | ||
| Material: E 300 (Fe 440) | ||
| Member.Supported_Section.Designation: WB 300 | ||
| Member.Supported_Section.Material: E 300 (Fe 440) | ||
| Member.Supporting_Section.Designation: PBP 320 X 88.48 | ||
| Member.Supporting_Section.Material: E 300 (Fe 440) | ||
| Module: Fin Plate Connection | ||
| Weld.Fab: Shop Weld | ||
| Weld.Material_Grade_OverWrite: '440' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| Bolt.Bolt_Hole_Type: Standard | ||
| Bolt.Diameter: | ||
| - '16' | ||
| - '20' | ||
| - '24' | ||
| - '30' | ||
| Bolt.Grade: | ||
| - '4.8' | ||
| - '5.6' | ||
| - '6.8' | ||
| - '9.8' | ||
| Bolt.Slip_Factor: '0.3' | ||
| Bolt.TensionType: Non pre-tensioned | ||
| Bolt.Type: Bearing Bolt | ||
| Connectivity: Column Flange-Beam Web | ||
| Connector.Material: E 250 (Fe 410 W)A | ||
| Connector.Plate.Thickness_List: | ||
| - '14' | ||
| - '16' | ||
| - '18' | ||
| - '20' | ||
| - '22' | ||
| - '25' | ||
| - '28' | ||
| Design.Design_Method: Limit State Design | ||
| Detailing.Corrosive_Influences: 'No' | ||
| Detailing.Edge_type: Rolled, machine-flame cut, sawn and planed | ||
| Detailing.Gap: '10' | ||
| Load.Axial: '125' | ||
| Load.Shear: '240' | ||
| Material: E 350 (Fe 490) | ||
| Member.Supported_Section.Designation: LB 400 | ||
| Member.Supported_Section.Material: E 250 (Fe 410 W)A | ||
| Member.Supporting_Section.Designation: PBP 300 X 109.54 | ||
| Member.Supporting_Section.Material: E 350 (Fe 490) | ||
| Module: End Plate Connection | ||
| Weld.Fab: Shop Weld | ||
| Weld.Material_Grade_OverWrite: '490' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| Bolt.Bolt_Hole_Type: Standard | ||
| Bolt.Diameter: | ||
| - '20' | ||
| Bolt.Grade: | ||
| - '6.8' | ||
| Bolt.Slip_Factor: '0.3' | ||
| Bolt.TensionType: Non pre-tensioned | ||
| Bolt.Type: Bearing Bolt | ||
| Connectivity: Column Flange-Beam Web | ||
| Connector.Material: E 300 (Fe 440) | ||
| Connector.Plate.Thickness_List: | ||
| - '14' | ||
| Design.Design_Method: Limit State Design | ||
| Detailing.Corrosive_Influences: 'No' | ||
| Detailing.Edge_type: Sheared or hand flame cut | ||
| Detailing.Gap: '10' | ||
| Load.Axial: '35' | ||
| Load.Shear: '175' | ||
| Material: E 300 (Fe 440) | ||
| Member.Supported_Section.Designation: WB 300 | ||
| Member.Supported_Section.Material: E 300 (Fe 440) | ||
| Member.Supporting_Section.Designation: PBP 320 X 88.48 | ||
| Member.Supporting_Section.Material: E 300 (Fe 440) | ||
| Module: Fin Plate Connection | ||
| Weld.Fab: Shop Weld | ||
| Weld.Material_Grade_OverWrite: '440' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,147 @@ | ||
| # Osdag CLI Tool | ||
|
|
||
| A command-line interface for Osdag structural engineering design software. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| pip install -e . | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| The Osdag CLI tool provides several commands for processing design files and generating reports: | ||
|
|
||
| ### Process Design | ||
|
|
||
| Process an OSI file, run design calculations, show output values, and generate a design report: | ||
|
|
||
| ```bash | ||
| osdag-cli process-design [-i input_file.osi] [-o output_directory] [-v] | ||
| ``` | ||
|
|
||
| Options: | ||
|
|
||
| - `-i, --input-file`: Path to the OSI input file (optional, will prompt if not provided) | ||
| - `-o, --output-dir`: Directory to save the design report (optional) | ||
| - `-v, --verbose`: Enable verbose output | ||
|
|
||
| ### Show Design Output | ||
|
|
||
| Process an OSI file, run design calculations, and show output values without generating a report: | ||
|
|
||
| ```bash | ||
| osdag-cli show-design-output [-i input_file.osi] | ||
| ``` | ||
|
|
||
| Options: | ||
|
|
||
| - `-i, --input-file`: Path to the OSI file (optional, will prompt if not provided) | ||
|
|
||
| ### Custom Design | ||
|
|
||
| Run design calculations directly using a custom implementation (currently supports only Fin Plate Connection): | ||
|
|
||
| ```bash | ||
| osdag-cli custom-design [-i input_file.osi] | ||
| ``` | ||
|
|
||
| Options: | ||
|
|
||
| - `-i, --input-file`: Path to the OSI file (optional, will prompt if not provided) | ||
|
|
||
| This command implements a more direct design calculation approach that may be more reliable for certain modules. | ||
|
|
||
| ### Debug Module | ||
|
|
||
| Analyze a module, show its methods and inheritance hierarchy: | ||
|
|
||
| ```bash | ||
| osdag-cli debug-module [-i input_file.osi] | ||
| ``` | ||
|
|
||
| Options: | ||
|
|
||
| - `-i, --input-file`: Path to the OSI input file (optional, will prompt if not provided) | ||
|
|
||
| ### Show Content | ||
|
|
||
| Parse and display the content of an OSI file: | ||
|
|
||
| ```bash | ||
| osdag-cli show-content [-i input_file.osi] | ||
| ``` | ||
|
|
||
| Options: | ||
|
|
||
| - `-i, --input-file`: Path to the OSI input file (optional, will prompt if not provided) | ||
|
|
||
| ### List Modules | ||
|
|
||
| List all valid module names: | ||
|
|
||
| ```bash | ||
| osdag-cli list-modules | ||
| ``` | ||
|
|
||
| ### Interactive Shell | ||
|
|
||
| Start an interactive shell to run multiple commands: | ||
|
|
||
| ```bash | ||
| osdag-cli shell | ||
| ``` | ||
|
|
||
| In shell mode, you can run any of the above commands without the `osdag-cli` prefix. Use `exit` or `quit` to exit the shell. | ||
|
|
||
| ## Examples | ||
|
|
||
| 1. Process a design file and generate a report in the specified directory: | ||
|
|
||
| ```bash | ||
| osdag-cli process-design -i examples/fin_plate.osi -o ./reports | ||
| ``` | ||
|
|
||
| 2. Process a design file with verbose output: | ||
|
|
||
| ```bash | ||
| osdag-cli process-design -i examples/fin_plate.osi -o ./reports -v | ||
| ``` | ||
|
|
||
| 3. Show design output values without generating a report: | ||
|
|
||
| ```bash | ||
| osdag-cli show-design-output -i examples/fin_plate.osi | ||
| ``` | ||
|
|
||
| 4. Debug a module to see its methods and attributes: | ||
|
|
||
| ```bash | ||
| osdag-cli debug-module -i examples/fin_plate.osi | ||
| ``` | ||
|
|
||
| 5. View all supported modules: | ||
|
|
||
| ```bash | ||
| osdag-cli list-modules | ||
| ``` | ||
|
|
||
| 6. Start an interactive shell: | ||
|
|
||
| ```bash | ||
| osdag-cli shell | ||
| ``` | ||
|
|
||
| Then within the shell: | ||
|
|
||
| ``` | ||
| > process-design | ||
| > list-modules | ||
| > exit | ||
| ``` | ||
|
|
||
| 7. Try the custom design implementation for a Fin Plate Connection: | ||
|
|
||
| ```bash | ||
| osdag-cli custom-design -i examples/fin_plate.osi | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep
osdag_cliunder theosdagmodule (so it should readosdag.osdag_cli:testing). Also, change name of the method to something less temporary. Canmaindo the job?