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

cam/guidance updates 1 #48

Merged
merged 11 commits into from
Jul 19, 2024
Merged

cam/guidance updates 1 #48

merged 11 commits into from
Jul 19, 2024

Conversation

camilner-hdr
Copy link
Contributor

Just a few changes, please read the commit messages as well!

  • Implemented a new function which removes markdown from JSON
  • Updated the requirements.txt file to include missing packages
  • Updated a piece of guidance in the YAML to try out the folded block scaler to maintain new line formatting in markdown tables
  • regenerated markdown documentation for version 3.0.0 of the HDRUK Schema
  • regenerated JSON Schema for version 3.0.0 of the HDR UK Schema

@@ -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)
Copy link
Collaborator

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.

Suggested change
json.dump(clean_markdown_from_json(form), f, indent=6)
json.dump(form, f, indent=6)

Copy link
Contributor Author

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

Copy link
Contributor Author

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 |
Copy link
Collaborator

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?

Copy link
Contributor Author

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

@camilner-hdr camilner-hdr merged commit 56472b6 into master Jul 19, 2024
3 checks passed
@camilner-hdr camilner-hdr deleted the cam/guidance-updates-1 branch July 19, 2024 15:27
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.

3 participants