Skip to content

Commit

Permalink
add version.py as the single-source version history (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
yunjunz authored Jul 20, 2022
1 parent 11c01c4 commit 55683dd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = s1reader
version = 0.1.0
version = attr: s1reader.__version__
description = A Sentinel1 metadata reader
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down
3 changes: 3 additions & 0 deletions src/s1reader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# version info
from .version import release_version as __version__

# top-level functions to be easily used
from .s1_burst_slc import Sentinel1BurstSlc
from .s1_reader import load_bursts
Expand Down
17 changes: 17 additions & 0 deletions src/s1reader/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# release history

import collections


# release history
Tag = collections.namedtuple('Tag', 'version date')
release_history = (
Tag('0.1.0', '2022-06-07'),
)

# latest release version number and date
release_version = release_history[0].version
release_date = release_history[0].date

# variable
__version__ = release_version

0 comments on commit 55683dd

Please sign in to comment.