From 5069ae3caeb27fedf993a559ff62345c8cd7626f Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 22 Sep 2023 12:48:23 +0200 Subject: [PATCH 1/5] introduce zombie_todos.py --- scripts/lint.py | 1 + scripts/requirements-dev.txt | 1 + scripts/zombie_todos.py | 122 +++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100755 scripts/zombie_todos.py diff --git a/scripts/lint.py b/scripts/lint.py index fb9c5b82bb26..0e18c2e44ab9 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -625,6 +625,7 @@ def main() -> None: "./crates/re_types_builder/src/reflection.rs", # auto-generated "./examples/rust/objectron/src/objectron.rs", # auto-generated "./scripts/lint.py", # we contain all the patterns we are linting against + "./scripts/zombie_todos.py", "./web_viewer/re_viewer.js", # auto-generated by wasm_bindgen "./web_viewer/re_viewer_debug.js", # auto-generated by wasm_bindgen } diff --git a/scripts/requirements-dev.txt b/scripts/requirements-dev.txt index 4be81c877cfd..bef6b944e98f 100644 --- a/scripts/requirements-dev.txt +++ b/scripts/requirements-dev.txt @@ -12,3 +12,4 @@ tqdm requests gitignore_parser # handle .gitignore python-frontmatter==1.0.0 +aiohttp diff --git a/scripts/zombie_todos.py b/scripts/zombie_todos.py new file mode 100755 index 000000000000..4637190eef92 --- /dev/null +++ b/scripts/zombie_todos.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python +from __future__ import annotations + +import argparse +import asyncio +import os +import re + +import aiohttp +from gitignore_parser import parse_gitignore + +# --- + +parser = argparse.ArgumentParser(description="Hunt down zombie TODOs.") +parser.add_argument("--token", dest="GITHUB_TOKEN", help="Github token to fetch issues", required=True) + +args = parser.parse_args() + +# --- Fetch issues from Github API --- + +headers = { + "Accept": "application/vnd.github+json", + "Authorization": f"Bearer {args.GITHUB_TOKEN}", + "X-GitHub-Api-Version": "2022-11-28", +} + +issues = [] + +repo_owner = "rerun-io" +repo_name = "rerun" +issue_state = "closed" +per_page = 100 + + +async def fetch_issue_page(session, page): + url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/issues?state={issue_state}&per_page={per_page}&page={page}" + async with session.get(url, headers=headers) as response: + if response.status != 200: + print(f"Error: Failed to fetch issues from page {page}. Status code: {response.status}") + return [] + data = await response.json() + return [issue["number"] for issue in data] + + +async def fetch_total_number_of_issue_pages(session): + url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/issues?state={issue_state}&per_page={per_page}" + async with session.get(url, headers=headers) as response: + if response.status != 200: + print(f"Error: Failed to fetch total pages. Status code: {response.status}") + return None + link_header = response.headers.get("Link") + if link_header: + match = re.search(r'page=(\d+)>; rel="last"', link_header) + if match: + return int(match.group(1)) + return None + + +async def fetch_issues(): + async with aiohttp.ClientSession() as session: + total_pages = await fetch_total_number_of_issue_pages(session) + if total_pages is None: + print("Failed to determine the number of pages.") + return + + tasks = [fetch_issue_page(session, page) for page in range(1, total_pages + 1)] + issue_lists = await asyncio.gather(*tasks) + issues.extend(issue for issue_list in issue_lists for issue in issue_list) + + +# --- Check files for zombie TODOs --- + + +internal_issue_number_pattern = re.compile(r"TODO\((?:#(\d+))(?:,\s*(?:#(\d+)))*\)") + + +def check_file(path: str) -> None: + closed_issues = set(issues) + with open(path) as f: + for i, line in enumerate(f.readlines()): + matches = internal_issue_number_pattern.search(line) + if matches is not None: + for match in matches.groups(): + if match is not None and int(match) in closed_issues: + print(f"{path}+{i}: {line.strip()}") + + +# --- + + +def main() -> None: + asyncio.run(fetch_issues()) + + script_dirpath = os.path.dirname(os.path.realpath(__file__)) + root_dirpath = os.path.abspath(f"{script_dirpath}/..") + os.chdir(root_dirpath) + + extensions = ["c", "cpp", "fbs", "h", "hpp", "html", "js", "md", "py", "rs", "sh", "toml", "txt", "wgsl", "yml"] + + exclude_paths = { + "./CODE_STYLE.md", + "./scripts/lint.py", + "./scripts/zombie_todos.py", + } + + should_ignore = parse_gitignore(".gitignore") # TODO(emilk): parse all .gitignore files, not just top-level + + for root, dirs, files in os.walk(".", topdown=True): + dirs[:] = [d for d in dirs if not should_ignore(d)] + + for filename in files: + extension = filename.split(".")[-1] + if extension in extensions: + filepath = os.path.join(root, filename) + if should_ignore(filepath): + continue + if filepath not in exclude_paths: + check_file(filepath) + + +if __name__ == "__main__": + main() From 678511c9b5189902a32515edc17a2cace486a56b Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 22 Sep 2023 13:05:21 +0200 Subject: [PATCH 2/5] ci step --- .github/workflows/reusable_checks.yml | 4 ++++ scripts/ci/requirements.txt | 7 +++++-- scripts/lint.py | 1 + scripts/requirements-dev.txt | 1 - 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_checks.yml b/.github/workflows/reusable_checks.yml index 97e6887ea0e6..8d5a477ef9bc 100644 --- a/.github/workflows/reusable_checks.yml +++ b/.github/workflows/reusable_checks.yml @@ -287,6 +287,10 @@ jobs: run: | ./scripts/lint.py + - name: Check for zombie TODOs + run: | + ./scripts/zombie_todos.py --token ${{ secrets.GITHUB_TOKEN }} + - name: Check for too large files run: | ./scripts/ci/check_large_files.sh diff --git a/scripts/ci/requirements.txt b/scripts/ci/requirements.txt index 061cbed7d472..39f2fdf7e52c 100644 --- a/scripts/ci/requirements.txt +++ b/scripts/ci/requirements.txt @@ -4,11 +4,14 @@ -r ../../rerun_py/requirements-lint.txt Jinja2==3.1.2 +Pillow==10.0.0 PyGithub==1.59.0 + +aiohttp==3.8.5 colorama==0.4.6 +gitignore-parser==0.1.4 google-cloud-storage==2.9.0 packaging==23.1 +python-frontmatter==1.0.0 requests>=2.31,<3 tomlkit==0.11.8 -python-frontmatter==1.0.0 -Pillow==10.0.0 diff --git a/scripts/lint.py b/scripts/lint.py index 0e18c2e44ab9..a6de8316c639 100755 --- a/scripts/lint.py +++ b/scripts/lint.py @@ -621,6 +621,7 @@ def main() -> None: extensions = ["c", "cpp", "fbs", "h", "hpp" "html", "js", "md", "py", "rs", "sh", "toml", "txt", "wgsl", "yml"] exclude_paths = { + "./.github/workflows/reusable_checks.yml", # zombie TODO hunting job "./CODE_STYLE.md", "./crates/re_types_builder/src/reflection.rs", # auto-generated "./examples/rust/objectron/src/objectron.rs", # auto-generated diff --git a/scripts/requirements-dev.txt b/scripts/requirements-dev.txt index bef6b944e98f..4be81c877cfd 100644 --- a/scripts/requirements-dev.txt +++ b/scripts/requirements-dev.txt @@ -12,4 +12,3 @@ tqdm requests gitignore_parser # handle .gitignore python-frontmatter==1.0.0 -aiohttp From cc21b3f7b1e85f1b54b5e6c1b9beb305932113b7 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 22 Sep 2023 13:17:48 +0200 Subject: [PATCH 3/5] throw an actual error please --- scripts/zombie_todos.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/zombie_todos.py b/scripts/zombie_todos.py index 4637190eef92..8184861f49c1 100755 --- a/scripts/zombie_todos.py +++ b/scripts/zombie_todos.py @@ -74,7 +74,9 @@ async def fetch_issues(): internal_issue_number_pattern = re.compile(r"TODO\((?:#(\d+))(?:,\s*(?:#(\d+)))*\)") -def check_file(path: str) -> None: +# Returns true if the file is OK. +def check_file(path: str) -> bool: + ok = True closed_issues = set(issues) with open(path) as f: for i, line in enumerate(f.readlines()): @@ -83,6 +85,8 @@ def check_file(path: str) -> None: for match in matches.groups(): if match is not None and int(match) in closed_issues: print(f"{path}+{i}: {line.strip()}") + ok &= False + return ok # --- @@ -105,6 +109,7 @@ def main() -> None: should_ignore = parse_gitignore(".gitignore") # TODO(emilk): parse all .gitignore files, not just top-level + ok = True for root, dirs, files in os.walk(".", topdown=True): dirs[:] = [d for d in dirs if not should_ignore(d)] @@ -115,7 +120,10 @@ def main() -> None: if should_ignore(filepath): continue if filepath not in exclude_paths: - check_file(filepath) + ok &= check_file(filepath) + + if not ok: + raise ValueError("Clean your zombies!") if __name__ == "__main__": From 67932548cdfda2bf5179a337034760627914196a Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 22 Sep 2023 16:36:53 +0200 Subject: [PATCH 4/5] fix all zombie issues --- crates/re_arrow_store/src/store.rs | 3 --- crates/re_arrow_store/src/store_gc.rs | 3 --- crates/re_arrow_store/src/store_write.rs | 2 -- crates/re_components/src/load_file.rs | 2 +- crates/re_log_types/src/data_cell.rs | 3 --- crates/re_renderer/src/point_cloud_builder.rs | 2 -- crates/re_renderer/src/renderer/lines.rs | 4 ++-- crates/re_renderer/src/renderer/point_cloud.rs | 2 +- crates/re_sdk/src/recording_stream.rs | 2 +- .../src/contexts/transform_context.rs | 4 ++-- crates/re_space_view_spatial/src/parts/assets.rs | 4 ++-- crates/re_space_view_spatial/src/ui_2d.rs | 2 +- .../definitions/rerun/archetypes/points2d.fbs | 3 --- crates/re_types/source_hash.txt | 2 +- crates/re_types_builder/src/codegen/cpp/mod.rs | 5 ----- docs/code-examples/clear_recursive.py | 2 +- docs/code-examples/clear_simple.py | 2 +- docs/code-examples/segmentation_image_simple.py | 3 +-- docs/content/reference/viewer/viewport.md | 2 -- examples/python/arkit_scenes/main.py | 12 ++++++------ rerun_py/docs/gen_common_index.py | 2 -- rerun_py/rerun_sdk/rerun/_baseclasses.py | 2 +- rerun_py/rerun_sdk/rerun/archetypes/clear.py | 4 ++-- .../rerun_sdk/rerun/archetypes/segmentation_image.py | 3 +-- tests/roundtrips.py | 12 ++++++------ tests/rust/test_api/src/main.rs | 2 +- 26 files changed, 31 insertions(+), 58 deletions(-) diff --git a/crates/re_arrow_store/src/store.rs b/crates/re_arrow_store/src/store.rs index 945ffe431bfc..baf55f9bbcf5 100644 --- a/crates/re_arrow_store/src/store.rs +++ b/crates/re_arrow_store/src/store.rs @@ -371,8 +371,6 @@ fn datastore_internal_repr() { /// ```text /// cargo test -p re_arrow_store -- --nocapture datastore_internal_repr /// ``` -// -// TODO(#1524): inline visualization once it's back to a manageable state #[derive(Debug, Clone)] pub struct IndexedTable { /// The timeline this table operates in, for debugging purposes. @@ -539,7 +537,6 @@ impl Default for IndexedBucketInner { /// cargo test -p re_arrow_store -- --nocapture datastore_internal_repr /// ``` // -// TODO(#1524): inline visualization once it's back to a manageable state // TODO(#1807): timeless should be row-id ordered too then #[derive(Debug, Clone)] pub struct PersistentIndexedTable { diff --git a/crates/re_arrow_store/src/store_gc.rs b/crates/re_arrow_store/src/store_gc.rs index c70143ac2228..6558f8a6fc24 100644 --- a/crates/re_arrow_store/src/store_gc.rs +++ b/crates/re_arrow_store/src/store_gc.rs @@ -111,9 +111,6 @@ impl DataStore { // datastructures should be able to purge themselves based solely off of // [`DataStore::oldest_time_per_timeline`]. // - // TODO(#1803): The GC should be aware of latest-at semantics and make sure they are upheld - // when purging data. - // // TODO(#1823): Workload specific optimizations. pub fn gc(&mut self, options: GarbageCollectionOptions) -> (Deleted, DataStoreStats) { re_tracing::profile_function!(); diff --git a/crates/re_arrow_store/src/store_write.rs b/crates/re_arrow_store/src/store_write.rs index 102a0ff6009a..6d539b09d1a5 100644 --- a/crates/re_arrow_store/src/store_write.rs +++ b/crates/re_arrow_store/src/store_write.rs @@ -545,8 +545,6 @@ impl IndexedBucket { /// ```text /// cargo test -p re_arrow_store -- --nocapture datastore_internal_repr /// ``` - // - // TODO(#1524): inline visualization once it's back to a manageable state fn split(&self) -> Option<(TimeInt, Self)> { let Self { timeline, diff --git a/crates/re_components/src/load_file.rs b/crates/re_components/src/load_file.rs index ff98dffcf5a1..c874ae29edf6 100644 --- a/crates/re_components/src/load_file.rs +++ b/crates/re_components/src/load_file.rs @@ -143,7 +143,7 @@ pub fn data_cells_from_mesh_file_contents( bytes: Vec, format: crate::MeshFormat, ) -> Result, FromFileError> { - // TODO(#2788): mesh indicator + // TODO(#3354): mesh indicator let mesh = crate::EncodedMesh3D { format, bytes: bytes.into(), diff --git a/crates/re_log_types/src/data_cell.rs b/crates/re_log_types/src/data_cell.rs index 2e61ab8f7055..b13d9a708dd8 100644 --- a/crates/re_log_types/src/data_cell.rs +++ b/crates/re_log_types/src/data_cell.rs @@ -276,9 +276,6 @@ impl DataCell { // --- /// Builds an empty `DataCell` from a native component type. - // - // TODO(#1595): do keep in mind there's a future not too far away where components become a - // `(component, type)` tuple kinda thing. #[inline] pub fn from_native_empty() -> Self { Self::from_arrow_empty(C::name(), C::arrow_field().data_type) diff --git a/crates/re_renderer/src/point_cloud_builder.rs b/crates/re_renderer/src/point_cloud_builder.rs index c8b424b6f3a1..9c39a6d1e68b 100644 --- a/crates/re_renderer/src/point_cloud_builder.rs +++ b/crates/re_renderer/src/point_cloud_builder.rs @@ -155,8 +155,6 @@ impl<'a> PointCloudBatchBuilder<'a> { /// Will add all positions. /// Missing radii will default to `Size::AUTO`. /// Missing colors will default to white. - /// - /// TODO(#957): Clamps number of points to the allowed per-builder maximum. #[inline] pub fn add_points( mut self, diff --git a/crates/re_renderer/src/renderer/lines.rs b/crates/re_renderer/src/renderer/lines.rs index f5ef9ef0b4cc..0517b3ebc987 100644 --- a/crates/re_renderer/src/renderer/lines.rs +++ b/crates/re_renderer/src/renderer/lines.rs @@ -356,13 +356,13 @@ const LINE_STRIP_TEXTURE_SIZE: u32 = 256; // 256 x 256 x vec2 == 0.5MiB, 65 impl LineDrawData { /// Total maximum number of line vertices per [`LineDrawData`]. /// - /// TODO(#957): Get rid of this limit!. + /// TODO(#3076): Get rid of this limit!. pub const MAX_NUM_VERTICES: usize = (POSITION_TEXTURE_SIZE * POSITION_TEXTURE_SIZE - 2) as usize; // Subtract sentinels /// Total maximum number of line strips per [`LineDrawData`]. /// - /// TODO(#957): Get rid of this limit!. + /// TODO(#3076): Get rid of this limit!. pub const MAX_NUM_STRIPS: usize = (LINE_STRIP_TEXTURE_SIZE * LINE_STRIP_TEXTURE_SIZE) as usize; /// Transforms and uploads line strip data to be consumed by gpu. diff --git a/crates/re_renderer/src/renderer/point_cloud.rs b/crates/re_renderer/src/renderer/point_cloud.rs index 25247f89b167..b75c114871d6 100644 --- a/crates/re_renderer/src/renderer/point_cloud.rs +++ b/crates/re_renderer/src/renderer/point_cloud.rs @@ -169,7 +169,7 @@ const DATA_TEXTURE_SIZE: u32 = 2048; // 2ki x 2ki = 4 Mi = 80 MiB impl PointCloudDrawData { /// Maximum number of vertices per [`PointCloudDrawData`]. /// - /// TODO(#957): Get rid of this limit!. + /// TODO(#3076): Get rid of this limit!. pub const MAX_NUM_POINTS: usize = (DATA_TEXTURE_SIZE * DATA_TEXTURE_SIZE) as usize; /// Transforms and uploads point cloud data to be consumed by gpu. diff --git a/crates/re_sdk/src/recording_stream.rs b/crates/re_sdk/src/recording_stream.rs index 4008286d52c9..2e84a9f174a1 100644 --- a/crates/re_sdk/src/recording_stream.rs +++ b/crates/re_sdk/src/recording_stream.rs @@ -711,7 +711,7 @@ impl RecordingStream { ) }); - // TODO(#1629): unsplit splats once new data cells are in + // TODO(#1893): unsplit splats once new data cells are in let splatted = (!splatted.is_empty()).then(|| { splatted.push(DataCell::from_native([InstanceKey::SPLAT])); DataRow::from_cells(RowId::random(), timepoint, ent_path, 1, splatted) diff --git a/crates/re_space_view_spatial/src/contexts/transform_context.rs b/crates/re_space_view_spatial/src/contexts/transform_context.rs index b8338b69af0b..6ea1dde8cf7c 100644 --- a/crates/re_space_view_spatial/src/contexts/transform_context.rs +++ b/crates/re_space_view_spatial/src/contexts/transform_context.rs @@ -130,7 +130,7 @@ impl ViewContextSystem for TransformContext { ¤t_tree.path, &entity_db.data_store, &time_query, - // TODO(#1988): See comment in transform_at. This is a workaround for precision issues + // TODO(#1025): See comment in transform_at. This is a workaround for precision issues // and the fact that there is no meaningful image plane distance for 3D->2D views. |_| 500.0, &mut encountered_pinhole, @@ -330,7 +330,7 @@ fn transform_at( // Above calculation is nice for a certain kind of visualizing a projected image plane, // but the image plane distance is arbitrary and there might be other, better visualizations! - // TODO(#1988): + // TODO(#1025): // As such we don't ever want to invert this matrix! // However, currently our 2D views require do to exactly that since we're forced to // build a relationship between the 2D plane and the 3D world, when actually the 2D plane diff --git a/crates/re_space_view_spatial/src/parts/assets.rs b/crates/re_space_view_spatial/src/parts/assets.rs index 349f703897bd..165a63170d40 100644 --- a/crates/re_space_view_spatial/src/parts/assets.rs +++ b/crates/re_space_view_spatial/src/parts/assets.rs @@ -89,12 +89,12 @@ impl ViewPartSystem for Asset3DPart { std::iter::once(Mesh3D::name()).collect() } - // TODO(#2788): use this instead + // TODO(#3354): use this instead // fn archetype(&self) -> Vec { // Mesh3D::required_components().to_vec() // } - // TODO(#2788): use this instead + // TODO(#3354): use this instead // fn heuristic_filter( // &self, // _store: &re_arrow_store::DataStore, diff --git a/crates/re_space_view_spatial/src/ui_2d.rs b/crates/re_space_view_spatial/src/ui_2d.rs index b49c40dc0a67..d7ea4e537ca7 100644 --- a/crates/re_space_view_spatial/src/ui_2d.rs +++ b/crates/re_space_view_spatial/src/ui_2d.rs @@ -398,7 +398,7 @@ fn setup_target_config( gpu_bridge::viewport_resolution_in_pixels(egui_painter.clip_rect(), pixels_from_points); anyhow::ensure!(resolution_in_pixel[0] > 0 && resolution_in_pixel[1] > 0); - // TODO(#1988): + // TODO(#1025): // The camera setup is done in a way that works well with the way we inverse pinhole camera transformations right now. // This has a lot of issues though, mainly because we pretend that the 2D plane has a defined depth. // * very bad depth precision as we limit the depth range from 0 to focal_length_in_pixels diff --git a/crates/re_types/definitions/rerun/archetypes/points2d.fbs b/crates/re_types/definitions/rerun/archetypes/points2d.fbs index acc40647e298..55460e898c6a 100644 --- a/crates/re_types/definitions/rerun/archetypes/points2d.fbs +++ b/crates/re_types/definitions/rerun/archetypes/points2d.fbs @@ -7,11 +7,8 @@ namespace rerun.archetypes; // --- -// TODO(#2371): archetype IDL definitions must always be tables -// TODO(#2372): archetype IDL definitions must refer to objects of kind component // TODO(#2373): `attr.rerun.component_required` implies `required` // TODO(#2427): distinguish optional vs. recommended in language backends -// TODO(#2521): always derive debug & clone for rust backend /// A 2D point cloud with positions and optional colors, radii, labels, etc. /// diff --git a/crates/re_types/source_hash.txt b/crates/re_types/source_hash.txt index d4bcb2884b55..dcf61ade5376 100644 --- a/crates/re_types/source_hash.txt +++ b/crates/re_types/source_hash.txt @@ -1,4 +1,4 @@ # This is a sha256 hash for all direct and indirect dependencies of this crate's build script. # It can be safely removed at anytime to force the build script to run again. # Check out build.rs to see how it's computed. -6f8f25bbe0900f90a47718d6993eaf116ba1e7ac8b59762162bbfe633b5a7e50 +d865d0a05e7038d00db910891e4ab659951d7c0d15a1e5034be6422892b2d42a diff --git a/crates/re_types_builder/src/codegen/cpp/mod.rs b/crates/re_types_builder/src/codegen/cpp/mod.rs index 7eb0e3e5cdb2..4e5b80373487 100644 --- a/crates/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/re_types_builder/src/codegen/cpp/mod.rs @@ -38,7 +38,6 @@ const DOC_COMMENT_SUFFIX_TOKEN: &str = "DOC_COMMENT_SUFFIX_TOKEN"; const ANGLE_BRACKET_LEFT_TOKEN: &str = "SYS_INCLUDE_PATH_PREFIX_TOKEN"; const ANGLE_BRACKET_RIGHT_TOKEN: &str = "SYS_INCLUDE_PATH_SUFFIX_TOKEN"; const HEADER_EXTENSION_TOKEN: &str = "HEADER_EXTENSION_TOKEN"; -const TODO_TOKEN: &str = "TODO_TOKEN"; fn quote_comment(text: &str) -> TokenStream { quote! { #NORMAL_COMMENT_PREFIX_TOKEN #text #NORMAL_COMMENT_SUFFIX_TOKEN } @@ -67,10 +66,6 @@ fn string_from_token_stream(token_stream: &TokenStream, source_path: Option<&Utf .replace(&format!("\" {DOC_COMMENT_SUFFIX_TOKEN:?}"), "\n") .replace(&format!("{ANGLE_BRACKET_LEFT_TOKEN:?} \""), "<") .replace(&format!("\" {ANGLE_BRACKET_RIGHT_TOKEN:?}"), ">") - .replace( - &format!("{TODO_TOKEN:?}"), - "\n// TODO(#2647): code-gen for C++\n", - ) .replace("< ", "<") .replace(" >", ">") .replace(" ::", "::"); diff --git a/docs/code-examples/clear_recursive.py b/docs/code-examples/clear_recursive.py index 44410313cb32..aa2eb30e1347 100644 --- a/docs/code-examples/clear_recursive.py +++ b/docs/code-examples/clear_recursive.py @@ -14,5 +14,5 @@ rr2.log(f"arrows/{i}", rr2.Arrows3D(vector, origins=origin, colors=color)) # Now clear all of them at once. -# TODO(#3268): `rr2.Clear.recursive()` +# TODO(cmc): `rr2.Clear.recursive()` rr2.log("arrows", rr2.Clear(True)) diff --git a/docs/code-examples/clear_simple.py b/docs/code-examples/clear_simple.py index 3a654ff2b0d7..cfe22bed2252 100644 --- a/docs/code-examples/clear_simple.py +++ b/docs/code-examples/clear_simple.py @@ -15,5 +15,5 @@ # Now clear them, one by one on each tick. for i in range(len(vectors)): - # TODO(#3268): `rr2.Clear.flat()` + # TODO(cmc): `rr2.Clear.flat()` rr2.log(f"arrows/{i}", rr2.Clear(False)) diff --git a/docs/code-examples/segmentation_image_simple.py b/docs/code-examples/segmentation_image_simple.py index fb744f1649c3..82bbc2ed0c4e 100644 --- a/docs/code-examples/segmentation_image_simple.py +++ b/docs/code-examples/segmentation_image_simple.py @@ -14,5 +14,4 @@ # Assign a label and color to each class rr2.log("/", rr2.AnnotationContext([(1, "red", (255, 0, 0)), (2, "green", (0, 255, 0))])) -# TODO(#2792): SegmentationImage archetype -rr.log_segmentation_image("image", np.array(image)) +rr2.log("image", rr2.SegmentationImage(image)) diff --git a/docs/content/reference/viewer/viewport.md b/docs/content/reference/viewer/viewport.md index bb5711392475..890b1a154683 100644 --- a/docs/content/reference/viewer/viewport.md +++ b/docs/content/reference/viewer/viewport.md @@ -39,6 +39,4 @@ Rerun distinguishes various categories of Space Views: Which category is used is determined upon creation of a Space View. -[TODO(#1164)](https://github.com/rerun-io/rerun/issues/1164): Allow configuring the category of a space view after its creation. - The kind of Space View determines which Entities it can display, how it displays them and the way they can be interacted with. diff --git a/examples/python/arkit_scenes/main.py b/examples/python/arkit_scenes/main.py index edd6475e0578..db9343bc2965 100755 --- a/examples/python/arkit_scenes/main.py +++ b/examples/python/arkit_scenes/main.py @@ -43,7 +43,7 @@ def log_annotated_bboxes(annotation: dict[str, Any]) -> tuple[npt.NDArray[np.flo Logs annotated oriented bounding boxes to Rerun. We currently calculate and return the 3D bounding boxes keypoints, labels, and colors for each object to log them in - each camera frame TODO(#1581): once resolved this can be removed. + each camera frame TODO(#3412): once resolved this can be removed. annotation json file | |-- label: object name of bounding box @@ -55,7 +55,7 @@ def log_annotated_bboxes(annotation: dict[str, Any]) -> tuple[npt.NDArray[np.flo bbox_labels = [] num_objects = len(annotation["data"]) # Generate a color per object that can be reused across both 3D obb and their 2D projections - # TODO(#1581, #1728): once resolved this can be removed + # TODO(#3412, #1728): once resolved this can be removed color_positions = np.linspace(0, 1, num_objects) colormap = plt.colormaps["viridis"] colors = [colormap(pos) for pos in color_positions] @@ -93,7 +93,7 @@ def compute_box_3d( """ Given obb compute 3d keypoints of the box. - TODO(#1581): once resolved this can be removed + TODO(#3412): once resolved this can be removed """ length, height, width = half_size.tolist() center = np.reshape(transform, (-1, 3)) @@ -123,7 +123,7 @@ def log_line_segments(entity_path: str, bboxes_2d_filtered: npt.NDArray[np.float |/ |/ 1 -------- 0 - TODO(#1581): once resolved this can be removed + TODO(#3412): once resolved this can be removed :param bboxes_2d_filtered: A numpy array of shape (8, 2), representing the filtered 2D keypoints of the 3D bounding boxes. @@ -175,7 +175,7 @@ def project_3d_bboxes_to_2d_keypoints( """ Returns 2D keypoints of the 3D bounding box in the camera view. - TODO(#1581): once resolved this can be removed + TODO(#3412): once resolved this can be removed Args: bboxes_3d: (nObjects, 8, 3) containing the 3D bounding box keypoints in world frame. camera_from_world: Tuple containing the camera translation and rotation_quaternion in world frame. @@ -242,7 +242,7 @@ def log_camera( intrinsic = np.array([[fx, 0, cx], [0, fy, cy], [0, 0, 1]]) camera_from_world = poses_from_traj[frame_id] - # TODO(#1581): once resolved this can be removed + # TODO(#3412): once resolved this can be removed # Project 3D bounding boxes into 2D image bboxes_2d = project_3d_bboxes_to_2d_keypoints(bboxes, camera_from_world, intrinsic, img_width=w, img_height=h) # clear previous centroid labels diff --git a/rerun_py/docs/gen_common_index.py b/rerun_py/docs/gen_common_index.py index 5035489b8d8b..bdd110891528 100644 --- a/rerun_py/docs/gen_common_index.py +++ b/rerun_py/docs/gen_common_index.py @@ -182,8 +182,6 @@ def make_slug(s: str) -> str: with mkdocs_gen_files.open(index_path, "w") as index_file: - # TODO(#1161): add links to our high-level docs! - # Hide the TOC for the index since it's identical to the left nav-bar index_file.write( """--- diff --git a/rerun_py/rerun_sdk/rerun/_baseclasses.py b/rerun_py/rerun_sdk/rerun/_baseclasses.py index 7ae4e52f0095..a7f095f79c2d 100644 --- a/rerun_py/rerun_sdk/rerun/_baseclasses.py +++ b/rerun_py/rerun_sdk/rerun/_baseclasses.py @@ -57,7 +57,7 @@ def as_component_batches(self) -> Iterable[ComponentBatchLike]: for fld in fields(type(self)): if "component" in fld.metadata: comp = getattr(self, fld.name) - # TODO(#3341): Depending on what we decide + # TODO(#3381): Depending on what we decide # to do with optional components, we may need to make this instead call `_empty_pa_array` if comp is not None: yield comp diff --git a/rerun_py/rerun_sdk/rerun/archetypes/clear.py b/rerun_py/rerun_sdk/rerun/archetypes/clear.py index ac2de22364e5..ffb122805fea 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/clear.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/clear.py @@ -40,7 +40,7 @@ class Clear(Archetype): # Now clear them, one by one on each tick. for i in range(len(vectors)): - # TODO(#3268): `rr2.Clear.flat()` + # TODO(cmc): `rr2.Clear.flat()` rr2.log(f"arrows/{i}", rr2.Clear(False)) ``` @@ -61,7 +61,7 @@ class Clear(Archetype): rr2.log(f"arrows/{i}", rr2.Arrows3D(vector, origins=origin, colors=color)) # Now clear all of them at once. - # TODO(#3268): `rr2.Clear.recursive()` + # TODO(cmc): `rr2.Clear.recursive()` rr2.log("arrows", rr2.Clear(True)) ``` """ diff --git a/rerun_py/rerun_sdk/rerun/archetypes/segmentation_image.py b/rerun_py/rerun_sdk/rerun/archetypes/segmentation_image.py index eda0c8438055..5b53d70fa38e 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/segmentation_image.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/segmentation_image.py @@ -45,8 +45,7 @@ class SegmentationImage(SegmentationImageExt, Archetype): # Assign a label and color to each class rr2.log("/", rr2.AnnotationContext([(1, "red", (255, 0, 0)), (2, "green", (0, 255, 0))])) - # TODO(#2792): SegmentationImage archetype - rr.log_segmentation_image("image", np.array(image)) + rr2.log("image", rr2.SegmentationImage(image)) ``` """ diff --git a/tests/roundtrips.py b/tests/roundtrips.py index 79e5ead0f038..d34781671bf3 100755 --- a/tests/roundtrips.py +++ b/tests/roundtrips.py @@ -23,15 +23,15 @@ # TODO(#3207): implement missing cpp roundtrips opt_out = { "clear": ["cpp", "py", "rust"], # Don't need it, API example roundtrips cover it all - "time_series_scalar": ["cpp", "py", "rust"], # Don't need it, API example roundtrips cover it all - "depth_image": ["cpp"], # TODO(#2792) - "image": ["cpp"], # TODO(#2792) + "depth_image": ["cpp"], # TODO(#3380) + "image": ["cpp"], # TODO(#3380) "mesh3d": ["cpp", "py", "rust"], # Don't need it, API example roundtrips cover it all - "segmentation_image": ["cpp"], # TODO(#2792) - "tensor": ["cpp"], # TODO(#2792) + "segmentation_image": ["cpp"], # TODO(#3380) + "tensor": ["cpp"], # TODO(#3380) + "time_series_scalar": ["cpp", "py", "rust"], # Don't need it, API example roundtrips cover it all "transform3d": [ "cpp" - ], # TODO(#2792) - `tests/roundtrips.py --release transform3d` fails on mac (but works without --release) + ], # TODO(#3380) - `tests/roundtrips.py --release transform3d` fails on mac (but works without --release) } diff --git a/tests/rust/test_api/src/main.rs b/tests/rust/test_api/src/main.rs index 94bbe25983f5..dfb73267a742 100644 --- a/tests/rust/test_api/src/main.rs +++ b/tests/rust/test_api/src/main.rs @@ -196,7 +196,7 @@ fn test_rects(rec: &RecordingStream) -> anyhow::Result<()> { rec.set_time_seconds("sim_time", 3f64); rec.log( "rects_test/rects", - // TODO(#3279): Should be &Boxes2D::empty() + // TODO(#3381): Should be &Boxes2D::empty() &Boxes2D::from_half_sizes(std::iter::empty::()), )?; From 1e9fafe4bada35e0f779154f843a0c6026633095 Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Fri, 22 Sep 2023 16:48:47 +0200 Subject: [PATCH 5/5] disable ci for the time being --- .github/workflows/reusable_checks.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable_checks.yml b/.github/workflows/reusable_checks.yml index 8d5a477ef9bc..c52f56570501 100644 --- a/.github/workflows/reusable_checks.yml +++ b/.github/workflows/reusable_checks.yml @@ -287,9 +287,11 @@ jobs: run: | ./scripts/lint.py - - name: Check for zombie TODOs - run: | - ./scripts/zombie_todos.py --token ${{ secrets.GITHUB_TOKEN }} + # NOTE: We don't want spurious failures caused by issues being closed, so this does not run on CI, + # at least for the time being. + # - name: Check for zombie TODOs + # run: | + # ./scripts/zombie_todos.py --token ${{ secrets.GITHUB_TOKEN }} - name: Check for too large files run: |