Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor requirements #896

Merged
merged 1 commit into from
Jan 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --user "pybind11[global]" wheel
python -m pip install --user --upgrade -r requirements.txt
python -m pip install --user --upgrade -r doc/requirements.txt
python -m pip install --user --upgrade -r requirements/development.txt

- name: Build module
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: |
# These are needed to install black:
python -m pip install --user --upgrade setuptools wheel
python -m pip install --user -r requirements.txt
python -m pip install --user -r requirements/development.txt
# For sdist validation
python -m pip install --user --upgrade twine

Expand Down
7 changes: 7 additions & 0 deletions doc/misc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Major changes are listed below. Each release likely contains fiddling with back-end code,
updates to latest `fwdpp` version, etc.

## Next version

Dependencies

* Removed use of `pip-tools` in favor of a single `requirements/development.txt` file with loose pinning.
Issue {issue}`877`, PR {pr}`896`

## 0.17.1

Bug fixes
Expand Down
36 changes: 3 additions & 33 deletions doc/misc/developersguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,43 +30,13 @@ The `requirements/` folder of the source code repository contains a list of mini
To reproduce the environments that we use for CI and deployment:

```sh
python3 -m pip install -r requirements.txt
# If working on the manual:
python3 -m pip install -r doc/requirements.txt
python3 -m pip install -r requirements/development.txt
```

To use the latest version of the dependencies:

```sh
python3 -m pip install -r requirements.in
# If working on the manual:
python3 -m pip install -r doc/requirements.in
```{note}
It may be useful to add `--upgrade --no-cache-dir` to the above command.
```

(sec_requirements_files)=

#### Comments on "requirements" files.

Python uses files with names like `requirements.txt` to specify the package environment that is expected to go along with a certain tool such as this one.
Unfortunately, the contents of such files vary quite a bit across projects.

Here, we take the files `requirements.txt` and `doc/requirements.txt` to specify completely reproducible development and production environments.
Within these files, all dependencies are pinned to specific versions, as are the dependencies of those dependencies.
These files specify the exact versions used for testing the package on Ubuntu environments and for building Docker containers.

The files `requirements.in` and `doc/requirements.in` are looser specifications of these environments.
Here, the dependency pinnings are minimal, trying to keep the build environment compatible with the lowest Python version number that is still supported.
Many users working in extant Python environments may want to use the `.in` versions for installing packages.
Some may also want to remove the installation modifications to various packages in those files.

These pinnings will be updated periodically.

People using `conda` to install `fwdpy11` may consider using the fully-pinned files to install dependencies using `pip`.

#### Updating the CI/deployment dependencies

Use `pip-compile` from [pip-tools](https://pypi.org/project/pip-tools/).

### Building the code

```sh
Expand Down
7 changes: 0 additions & 7 deletions doc/requirements.in

This file was deleted.