Skip to content

Release 6.1.0: publish flpq-data to PyPI - #166

Merged
gsvgit merged 26 commits into
masterfrom
dev
Oct 15, 2026
Merged

gsvgit merged 26 commits into
masterfrom
dev

Conversation

@gsvgit

@gsvgit gsvgit commented Oct 14, 2026

Copy link
Copy Markdown
Member

Merge dev into master for the 6.1.0 release (minor: no changes to the existing public API, dataset prefix stays at 6.0.0).

What this carries:

After this merges, v6.1.0 is tagged on master; the Publish workflow then builds the sdist/wheel, publishes them to PyPI (Trusted Publishing), and creates the GitHub Release with the [6.1.0] changelog section. The PR's Publish check pre-publishes to TestPyPI as a packaging validation for exactly this code.

Task issues #164 and #165 close via their Closes #N commit references when this lands on master.

dependabot Bot and others added 26 commits October 14, 2026 09:41
Updates the requirements on [pydata-sphinx-theme](https://github.com/pydata/pydata-sphinx-theme) to permit the latest version.
- [Release notes](https://github.com/pydata/pydata-sphinx-theme/releases)
- [Changelog](https://github.com/pydata/pydata-sphinx-theme/blob/main/RELEASE.md)
- [Commits](pydata/pydata-sphinx-theme@v0.16.1...v0.23.0)

---
updated-dependencies:
- dependency-name: pydata-sphinx-theme
  dependency-version: 0.23.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…NTRIBUTE NEW DATA template

Data contributions become issue-first: one issue carries one or more
validated archives (one graph each) plus motivation, and maintainers do all
repo work. The standalone grammar template is removed because a grammar is a
representation of a query and must ship inside an archive with reference
results. The new template makes the four contribution cases explicit,
requires per-archive validation output and SHA256, mandates motivation, and
states the consistency invariants (no graph without a query, no query
without results.mtx) and the declined cases. README and skill pointers are
updated to the new template.
Data contributions are issue-first, so the new_graph and new_grammar PR
templates — duplicates of the issue template's fields — are removed. A
generic PR template covers code contributions and points data contributors
to the CONTRIBUTE NEW DATA issue; docs/dataset.rst now says grammars arrive
together with the data they apply to.
…contribution guide

The old 'How to add a new graph?' section told contributors to open a PR,
which contradicts the issue-first flow. The new 'Contributing data' section
documents the flow (archives -> validation -> one issue -> maintainers),
the four contribution cases, the per-archive validation command, the
consistency invariants (no graph without a query, no query without
reference results, no item without description and motivation), and the
declined cases. Subsection underlines use the file's existing '^' style.
…m an archive

Accepting a contributed archive requires a reachable_pairs.csv row per new
query (generate_registry reads the graph list and categories from the CSV,
and merge_archive refuses to merge without the rows). Typing those rows by
hand is error-prone, so the tool derives them from a validated archive: one
row per queries/<class>/<query>/ directory, with the query directory name
as the grammar stem (representation picked cnf > re > mcfg > rsm, the
alphabetically first file per extension) and the results.mtx declared entry
count as num_reachable_pairs. The archive must pass the structure checker
first, a tarball must be named after the graph, and the CSV's (graph,
grammar) sort order is preserved; duplicate rows and category disagreements
are reported without writing. --dry-run prints instead of writing.
The add-graph skill gains an 'Accepting an external contribution' section:
per archive — download from the Drive link, verify the SHA256 against the
issue, re-run the structure checker, check name uniqueness against the
registry and the reachable-pairs CSV, derive the CSV rows with
utils/add_reachable_pairs.py, then upload (full) or merge (partial); once
per issue — regenerate the registry, do the docs wiring, and refresh the
reachable-pairs tables and archive sizes. Stale 'PR template' references in
both skills point at the issue template now, and add-grammar records that
grammars arrive via cases 2/3/4b of a CONTRIBUTE NEW DATA issue.
Issue-first data contributions (unified CONTRIBUTE NEW DATA template,
multi-archive issues, motivation and reference-results requirements), the
new utils/add_reachable_pairs.py, and the removal of the specialized graph
and grammar templates are recorded under Unreleased.

Closes #164
…and declined cases

Code review found the four-case list and the declined-cases list duplicated
near-verbatim between the issue template and the docs guide. Per the
single-source-of-truth convention (templates own field and case content),
the guide now summarizes both in one sentence each and points at the
template's 'Contribution type' and 'Not accepted via this flow' sections;
the guide keeps what is uniquely its own — the flow, the validation
command, and the consistency invariants.
Code review found the grammar-instantiation rule stated twice inside the
template (Reference results and Queries and grammars case 2). The
Reference results section now keeps only the graph-side rule, noting that
the structure checker enforces it; the grammar-side rule stays with case 2.
The CONTRIBUTE NEW DATA template does not exist on master until a release
lands, so blob/master links to it would fail the CI link check on dev. The
links now point at blob/dev, where the file exists and which is also the
version contributors should follow; the links keep resolving after release.
Move utils/check_archive_structure.py into flpq_data/tools/ and register
the flpq-check-archive console entry point, so external contributors
validate archives with pip install flpq-data alone instead of downloading
the script from the repo. The S3 client factory and bucket constants move
to flpq_data/dataset/s3.py (boto3 imported lazily — it is a dev-only
dependency), and --audit reports a clean error when boto3 is missing.
The utils importers now use the package path; upload_to_s3 keeps
re-exporting the moved names so existing imports work unchanged.

The module now counts toward the 95% coverage gate, which exposed 28
never-tested branch edges. Sixteen new tests cover the real defensive
branches (malformed MTX headers and entry lines, nnz mismatches, blank
body lines, unexpected queries/ entries, missing queries README,
subdirectories in query dirs, forbidden label components, same-directory
terminal-set consistency, multi-top-level tarballs, broken symlinks, the
no-path CLI). Two provably dead constructs are removed: the indexed-
reversed label check (every stem it matches also matches the reverse
regex, so it could never fire) and the __main__ guard (replaced by the
console entry point; no other package module has one).

Shared archive-tree builders move to tests/archive_helpers.py with a root
tests/conftest.py putting tests/ on sys.path; the four utils test files
import from there. New tests also pin the missing-boto3 --audit branch
and the declared console entry point via importlib.metadata.
The checker is now part of the installed package, so every documented
invocation becomes the flpq-check-archive console command: the
contributor recipe in the issue template and the Graphs page is now
pip install flpq-data (no script download), and the maintainer steps in
the add-graph skill use the command too.

The "Archive structure" section moves from docs/utils.rst to a new
docs/reference/tools/index.rst reference page (automodule + autosummary
of the checker's public API, generated stubs committed), carrying the
archive_structure anchor so existing :ref: links keep resolving. The
Labels check bullet drops the indexed-reversed ordering clause — the
checker never enforced it (the code path was dead and is removed in
S1). AGENTS.md points at the new module path and gains a
flpq_data/tools/ layout line; the changelog records the command and
the move.

Closes #165
The S1 commit picked up a locally regenerated uv.lock (the pre-existing
dependabot #162 specifier drift plus a lockfile revision bump from a
newer local uv). That change is out of scope for this task; restore the
lock to the dev state.
Bump the version to 6.1.0 and promote the [Unreleased] changelog section
to [6.1.0] - 2026-10-14. The release is minor: everything since 6.0.0 is
additive (the flpq-check-archive console command, the flpq_data.tools and
flpq_data.dataset.s3 modules, utils/add_reachable_pairs.py) with no
changes to the existing public API, and the dataset prefix stays at 6.0.0.

uv.lock is re-locked in the same commit: it must track the new package
version for CI's 'uv sync --frozen', and it also picks up the
pydata-sphinx-theme specifier that #162 changed in pyproject.toml without
re-locking, which left the lockfile stale.
The 'How to contribute new data?' heading added by #164 has an underline
one character shorter than the title, which is invalid RST. twine check
(the same validation the Publish workflow runs before the TestPyPI
pre-publish) rejects both dists with 'Title underline too short', so no
release could be published until the underline matches the title.
The assertion flpq_data.__version__ == "6.0.0" hardcodes the release
version and fails on every bump — it broke the 6.1.0 release commit on
all CI platforms. Assert against the canonical VERSION from
flpq_data.config instead: the wiring of __version__ to config is still
checked, while the dataset-prefix literals stay pinned because they move
only on a major release.
@gsvgit
gsvgit merged commit 4c1452e into master Oct 15, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant