-
Notifications
You must be signed in to change notification settings - Fork 7
Added run command in makefile #70
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
Conversation
|
not ready to merge yet as i had set the command to specifically run to ons_python but need to generalise to all module names with jinja |
| .PHONY: run | ||
| run: ## Run the application | ||
| poetry run python {{module_name}} |
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.
Thanks for the PR.
-
This is the wrong file; you need to add this to https://github.com/ONSdigital/ons-python-template/blob/main/project_template/Makefile.jinja (templates makefile, not this repo's root template)
-
You also need to make it agnostic to the package manager, so it should be:
{{ package_manager }} run python {{ module_name }}- Please add this new
__main__.pyfile to https://github.com/ONSdigital/ons-python-template#structure
| from calculator import Calculator | ||
| calc = Calculator() | ||
|
|
||
| calc.add(5) | ||
|
|
||
| calc.subtract(2) | ||
|
|
||
| print(calc.cumulative_total) |
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 would currently raise lint failures.
| from calculator import Calculator | |
| calc = Calculator() | |
| calc.add(5) | |
| calc.subtract(2) | |
| print(calc.cumulative_total) | |
| from calculator import Calculator | |
| calc = Calculator() | |
| calc.add(5) | |
| calc.subtract(2) | |
| print(calc.cumulative_total) | |
|
@delterr If you address the above comments, we can progress this |
|
Closing the PR due to inacivity and the following PR superseeding the current one: #114. |
Addresses #69