Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Derive pkg version from git using setuptool_scm #92

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ __pycache__/
.python-version
venv
*.pytest_cache
# NOTE: ignore _version.py files versioning handled by setuptools_scm
_version.py

# pyenv #
#########
Expand Down
70 changes: 66 additions & 4 deletions python/ngen_cal/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8", "wheel"]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"wheel",
]

[tool.setuptools_scm]
version_file = "src/ngen/cal/_version.py"
tag_regex = '^(?:ngen\.cal\/)(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$'
git_describe_command = [
'git',
'describe',
'--dirty',
'--tags',
'--long',
'--match',
'ngen.cal/*',
]
root = '../../'

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

[tool.setuptools.packages.find]
where = ["src"]

[project]
name = "ngen.cal"
authors = [{ name = "Nels J. Frazier", email = "[email protected]" }]
maintainers = [{ name = "Austin Raney", email = "[email protected]" }]
description = "Suite of tools for calibration NGEN models."
dynamic = ["version"]
license = { file = "LICENSE" }
readme = { file = "README.md", content-type = "text/markdown" }

requires-python = ">=3.7"
dependencies = [
"pydantic<2",
"pandas>=1.1.2",
"geopandas",
"matplotlib",
"hydrotools.metrics",
"hydrotools.nwis_client",
"pyarrow",
"tables",
"hypy @ git+https://github.com/noaa-owp/hypy@master#egg=hypy&subdirectory=python",
"ngen_config @ git+https://github.com/noaa-owp/ngen-cal@master#egg=ngen_config&subdirectory=python/ngen_conf",
"pyyaml",
]

classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: Free To Use But Restricted",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Hydrology",
"Operating System :: OS Independent",
]


[project.urls]
Homepage = "https://github.com/NOAA-OWP/ngen-cal/tree/master/python/ngen_cal"
Issues = "https://github.com/NOAA-OWP/ngen-cal/issues"
Repository = "https://github.com/NOAA-OWP/ngen-cal/tree/master/python/ngen_cal"

[project.optional-dependencies]
develop = ["pytest", "pytest-mock"]
52 changes: 0 additions & 52 deletions python/ngen_cal/setup.cfg

This file was deleted.

1 change: 0 additions & 1 deletion python/ngen_cal/src/ngen/cal/_version.py

This file was deleted.

64 changes: 60 additions & 4 deletions python/ngen_conf/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8", "wheel"]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"wheel",
]

[tool.setuptools_scm]
version_file = "src/ngen/config/_version.py"
tag_regex = '^(?:ngen\.config\/)(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$'
git_describe_command = [
'git',
'describe',
'--dirty',
'--tags',
'--long',
'--match',
'ngen.config/*',
]
root = '../../'

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

[tool.setuptools.packages.find]
where = ["src"]

[project]
name = "ngen.config"
authors = [
{ name = "Nels J. Frazier", email = "[email protected]" },
{ name = "Austin Raney", email = "[email protected]" },
]
description = "ngen configuration file generation and validation library"
dynamic = ["version"]
license = { file = "LICENSE" }
readme = { file = "README.md", content-type = "text/markdown" }

requires-python = ">=3.7"
dependencies = [
"pydantic<2",
"geojson_pydantic",
"typing_extensions",
"ngen_init_config[all] @ git+https://github.com/noaa-owp/ngen-cal@master#egg=ngen_init_config&subdirectory=python/ngen_init_config",
]

classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: Free To Use But Restricted",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Hydrology",
"Operating System :: OS Independent",
]

[project.urls]
Homepage = "https://github.com/NOAA-OWP/ngen-cal/tree/master/python/ngen_conf"
Issues = "https://github.com/NOAA-OWP/ngen-cal/issues"
Repository = "https://github.com/NOAA-OWP/ngen-cal/tree/master/python/ngen_conf"

[project.optional-dependencies]
develop = ["pytest"]
44 changes: 0 additions & 44 deletions python/ngen_conf/setup.cfg

This file was deleted.

1 change: 0 additions & 1 deletion python/ngen_conf/src/ngen/config/_version.py

This file was deleted.

65 changes: 61 additions & 4 deletions python/ngen_config_gen/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,63 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8", "wheel"]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"wheel",
]

[tool.setuptools_scm]
version_file = "src/ngen/config_gen/_version.py"
tag_regex = '^(?:ngen\.config_gen\/)(?P<version>[vV]?\d+(?:\.\d+){0,2}[^\+]*)(?:\+.*)?$'
git_describe_command = [
'git',
'describe',
'--dirty',
'--tags',
'--long',
'--match',
'ngen.config_gen/*',
]
root = '../../'

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

[tool.setuptools.packages.find]
where = ["src"]

[project]
name = "ngen.config_gen"
authors = [{ name = "Austin Raney", email = "[email protected]" }]
description = "Library and framework for genrating NextGen BMI model configuration files"
dynamic = ["version"]
license = { file = "LICENSE" }
readme = { file = "README.md", content-type = "text/markdown" }

requires-python = ">=3.8"
dependencies = [
"geopandas",
"pandas",
"pyarrow",
"pydantic<2",
"typing_extensions",
"ngen_config[all] @ git+https://github.com/noaa-owp/ngen-cal@master#egg=ngen_config&subdirectory=python/ngen_conf",
"ngen_init_config[all] @ git+https://github.com/noaa-owp/ngen-cal@master#egg=ngen_init_config&subdirectory=python/ngen_init_config",
]

classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: Free To Use But Restricted",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Hydrology",
"Operating System :: OS Independent",
]

[project.urls]
Homepage = "https://github.com/NOAA-OWP/ngen-cal/tree/master/python/ngen_config_gen"
Issues = "https://github.com/NOAA-OWP/ngen-cal/issues"
Repository = "https://github.com/NOAA-OWP/ngen-cal/tree/master/python/ngen_config_gen"

[project.optional-dependencies]
develop = ["pytest"]
48 changes: 0 additions & 48 deletions python/ngen_config_gen/setup.cfg

This file was deleted.

1 change: 0 additions & 1 deletion python/ngen_config_gen/src/ngen/config_gen/_version.py

This file was deleted.

Loading
Loading