Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Add dynamic versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
dalito committed Jun 30, 2023
1 parent aaa0c61 commit 46bc669
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.htmlcov/
.tox/
.nox/
.coverage
Expand All @@ -50,7 +50,6 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
[build-system]
#requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
#build-backend = "poetry_dynamic_versioning.backend"
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "vocexcel"
version = "0.4.0"
version = "0.0.0"
description = """Another Excel to RDF converter for SKOS vocabs, \
but one that includes profile-based validation of results."""
repository = "https://github.com/nfdi4cat/voc4cat-tool/"
Expand All @@ -24,7 +26,7 @@ classifiers = [
"Programming Language :: Python",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD-3-Clause",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.8",
Expand Down Expand Up @@ -54,6 +56,12 @@ isort = "^5.12.0"
[tool.poetry.scripts]
vocexcel = "vocexcel.convert:main"

# https://github.com/mtkennerly/poetry-dynamic-versioning
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "pep440"

[tool.isort]
profile = "black"
src_paths = ["src", "tests"]
Expand Down
4 changes: 3 additions & 1 deletion vocexcel/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "0.4.0"
from importlib import metadata

__version__ = metadata.version("vocexcel")
4 changes: 2 additions & 2 deletions vocexcel/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from colorama import Fore, Style
from pydantic.error_wrappers import ValidationError
from pyshacl.pytypes import GraphLike
from vocexcel import __version__

try:
import models
Expand Down Expand Up @@ -630,8 +631,7 @@ def main(args=None):

print(s.rstrip())
elif args.version:
# not sure what to do here, just removing the errors
print(TEMPLATE_VERSION)
print(__version__)
elif args.file_to_convert:
if not args.file_to_convert.name.endswith(tuple(KNOWN_FILE_ENDINGS)):
print(
Expand Down

0 comments on commit 46bc669

Please sign in to comment.