Skip to content

Commit

Permalink
chore: add new file requirements.dev
Browse files Browse the repository at this point in the history
Update pre-commit checks.
Update dependencies.
Remove all dev dependencies from requirements.txt.
- This file contains the runtime as well as dev dependencies.
- Update `contributing.rst` to use this file instead of requirements.txt.
- Exclude this file in `MANIFEST.in` so that it's not part of the PyPI package.
- Update CI pipelines to use `requirements.dev` instead of `requirements.txt`.
- Update release process checklist
  • Loading branch information
desilinguist committed Mar 11, 2024
1 parent 9525fa4 commit e7e564c
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ variables:
# set up basic job
.runtests:
before_script:
- "mamba create --prefix /root/rsmenv -c conda-forge -c ets --file requirements.txt python=${PYVERSION} curl --yes"
- "mamba create --prefix /root/rsmenv -c conda-forge -c ets --file requirements.dev python=${PYVERSION} curl --yes"
- /root/rsmenv/bin/pip install -e .
- /root/rsmenv/bin/curl -o /root/rsmenv/bin/codecov https://uploader.codecov.io/latest/linux/codecov
- chmod +x /root/rsmenv/bin/codecov
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include requirements.txt
prune requirements.dev
recursive-include rsmtool/notebooks *
prune tests
prune rsmtool/notebooks/.ipynb_checkpoints
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
displayName: "Update conda"
- script: |
conda create --name rsmdev --yes --quiet -c conda-forge -c ets python=%PYTHON_VERSION% --file requirements.txt
conda create --name rsmdev --yes --quiet -c conda-forge -c ets python=%PYTHON_VERSION% --file requirements.dev
conda init cmd.exe
CALL activate rsmdev
pip install -e .
Expand Down
4 changes: 2 additions & 2 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ To set up a local development environment, follow the steps below:

#. If you already have the ``conda`` package manager installed, skip to the next step. If you do not, follow the instructions on `this page <https://conda.io/projects/conda/en/latest/user-guide/install/index.html>`_ to install conda.

#. Create a new conda environment (say, ``rsmdev``) and install the packages specified in the ``requirements.txt`` file by running::
#. Create a new conda environment (say, ``rsmdev``) and install the packages specified in the ``requirements.dev`` file by running::

conda create -n rsmdev -c conda-forge -c ets --file requirements.txt
conda create -n rsmdev -c conda-forge -c ets --file requirements.dev

#. Activate the environment using ``conda activate rsmdev``.

Expand Down
14 changes: 13 additions & 1 deletion doc/internal/release_process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ This process is only meant for the project administrators, not users and develop

#. In the release branch:

- Update the version numbers in ``version.py``.
- Update the version number in ``version.py``.

- Make sure that `requirements.txt` only has the actual dependencies that
are needed to run RSMTool. Any dependencies needed only for
development/testing (e.g., `sphinx`, `nose2` etc.) should be moved to
`requirements.dev`. This means that `requirements.txt` *must* be a strict
subset of `requirements.dev`.

- Make sure the versions in `doc/requirements.txt` are up to date with
`requirements.txt` and only contains the dependencies needed to build the
documentation.

- Make sure `.readthedocs.yml` is still accurate.

- Update the conda recipe.

Expand Down
21 changes: 21 additions & 0 deletions requirements.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ipython
jupyter
nose2
notebook
numpy<2
openpyxl
pandas
pre-commit
pyarrow
seaborn
shap
skll==5.0.1
sphinx
sphinx-autodoc-typehints
sphinx-design
sphinx_rtd_theme
statsmodels
tqdm
wandb
xlrd
xlwt

0 comments on commit e7e564c

Please sign in to comment.