Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
713a067
Correct the dev dependency table PEP 735
joasode Mar 17, 2025
0d69cf3
Update CI to use uv with dependency groups
joasode Mar 20, 2025
f902b4d
Attempt to build RTD
joasode Mar 20, 2025
50d440b
pre-commit
joasode Mar 20, 2025
f375481
RTD dependency
joasode Mar 20, 2025
d1f9d72
Add another RTD dependency
joasode Mar 20, 2025
c28ab97
Add another RTD dependency
joasode Mar 20, 2025
641c11f
Update RTD yaml
joasode Mar 20, 2025
518ce50
Update readthedocs.yml
joasode Mar 20, 2025
5fd9912
Include old sphinx-build arguments
joasode Mar 20, 2025
28b924c
Attempt RTD fix
joasode Mar 20, 2025
e2e6ed4
Update .readthedocs.yml to uv sync
joasode Mar 20, 2025
8a64172
Add cache usage when we have uv.lock
joasode Mar 21, 2025
e839894
One-line uv sync in CI_pull_request.yml
joasode Mar 21, 2025
71627bb
Update .readthedocs.yml
joasode Mar 21, 2025
2902d74
typo
joasode Mar 21, 2025
0fc0188
Another typo
joasode Mar 21, 2025
c9c6a6f
Update lint with debug info
joasode Mar 21, 2025
b34dcef
Add lint push action with debug info
joasode Mar 21, 2025
016e5d2
Add uv run command in CI_push
joasode Mar 21, 2025
ab33584
Experiment with pre-commit key in push action
joasode Mar 21, 2025
c6b917d
Remove debug info and invalid key
joasode Mar 21, 2025
5882a28
Add back in the cache key...
joasode Mar 21, 2025
9fc8ad0
Remove env.pythonLocation from lint cache key
joasode Mar 21, 2025
19ecd6e
Add uv run to CI_pull_request linting
joasode Mar 21, 2025
c50d7bb
Debug managed-python
joasode Mar 21, 2025
c01bcdd
Debug managed-python in CI_push
joasode Mar 21, 2025
dd11cd1
unify sync command and specify lint python to avoid pre-release
joasode Mar 21, 2025
25035ec
Enable cache when code is checked out (e.g. uv.lock is present)
joasode Mar 21, 2025
40f4c7e
Add in names for GitHub action steps
joasode Mar 21, 2025
c179e44
Add review changes
joasode Mar 21, 2025
347d66c
Experiment with readthedocs tools
joasode Mar 21, 2025
278c2ac
Lets undo that
joasode Mar 21, 2025
cde4de3
Single line run: uv sync
joasode Mar 21, 2025
d6ddb1b
Merge branch 'main' into correct-dependency-table
joasode Mar 27, 2025
4c8fed1
Update uv.lock
joasode Mar 27, 2025
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
60 changes: 33 additions & 27 deletions .github/workflows/CI_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,33 @@ jobs:
name: Lint and check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout code
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Verify the uv.lock is up-to-date
run: uv lock --check
- name: Install linting dependencies
run: uv sync --python 3.12 --managed-python --group=lint --frozen
- name: Restore pre-commit cache
uses: actions/cache@v4
with:
python-version: "3.x"
- uses: pre-commit/[email protected]
path: ~/.cache/pre-commit
key: pre-commit-3-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit on all files
run: uv run pre-commit run --show-diff-on-failure --color=always --all-files
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: uv build .
- uses: actions/upload-artifact@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Build the Python Package
run: uv build
- name: Upload build artifacts for subsequent workflow steps
uses: actions/upload-artifact@v4
with:
name: dist
path: dist
Expand Down Expand Up @@ -65,17 +79,14 @@ jobs:
run: |
sudo apt install ./singularity_installer.deb
singularity --version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Set up uv
uses: astral-sh/setup-uv@v5

- name: Install test dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e .[tests]
run: uv sync --python ${{ matrix.python-version }} --managed-python --group=tests --frozen

- name: Run test suite via pytest
run: pytest -vv --junitxml=pytest_junit_out.xml
run: uv run pytest -vv --junitxml=pytest_junit_out.xml
- name: Archive the test results and coverage
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -106,18 +117,13 @@ jobs:
sudo apt update
sudo apt install -y apptainer
singularity --version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: "**/test-requirements.txt"
- name: Set up uv
uses: astral-sh/setup-uv@v5

- name: Install test dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r test-requirements.txt
run: uv sync --python ${{ matrix.python-version }} --managed-python --group=tests --frozen
- name: Run test suite via pytest
run: pytest -vv --junitxml=pytest_junit_out.xml
run: uv run pytest -vv --junitxml=pytest_junit_out.xml
- name: Archive the test results and coverage
uses: actions/upload-artifact@v4
with:
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/CI_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,21 @@ jobs:
name: Lint and check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout code
uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
- name: Verify the uv.lock is up-to-date
run: uv lock --check
- name: Install linting dependencies
run: uv sync --python 3.12 --managed-python --group=lint --frozen
- name: Restore pre-commit cache
uses: actions/cache@v4
with:
python-version: "3.x"
- uses: pre-commit/[email protected]
path: ~/.cache/pre-commit
key: pre-commit-3-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit on all files
run: uv run pre-commit run --show-diff-on-failure --color=always --all-files
run-unittests:
name: Run unittests
runs-on: ubuntu-latest
Expand All @@ -25,14 +35,10 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Set up uv
uses: astral-sh/setup-uv@v5

- name: Install test dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e .[tests]
run: uv sync --python ${{ matrix.python-version }} --managed-python --group=tests --frozen
- name: Run unittests via pytest
run: pytest -vv -m "not endtoend and not singularity_integration and not conda_integration"
run: uv run pytest -vv -m "not endtoend and not singularity_integration and not conda_integration"
22 changes: 9 additions & 13 deletions .github/workflows/SCHED_docs_linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,17 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
- name: Install docs dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -e .[docs]
- name: Set up uv
uses: astral-sh/setup-uv@v5

- name: Install test dependencies
run: uv sync --python 3.12 --managed-python --group=docs --frozen
- name: Build documentation
run: |
make -C doc apidoc
make -C doc relnotes
make -C doc html
uv run make -C doc apidoc
uv run make -C doc relnotes
uv run make -C doc html
- name: Run Sphinx linkcheck on documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: make -C doc linkcheck
run: uv run make -C doc linkcheck
17 changes: 9 additions & 8 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@

version: 2
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3"
jobs:
create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
install:
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --frozen --group docs --link-mode=copy
pre_build:
- make -C doc apidoc
- make -C doc relnotes
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv run make -C doc apidoc
- UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv run make -C doc relnotes
sphinx:
builder: html
configuration: doc/conf.py
fail_on_warning: true
python:
install:
- path: .
extra_requirements:
- docs
32 changes: 12 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,38 +39,30 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]

[project.optional-dependencies]
[project.scripts]
cotainr = "cotainr.cli:main"

[project.urls]
Documentation = "https://cotainr.readthedocs.io/en/stable/"
Repository = "https://github.com/DeiC-HPC/cotainr.git"
"Bug Tracker" = "https://github.com/DeiC-HPC/cotainr/issues"
Changelog = "https://cotainr.readthedocs.io/en/stable/release_notes/index.html"

[dependency-groups]
tests = [
"pytest-cov>=2.10",
"pytest>=6.0"
]
lint = [
"cfgv>=3.4.0",
"distlib>=0.3.9",
"filelock>=3.17.0",
"identify>=2.6.6",
"nodeenv>=1.9.1",
"platformdirs>=4.3.6",
"pre-commit>=4.1.0",
"virtualenv>=20.29.1",
]
docs = [
"numpydoc>=1.5.0",
"pydata-sphinx-theme>=0.13.3",
"sphinx>=7.2.5",
"sphinx-design>=0.5.0",
"myst-parser>=2.0.0",
"numpydoc>=1.5.0"
]
dev = ["cotainr[tests,lint,docs]"]

[project.scripts]
cotainr = "cotainr.cli:main"

[project.urls]
Documentation = "https://cotainr.readthedocs.io/en/stable/"
Repository = "https://github.com/DeiC-HPC/cotainr.git"
"Bug Tracker" = "https://github.com/DeiC-HPC/cotainr/issues"
Changelog = "https://cotainr.readthedocs.io/en/stable/release_notes/index.html"
dev = [{include-group = "tests"}, {include-group = "lint"}, {include-group = "docs"}]

[tool.hatch.version]
path = "cotainr/__init__.py"
Expand Down
Loading