Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lib): add scene structures and Sionna compatibility #76

Merged
merged 20 commits into from
Apr 30, 2024
Merged

Conversation

jeertmans
Copy link
Owner

No description provided.

@jeertmans jeertmans added the enhancement New feature or request label Apr 10, 2024
import requests
from tqdm import tqdm

from .. import _core
Copy link
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 🐶
Two consecutive dots (DOUBLE_PUNCTUATION)
Suggestions: .,
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-periods
Rule: https://community.languagetool.org/rule/show/DOUBLE_PUNCTUATION?lang=en-US
Category: PUNCTUATION

def members(tar: tarfile.TarFile):
for member in tar.getmembers():
if (index := member.path.find("sionna/rt/scenes/")) >= 0:
member.path = member.path[index + 17 :]
Copy link
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: Path, path
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

def members(tar: tarfile.TarFile):
for member in tar.getmembers():
if (index := member.path.find("sionna/rt/scenes/")) >= 0:
member.path = member.path[index + 17 :]
Copy link
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: Path, path
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

#[serde(rename(deserialize = "@type"))]
_type: String,
#[serde(rename(deserialize = "@id"))]
id: String,
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

#[serde(rename(deserialize = "@type"))]
_type: String,
#[serde(rename(deserialize = "@id"))]
id: String,
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

Copy link
Contributor

github-actions bot commented Apr 10, 2024

Rust benchmark results:

group                                                       before                                 changes
-----                                                       ------                                 -------
complete_graph_all_paths/iter                               1.00     22.6±0.33ns 42.1 MElem/sec    1.04     23.5±0.31ns 40.5 MElem/sec
complete_graph_all_paths_array_chunks/1                     1.00     33.1±0.36ns 28.8 MElem/sec    1.01     33.4±0.52ns 28.5 MElem/sec
complete_graph_all_paths_array_chunks/10                    1.03    369.4±2.36ns 25.8 MElem/sec    1.00   359.5±13.98ns 26.5 MElem/sec
complete_graph_all_paths_array_chunks/100                   1.00      2.5±0.05µs 38.7 MElem/sec    1.01      2.5±0.04µs 38.5 MElem/sec
complete_graph_all_paths_array_chunks/1000                  1.00     22.1±0.17µs 43.1 MElem/sec    1.01     22.3±0.14µs 42.7 MElem/sec
di_graph_from_complete_graph_all_paths/iter                 1.00    228.8±1.49ns  4.2 MElem/sec    1.02    233.1±2.27ns  4.1 MElem/sec
di_graph_from_complete_graph_all_paths_array_chunks/1       1.01    243.9±2.21ns  3.9 MElem/sec    1.00    241.9±3.89ns  3.9 MElem/sec
di_graph_from_complete_graph_all_paths_array_chunks/10      1.00      2.6±0.05µs  3.6 MElem/sec    1.03      2.7±0.03µs  3.5 MElem/sec
di_graph_from_complete_graph_all_paths_array_chunks/100     1.06     26.1±0.24µs  3.7 MElem/sec    1.00     24.5±0.70µs  3.9 MElem/sec
di_graph_from_complete_graph_all_paths_array_chunks/1000    1.09    250.0±1.97µs  3.8 MElem/sec    1.00    229.8±2.18µs  4.1 MElem/sec

Copy link
Contributor

github-actions bot commented Apr 10, 2024

Python benchmark results:


------------------------------------------------- benchmark: 12 tests -------------------------------------------------
Name (time in us)                                              Mean            StdDev            OPS (Kops/s)          
-----------------------------------------------------------------------------------------------------------------------
test_generate_all_path_candidates[0-0] (0002_pgo)           73.7541 (1.0)      4.3363 (1.0)           13.5586 (1.0)    
test_generate_all_path_candidates[1-1] (0002_pgo)           74.9831 (1.02)     5.5342 (1.28)          13.3363 (0.98)   
test_generate_all_path_candidates[0-0] (0001_changes)       76.1108 (1.03)     6.0316 (1.39)          13.1387 (0.97)   
test_generate_all_path_candidates[1-1] (0001_changes)       77.5992 (1.05)     9.9776 (2.30)          12.8867 (0.95)   
test_generate_all_path_candidates[4-5] (0002_pgo)           84.9986 (1.15)     4.8542 (1.12)          11.7649 (0.87)   
test_generate_all_path_candidates[4-5] (0001_changes)       88.0458 (1.19)     5.7243 (1.32)          11.3577 (0.84)   
test_generate_all_path_candidates[0-0] (0003_before)        95.1995 (1.29)     7.3177 (1.69)          10.5043 (0.77)   
test_generate_all_path_candidates[1-1] (0003_before)        95.0552 (1.29)     7.7277 (1.78)          10.5202 (0.78)   
test_generate_all_path_candidates[10-3] (0002_pgo)          94.7674 (1.28)     6.1259 (1.41)          10.5521 (0.78)   
test_generate_all_path_candidates[10-3] (0001_changes)      98.5674 (1.34)     5.9042 (1.36)          10.1453 (0.75)   
test_generate_all_path_candidates[4-5] (0003_before)       106.7316 (1.45)     5.4752 (1.26)           9.3693 (0.69)   
test_generate_all_path_candidates[10-3] (0003_before)      118.0957 (1.60)     8.4233 (1.94)           8.4677 (0.62)   
-----------------------------------------------------------------------------------------------------------------------

-------------------------------- benchmark 'complete_graph_all_paths': 3 tests --------------------------------
Name (time in ns)                                    Mean              StdDev            OPS (Mops/s)          
---------------------------------------------------------------------------------------------------------------
test_complete_graph_all_paths (0002_pgo)         354.7513 (1.0)      627.5120 (6.33)           2.8189 (1.0)    
test_complete_graph_all_paths (0001_changes)     410.6338 (1.16)      99.1700 (1.0)            2.4353 (0.86)   
test_complete_graph_all_paths (0003_before)      417.3856 (1.18)     681.6440 (6.87)           2.3959 (0.85)   
---------------------------------------------------------------------------------------------------------------

----------------------------------- benchmark 'complete_graph_all_paths_array_chunks': 12 tests ------------------------------------
Name (time in ns)                                                       Mean                StdDev            OPS (Mops/s)          
------------------------------------------------------------------------------------------------------------------------------------
test_complete_graph_all_paths_array_chunks[1000] (0002_pgo)          28.7026 (1.0)        143.8026 (1.69)          34.8401 (1.0)    
test_complete_graph_all_paths_array_chunks[1000] (0001_changes)      30.7563 (1.07)       134.2438 (1.58)          32.5136 (0.93)   
test_complete_graph_all_paths_array_chunks[1000] (0003_before)       30.2735 (1.05)       127.7914 (1.51)          33.0321 (0.95)   
test_complete_graph_all_paths_array_chunks[100] (0002_pgo)           37.1073 (1.29)        84.8690 (1.0)           26.9489 (0.77)   
test_complete_graph_all_paths_array_chunks[100] (0001_changes)       39.6268 (1.38)       177.8674 (2.10)          25.2354 (0.72)   
test_complete_graph_all_paths_array_chunks[100] (0003_before)        40.3293 (1.41)       282.3697 (3.33)          24.7959 (0.71)   
test_complete_graph_all_paths_array_chunks[10] (0002_pgo)            71.8147 (2.50)       264.6128 (3.12)          13.9247 (0.40)   
test_complete_graph_all_paths_array_chunks[10] (0001_changes)        76.8565 (2.68)       192.6661 (2.27)          13.0113 (0.37)   
test_complete_graph_all_paths_array_chunks[10] (0003_before)         78.5694 (2.74)       278.1894 (3.28)          12.7276 (0.37)   
test_complete_graph_all_paths_array_chunks[1] (0002_pgo)            315.3531 (10.99)      969.0743 (11.42)          3.1710 (0.09)   
test_complete_graph_all_paths_array_chunks[1] (0001_changes)        362.4057 (12.63)    1,859.7902 (21.91)          2.7593 (0.08)   
test_complete_graph_all_paths_array_chunks[1] (0003_before)         376.6071 (13.12)    1,325.0829 (15.61)          2.6553 (0.08)   
------------------------------------------------------------------------------------------------------------------------------------

-------------------------------------- benchmark 'di_graph_complete_graph_all_paths_array_chunks': 12 tests --------------------------------------
Name (time in ns)                                                                     Mean                StdDev            OPS (Mops/s)          
--------------------------------------------------------------------------------------------------------------------------------------------------
test_di_graph_from_complete_graph_all_paths_array_chunks[1000] (0002_pgo)         243.1873 (1.0)         24.9695 (3.44)           4.1121 (1.0)    
test_di_graph_from_complete_graph_all_paths_array_chunks[100] (0001_changes)      279.1815 (1.15)        59.8696 (8.26)           3.5819 (0.87)   
test_di_graph_from_complete_graph_all_paths_array_chunks[100] (0002_pgo)          258.0161 (1.06)        24.0455 (3.32)           3.8757 (0.94)   
test_di_graph_from_complete_graph_all_paths_array_chunks[1000] (0001_changes)     250.0757 (1.03)         7.2492 (1.0)            3.9988 (0.97)   
test_di_graph_from_complete_graph_all_paths_array_chunks[1000] (0003_before)      257.1371 (1.06)        31.5531 (4.35)           3.8890 (0.95)   
test_di_graph_from_complete_graph_all_paths_array_chunks[100] (0003_before)       269.4632 (1.11)        24.6993 (3.41)           3.7111 (0.90)   
test_di_graph_from_complete_graph_all_paths_array_chunks[10] (0002_pgo)           326.7331 (1.34)        95.3397 (13.15)          3.0606 (0.74)   
test_di_graph_from_complete_graph_all_paths_array_chunks[10] (0001_changes)       330.0302 (1.36)       122.0412 (16.84)          3.0300 (0.74)   
test_di_graph_from_complete_graph_all_paths_array_chunks[10] (0003_before)        342.7899 (1.41)       129.4468 (17.86)          2.9172 (0.71)   
test_di_graph_from_complete_graph_all_paths_array_chunks[1] (0002_pgo)            596.3209 (2.45)     1,437.6842 (198.32)         1.6769 (0.41)   
test_di_graph_from_complete_graph_all_paths_array_chunks[1] (0001_changes)        649.3659 (2.67)       851.5878 (117.47)         1.5400 (0.37)   
test_di_graph_from_complete_graph_all_paths_array_chunks[1] (0003_before)         659.0048 (2.71)       451.6286 (62.30)          1.5174 (0.37)   
--------------------------------------------------------------------------------------------------------------------------------------------------

--------------------------------- benchmark 'di_graph_from_complete_graph_all_paths': 3 tests ---------------------------------
Name (time in ns)                                                  Mean                StdDev            OPS (Mops/s)          
-------------------------------------------------------------------------------------------------------------------------------
test_di_graph_from_complete_graph_all_paths (0002_pgo)         582.1716 (1.0)      1,146.8585 (1.74)           1.7177 (1.0)    
test_di_graph_from_complete_graph_all_paths (0001_changes)     616.5086 (1.06)       783.6844 (1.19)           1.6220 (0.94)   
test_di_graph_from_complete_graph_all_paths (0003_before)      633.9289 (1.09)       660.7577 (1.0)            1.5775 (0.92)   
-------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

"download_sionna_scenes",
"get_sionna_scene",
"list_sionna_scenes",
"SionnaScene",
Copy link
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 🐶
Did you just mean “,” or “)”? (COMMA_PERIOD[1])
Suggestions: ,, )
Rule: https://community.languagetool.org/rule/show/COMMA_PERIOD?lang=en-US&subId=1
Category: PUNCTUATION

#[pyclass(get_all)]
#[derive(Clone, Debug, Deserialize)]
struct SionnaScene {
/// A mapping between material ids and actual
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: IDs
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

/// Currently, only BSDF materials are used.
#[serde(rename = "bsdf", deserialize_with = "deserialize_materials")]
materials: HashMap<String, Material>,
/// A mapping between shape ids and actual
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: IDs
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING


for material in v {
if let Some(material) = map.insert(material.id.clone(), material) {
log::warn!("duplicate material id, cannot insert '{:?}'", material);
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING


for shape in v {
if let Some(shape) = map.insert(shape.id.clone(), shape) {
log::warn!("duplicate shape id, cannot insert '{:?}'", shape);
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

/// E.g., `ply` for Stanford PLY format.
#[serde(rename(deserialize = "@type"))]
r#type: String,
/// The shape id.
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

/// This path is relative to the scene config file.
#[serde(rename(deserialize = "string"), deserialize_with = "deserialize_file")]
file: String,
/// The material id attached to this object.
Copy link
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 🐶
The abbreviation for “identification” is spelled all-uppercase, or did you mean “I’d” (= I would/had)? (ID_CASING[1])
Suggestions: I'd, ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=1
Category: CASING

#[derive(Deserialize)]
struct MaterialId {
#[serde(rename(deserialize = "@id"))]
id: String,
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

format!("{:?}", self)
}

/// Load a Sionna scene from a XML file.
Copy link
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 🐶
Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Suggestions: an
URL: https://languagetool.org/insights/post/indefinite-articles/
Rule: https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-US
Category: MISC

#[serde(rename(deserialize = "@type"))]
pub(crate) r#type: String,
#[serde(rename(deserialize = "@id"))]
pub(crate) id: String,
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

///
/// It should be unique (in a given scene).
#[serde(rename(deserialize = "@id"))]
pub(crate) id: String,
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING


#[pymethods]
impl TriangleScene {
/// Load a triangle scene from a XML file.
Copy link
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 🐶
Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Suggestions: an
URL: https://languagetool.org/insights/post/indefinite-articles/
Rule: https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-US
Category: MISC


let mut meshes = HashMap::with_capacity(sionna.shapes.len());

for (id, shape) in sionna.shapes.into_iter() {
Copy link
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 🐶
This abbreviation for “identification” is spelled all-uppercase. (ID_CASING[2])
Suggestions: ID
Rule: https://community.languagetool.org/rule/show/ID_CASING?lang=en-US&subId=2
Category: CASING

"source": [
"from differt.scene.sionna import get_sionna_scene, download_sionna_scenes\n",
"from differt.scene.triangle_scene import TriangleScene\n",
"from differt.plotting import reuse\n",
Copy link
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


TODO: document this.
"""
old_backend = DEFAULT_BACKEND
Copy link
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 🐶
Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Suggestions: BACKEND
Rule: https://community.languagetool.org/rule/show/ENGLISH_WORD_REPEAT_RULE?lang=en-US
Category: MISC

from beartype import beartype as typechecker
from jaxtyping import Array, Float, jaxtyped

from .. import _core
Copy link
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 🐶
Two consecutive dots (DOUBLE_PUNCTUATION)
Suggestions: .,
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-periods
Rule: https://community.languagetool.org/rule/show/DOUBLE_PUNCTUATION?lang=en-US
Category: PUNCTUATION

from jaxtyping import Array, Float, jaxtyped

from .. import _core
from ..geometry.triangle_mesh import TriangleMesh
Copy link
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 🐶
Two consecutive dots (DOUBLE_PUNCTUATION)
Suggestions: .,
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-periods
Rule: https://community.languagetool.org/rule/show/DOUBLE_PUNCTUATION?lang=en-US
Category: PUNCTUATION


from .. import _core
from ..geometry.triangle_mesh import TriangleMesh
from ..plotting import draw_markers
Copy link
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 🐶
Two consecutive dots (DOUBLE_PUNCTUATION)
Suggestions: .,
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-periods
Rule: https://community.languagetool.org/rule/show/DOUBLE_PUNCTUATION?lang=en-US
Category: PUNCTUATION

@classmethod
def load_xml(cls, file: str) -> "TriangleScene":
"""
Load a triangle scene from a XML file.
Copy link
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 🐶
Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Suggestions: an
URL: https://languagetool.org/insights/post/indefinite-articles/
Rule: https://community.languagetool.org/rule/show/EN_A_VS_AN?lang=en-US
Category: MISC

"list_sionna_scenes",
"SionnaScene",
"Shape",
"Material",
Copy link
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 🐶
Did you just mean “,” or “)”? (COMMA_PERIOD[1])
Suggestions: ,, )
Rule: https://community.languagetool.org/rule/show/COMMA_PERIOD?lang=en-US&subId=1
Category: PUNCTUATION


from .. import _core
from ..geometry.triangle_mesh import TriangleMesh
from ..plotting import draw_markers, reuse
Copy link
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 🐶
Two consecutive dots (DOUBLE_PUNCTUATION)
Suggestions: .,
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-periods
Rule: https://community.languagetool.org/rule/show/DOUBLE_PUNCTUATION?lang=en-US
Category: PUNCTUATION

},
}
}
}

#[pymethods]
impl TriangleMesh {
pub(crate) fn append(&mut self, other: &mut Self) {
let offset = self.vertices.len();
self.vertices.append(&mut other.vertices);
Copy link
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: Vertices, vertices
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING


self.triangles.reserve(other.triangles.len());

for (v0, v1, v2) in &other.triangles {
Copy link
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: Triangles, triangles
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

.map(|(id, range)| {
(
id.clone(),
PySlice::new(py, range.start as _, range.end as _, 1),
Copy link
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: Start, start
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

.map(|(id, range)| {
(
id.clone(),
PySlice::new(py, range.start as _, range.end as _, 1),
Copy link
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: End, end
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

};
mesh.append(&mut other_mesh);
let end = mesh.triangles.len();
mesh_ids.insert(id, start..end);
Copy link
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 🐶
Two consecutive dots (DOUBLE_PUNCTUATION)
Suggestions: .,
URL: https://languagetool.org/insights/post/punctuation-guide/#what-are-periods
Rule: https://community.languagetool.org/rule/show/DOUBLE_PUNCTUATION?lang=en-US
Category: PUNCTUATION

.map(|(id, range)| {
(
id.clone(),
PySlice::new_bound(py, range.start as _, range.end as _, 1),
Copy link
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: Start, start
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

.map(|(id, range)| {
(
id.clone(),
PySlice::new_bound(py, range.start as _, range.end as _, 1),
Copy link
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: End, end
Rule: https://community.languagetool.org/rule/show/LC_AFTER_PERIOD?lang=en-US&subId=1
Category: CASING

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 73.91304% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 84.23%. Comparing base (d37d91d) to head (7b422a0).

❗ Current head 7b422a0 differs from pull request most recent head feeae8c. Consider uploading reports for the commit feeae8c to get more accurate results

Files Patch % Lines
python/differt/plotting/_utils.py 58.69% 19 Missing ⚠️
python/differt/scene/triangle_scene.py 68.29% 13 Missing ⚠️
python/differt/scene/sionna.py 91.11% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
- Coverage   86.71%   84.23%   -2.49%     
==========================================
  Files          18       20       +2     
  Lines         572      704     +132     
==========================================
+ Hits          496      593      +97     
- Misses         76      111      +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jeertmans jeertmans merged commit 410191b into main Apr 30, 2024
16 of 44 checks passed
@jeertmans jeertmans deleted the scene branch April 30, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant