Code Monkey home page Code Monkey logo

map2model's Introduction

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

map2model's People

Contributors

guicalman avatar kcmcleod avatar ljgarcia avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

map2model's Issues

What about CV column?

I do not see anything on the CV column, even when mappings do have something there. Will it be included? I would say CV is very important in Bioschemas, even more now with the changes on PhysicalEntity and Record.

Cheers,

Repository purpose

I'm trying to understand the purpose of this repository and its relationship to all of the Bioschema groups. Is it to provide a common template that can be used in repositories for each of the different groups? That is, this repository will not contain any Bioschema specifications itself?

Specification

After doing the mapping Bioschemas Specification should be done, to accomplish this goal we will follow the steps below:

  • Create a Specification Template in Google Docs
  • Convert the GDocs Template to a Markdown template
  • Share some examples to comunity for feedback
  • Integrate Jekyll based Bioschemas Web Page (local) with new section that list the Specifications and show the in Bioschemas page
  • Publish MD Specification Template
  • Document process to convert GDocs file into MD Specification file

Problem with extends field in gSheets doc

The extends ... expects the value to be from Schema.org, e.g., extends Thing

If a non schema.org value is specified, e.g., BioChemEntity, it crashes map2model and thus fails to produce a spec.

Working solution = use Thing instead of any Bioschema's type

notes for updated repository with continuous integration

I'm working on an updated version that will simplify deployment, and want to put some notes here so I don't forget!

The following should be updated (issues directed at maintainers for each standard):

  • correct versioning should be used (e.g., 0.2.0 and not 0.2 or v0.2, etc.)
  • the configuration.yml should have an assigned maintainer (or maintainers)
  • for each folder with multiple "Mapping (1)... Mapping (2)" assign issue to figure out why there are copies, designate correct file.

The following should just be tested in continuous integration:

  • folders in specifications that have missing or improperly formatted / specified content
  • version strings are correct
  • all yaml is correctly formatted
  • preview of site content as artifact
  • on merge (or hold -> approve), deploy?

And possibly with a bot could be deployed after PR passes instead of needing second Pull Request, but I don't know enough about the process to determine this.

Going to proceed work here https://github.com/vsoch/map2model/tree/remove-gdrive No ETA with timing because, well Florence! swoooosh! ๐ŸŒช๏ธ Super excited about this!

update or master branch to commit and push specs?

After running run-py, files on the docs/spec_files folder were modified. So, in order to checkout the update branch, I have to either commit, stash or force the checkout. Is this intended?

After a stash and checkout to update branch, I got the specifications_md_files folder but there is nothing there. So, commit and pull should be done from spec_files in master?

Cheers,

Mapping

Before make the contrast between all de Use Cases, select the Schema.org Type that best fits all the use cases, after this process you would have to follow the process bellow to map the Schema.org properties to the Use Case's need.

  • Create a Mapping Template #6
  • Mapping Feedback #7
  • Publish Mapping template in Google Docs #8
  • Document process to handle Mapping Template #9

Use Case

Generate the Use Case Template in Google Docs Format.
This issue is divided in the following tasks:

  • Check the Use Case Files done in previous meetings #2
  • Propose new Use Case Template #3
  • Document the Use Case Template in Github #4

Wrong path?

Is this path "docs > specifications_md_files" correct? I run the process as described in the first part of the readme and I got the specifications on docs/spec_files. I updated that path on the execution steps but I see it is in other parts of the document as well. Not sure what is the right path.

Cheers,

Initial Update

Hi ๐Ÿ‘Š

This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.

Once you have closed this issue, I'll create separate pull requests for every update as soon as I find one.

That's it for now!

Happy merging! ๐Ÿค–

Specify the specification

I would like to be able to run the module just for the specifications I am working on. Is it possible?

Cheers,

Need to add community profile

I will take care of this in my current PR, e.g.,:

image

It should be easy / obvious to know how to contribute and ask for help.

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.