Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
102 changes: 101 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,103 @@
[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",
"geopandas",
"h5py",
"haversine",
"matplotlib",
"netcdf4",
"numba",
"openpyxl",
"overpy",
"pandas",
"pathos",
"peewee",
"pillow",
"pint",
"pycountry",
"pyproj",
"rasterio",
"salib",
"scikit-learn",
"seaborn",
"statsmodels",
"sparse",
"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*"]
21 changes: 13 additions & 8 deletions requirements/env_climada.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,47 @@ 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
- 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
- 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
- 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
- pycountry>=24.6
- pyproj>=3.7
- pytables>=3.10
- 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 # needed by geopandas, 1.4.0 doesn't pass the `pip check`
- 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
- 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