Skip to content

BioSchemas/specifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps to Render a Bioschemas Profile on the Bioschema Website

It is assumed that you have already made the edits to the profile (see this tutorial for details on how to edit a profile), stored it in the Bioschemas Specification repository, and that you are now ready to get it published on the Bioschemas website.

1. Manual Configuration in the Website Repository

For new profiles:

  1. Create a new branch in the Bioschemas website repository with a suitable name to identify the intended outcome of the work, e.g. for a new "example profile" we might have draft-example-0.1.
  2. In the _data/profile_versions.yaml file, add an entry for the new profile replicating the information in other draft profiles.
  3. In the _data/metadata_mapping.csv file add a row for your profile stating the profile name and working group name.
  4. Create a pull request from your branch to the master.

2 Automated Rendering (Github Action)

Once the pull request in the specifiaction repository is merged, a GitHub Action workflow is launched. It converts the JSON-LD representation of the Bioschemas profile from the specifications repository into the format needed for the Bioschemas website.

Workflow steps (shown in figure below):

Computational Tool Workflow Steps

  1. Clone the specification repository and retreive the last commit.
  2. Clone the website repository.
  3. Execute a python script that will update some config files:
    1. Get the profile versioning config file from the website repository and parse it
    2. Check if the profile exists in the file
    3. Update it's version
  4. Execute a python script that will generate the profile:
    1. Maps each field of the JSON-LD to properties in the profile
    2. Generates a YAML from this mapping
    3. Transforms the YAML into an HTML file
    4. Write the file in the appropriate profiles folder in the website repository
  5. Setup the GitHub TOKEN, so the GitHub action can publish into the website repository.
  6. Commit and push the changes in an intermediate branch. The file has the following name pattern: profile name + today's date concatenated. e.g: ComputationalTool-2022-08-17.
  7. Creates a Pull Request from the branch to be integrated into the master branch.

3.3 To the Web

Now, if you go to the bioschemas repository pull requests, you should find a PR for the generated branch. You just need to merge it to master branch and your profile will be taken into consideration in the bioschemas website.

3. Possible Occuring Problems

3.1 At the workflow level

  • The Github TOKEN that the github action is using to add and commit a change in the Github action is owned by Sahar Frikha.

3.2 At the python script level

  • The format of the generated HTML is tightly coupled to the Jekyll Profile template used to render the profile as a web page. Any modifications to the template should be taken into consideration in the python script. For now, we are following this template.

4. Sequence Diagram

The following diagram illustrates how files are routed through the three main entities: DDE, Bioschemas specifications and Bioschemas website repositories.

Sequence Diagram

Releases

No releases published

Packages

No packages published

Languages