Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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,
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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

27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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()
Expand All @@ -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]
Expand All @@ -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()
```
Expand All @@ -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.
Expand All @@ -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.
13 changes: 5 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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",
]

Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"resource_path",
]

__version__ = "20210214.1"
__version__ = "20210214.2"

DATA_FILES = (
"brouwer_srg_database.json",
Expand All @@ -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",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import pytest

from sage_data_graphs import (
from graph_databases import (
DATA_FILES,
graph_database_connection,
load_brouwer_database,
Expand Down
Loading