Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit da9eea3

Browse files
authored
Merge pull request #3 from DerwenAI/update
versioning
2 parents 95d7fb0 + 5c09362 commit da9eea3

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

goedwig/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77

88
from .cypher import CypherItem
99
from .query import Query
10+
from .version import __version__

goedwig/version.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
4+
"""
5+
Git tag sets a version string.
6+
"""
7+
8+
from os.path import dirname
9+
import pathlib
10+
11+
from git import Repo # type: ignore # pylint: disable=E0401
12+
13+
repo_path = pathlib.Path(dirname(__file__))
14+
repo = Repo(repo_path.parents[0].parents[0])
15+
__version__ = str(repo.tags[0])

sample.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313

1414
if __name__ == "__main__":
15+
#print(goedwig.__version__)
16+
1517
ast_path = pathlib.Path("dat/cyp") / "q1.tsv"
1618

1719
q = goedwig.Query()

0 commit comments

Comments
 (0)