Skip to content

Commit

Permalink
Merge pull request #347 from Anaphory/set-version
Browse files Browse the repository at this point in the history
Set – and test – package version in __init__.__version__
  • Loading branch information
Anaphory committed Apr 14, 2022
2 parents 36b5d8e + 280cfd4 commit 8e9d820
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
}
],
"upload_type": "software",
"version": "1.0.0",
"publication_date": "2021-09-30",
"version": "1.0.1",
"publication_date": "2022-04-14",
"creators": [
{
"orcid": "0000-0002-8155-9089",
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ authors:
orcid: "https://orcid.org/0000-0002-5693-975X"
title: "Lexedata"
subtitle: "Lexical Data Editing tools"
version: 1.0.0
version: 1.0.1
license: GPL-3.0+
doi: 10.5281/zenodo.5541167
date-released: 2021-09-30
date-released: 2022-04-14
url: "https://github.com/Anaphory/lexedata"
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

from lexedata import __version__ as release

# -- Project information -----------------------------------------------------

Expand All @@ -22,8 +23,9 @@
author = "Melvin Steiger, Gereon A. Kaiping"

# The full version, including alpha/beta/rc tags
release = "1.0.0"

if release.startswith("v"):
release = release[1:]

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = lexedata
version = 1.0.0
version = attr: lexedata.__version__
author = Melvin Steiger, Gereon A. Kaiping
author_email = gereon.kaiping@geo.uzh.ch
description = Tools to edit lexical data in CLDF, and transform it to and from other well-known formats.
Expand Down
2 changes: 2 additions & 0 deletions src/lexedata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
from . import util

__all__ = ["util"]

__version__ = "1.0.1"
19 changes: 11 additions & 8 deletions test/check_all_versions_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
"""

import sys
import json
import configparser
import sys
from pathlib import Path
import importlib.metadata

import lexedata

if __name__ == "__main__":
root = Path(__file__).absolute().parent.parent

py = root / "setup.cfg"
config = configparser.ConfigParser()
config.read(py)
py_version = config["metadata"]["version"]
print(py, py_version)
package_version = importlib.metadata.version("lexedata")
print(root / "setup.cfg", package_version)

py_version = lexedata.__version__
print(lexedata.__file__, py_version)

zenodo = root / ".zenodo.json"
zenodo_version = json.load(zenodo.open())["version"]
Expand All @@ -41,7 +43,8 @@
print(docs / "conf.py", release)

if not (
py_version.strip()
package_version.strip()
== py_version.strip()
== zenodo_version.strip()
== cff_version.strip()
== release.strip()
Expand Down

0 comments on commit 8e9d820

Please sign in to comment.