diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c6f7805..29c8d77 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,33 +36,4 @@ In general, we follow the ["fork-and-pull" Git workflow](https://gist.github.com ## Setting Up Your Environment -To contribute to the `quantile-forest` source code, start by forking and then cloning the repository (i.e. `git clone git@github.com:YourUsername/quantile-forest.git`) - -Once inside the repository, to build and install the package, run: - -```cmd -python setup.py build_ext --inplace -python setup.py install - ``` - -## Testing Your Changes - -To execute unit tests from the `quantile-forest` repository, run: - -```cmd -pytest quantile_forest -v -``` - -## Troubleshooting - -If the build fails because SciPy is not installed, ensure OpenBLAS and LAPACK are available and accessible. - -On macOS, run: - -```cmd -brew install openblas -brew install lapack -export SYSTEM_VERSION_COMPAT=1 -``` - -Then try rebuilding. +To contribute to the `quantile-forest` source code, you can follow the [developer's guide](https://zillow.github.io/quantile-forest/getting_started/developers.html). diff --git a/docs/getting_started/developers.rst b/docs/getting_started/developers.rst index 0bb7a53..b0af767 100755 --- a/docs/getting_started/developers.rst +++ b/docs/getting_started/developers.rst @@ -5,15 +5,24 @@ Developer's Guide Development Dependencies ~~~~~~~~~~~~~~~~~~~~~~~~ + Building the package from source additionally requires the following dependencies: * cython (>=3.0a4) We also use pre-commit hooks to identify simple issues before submission. -To install these dependencies, run:: +Setting Up Your Environment +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To contribute to the `quantile-forest` source code, start by forking and then cloning the repository (i.e. `git clone git@github.com:YourUsername/quantile-forest.git`) + +Once inside the repository, you can prepare a development environment. Using conda:: - pip install cython pre-commit + conda create -n qf python=3.12 + conda activate qf + conda install pre-commit + pre-commit install Development Installation ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -38,25 +47,25 @@ Test and Coverage Ensure that `pytest` and `pytest-cov` are installed:: - $ pip install pytest pytest-cov + pip install pytest pytest-cov To test the code:: - $ python -m pytest quantile_forest -v + python -m pytest quantile_forest -v To test the code and produce a coverage report:: - $ python -m pytest quantile_forest --cov-report html --cov=quantile_forest + python -m pytest quantile_forest --cov-report html --cov=quantile_forest To test the documentation:: - $ python -m pytest --doctest-glob="*.rst" --doctest-modules docs + python -m pytest --doctest-glob="*.rst" --doctest-modules docs Documentation ~~~~~~~~~~~~~ To build the documentation, run:: - $ pip install -r ./docs/sphinx_requirements.txt - $ mkdir -p ./docs/_images - $ sphinx-build -b html ./docs ./docs/_build + pip install -r ./docs/sphinx_requirements.txt + mkdir -p ./docs/_images + sphinx-build -b html ./docs ./docs/_build