Skip to content

Commit

Permalink
package version now extracted from git tags; implies a few changes to
Browse files Browse the repository at this point in the history
__init__ and docs conf
  • Loading branch information
loicdtx committed Aug 29, 2024
1 parent bc5632d commit a7d8137
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import os
import sys
import warnings
from importlib.metadata import version as version_

from numba import NumbaWarning
import nrt

Expand All @@ -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 ---------------------------------------------------
Expand Down
9 changes: 9 additions & 0 deletions nrt/__init__.py
Original file line number Diff line number Diff line change
@@ -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"
13 changes: 9 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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 = [
Expand Down Expand Up @@ -50,3 +53,5 @@ docs = [
[tool.setuptools.packages.find]
where = ["."]

[tool.setuptools_scm]
fallback_version = "9999"

0 comments on commit a7d8137

Please sign in to comment.