-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
Fixing JSON Schema not Rendering Properly in the Documentation #1594
Fixing JSON Schema not Rendering Properly in the Documentation #1594
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1594 +/- ##
=======================================
Coverage 67.20% 67.20%
=======================================
Files 73 73
Lines 6150 6150
=======================================
Hits 4133 4133
Misses 2017 2017 Continue to review full report at Codecov.
|
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.
This makes page much clear than before. It will be great if you can also introduce proper hierarchy in "Model" section. The TOC after addressing my comments will be:
Model
- Abundances
- File Abundance
- Uniform Abundance
- Structure
- File Structure
- Specific Structure
- Densities
- Branch85_w7 Density
- Exponential Density
- Power_law Density
- Uniform Density
- Densities
@@ -74,7 +90,6 @@ The rest of the section can be used to configure uniform abundances for all shel | |||
relative abundance fraction. If it does not add up to 1., TARDIS will warn --- but normalize the numbers. |
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.
L69-L74 (in current file) will also go up, right after L58 (in your changed file) - they together explain about abundances.
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.
Sure, Didn't know how they linked. I will move it to the requested place 😅
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.
Sorry @jaladh-singhal, Can you please re-iterate this change once I push the updated file?
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 don't see them moved up. You just need to Ctrl+X this content from "..warning:: ..... normalize the numbers" and Ctrl+V right after "The abundance
section ..... a file containing the abundance information."
474451b
to
00e1c4d
Compare
On the same lines, do we need to restructure the abstracts in the |
9086b0e
to
68b2a41
Compare
68b2a41
to
6112d5b
Compare
Actually that needs to be rewritten because convergence_criteria no longer exists (most probably it needs to be changed to convergence_strategy) and the paragraph ends incompletely - I'll create an issue once this is merged it needs to be done by someone with physics background. |
That's related to some work I will be doing soon, so I am going to be looking into that. |
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.
Thanks for making changes - there are few things still left.
Besides, (it should not be implemented in this PR) but sphinx-rtd-theme has very small font-size differences from h4 to h6 making it visually hard to distinguish these heading levels - maybe we can override corresponding CSS in config.
@@ -74,7 +90,6 @@ The rest of the section can be used to configure uniform abundances for all shel | |||
relative abundance fraction. If it does not add up to 1., TARDIS will warn --- but normalize the numbers. |
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 don't see them moved up. You just need to Ctrl+X this content from "..warning:: ..... normalize the numbers" and Ctrl+V right after "The abundance
section ..... a file containing the abundance information."
Densities | ||
""""""""" |
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.
Actually, densities should be a subsection of "Specific Structure" (as you can compare my proposed TOC with your rendered TOC after these changes) - I know it seems awkward but is it possible to somehow nest it within specific structure schema (L75)'s title?
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.
This seems to be difficult as we are on <H6>
at the moment on those heading. I don't think we can move it under the section 🤔 . What are your opinions, @jaladh-singhal ?
https://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html#headings ---> Reference to the heading hierarchy
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 have it set up so that the Density
section is under the Structure Section
but it seems so that it is not being generated correctly 🤔
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.
Actually, the jsonschema
extension is creating the appropriate headings based on the schema that I have linked. I don't think I can make it so that the Density subsection comes under the Specific Structure section because the Specific Structure is at <H6>
& Density is also at <H6>
.
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.
@DhruvSondhi I checked it in web inspector before commenting that:
- Structure is at H4
- File Structure is at H5
- Densities is at H5
- Branch85_w7 Density is at H6
- Other density types also at H6
And Overview TOC also shows same heirarchy that's why
I'm not sure how you're checking it but they are not all at H6 - I'll say to use web inspector in browser dev tools.
The actual problem here is how .. jsonschema::
renders and how rst format allows us to specify nesting in headings - both are leading to same heading levels. It seems to me that jsonschema when rendered, its title (i.e. Specific Structure) takes one next heading level in the section in which it is placed (i.e. Structure with H4) - so it becomes H5. And, the different underline characters in "Densities" as compared to "Structure" makes rst renderer think that Densities is subheading in Structure hence also making it H5.
That's why I said if it is possible to specify that "Densities" is subheading to jsonschema "Specific Structure"?
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.
Since @smithis7 will break down this configuration page into multiple pages as part of his doc restructure project - we can leave it for now. Hence merging - thanks for addressing other 2 comments.
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.
Then I think so the document I linked pertaining to the heading hierarchy in rst
is wrong or I may be doing something wrong 🤔
fe4d618
to
03ebcfe
Compare
03ebcfe
to
06a5f23
Compare
…s-sn#1594) * Fixing JSON Schema not rendering in the documentation * Restructuring the configurational abstract * Moving the documentation part to relevant sections
This PR aims to fix the JSON Schema parsing error present in the Documentation.
Documentation : https://dhruvsondhi.github.io/tardis/branch/jsonschema_documentation/using/components/configuration/configuration.html#configuration-schema
Description
The documentation contains references to the JSON Schema. This is not correctly parsed by the
sphinx jsonschema
extension & hence raises many warnings.This PR restructures the JSON Schema to make it possible to render these in the documentation.
Testing needs to be done.
Motivation and context
This will allow for easier linking of the schema in the Documentation. Will allow easier access for the schema to new users
How has this been tested?
Type of change
Checklist