Skip to content

Commit 9cb52f7

Browse files
committed
replace requirements files with uv.lock
* update docs * explicit pin of build-system
1 parent c8b5ec0 commit 9cb52f7

19 files changed

+3060
-1892
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ jobs:
5656
run: |
5757
sudo apt install --fix-missing -y libgsl-dev cmake
5858
59-
- name: Install Python dependencies
60-
run: |
61-
uv pip install -r requirements/CI_${{ matrix.python-version }}.txt
62-
6359
- name: rustc version
6460
run: |
6561
rustc --version
@@ -68,9 +64,9 @@ jobs:
6864
run: |
6965
cbindgen --version
7066
71-
- name: Build module
67+
- name: uv sync
7268
run: |
73-
uv pip install -e .
69+
uv sync -p ${{ matrix.python-version }} --locked --group build --group doc --no-dev
7470
7571
- name: Build the docs
7672
working-directory: doc

.github/workflows/macos_CI.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ jobs:
5252

5353
- name: Install Python dependencies
5454
run: |
55-
uv pip install -r requirements/CI_${{ matrix.python }}.txt
55+
# We need to build the C++ test suite, etc., so
56+
# we don't let uv install the project (b/c the other
57+
# stuff isn't built in that case)
58+
uv sync -p ${{ matrix.python }} --no-install-project --frozen --group build
59+
5660
- name: Build extension module
5761
run: |
5862
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON_UNIT_TESTS=ON -DDISABLE_LTO=ON

.github/workflows/ubuntu.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,12 @@ jobs:
8989
run: |
9090
python --version
9191
92-
- name: Install pip dependencies
92+
- name: Install python dependencies
9393
run: |
94-
uv pip install -r requirements/CI_${{ matrix.python }}.txt
94+
# We need to build the C++ test suite, etc., so
95+
# we don't let uv install the project (b/c the other
96+
# stuff isn't built in that case)
97+
uv sync -p ${{ matrix.python }} --no-install-project --frozen --group build
9598
9699
# Need# ed so that we don't affect building any pip dependencies with these flags
97100
- name: Set CPPFLAGS for C++ builds

doc/misc/developersguide.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,14 @@ The C++ test suite requires:
3636
:::{warning}
3737
`conda` users **must** install all of these dependencies using that system, including the compilers!
3838
See [here](https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html) for info about `conda` compilers for Linux and for macOS.
39-
40-
The `requirements/` folder of the source code repository contains a list of minimal `conda` dependencies that we use for CI.
4139
:::
4240

4341
#### Python
4442

4543
To reproduce the environments that we use for CI and deployment:
4644

4745
```sh
48-
python3 -m pip install -r requirements/development.txt
46+
uv sync --no-install-package --all-groups
4947
```
5048

5149
```{note}

pyproject.toml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[build-system]
22
# We need setup.cfg support, which setuptools indtroduced in 30.3.0.
33
requires = [
4-
"scikit-build-core>=0.3.3",
5-
"setuptools_scm>=8",
4+
"scikit-build-core==0.11.1",
5+
"setuptools_scm==7.1.0",
66
"pybind11[global]==2.12.0",
77
"numpy >= 2.0"
88
]
@@ -31,6 +31,47 @@ dependencies = [
3131
]
3232
requires-python = ">=3.10, <3.14"
3333

34+
[dependency-groups]
35+
# NOTE: we are doing a very odd hack here!
36+
# uv does NOT currently support locking build dependencies
37+
# so we add it as a dependency group and force it.
38+
# The PROBLEM is that we have TWO places to modify
39+
# things in the future.
40+
build = [
41+
"scikit-build-core==0.11.1",
42+
"setuptools_scm==7.1.0",
43+
"pybind11[global]==2.12.0",
44+
"numpy >= 2.0"
45+
]
46+
47+
lint = [
48+
"flake8",
49+
"flake8-bugbear",
50+
]
51+
dev = [
52+
#below are for building package
53+
#and running tests
54+
"pytest",
55+
"pytest-xdist",
56+
"hypothesis==6.56.4",
57+
"msprime ~= 1.3.0",
58+
"build",
59+
"twine",
60+
]
61+
62+
doc = [
63+
"jupyter-book~=0.15.1",
64+
"pydata-sphinx-theme==0.13.1",
65+
"matplotlib",
66+
"msprime",
67+
"pandas",
68+
# pyarrow will be a requirement of pandas soon.
69+
# right now, not having it raises a warning
70+
"pyarrow",
71+
"sphinx-issues",
72+
"demesdraw~=0.4.0",
73+
]
74+
3475
[project.scripts]
3576
fwdpy11 = "fwdpy11.__main__:main"
3677

@@ -69,3 +110,8 @@ before-all = "./deployment/linux_wheels/cibuildwheel.sh"
69110
archs = "x86_64"
70111
# skip = "pp* *musllinux*"
71112

113+
[tool.uv]
114+
required-environments = [
115+
"sys_platform == 'darwin' and implementation_name == 'cpython'",
116+
"sys_platform == 'linux' and implementation_name == 'cpython'",
117+
]

0 commit comments

Comments
 (0)