Skip to content

Commit

Permalink
Auto format all the things (#4373)
Browse files Browse the repository at this point in the history
### What

Closes #3180
Closes #2741

If you're a VSCode user, install the `esbenp.prettier-vscode` extension.
The repository settings have it configured as the default formatter.

You can use `pixi run fmt-misc` to run it manually.

### 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 [app.rerun.io](https://app.rerun.io/pr/4373) (if
applicable)
* [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/4373)
- [Docs
preview](https://rerun.io/preview/67a4c41f0e029710020cb1cae61b5361261ad3c5/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/67a4c41f0e029710020cb1cae61b5361261ad3c5/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
jprochazk authored and teh-cmc committed Nov 30, 2023
1 parent 5483e4d commit 4115a09
Show file tree
Hide file tree
Showing 57 changed files with 1,263 additions and 1,006 deletions.
1 change: 0 additions & 1 deletion .github/actions/deploy-vercel/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ inputs:
runs:
using: "node20"
main: "index.mjs"

1 change: 0 additions & 1 deletion .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,3 @@ runs:
shell: bash
run: |
sccache --show-stats
1 change: 0 additions & 1 deletion .github/workflows/auto_approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ jobs:
--github-token "${{ secrets.GITHUB_TOKEN }}" \
--github-repository "rerun-io/rerun" \
--pr-number "${{ github.event.pull_request.number || github.event.issue.number }}"
1 change: 0 additions & 1 deletion .github/workflows/auto_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ jobs:
with:
CONCURRENCY: weekly-release-${{ github.run_id }}
secrets: inherit

1 change: 0 additions & 1 deletion .github/workflows/checkboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ jobs:
--github-token ${{ secrets.GITHUB_TOKEN }} \
--github-repository ${{ github.repository }} \
--pr-number ${{ github.event.pull_request.number }}
1 change: 0 additions & 1 deletion .github/workflows/clear_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ jobs:
}
clearInterval(_id);
1 change: 0 additions & 1 deletion .github/workflows/contrib_rerun_py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,3 @@ jobs:
mkdir rrd
pip install -r examples/python/structure_from_motion/requirements.txt
python3 examples/python/structure_from_motion/main.py --dataset colmap_fiat --resize 800x600 --save rrd/colmap_fiat.rrd
1 change: 0 additions & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ jobs:
retryErrors: true
retryErrorsCount: 5
retryErrorsJitter: 2000

1 change: 0 additions & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ jobs:
mode: minimum
count: 1
labels: "📊 analytics, , 🟦 blueprint, 🪳 bug, C/C++ SDK, codegen/idl, 🧑‍💻 dev experience, dependencies, 📖 documentation, 💬 discussion, examples, exclude from changelog, 📉 performance, 🐍 python API, ⛃ re_datastore, 📺 re_viewer, 🔺 re_renderer, 🚜 refactor, ⛴ release, 🦀 rust SDK, 🔨 testing, ui, 🕸️ web"

1 change: 0 additions & 1 deletion .github/workflows/on_gh_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ jobs:
CONCURRENCY: "${{ github.event.release.tag_name }}"
RELEASE_VERSION: "${{ github.event.release.tag_name }}"
secrets: inherit

1 change: 0 additions & 1 deletion .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,3 @@ jobs:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
PR_NUMBER: ${{ github.event.pull_request.number }}
secrets: inherit

1 change: 0 additions & 1 deletion .github/workflows/on_pull_request_contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ jobs:
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
MATURIN_FEATURE_FLAGS: "--no-default-features --features extension-module"

1 change: 0 additions & 1 deletion .github/workflows/on_pull_request_target_contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ jobs:
--github-token '${{ secrets.GITHUB_TOKEN }}' \
--github-repository '${{ github.repository }}' \
--pr-number '${{ github.event.pull_request.number }}'
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,3 @@ jobs:
EOF
gh pr comment $pr_number --body-file comment-body.txt
1 change: 0 additions & 1 deletion .github/workflows/reusable_bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,3 @@ jobs:
scripts/ci/render_bench.py crates \
--after $(date -d"30 days ago" +%Y-%m-%d) \
--output "gs://rerun-builds/graphs"
1 change: 0 additions & 1 deletion .github/workflows/reusable_build_and_upload_rerun_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,3 @@ jobs:
path: "./target/${{ needs.set-config.outputs.TARGET }}/release/${{ needs.set-config.outputs.LIB_NAME }}"
destination: "rerun-builds/adhoc/${{inputs.ADHOC_NAME}}/rerun_c/${{ inputs.PLATFORM }}"
parent: false

1 change: 0 additions & 1 deletion .github/workflows/reusable_build_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ jobs:
- name: Build package
shell: bash
run: node rerun_js/web-viewer/scripts/build.mjs

1 change: 0 additions & 1 deletion .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ jobs:
with:
name: web_viewer
path: web_viewer

1 change: 0 additions & 1 deletion .github/workflows/reusable_bundle_and_upload_rerun_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ jobs:
- name: "Bundle and upload rerun_cpp_sdk.zip"
shell: bash
run: python3 ./scripts/ci/bundle_and_upload_rerun_cpp.py --git-hash ${{ steps.get-sha.outputs.sha }} --platform-filter=${{ inputs.PLATFORM_FILTER }}

14 changes: 14 additions & 0 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,3 +384,17 @@ jobs:
# Only check c/cpp/h/hpp (default checks also .proto and others)
include-regex: ^.*\.(c|cpp|h|hpp)$

misc-formatting:
name: Misc formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}

- uses: prefix-dev/[email protected]
with:
pixi-version: v0.6.0

- name: prettier --check
run: pixi run misc-fmt-check
1 change: 0 additions & 1 deletion .github/workflows/reusable_pip_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,3 @@ jobs:
python scripts/ci/generate_prerelease_pip_index.py \
--commit ${{ github.sha }} \
--upload
1 change: 0 additions & 1 deletion .github/workflows/reusable_pr_summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ inputs.PR_NUMBER }}

1 change: 0 additions & 1 deletion .github/workflows/reusable_publish_npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,3 @@ jobs:
shell: bash
run: |
pixi run node rerun_js/web-viewer/scripts/publish.mjs
9 changes: 1 addition & 8 deletions .github/workflows/reusable_publish_rerun_c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,8 @@ jobs:

bundle-and-upload-rerun_cpp:
name: "Bundle and upload rerun_cpp_sdk.zip"
needs:
[
linux,
macos-intel,
macos-arm,
windows,
]
needs: [linux, macos-intel, macos-arm, windows]
uses: ./.github/workflows/reusable_bundle_and_upload_rerun_cpp.yml
with:
RELEASE_COMMIT: ${{ inputs.release-commit }}
secrets: inherit

1 change: 0 additions & 1 deletion .github/workflows/reusable_publish_rerun_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@ jobs:
PLATFORM: windows
RELEASE_COMMIT: ${{ inputs.release-commit }}
secrets: inherit

1 change: 0 additions & 1 deletion .github/workflows/reusable_run_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,3 @@ jobs:
path: "/tmp/cube.html"
destination: "rerun-builds/commit/${{env.SHORT_SHA}}/notebooks"
parent: false

1 change: 0 additions & 1 deletion .github/workflows/reusable_sync_release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ jobs:
--github-token ${{ secrets.GITHUB_TOKEN }} \
--wait ${{ inputs.WAIT_TIME_SECS }} \
--remove --update
1 change: 0 additions & 1 deletion .github/workflows/reusable_test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,3 @@ jobs:
# --no-py-build because rerun-sdk is already built and installed
run: |
RUST_LOG=debug docs/code-examples/roundtrips.py --release --target x86_64-unknown-linux-gnu --no-py-build
1 change: 0 additions & 1 deletion .github/workflows/reusable_track_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,3 @@ jobs:
scripts/ci/render_bench.py sizes \
--after $(date -d"180 days ago" +%Y-%m-%d) \
--output "gs://rerun-builds/graphs"
1 change: 0 additions & 1 deletion .github/workflows/reusable_update_pr_body.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ jobs:
--github-token '${{ secrets.GITHUB_TOKEN }}' \
--github-repository '${{ github.repository }}' \
--pr-number '${{ inputs.PR_NUMBER }}'
1 change: 0 additions & 1 deletion .github/workflows/reusable_upload_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,3 @@ jobs:
path: "web_viewer"
destination: "rerun-web-viewer/pr/${{ inputs.PR_NUMBER }}"
parent: false

1 change: 0 additions & 1 deletion .github/workflows/reusable_upload_web_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,3 @@ jobs:
path: "web_demo"
destination: "rerun-demo/pr/${{ inputs.PR_NUMBER }}"
parent: false

1 change: 0 additions & 1 deletion .github/workflows/reusable_upload_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,3 @@ jobs:
path: "dist"
destination: "rerun-builds/commit/${{ steps.get-sha.outputs.sha }}/wheels"
parent: false

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rerun_cpp/docs/**/*
14 changes: 14 additions & 0 deletions .prettierrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
semi = true
tabWidth = 4

[[overrides]]
files = ["*.yml", "*.yaml"]
options = { tabWidth = 2 }

[[overrides]]
files = "*.js"
options = { semi = true, tabWidth = 2 }

[[overrides]]
files = [".prettierrc", "*.json", "*.css", "*.html"]
options = { tabWidth = 2 }
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"webfreak.debug",
"xaver.clang-format", // C++ formatter
"zxh404.vscode-proto3",
"esbenp.prettier-vscode"
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,17 @@
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
},

"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Loading

0 comments on commit 4115a09

Please sign in to comment.