Skip to content

fix: keep nested assembly indexes consistent - #2102

Open
RanaPriyansh wants to merge 2 commits into
CadQuery:masterfrom
RanaPriyansh:fix/2018-nested-assembly-index
Open

RanaPriyansh wants to merge 2 commits into
CadQuery:masterfrom
RanaPriyansh:fix/2018-nested-assembly-index

Conversation

@RanaPriyansh

Copy link
Copy Markdown

Nested assembly changes can leave Assembly.objects with missing paths or stale nodes. This addresses the nested index part of #2018. The requested find and list-based remove APIs remain separate.

Update only the added or removed receiver-relative paths in attached ancestors, and build copied indexes from copied children. This keeps ancestor paths, renamed copies, and detached subtrees consistent.

Validation:

  • tests/test_assembly.py: 165 passed.
  • Black accepted both changed files.
  • Full suite: 896 passed, 3 skipped, 1 failed. The sole failure is the same test_interpPlate volume mismatch recorded on the unchanged baseline, so a full-suite pass is not claimed.

Codex used.

@RanaPriyansh

Copy link
Copy Markdown
Author

Annotated the ancestor traversal variable as Optional[Assembly] so Mypy accepts its terminating None value.
Black and all 165 assembly tests pass locally.
The matching Mypy diagnostic is removed, but 165 unchanged local-environment errors remain, including missing OCP typing metadata.
The hosted rerun is pending.

Codex used.

@codecov

codecov Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.81%. Comparing base (c11b3f9) to head (41e30c3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2102   +/-   ##
=======================================
  Coverage   95.80%   95.81%           
=======================================
  Files          30       30           
  Lines        9589     9606   +17     
  Branches     1439     1444    +5     
=======================================
+ Hits         9187     9204   +17     
  Misses        247      247           
  Partials      155      155           

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

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant