Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
694e159
Add AGENTS.md entrypoint and project skills
gsvgit Sep 1, 2026
e2745da
Add workflow skills and register them in AGENTS.md
gsvgit Sep 1, 2026
ed58f5b
Add source-area TOC and section headings to graphs index
gsvgit Sep 1, 2026
31ca561
Make workflow-management load-first at session start
gsvgit Sep 1, 2026
34e45fe
docs(001-S1): Record task log and global plan with existing-tooling a…
gsvgit Sep 2, 2026
31b308a
docs(001-S1): Mark task 1 done in task log
gsvgit Sep 2, 2026
9c319ed
feat(002-S2): Add Yandex S3 upload tool with CLI-provided credentials
gsvgit Sep 2, 2026
12c0c52
docs(002-S2): Mark task 2 done in task log
gsvgit Sep 2, 2026
a40a547
feat(003-S3): Add Google Drive to Yandex S3 migration tool
gsvgit Sep 2, 2026
8871f2b
docs(003-S3): Mark task 3 done in task log
gsvgit Sep 2, 2026
d309b17
fix(004-S1): Point the default S3 endpoint at the verified working URL
gsvgit Sep 2, 2026
9332c65
docs(004-S1): Mark task 4 done in task log and record task 5
gsvgit Sep 2, 2026
5a8a44a
fix(005-S1): Make migration re-runs handle hash-less mapping entries
gsvgit Sep 2, 2026
200cb43
docs(005-S1): Mark task 5 done in task log
gsvgit Sep 2, 2026
5ffad6a
feat(006-S1): Store colliding-name graphs under suffixed keys
gsvgit Sep 2, 2026
6997415
docs(006-S1): Mark task 6 done in task log
gsvgit Sep 2, 2026
7880811
fix(007-S1): Upload migrated archives under the 4.0.0/graph/ key prefix
gsvgit Sep 2, 2026
13bf82f
docs(007-S2): Mark task 7 done in task log
gsvgit Sep 2, 2026
1275a5c
docs(008-S1): Record task 8 in task log
gsvgit Sep 3, 2026
ad7cf8c
docs(008-S1): Add RDF source-area group with 18 graphs moved from CFP…
gsvgit Sep 3, 2026
64a2152
docs(008-S2): Mark task 8 done in task log
gsvgit Sep 3, 2026
2191ebb
docs(009-S1): Record task 9 in task log and repair mangled task 7/8 l…
gsvgit Sep 3, 2026
f601ede
fix(009-S1): Fix docs building (nb2plots kernel imports, broken refs,…
gsvgit Sep 3, 2026
81463ff
docs(009-S3): Mark task 9 done in task log
gsvgit Sep 3, 2026
b8e81e2
docs(010-S1): Record task 10 in task log
gsvgit Sep 3, 2026
87bd080
fix(010-S1): Fix the remaining docs build warnings
gsvgit Sep 3, 2026
9ae9758
docs(010-S4): Mark task 10 done in task log
gsvgit Sep 3, 2026
4404ce0
docs(011-S1): Record task 11 in task log
gsvgit Sep 4, 2026
40dc2a8
docs(011-S2): Split CFPQ old collection into grammar-based groups in …
gsvgit Sep 4, 2026
4b86f86
docs(011-S3): Regenerate graphs_list.md from the updated docs index
gsvgit Sep 4, 2026
81ebee7
fix(011-S4): Fix TOC table indentation regression in docs index
gsvgit Sep 4, 2026
595a3c6
docs(011-S4): Mark task 11 done in task log
gsvgit Sep 4, 2026
3b3982b
docs(012-S1): Record task 12 in task log
gsvgit Sep 4, 2026
427cee8
docs(012-S2): Make poetry run the canonical test command in run-tests…
gsvgit Sep 4, 2026
04bba6c
docs(012-S2): Mark task 12 done in task log
gsvgit Sep 4, 2026
7965026
docs(013-S1): Record task 13 and follow-ups 14-16 in task log
gsvgit Sep 4, 2026
7e8975c
feat(013-S2): Add streaming CSV-to-MTX core of the old-to-new converter
gsvgit Sep 4, 2026
4725b28
feat(013-S3): Add grammar generation for the old-to-new converter
gsvgit Sep 4, 2026
a9fac68
feat(013-S4): Add archive assembly, verification and tarball packing
gsvgit Sep 4, 2026
8b48fe3
feat(013-S5): Add the S3 pipeline, CLI and record to the converter
gsvgit Sep 4, 2026
ed501f0
feat(013-S6): Dry-run all 54 graphs and record the evidence report
gsvgit Sep 4, 2026
f227d1c
feat(013-S7): Upload all 54 converted archives to 5.0.0/graph/
gsvgit Sep 4, 2026
491f245
fix(013-S6): Document the --report option in the CLI usage
gsvgit Sep 4, 2026
865b151
fix(013-S6): Apply black formatting to the report CLI test
gsvgit Sep 4, 2026
b8f5ff5
docs(013-S7): Mark task 13 done in task log
gsvgit Sep 4, 2026
9b32bb1
docs(015-S1): Record user guidance and global plan for tasks 14-16
gsvgit Sep 4, 2026
e0b3b25
feat(015-S2): Bump VERSION to 5.0.0 and pin unmigrated data to 4.0.0
gsvgit Sep 5, 2026
9ee34df
docs(015-S3): Re-point the 54 converted graphs' docs links to 5.0.0
gsvgit Sep 5, 2026
1339e9b
docs(015-S3): Mark task 15 done in task log
gsvgit Sep 5, 2026
591d013
feat(014-S1): Add mtx-per-label graph readwrite module
gsvgit Sep 5, 2026
e67110e
feat(014-S2): Add .cnf template readwrite and materialize
gsvgit Sep 5, 2026
4f3113f
feat(014-S3): Generalize download() to all 113 graphs with per-graph …
gsvgit Sep 5, 2026
99be140
docs(014-S3): Mark task 14 done in task log
gsvgit Sep 5, 2026
0a75613
docs(016-S1): Fix the stale stats of the 54 migrated graphs
gsvgit Sep 5, 2026
94d4399
docs(016-S2): Document the graph file structure and label conventions
gsvgit Sep 5, 2026
602f509
docs(016-S3): Load the tutorial graph with graph_from_mtx_dir
gsvgit Sep 5, 2026
ec5066e
docs(016-S1): Keep the original section spacing on the java pages
gsvgit Sep 5, 2026
5f70a7c
docs(016-S3): Mark task 16 done in task log
gsvgit Sep 5, 2026
62dc356
fix(017-S1): Fix the Sphinx indentation error in utils.rst
gsvgit Sep 7, 2026
6e1edbb
feat(017-S2): Check the docs build in the quality gate and in CI
gsvgit Sep 7, 2026
3629ed4
docs(017-S3): Update the add-graph surface to the new format
gsvgit Sep 7, 2026
565020d
docs(017-S3): Mark task 17 done in task log
gsvgit Sep 7, 2026
acc36e5
docs(018-S1): Group graph pages in the left nav by section
gsvgit Sep 7, 2026
22ac69c
docs(018-S2): Document per-graph page registration in add-graph skill
gsvgit Sep 7, 2026
08d912a
docs(018-S2): Mark task 18 done in task log
gsvgit Sep 7, 2026
c8d13e5
feat(019-S1): Add archive file-name audit tool
gsvgit Sep 7, 2026
d7f2432
docs(019-S2): Record the repacked archives of the filename unification
gsvgit Sep 7, 2026
f5844ce
docs(019-S2): Mark task 19 done in task log
gsvgit Sep 7, 2026
faf95a2
feat(020-S1): Add server-side S3 copy helper
gsvgit Sep 7, 2026
adb6574
docs(020-S3): Re-point the legacy graph pages to the 5.0.0 prefix
gsvgit Sep 7, 2026
cc221e0
feat(020-S2): Serve the whole dataset from a single 5.0.0 prefix
gsvgit Sep 7, 2026
8b687db
docs(020-S3): Mark task 20 done in task log
gsvgit Sep 7, 2026
c5293d8
feat(021-S1): Drop the _i placeholder file-name fallback from the pac…
gsvgit Sep 7, 2026
452a0e2
docs(021-S2): State the file name is always the label in the format docs
gsvgit Sep 7, 2026
440e791
docs(021-S2): Mark task 21 done in task log
gsvgit Sep 7, 2026
ccd9648
docs(022-S1): Add an about-category paragraph to each graph category
gsvgit Sep 7, 2026
f2d2cee
docs(022-S2): Add a citation section to the About page
gsvgit Sep 7, 2026
70b5987
docs(022-S3): Add installation, dataset overview, and citation to the…
gsvgit Sep 7, 2026
9098ef7
docs(022-S3): Mark task 22 done in task log
gsvgit Sep 7, 2026
bfe8db8
feat(023-S1): Add an Info-table consistency audit tool
gsvgit Sep 7, 2026
775bc94
docs(023-S2): Normalize per-graph Info tables to a single schema
gsvgit Sep 7, 2026
42e58d2
docs(023-S2): Mark task 23 done in task log
gsvgit Sep 7, 2026
e822b7d
docs(024-S1): Add a Keep a Changelog changelog starting at 5.0.0
gsvgit Sep 7, 2026
7174503
feat(024-S2): Add a version single-source guard (config.py vs pyproje…
gsvgit Sep 7, 2026
cc186da
feat(024-S3): Add a tag-triggered PyPI publish workflow
gsvgit Sep 7, 2026
adfb451
docs(024-S4): Add release documentation, skill, and AGENTS.md entry
gsvgit Sep 8, 2026
4c8a5b6
feat(024-S5): Add atomic bump_version helper with changelog promotion
gsvgit Sep 8, 2026
bfb1971
docs(024-S5): Mark task 24 done in task log
gsvgit Sep 8, 2026
a797010
docs(025-S1): Add CC-BY 4.0 license for the dataset
gsvgit Sep 8, 2026
87944a7
docs(025-S2): Declare the code/data license split in README and docs
gsvgit Sep 8, 2026
ae0a436
docs(025-S3): Record the dual code/data license in package metadata
gsvgit Sep 8, 2026
7c03192
docs(025-S3): Mark task 25 done in task log
gsvgit Sep 8, 2026
3d00d78
chore(026-S1): Ignore the temporal CFPQ reference tool directory
gsvgit Sep 9, 2026
7a512e7
docs(026-S1): Mark task 26 done in task log
gsvgit Sep 9, 2026
7861eac
docs(026-S1): Update task 26 results after remote retry pass
gsvgit Sep 9, 2026
d49d002
feat(027-S1): Add materialize_grammar() and fix _r_i terminal handling
gsvgit Sep 12, 2026
3e49a4e
feat(028-S1): Add reachable_pairs dataset API
gsvgit Sep 12, 2026
d461bf7
docs(028-S3): Add reachable-pair columns to per-category graph tables
gsvgit Sep 12, 2026
5817ddb
docs(028-S4): Add reachable pairs summary page and fix section labels
gsvgit Sep 12, 2026
f673eac
style(028-S5): Black formatting for reachable_pairs module
gsvgit Sep 12, 2026
898aae0
style(028-S5): Trim trailing whitespace in empty table cells
gsvgit Sep 12, 2026
ae61e43
docs(028-S5): Mark task 28 done in task log
gsvgit Sep 12, 2026
de23bd8
docs(028-S5): Add table structure description to Graphs page Contents
gsvgit Sep 12, 2026
a948c9d
docs: Add clickable paper links to all graph category descriptions
gsvgit Sep 12, 2026
fca5b33
docs: Make graph category captions in left sidebar clickable
gsvgit Sep 12, 2026
81ace59
fix(docs): Use hyphenated anchor IDs for sidebar caption links
gsvgit Sep 12, 2026
c00c2d6
fix(docs): Use relative path to index.html for sidebar links on sub-p…
gsvgit Sep 12, 2026
3e67617
docs(029-S1): Log task 29 (homogeneous docs navigation) in task log
gsvgit Sep 14, 2026
c11438c
docs(029-S2): Group site navigation into 4 top-level sections; orphan…
gsvgit Sep 14, 2026
49c3ffa
docs(029-S3): Split Graphs index into 8 per-category pages
gsvgit Sep 14, 2026
1b01168
docs(029-S4): Uniform sidebars on all pages; drop caption-link JS hac…
gsvgit Sep 14, 2026
e737dfc
docs(029-S5): Mark task 29 done in task log
gsvgit Sep 14, 2026
6598ba5
docs(030-S1): Log task 30 (align git-workflow skill with actual merge…
gsvgit Sep 14, 2026
05a437c
docs(030-S2): Document the actual merge flow in git-workflow skill
gsvgit Sep 14, 2026
ee5aeae
docs(030-S3): Mark task 30 done in task log
gsvgit Sep 14, 2026
8485b56
fix(31-S1): Fix broken function links on the Graphs page (issue #122)
gsvgit Sep 14, 2026
bf62785
fix(31-S2): Fix the broken anchor to the Old graphs page
gsvgit Sep 14, 2026
1a80e36
fix(31-S3): Remove the dead code-links from the MS_Reachability page
gsvgit Sep 14, 2026
5fb10d3
docs(31-S4): Normalize function references to explicit :obj: roles
gsvgit Sep 14, 2026
c19629e
docs(31-S5): Enable nitpicky mode so unresolved cross-references warn
gsvgit Sep 14, 2026
3c7057c
fix(31-S6): Fix every broken link found by the full linkcheck run
gsvgit Sep 14, 2026
ef11b9a
docs(31-S7): Wire the link check into CI and the quality gate
gsvgit Sep 14, 2026
a039627
docs(31-S7): Fail the gate on unresolved cross-references, not just E…
gsvgit Sep 14, 2026
363380a
docs(31-S1): Log task 31 (check docs cross-references and links; syst…
gsvgit Sep 14, 2026
a22101c
fix(31-S5): Fix the change_edges references nitpicky surfaced on gate…
gsvgit Sep 14, 2026
5636771
docs(31-S7): Mark task 31 done in task log
gsvgit Sep 14, 2026
c907155
docs(31-S7): Record the cached-doctree pitfall in the build-docs skill
gsvgit Sep 14, 2026
a435ab2
fix(32-S1): use a valid Babel locale code in the docs config
gsvgit Sep 14, 2026
9d80cb2
fix(32-S2): remove the redundant napoleon extension from the docs
gsvgit Sep 14, 2026
92ff816
fix(32-S3): remove the leftover warning suppressions
gsvgit Sep 14, 2026
9a721c2
fix(32-S4): use literal markup for prose in docstrings and fix a wron…
gsvgit Sep 14, 2026
5b82f23
refactor(32-S5): make MTX_HEADER a private constant
gsvgit Sep 14, 2026
dcdb7b0
docs(32-S6): fix the broken materialize_grammar cross-reference
gsvgit Sep 14, 2026
a3fa5b8
docs(32-S7): replace tutorial admonitions with plain paragraphs
gsvgit Sep 14, 2026
553e903
feat(32-S8): enforce the no-warnings policy in the docs build
gsvgit Sep 14, 2026
99a0962
docs(32-S9): record task 32 in the task log and detailed plan
gsvgit Sep 14, 2026
0af3b8a
docs(33-S1): record task 33 in the task log and write the detailed plan
gsvgit Sep 15, 2026
941ad82
docs(33-S2): add the developer guide page covering issue #76
gsvgit Sep 15, 2026
5b7027e
docs(33-S3): add the 'For developers' section to the README
gsvgit Sep 15, 2026
780a3d1
docs(33-S4): fix stale install instructions
gsvgit Sep 15, 2026
c85e7dc
docs(33-S5): slim overlapping skills to thin pointers of the develope…
gsvgit Sep 15, 2026
3ff499e
docs(33-S6): codify 'docs are the source of truth, skills are thin po…
gsvgit Sep 15, 2026
4f5988a
docs(33-S7): resolve code-review findings from the whole-repo review
gsvgit Sep 15, 2026
c6d6866
docs(33-S8): mark task 33 done in the task log
gsvgit Sep 15, 2026
eeec642
docs(34-S1): record task 34 in the task log and write the detailed plan
gsvgit Sep 16, 2026
212dae4
docs(34-S2): add issue references to the [Unreleased] changelog section
gsvgit Sep 16, 2026
550568d
docs(34-S2): order the changelog sections per Keep a Changelog (Fixed…
gsvgit Sep 16, 2026
17db9c8
docs(34-S3): mark task 34 done in the task log
gsvgit Sep 16, 2026
1970241
docs(35-S1): write the detailed plan for cutting the v5.0.0 release
gsvgit Sep 16, 2026
53e07ac
chore: release 5.0.0
gsvgit Sep 16, 2026
20a181a
chore(35-S3): update GitHub Actions to their latest major versions
gsvgit Sep 16, 2026
f6dde71
fix(35-S6): retry intersphinx inventory fetches on transient network …
gsvgit Sep 16, 2026
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
12 changes: 5 additions & 7 deletions .github/ISSUE_TEMPLATE/graph-add-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,22 @@ assignees: rustam-azimov, vadyushkins
| Version | ``<Current version of CFPQ_Data>`` |
| Origin | [link](``<Link to download the graph>``) |

## CSV File Structure
## Data format

| Column Number | Column Type | Column Description |
|:---:|:---:|---|
| 1 | int | The tail of the edge |
| 2 | int | The head of the edge |
| 3 | str | The label of the edge |
The archive must follow the standard layout described in the "File structure" section of the [Graphs page](https://formallanguageconstrainedpathquerying.github.io/CFPQ_Data/graphs/index.html): `<name>.tar.gz` unpacks to `<name>/{README.md, grammar/, graph/}`, where `graph/` holds one Boolean MatrixMarket pattern file per edge label.

## Graph Statistics
| Num Nodes | Num Edges |
|:---:|:---:|
| ``<The number of nodes in the new graph>`` | ``<The number of edges in the new graph>`` |
| ``<The number of nodes in the new graph>`` | ``<The number of stored edges in the new graph>`` |

## Edges Statistics
| Edge Label | Num Edge Label |
|---:|---:|
| ``<The type of the edge label of the new graph >`` | ``<The number of edges in the new graph of this type>`` |

List the stored labels only (no `_r` reversed-edge rows). A family of indexed labels (e.g. `load_0`, ..., `load_857`) is listed once with a placeholder subscript (e.g. `load_f`) and a note listing the index set.

## Canonical grammars

<LaTeX format of grammar>
Expand Down
12 changes: 5 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE/new_graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,22 @@
| Version | ``<Current version of CFPQ_Data>`` |
| Origin | [link](``<Link to download the graph>``) |

## CSV File Structure
## Data format

| Column Number | Column Type | Column Description |
|:---:|:---:|---|
| 1 | int | The tail of the edge |
| 2 | int | The head of the edge |
| 3 | str | The label of the edge |
The archive must follow the standard layout described in the "File structure" section of the [Graphs page](https://formallanguageconstrainedpathquerying.github.io/CFPQ_Data/graphs/index.html): `<name>.tar.gz` unpacks to `<name>/{README.md, grammar/, graph/}`, where `graph/` holds one Boolean MatrixMarket pattern file per edge label.

## Graph Statistics
| Num Nodes | Num Edges |
|:---:|:---:|
| ``<The number of nodes in the new graph>`` | ``<The number of edges in the new graph>`` |
| ``<The number of nodes in the new graph>`` | ``<The number of stored edges in the new graph>`` |

## Edges Statistics
| Edge Label | Num Edge Label |
|---:|---:|
| ``<The type of the edge label of the new graph >`` | ``<The number of edges in the new graph of this type>`` |

List the stored labels only (no `_r` reversed-edge rows). A family of indexed labels (e.g. `load_0`, ..., `load_857`) is listed once with a placeholder subscript (e.g. `load_f`) and a note listing the index set.

## Canonical grammars

<LaTeX format of grammar>
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
matrix:
python-version: [ 3.11 ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -37,4 +37,4 @@ jobs:
poetry run pytest --cov=cfpq_data --doctest-modules -vv -s cfpq_data tests

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v7
6 changes: 3 additions & 3 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
matrix:
python-version: [ 3.11 ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -39,7 +39,7 @@ jobs:
run: poetry run make -C docs/ html

- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.3
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/_build/html # The folder the action should deploy.
41 changes: 41 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Docs build check

on: [ push, pull_request ]

jobs:
docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.11 ]
steps:
- uses: actions/checkout@v7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: |
pip install poetry

- name: Install dependencies with Poetry
run: |
poetry install --no-interaction --no-ansi --with docs

- name: Show installed packages
run: poetry show

- name: Install packages
run: poetry run pip install .

# No-warnings policy: the build runs with -W --keep-going (see
# docs/Makefile), so any warning — including an unresolved
# cross-reference under nitpicky — exits non-zero on its own.
- name: Build
run: poetry run make -C docs/ html

# The linkcheck builder exits non-zero on broken or timed-out links.
- name: Check links
run: poetry run sphinx-build -b linkcheck docs docs/_build/linkcheck
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Publish

on:
push:
tags: ['v*']
workflow_dispatch: {}

permissions:
contents: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-python@v7
with:
python-version: '3.11'

- name: Verify tag matches package version
if: startsWith(github.ref, 'refs/tags/v')
run: |
set -euo pipefail
ver=$(python3 -c "import sys; sys.path.insert(0, 'utils'); import check_version_sync as c; print(c.config_version())")
tag="${GITHUB_REF_NAME#v}"
if [ "$tag" != "$ver" ]; then
echo "::error::Tag ${GITHUB_REF_NAME} does not match package version ${ver}"
exit 1
fi
echo "Tag ${GITHUB_REF_NAME} matches package version ${ver}"

- name: Build distributions
run: |
python3 -m pip install --upgrade build
python3 -m build

- name: Upload dist
uses: actions/upload-artifact@v7
with:
name: dist
path: dist/

publish-testpypi:
needs: build
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Download dist
uses: actions/download-artifact@v8
with:
name: dist
path: dist/

- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

publish-pypi:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Download dist
uses: actions/download-artifact@v8
with:
name: dist
path: dist/

- name: Publish to PyPI (Trusted Publishing / OIDC)
uses: pypa/gh-action-pypi-publish@release/v1
# No `password`: uses OIDC Trusted Publishing (configured once on PyPI).
# Fallback if not using Trusted Publishing: set the PYPI_API_TOKEN
# secret and uncomment the `with` block below.
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
ver="${GITHUB_REF_NAME#v}"
awk -v v="$ver" '
index($0, "## [" v "]") == 1 {insec=1; next}
/^## / && insec {exit}
insec {print}
' CHANGELOG.md > release_notes.md
gh release create "${GITHUB_REF_NAME}" --title "${GITHUB_REF_NAME}" \
--notes-file release_notes.md dist/*
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
]
python-version: [ 3.11 ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Data
cfpq_data/data

# Temporal CFPQ reference-answer tool (local-only, not part of the package)
temporal_cfpq/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
38 changes: 38 additions & 0 deletions .opencode/skills/add-grammar/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: add-grammar
description: Use when adding a new grammar template to CFPQ_Data. Covers the generator/readwrite/converter module conventions and the PR/issue templates.
---

# Add a grammar template

## Source of truth

The required fields and metadata live in the GitHub templates — do **not**
duplicate them here:

- `.github/PULL_REQUEST_TEMPLATE/new_grammar.md`
- `.github/ISSUE_TEMPLATE/grammar-add-template.md`

Fill in every field in the triangle brackets (`<>`) of those templates.

## Package conventions

Grammar code lives in `cfpq_data/grammars/`:

- `generators/` — template factories (e.g. `dyck_grammar`, `c_alias_grammar`).
- `readwrite/` — (de)serialization (`cfg_*`, `cnf_*`, `rsa_*`, `regex_*`).
- `converters/` — conversions between formalisms (`cfg_from_cnf`, ...).
- `utils/` — helpers (e.g. `change_terminals_in_cfg`).

Each new module must:

1. Define `__all__` listing its public functions.
2. Export it from the relevant `__init__.py`
(`generators/__init__.py`, `readwrite/__init__.py`, etc.).
3. Provide numpydoc docstrings with `Examples` (these are run as doctests).
4. Add a mirroring test under `tests/grammars/<submodule>/test_*.py`.
5. Add the template name to `GRAMMAR_TEMPLATES` in
`cfpq_data/dataset/data.py` if it should be downloadable.

Use `pyformlang` types (`CFG`, `CNF`, `RSA`, `Regex`) as the interchange
format. See `.opencode/skills/run-tests` to verify.
49 changes: 49 additions & 0 deletions .opencode/skills/add-graph/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: add-graph
description: Use when adding a new graph to CFPQ_Data. Covers the mtx-per-label archive format, the download()/DATASET wiring, and the PR/issue templates.
---

# Add a graph to the dataset

## Source of truth

The required fields and metadata live in the GitHub templates — do **not**
duplicate them here:

- `.github/PULL_REQUEST_TEMPLATE/new_graph.md`
- `.github/ISSUE_TEMPLATE/graph-add-template.md`

Fill in every field in the triangle brackets (`<>`) of those templates.

## Data format

The archive layout and the label conventions are documented once in the
"File structure" section of `docs/graphs/index.rst` — follow it exactly:
`<name>.tar.gz` unpacks to `<name>/{README.md, grammar/, graph/}`, where
`graph/` holds one Boolean MatrixMarket pattern file per edge label.

## Wiring a new graph into the code

1. Add the graph name to `DATASET` in `cfpq_data/dataset/data.py`.
2. The graph archive must be uploaded under the dataset URL
`https://cfpq-data.storage.yandexcloud.net/{VERSION[0]}.0.0/graph/<name>.tar.gz`.
3. Loading happens via `download(name)` (which returns the graph directory)
and `graph_from_mtx_dir(path / "graph")`
(`cfpq_data/graphs/readwrite/mtx.py`).

## Documentation

1. Create the per-graph page `docs/graphs/data/<name>.rst`, following the
structure of an existing page (description, statistics tables, canonical
grammars). Statistics conventions: the PR template is the source of truth.
2. Register it in `docs/graphs/index.rst` **twice**: a row in the section
table of its source area, and an entry in the matching captioned toctree
(the left navigation bar is generated from those toctrees). Keep both in
the same order as the table.

Note: a `data/*.rst` page missing from all toctrees produces only a Sphinx
*warning*, not an error, so the docs quality gate will not catch it — check
the build log for "not included in any toctree".

See also `.opencode/skills/run-tests` to verify, and the Graphs page of the
docs for the full list of names.
26 changes: 26 additions & 0 deletions .opencode/skills/build-docs/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: build-docs
description: Use when building the CFPQ_Data Sphinx documentation. Thin pointer to the "Docs build and deploy" section of docs/developer.rst and docs/README.md, which hold the model and the exact commands; keeps the agent-specific notes.
---

# Build docs

The model (no-warnings policy, CI checks, gh-pages deployment) and the exact
local commands are documented in the "Docs build and deploy" section of
`docs/developer.rst`; the canonical local instructions live in
`docs/README.md` — do not duplicate them here. Read those before running
anything. This skill keeps only the agent-specific notes below.

## Notes

- No-warnings policy (see the docs page): any Sphinx warning fails the build
— fix it, do not suppress it (`suppress_warnings`) or weaken the flag.
- A config-only change (e.g. enabling `nitpicky`) does not re-resolve
references in documents whose content is unchanged — their doctrees are
reused from the cache, so unresolved-reference warnings stay hidden until
those pages are next edited. After changing reference-related config, do a
clean rebuild (`make clean && make html`) before trusting the warning log.
- API reference pages use `.. automodule::` / `.. autosummary::`; generated
stub files land under `docs/*/generated/` and are git-ignored.
- Add new public functions to the matching `docs/reference/<sub>/...rst`
autosummary list when extending the API.
Loading