diff --git a/CHANGES.txt b/CHANGES.txt index cf8ad21..8e5d9b3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,6 +3,15 @@ Changes Dev --- +- nrt.data now lives in its own namespace package (nrt-data). Subpackage removed, + and namespace enabling in multiple __init__.py files +- A few edits (e.g. pkg-data and MANIFEST.in) as a consequence of removing + nrt.data subpackage +- Transitioned from setup.py to pyproject.toml +- Package version now maintained in pyproject.toml +- Adapted integration fixture to new test data access method (+ band names slightly changed + B4 is now B04, etc) +- Version number now managed via git tags using setuptools-scm 0.2.1 (2024-07-15) diff --git a/docs/conf.py b/docs/conf.py index b8950a6..379efea 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,6 +13,8 @@ import os import sys import warnings +from importlib.metadata import version as version_ + from numba import NumbaWarning import nrt @@ -25,7 +27,7 @@ author = 'Loic Dutrieux, Jonas Viehweger' # The full version, including alpha/beta/rc tags -release = nrt.__version__ +release = version_('nrt') # -- General configuration --------------------------------------------------- diff --git a/nrt/__init__.py b/nrt/__init__.py index 69e3be5..c35a2c7 100644 --- a/nrt/__init__.py +++ b/nrt/__init__.py @@ -1 +1,10 @@ __path__ = __import__('pkgutil').extend_path(__path__, __name__) + +from importlib.metadata import version + +try: + __version__ = version("nrt") +except Exception: + # Local copy or not installed with setuptools. + # Disable minimum version checks on downstream libraries. + __version__ = "9999" diff --git a/pyproject.toml b/pyproject.toml index 93e57e2..5621c54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,11 @@ [build-system] -requires = ["setuptools>=40.8.0", "wheel"] +requires = ["setuptools>=64", + "wheel", + "setuptools-scm>=8"] build-backend = "setuptools.build_meta" [project] name = "nrt" -version = "0.3.0" description = "Online monitoring with xarray" readme = "README.rst" keywords = ["sentinel2", "xarray", "datacube", "monitoring", "change"] @@ -13,13 +14,15 @@ authors = [ { name = "Jonas Viehweger" }, { name = "Chris Holden" } ] -license = {file = "LICENSE"} +dynamic = ["version"] +license = {text = "EUPL-1.2"} classifiers = [ "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12" + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)" ] requires-python = ">=3.9" dependencies = [ @@ -50,3 +53,5 @@ docs = [ [tool.setuptools.packages.find] where = ["."] +[tool.setuptools_scm] +fallback_version = "9999"