Skip to content

Python/CI: Raise exception on warning, e.g. call of @deprecated #9384

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

Merged
merged 6 commits into from
Mar 26, 2025

Conversation

emilk
Copy link
Member

@emilk emilk commented Mar 26, 2025

Related

What

We do not want to call deprecated functions from our examples and snippets (it sets a bad example!).

Unfortunately there is nothing stopping us from doing so right now.
Until this PR.

With PYTHONWARNINGS="error" any Python warning results in an exception, which should fail the example/snippet.

TODO

  • @rerun-bot full-check

@emilk emilk added 🐍 Python API Python logging API 🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md 🚢 CI labels Mar 26, 2025
Copy link

github-actions bot commented Mar 26, 2025

Latest documentation preview deployed successfully.

Result Commit Link
55ec6bf https://landing-6e7ybawdu-rerun.vercel.app/docs

Note: This comment is updated whenever you push a commit.

Copy link

github-actions bot commented Mar 26, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
55ec6bf https://rerun.io/viewer/pr/9384 +nightly +main

Note: This comment is updated whenever you push a commit.

@emilk emilk changed the title Raise exceptions when calling deprecated functions Python/CI: Raise exception on warning, e.g. call of @deprecated Mar 26, 2025
Copy link
Contributor

@timsaucer timsaucer left a comment

Choose a reason for hiding this comment

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

LGTM so long as CI all passes

@emilk
Copy link
Member Author

emilk commented Mar 26, 2025

@rerun-bot full-check

Copy link

@emilk
Copy link
Member Author

emilk commented Mar 26, 2025

@rerun-bot full-check

Copy link

@emilk
Copy link
Member Author

emilk commented Mar 26, 2025

@rerun-bot full-check

Copy link

@emilk emilk merged commit d324b84 into main Mar 26, 2025
80 of 81 checks passed
@emilk emilk deleted the emilk/raise-on-warning branch March 26, 2025 14:38
emilk added a commit that referenced this pull request Mar 27, 2025
…s`/`SeriesPoints`/`Scalars` (#9338)

### Related

* Fixes #9022


### What

* `SeriesLine` -> `SeriesLines`
* `SeriesPoint` -> `SeriesPoints`
* `Scalar` -> `Scalars`

The old types are still around, just deprecated.

~There's a unit test ensuring that they still work just the same
(visualizers will still activate automatically!)~
**EDIT** by @emilk: the old types are migrated (renamed) during loading
by `re_sorbet`!

The change is fairly straight forward in Python & C++. In Rust there's
some ergonomic loss since arrays need to be passed more often now - in
particular annoying on `Scalars` for single scalars. For convenience
@emilk added a `Scalar::one` constructor for Rust.

On the flip side it's much nicer now to create columns of `Scalars`
since `with_many_scalar` is no longer a thing, instead you can just
create `Scalar(..)` with an array.

---

* [x] migration guide
* [x] describe what's going on here 
* [x] Merge #9384
* [x] Update references to deprecated archetypes from doclinks in fbs
files
* [x] Remove all uses  to the old archetypes
* [x] Remove all references to the old names from everywhere (e.g. all
docs)
* [x] Full check

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
Co-authored-by: Jochen Görtler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) exclude from changelog PRs with this won't show up in CHANGELOG.md 🐍 Python API Python logging API 🚢 CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants