diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..cca662d --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.py export-subst diff --git a/README.md b/README.md index 8a262b2..33c9cdf 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,6 @@ quarto preview - Copyright © 2026 Athul, Bala, Prabuddha, Shreya. - Free software distributed under the [MIT License](./LICENSE). -## Atribution - -Gen AI tools were used to assist in the creation of this package, including code generation and documentation drafting. All generated content was reviewed and edited by the human authors to ensure accuracy and quality. +## Attribution +Gen AI tools (Google Gemini, OpenAI ChatGPT, and GitHub Copilot) were used to assist in the creation of this package, including code generation and documentation drafting. All generated content was reviewed and edited by the human authors to ensure accuracy and quality. diff --git a/pyproject.toml b/pyproject.toml index 9e8fa49..80354e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ [build-system] build-backend = "hatchling.build" -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] ################################################################################ # Project Configuration @@ -12,8 +12,7 @@ requires = ["hatchling"] [project] name = "geospatial_toolkit" -# You can chose to use dynamic versioning with hatch or static where you add it manually. -version = "0.1.0" +dynamic = ["version"] description = "Python package for geospatial functions." authors = [ @@ -101,6 +100,13 @@ all = [ [tool.hatch.build] only-packages = true +# Dynamic versioning from Git tags +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "src/geospatial_toolkit/_version.py" + # This tells Hatch to build the package from the src/ directory. # Read more about src layouts here: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html [tool.hatch.build.targets.wheel] diff --git a/src/geospatial_toolkit/__init__.py b/src/geospatial_toolkit/__init__.py index 0d54c99..0f80010 100644 --- a/src/geospatial_toolkit/__init__.py +++ b/src/geospatial_toolkit/__init__.py @@ -41,8 +41,14 @@ from geospatial_toolkit.latlong import standardize_latlong from geospatial_toolkit.point_to_city import point_to_city +try: + from geospatial_toolkit._version import __version__ +except ImportError: + __version__ = "unknown" + # This defines what is available when someone does 'from geospatial_toolkit import *' __all__ = [ + "__version__", "haversine_distance", "get_antipode", "standardize_latlong",