Skip to content

Commit 8458d12

Browse files
committed
Pin versions and add requirements lock file for testing and monitoring
1 parent d9a2f5b commit 8458d12

File tree

5 files changed

+51
-25
lines changed

5 files changed

+51
-25
lines changed

.github/workflows/release.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
run: |
3535
python -m pip install -U pip
3636
pip install -U setuptools wheel
37-
pip install -e .[all]
37+
pip install -r requirements/requirements.txt
38+
pip install -e .[docs]
3839
3940
- name: Set git config
4041
run: |
@@ -62,7 +63,6 @@ jobs:
6263
run: |
6364
# Required to generate rst files from markdown
6465
sudo apt install pandoc
65-
pip install .[docs]
6666
6767
- name: Build Sphinx docs
6868
working-directory: doc
@@ -92,7 +92,7 @@ jobs:
9292
release_branch: ${{ env.PUBLISH_UPDATE_BRANCH }}
9393
since_tag: "${{ env.PREVIOUS_VERSION }}"
9494
output: "release_changelog.md"
95-
exclude_labels: "duplicate,question,invalid,wontfix,dependency_updates,skip_changelog"
95+
exclude_labels: "duplicate,question,invalid,wontfix,dependency_updates,CI,skip_changelog"
9696

9797
- name: Append changelog to release body
9898
run: |
@@ -114,6 +114,12 @@ jobs:
114114
password: ${{ secrets.TEST_PYPI_PASSWORD }}
115115
repository-url: https://test.pypi.org/legacy/
116116

117+
- name: Publish package to PyPI
118+
uses: pypa/gh-action-pypi-publish@release/v1
119+
with:
120+
user: __token__
121+
password: ${{ secrets.PYPI_PASSWORD }}
122+
117123
deploy_docs:
118124
if: github.repository == 'matgenix/jobflow-remote' && startsWith(github.ref, 'refs/tags/v')
119125
runs-on: ubuntu-latest

.github/workflows/testing.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
- name: Install dependencies
2929
run: |
3030
python -m pip install --upgrade pip
31-
pip install .[strict,tests,dev]
31+
pip install -r requirements/requirements.txt
32+
pip install .[dev]
3233
3334
- name: Lint
3435
run: pre-commit run --all-files --show-diff-on-failure
@@ -52,7 +53,8 @@ jobs:
5253
- name: Install dependencies
5354
run: |
5455
python -m pip install --upgrade pip
55-
pip install .[strict,tests,docs]
56+
pip install -r requirements/requirements.txt
57+
pip install .[tests]
5658
5759
- name: Unit tests
5860
run: pytest --cov=jobflow_remote --cov-report=xml --ignore tests/integration
@@ -87,6 +89,7 @@ jobs:
8789
pip install -U setuptools wheel
8890
# Required to generate rst files from markdown
8991
sudo apt install pandoc
92+
pip install -r requirements/requirements.txt
9093
pip install .[docs]
9194
9295
- name: Build Sphinx docs

pyproject.toml

+16-20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools >= 42", "versioningit ~= 1.0", "wheel"]
2+
requires = ["setuptools >= 42", "versioningit ~= 1.0", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
@@ -25,31 +25,28 @@ classifiers = [
2525
]
2626
requires-python = ">=3.9"
2727
dependencies =[
28-
"jobflow",
29-
"pydantic>=2.0.1",
30-
"fabric",
31-
"tomlkit",
32-
"qtoolkit",
33-
"typer",
34-
"rich",
35-
"psutil",
36-
"supervisor",
37-
"ruamel.yaml",
38-
"schedule",
39-
"flufl.lock"
28+
"jobflow >= 0.1.14",
29+
"pydantic ~= 2.5",
30+
"fabric ~= 3.2",
31+
"tomlkit ~= 0.12",
32+
"qtoolkit ~= 0.1",
33+
"typer ~= 0.9",
34+
"rich ~= 13.7",
35+
"psutil ~= 5.9",
36+
"supervisor ~= 4.2",
37+
"ruamel.yaml ~= 0.17",
38+
"schedule ~= 1.2",
39+
"flufl.lock ~= 8.0"
4040
]
4141

4242
[project.optional-dependencies]
4343
dev = [
4444
"pre-commit>=3.0.0",
4545
]
4646
tests = [
47-
"pytest==7.2.1",
48-
"pytest-cov==4.0.0",
49-
"docker~=7.0",
50-
]
51-
maintain = [
52-
"git-changelog>=0.6",
47+
"pytest ~= 7.2",
48+
"pytest-cov ~= 4.0",
49+
"docker ~= 7.0",
5350
]
5451
docs = [
5552
"sphinx",
@@ -59,7 +56,6 @@ docs = [
5956
"autodoc_pydantic>=2.0.0",
6057
"sphinxcontrib-mermaid"
6158
]
62-
strict = []
6359

6460
[project.scripts]
6561
jf = "jobflow_remote.cli.jf:app"

requirements/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Strict requirements
2+
3+
These files contain pinned direct dependencies for use in testing, monitored by
4+
dependabot to ensure version upgrades compatible with `pyproject.toml` do not
5+
break the released version.
6+
7+
In cases where dependabot updates a requirements file and the tests no longer
8+
pass, this may indicate that the supported versions in `pyproject.toml` need to
9+
be upgraded (and a release made).

requirements/requirements.txt

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
jobflow==0.1.17
2+
pydantic==2.5.3
3+
fabric==3.2.2
4+
tomlkit==0.12.3
5+
qtoolkit==0.1.0
6+
typer==0.9.0
7+
rich==13.7.0
8+
psutil==5.9.8
9+
supervisor==4.2.5
10+
ruamel.yaml==0.17.35
11+
schedule==1.2.1
12+
flufl.lock==8.0.2

0 commit comments

Comments
 (0)