Please install the following software on your workstation:
-
Clone the GitHub repository:
git clone https://github.com/SAFEHR-data/datafaker
-
In the directory of your local copy, create a virtual environment with all
datafakerdependencies:cd datafaker poetry install --all-extrasIf you don't need to build the project documentation, the
--all-extrasoption can be omitted. -
Install the git hook scripts. They will run whenever you perform a commit:
pre-commit install --install-hooks
To execute the hooks before a commit, run
pre-commit run --all-files. -
Finally, activate the Poetry shell. Now you're ready to play with the code:
poetry shell
Executing unit tests is straightforward:
python -m unittest discover --verbose tests/cd docs
make htmlWARNING: Some systems won't be able to import the sphinxcontrib.napoleon extension. In that case,
please replace sphinxcontrib.napoleon with sphinx.ext.napoleon in docs/source/conf.py.