Skip to content

🧪 Test/fields process node coverage - #7448

Merged
GeigerJ2 merged 1 commit into
aiidateam:mainfrom
GeigerJ2:test/fields-process-node-coverage
Jul 16, 2026
Merged

🧪 Test/fields process node coverage#7448
GeigerJ2 merged 1 commit into
aiidateam:mainfrom
GeigerJ2:test/fields-process-node-coverage

Conversation

@GeigerJ2

@GeigerJ2 GeigerJ2 commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Split off from #7254.

Summary by CodeRabbit

  • Bug Fixes

    • Aligned ORM field schema expectations with stricter, more accurate typing and nullability across process, calculation, workflow, and data nodes.
    • Standardized node “attributes” handling and removed obsolete repository_content mappings.
  • Tests

    • Expanded entry-point coverage to include all node and data plugins.
    • Updated field validation fixtures for the latest ORM schemas (including UUIDs, timestamps, and metadata/extras).

@GeigerJ2 GeigerJ2 added the pr/blocked PR is blocked by another PR that should be merged first label Jul 16, 2026
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.60%. Comparing base (d5bb1b5) to head (07144a3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7448      +/-   ##
==========================================
- Coverage   80.61%   80.60%   -0.00%     
==========================================
  Files         580      580              
  Lines       46722    46722              
==========================================
- Hits        37658    37656       -2     
- Misses       9064     9066       +2     

☔ 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.

GeigerJ2 added a commit to GeigerJ2/aiida-core that referenced this pull request Jul 16, 2026
This reverts commit 1270306.

The 8 refreshed fixtures cover the process nodes and the `Data`/
`ProcessNode` bases, which `test_all_node_fields` never enumerates: its
`startswith('core.')` filter excludes the whole `aiida.node` group.
Nothing reads them, so refreshing them here rewrote 8 unread files with
no test to verify the result.

They are also largely out of scope for this sweep. Two thirds of that
diff is structural drift from the pydantic model rework that introduced
the filter (`QbDictField` -> `QbAttributesField`, dtypes becoming the
`AttributesModel` class), not the repr modernization this PR is about.

The refresh lands instead in aiidateam#7448, together with the filter fix that
gives those fixtures a test again, so the regenerated values are
actually verified there rather than asserted here.
GeigerJ2 added a commit to GeigerJ2/aiida-core that referenced this pull request Jul 16, 2026
This reverts commit 1270306.

The 8 refreshed fixtures cover the process nodes and the `Data`/
`ProcessNode` bases, which `test_all_node_fields` never enumerates: its
`startswith('core.')` filter excludes the whole `aiida.node` group.
Nothing reads them, so refreshing them here rewrote 8 unread files with
no test to verify the result.

They are also largely out of scope for this sweep. Two thirds of that
diff is structural drift from the pydantic model rework that introduced
the filter (`QbDictField` -> `QbAttributesField`, dtypes becoming the
`AttributesModel` class), not the repr modernization this PR is about.

The refresh lands instead in aiidateam#7448, together with the filter fix that
gives those fixtures a test again, so the regenerated values are
actually verified there rather than asserted here.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

ORM field fixtures now represent node attributes through typed QbAttributesField models, nested attribute paths, and revised dtypes. Field tests no longer apply the Python-version skip and collect all node and data entry points.

Changes

ORM field fixture updates

Layer / File(s) Summary
Test discovery and compatibility updates
tests/orm/test_fields.py
Removes version-gated fixture comparisons and expands entry-point collection beyond core. names.
Data field schema update
tests/orm/test_fields/fields_aiida.node.data.Data.yml
Uses typed attributes, nested source paths, explicit dtypes, updated documentation, and removes repository_content.
Process and workflow field schemas
tests/orm/test_fields/fields_aiida.node.process*.yml, tests/orm/test_fields/fields_aiida.node.process.workflow*.yml
Consolidates attributes into typed models, remaps fields to attributes.*, updates nullability and field dtypes, and removes repository_content.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: agoscinski, danielhollas, edan-bainglass

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title matches the PR’s main focus on test field coverage for process-node-related schemas.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@GeigerJ2
GeigerJ2 force-pushed the test/fields-process-node-coverage branch from 42affc0 to 07144a3 Compare July 16, 2026 11:31
The `node_and_data_entry_points` fixture filtered entry points with
`startswith('core.')`, but every `aiida.node` name starts with `data` or
`process`, never `core.`, so the whole group was silently excluded.
`test_all_node_fields` therefore only ever checked the 32 `aiida.data`
classes, leaving the process nodes and the `Data`/`ProcessNode`/
`CalculationNode`/`WorkflowNode` bases with no field-schema coverage.
Drop the filter so they are checked again.

Refresh the eight reference fixtures the filter had orphaned. They had
drifted since the pydantic model rework that introduced the filter and
still carried the pre-PEP-585 dtype reprs (`typing.List[str]` ->
`list[str]`, `typing.Sequence` -> `collections.abc.Sequence`); only now
do they gain a test that verifies them.

Also drop the `skipif < 3.14` guard. It existed because `repr()` of
`typing` generics is not stable across versions, but the annotations are
now PEP 585/604 throughout (aiidateam#7254), so every field repr is
version-stable and the fixtures hold on 3.10-3.14. That matters beyond
coverage: it restores the only CI check of `extract_root_type`'s
`types.UnionType` branch, which is a no-op on 3.14 (where `t.Union is
UnionType`) but load-bearing below it, so removing that branch now fails
the suite instead of silently degrading 187 query fields to
`QbAnyField`.
@GeigerJ2
GeigerJ2 merged commit 7f7dff4 into aiidateam:main Jul 16, 2026
25 of 26 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in aiida-core v2.9.0 Jul 16, 2026
@GeigerJ2
GeigerJ2 deleted the test/fields-process-node-coverage branch July 16, 2026 13:33
@coderabbitai coderabbitai Bot mentioned this pull request Jul 19, 2026
agoscinski pushed a commit to agoscinski/aiida-core that referenced this pull request Jul 31, 2026
The `node_and_data_entry_points` fixture filtered entry points with
`startswith('core.')`, but every `aiida.node` name starts with `data` or
`process`, never `core.`, so the whole group was silently excluded.
`test_all_node_fields` therefore only ever checked the 32 `aiida.data`
classes, leaving the process nodes and the `Data`/`ProcessNode`/
`CalculationNode`/`WorkflowNode` bases with no field-schema coverage.
Drop the filter so they are checked again.

Refresh the eight reference fixtures the filter had orphaned. They had
drifted since the pydantic model rework that introduced the filter and
still carried the pre-PEP-585 dtype reprs (`typing.List[str]` ->
`list[str]`, `typing.Sequence` -> `collections.abc.Sequence`); only now
do they gain a test that verifies them.

Also drop the `skipif < 3.14` guard. It existed because `repr()` of
`typing` generics is not stable across versions, but the annotations are
now PEP 585/604 throughout (aiidateam#7254), so every field repr is
version-stable and the fixtures hold on 3.10-3.14. That matters beyond
coverage: it restores the only CI check of `extract_root_type`'s
`types.UnionType` branch, which is a no-op on 3.14 (where `t.Union is
UnionType`) but load-bearing below it, so removing that branch now fails
the suite instead of silently degrading 187 query fields to
`QbAnyField`.
agoscinski pushed a commit to agoscinski/aiida-core that referenced this pull request Jul 31, 2026
The `node_and_data_entry_points` fixture filtered entry points with
`startswith('core.')`, but every `aiida.node` name starts with `data` or
`process`, never `core.`, so the whole group was silently excluded.
`test_all_node_fields` therefore only ever checked the 32 `aiida.data`
classes, leaving the process nodes and the `Data`/`ProcessNode`/
`CalculationNode`/`WorkflowNode` bases with no field-schema coverage.
Drop the filter so they are checked again.

Refresh the eight reference fixtures the filter had orphaned. They had
drifted since the pydantic model rework that introduced the filter and
still carried the pre-PEP-585 dtype reprs (`typing.List[str]` ->
`list[str]`, `typing.Sequence` -> `collections.abc.Sequence`); only now
do they gain a test that verifies them.

Also drop the `skipif < 3.14` guard. It existed because `repr()` of
`typing` generics is not stable across versions, but the annotations are
now PEP 585/604 throughout (aiidateam#7254), so every field repr is
version-stable and the fixtures hold on 3.10-3.14. That matters beyond
coverage: it restores the only CI check of `extract_root_type`'s
`types.UnionType` branch, which is a no-op on 3.14 (where `t.Union is
UnionType`) but load-bearing below it, so removing that branch now fails
the suite instead of silently degrading 187 query fields to
`QbAnyField`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/blocked PR is blocked by another PR that should be merged first

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant