Skip to content

Commit

Permalink
Exclude from objectron/proto/objectron/proto.py from `just py-forma…
Browse files Browse the repository at this point in the history
…t` (#2562)

### What

For some reason, `objectron/proto/objectron/proto.py` relies on
old-style annotation, so it broke with #2361 and was subsequently fixed
by #2559. `just py-format` insist on reverting that latest fix, so the
file is explicitly excluded from `pyupgrade`. I used a pretty ugly hack
because `pyupgrade` is [way too
opinionated](asottile/pyupgrade#809) to even
accept comment-based disabling.

### 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 https://demo.rerun.io/pr/2562 (if applicable)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2562

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/4d0b2b4/docs
Examples preview: https://rerun.io/preview/4d0b2b4/examples
<!-- pr-link-docs:end -->

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
  • Loading branch information
abey79 and emilk authored Jun 29, 2023
1 parent 2999cce commit bb8e0e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ py-format:
set -euxo pipefail
black --config rerun_py/pyproject.toml {{py_folders}}
blackdoc {{py_folders}}
pyupgrade --py38-plus `find {{py_folders}} -name "*.py" -type f`
# Note: proto.py relies on old-style annotation to work, and pyupgrade is too opinionated to be disabled from comments
# See https://github.com/rerun-io/rerun/pull/2559 for details
pyupgrade --py38-plus `find {{py_folders}} -name "*.py" -type f ! -path "examples/python/objectron/proto/objectron/proto.py"`
ruff --fix --config rerun_py/pyproject.toml {{py_folders}}
# Check that all the requirements.txt files for all the examples are correct
Expand Down

1 comment on commit bb8e0e9

@github-actions
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.25.

Benchmark suite Current: bb8e0e9 Previous: 65c559a Ratio
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/default 398 ns/iter (± 5) 307 ns/iter (± 1) 1.30
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/default 290 ns/iter (± 4) 224 ns/iter (± 0) 1.29
datastore/num_rows=1000/num_instances=1000/gc/default 2487985 ns/iter (± 28842) 1702414 ns/iter (± 4522) 1.46
mono_points_arrow_batched/generate_message_bundles 26091437 ns/iter (± 2341719) 18812594 ns/iter (± 2548119) 1.39
mono_points_arrow_batched/generate_messages 5266724 ns/iter (± 197520) 3732954 ns/iter (± 182218) 1.41
mono_points_arrow_batched/encode_log_msg 672077 ns/iter (± 5419) 409719 ns/iter (± 1043) 1.64
mono_points_arrow_batched/encode_total 39071381 ns/iter (± 1098666) 23315393 ns/iter (± 1501382) 1.68
mono_points_arrow_batched/decode_message_bundles 12207507 ns/iter (± 195799) 7451131 ns/iter (± 54264) 1.64
mono_points_arrow_batched/decode_total 12830460 ns/iter (± 137079) 7911541 ns/iter (± 114454) 1.62
batch_points_arrow/encode_log_msg 81436 ns/iter (± 398) 50725 ns/iter (± 172) 1.61
batch_points_arrow/encode_total 350791 ns/iter (± 1876) 252417 ns/iter (± 591) 1.39
batch_points_arrow/decode_log_msg 48866 ns/iter (± 214) 38025 ns/iter (± 202) 1.29
batch_points_arrow/decode_total 54236 ns/iter (± 177) 42147 ns/iter (± 234) 1.29
arrow_mono_points/insert 2668956763 ns/iter (± 4343047) 1772325184 ns/iter (± 14210489) 1.51
arrow_mono_points/query 1357639 ns/iter (± 11422) 941236 ns/iter (± 1415) 1.44
arrow_batch_points/insert 1496763 ns/iter (± 2110) 1184686 ns/iter (± 4404) 1.26

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.