Skip to content

Commit

Permalink
Rename StoreDb to EntityDb, re_data_store -> re_entity_db (#4670
Browse files Browse the repository at this point in the history
)

### What
* Part of #4437

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/4670/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4670/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/4670/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4670)
- [Docs
preview](https://rerun.io/preview/0371d5ff4603f33ead320cfc99d933d564fa204a/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/0371d5ff4603f33ead320cfc99d933d564fa204a/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
  • Loading branch information
emilk authored Jan 4, 2024
1 parent 634c31a commit a284fd6
Show file tree
Hide file tree
Showing 136 changed files with 504 additions and 498 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reusable_bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
cargo bench \
--all-features \
-p re_arrow_store \
-p re_data_store \
-p re_entity_db \
-p re_log_encoding \
-p re_query \
-p re_tuid \
Expand Down
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ This image must be updated each time a crate is added/removed/updated.
FigJam document: https://www.figma.com/file/Umob8ztK1HmYKLUMSq8aPb/Crates-org
Update instructions:
1) Update the FigJame document
1) Update the FigJam document
2) Select all -> right-click -> Copy as PNG
3) `just upload --name crates`
4) Copy/paste the resulting HTML
Expand Down Expand Up @@ -147,7 +147,7 @@ Update instructions:

| Crate | Description |
|-----------------|-----------------------------------------------------------------|
| re_data_store | In-memory storage of Rerun log data, indexed for fast queries. |
| re_entity_db | In-memory storage of Rerun entities |
| re_query | Querying data in the re_arrow_store |
| re_query_cache | Caching datastructures for re_query |
| re_types | The built-in Rerun data types, component types, and archetypes. |
Expand Down
80 changes: 40 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ re_build_tools = { path = "crates/re_build_tools", version = "=0.12.0-alpha.3",
re_build_web_viewer = { path = "crates/re_build_web_viewer", version = "=0.12.0-alpha.3", default-features = false }
re_crash_handler = { path = "crates/re_crash_handler", version = "=0.12.0-alpha.3", default-features = false }
re_data_source = { path = "crates/re_data_source", version = "=0.12.0-alpha.3", default-features = false }
re_data_store = { path = "crates/re_data_store", version = "=0.12.0-alpha.3", default-features = false }
re_entity_db = { path = "crates/re_entity_db", version = "=0.12.0-alpha.3", default-features = false }
re_data_ui = { path = "crates/re_data_ui", version = "=0.12.0-alpha.3", default-features = false }
re_error = { path = "crates/re_error", version = "=0.12.0-alpha.3", default-features = false }
re_format = { path = "crates/re_format", version = "=0.12.0-alpha.3", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions crates/re_arrow_store/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates.

[![Latest version](https://img.shields.io/crates/v/re_data_store.svg)](https://crates.io/crates/re_data_store)
[![Documentation](https://docs.rs/re_data_store/badge.svg)](https://docs.rs/re_data_store)
[![Latest version](https://img.shields.io/crates/v/re_entity_db.svg)](https://crates.io/crates/re_entity_db)
[![Documentation](https://docs.rs/re_entity_db/badge.svg)](https://docs.rs/re_entity_db?speculative-link)
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
![Apache](https://img.shields.io/badge/license-Apache-blue.svg)

Expand Down
2 changes: 1 addition & 1 deletion crates/re_data_ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ all-features = true

[dependencies]
re_arrow_store.workspace = true
re_data_store.workspace = true
re_entity_db.workspace = true
re_error.workspace = true
re_format.workspace = true
re_log.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/re_data_ui/src/annotation_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn annotation_info(
keypoint_id: KeypointId,
) -> Option<AnnotationInfo> {
let class_id = ctx
.store_db
.entity_db
.store()
.query_latest_component::<re_types::components::ClassId>(entity_path, query)?;
let annotations = crate::annotations(ctx, query, entity_path);
Expand Down
2 changes: 1 addition & 1 deletion crates/re_data_ui/src/component.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use egui::NumExt;
use re_data_store::{EntityPath, InstancePath};
use re_entity_db::{EntityPath, InstancePath};
use re_query::ComponentWithInstances;
use re_types::ComponentName;
use re_viewer_context::{UiVerbosity, ViewerContext};
Expand Down
4 changes: 2 additions & 2 deletions crates/re_data_ui/src/component_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl DataUi for ComponentPath {
{
ctx.store_context.blueprint.store()
} else {
ctx.store_db.store()
ctx.entity_db.store()
};

if let Some(archetype_name) = component_name.indicator_component_archetype() {
Expand All @@ -36,7 +36,7 @@ impl DataUi for ComponentPath {
component_data,
}
.data_ui(ctx, ui, verbosity, query);
} else if let Some(entity_tree) = ctx.store_db.tree().subtree(entity_path) {
} else if let Some(entity_tree) = ctx.entity_db.tree().subtree(entity_path) {
if entity_tree.entity.components.contains_key(component_name) {
ui.label("<unset>");
} else {
Expand Down
4 changes: 2 additions & 2 deletions crates/re_data_ui/src/entity_path.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use re_data_store::InstancePath;
use re_entity_db::InstancePath;
use re_viewer_context::{UiVerbosity, ViewerContext};

use super::DataUi;

impl DataUi for re_data_store::EntityPath {
impl DataUi for re_entity_db::EntityPath {
fn data_ui(
&self,
ctx: &ViewerContext<'_>,
Expand Down
6 changes: 3 additions & 3 deletions crates/re_data_ui/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl EntityDataUi for re_types::components::TensorData {
re_tracing::profile_function!();

let tensor_data_row_id = ctx
.store_db
.entity_db
.store()
.query_latest_component::<re_types::components::TensorData>(entity_path, query)
.map_or(RowId::ZERO, |tensor| tensor.row_id);
Expand Down Expand Up @@ -66,7 +66,7 @@ fn tensor_ui(
ctx: &ViewerContext<'_>,
ui: &mut egui::Ui,
verbosity: UiVerbosity,
entity_path: &re_data_store::EntityPath,
entity_path: &re_entity_db::EntityPath,
annotations: &Annotations,
tensor_data_row_id: RowId,
original_tensor: &TensorData,
Expand All @@ -82,7 +82,7 @@ fn tensor_ui(
let meaning = image_meaning_for_entity(entity_path, ctx);

let meter = if meaning == TensorDataMeaning::Depth {
ctx.store_db
ctx.entity_db
.store()
.query_latest_component::<DepthMeter>(entity_path, &ctx.current_query())
.map(|meter| meter.value.0)
Expand Down
2 changes: 1 addition & 1 deletion crates/re_data_ui/src/image_meaning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub fn image_meaning_for_entity(
entity_path: &EntityPath,
ctx: &ViewerContext<'_>,
) -> TensorDataMeaning {
let store = ctx.store_db.store();
let store = ctx.entity_db.store();
let timeline = &ctx.current_query().timeline;
if store.entity_has_component(timeline, entity_path, &DepthImage::indicator().name()) {
TensorDataMeaning::Depth
Expand Down
6 changes: 3 additions & 3 deletions crates/re_data_ui/src/instance_path.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use re_data_store::InstancePath;
use re_entity_db::InstancePath;
use re_log_types::ComponentPath;
use re_query::get_component_with_instances;
use re_viewer_context::{UiVerbosity, ViewerContext};
Expand All @@ -24,11 +24,11 @@ impl DataUi for InstancePath {
{
ctx.store_context.blueprint.store()
} else {
ctx.store_db.store()
ctx.entity_db.store()
};

let Some(components) = store.all_components(&query.timeline, entity_path) else {
if ctx.store_db.is_known_entity(entity_path) {
if ctx.entity_db.is_known_entity(entity_path) {
// This is fine - e.g. we're looking at `/world` and the user has only logged to `/world/car`.
ui.label(format!(
"No components logged on timeline {:?}",
Expand Down
4 changes: 2 additions & 2 deletions crates/re_data_ui/src/item_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! TODO(andreas): This is not a `data_ui`, can this go somewhere else, shouldn't be in `re_data_ui`.
use egui::Ui;
use re_data_store::{EntityTree, InstancePath};
use re_entity_db::{EntityTree, InstancePath};
use re_log_types::{ComponentPath, EntityPath, TimeInt, Timeline};
use re_viewer_context::{
DataQueryId, HoverHighlight, Item, Selection, SpaceViewId, UiVerbosity, ViewerContext,
Expand Down Expand Up @@ -365,7 +365,7 @@ pub fn instance_hover_card_ui(ui: &mut Ui, ctx: &ViewerContext<'_>, instance_pat
let query = ctx.current_query();

if instance_path.instance_key.is_splat() {
if let Some(subtree) = ctx.store_db.tree().subtree(&instance_path.entity_path) {
if let Some(subtree) = ctx.entity_db.tree().subtree(&instance_path.entity_path) {
entity_tree_stats_ui(ui, &query.timeline, subtree);
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion crates/re_data_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ fn format_cell(cell: &DataCell) -> String {
pub fn annotations(
ctx: &ViewerContext<'_>,
query: &re_arrow_store::LatestAtQuery,
entity_path: &re_data_store::EntityPath,
entity_path: &re_entity_db::EntityPath,
) -> std::sync::Arc<re_viewer_context::Annotations> {
re_tracing::profile_function!();
let mut annotation_map = re_viewer_context::AnnotationMap::default();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "re_data_store"
name = "re_entity_db"
authors.workspace = true
description = "In-memory storage of Rerun log data, indexed for fast queries."
description = "In-memory storage of Rerun entities"
edition.workspace = true
homepage.workspace = true
include.workspace = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# re_data_store
# re_entity_db

Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates.

[![Latest version](https://img.shields.io/crates/v/re_data_store.svg)](https://crates.io/crates/re_data_store)
[![Documentation](https://docs.rs/re_data_store/badge.svg)](https://docs.rs/re_data_store)
[![Latest version](https://img.shields.io/crates/v/re_entity_db.svg)](https://crates.io/crates/re_entity_db)
[![Documentation](https://docs.rs/re_entity_db/badge.svg)](https://docs.rs/re_entity_db?speculative-link)
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
![Apache](https://img.shields.io/badge/license-Apache-blue.svg)

Expand Down
File renamed without changes.
Loading

0 comments on commit a284fd6

Please sign in to comment.