Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.47 KB

File metadata and controls

58 lines (38 loc) · 1.47 KB

How to Develop for DATAFAKER

Pre-requisites

Please install the following software on your workstation:

  1. Poetry.
  2. Pre-commit.
  3. PostgreSQL.

Setting up your development environment

  1. Clone the GitHub repository:

    git clone https://github.com/SAFEHR-data/datafaker
  2. In the directory of your local copy, create a virtual environment with all datafaker dependencies:

    cd datafaker
    poetry install --all-extras

    If you don't need to build the project documentation, the --all-extras option can be omitted.

  3. 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.

  4. Finally, activate the Poetry shell. Now you're ready to play with the code:

    poetry shell

Running unit tests

Executing unit tests is straightforward:

python -m unittest discover --verbose tests/

Building documentation locally

cd docs
make html

WARNING: 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.