-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathpyproject.toml
More file actions
185 lines (163 loc) · 5.16 KB
/
Copy pathpyproject.toml
File metadata and controls
185 lines (163 loc) · 5.16 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
[project]
name = "cityenergyanalyst"
description = "City Energy Analyst"
readme = "README.rst"
requires-python = ">=3.12" # Held back by pythonocc-core
license = { file = "LICENSE" }
authors = [
{ name = "Architecture and Building Systems", email = "cea@arch.ethz.ch" }
]
maintainers = [
{ name = "Reynold Mok", email = "reynold.mok@arch.ethz.ch" }
]
dynamic = ["version"]
# Read docs/developer/dependency-management.rst for dependency management guidelines
dependencies = [
# Scientific/geospatial packages (optimized conda builds available in conda-forge)
# Duplicated below in [tool.pixi.dependencies] to fetch from conda-forge using pixi - update both when needed
"numpy>=2.0,<3",
"scipy",
"matplotlib",
"geopandas>=1.0.0",
"shapely>=2.0.0",
"networkx>=3.4", # 3.4 contains a fix for steiner tree algorithm
"scikit-learn",
"numba",
"pyyaml",
"psutil",
"pyarrow",
"libpysal",
"osmnx>=2.0.0",
"pvlib",
# Does not exist in pypi
# "pythonocc-core",
# Backend dependencies
"aiofiles",
"aiocache[redis]",
"fastapi",
"pydantic-settings",
"uvicorn",
"jinja2",
"python-socketio",
"python-multipart", # Required by fastapi for file uploads
"sqlalchemy[asyncio]>=2.0.0",
"sqlmodel", # Required by fastapi for database models
"asyncpg", # Required by sqlmodel for postgres
"aiosqlite", # Required for async sqlite adapter
"pyjwt[crypto]", # Required by fastapi for JWT authentication
# Other python dependencies
"deap",
"ephem",
"numpy-financial",
"python-louvain",
"tzfpy[pytz]",
"salib",
"openpyxl",
"plotly",
"utm",
"xlrd",
"xlwt",
"wntr==1.4.0", # Needs to be installed via pip since conda-forge does not provide osx-arm64 builds
"py4design-cea",
"pyepwmorph>=1.0.5",
# CEA external tools
"cea-external-tools>=0.2.3"
]
[dependency-groups]
lint = ["ruff"]
test = ["pytest", "pytest-cov"]
docs = ["setuptools", "sphinx"]
dev = [{include-group = "test"}, {include-group = "lint"}, {include-group = "docs"}]
[project.urls]
"Homepage" = "https://cityenergyanalyst.com"
"Bug Reports" = "https://github.com/architecture-building-systems/CityEnergyAnalyst/issues"
"Source" = "https://github.com/architecture-building-systems/CityEnergyAnalyst"
[project.scripts]
cea = "cea.interfaces.cli.cli:main"
cea-config = "cea.interfaces.cli.cea_config:main"
cea-doc = "cea.interfaces.cli.cea_doc:main"
cea-dev = "cea.interfaces.cli.cea_dev:main"
cea-worker = "cea.worker:main"
cea-plot = "cea.plots.plot_cli:main"
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["cea*"]
namespaces = false
[tool.setuptools.package-data]
cea = [
# Configuration files
"default.config",
"schemas.yml",
"scripts.yml",
"workflows/*.yml",
"kpi/definitions/*.yml",
# Data files
"examples/*.zip",
# TODO: Move generate weather data script to scripts directory, should not be in package
"datamanagement/weather_helper/weather.geojson",
"databases/**/*.csv",
"databases/weather/**/*.epw",
# Web assets
"interfaces/dashboard/plots/templates/*.html",
"plots/naming.csv",
"plots/*.html",
"plots/**/*.png",
"plots/**/*.yml",
]
[tool.setuptools.dynamic]
version = { attr = "cea.__version__" }
[tool.ruff]
exclude = ["*.ipynb", "external/"]
extend-exclude = ["*.pyi"]
lint.ignore = [
"E741", # ambiguous variable name (l, O, I)
]
[tool.pixi.workspace]
channels = ["conda-forge"]
# TODO: Lower glibc to "2.17" after publishing manylinux_2_17 wheels for linux-64 and linux-aarch64
platforms = [
{ platform = "linux-64", glibc = "2.39" },
{ platform = "linux-aarch64", glibc = "2.39" },
{ platform = "osx-64", macos = "14.0" },
{ platform = "osx-arm64", macos = "14.0" },
"win-64"
]
[tool.pixi.tasks]
unittest = "pytest cea/tests/"
integration = "cea test --type integration"
coverage = "pytest --cov=cea cea/tests/"
# Development tasks
lint = {cmd = "ruff check --fix ."}
setup-dev = {cmd = "pip install -e . --group dev"}
build-wheel = {cmd = "uv build"}
export-spec = {cmd = "pixi workspace export conda-explicit-spec --ignore-pypi-errors conda-spec"}
export-conda = {cmd = "pixi workspace export conda-environment environment.yml"}
[tool.pixi.dependencies]
# Scientific/geospatial packages (also in main dependencies - conda-forge preferred)
# Duplicate of above in [project.dependencies] - update both when needed
numpy = ">=2.0,<3"
scipy = "*"
matplotlib = "*"
geopandas = ">=1.0.0"
shapely = ">=2.0.0"
networkx = ">=3.4" # 3.4 contains a fix for steiner tree algorithm
scikit-learn = "*"
numba = "*"
pyyaml = "*"
psutil = "*"
pyarrow = "*"
pythonocc-core = "==7.8.1" # Due to #3867
pvlib = "*" # has optional C extensions for solar calculations
# Pure Python packages (conda-forge for unified dependency resolution)
libpysal = "*"
osmnx = ">=2.0.0"
# System dependencies with native libraries (fetch from conda-forge)
fiona = "*"
gdal = "*"
# Development tools (pixi-only)
notebook = "*"
pixi-pycharm = ">=0.0.8,<0.0.9" # for pycharm support
uv = "*"
timezonefinder = ">=8.1.0,<9" # to fix Windows installation due to pyepwmorpher