diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69b58ce..d9b095f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.12", "3.13"] + python-version: ["3.13", "3.14"] steps: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43d0156..c6c3d94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 with: - python-version: "3.12" + python-version: "3.14" - name: Check release tag run: | python - <<'PY' @@ -34,10 +34,10 @@ jobs: run: python -m twine check dist/* - name: Smoke-test the wheel in a clean environment run: | - python -m venv /tmp/sagemath-data-graphs-smoke - /tmp/sagemath-data-graphs-smoke/bin/python -m pip install --no-deps dist/*.whl - /tmp/sagemath-data-graphs-smoke/bin/python - <<'PY' - from sage_data_graphs import ( + python -m venv /tmp/graph-databases-smoke + /tmp/graph-databases-smoke/bin/python -m pip install --no-deps dist/*.whl + /tmp/graph-databases-smoke/bin/python - <<'PY' + from graph_databases import ( DATA_FILES, graph_database_connection, load_brouwer_database, @@ -79,7 +79,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/sagemath-data-graphs + url: https://pypi.org/p/graph-databases permissions: id-token: write steps: diff --git a/MANIFEST.in b/MANIFEST.in index c00f00b..75b084e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ include DATA_LICENSES.md include LICENSE include README.md -recursive-include src/sage_data_graphs/data *.db *.json *.txt *.xml +recursive-include src/graph_databases/data *.db *.json *.txt *.xml recursive-include tests *.py diff --git a/README.md b/README.md index b6184c6..70520a0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# sagemath-data-graphs +# graph-databases -`sagemath-data-graphs` packages the graph database resources historically shipped +`graph-databases` packages the graph database resources historically shipped as SageMath's `graphs` data package. It has no dependency on Sage and performs no network access or writes at import or run time. @@ -13,18 +13,20 @@ The distribution contains: ## Installation +Requires Python 3.13 or newer. + ```console -python -m pip install sagemath-data-graphs +python -m pip install graph-databases ``` -The Python import name is `sage_data_graphs`. +The Python import name is `graph_databases`. ## API Use the resource API when consuming the raw files: ```python -from sage_data_graphs import open_resource, resource, resource_path +from graph_databases import open_resource, resource, resource_path with open_resource("smallgraphs.txt", "r") as stream: first_line = stream.readline() @@ -38,7 +40,7 @@ The SQLite helper always opens the bundled database read-only and closes the connection after the context exits: ```python -from sage_data_graphs import graph_database_connection +from graph_databases import graph_database_connection with graph_database_connection() as connection: rows = connection.execute("SELECT count(*) FROM graph_data").fetchone()[0] @@ -47,7 +49,7 @@ with graph_database_connection() as connection: The Brouwer JSON data can be decoded with one call: ```python -from sage_data_graphs import load_brouwer_database +from graph_databases import load_brouwer_database records = load_brouwer_database() ``` @@ -62,7 +64,7 @@ Publishing a GitHub Release runs the repository's `Release` GitHub Actions workflow. The workflow builds and checks the wheel and source distribution, smoke-tests the wheel in a clean environment, attaches both files to the GitHub Release, and publishes them to PyPI through Trusted Publishing. The -Release tag must be `20210214.1` or `v20210214.1`. Configure a PyPI Trusted +Release tag must be `20210214.2` or `v20210214.2`. Configure a PyPI Trusted Publisher for this repository, the `release.yml` workflow, and the `pypi` environment before publishing the first release. Do not publish a release until the data-license blocker below has been resolved. @@ -77,5 +79,12 @@ the data owners before a public PyPI release. See [DATA_LICENSES.md](https://gi for the provenance currently recorded by Sage. For the new PyPI project, configure a pending Trusted Publisher with project -`sagemath-data-graphs`, GitHub owner `sagemath`, repository +`graph-databases`, GitHub owner `sagemath`, repository `data-graphs`, workflow filename `release.yml`, and environment `pypi`. + +## Migration from the previous package + +This distribution replaces `sagemath-data-graphs`. Install `graph-databases` and change +imports from `sage_data_graphs` to `graph_databases`. The resource helpers and +bundled database contents are unchanged. The two distributions use separate +import namespaces and can coexist while consumers migrate. diff --git a/pyproject.toml b/pyproject.toml index d683391..b5d1556 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,11 +3,11 @@ requires = ["setuptools>=77"] build-backend = "setuptools.build_meta" [project] -name = "sagemath-data-graphs" -version = "20210214.1" +name = "graph-databases" +version = "20210214.2" description = "Graph database resources for SageMath and other Python applications" readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.13" license = "GPL-2.0-or-later" license-files = ["LICENSE", "DATA_LICENSES.md"] authors = [ @@ -20,11 +20,8 @@ classifiers = [ "Intended Audience :: Science/Research", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: Mathematics", ] @@ -41,7 +38,7 @@ include-package-data = true where = ["src"] [tool.setuptools.package-data] -"sage_data_graphs.data" = ["*.db", "*.json", "*.xml", "*.txt"] +"graph_databases.data" = ["*.db", "*.json", "*.xml", "*.txt"] [tool.pytest.ini_options] addopts = "-ra" diff --git a/src/sage_data_graphs/__init__.py b/src/graph_databases/__init__.py similarity index 98% rename from src/sage_data_graphs/__init__.py rename to src/graph_databases/__init__.py index bbf7df5..60a9691 100644 --- a/src/sage_data_graphs/__init__.py +++ b/src/graph_databases/__init__.py @@ -20,7 +20,7 @@ "resource_path", ] -__version__ = "20210214.1" +__version__ = "20210214.2" DATA_FILES = ( "brouwer_srg_database.json", @@ -29,7 +29,7 @@ "smallgraphs.txt", ) -_DATA_PACKAGE = "sage_data_graphs.data" +_DATA_PACKAGE = "graph_databases.data" _TEXT_ENCODINGS = { "brouwer_srg_database.json": "utf-8", "isgci_sage.xml": "iso-8859-1", diff --git a/src/sage_data_graphs/data/__init__.py b/src/graph_databases/data/__init__.py similarity index 100% rename from src/sage_data_graphs/data/__init__.py rename to src/graph_databases/data/__init__.py diff --git a/src/sage_data_graphs/data/brouwer_srg_database.json b/src/graph_databases/data/brouwer_srg_database.json similarity index 100% rename from src/sage_data_graphs/data/brouwer_srg_database.json rename to src/graph_databases/data/brouwer_srg_database.json diff --git a/src/sage_data_graphs/data/graphs.db b/src/graph_databases/data/graphs.db similarity index 100% rename from src/sage_data_graphs/data/graphs.db rename to src/graph_databases/data/graphs.db diff --git a/src/sage_data_graphs/data/isgci_sage.xml b/src/graph_databases/data/isgci_sage.xml similarity index 100% rename from src/sage_data_graphs/data/isgci_sage.xml rename to src/graph_databases/data/isgci_sage.xml diff --git a/src/sage_data_graphs/data/smallgraphs.txt b/src/graph_databases/data/smallgraphs.txt similarity index 100% rename from src/sage_data_graphs/data/smallgraphs.txt rename to src/graph_databases/data/smallgraphs.txt diff --git a/tests/test_resources.py b/tests/test_resources.py index 260bf16..1b3ce6f 100644 --- a/tests/test_resources.py +++ b/tests/test_resources.py @@ -6,7 +6,7 @@ import pytest -from sage_data_graphs import ( +from graph_databases import ( DATA_FILES, graph_database_connection, load_brouwer_database,