diff --git a/.envrc b/.envrc index 6482d05..17c458a 100644 --- a/.envrc +++ b/.envrc @@ -9,7 +9,6 @@ GNUPGHOME="$(pwd)/.gnupg" HATCH_CACHE_DIR="$(pwd)/.hatch/cache" HATCH_DATA_DIR="$(pwd)/.hatch/data" HATCH_ENV="local" -HATCH_PROJECT="panegyric" HATCH_VERBOSE=2 PIPENV_VENV_IN_PROJECT=1 @@ -17,6 +16,5 @@ export GNUPGHOME export HATCH_CACHE_DIR export HATCH_DATA_DIR export HATCH_ENV -export HATCH_PROJECT export HATCH_VERBOSE export PIPENV_VENV_IN_PROJECT diff --git a/.gitignore b/.gitignore index dfbb6eb..65288ce 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ build/ _build/ .gnupg/ .vscode/ +.hatch/ diff --git a/src/compliments/texts-to-jess.pdf b/panegyric/compliments/texts-to-jess.pdf similarity index 100% rename from src/compliments/texts-to-jess.pdf rename to panegyric/compliments/texts-to-jess.pdf diff --git a/src/compliments/work-card.yaml b/panegyric/compliments/work-card.yaml similarity index 100% rename from src/compliments/work-card.yaml rename to panegyric/compliments/work-card.yaml diff --git a/license.md b/panegyric/license.md similarity index 100% rename from license.md rename to panegyric/license.md diff --git a/panegyric/pyproject.toml b/panegyric/pyproject.toml new file mode 100644 index 0000000..ea2cf27 --- /dev/null +++ b/panegyric/pyproject.toml @@ -0,0 +1,61 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "panegyric" +dynamic = ["version"] +description = '' +readme = "README.md" +requires-python = ">=3.8" +license = "MIT" +keywords = [] +authors = [ + { name = "Xander Harris", email = "xandertheharris@gmail.com" }, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", +] +dependencies = [] + +[project.urls] +Documentation = "https://github.com/edwardtheharris/panegyric#readme" +Issues = "https://github.com//panegyric/issues" +Source = "https://github.com/Xander Harris/panegyric" + +[tool.hatch.version] +path = "src/panegyric/__about__.py" + +[tool.hatch.envs.types] +extra-dependencies = [ + "mypy>=1.0.0", +] +[tool.hatch.envs.types.scripts] +check = "mypy --install-types --non-interactive {args:src/panegyric tests}" + +[tool.coverage.run] +source_pkgs = ["panegyric", "tests"] +branch = true +parallel = true +omit = [ + "src/panegyric/__about__.py", +] + +[tool.coverage.paths] +panegyric = ["src/panegyric", "*/panegyric/src/panegyric"] +tests = ["tests", "*/panegyric/tests"] + +[tool.coverage.report] +exclude_lines = [ + "no cov", + "if __name__ == .__main__.:", + "if TYPE_CHECKING:", +] diff --git a/README.md b/panegyric/readme.md similarity index 100% rename from README.md rename to panegyric/readme.md diff --git a/panegyric/src/panegyric/__about__.py b/panegyric/src/panegyric/__about__.py new file mode 100644 index 0000000..196eb4c --- /dev/null +++ b/panegyric/src/panegyric/__about__.py @@ -0,0 +1,17 @@ +"""Metadata related to the panegyric project.""" +# SPDX-FileCopyrightText: 2024-present Xander Harris +# +# SPDX-License-Identifier: MIT +from pathlib import Path + +import version_query + +def get_version(): + """Return the most recent version of the project.""" + try: + ret_value = version_query.query_folder(Path('.')) + except ValueError: + ret_value = version_query.Version.from_str('0.0.1') + return ret_value + +__version__ = get_version() diff --git a/src/panegyric/__init__.py b/panegyric/src/panegyric/__init__.py similarity index 100% rename from src/panegyric/__init__.py rename to panegyric/src/panegyric/__init__.py diff --git a/src/panegyric/text.py b/panegyric/src/panegyric/text.py similarity index 100% rename from src/panegyric/text.py rename to panegyric/src/panegyric/text.py diff --git a/tests/__init__.py b/panegyric/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to panegyric/tests/__init__.py diff --git a/tests/compliments.yml b/panegyric/tests/compliments.yml similarity index 100% rename from tests/compliments.yml rename to panegyric/tests/compliments.yml diff --git a/tests/conftest.py b/panegyric/tests/conftest.py similarity index 100% rename from tests/conftest.py rename to panegyric/tests/conftest.py diff --git a/tests/fixtures/compliments-duplicate-date.yml b/panegyric/tests/fixtures/compliments-duplicate-date.yml similarity index 100% rename from tests/fixtures/compliments-duplicate-date.yml rename to panegyric/tests/fixtures/compliments-duplicate-date.yml diff --git a/tests/fixtures/compliments-no-date.yml b/panegyric/tests/fixtures/compliments-no-date.yml similarity index 100% rename from tests/fixtures/compliments-no-date.yml rename to panegyric/tests/fixtures/compliments-no-date.yml diff --git a/tests/fixtures/compliments-with-date.yml b/panegyric/tests/fixtures/compliments-with-date.yml similarity index 100% rename from tests/fixtures/compliments-with-date.yml rename to panegyric/tests/fixtures/compliments-with-date.yml diff --git a/tests/fixtures/resp.json b/panegyric/tests/fixtures/resp.json similarity index 100% rename from tests/fixtures/resp.json rename to panegyric/tests/fixtures/resp.json diff --git a/tests/fixtures/resp.obj b/panegyric/tests/fixtures/resp.obj similarity index 100% rename from tests/fixtures/resp.obj rename to panegyric/tests/fixtures/resp.obj diff --git a/tests/result/compliments.yml b/panegyric/tests/result/compliments.yml similarity index 100% rename from tests/result/compliments.yml rename to panegyric/tests/result/compliments.yml diff --git a/tests/test_text.py b/panegyric/tests/test_text.py similarity index 100% rename from tests/test_text.py rename to panegyric/tests/test_text.py diff --git a/src/panegyric/__about__.py b/src/panegyric/__about__.py deleted file mode 100644 index 0b55e6b..0000000 --- a/src/panegyric/__about__.py +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-FileCopyrightText: 2024-present Xander Harris -# -# SPDX-License-Identifier: MIT -__version__ = "0.0.1"