Skip to content

Commit

Permalink
Change to dynamic versioning (#124)
Browse files Browse the repository at this point in the history
* remove versioning code

* add setuptools_scm table
  • Loading branch information
kelle authored Nov 13, 2024
1 parent 375d68b commit c9ba023
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
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

0 comments on commit c9ba023

Please sign in to comment.