zazwaz12 / CITS3200---National-Housing-Simulation

National Housing Simulation - mapping data points from the G-NAF and the census data sets.
0 stars 0 forks source link

National Housing Simulation

Repository for the National Housing Simulation project, involving mapping data points from the G-NAF and the SA1 census datasets.

Install

You can install project dependencies using either poetry or devenv.

Poetry

Poetry is a Python dependency manager that also manages dependency configurations. Install it following the official guide.

poetry shell     # Activate the virtual environment
poetry install   # Install the dependencies from pyproject.toml

Devenv

Devenv is used to create isolated development shells where the dependencies are declared in devenv.nix file with input channels defined in devenv.yaml and are version-locked in devenv.lock. Dependencies and programs installed in the shell are only accessible in the shell. It is internally powered by Nix where the list of Nix packages can be found at NixOS Packages.

First, install devenv and nix. Then, from the top-most directory of the project, run the following command to let devenv install the required dependencies locally, install the requirements, and activate the virtual environment.

devenv shell
exit # Exit the devenv shell

Auto-activation with direnv (Optional)

Warning: direnv allow the execution of any arbitrary bash code in .envrc, please examine .envrc before you proceed!

direnv is used to automatically activate devenv when you enter into the folder containing this repository. First, install it via the official installation guide and hook it into your shell (hint: run echo $SHELL to see what shell you are using). Then, inside the project directory where .envrc is in the same folder, run...

direnv allow  # allow execution of .envrc automatically
direnv disallow # stop automatically executing .envrc upon entering the project folder

and it will automatically activate devenv which will then install the necessary dependencies.