From e9698a5b6bcf811963ffe47ffb687e957ca3f98e Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Wed, 4 Nov 2026 23:52:35 -0600 Subject: [PATCH 1/4] Rename distribution and Python namespace to neutral database names --- .github/workflows/release.yml | 10 +++---- MANIFEST.in | 2 +- README.md | 25 +++++++++++------- pyproject.toml | 6 ++--- .../__init__.py | 4 +-- .../data/__init__.py | 0 .../data/brouwer_srg_database.json | 0 .../data/graphs.db | Bin .../data/isgci_sage.xml | 0 .../data/smallgraphs.txt | 0 tests/test_resources.py | 2 +- 11 files changed, 28 insertions(+), 21 deletions(-) rename src/{sage_data_graphs => graph_databases}/__init__.py (98%) rename src/{sage_data_graphs => graph_databases}/data/__init__.py (100%) rename src/{sage_data_graphs => graph_databases}/data/brouwer_srg_database.json (100%) rename src/{sage_data_graphs => graph_databases}/data/graphs.db (100%) rename src/{sage_data_graphs => graph_databases}/data/isgci_sage.xml (100%) rename src/{sage_data_graphs => graph_databases}/data/smallgraphs.txt (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43d0156..5c94864 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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..fa4d5a8 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. @@ -14,17 +14,17 @@ The distribution contains: ## Installation ```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 +38,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 +47,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 +62,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 +77,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..38bfcbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,8 @@ 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" @@ -41,7 +41,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, From 1fe112cb345ac38d45daf3468f2cb8f4814f09fa Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 5 Nov 2026 00:08:34 -0600 Subject: [PATCH 2/4] Test Python 3.9 on Ubuntu 24.04 --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69b58ce..98db017 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,11 +9,12 @@ permissions: jobs: test: - runs-on: ubuntu-latest + # Python 3.9 binaries are unavailable for Ubuntu 26.04. + runs-on: ${{ matrix.python-version == '3.9' && 'ubuntu-24.04' || 'ubuntu-latest' }} strategy: fail-fast: false matrix: - python-version: ["3.9", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 From 8b1880017d53320e2ddcce29d29fa0a7c9eff653 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 5 Nov 2026 00:10:29 -0600 Subject: [PATCH 3/4] Run CI on Python 3.13 and 3.14 --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98db017..d9b095f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,11 @@ permissions: jobs: test: - # Python 3.9 binaries are unavailable for Ubuntu 26.04. - runs-on: ${{ matrix.python-version == '3.9' && 'ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.13", "3.14"] steps: - uses: actions/checkout@v7 - uses: actions/setup-python@v7 From ca8e8cdd551321a88f99f0155e05001520600e69 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 5 Nov 2026 00:19:14 -0600 Subject: [PATCH 4/4] Require Python 3.13 and use modern Python for CI and releases --- .github/workflows/release.yml | 2 +- README.md | 2 ++ pyproject.toml | 7 ++----- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c94864..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' diff --git a/README.md b/README.md index fa4d5a8..70520a0 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ The distribution contains: ## Installation +Requires Python 3.13 or newer. + ```console python -m pip install graph-databases ``` diff --git a/pyproject.toml b/pyproject.toml index 38bfcbd..b5d1556 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ 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", ]