Skip to content

Fix failing tests and expand CI coverage#7924

Open
brunopostle wants to merge 12 commits intov0.8.0from
fix/ci-merge-projects-contexts
Open

Fix failing tests and expand CI coverage#7924
brunopostle wants to merge 12 commits intov0.8.0from
fix/ci-merge-projects-contexts

Conversation

@brunopostle
Copy link
Copy Markdown
Contributor

@brunopostle brunopostle commented Apr 9, 2026

This is an attempt to resolve the Github ci test failures.

All tests now passing

Contexts were deleted with remove_deep2 into a single set, but
file.add() inflates inverse counts causing phantom references. Split
into coord_ops (0 real inverses, remove_deep2 recurses to clean
IfcProjectedCRS) and contexts (sorted parent-first so phantoms don't
become dangling references). Remove stale MakeVolume stub from
ifcopenshell_wrapper.pyi.

Generated with the assistance of an AI coding tool.
Generated with the assistance of an AI coding tool.
ItemIsASum and Quantities are exporter columns that were missing from
MAIN_CSV_HEADER_COLUMNS, causing them to be misidentified as numeric cost
value categories on re-import. Also initialise rate_cost_schedule to None
before the search loop to avoid UnboundLocalError when no match is found.

Generated with the assistance of an AI coding tool.
bd57cc8 shifted the directrix curve by -mean before sweeping, then
translated the result by -mean again instead of +mean, placing the
geometry at original - 2*mean. Negating the restore translation fixes
the position; shape size was unaffected.

cc @aothms

Generated with the assistance of an AI coding tool.
Cache all API responses at module level with sleeps between calls to
avoid hitting the bSDD rate limit. Fix test_get_class_relations to
call get_class_relations() instead of get_class_properties(uri, True).
Fix "X" and "Y" in [...] assertions which only checked "Y".

Generated with the assistance of an AI coding tool.
The bSDD API rate-limits aggressively; without retry logic the client
silently returns the 429 JSON dict, causing KeyError when callers
access expected response keys. Client.get() now retries up to 5 times,
sleeping for the Retry-After header value (defaulting to 5s).

Remove the manual time.sleep() calls from the test module now that the
client handles rate limiting automatically.

Generated with the assistance of an AI coding tool.
Move has_material_styles into the Root tool so it can be mocked in core
unit tests; the private function was calling ifcopenshell.util.element
directly, bypassing the tool layer and crashing the test.

Generated with the assistance of an AI coding tool.
Run the RSS measurement in a subprocess so the fixture file is not
already in the page cache from earlier tests (which made both deltas
read as zero). Add psutil to the CI pip install so this test is not
skipped there.

Generated with the assistance of an AI coding tool.
The retry logic alone is not sufficient: back-to-back calls can exhaust
the retry budget before the rate limit window resets. Sleep 3s between
each module-level prefetch call (the API limit is ~1 req/2s).

Generated with the assistance of an AI coding tool.
@brunopostle brunopostle changed the title Fix MergeProjects context deduplication and expand CI coverage Fix failing tests and expand CI coverage Apr 9, 2026
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