Files
beta_shape_pnpi/pyproject.toml
T
unzhakov 4b08df3873 test: create new test architecture with shared property/API tests
- Add tests/common/ with parametrized property tests (positivity, shape, NaN, stability)
- Add tests/physics/ with unique physics behavior tests for 6 correction components
- Add tests/quality/ with API contract tests for 6 correction components
- Add pytest markers in pyproject.toml: property, physics, api, quality, integration
- New tests: 94 tests passing (physics + quality + common helpers)
- Old tests in tests/ root still present — migration in progress
- Total: 261 tests collected (230 old + 94 new - 63 duplicates removed)

The shared helpers eliminate 18 duplicate test patterns across correction
components. Each component now has:
  - tests/physics/test_<name>.py — unique physics behavior
  - tests/quality/test_api_<name>.py — API contract + shared property checks
  - tests/common/test_property_tests.py — shared helpers (imported, not duplicated)
2026-05-15 15:04:52 +03:00

69 lines
1.5 KiB
TOML

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "beta-spectrum"
version = "0.3.0"
description = "High-precision beta spectrum calculation for nuclear physics"
authors = [
{ name = "Evgeniy Unzhakov" }
]
requires-python = ">=3.10"
dependencies = [
"numpy",
"scipy",
"matplotlib",
"pandas"
]
[project.optional-dependencies]
ensdf = ["paceENSDF"]
dev = [
"pytest",
"nbmake",
"black",
"ruff",
"mypy",
"mdformat",
"mdformat-frontmatter",
"mdformat-footnote",
"mdformat-tables"
]
[project.scripts]
bs_pnpi = "beta_spectrum.cli:main"
[tool.setuptools.packages.find]
where = ["."]
[tool.mypy]
python_version = "3.10"
strict = true
exclude = ["notebooks", "scripts/notebook_plots.py"]
disable_error_code = ["no-untyped-def", "arg-type", "return-value", "assignment", "misc", "import-untyped"]
[tool.black]
line-length = 88
[tool.pytest.ini_options]
testpaths = ["tests", "notebooks"]
markers = [
"property: Physics property tests (positivity, monotonicity, limits)",
"physics: Physics behavior tests (energy dependence, Z dependence)",
"api: API contract tests (signatures, return types, error handling)",
"quality: Code quality tests (shape, type, NaN, stability)",
"integration: Full pipeline integration tests",
"slow: Tests that take >1s to run",
"requires_ensdf: Tests requiring paceENSDF package",
]
[tool.ruff]
line-length = 88
[tool.mdformat]
line-length = 88
wrap = false
number = true