Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
python-version: ${{ matrix.python }}
- name: Install black
run: |
python -m pip install black=="24.10.0"
uv sync --only-group format
- name: Validate code
run: |
find . -name '*.py'|grep -v headers|grep -v demes-spec|xargs python -m black --check
find fwdpy11 tests tests_with_cpp examples -name '*.py' | grep -v headers | grep -v demes-spec | xargs python -m black --check


8 changes: 2 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ jobs:
run: |
sudo apt install --fix-missing -y libgsl-dev cmake

- name: Install Python dependencies
run: |
uv pip install -r requirements/CI_${{ matrix.python-version }}.txt

- name: rustc version
run: |
rustc --version
Expand All @@ -68,9 +64,9 @@ jobs:
run: |
cbindgen --version

- name: Build module
- name: uv sync
run: |
uv pip install -e .
uv sync -p ${{ matrix.python-version }} --locked --group build --group doc --no-dev

- name: Build the docs
working-directory: doc
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/macos_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ jobs:

- name: Install Python dependencies
run: |
uv pip install -r requirements/CI_${{ matrix.python }}.txt
# We need to build the C++ test suite, etc., so
# we don't let uv install the project (b/c the other
# stuff isn't built in that case)
uv sync -p ${{ matrix.python }} --no-install-project --frozen --group build

- name: Build extension module
run: |
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON_UNIT_TESTS=ON -DDISABLE_LTO=ON
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ jobs:
run: |
python --version

- name: Install pip dependencies
- name: Install python dependencies
run: |
uv pip install -r requirements/CI_${{ matrix.python }}.txt
# We need to build the C++ test suite, etc., so
# we don't let uv install the project (b/c the other
# stuff isn't built in that case)
uv sync -p ${{ matrix.python }} --no-install-project --frozen --group build

# Need# ed so that we don't affect building any pip dependencies with these flags
- name: Set CPPFLAGS for C++ builds
Expand Down
4 changes: 1 addition & 3 deletions doc/misc/developersguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ The C++ test suite requires:
:::{warning}
`conda` users **must** install all of these dependencies using that system, including the compilers!
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.

The `requirements/` folder of the source code repository contains a list of minimal `conda` dependencies that we use for CI.
:::

#### Python

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

```sh
python3 -m pip install -r requirements/development.txt
uv sync --no-install-package --all-groups
```

```{note}
Expand Down
52 changes: 50 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
# We need setup.cfg support, which setuptools indtroduced in 30.3.0.
requires = [
"scikit-build-core>=0.3.3",
"setuptools_scm>=8",
"scikit-build-core==0.11.1",
"setuptools_scm==7.1.0",
"pybind11[global]==2.12.0",
"numpy >= 2.0"
]
Expand Down Expand Up @@ -31,6 +31,49 @@ dependencies = [
]
requires-python = ">=3.10, <3.14"

[dependency-groups]
# NOTE: we are doing a very odd hack here!
# uv does NOT currently support locking build dependencies
# so we add it as a dependency group and force it.
# The PROBLEM is that we have TWO places to modify
# things in the future.
build = [
"scikit-build-core==0.11.1",
"setuptools_scm==7.1.0",
"pybind11[global]==2.12.0",
"numpy >= 2.0"
]
format = [
"black==24.10.0"
]
lint = [
"flake8",
"flake8-bugbear",
]
dev = [
#below are for building package
#and running tests
"pytest",
"pytest-xdist",
"hypothesis==6.56.4",
"msprime ~= 1.3.0",
"build",
"twine",
]

doc = [
"jupyter-book~=0.15.1",
"pydata-sphinx-theme==0.13.1",
"matplotlib",
"msprime",
"pandas",
# pyarrow will be a requirement of pandas soon.
# right now, not having it raises a warning
"pyarrow",
"sphinx-issues",
"demesdraw~=0.4.0",
]

[project.scripts]
fwdpy11 = "fwdpy11.__main__:main"

Expand Down Expand Up @@ -69,3 +112,8 @@ before-all = "./deployment/linux_wheels/cibuildwheel.sh"
archs = "x86_64"
# skip = "pp* *musllinux*"

[tool.uv]
required-environments = [
"sys_platform == 'darwin' and implementation_name == 'cpython'",
"sys_platform == 'linux' and implementation_name == 'cpython'",
]
Loading
Loading