-
Notifications
You must be signed in to change notification settings - Fork 44
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
New gencode schema index page with categorisation #436
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put together noursaidi#14 to try some things out -- if you like them you can/should merge that PR into your branch, and then we'll merge them all into faucetsdn...
etc/schema_categories.txt
Outdated
@@ -0,0 +1,7 @@ | |||
event_pointset Messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to avoid the name "category" for this, since it's overloaded then with docs/specs/categories.md -- when I first saw this I was expecting something else. Section? schema_sections.txt or something would be ok I think! Alternatively, how hard would it be to have the section specified in the schema file itself? We could have a special field "$section" and just pull the value from there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be easy to do. I did think about this, but wasn't sure if JSON Schema permits additional keywords not defined in the schema? (assuming we want to remain compliant with JSON Schema)? The only existing keyword which could be used was $comment
bin/list_root_schemas
Outdated
@@ -0,0 +1,92 @@ | |||
#!/usr/bin/env python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to "gencode_schemas"? I'm trying to have at least some logical structure... bin/ is getting crowded, so having some structure there would be helpful, I think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add it into a script called gencode_doc_utils
along with other gendoc related scripts to reduce the number of those? I don't think gencode_schemas
is a good name for this particular script.
Incidentally .. I was planning to split the HTML documentation generation out of gendocs and calling that gencode_schemas
because gencode_docs
itself is getting messy to work with
etc/schema_index.md
Outdated
@@ -0,0 +1,9 @@ | |||
[**UDMI**](../../) / [Schema](#) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
schema_readme.md (just because it maps to readme.md not index.md). Also, maybe add an in there somewhere that explains where this ends up? Just so if somebody is looking at this they have some hint!
fb02800
to
d650a5c
Compare
Don't specifically care if it's gencode_schemas or gencode_rockets :-) --
just as long as it's prefaced with gencode_ then all good. The other
refactor is fine too... not particular about it as long as there's some
kind of structure/hierarchy in place.
…On Wed, Aug 31, 2022 at 12:15 PM Noureddine ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In bin/list_root_schemas
<#436 (comment)>:
> @@ -0,0 +1,92 @@
+#!/usr/bin/env python3
Could add it into a script called gencode_doc_utils along with other
gendoc related scripts to reduce the number of those? I don't think
gencode_schemas is a good name for this particular script.
Incidentally .. I was planning to split the HTML documentation generation
out of gendocs and calling *that* gencode_schemas because gencode_docs
itself is getting messy to work with
—
Reply to this email directly, view it on GitHub
<#436 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIEPD7BBANAIRMFBRA3H43V36VNFANCNFSM6AAAAAAQBMAIUA>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
docs/guides/development.md
Outdated
@@ -6,6 +6,22 @@ | |||
|
|||
The schema documentation in [`gencode/docs`](../../gencode/docs) must be kept up to date with any changes to the schema. Any additions to the schema should also include [annotations](https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.9.1) to describe the new elements. The updated documentation is generated by running the script `bin/gendocs` and its output committed to the repository with the changes. Required python dependencies are in [`etc/requirements.txt`](../../etc/requirements.txt) which must be installed for the script to run. | |||
|
|||
### Troubleshooting | |||
|
|||
If these tests are failing, check you are using a compatible system (Linux with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: Prefer not 1st person language for docs. E.g., "If these tests are failing, check the basic system requirements (Linux with...) -- Just a style thing trying to avoid the tutorial mode of writing. Or like below ("If..., check...") is ok (just avoid you/I/we is all :-).
bin/list_root_schemas
Outdated
@@ -0,0 +1,97 @@ | |||
#!/usr/bin/env python3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pending file name change
@grafnu file renamed and documentation updated, PTAL |
Example - https://noursaidi.github.io/udmi/gencode/docs/
This change intends to make the schema browser easier to use now that there are a lot more defined schemas.
Changes:
event.json
). This prevents pages being created forstate_pointset
etc.etc/schema_categories.txt
then it'll be placed unread that category , otherwise it's lodged into theOther
category