Skip to content

Add findings, finding codes and policy - #23

Draft
C-Achard wants to merge 3 commits into
cy/project-discoveryfrom
cy/project-findings
Draft

C-Achard wants to merge 3 commits into
cy/project-discoveryfrom
cy/project-findings

Conversation

@C-Achard

@C-Achard C-Achard commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

The findings mechanism.

  • Severity: note, warning, error.
  • FindingCode: the base. Each code carries a description, severity and required evidence keys.
  • Finding: Reported fact from a code

Also ProjectValidationError for blocking findings, and helpers that apply a consumer's own policy over findings.

  • No codes yet. Each namespace lands with the check that first emits it, so a challenge to a code is reviewed next to its emitter.
  • Tests get a code namespace from the example_codes fixture, which exists for one test only: tests/conftest.py garbage-collects it before the next test, so the closed-catalogue test asserts the exact set of namespaces with no exemption. A control test checks the previous test's namespace is gone.
  • Raises the pydantic floor to 2.5.2: JsonValue, the type of a finding's evidence, arrived in 2.5.0 and its bool serialization was fixed in 2.5.2. Tested on 2.14 only.

@C-Achard
C-Achard added this pull request to stack #18 November 26, 2026 15:06
@C-Achard C-Achard changed the title cy/project findings Add findings, finding codes and policy Nov 26, 2026
@C-Achard C-Achard added canonical Changes something consumers rely on: finding codes, snapshot format, written files consumer: datajoint Needed by or affects the DataJoint pipeline consumer: deeplabcut Needed by or affects DeepLabCut consumer: napari Needed by or affects napari-deeplabcut validation Discovery, validation, findings and snapshots and removed consumer: deeplabcut Needed by or affects DeepLabCut consumer: napari Needed by or affects napari-deeplabcut consumer: datajoint Needed by or affects the DataJoint pipeline labels Nov 26, 2026
@C-Achard
C-Achard force-pushed the cy/project-findings branch from 11b6d35 to 3d80b18 Compare November 30, 2026 08:14
@C-Achard
C-Achard force-pushed the cy/project-findings branch 3 times, most recently from 9b71a59 to 068142c Compare November 30, 2026 11:07
- Declare the example namespace per test, through the example_codes fixture, and collect it before the next test runs, so no other test finds it in the catalogue

- The closed-catalogue test asserts the exact set of namespaces again, with no exemption; a control shows the previous test's namespace is gone

- Add test_only_error_blocks from tests/inspection/test_validation_error.py; its other tests need inspect_project
@C-Achard
C-Achard force-pushed the cy/project-findings branch from 068142c to 10f2348 Compare November 30, 2026 15:10
@C-Achard
C-Achard removed this pull request from stack #18 November 30, 2026 15:16
@C-Achard
C-Achard added this pull request to stack #42 November 30, 2026 15:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

canonical Changes something consumers rely on: finding codes, snapshot format, written files validation Discovery, validation, findings and snapshots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant