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
50 changes: 50 additions & 0 deletions .github/workflows/dependency-floors.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Dependency Floors

on:
schedule:
- cron: '0 8 * * 1'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: dependency-floors-${{ github.ref }}
cancel-in-progress: true

jobs:
lowest:
name: Lowest dependencies (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
os: [ubuntu-26.04, macos-26, windows-2025-vs2026]
python-version: ["3.12", "3.13", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: |
python -m pip install --upgrade pip
python -m pip install uv

- name: Resolve lowest dependencies as wheels
run: |
uv pip compile pyproject.toml --resolution lowest-direct --only-binary :all: --output-file lowest.txt
cat lowest.txt

- name: Install lowest dependencies
run: uv pip install --system --resolution lowest-direct -e ".[testing]"

- name: Run unit tests
run: python -m pytest tests/unit
13 changes: 13 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ jobs:
- name: Pytest unit • ${{ matrix.os }}, ${{ matrix.python-version }}
run: python -m pytest tests/unit

- name: Install uv
run: python -m pip install uv

- name: Resolve lowest dependencies as wheels
run: |
uv pip compile pyproject.toml --resolution lowest-direct --only-binary :all: --output-file lowest.txt

- name: Install lowest dependencies
run: uv pip install --system --reinstall --resolution lowest-direct -e ".[testing]"

- name: Pytest unit at lowest dependencies • ${{ matrix.os }}, ${{ matrix.python-version }}
run: python -m pytest tests/unit

discover-systems:
name: Discover regression systems
runs-on: ubuntu-26.04
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CodeEntropy

| Category | Badges |
|----------------|--------|
| **Build** | [![PR Checks](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/pr.yaml/badge.svg)](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/pr.yaml) [![Daily Tests](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/daily.yaml/badge.svg)](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/daily.yaml) |
| **Build** | [![PR Checks](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/pr.yaml/badge.svg)](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/pr.yaml) [![Daily Tests](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/daily.yaml/badge.svg)](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/daily.yaml) [![Dependency Floors](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/dependency-floors.yaml/badge.svg)](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/dependency-floors.yaml) |
| **Regression** | [![Weekly Regression](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/weekly-regression.yaml/badge.svg)](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/weekly-regression.yaml) |
| **Documentation** | [![Weekly Docs](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/weekly-docs.yaml/badge.svg)](https://github.com/CCPBioSim/CodeEntropy/actions/workflows/weekly-docs.yaml) [![Docs - Status](https://app.readthedocs.org/projects/codeentropy/badge/?version=latest)](https://codeentropy.readthedocs.io/en/latest/?badge=latest) |
| **Citation** | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.17570721.svg)](https://doi.org/10.5281/zenodo.17570721) |
Expand Down
32 changes: 16 additions & 16 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{% set name = "codeentropy" %}
{% set version = "0.0.0" %}
{% set pyproject = load_file_data("../pyproject.toml", from_recipe_dir=True) %}
{% set pip_only = namespace(water_entropy="") %}
{% for dependency in pyproject["project"]["dependencies"] %}
{% if dependency.startswith("waterEntropy") %}
{% set pip_only.water_entropy = dependency %}
{% endif %}
{% endfor %}

package:
name: {{ name }}
Expand All @@ -12,7 +19,7 @@ build:
noarch: python
script: |
python -m pip install . -vv --no-deps
PIP_NO_INDEX=0 python -m pip install -vv --index-url https://pypi.org/simple "waterEntropy>=2,<3.0"
PIP_NO_INDEX=0 python -m pip install -vv --index-url https://pypi.org/simple "{{ pip_only.water_entropy }}"
entry_points:
- CodeEntropy=CodeEntropy.cli:main

Expand All @@ -22,21 +29,14 @@ requirements:
- pip
- flit-core >=4,<5
run:
- python >=3.12
- numpy >=2.3.2,<2.5.0
- mdanalysis >=2.10,<3.0
- pandas >=2.3.3,<4.0
- psutil >=5.9.4,<8.0
- pyyaml >=6.0.3,<7.0
- rich >=13.0.0,<16.0
- python-art >=5.0,<7.0
- networkx >=2.8,<4.0
- requests >=2.32.2,<3.0
- rdkit >=2025.3.4,<2026
- dask >=2025.4.0,<2027.1.0
- distributed >=2025.4.0,<2027.1.0
- dask-jobqueue >=0.9.0,<1.0
- numba >=0.63.0,<0.70
- python {{ pyproject["project"]["requires-python"] }}
{% for dependency in pyproject["project"]["dependencies"] %}
{% if dependency.startswith("art>") %}
- python-{{ dependency }}
{% elif not dependency.startswith("waterEntropy") %}
- {{ dependency | lower }}
{% endif %}
{% endfor %}

test:
imports:
Expand Down
21 changes: 21 additions & 0 deletions docs/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,30 @@ Weekly workflows:

- Full regression suite including slow tests
- Documentation build across all Python versions
- Dependency floor checks (see :ref:`dependency-policy`)

CI also caches regression datasets to improve performance.

.. _dependency-policy:

Dependency Policy
-----------------

Runtime dependencies in ``pyproject.toml`` are declared as ranges. The lower
bound (floor) is the oldest release CodeEntropy is known to work with, so that it
stays installable alongside other scientific packages. Floors are only raised
when the code needs a newer release. Upper bounds are widened by Renovate.

The unit job in the pull request workflow and the weekly ``dependency-floors.yaml``
workflow check this. They check that the lowest allowed versions resolve to
installable wheels on each platform and Python version, and that the unit tests
pass with them installed.

Run the same checks locally with `uv <https://docs.astral.sh/uv/>`_::

uv pip install --resolution lowest-direct -e ".[testing]"
python -m pytest tests/unit

Building Documentation
----------------------

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ classifiers = [
keywords = ["entropy", "macromolecular systems", "MD simulation"]
requires-python = ">=3.12"
dependencies = [
"numpy>=2.3.2,<2.6.0",
"numpy>=2.3.5,<2.6.0",
"mdanalysis>=2.10,<3.0",
"pandas>=2.3.3,<4.0",
"psutil>=5.9.4,<8.0",
"psutil>=7.1.3,<8.0",
"PyYAML>=6.0.3,<7.0",
"rich>=13.0.0,<16.0",
"art>=5.0,<7.0",
Expand All @@ -49,9 +49,9 @@ dependencies = [
"requests>=2.32.2,<3.0",
"rdkit>=2025.3.4,<2027",
"numba>=0.63.0,<0.70",
"dask>=2025.4.0,<2027.1.0",
"dask>=2025.7.0,<2027.1.0",
"dask-jobqueue>=0.9.0,<1.0",
"distributed>=2025.4.0,<2027.1.0",
"distributed>=2025.7.0,<2027.1.0",
]

[project.urls]
Expand Down
Loading