Skip to content

build: support FOCA 0.19 - #36

Merged
uniqueg merged 2 commits into
devfrom
build/foca-0-19
Nov 1, 2026
Merged

uniqueg merged 2 commits into
devfrom
build/foca-0-19

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Makes the plugins installable with FOCA 0.19 (proTES 0.4.0):

  • FOCA bounds of all plugins (and the template): >=0.18.0,<0.20. FOCA
    0.19 keeps plugin API version 1; its changes for plugins are additive
    (plugin store ctx.store, class attribute data_stored, listing fields
    data_stored/storage, listing spec 1.1.0).
  • generic.routing.random and tes.routing.distance declare
    data_stored = () explicitly (they use no plugin store; the distance
    cache stays per process, feat(distance): use plugin store for cache, budget #21), so the tests hold on FOCA 0.18, which
    lacks the attribute. READMEs list "Data stored: none".
  • Versions: both plugins 0.1.1 (patch: dependency range only), with
    changelog sections; the unreleased meta train 0.1.0 now pins 0.1.1 and
    declares foca>=0.18.0,<0.20.
  • CI test matrix: FOCA 0.18.0 (lowest, coverage), 0.19.0 (newest release)
    and dev; uv.lock has FOCA 0.19.0.
  • Docs: README status, installing, writing-plugins (compatibility),
    distance README (cache note).

Lower bound kept at 0.18.0, as both versions pass, so proTES 0.3 setups
can take the patch releases too.

Light lane: dependency ranges, versions, docs and the CI matrix; the only
code is a constant class attribute with tests.

Verification

  • Plugin tests with 100% coverage against FOCA 0.19.0 (locked) and, for
    both plugins, against FOCA 0.18.0 (uv pip install foca==0.18.0): pass
    (the new data_stored asserts failed on 0.18.0 before the declaration)

  • FOCA 0.19 listing (foca.plugins.api.describe_plugin via
    PluginHarness): both entries have data_stored: [], storage: local

  • python -m scripts.packages mypy on FOCA 0.18.0 and 0.19.0: no issues

  • Script tests 100% coverage; scripts.checks check; uv build --all-packages + scripts.checks dist dist (random and distance
    0.1.1, meta 0.1.0): pass; uv lock --check: pass

  • ruff check/format: pass. pre-commit run --all-files could not run
    locally (the sandbox proxy refused fetching the updated hook repos);
    CI's Lint job runs it.

  • CI: all 44 checks passed (incl. the FOCA 0.19.0 and 0.18.0 matrix
    entries and Lint, which runs pre-commit)

Declined review findings

Closes #32

🤖 Generated with Claude Code

Raise the FOCA bounds of the plugins to >=0.18.0,<0.20, test them
against FOCA 0.18.0, 0.19.0 and dev, declare that they store nothing
(data_stored, listed by FOCA 0.19), and release them as 0.1.1. The
unreleased meta train 0.1.0 pins the new versions.

Closes #32

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR adds FOCA 0.19 compatibility while retaining FOCA 0.18 support, implemented through widened dependency ranges, explicit empty plugin-store metadata, 0.1.1 plugin releases, updated meta-package pins and documentation, and CI coverage for the lower bound, newest release, and development FOCA.

File-Level Changes

Change Details Files
Extend both published plugins and the template to support FOCA 0.18–0.19 while explicitly declaring that no plugin-store data is used.
  • Widen FOCA dependency bounds to >=0.18.0,<0.20.
  • Add data_stored = () to random and distance plugin classes for FOCA 0.19 listings while preserving FOCA 0.18 compatibility.
  • Add assertions covering the new class metadata.
  • Document no persistent store usage and clarify that distance caching remains process-local.
plugins/generic/routing/random/pyproject.toml
plugins/generic/routing/random/src/foca_plugins/generic/routing/random/__init__.py
plugins/generic/routing/random/tests/test_random.py
plugins/generic/routing/random/README.md
plugins/tes/routing/distance/pyproject.toml
plugins/tes/routing/distance/src/foca_plugins/tes/routing/distance/__init__.py
plugins/tes/routing/distance/tests/test_distance.py
plugins/tes/routing/distance/README.md
plugins/generic/example/noop/pyproject.toml
plugins/generic/example/noop/README.md
Release the plugins as 0.1.1 and update the meta distribution to resolve those versions under the expanded FOCA compatibility range.
  • Bump both plugin versions to 0.1.1.
  • Update meta-package dependency bounds and all plugin extras to pin 0.1.1.
  • Add changelog entries describing FOCA 0.19 support and cache behavior.
meta/pyproject.toml
meta/CHANGELOG.md
plugins/generic/routing/random/CHANGELOG.md
plugins/tes/routing/distance/CHANGELOG.md
Expand validation and development dependency coverage to include the FOCA 0.19 release alongside FOCA 0.18 and development FOCA.
  • Add FOCA 0.19.0 to the CI test matrix and lockfile.
  • Retain FOCA 0.18.0 as the coverage and lower-bound lane.
  • Document the supported-version testing strategy.
.github/workflows/ci.yml
uv.lock
docs/writing-plugins.md
Refresh user-facing compatibility and installation documentation for the new plugin releases and FOCA support.
  • Update status and compatibility descriptions to mention FOCA 0.19.
  • Update installation examples from plugin version 0.1.0 to 0.1.1.
README.md
docs/installing.md

Possibly linked issues

  • build: support FOCA 0.19 #32: The PR implements the proposed fix: supports FOCA 0.19, declares stored data, updates plugin releases, and validates listing fields.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8814a96) to head (788dfb0).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev       #36   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          551       553    +2     
  Branches        71        71           
=========================================
+ Hits           551       553    +2     
Flag Coverage Δ
foca-plugin-generic-example-noop 100.00% <ø> (ø)
foca-plugin-generic-routing-random 100.00% <100.00%> (ø)
foca-plugin-tes-routing-distance 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Part of #32

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg
uniqueg marked this pull request as ready for review November 1, 2026 02:46

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="plugins/generic/routing/random/pyproject.toml" line_range="42" />
<code_context>
-    "foca>=0.18.0,<0.19",
+    # The plugin API of FOCA 0.18 and 0.19 (`foca.plugins`, API version 1);
+    # raise the upper bound once CI has tested the next minor version
+    "foca>=0.18.0,<0.20",
     "pydantic>=2.7,<3",
 ]
</code_context>
<issue_to_address>
**Maintainers are told FOCA 0.19 is unsupported**

When a maintainer follows the FOCA-upgrade instructions, `MAINTAINERS.md` says the plugin bounds are still `<0.19` and that FOCA 0.19 is forthcoming, so maintainers following its upgrade instructions will treat the tested 0.19 support as absent and repeat obsolete steps.

Update `MAINTAINERS.md` to state the current supported range and describe the process for the next FOCA release.

Also at `plugins/tes/routing/distance/pyproject.toml:42`, `plugins/generic/example/noop/pyproject.toml:51`.
</issue_to_address>

Linked issues

#32 build: support FOCA 0.19 · 6 of 6 met

# Requirement Status Notes
1 Raise the plugins’ FOCA bound to include 0.19 ✅ Met Both plugin packages now require foca>=0.18.0,<0.20.
2 Test the plugins against FOCA 0.19 ✅ Met The CI matrix includes FOCA 0.19.0 for each affected package.
3 Declare what the plugins store ✅ Met Both plugin classes declare data_stored = (), and their tests assert it.
4 Release new versions of both plugins ✅ Met Both plugin packages are version 0.1.1, with updated changelogs.
5 New releases install alongside FOCA 0.19 ✅ Met The 0.1.1 package metadata permits FOCA 0.19.
6 Listing entries satisfy FOCA 0.19’s listing spec (1.1.0) ✅ Met Both plugins declare data_stored; the PR reports verifying that FOCA 0.19 lists data_stored: [] and storage: local for each.

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit 6e79216 into dev Nov 1, 2026
44 checks passed
@uniqueg
uniqueg deleted the build/foca-0-19 branch November 1, 2026 03:10
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.

build: support FOCA 0.19

1 participant