Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion climada/engine/unsequa/calc_cost_benefit.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def _map_costben_calc(
ent_future=ent_fut,
save_imp=False,
assign_centroids=False,
**cost_benefit_kwargs
**cost_benefit_kwargs,
)
# Extract from climada.impact the chosen metrics
uncertainty_values.append(
Expand Down
105 changes: 104 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,106 @@
[build-system]
requires = ["setuptools >= 64"]
requires = ["setuptools>=61", "setuptools_scm"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why reduce the version requirement for setuptools?

Why include setuptools_scm? According to its docs:

setuptools-scm extracts Python package versions from git or hg metadata instead of declaring them as the version argument or in a Source Code Managed (SCM) managed file.

We hard-code the version in this file later on, so including this requirement serves no purpose (or does it? 🤷)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 changes reverted

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turns out we actually need setuptools_scm for including package data

build-backend = "setuptools.build_meta"

[project]
name = "climada"
version = "6.0.2-dev"
description = "CLIMADA in Python"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "CLIMADA in Python"
description = "Framework for climate risk assessment and adaptation option appraisal"

readme = "README.md"
requires-python = ">=3.10,<3.13"
license = { text = "GNU Lesser General Public License v3 (GPLv3)" }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
license = { text = "GNU Lesser General Public License v3 (GPLv3)" }
license = { text = "GNU General Public License v3 (GPLv3)" }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

authors = [
{ name = "ETH", email = "schmide@ethz.ch" }
]
keywords = ["climate", "adaptation"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Atmospheric Science",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Scientific/Engineering :: Mathematics"
]
dependencies = [
"bayesian-optimization",
"bottleneck",
"cartopy",
"cfgrib",
"contextily",
"dask",
"deprecation",
"fiona",
"gdal",
"geopandas",
"h5py",
"haversine",
"matplotlib",
"netcdf4",
"numba",
"openpyxl",
"overpy",
"pandas",
"pathos",
"peewee",
"pillow",
"pint",
"pyarrow",
"pycountry",
"pyproj",
"rasterio",
"salib",
"scikit-learn",
"seaborn",
"sparse",
"statsmodels",
"tables",
"tabulate",
"tqdm",
"xarray",
"xlrd",
"xlsxwriter"
]

[project.optional-dependencies]
doc = [
"ipython",
"myst-nb",
"readthedocs-sphinx-ext>=2.2",
"sphinx",
"sphinx-book-theme",
"sphinx-markdown-tables",
"sphinx-design",
"sphinx-mdinclude"
]
test = [
"ipython",
"mccabe>=0.6",
"pylint>=3.0",
"pytest",
"pytest-cov",
"pytest-subtests"
]
dev = [
"ipython",
"myst-nb",
"readthedocs-sphinx-ext>=2.2",
"sphinx",
"sphinx-book-theme",
"sphinx-markdown-tables",
"sphinx-design",
"sphinx-mdinclude",
"mccabe>=0.6",
"pylint>=3.0",
"pytest",
"pytest-cov",
"pytest-subtests",
"pre-commit"
]
Comment on lines +79 to +82

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very inconvenient. I think we should omit the "dev" shortcut then instead of duplicating the lists.


[project.urls]
Homepage = "https://github.com/CLIMADA-project/climada_python"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
include = ["climada*"]
31 changes: 19 additions & 12 deletions requirements/env_climada.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,49 @@ channels:
- conda-forge
- nodefaults
dependencies:
- bottleneck>=1.4
- bayesian-optimization>=1.5,<2.0
- bottleneck>=1.5
- cartopy>=0.24
- cfgrib>=0.9
- contextily>=1.6
- dask>=2025.2
- eccodes>=2.40
- dask>=2025.5
- deprecation>=2.1
- eccodes>=2.41
- fiona>=1.10
- gdal>=3.10
- geopandas>=0.14,<1.0 # geopandas 1.0 does not depend on fiona anymore, hence fiona would need to be added as dependency
- h5py>=3.12
- geopandas>=0.14,<1.0 # not yet ready for upgrading
- h5py>=3.13
- haversine>=2.9
- matplotlib-base>=3.10
- netcdf4>=1.7
- numba>=0.61
- numexpr>=2.10
- openpyxl>=3.1
- osm-flex>=1.1
- osm-flex>=1.1 # this is only required for running the tutorials, not for the CLIMADA package itself
- overpy>=0.7
- pandas>=2.1,<2.2 # 2.2 is not compatible with the default pytables=3.7 and yields a very high deprecation warning number through geopandas
- pathos>=0.3
- peewee>=3.17
- pint>=0.24
- pip
- pyarrow>=20.0
- pycountry>=24.6
- pyproj>=3.7
- pytables>=3.10
- pytables>=3.10 # this is the name of the pypi 'tables' package on conda-forge
- python>=3.10,<3.13
- pyxlsb>=1.0
- rasterio>=1.4
- requests>=2.32
- rtree>=1.3,<1.4 # 1.4.0 doesn't pass the `pip check`
- rtree>=1.3,<1.4 # 1.4.0 doesn't pass the `pip check`, needed by geopandas
- salib>=1.5
- seaborn>=0.13
- scikit-learn>=1.6
- scikit-learn>=1.7
- scipy>=1.14,<1.15 # 1.15 is not compatible with climada_petals, climada_petals.engine.test.test_supplychain fails with "'Series' has no attribute 'nonzero'"
- sparse>=0.15
- seaborn>=0.13
- sparse>=0.17
- statsmodels>=0.14
- tabulate>=0.9
- tqdm>=4.67
- unittest-xml-reporting>=3.2
- xarray>=2025.1
- xarray>=2025.6
- xlrd>=2.0
- xlsxwriter>=3.2
108 changes: 0 additions & 108 deletions setup.py

This file was deleted.

Loading