-
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
base: master
Are you sure you want to change the base?
Conversation
|
Please make PR against the dev branch. |
|
Needs plenty of changes. Some of these may be delayable until later, but ideally do them first:
|
| osdag = "osdag.osdagMainPage:do_stuff" | ||
|
|
||
| [project.scripts] | ||
| osdag-cli = "osdag_cli:testing" |
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_cli under the osdag module (so it should read osdag.osdag_cli:testing). Also, change name of the method to something less temporary. Can main do the job?
| # Reads a plain text file line by line, extracts the 'Module' field, | ||
| # and determines the module type. |
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.
| # Reads a plain text file line by line, extracts the 'Module' field, | |
| # and determines the module type. | |
| # Given an Osdag input file (.osi), extracts the 'Module' field, | |
| # and determines the module type. |
| # with open(file_path, 'r') as file: | ||
| # for line in file: | ||
| # # Check if the line contains the 'Module' field | ||
| # if line.startswith("Module:"): | ||
| # # Extract and print the module name | ||
| # module_name = line.split(':', 1)[1].strip() | ||
| # click.echo(f"Module: {module_name}") | ||
| # return |
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.
I recall in a recent meeting you showed this code as working. Have you not updated the changes here?
| 'console_scripts': [ | ||
| 'osdag-cli = osdag_cli:determine_module', | ||
| ], |
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.
This may get us too many entry points. OK for testing, but eventually we want something like:
osdag-cli --determine-module <filename>
| @@ -0,0 +1,17 @@ | |||
| # setup.py | |||
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.
We're already using pyproject.toml, which is a more modern method. Probably safe to delete.
No description provided.