forked from Urban-Meteorology-Reading/SUEWS
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
152 lines (130 loc) · 4.59 KB
/
pyproject.toml
File metadata and controls
152 lines (130 loc) · 4.59 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[build-system]
requires = [
"wheel",
"f90wrap==0.2.16",
"numpy>=2.0",
"meson-python>=0.12.0",
]
build-backend = 'mesonpy'
[project]
name = "supy"
description = "The SUEWS model that speaks Python"
authors = [
{ name = "Dr Ting Sun", email = "ting.sun@ucl.ac.uk" },
]
dynamic = ["version"]
requires-python = ">=3.9"
license = { text = "GPL-V3.0" }
readme = "README.md"
# Core runtime dependencies only
dependencies = [
# Data processing
"pandas",
"numpy>=2.0",
"scipy",
# xarray removed - only needed for gridded ERA5 (install separately)
# dask removed - CLI uses stdlib multiprocessing.pool.ThreadPool
# Model requirements
"pydantic",
"pyyaml", # YAML configuration parsing (used in data_model/core/config.py)
"f90nml",
# Utilities
"matplotlib",
"seaborn",
"chardet",
"click",
"pyarrow>=20,<21; python_version < '3.14' and platform_system == 'Linux'", # Linux needs manylinux2014 wheels on CPython 3.9-3.13
"pyarrow>=20; python_version < '3.14' and platform_system != 'Linux'", # Non-Linux platforms may use newer pyarrow binaries
"pyarrow>=22; python_version >= '3.14'", # 22.x provides cp314 wheels on manylinux_2_28/macOS/Windows
# Scientific packages
"atmosp",
"scikit-learn",
# Optimization
"lmfit",
# Data access
"cdsapi", # ERA5 data download (timeseries uses CSV, gridded requires optional h5netcdf)
# Time/location
"tzfpy>=1.0.0", # Faster timezone finder with Windows wheels
"pytz",
# Schema validation (for YAML configs)
"jsonschema",
"rich",
# Version checking (pandas compatibility in _load.py)
"packaging",
]
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
]
[project.optional-dependencies]
# TMY/EPW generation support (requires pvlib which depends on h5py)
tmy = [
"pvlib",
"metpy", # Required for UMEP EPW conversion (util/_UMEP2epw.py)
]
# Single dev group combining test + development tools
dev = [
# Testing
"pytest",
"pytest-cov",
# Code formatting
"ruff",
"fprettify",
# Development
"ipykernel",
# Documentation - Essential only (based on conf.py usage)
"sphinx>=4.0,<8.2",
"sphinx-autobuild",
"sphinx-book-theme", # Active theme in conf.py
"nbsphinx", # Jupyter notebook support
"recommonmark", # Markdown support
"pybtex", # Bibliography processing
"sphinxcontrib.bibtex~=2.4", # Bibliography support (heavily customised)
"sphinx-panels", # Panel layouts
"sphinx-design", # Collapsible sections for YAML config docs
"sphinx-last-updated-by-git", # Git info in docs
"sphinx-click", # CLI documentation
"sphinx_comments", # Comments (may be re-enabled)
"docutils>=0.16,<0.17", # Version pinned for compatibility
"jinja2>=3.0", # Version pinned for compatibility - # MP removed upper limit
]
[project.scripts]
suews-run = "supy.cmd.SUEWS:SUEWS"
suews-convert = "supy.cmd.table_converter:convert_table_cmd"
suews-validate = "supy.cmd.validate_config:main"
suews-schema = "supy.cmd.schema_cli:main"
[tool.pytest.ini_options]
filterwarnings = [
"ignore::UserWarning:pydantic.main",
]
# Test markers for tiered CI testing
markers = [
"smoke: Minimal wheel validation (~6 tests, ~60s)",
"core: Core physics & logic tests (Fortran, driver)",
"util: Utility function tests (non-critical)",
"cfg: Config/schema validation tests",
"slow: Tests taking >30s individually",
"qgis: UMEP plugin tests in test/umep/ (Windows + Python 3.12 only)",
]
[tool.ruff]
line-length = 120
target-version = "py39"
[tool.ruff.lint]
# FA102: Catch PEP 604 union syntax (X | None) which requires Python 3.10+
# This prevents CI failures on Python 3.9 due to runtime TypeError
extend-select = ["FA102"]
# Note: FA102 auto-fix adds `from __future__ import annotations` which can break Pydantic
# Instead, manually use Optional[X] from typing module (see .claude/rules/python/conventions.md)
[tool.ruff.format]
quote-style = "double"
indent-style = "space"