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

Enhancing bentofile json schema #8

Merged
merged 10 commits into from
Mar 25, 2024
Merged

Conversation

phitoduck
Copy link
Contributor

@phitoduck phitoduck commented Mar 23, 2024

Added several "markdownDescription" sections to the JSON Schema for bentofile.yaml.

image

The "Documentation" link at the end links to an anchored section of the BentoML documentation

image

Many of the field descriptions were long. It was getting extremely painful to write markdown as a JSON string like this

Many of the markdown descriptions were long and it was extremely difficult

image

So I ultimately wrote a script to that accepts bentofileSchema.in.json using a Jinja-like templating syntax

image

Which "flattens" the referenced markdown file to an escaped JSON string and injects it into bentofileSchema.out.json by overwriting the file. Kind of an ugly solution... but the DevEx is better as far as writing Markdown descriptions is concerned.

Copy link

codecov bot commented Mar 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 116 lines in your changes are missing coverage. Please review.

Project coverage is 25.37%. Comparing base (bb73fad) to head (6d20d4b).
Report is 2 commits behind head on main.

Files Patch % Lines
...mlSchemas/insert-markdown-into-input-json-files.ts 0.00% 116 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #8      +/-   ##
==========================================
- Coverage   26.89%   25.37%   -1.52%     
==========================================
  Files          18       19       +1     
  Lines        1937     2053     +116     
  Branches        2        2              
==========================================
  Hits          521      521              
- Misses       1416     1532     +116     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…iles to be rendered into the JSON schema file via a script and templating syntax
…named bentofileSchema.json to bentofile.out.json; schema matches bentofile.yaml and bentofile.yml; arrays in the schema require items to be unique
…ignore the read-only, generated bentofileSchema.out.json
@phitoduck phitoduck merged commit f74db7a into main Mar 25, 2024
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant