Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
96 lines (84 loc) · 2.72 KB
/
Copy pathpyproject.toml
File metadata and controls
96 lines (84 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "sagetrans"
version = "0.0.1"
description = "Sage VTOL transition and landing-approach simulation toolkit"
requires-python = ">=3.13"
# The numerical libraries are pinned to the versions the results were made with (a compatible
# release, ~=), because a library version can move an optimum without a code change. They are
# also recorded in run_record.json and are part of the task-cache key. CI runs Python 3.13 and the
# pins are what that run uses; all of them have 3.13 wheels.
dependencies = [
"numpy~=2.5.3",
"scipy~=1.18.1",
"casadi~=3.8.1",
"pydantic~=2.13.5",
"pyyaml",
"cma~=4.5.0",
"SALib~=1.6.0",
"matplotlib~=3.11.2",
"openpyxl", # the tables.xlsx workbook of the results viewer (docs/OUTPUTS_spec.md)
]
[project.optional-dependencies]
dev = [
"pytest",
"hypothesis",
"ruff",
"mypy",
"import-linter",
"types-PyYAML",
]
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-ra"
[tool.ruff]
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP", "N"]
[tool.mypy]
python_version = "3.13"
strict = true
files = ["src"]
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = ["casadi.*", "scipy.*", "cma.*", "SALib.*", "matplotlib.*", "openpyxl.*"]
ignore_missing_imports = true
# NFR-05: physics knows nothing of controllers; controllers know nothing of analyses.
# Contracts are extended as the layers are added in later milestones.
[tool.importlinter]
root_package = "sagetrans"
[[tool.importlinter.contracts]]
name = "Layering: analysis > control > dynamics > physics > atmosphere > config > progress"
type = "layers"
layers = [
"sagetrans.io",
"(sagetrans.analysis)",
"(sagetrans.control)",
"(sagetrans.dynamics)",
"(sagetrans.physics)",
"sagetrans.atmosphere",
"sagetrans.config",
"sagetrans.progress", # imports nothing; every layer may report progress through it
]
# docs/OUTPUTS_spec.md 1: the viewer reads a results folder; it imports no analysis code.
[[tool.importlinter.contracts]]
name = "The results viewer reads files and imports no analysis code"
type = "forbidden"
source_modules = ["sagetrans.io.view"]
forbidden_modules = [
"sagetrans.analysis",
"sagetrans.control",
"sagetrans.dynamics",
"sagetrans.physics",
]
[tool.ruff.lint.per-file-ignores]
# physics symbols (T_r, Vc, J, ...) follow the proposal's notation
"src/sagetrans/*" = ["N802", "N803", "N806", "N815", "N816"]
"tests/*" = ["N802", "N803", "N806", "N815", "N816"]
# the viewer writes SVG/HTML markup and tooltip text in single strings
"src/sagetrans/io/view/*" = ["E501"]