Skip to content

Commit

Permalink
Use setuptools_scm, update CHANGELOG (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkappel committed Jul 13, 2023
1 parent e5bdb7b commit b1dfbb0
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
**3.1.1 - 07/13/23**

- Changes version metadata to use setuptools_scm


**3.1.0 - 06/01/23**

- Update vivarium_gbd_access pin
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
# -- Project information -----------------------------------------------------

project = about["__title__"]
copyright = f'2022, {about["__author__"]}'
copyright = f'2023, {about["__author__"]}'
author = about["__author__"]

# The short X.Y version.
version = about["__version__"]
version = gbd_mapping.__version__
# The full version, including alpha/beta/rc tags.
release = about["__version__"]
release = gbd_mapping.__version__


# -- General configuration ------------------------------------------------
Expand Down
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from setuptools import find_packages, setup

if __name__ == "__main__":

base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "src")

Expand All @@ -22,6 +21,8 @@
"pyyaml",
]

setup_requires = ["setuptools_scm"]

data_requires = [
"vivarium-gbd-access>=3.0.7",
]
Expand All @@ -38,7 +39,6 @@

setup(
name=about["__title__"],
version=about["__version__"],
description=about["__summary__"],
long_description=long_description,
url=about["__uri__"],
Expand All @@ -60,4 +60,10 @@
build_mapping=gbd_mapping_generator.build_mapping:build_mapping
""",
zip_safe=False,
use_scm_version={
"write_to": "src/gbd_mapping/_version.py",
"write_to_template": '__version__ = "{version}"\n',
"tag_regex": r"^(?P<prefix>v)?(?P<version>[^\+]+)(?P<suffix>.*)?$",
},
setup_requires=setup_requires,
)
11 changes: 6 additions & 5 deletions src/gbd_mapping/__about__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
__all__ = [
"__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__",
"__title__",
"__summary__",
"__uri__",
"__author__",
"__email__",
]

__title__ = "gbd_mapping"
__summary__ = "A programmatically accessible mapping of gbd entities."
__uri__ = "https://github.com/ihmeuw/gbd_mapping"

__version__ = "3.1.0"

__author__ = "The vivarium developers"
__email__ = "vivarium.dev@gmail.com"

__license__ = "BSD-3-Clause"
__copyright__ = f"Copyright 2022 {__author__}"

__copyright__ = f"Copyright 2023 {__author__}"
19 changes: 15 additions & 4 deletions src/gbd_mapping/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
from .id import me_id, rei_id, c_id, s_id, cov_id, hs_id, scalar, UNKNOWN, UnknownEntityError
from .base_template import GbdRecord, ModelableEntity, Restrictions, Tmred, Categories
from ._version import __version__
from .base_template import Categories, GbdRecord, ModelableEntity, Restrictions, Tmred
from .cause import Cause, causes
from .sequela import Sequela, Healthstate, sequelae
from .covariate import Covariate, covariates
from .etiology import Etiology, etiologies
from .id import (
UNKNOWN,
UnknownEntityError,
c_id,
cov_id,
hs_id,
me_id,
rei_id,
s_id,
scalar,
)
from .risk_factor import RiskFactor, risk_factors
from .covariate import Covariate, covariates
from .sequela import Healthstate, Sequela, sequelae

0 comments on commit b1dfbb0

Please sign in to comment.