From 72a499629051aa6ee7a1dd0e3dce426b093a23c6 Mon Sep 17 00:00:00 2001 From: Paul Wildenhain Date: Wed, 9 Feb 2022 14:11:41 -0500 Subject: [PATCH] :memo: Update CONTRIUBTING.md --- CONTRIBUTING.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 038fba3b..61843660 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,32 @@ PyCap follows the [Fork-Pull workflow](https://help.github.com/articles/using-pu 1. If you don't already have an account on GitHub, please make one. 2. Fork [this repo](https://github.com/redcap-tools/PyCap) to your own account. -3. Checkout a branch & commit your changes. Tests are definitely appreciated :100:! +3. Checkout a branch & commit your changes. See the section on `poetry` below for instructions how to set up your local development environment. Tests are definitely appreciated :100:! 4. Push those changes to your repo & submit a Pull-Request to this repository. -If any of these steps are unclear, please peruse the helpful [GitHub Guide on Forkin](https://guides.github.com/activities/forking/) or file an issue, and we'll try to help out! +If any of these steps are unclear, please peruse the helpful [GitHub Guide on Forking](https://guides.github.com/activities/forking/) or file an issue, and we'll try to help out! + +## Using `poetry` + +This package uses [`poetry`](https://python-poetry.org/docs/master/#installation) for dependency management and publishing. It is required in order to do local development with `PyCap`. + +1. Install `poetry` + +```sh +$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python - +``` + +2. Install all project dependencies (including development/optional dependencies). + +```sh +$ poetry install -E data_science +``` + +3. Add your changes and make sure your changes pass all tests. + +``` +$ poetry run pytest +``` + +If you make changes to the dependencies you'll need to handle +them with the [`poetry add/remove`](https://python-poetry.org/docs/master/basic-usage/#installing-dependencies) commands.