-
Notifications
You must be signed in to change notification settings - Fork 15
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
Added example script for running the situation examples #149
base: main
Are you sure you want to change the base?
Conversation
Thank you for this suggestion. The doc page you linked to is called “How to test your changes on “ready to use” situations (for OpenFisca-France)”. It is clearly country-specific and should be erased as such. I am not to see the point of providing trivial Python code to then load these typical cases. If you believe it can be worthwhile, I would suggest making this file an actual part of the |
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 make sure that all automated checks pass before requesting a review, in order to avoid unnecessary repeated reviews and ensure that the reviewed codebase is a functional version that abides by quality standards 🙂
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.
The name of this file is ambiguous and unclear. As I understand it, it is only an executable example of how to load situation examples. However its name, run
, makes it sound as though it is the one way to access or build the examples.
@@ -0,0 +1,12 @@ | |||
# -*- coding: utf-8 -*- |
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.
According to the doc, “Python supports writing source code in UTF-8 by default”, are you sure this is necessary?
run.py
to situation examples, enables simple executable situation example for documentation.The OpenFisca docs link to a France specific example here that is out of date and should use SimulationBuilder. This PR adapts the situation examples example from the tutorial and applies it here. This would provide us the opportunity to provide simple code tests to the documentation that isn't France specific. For instance here we could instead use this repository as the example and provide the script
python -m openfisca_country_template.situation_examples.run
to prove installation.