Skip to content

Commit

Permalink
Merge pull request #60 from djarecka/library_source
Browse files Browse the repository at this point in the history
adding source_library_generation with templates needed to generate ya…
  • Loading branch information
djarecka authored Jun 3, 2024
2 parents 90b13e8 + 5ed2d65 commit 40b60bd
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/generate_yaml_model.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: generating yaml file

on:
push:
branches:
- main
paths:
- 'linkml-schema/source_library_generation/**'

permissions:
contents: write

jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install the required python packages
run: |
python -m pip install .[test]
pip install git+https://github.com/brain-bican/bkbit.git
- name: Other installations
run: |
sudo apt-get update
sudo apt-get install -y build-essential git wget curl
- name: Generate yaml model
run: |
cd linkml-schema
bkbit schema2model -o library_generation.yaml --template source_library_generation/classes_base.yaml --gsheet --gsheet-download-dir source_library_generation/gsheet_output source_library_generation/gsheet.yaml
cd ..
- name: Adding other model representations to git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add linkml-schema/library_generation.yaml
git add linkml-schema/source_library_generation/gsheet_output
git commit -m "generate library_generation yaml file"
git push
3 changes: 3 additions & 0 deletions linkml-schema/source_library_generation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Sources to build the library geenration model

- metadata from [Google Sheet](https://docs.google.com/spreadsheets/d/11OcQz1Vk3ofny3Ql7wN-XlHkZwub-hojt-fO094SxiI/edit?usp=sharing)
39 changes: 39 additions & 0 deletions linkml-schema/source_library_generation/classes_base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
classes:
ProvActivity:
mixin: true
description: >-
An activity is something that occurs over a period of time and acts upon or with entities;
it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.
slots:
- used
class_uri: prov:Activity

ProvEntity:
mixin: true
description: >-
An entity is a physical, digital, conceptual, or other kind of thing with some fixed aspects;
entities may be real or imaginary.
slots:
- was_derived_from
- was_generated_by
class_uri: prov:Entity

slots:
used:
description: >-
Usage is the beginning of utilizing an entity by an activity.
Before usage, the activity had not begun to utilize this entity and could not have been affected by the entity.
slot_uri: prov:used
range: ProvEntity
was_derived_from:
description: >-
A derivation is a transformation of an entity into another, an update of an entity
resulting in a new one, or the construction of a new entity based on a pre-existing entity.
slot_uri: prov:wasDerivedFrom
range: ProvEntity
was_generated_by:
description: >-
Generation is the completion of production of a new entity by an activity.
This entity did not exist before generation and becomes available for usage after this generation.
slot_uri: prov:wasGeneratedBy
range: ProvActivity
16 changes: 16 additions & 0 deletions linkml-schema/source_library_generation/gsheet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
gsheet_id: "11OcQz1Vk3ofny3Ql7wN-XlHkZwub-hojt-fO094SxiI"
sheets:
- name: "Classes"
gid: "1511023596"
- name: "Relations"
gid: "503493337"
- name: "LocalNames"
gid: "1773206664"
- name: "Slots"
gid: "990672642"
- name: "Subsets"
gid: "1299830797"
- name: "Prefixes"
gid: "621222810"
- name: "ValueSets"
gid: "475538568"

0 comments on commit 40b60bd

Please sign in to comment.