diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6f017ce..1b2a229 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -36,6 +36,8 @@ jobs: - name: Install pypa/build run: python3 -m pip install build --user + - name: Check git works + run: git status - name: Build a binary wheel and a source tarball run: python3 -m build - name: Store the distribution packages diff --git a/.gitignore b/.gitignore index 7e07498..15c1061 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,8 @@ __pycache__ .DSStore .devcontainer cache -build +build/* +dist/* # docs site/ diff --git a/pyproject.toml b/pyproject.toml index f78c104..4b30e99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ urls = {Code = "https://github.com/PatrickOHara/tspwplib", Documentation = "http description="Library of instances for TSP with Profits" readme = "README.md" requires-python = ">=3.10" -keywords = ["Distributionally Robust Optimisation"] +keywords = ["TSP"] license = {text = "MIT"} classifiers=[ "Programming Language :: Python", @@ -36,3 +36,7 @@ dynamic = ["version"] packages = ["tspwplib"] [tool.setuptools_scm] +version_file = "tspwplib/_version.py" + +[tool.black] +exclude = "_version.py" diff --git a/tspwplib/_version.py b/tspwplib/_version.py new file mode 100644 index 0000000..4fd36d9 --- /dev/null +++ b/tspwplib/_version.py @@ -0,0 +1,17 @@ +# file generated by setuptools_scm +# don't change, don't track in version control +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple, Union + + VERSION_TUPLE = Tuple[Union[int, str], ...] +else: + VERSION_TUPLE = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE + +__version__ = version = "0.7.9.dev0+g3af79a1.d20240328" +__version_tuple__ = version_tuple = (0, 7, 9, "dev0", "g3af79a1.d20240328") diff --git a/tspwplib/exception.py b/tspwplib/exception.py index 597c172..2f0389b 100644 --- a/tspwplib/exception.py +++ b/tspwplib/exception.py @@ -24,7 +24,7 @@ class NotSimplePathException(NotSimpleException): class UnexpectedSelfLoopException(ex.NetworkXException): - """A self loop was found where it wasn't exprected""" + """A self loop was found where it wasn't expected""" class GraphStructureException(ex.NetworkXException):