This repo contains the entities used in NSW. This is so that different rules as code projects in NSW can share the same entities, avoiding duplication.
This base package is already uploaded to PyPI.
https://pypi.org/project/openfisca-nsw-base/
After you make changes, you can bump up the version in setup.py, and run
make upload
This package requires Python 3.7. More recent versions should work, but are not tested.
All platforms that can execute Python are supported, which includes GNU/Linux, macOS and Microsoft Windows (in which case we recommend using ConEmu instead of the default console).
Two install procedures are available. Pick procedure A or B below depending on how you plan to use this Country Package.
Follow this installation if you wish to:
- run calculations on a large population;
- create tax & benefits simulations;
- write an extension to this legislation (e.g. city specific tax & benefits);
- serve your Country Package with the OpenFisca Web API.
For more advanced uses, head to the Advanced Installation.
Inside your virtualenv, check the prerequisites:
python --version # should print "Python 3.7.xx".
#if not, make sure you pass the python version as an argument when creating your virtualenv
pip --version # should print at least 9.0.
#if not, run "pip install --upgrade pip"
Install the Country Package:
pip install openfisca_nsw_base
🎉 This OpenFisca Country Package is now installed and ready!
- To learn how to use OpenFisca, follow our tutorials.
- To serve this Country Package, serve the OpenFisca web API.
Depending on what you want to do with OpenFisca, you may want to install yet other packages in your virtualenv:
- To install extensions or write on top of this Country Package, head to the Extensions documentation.
- To plot simulation results, try matplotlib.
- To manage data, check out pandas.
Follow this tutorial if you wish to:
- create or change this Country Package's legislation;
- contribute to the source code.
First of all, make sure Git is installed on your machine.
Set your working directory to the location where you want this OpenFisca Country Package cloned.
Inside your virtualenv, check the prerequisites:
python --version # should print "Python 3.7.xx".
#if not, make sure you pass the python version as an argument when creating your virtualenv
pip --version # should print at least 9.0.
#if not, run "pip install --upgrade pip"
Clone this Country Package on your machine:
We recommend that you use a virtualenv to install OpenFisca. If you don't, you may need to add
--user
at the end of all commands starting bypip
.
python -m venv openfisca
deactivate
source openfisca/bin/activate
python -m pip install --editable . --user
make build
make install
You can make sure that everything is working by running the provided tests with make test
.
🎉 This OpenFisca Country Package is now installed and ready! You can begin working on your legislation in an extension package.