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

Add __version__ and __version_info__ to rerun package #7104

Merged
merged 3 commits into from
Aug 8, 2024
Merged

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Aug 7, 2024

What

This is more standardized and machine-readable than the bindings.version() implementation.

Also update it consistently when we bump it in the release script.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@jleibs jleibs marked this pull request as ready for review August 7, 2024 19:41
Copy link

github-actions bot commented Aug 7, 2024

Deployed docs

Commit Link
5ef6363 https://landing-ngasc0b7y-rerun.vercel.app/docs

@emilk emilk changed the title Add __version__ and __version_info__ to rerun package Add __version__ and __version_info__ to rerun package Aug 8, 2024
Copy link
Member

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

Nice.

Note that I've used this trick to avoid duplicating the version number and use the one from pyproject.toml instead. Given that we already have quite the infrastructure to deal with version update anyways, maybe it still makes sense to skip this magic.

(Note that we'd have to use importlib_metadata as importlib is not 3.8 compatible, iirc.)

@jleibs jleibs merged commit 9dfe1db into main Aug 8, 2024
42 of 43 checks passed
@jleibs jleibs deleted the jleibs/py_version branch August 8, 2024 12:33
emilk pushed a commit that referenced this pull request Aug 12, 2024
### What

* Fixes #6379
* Related to #7104

Allows finally to do `#if` preprocessor checks on Rerun versions.
Uses the same up update version script introduced for Python and does
away with cmake driven duplication of rerun.h

### 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 examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7127?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/7127?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
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [x] If have noted any breaking changes to the log API in
`CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/7127)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Machine readable rerun version numbers in python
2 participants