Skip to content

Use TOML for example readme frontmatter#4553

Merged
emilk merged 27 commits intomainfrom
jan/toml-manifest
Dec 19, 2023
Merged

Use TOML for example readme frontmatter#4553
emilk merged 27 commits intomainfrom
jan/toml-manifest

Conversation

@jprochazk
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Linkinator doesn't like the quotes surrounding frontmatter thumbnail URLs

@jprochazk
Copy link
Copy Markdown
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

import frontmatter
import requests
import tomlkit
Copy link
Copy Markdown
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

@emilk emilk merged commit fe6400e into main Dec 19, 2023
@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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

Replace YAML with TOML in our example markdown frontmatter Allow for simpler, less error-prone example front matter

4 participants