Skip to content

DaylightAcademy/DLA-LightEx-MD-Validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DLA FAIR Chronobiology

A React app for authoring JSON documents that conform to the Chronobiology Data Standards. We're using the React JSON Schema Forms library to dynamically generate forms based on the schema files. The app was bootstrapped with Create React App.

The app is deployed here.

Netlify Status

Development

We're using asdf to manage project dependencies.

  1. Install asdf

  2. Install the asdf-nodejs plugin.

  3. Install node with asdf install.

  4. Install dependencies with npm install.

  5. Start the server with npm start.

Tests

Run the tests with npm test.

Making changes to schema files

The schema files live in the CDSIG-Schema repo. Use the following workflow to test changes to those schema files in this web authoring tool:

  1. Install @apidevtools/json-schema-ref-parser using npm install @apidevtools/json-schema-ref-parser.

  2. Create a branch in the CDSIG-Schema repository, make your changes and push them to GitHub. Note that you might need to update any external $ref URLs so that they point to the schema files in your new branch.

  3. Create a branch in this repository.

  4. Run the ./scripts/update-schema script and pass your CDSIG-Schema branch name as an argument (e.g. ./scripts/update-schema my-schema-branch-name).

  5. Check the schema changes work as expected in the development server at http://localhost:3000.

  6. Once you're happy that everything is working as expected you can merge the changes in both repositories into main.

Project structure

  • .github/ - Configuration for running tests on GitHub and deploying to Netlify.
  • public/ - Static files made available to the web application.
  • scripts/ - Shell scripts for working with schema files. See comments in each file for their purpose.
  • src/schema/original/ - Copies of schema files from CDSIG-Schema repo. These should only be changed by running the update-schema script.
  • src/schema/ - The schema files we use in our React app. They are dereferenced and prettified versions of the schema files in src/schema/original. These should only be changed by running the update-schema script.
  • src/ - Source of the React web app.

CI and deployment

We're using GitHub Actions to run the tests and deploy to Netlify if they all pass. This is configured in .github/workflows/main.yml.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published