Code Monkey home page Code Monkey logo

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

Bioschemas's Projects

bioschemas-dde icon bioschemas-dde

scripts for automated maintenance of bioschemas specifications in the Data Discovery Engine

bioschemas-goweb icon bioschemas-goweb

Parses an specification mapping csv to markdown ready for bioschemas.org web.

bioschemas-protein-render icon bioschemas-protein-render

Uses bioschemas-uniprot-adater to get the Bioschemas JSON LD for a UniProt accession and renders it in the simplest way

bmuse icon bmuse

Bioschemas Mark Up Scraper and Extractor

governance icon governance

The governance process and code of conduct for the Bioschemas Community

map2model icon map2model

map2model is a Python module for convert specification stored in GDrive files and generates the files needed to publish Bioschemas Types and Profiles to publish them in bioschemas.org page.

rubyextractor icon rubyextractor

Extract schema.org RDF, Microdata, or JSON-LD with this Ruby library

schemaorg icon schemaorg

Schema.org - schemas and (appengine) software

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.