Skip to content

refactor(lib): merge rt, geometry and scene submodules into geometry#498

Open
jeertmans wants to merge 1 commit into
mainfrom
refactor-geometry
Open

refactor(lib): merge rt, geometry and scene submodules into geometry#498
jeertmans wants to merge 1 commit into
mainfrom
refactor-geometry

Conversation

@jeertmans

Copy link
Copy Markdown
Owner

Closes #497.

@jeertmans jeertmans added enhancement New feature or request python Changes Python code labels Jul 15, 2026
@jeertmans jeertmans added the rust Changes Rust code label Jul 15, 2026
@github-actions github-actions Bot added the tests Changes tests label Jul 15, 2026
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.84615% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.58%. Comparing base (e694a0f) to head (c1d56cb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
differt/src/differt/geometry/_utils.py 98.98% 2 Missing ⚠️
differt/src/differt/em/_antenna.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #498      +/-   ##
==========================================
+ Coverage   88.55%   88.58%   +0.02%     
==========================================
  Files          33       32       -1     
  Lines        4012     4012              
==========================================
+ Hits         3553     3554       +1     
+ Misses        459      458       -1     

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

@jeertmans
jeertmans force-pushed the refactor-geometry branch from ea1e600 to 71d5f02 Compare July 16, 2026 13:10
@jeertmans
jeertmans force-pushed the refactor-geometry branch from 71d5f02 to 3df7022 Compare July 17, 2026 13:03
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci Continuous integration (tests, lints, ...) benchmarks Changes benchmarks dependencies Related to the project dependencies labels Jul 17, 2026
@jeertmans
jeertmans force-pushed the refactor-geometry branch from 3df7022 to 844d476 Compare July 17, 2026 13:23
@codspeed-hq

codspeed-hq Bot commented Jul 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 15 untouched benchmarks
⏩ 4 skipped benchmarks1


Comparing refactor-geometry (269a76b) with main (0cfd8b5)

Open in CodSpeed

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Comment thread differt/src/differt/geometry/_utils.py Outdated
... tx = jnp.array([0.0, 0.0, 0.0])
... key = jax.random.key(1234)
... draw_markers(tx.reshape(-1, 3), labels=["tx"], showlegend=False)
... _ = draw_markers(tx.reshape(-1, 3), labels=["tx"], showlegend=False)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

I don't think that we should promote this pattern, so let's revert back to not using any variable assignment. If needed, let's skip doctests. Applies here an everywhere else.

... center = mesh.bounding_box.mean(axis=0)
... mesh = mesh.translate(5 * (center - tx)).set_face_colors(color)
... mesh.plot(opacity=0.5)
... mesh = mesh.translate(5 * (center - tx)).set_face_colors(

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Maybe we should document the difference between [1,0] rgba and [0,255] RGBA, as we maybe support both.

Comment thread differt/tests/test_integration.py Outdated
o3d_mesh = o3d.io.read_triangle_mesh(knot_mesh.path).translate([50, 20, 10])

o3d_mesh = o3d.t.geometry.Mesh.from_legacy(o3d_mesh)
o3d_mesh = o3d.t.geometry.TriangleMesh.from_legacy(o3d_mesh)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

I don't remember why we even needed to do this, but we should maybe remove this line entirely.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Comment thread CHANGELOG.md Outdated
@@ -58,6 +58,8 @@ with one *slight* but **important** difference:
- **Breaking change**: Mask and intersection type arrays of path classes are no longer optional (by <gh-user:jeertmans>, in <gh-pr:491>).
- **Breaking change**: Renamed `TriangleMesh` to {class}`Mesh<differt.geometry.Mesh>` and `TriangleScene` to {class}`Scene<differt.scene.Scene>` across the codebase. Deprecated aliases are provided for backwards compatibility, raising a `DeprecationWarning` when used (by <gh-user:jeertmans>, in <gh-issue:496>).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Suggested change

"outputs": [],
"source": [
"from differt.scene import Scene\n",
"from differt.geometry import Scene\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Geometry, geometry
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

"from differt.plotting import draw_paths, set_backend\n",
"from differt.rt import fermat_path_on_linear_objects\n",
"from differt.scene import Scene"
"from differt.geometry import (\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Geometry, geometry
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

" assemble_path,\n",
" fermat_path_on_linear_objects,\n",
")\n",
"from differt.plotting import draw_paths, set_backend"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Plotting, plotting
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

"outputs": [],
"source": [
"from differt.scene import download_sionna_scenes, get_sionna_scene\n",
"from differt.geometry import download_sionna_scenes, get_sionna_scene\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Geometry, geometry
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

"\n",
"import jax\n",
"from differt.rt import ray_intersect_triangle\n",
"from differt.geometry import ray_intersect_triangle\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Geometry, geometry
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

"import equinox as eqx\n",
"import jax.numpy as jnp\n",
"from differt.scene import (\n",
"from differt.geometry import (\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Geometry, geometry
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

"import jax.numpy as jnp\n",
"from differt.geometry import Mesh\n",
"from differt.scene import Scene\n",
"from differt.geometry import Mesh, Scene\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Geometry, geometry
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

"from differt.scene import (\n",
" Scene,\n",
")"
"from differt.plotting import draw_image, reuse, set_backend"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Plotting, plotting
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING


```python
from differt.scene import ExhaustivePathTracer
from differt.geometry import ExhaustivePathTracer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Geometry, geometry
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING


```python
from differt.scene import SBRPathLauncher
from differt.geometry import SBRPathLauncher

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[LanguageTool] reported by reviewdog 🐶
If a new sentence starts here, add a space and start with an uppercase letter. (LC_AFTER_PERIOD[1])
Suggestions: Geometry, geometry
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

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

Labels

benchmarks Changes benchmarks ci Continuous integration (tests, lints, ...) dependencies Related to the project dependencies documentation Improvements or additions to documentation enhancement New feature or request python Changes Python code rust Changes Rust code tests Changes tests visualization Related to visualization utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Merge rt, geometry and scene submodules into one single submodule

1 participant