Files
AR-Autopilot/pyproject.toml
T
alro65 700756c16f sprint-0: foundations -- data model, seed library, tests, demo
Initial commit. Delivers what the brief calls 'Sprint 0 - Foundations'
(see docs/AR_Autopilot_brief.md section 12):

- Complete repository structure (arautopilot package + firmware, display,
  installer, tools placeholders + docs).
- Core data model (Pydantic v2): modes, alarms, actuator config, PID
  config + gain scheduling, vessel config, knob state machine, project
  config with YAML/JSON serialisation.
- Seed library: 2 actuator profiles (hydraulic & electric DC reversible)
  and 2 default tunings (yacht motor planeo 30 m and 40 m). Conservative
  literature values, NOT the integrator's production tuning IP.
- Firmware skeleton: only src/hal/pinout.h with the 21 I/O contract for
  the AR-NMEA-IO v1.0 board. No drivers, no main loop.
- Studio stubs (real PySide6 app starts in Sprint 4).
- pytest suite (80 tests, all green): modes, alarms, actuator, PID
  (incl. gain interpolation and the +/-50% adaptive bound from brief
  section 6), vessel, knob state, project config, library loader,
  end-to-end roundtrip.
- examples/sprint0_demo.py - the acceptance demo from the brief.

Acceptance criteria met:
- pytest green (80/80)
- demo creates, saves (YAML + JSON), reloads, and verifies a full
  ProjectConfig using the seed library
- repository ready for tag `sprint-0-approved`

See CHANGELOG.md for the detailed scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 23:57:18 -04:00

161 lines
4.2 KiB
TOML

[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "arautopilot"
version = "0.1.0"
description = "AR-Autopilot — Professional marine autopilot for 30-40 m vessels (Studio + firmware + display)"
readme = "README.md"
license = { file = "LICENSE.txt" }
requires-python = ">=3.11"
authors = [{ name = "Alvaro Romero", email = "alro65@gmail.com" }]
keywords = ["marine", "autopilot", "pid", "nmea2000", "esp32", "vessel-control"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Manufacturing",
"License :: Other/Proprietary License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: System :: Hardware",
]
# Runtime dependencies — kept intentionally minimal for Sprint 0.
# GUI (PySide6), Modbus (pymodbus), serial, etc. are added in later sprints.
dependencies = [
"pydantic>=2.6,<3.0",
"pyyaml>=6.0",
"python-dateutil>=2.8",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=4.1",
"ruff>=0.4",
"mypy>=1.10",
"types-PyYAML",
"types-python-dateutil",
]
[project.urls]
Homepage = "https://github.com/alro65/AR-Autopilot"
[tool.setuptools.packages.find]
where = ["."]
include = ["arautopilot*"]
exclude = ["arautopilot.tests*"]
[tool.setuptools.package-data]
"arautopilot.library" = [
"actuators/*.json",
"default_tunings/*.yaml",
"vessel_profiles/*.yaml",
"_schemas/*.json",
]
# ----------------------------------------------------------------------------
# pytest
# ----------------------------------------------------------------------------
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["arautopilot/tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
"--showlocals",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks integration tests",
]
# ----------------------------------------------------------------------------
# Coverage
# ----------------------------------------------------------------------------
[tool.coverage.run]
source = ["arautopilot"]
omit = [
"arautopilot/tests/*",
"arautopilot/studio/*", # GUI not in scope for Sprint 0
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
]
# ----------------------------------------------------------------------------
# Ruff (linting + formatting)
# ----------------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py311"
extend-exclude = [
"firmware",
"display",
"installer",
".venv",
"build",
"dist",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"N", # pep8-naming
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # function calls in default args (common with pydantic Field)
]
[tool.ruff.lint.per-file-ignores]
"arautopilot/tests/*" = ["N802", "N803"] # test names
# ----------------------------------------------------------------------------
# mypy
# ----------------------------------------------------------------------------
[tool.mypy]
python_version = "3.11"
strict = true
warn_unused_ignores = true
warn_redundant_casts = true
plugins = ["pydantic.mypy"]
exclude = [
"build/",
"dist/",
"firmware/",
"display/",
"installer/",
"arautopilot/studio/", # GUI stubs, not in scope for Sprint 0
]
[[tool.mypy.overrides]]
module = "arautopilot.tests.*"
disallow_untyped_defs = false
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true