-
Notifications
You must be signed in to change notification settings - Fork 12
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
350 utils #351
350 utils #351
Conversation
https://realpython.com/python-main-function/ |
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.
Changes look great.
Just need to resolve the GitHub Actions issue where the CLI tests fail.
as discussed last week, GitHub tests fail either the CLI test when tasks complete with exit code 1 due to a string being returned from the So to resolve these, I plan to change the @tomaroberts let me know if this sounds sensible and I'll get on it |
As discussed on Teams, give it a go :) |
made the agreed modifications such that hazenlib.main() does not return anything (completes with exit code 0) |
in the future, I recommend to separate hazenlib.main() into the following sub-functions:
|
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.
Great! :)
Couple of lines to remove, unless you think useful to keep.
Go ahead and merge main
into this branch and resolve any conflicts.
Summary
in line with Python best practice, remove all commands possible from the init.py into a new main.py script, make required changes to entry point and subsequently update the READme with the relevant commands
EDIT: upon further reading of documentation, looks like there is no real benefit to having the main function in a separate script from init.
combine utility functions from init, tools and shapes.py into a new utils.py, make required changes to all task scripts that use utility functions and their applicable test scripts
resolves #347
Outstanding TODO: