DPG-Standard
DPG-Standard copied to clipboard
Generation of Markdown docs from JSON schema
From the description in unicef/publicgoods-roadmap#17:
screening-schema.json in
unicef/publicgoods-candidates
currently defines the set of questions that operationalize the standard defined inDPGAlliance/DPG-Standard
.The standard is defined in standard.md, and operationalized in standard-questions.md, yet these are three different files that have to be manually updated to keep them in sync. This is highly inefficient and prone to errors.
The schema should be the source of truth, and from there generate any other related files where the same information is presented in a more human-readable way.
The proposed tasks are as follows:
- [ ] Learn GitHub. Go to https://lab.github.com/, and start with the first course Introduction to GitHub.
- [ ] At the link above, also take the Communicating using Markdown as your first task will involve Markdown
- [ ] At the link above, also take the GitHub Actions: Hello World as we’ll use GitHub actions to automate sync’ing across repos (we are already heavily using them)
- [X] Create an empty repository in your personal account: https://github.com/dcha7225/JSON-MD
- [ ] Add a copy of the nominee-schema.json and the screening-schema.json
- [ ] Using Javascript/NodeJS write a script that reads the two JSON files above, and outputs a Markdown document similar to standard.md. Make the necessary changes to your JSON files to accomplish this task.
- [ ] Using Javascript/NodeJS write a script that reads the two JSON files above, and outputs a Markdown document similar to standard-questions.md. Make the necessary changes to your JSON files to accomplish this task.
- [ ] Using Github Actions, automate both scripts above so that Markdown files are updated anytime the JSON files change
Once all of the tasks above have been completed and reviewed:
- [ ] Migrate all of the above changes to the DPG Standard repository
Daniel is working on this at https://github.com/dcha7225/JSON-MD
@nathanfletcher kindly look into this PR. Thanks
FYI, this was a long shot and a potential side project for an intern that was never materialized. It was meant to improve efficiency in the management and upkeep of the standard with the goal of having one single source of truth that would automatically propagate the changes elsewhere.
Realistically, this is very low priority now, since there is another process in place (more manual) to propagate changes. My advice is to close this is issue and forget it for the time being.
On Apr 28, 2022, at 5:38 AM, Nathan Baleeta @.***> wrote:
@nathanfletcher kindly look into this PR. Thanks
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
We have moved on from the Github database and DPGA secretariat has its own MySQL server where the database is managed - it creates a copy on the github repositories but the API call runs on the MySQL server thereby shifting the schema's source of truth entirely. For that reason, this project is now redundant. Closing this for the same reson.