diff --git a/.gitignore b/.gitignore index d3ea654..345d7dc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,8 @@ coverage.xml # Ignore Scratch files scratch/* -!/scratch/README.md \ No newline at end of file +!/scratch/README.md + +# Ignore virtualenv +.venv +venv \ No newline at end of file diff --git a/akauntingpy/api.py b/akauntingpy/api.py index 78922f4..9d4d27f 100644 --- a/akauntingpy/api.py +++ b/akauntingpy/api.py @@ -1,9 +1,13 @@ +from importlib.metadata import version, PackageNotFoundError import requests import json from requests.auth import HTTPBasicAuth -from akauntingpy import exceptions, __version__ from akauntingpy.helpers import * +from akauntingpy import exceptions +from setuptools_scm import get_version + +__version__ = get_version(root='..', relative_to=__file__) class Client(object): """ diff --git a/requirements.txt b/requirements.txt index 8f91654..bbeeaff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -requests >= 2.21.0 -pytest \ No newline at end of file +requests >= 2.27.0 +pytest >= 7.1.2 +pytest-cov >= 3.0.0