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

add version.py as the single-source version history #54

Merged
merged 1 commit into from
Jul 20, 2022
Merged
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: 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