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

Use TOML for example readme frontmatter #4553

Merged
merged 27 commits into from
Dec 19, 2023
Merged

Use TOML for example readme frontmatter #4553

merged 27 commits into from
Dec 19, 2023

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Dec 15, 2023

What

Closes #3355
Closes #2431

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

After merging this PR, merge the PR in landing by following the instructions in the PR body there.

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

@jprochazk jprochazk added 🧑‍💻 dev experience developer experience (excluding CI) examples Issues relating to the Rerun examples include in changelog labels Dec 15, 2023
@@ -0,0 +1,94 @@
#:schema ./schema.json
Copy link
Member Author

Choose a reason for hiding this comment

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

New manifest format is a lot simpler, just a single categories key, each of which contains a title, prelude, and a list of examples.

The parser will automatically infer which languages are available based on the filesystem structure. It will include any examples with frontmatter at examples/{LANGUAGE}/{NAME}/README.md (where LANGUAGE is one of cpp, python, rust).

@jprochazk
Copy link
Member Author

Linkinator doesn't like the quotes surrounding frontmatter thumbnail URLs

@jprochazk
Copy link
Member Author

For now the links are just skipped, I spent way too long looking into it

@jprochazk jprochazk marked this pull request as ready for review December 16, 2023 14:06
@emilk emilk self-requested a review December 19, 2023 07:47
Cargo.toml Outdated Show resolved Hide resolved
crates/re_build_examples/src/example.rs Outdated Show resolved Hide resolved
import requests
import tomlkit
Copy link
Member

Choose a reason for hiding this comment

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

this should be added to some requirements.txt, and frontmatter should be removed from it

scripts/ci/thumbnails.py Outdated Show resolved Hide resolved
scripts/lint.py Outdated Show resolved Hide resolved
@emilk emilk merged commit fe6400e into main Dec 19, 2023
40 checks passed
@emilk emilk deleted the jan/toml-manifest branch December 19, 2023 09:19
Comment on lines +13 to +34
examples = [
"arkit_scenes",
"controlnet",
"depth-guided-stable-diffusion",
"detect-and-track-objects",
"dicom-mri",
"face-tracking",
"human-pose-tracking",
"lidar",
"live-camera-edge-detection",
"live-depth-sensor",
"llm_embedding_ner",
"nuscenes",
"objectron",
"open-photogrammetry-format",
"raw-mesh",
"rgbd",
"ros-node",
"segment-anything-model",
"signed-distance-fields",
"structure-from-motion",
"vrs",
Copy link
Member

Choose a reason for hiding this comment

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

@jprochazk: It seems like all of the examples with "-" in the name don't show up in the examples on the preview of your new branch on the landing side of things: https://landing-git-jan-support-toml-rerun.vercel.app/examples/real-data

@Wumpf Wumpf changed the title Use TOML in examples Use TOML for example frontmatter Jan 8, 2024
@Wumpf Wumpf added the 🚜 refactor Change the code, not the functionality label Jan 8, 2024
@Wumpf Wumpf changed the title Use TOML for example frontmatter Use TOML for example readme frontmatter Jan 8, 2024
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) examples Issues relating to the Rerun examples include in changelog 🚜 refactor Change the code, not the functionality
Projects
None yet
4 participants