Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
dc2f4cb
add initial uv/pyproject config
simbuerg Jul 27, 2025
50ebdb5
add missing requirement to six
simbuerg Jul 27, 2025
56eba3f
add console scripts
simbuerg Jul 27, 2025
ac701cc
add missing setup.py entries
simbuerg Jul 27, 2025
2f66d0b
fix: convert to list
simbuerg Jul 27, 2025
2c76517
fix: remove invalid url parameter
simbuerg Jul 27, 2025
3d23710
fix: remove license override, provide license-files
simbuerg Jul 27, 2025
e6f078a
add dev dependencies
simbuerg Jul 27, 2025
5067ead
format updates
simbuerg Jul 27, 2025
dd47d73
update github actions
simbuerg Jul 27, 2025
d2f6330
disable local scheme
simbuerg Jul 27, 2025
51ffa31
fix: sphinx-build
simbuerg Jul 27, 2025
73ec115
fix: add missing python-version
simbuerg Jul 27, 2025
847ea63
fix: run inside venv when generating docs
simbuerg Jul 27, 2025
9f0c513
fix: ignore _version.py
simbuerg Jul 27, 2025
b19eb50
fix: avoid override of version in conf.py
simbuerg Jul 27, 2025
29f8f14
chore: convert pre-commit to using ruff
simbuerg Jul 27, 2025
ca2adfc
chore: reformat using ruff
simbuerg Jul 27, 2025
711e932
fix: improve python version handling in ci workflow
simbuerg Jul 27, 2025
4139c45
add missing uv install to integration workflow
simbuerg Sep 28, 2025
edc8f17
Merge branch 'master' into feature/uv
simbuerg Sep 28, 2025
03edc9d
fix(ci): make uv venv cooperate with coverage
simbuerg Sep 28, 2025
2d82e38
fix(ci): update/replace python handling using uv
simbuerg Sep 28, 2025
c8b5518
fix (coverage): do not try to measure local venv directories
simbuerg Nov 20, 2025
cef024c
Merge branch 'master' into feature/uv
simbuerg Nov 20, 2025
2cb1117
fix (coverage): point to pyscript directly
simbuerg Nov 20, 2025
893159d
ci: expand python test matrix
simbuerg Nov 20, 2025
69f4384
chore: set minimum python version to 3.10
simbuerg Nov 20, 2025
081a470
chore: resolve dependency version for each python release
simbuerg Nov 20, 2025
cb9e19c
fix (ci): add libgit2-dev
simbuerg Nov 20, 2025
767b473
ci: do not fail-fast
simbuerg Nov 20, 2025
8691ebd
feat (python): bump minimum python version to 3.11
simbuerg Nov 20, 2025
7ef5fa2
chore (pygit2): bump minimum version to 1.19
simbuerg Nov 20, 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
5 changes: 4 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[run]
include = */benchbuild/*
include = benchbuild/*
omit =
./venv/*
*/bin/benchbuild*
*/benchbuild/lib/*
*/benchbuild/bin/*
.venv/*
branch = True
parallel = True

Expand Down
118 changes: 59 additions & 59 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ jobs:
unittests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v5

- name: Install system dependencies for CI
run: |
sudo apt-get install time unionfs-fuse libfuse-dev clang
sudo apt-get install time unionfs-fuse libfuse-dev clang libgit2-dev

- name: Install dependencies
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install the project
run: |
python -m pip install --upgrade pip wheel
pip install .
pip install -r requirements.txt
pip install -r test-requirements.txt
uv sync --locked --all-extras --dev

- name: Run unittests
env:
Expand All @@ -40,8 +40,8 @@ jobs:
run: |
git config --global protocol.file.allow always

pytest --cov-config=./.coveragerc --cov=benchbuild --ignore=tests/integration benchbuild tests
pytest --cov-config=./.coveragerc --cov=benchbuild tests/integration
uv run pytest --cov-config=./.coveragerc --cov=benchbuild --ignore=tests/integration benchbuild tests
uv run pytest --cov-config=./.coveragerc --cov=benchbuild tests/integration

- uses: actions/upload-artifact@master
with:
Expand All @@ -53,27 +53,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
db_support: [true, false]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout
uses: actions/checkout@v5

- name: Install system dependencies for CI
run: |
sudo apt-get install time unionfs-fuse libfuse-dev clang slurm-client

- name: Install dependencies
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install the project
run: |
python -m pip install --upgrade pip wheel
pip install .
pip install -r requirements.txt
pip install -r test-requirements.txt
uv sync --locked --all-extras --dev

- name: Run integration tests
env:
Expand All @@ -86,18 +85,19 @@ jobs:
BB_CONTAINER_RUNROOT: ${{ runner.temp }}
BB_VERBOSITY: 5
run: |
coverage run -p `which benchbuild` bootstrap -s
coverage run -p `which benchbuild` config view
coverage run -p `which benchbuild` experiment view
coverage run -p `which benchbuild` project view
coverage run -p `which benchbuild` run --full test
coverage run -p `which benchbuild` slurm -E empty test
coverage run -p `which benchbuild` slurm -E raw bzip2/benchbuild -- container --runroot /foo/bar
coverage run -p `which benchbuild` run -E raw bzip2/benchbuild
coverage run -p `which benchbuild` container run -E raw bzip2/benchbuild
coverage run -p `which benchbuild` container bases --export -E raw bzip2/benchbuild
coverage run -p `which benchbuild` container bases --import -E raw bzip2/benchbuild
coverage run -p `which benchbuild` container rmi --with-projects -E raw bzip2/benchbuild
source .venv/bin/activate
coverage run -p .venv/bin/benchbuild bootstrap -s
coverage run -p .venv/bin/benchbuild config view
coverage run -p .venv/bin/benchbuild experiment view
coverage run -p .venv/bin/benchbuild project view
coverage run -p .venv/bin/benchbuild run --full test
coverage run -p .venv/bin/benchbuild slurm -E empty test
coverage run -p .venv/bin/benchbuild slurm -E raw bzip2/benchbuild -- container --runroot /foo/bar
coverage run -p .venv/bin/benchbuild run -E raw bzip2/benchbuild
coverage run -p .venv/bin/benchbuild container run -E raw bzip2/benchbuild
coverage run -p .venv/bin/benchbuild container bases --export -E raw bzip2/benchbuild
coverage run -p .venv/bin/benchbuild container bases --import -E raw bzip2/benchbuild
coverage run -p .venv/bin/benchbuild container rmi --with-projects -E raw bzip2/benchbuild
coverage combine
coverage report -m

Expand All @@ -111,15 +111,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v5

- uses: actions/download-artifact@master
with:
Expand All @@ -131,15 +126,21 @@ jobs:
name: coverage-integration-${{ matrix.python-version }}
path: ./.coverage.integration

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- run: |
ls -lah .
python -m pip install --upgrade pip wheel
pip install coverage
coverage combine -a ./.coverage.integration/.coverage ./.coverage.unittests/.coverage
coverage xml
uv sync --locked --all-extras --dev
uv pip install coverage
uv run coverage combine -a ./.coverage.integration/.coverage ./.coverage.unittests/.coverage
uv run coverage xml

- name: Upload coverage report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
Expand All @@ -149,25 +150,24 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Setup a git user
run: |
git config user.name github-actions
git config user.email github-actions@github.com

- name: Install dependencies
- name: Install the project
run: |
python -m pip install --upgrade pip
pip install .
pip install -r docs/requirements.txt
uv sync --locked --all-extras --group docs
44 changes: 8 additions & 36 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,30 @@ jobs:
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

# https://github.com/marketplace/actions/setup-python
# ^-- This gives info on matrix testing.
- name: Install Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version-file: ".python-version"

# https://docs.github.com/en/actions/guides/building-and-testing-python#caching-dependencies
# ^-- How to set up caching for pip on Ubuntu
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

# https://docs.github.com/en/actions/guides/building-and-testing-python#installing-dependencies
# ^-- This gives info on installing dependencies with pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/requirements.txt
pip install .
- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Debugging information
- name: Install the project
run: |
echo "github.ref:" ${{github.ref}}
echo "github.event_name:" ${{github.event_name}}
echo "github.head_ref:" ${{github.head_ref}}
echo "github.base_ref:" ${{github.base_ref}}
set -x
git rev-parse --abbrev-ref HEAD
git branch
git branch -a
git remote -v
python -V
pip list --not-required
pip list
uv sync --locked --all-extras --dev --group docs

# Build
- uses: ammaraskar/sphinx-problem-matcher@master
- name: Build Sphinx docs
run: |
make -Cdocs dirhtml
uv run make -Cdocs dirhtml
# This fixes broken copy button icons, as explained in
# https://github.com/coderefinery/sphinx-lesson/issues/50
# https://github.com/executablebooks/sphinx-copybutton/issues/110
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
name: reviewdog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ __pycache__/
.vim/coc-settings.json
.pheasant_cache/
build/
benchbuild/_version.py
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[settings]
known_third_party = attr,dill,faker,git,jinja2,mock,parse,pkg_resources,plumbum,psutil,pygtrie,pyparsing,pytest,pytest_git,result,rich,schema,setuptools,six,sqlalchemy,yaml
known_third_party = attr,dill,faker,git,jinja2,mock,parse,plumbum,psutil,pygtrie,pyparsing,pytest,pytest_git,result,rich,schema,setuptools,six,sqlalchemy,yaml
multi_line_output=3
use_parentheses = True
include_trailing_comma: True
Expand Down
23 changes: 10 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,23 @@ repos:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: requirements-txt-fixer
- repo: https://github.com/asottile/seed-isort-config
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/timothycrosley/isort.git
rev: 5.12.0
hooks:
- id: isort
args: ['-nis']
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: v0.2.2
hooks:
- id: auto-walrus
- repo: https://github.com/pre-commit/mirrors-yapf
rev: 'v0.32.0'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.12.5"
hooks:
- id: yapf
- id: ruff-check
args: [ "--fix" ]

- id: ruff-check
args: [ "--select", "I", "--fix"]

- id: ruff-format
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
5 changes: 5 additions & 0 deletions benchbuild/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"""
Public API of benchbuild.
"""

import sys

# Project utilities
Expand All @@ -11,16 +12,20 @@
from . import plugins as __PLUGINS__
from . import source as source
from .experiment import Experiment as Experiment

# Export: Project
from .project import Project as Project

# Export: Configuration
from .settings import CFG as CFG

# Don't Export, just init.
# Export: compiler, download, run and wrapping modules
from .utils import compiler as compiler
from .utils import download as download
from .utils import settings as __SETTINGS__
from .utils import wrapping as wrapping

# Wrapping / Execution utilities
from .utils.run import watch as watch
from .utils.wrapping import wrap as wrap
Expand Down
11 changes: 9 additions & 2 deletions benchbuild/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
"""The CLI package."""

__all__ = [
"main", "bootstrap", "config", "log", "project", "experiment", "run",
"slurm"
"main",
"bootstrap",
"config",
"log",
"project",
"experiment",
"run",
"slurm",
]
Loading
Loading