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

Allow for simpler, less error-prone example front matter #2431

Closed
abey79 opened this issue Jun 14, 2023 · 0 comments · Fixed by #4553
Closed

Allow for simpler, less error-prone example front matter #2431

abey79 opened this issue Jun 14, 2023 · 0 comments · Fixed by #4553
Labels
🧑‍💻 dev experience developer experience (excluding CI) enhancement New feature or request examples Issues relating to the Rerun examples 🕸️ web regarding running the viewer in a browser

Comments

@abey79
Copy link
Member

abey79 commented Jun 14, 2023

Currently, example's front matter include full path to the main file, potentially linking to a rust version as well, e.g.:

---
title: Objectron
python: https://github.com/rerun-io/rerun/tree/latest/examples/python/objectron/main.py
rust: https://github.com/rerun-io/rerun/tree/latest/examples/rust/objectron/src/main.rs
tags: [2D, 3D, object-detection, pinhole-camera]
---

This is error prone on many level: absolute path when relative would be good, rust stuff referenced from python examples, etc.

Ideally, the front matter would only include a single source: main.py with a relative path. If a given example exists in both python and rust, the CI should deal with it as needed:

  • to match the current behaviour, pull the main: path from the rust example and add its link into the web page (which is currently mainly based on the python's readme)
  • probably in the future, both versions of the example should exist in the landing page, under respective python/rust categories/filters (ideally, the system should be smart enough to notice that alternate implementations exist for a given implementation and offer cross links)
@abey79 abey79 added enhancement New feature or request 🕸️ web regarding running the viewer in a browser 🧑‍💻 dev experience developer experience (excluding CI) examples Issues relating to the Rerun examples labels Jun 14, 2023
emilk added a commit that referenced this issue Dec 19, 2023
### What

Closes #3355
Closes #2431

- [x] Convert all example `README.md` frontmatter to use TOML instead of
YAML
- [x] Convert `manifest.yml` to a `.toml` file
- [x] Support reading TOML frontmatter everywhere (linting,
`thumbnails.py`, `re_build_examples`)
- [x] Simplify both `README.md` frontmatter and the manifest file by
inferring more information from the filesystem
- [x] Use HTML comments instead of `---` for delimiters
- [x] Update `landing` to support TOML and new manifest/README formats
  - rerun-io/landing#594

After merging this PR, merge [the PR in
landing](rerun-io/landing#594) by following the
instructions in the PR body there.

### 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 newly built examples:
[app.rerun.io](https://app.rerun.io/pr/4553/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4553/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/4553/index.html?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

- [PR Build Summary](https://build.rerun.io/pr/4553)
- [Docs
preview](https://rerun.io/preview/7588e64e5e2f3676ebeb40fe75a3e8185da0b9e9/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/7588e64e5e2f3676ebeb40fe75a3e8185da0b9e9/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

---------

Co-authored-by: Emil Ernerfeldt <[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) enhancement New feature or request examples Issues relating to the Rerun examples 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant