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

Change to dynamic versioning #124

Merged
merged 3 commits into from
Nov 13, 2024
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: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ dependencies = [
dynamic = ["version"]
readme = "README.md"

[tool.setuptools_scm]

[project.optional-dependencies]
test = [
"pytest",
Expand Down
28 changes: 4 additions & 24 deletions sedkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,8 @@
# !python3
"""
Initialize modules

Author: Joe Filippazzo, [email protected]
"""
import re

from .catalog import Catalog
from .sed import SED, VegaSED
from .spectrum import Spectrum, FileSpectrum, Vega, Blackbody
from .modelgrid import ModelGrid, BTSettl, SpexPrismLibrary

__version_commit__ = ''
_regex_git_hash = re.compile(r'.*\+g(\w+)')

__version__ = '1.2.5'

# from pkg_resources import get_distribution, DistributionNotFound
# try:
# __version__ = get_distribution(__name__).version
# except DistributionNotFound:
# __version__ = 'dev'

if '+' in __version__:
commit = _regex_git_hash.match(__version__).groups()
if commit:
__version_commit__ = commit[0]
from sedkit.catalog import Catalog
from sedkit.sed import SED, VegaSED
from sedkit.spectrum import Spectrum, FileSpectrum, Vega, Blackbody
from sedkit.modelgrid import ModelGrid, BTSettl, SpexPrismLibrary