Files
bincio-activity/pyproject.toml
Davide Scaini df496a017f fix: refine hysteresis recalculation with MA pre-smoothing and lower thresholds
- dem.py: pre-smooth elevation with 30s moving average before hysteresis
  in recalculate_elevation_hysteresis(); thresholds drop from 5m/10m to
  1m (barometric) / 3m (GPS) — accurate after noise is smoothed out
- dem.py: widen DEM median-filter window 45s → 60s
- dem.py: rename response key source → altitude_source for consistency
- writer.py: write altitude_source into detail JSON at extract time
- tests/test_dem.py: 21 unit tests for pure functions and file-level hysteresis
- tests/test_edit_server.py: 11 TestClient API tests for both recalculate endpoints
- add httpx as dev dependency (required by FastAPI TestClient)
2026-04-22 10:57:28 +02:00

102 lines
2.0 KiB
TOML

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "bincio"
version = "0.1.0"
description = "Federated, open-source, self-hosted activity stats platform"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "MIT" }
authors = [{ name = "Davide Brugali" }]
dependencies = [
# Parsing
"gpxpy>=1.6",
"fitdecode>=0.11",
"lxml>=5.0", # TCX (XML)
# Data
"pandas>=2.2",
# Config & CLI
"pyyaml>=6.0",
"click>=8.1",
"rich>=13.0", # pretty console output
# Schema validation
"jsonschema>=4.23",
]
[project.optional-dependencies]
classifier = [
"scikit-learn>=1.5",
]
edit = [
"fastapi>=0.110",
"uvicorn[standard]>=0.29",
"python-multipart>=0.0.9",
]
serve = [
"fastapi>=0.110",
"uvicorn[standard]>=0.29",
"python-multipart>=0.0.9",
"bcrypt>=4.1",
]
strava = [
"requests>=2.32",
]
garmin = [
"garminconnect>=0.2",
"cryptography>=42.0",
]
dev = [
"pytest>=9.0",
"pytest-cov>=5.0",
"ruff>=0.9",
"mypy>=1.11",
"types-pyyaml",
"types-jsonschema",
]
docs = [
"mkdocs-material>=9.5",
]
[project.scripts]
bincio = "bincio.cli:main"
[dependency-groups]
dev = [
"pytest>=9.0",
"pytest-cov>=5.0",
"ruff>=0.9",
"mypy>=1.11",
"types-pyyaml",
"types-jsonschema",
"mkdocs-material>=9.5",
# serve/edit extras pulled in so test_db.py and test_server_imports.py pass in CI
"fastapi>=0.110",
"uvicorn[standard]>=0.29",
"python-multipart>=0.0.9",
"bcrypt>=4.1",
"httpx>=0.28.1",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
ignore = ["E501"]
[tool.mypy]
python_version = "3.12"
strict = true
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests requiring real activity files",
]