-
Notifications
You must be signed in to change notification settings - Fork 0
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
cam/guidance updates 1 #48
Conversation
…eral block scalar in the YAML to see how it builds & displays
…eaks from the JSON structure and absolute pathing for files
…move all markdown from JSON outputs
@@ -210,14 +214,13 @@ def remove_types(data): | |||
form["schema_fields"] = [] | |||
form_structure(structure, form) | |||
with open(f"{path}/{name}.form.json", "w") as f: | |||
json.dump(form, f, indent=6) | |||
json.dump(clean_markdown_from_json(form), f, indent=6) |
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.
We might not want to clean the markdown for the form structure. The 3.0.0.form.json
, which is generated in this line, is the file that gets used by the front end for metadata onboarding form hydration. I assume we want the markdown formatting on that form.
json.dump(clean_markdown_from_json(form), f, indent=6) | |
json.dump(form, f, indent=6) |
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.
Good spot, I thought this was used on the page, I will remove this
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 should be resolved in the latest commit @BSnelling, will keep an eye out for future
… JSON file as this needs to be present for the frontend
| title | guidance | is_list | is_optional | required | type | | ||
|:----------------|:-----------|:----------|:--------------|:-----------|:----------------------------------------------------------------------------------| | ||
| Dataset Version | N/A | False | False | True | ["Semver[{'pattern': '^([0-9]+)\\\\.([0-9]+)\\\\.([0-9]+)$', 'type': 'string'}]"] | | ||
| title | guidance | is_list | is_optional | required | type | |
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.
you were going to remove is_optional
from the rendering?
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.
Yep, will be doing this one as it's own PR, need to mess around with the create_markdown function locally first
Just a few changes, please read the commit messages as well!