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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ repos:
- id: test
name: Run all tests
# reinstall genmetaballs to rebuild C++/CUDA code, then run tests
entry: bash -c "pixi reinstall genmetaballs && pixi run test"
entry: pixi run test
language: system
pass_filenames: false
always_run: true
Expand Down
2 changes: 1 addition & 1 deletion pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 18 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,23 @@ ninja = "*"
scikit-build-core = "*"
nanobind = "*"
gtest = ">=1.17.0,<2"
clang-tools = ">=18,<20" # Includes clang-format and clang-tidy
clang-tools = ">=18,<20" # Includes clang-format and clang-tidy
mesalib = ">=25.0.5,<26"

[tool.pixi.pypi-dependencies]
genmetaballs = { path = ".", editable = true }
ruff = ">=0.8.0"
pre-commit = ">=3.0.0"

[tool.pixi.pypi-options]
# Disable build isolation for genmetaballs to allow scikit-build to find cmake and other build tools
# See https://github.com/scikit-build/scikit-build-core/issues/1112#issuecomment-3025463521
no-build-isolation = ["genmetaballs"]

[tool.pixi.tasks]
ctest = "ctest --test-dir build"
pytest = "pytest"
test = { depends-on = ["ctest", "pytest"] }
test = { depends-on = ["pytest", "ctest"] }
# Simple lint/format/fix commands (C++/CUDA + Python)
format = { cmd = "scripts/format.sh" }
lint = { cmd = "scripts/lint.sh" }
Expand All @@ -66,6 +71,7 @@ wheel.py-api = "cp313" # Or your Python version
wheel.packages = ["genmetaballs/src/genmetaballs"]
# use a persistent build directory to speed up rebuild & testing
build-dir = "build"
editable.rebuild = true

[dependency-groups]
dev = ["pytest"]
Expand All @@ -86,20 +92,20 @@ line-ending = "auto"

[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
]

[tool.ruff.lint.isort]
known-first-party = ["genmetaballs"]
[tool.pixi.activation.env]
PYOPENGL_PLATFORM = "osmesa"
PYOPENGL_PLATFORM = "osmesa"