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

Mark TimeSeriesScalar as deprecated in all SDKs and documentation #5102

Merged
merged 15 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/auto_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Install dependencies
shell: bash
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/contrib_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ jobs:
run: |
pip install -r rerun_py/requirements-lint.txt

- name: Codegen
uses: actions-rs/cargo@v1
- uses: prefix-dev/setup-pixi@v0.4.1
with:
command: codegen
args: --force --check
pixi-version: v0.13.0

- name: Codegen check
shell: bash
run: |
pixi run codegen --force --check

rs-lints:
name: Rust lints (fmt, check, cranky, tests, doc)
Expand Down Expand Up @@ -208,7 +211,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- run: pixi run lint-taplo
shell: bash
Expand Down Expand Up @@ -296,7 +299,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

# TODO(emilk): make this work somehow. Right now this just results in
# > Compiler: GNU 12.3.0 (/__w/rerun/rerun/.pixi/env/bin/x86_64-conda-linux-gnu-c++)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contrib_rerun_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

# These should already be in the docker container, but run for good measure. A no-op install
# should be fast, and this way things don't break if we add new packages without rebuilding
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Update crate versions
id: versioning
Expand Down Expand Up @@ -399,7 +399,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- run: pixi run toml-fmt
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_and_upload_rerun_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Build web-viewer
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_and_upload_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Install dependencies
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Download Wheel
uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Build web-viewer (release)
shell: bash
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,14 @@ jobs:
run: |
pip install -r rerun_py/requirements-lint.txt

- name: Codegen
uses: actions-rs/cargo@v1
- uses: prefix-dev/setup-pixi@v0.4.1
with:
command: codegen
args: --force --check
pixi-version: v0.13.0

- name: Codegen check
shell: bash
run: |
pixi run codegen --force --check

rs-lints:
name: Rust lints (fmt, check, cranky, tests, doc)
Expand Down Expand Up @@ -229,7 +232,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Taplo check
shell: bash
Expand Down Expand Up @@ -342,7 +345,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: prettier --check
run: pixi run misc-fmt-check
2 changes: 1 addition & 1 deletion .github/workflows/reusable_checks_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Set up Rust
uses: ./.github/actions/setup-rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Doxygen C++ docs
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.3.0
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Publish packages
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

# built by `reusable_build_and_publish_wheels`
- name: Download Wheel
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

- name: Build web-viewer
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:

- uses: prefix-dev/setup-pixi@v0.4.1
with:
pixi-version: v0.6.0
pixi-version: v0.13.0

# The pip-cache setup logic doesn't work in the ubuntu docker container
# That's probably fine since we bake these deps into the container already
Expand Down
5 changes: 2 additions & 3 deletions crates/re_data_store/benches/gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ fn plotting_dashboard(c: &mut Criterion) {
.into()
};

let mut datagen = |i| {
Box::new(re_types::archetypes::TimeSeriesScalar::new(i as f64)) as Box<dyn AsComponents>
};
let mut datagen =
|i| Box::new(re_types::archetypes::Scalar::new(i as f64)) as Box<dyn AsComponents>;

// Default config
group.bench_function("default", |b| {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use itertools::Itertools;
use re_query_cache::QueryError;
use re_types::{
archetypes::TimeSeriesScalar,
components::{Color, Radius, Scalar, ScalarScattering, Text},
Archetype, Loggable,
};
Expand All @@ -16,6 +15,9 @@ use crate::{
PlotPoint, PlotPointAttrs, PlotSeries, PlotSeriesKind, ScatterAttrs,
};

#[allow(deprecated)]
use re_types::archetypes::TimeSeriesScalar;

/// The legacy system for rendering [`TimeSeriesScalar`] archetypes.
#[derive(Default, Debug)]
pub struct LegacyTimeSeriesSystem {
Expand All @@ -30,6 +32,7 @@ impl IdentifiedViewSystem for LegacyTimeSeriesSystem {
}

impl VisualizerSystem for LegacyTimeSeriesSystem {
#[allow(deprecated)]
fn visualizer_query_info(&self) -> VisualizerQueryInfo {
let mut query_info = VisualizerQueryInfo::from_archetype::<TimeSeriesScalar>();
// Although we don't normally include indicator components in required components,
Expand Down Expand Up @@ -85,6 +88,7 @@ impl VisualizerSystem for LegacyTimeSeriesSystem {
}

impl LegacyTimeSeriesSystem {
#[allow(deprecated)]
fn load_scalars(
&mut self,
ctx: &ViewerContext<'_>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include "fbs/attributes.fbs";

include "rerun/attributes.fbs";
include "rerun/datatypes.fbs";
include "rerun/components.fbs";

Expand All @@ -22,6 +23,7 @@ namespace rerun.archetypes;
/// \example scalar_simple title="Simple line plot" image="https://static.rerun.io/scalar_simple/8bcc92f56268739f8cd24d60d1fe72a655f62a46/1200w.png"
/// \example scalar_multiple_plots !api title="Multiple time series plots" image="https://static.rerun.io/scalar_multiple/15845c2a348f875248fbd694e03eabd922741c4c/1200w.png"
table TimeSeriesScalar (
"attr.rerun.deprecated": "Use the `Scalar` + (optional) `SeriesLine`/`SeriesPoint` archetypes instead, logged on the same entity.",
"attr.rust.derive": "PartialEq"
) {
// --- Required ---
Expand Down
10 changes: 10 additions & 0 deletions crates/re_types/definitions/rerun/attributes.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ attribute "attr.rerun.override_type";
///
/// This is used for example to scope blueprint types.
attribute "attr.rerun.scope";

/// Marks something as deprecated followed by a (mandatory!) migration note.
///
/// If specified on an object (struct/enum/union), it becomes deprecated such
/// that using the object should emit a warning in all target languages.
/// Furthermore, documentation will mention that the object is deprecated and display
/// the specified migration note.
///
/// TODO(andreas): This is not yet supported on fields.
attribute "attr.rerun.deprecated";
4 changes: 3 additions & 1 deletion crates/re_types/src/archetypes/mod.rs

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

4 changes: 4 additions & 0 deletions crates/re_types/src/archetypes/time_series_scalar.rs

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

Loading
Loading