[build-system]
requires = ["maturin>=1.8.3,<2.0"]
build-backend = "maturin"
[project]
name = "denet"
version = "0.3.2"
description = "A streaming process monitoring tool"
readme = "README.md"
authors = [{ name = "btraven00" }]
requires-python = ">=3.6"
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Rust",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
]
[tool.pixi.project]
name = "denet"
version = "0.3.2"
channels = ["conda-forge", "pypi"]
platforms = ["linux-64", "osx-arm64"]
[tool.pixi.dependencies]
python = "==3.12"
maturin = "==1.8.6"
pytest = ">=7.0.0"
pytest-cov = ">=4.1.0"
pytest-xdist = ">=3.7.0,<4"
ruff = ">=0.1.0"
[tool.pixi.tasks]
build = { cmd = "maturin build --release" }
develop = { cmd = "./scripts/build_and_install.sh" }
test = { cmd = "python -m pytest -n 4 tests/python/" }
test-cov = { cmd = "python -m pytest -n 2 tests/python/ --cov=denet --cov-report=xml --cov-branch" }
test-rust = { cmd = "cargo test --no-default-features" }
test-all = { cmd = "cargo test --no-default-features && python -m pytest tests/python/" }
coverage = { cmd = "cargo llvm-cov --lib --no-default-features --html -- --skip test_from_pid --skip test_process_metadata" }
lint = { cmd = "ruff check --force-exclude python/ tests/" }
lint-fix = { cmd = "ruff check --fix --force-exclude python/ tests/" }
fmt = { cmd = "cargo fmt --all && ruff format --force-exclude python/ tests/" }
fmt-python = { cmd = "ruff format tests/python/ python/denet/" }
check-fmt = { cmd = "cargo fmt --all -- --check && ruff format --force-exclude python/ tests/ --check" }
rust-lint = { cmd = "cargo clippy -- -D warnings" }
rust-fmt = { cmd = "cargo fmt --all" }
lint-all = { cmd = "cargo clippy -- -D warnings && ruff check --force-exclude python/ tests/ && ruff check tests/python/ python/denet/" }
clippy-check = { cmd = "cargo clippy -- -D warnings" }
clippy-fix = { cmd = "RUSTUP_TOOLCHAIN=nightly cargo clippy --fix -Z unstable-options --allow-dirty -- -D warnings" }
fix-all = { cmd = "cargo fmt --all && ruff format --force-exclude python/ tests/ && ruff format tests/python/ python/denet/ && ruff check --fix --force-exclude python/ tests/ && ruff check --fix tests/python/ python/denet/ && RUSTUP_TOOLCHAIN=nightly cargo clippy --fix -Z unstable-options --allow-dirty -- -D warnings" }
publish-pypi = { cmd = "maturin publish --skip-existing" }
publish-crates = { cmd = "cargo publish" }
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
[tool.ruff]
target-version = "py312"
line-length = 120
[tool.ruff.lint]
select = ["E", "F"]
ignore = ["E501"]
[tool.ruff.lint.per-file-ignores]
"tests/python/test_process_monitor.py" = [
"F401",
"F811",
"F841",
"E402",
"E711",
"E712",
"F821",
"E721",
"E722",
"E741",
]
"tests/python/test_convenience.py" = [
"F401",
"F811",
"F841",
"E402",
"E711",
"E712",
"F821",
"E722",
"F541",
]
"python/denet/__init__.py" = [
"F403",
"F405",
"E402",
"F821",
"E722",
"E731",
"F541",
"F811",
"F601",
]
"python/denet/analysis.py" = [
"F541",
"F841",
"E722",
"F821",
"E731",
"E741",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.maturin]
python-source = "python"
module-name = "denet._denet"
features = ["python"]
[tool.ruff.lint.isort]
known-first-party = ["denet"]
combine-as-imports = true