Conversation
|
Unfortunately I haven't found a meaningful way to get rid of env_climada.yml too. e.g. a script that translates and exports the content of pyproject.toml to the env_climada.yml file: |
|
What about this? https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#dynamic-metadata We can place the contents of [project]
dynamic = ["dependencies"]
# ...
[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}This is still considered a beta feature, but we could give it a try. Of course, the
|
| 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" | ||
| ] |
There was a problem hiding this comment.
This is very inconvenient. I think we should omit the "dev" shortcut then instead of duplicating the lists.
After personal discussion, this does not seem feasible. Packages on conda-forge may have different names than on PyPI. The conda environment file also serves a slightly different purpose (creating a conda environment) than the pyproject.toml (check that requirements are met). |
pyproject.toml
Outdated
| description = "CLIMADA in Python" | ||
| readme = "README.md" | ||
| requires-python = ">=3.10,<3.13" | ||
| license = { text = "GNU Lesser General Public License v3 (GPLv3)" } |
There was a problem hiding this comment.
| license = { text = "GNU Lesser General Public License v3 (GPLv3)" } | |
| license = { text = "GNU General Public License v3 (GPLv3)" } |
There was a problem hiding this comment.
Good catch!
pyproject.toml
Outdated
| [project] | ||
| name = "climada" | ||
| version = "6.0.2-dev" | ||
| description = "CLIMADA in Python" |
There was a problem hiding this comment.
| description = "CLIMADA in Python" | |
| description = "Framework for climate risk assessment and adaptation option appraisal" |
pyproject.toml
Outdated
| @@ -1,3 +1,106 @@ | |||
| [build-system] | |||
| requires = ["setuptools >= 64"] | |||
| requires = ["setuptools>=61", "setuptools_scm"] | |||
There was a problem hiding this comment.
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? 🤷)
There was a problem hiding this comment.
👍 changes reverted
There was a problem hiding this comment.
turns out we actually need setuptools_scm for including package data
pyproject.toml
Outdated
| "pytest", | ||
| "pytest-cov", | ||
| "pytest-subtests", | ||
| "pre-commit" |
There was a problem hiding this comment.
"pre-commit" is neither part of test nor of doc
There was a problem hiding this comment.
I've renamed test to dev and added pre-commit
…efinition' into feature/pyproject-definition
Changes proposed in this PR:
This PR fixes #984 #1009
PR Author Checklist
develop)PR Reviewer Checklist