From 331841ec2e418f201ada6c027647c28382153b54 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 11:01:12 +0200 Subject: [PATCH 001/162] Add the Python Script --- .../workflows/profile_generation_script.py | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) create mode 100644 .github/workflows/profile_generation_script.py diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py new file mode 100644 index 00000000..ba02ae4f --- /dev/null +++ b/.github/workflows/profile_generation_script.py @@ -0,0 +1,294 @@ +import json +from pathlib import Path +from pydoc import doc +import yaml +from colorama import Fore +from colorama import Style +import sys +import os.path +from os import path + +def generate_types_cardianlity(g,prop): + + list_types=list() + cardianliy="ONE" + + if "type" in prop.keys(): + if "format" in prop.keys(): + list_types.append(prop["format"]) + else : + list_types.append(prop["type"]) + + if "anyOf" in prop.keys(): + for e in prop["anyOf"]: + if "format" in e.keys(): + list_types.append(e["format"]) + elif "items" in e.keys(): + list_types.append(e["items"]) + cardianliy = "MANY" + else : + for t in e.keys(): + list_types.append(e[t]) + + if "oneOf" in prop.keys(): + for e in prop["oneOf"]: + if "format" in e.keys(): + list_types.append(e["format"]) + elif "items" in e.keys(): + list_types.append(e["items"]) + cardianliy = "MANY" + else : + for t in e.keys(): + list_types.append(e[t]) + + i=1 + j=1 + while i==1: + i=0 + j=j+1 + for t in list_types: + if isinstance(t,dict): + i=1 + e=t + list_types.remove(t) + if "format" in e.keys(): + list_types.append(e["format"]) + else: + for sous_type in e.keys(): + list_types.append(e[sous_type]) + + if len(list_types)==0: + cardianliy="" + + #Some cleaning up + expected_types =[] + + for t in list_types: + if len(t.split('/'))>1 : + expected_types.append(t.split('/')[-1].capitalize()) + ##If we ever needed it + #external_type= g['$validation']["definitions"][t.split('/')[-1]] + #print(Fore.YELLOW + f'Def of the External Type : {external_type}' + Style.RESET_ALL) + + else : + expected_types.append(t.capitalize()) + + ##Remove duplicates + clean_expected_types = list(set(expected_types)) + + #Replace 'String' with 'Text' + for i in clean_expected_types: + if i == "String": + clean_expected_types.remove(i) + clean_expected_types.append("Text") + #print(Fore.MAGENTA + f'Expected Types : {clean_expected_types}' + Style.RESET_ALL) + + #print(Fore.RED + f'Cardinality = {cardianliy}' + Style.RESET_ALL) + + return cardianliy, clean_expected_types + + +def generate_property (g, prop, req_label, marginality): + + #print(Fore.GREEN + Style.BRIGHT + f'Property : {req_label}' + Style.RESET_ALL) + new_p = dict() + #If I want to create a dict, new_p[] = {'description':prop["description"]} + + new_p['property'] = req_label + new_p['marginality'] = marginality + new_p['cardinality'], new_p['expected_types'] = generate_types_cardianlity(g, prop) + + if "description" in prop.keys(): + new_p['description'] = prop["description"] + else: + new_p['description']="" + if "type_url" in prop.keys(): + new_p['type_url'] = prop["type_url"] + else: + new_p['type_url']="" + if "bsc_description" in prop.keys(): + new_p['bsc_description'] = prop["bsc_description"] + else: + new_p['bsc_description']="" + if "controlled_vocab" in prop.keys(): + new_p['controlled_vocab'] = prop["controlled_vocab"] + else: + new_p['controlled_vocab']="" + + if "example" in prop.keys(): + new_p['example'] = prop["example"] + else: + new_p['example']="" + + # Here we'll suppose that all properties are in default schemas.org + new_p['type']="" + + return new_p + + +def generate_spec_info(g): + spec_info = dict() + + if "rdfs:label" in g.keys(): + spec_info["title"] = g['rdfs:label'] + else: + raise Exception("Please Provide the title of your profile!") + + if "rdfs:comment" in g.keys(): + spec_info["description"] = g['rdfs:comment'] + else: + spec_info["description"] + + if "schema:schemaVersion" in g.keys(): + spec_info["version"] = g['schema:schemaVersion'][0].split('/')[-1] + else: + spec_info["version"]="0.5-DRAFT" + #raise Exception("Please Provide the version of your profile!") + + if "rdfs:subClassOf" in g.keys(): + spec_info["official_type"] = g['rdfs:subClassOf'] + else: + spec_info["official_type"]="" + + spec_info["full_example"] = "https://github.com/BioSchemas/specifications/tree/master/"+spec_info["title"]+"/examples" + + return spec_info + + +def generate_transformed_profile(g): + + transformed_profile = dict() + + ###Spec_info + transformed_profile["spec_info"] = generate_spec_info(g) + print(Style.BRIGHT + "Spec Info Generated" + Style.RESET_ALL) + + ### Mapping + transformed_profile["mapping"] = list(dict()) + + # Browse properties by marginality and add them to the mappings + if "$validation" in g.keys(): + for req_label in g['$validation']["required"]: + prop = g['$validation']["properties"][req_label] + new_p = generate_property (g, prop, req_label, "Minimum") + transformed_profile["mapping"].append(new_p) + + for reco_label in g['$validation']["recommended"]: + prop = g['$validation']["properties"][reco_label] + new_p = generate_property (g, prop, reco_label, "Recommended") + transformed_profile["mapping"].append(new_p) + + for opt_label in g['$validation']["optional"]: + prop = g['$validation']["properties"][opt_label] + new_p = generate_property (g, prop, opt_label, "Optional") + transformed_profile["mapping"].append(new_p) + + print(Style.BRIGHT + "Mappings Generated" + Style.RESET_ALL) + + return transformed_profile + +# ## Main Script +# +# Prepare the YAML data, save then display it +# Generate the HTML profile page + +# For each new uploaded JSON-LD file +for arg in sys.argv: + if 'json' in arg.split('.'): + arglist= arg.split('/') + profile_name=arg.split('/')[-1].split('.')[0] + print(Fore.YELLOW + 'added/updated profile: ' + arg + Style.RESET_ALL) + + in_file = "./"+arg + + with open(in_file, "r", encoding="utf-8") as i: + data = json.load(i) + + #print(json.dumps(data['@graph'][0], indent=True)) + + + for g in data["@graph"]: + + print(Fore.BLUE + Style.BRIGHT + f'Profile : {g["@id"]}' + Style.RESET_ALL) + #print(Style.BRIGHT + f'{g.keys()}' + Style.RESET_ALL) + + #For each profile : + #Prepare the transfermed profile : spec_info & mapping fields + transformed_profile = generate_transformed_profile(g) + + #print(json.dumps(transformed_profile, indent=True)) + #print(yaml.dump(transformed_profile, indent=4, default_flow_style=False)) + + #To display only the bioschemas:ComputationalTool + break + + # Inject the YAML in a HTML File + # Note: The folder should be in the transformed_profile["spec_info"]["title"] folder + + ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually + + folderpath = "./Profiles/"+profile_name + out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" + out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" + + if path.exists(folderpath): + print ("folder esists") + else: + #os.makedirs(os.path.dirname(folderpath), exist_ok=True) + Path(folderpath).mkdir(parents=True, exist_ok=True) + print("Create folder : ", folderpath) + + + with open(out_YAML_file, "w", encoding="utf-8") as o: + yaml.dump(transformed_profile, o) + + print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) + + top_of_the_page=''' +redirect_from: +- "devSpecs/Tool/specification" +- "devSpecs/Tool/specification/" +- "/devSpecs/Tool/" +- "/devSpecs/Tool" +- "/specifications/drafts/Tool" +- "/specifications/drafts/Tool/" +- "/profiles/Tool/" +- "/profiles/Tool" +- "/profiles/ComputationalTool/" +- "/profiles/ComputationalTool" +- "/profiles/Tool/0.6-DRAFT/" + +hierarchy: +- Thing +- CreativeWork +- SoftwareApplication + +name: ComputationalTool + +previous_version: 0.5-DRAFT +previous_release: + +status: revision +spec_type: Profile +group: tools +use_cases_url: '/useCases/ComputationalTool' +cross_walk_url: https://docs.google.com/spreadsheets/d/12W7DQkUfsY0lrHEVvowgHXAcO2WJyNI6c8ZJzXgzoRI/edit +gh_tasks: https://github.com/Bioschemas/bioschemas/labels/type%3A%20Tool +live_deploy: /liveDeploys + +parent_type: SoftwareApplication +hierarchy: +- Thing +- CreativeWork +- SoftwareApplication + +# spec_info content generated using GOWeb +# DO NOT MANUALLY EDIT THE CONTENT +''' + with open(out_HTML_file, "w", encoding="utf-8") as o: + o.write("---") + o.write(top_of_the_page) + yaml.dump(transformed_profile, o) + o.write("---") + + print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) \ No newline at end of file From 568c709a447f8385c3c0acc2c6381a6c03245f6f Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 11:15:14 +0200 Subject: [PATCH 002/162] Trigger the bioschemas website's workflow --- .../trigger_the_website_workflow.yml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/trigger_the_website_workflow.yml diff --git a/.github/workflows/trigger_the_website_workflow.yml b/.github/workflows/trigger_the_website_workflow.yml new file mode 100644 index 00000000..84823678 --- /dev/null +++ b/.github/workflows/trigger_the_website_workflow.yml @@ -0,0 +1,21 @@ +name: Trigger bioschemas.github.io Workflow +on: [push] +jobs: + build: + name: Fire the "auto-generate-profile" Action + runs-on: ubuntu-latest + steps: + - name: Wait 5s + run: | + echo "Wait 5s,so that workflows do not overlap" + sleep 5s + - uses: convictional/trigger-workflow-and-wait@v1.3.0 + with: + owner: BioSchemas + repo: bioschemas.github.io + github_token: ${{ secrets.Sahar_Workflows_Token }} + workflow_file_name: generate_profile_workflow.yml + ref: profile-auto-generation + - name: Done! + run: | + echo "Done! Check bioschemas.github.io Repo " \ No newline at end of file From adab7d55a1f0ed79d6c2cbbc11122c92a9fc1ec7 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 11:15:39 +0200 Subject: [PATCH 003/162] Profile Generation Workflow --- .../workflows/generate_profile_workflow.yml | 60 +++++++++++++++++++ .github/workflows/requirements.txt | 4 ++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/generate_profile_workflow.yml create mode 100644 .github/workflows/requirements.txt diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml new file mode 100644 index 00000000..830816b5 --- /dev/null +++ b/.github/workflows/generate_profile_workflow.yml @@ -0,0 +1,60 @@ +# This workflow will generate/update a/the profile HTML page each time the +# DDE genrates and update a JSON-LD in the _data/specifications folder (repo) + +name: auto-generate-profile + +on: [push] +jobs: + generate-profile: + runs-on: ubuntu-latest + + steps: + # Display the changed files + + - name: Checkout and Retreive the Preceding Commit + uses: actions/checkout@v3 + with: + fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@v21 + + - name: List Changed Files + run: | + for file in ${{ steps.changed-files.outputs.all_changed_files }}; do + echo "$file was changed" + done + + # Run the python script + # Generate / Save the HTML profile in pages/_profiles + + - name: Setup Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 #install the python needed + - name: Install Python dependencies + uses: py-actions/py-dependency-install@v3 + with: + path: "./.github/workflows/requirements.txt" + + - name: Execute the Python Script + run: | + python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} + + # Commit and push the changes to the branch + - name: Setup the Github TOKEN + uses: oleksiyrudenko/gha-git-credentials@v2-latest + with: + token: '${{secrets.GITHUB_TOKEN}}' + - name: Git Status + run: git status + - name: Git Add Changed Files + run: git add . + - name: Git Commit Changed Files + run: git commit -m "Updating Profile" # How to commit with a specific msg + - name: Push Code to Branch + run: git push origin HEAD:git-actions-test # Updated to master after the merge + - name: End Workflow + run: | + echo "End Workflow!" \ No newline at end of file diff --git a/.github/workflows/requirements.txt b/.github/workflows/requirements.txt new file mode 100644 index 00000000..d68b0141 --- /dev/null +++ b/.github/workflows/requirements.txt @@ -0,0 +1,4 @@ +jsonlib-python3==1.6.1 +PyYAML==6.0 +colorama==0.4.4 +GitPython \ No newline at end of file From e3c8f795f63c86bc3530fd033af998437fe02632 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 11:15:49 +0200 Subject: [PATCH 004/162] Readme File --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 128a3398..5341e086 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,6 @@ The folders in this repository correspond to the [profiles](https://bioschemas.o Within each folder, you will find a README file giving a brief overview of the profile, and an examples folder. Within the examples folder, you will find subfolders corresponding to different versions of the profile. Within these folders you will provide examples of markup that conform to the specific version of a profile. + +## Github Actions + From db48e3264a61809d331a9048b60a8f6209c18d3c Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Mon, 4 Jul 2022 15:29:00 +0200 Subject: [PATCH 005/162] Save the generated file directly in the website --- .github/workflows/profile_generation_script.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index ba02ae4f..7a27139e 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -196,7 +196,7 @@ def generate_transformed_profile(g): for arg in sys.argv: if 'json' in arg.split('.'): arglist= arg.split('/') - profile_name=arg.split('/')[-1].split('.')[0] + profile_name=arg.split('/')[-1].split('.')[0].split('_')[0] print(Fore.YELLOW + 'added/updated profile: ' + arg + Style.RESET_ALL) in_file = "./"+arg @@ -227,9 +227,9 @@ def generate_transformed_profile(g): ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually - folderpath = "./Profiles/"+profile_name + folderpath = "./bioschemas.github.io/pages/_profiles/"+profile_name out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" - out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" + #out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" if path.exists(folderpath): print ("folder esists") @@ -239,10 +239,10 @@ def generate_transformed_profile(g): print("Create folder : ", folderpath) - with open(out_YAML_file, "w", encoding="utf-8") as o: - yaml.dump(transformed_profile, o) + #with open(out_YAML_file, "w", encoding="utf-8") as o: + # yaml.dump(transformed_profile, o) - print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) + #print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) top_of_the_page=''' redirect_from: @@ -291,4 +291,4 @@ def generate_transformed_profile(g): yaml.dump(transformed_profile, o) o.write("---") - print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) \ No newline at end of file + print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) From 060d447589bb22cad0e97916f62d3ce16ab1a680 Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Mon, 4 Jul 2022 15:29:45 +0200 Subject: [PATCH 006/162] Update --- .../workflows/generate_profile_workflow.yml | 55 ++++++++++++------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 830816b5..cee2e573 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -1,7 +1,7 @@ # This workflow will generate/update a/the profile HTML page each time the # DDE genrates and update a JSON-LD in the _data/specifications folder (repo) -name: auto-generate-profile +name: generate-profile on: [push] jobs: @@ -9,12 +9,11 @@ jobs: runs-on: ubuntu-latest steps: - # Display the changed files - - - name: Checkout and Retreive the Preceding Commit + + - name: Checkout Spec Repo and Retreive the Preceding Commit uses: actions/checkout@v3 with: - fetch-depth: 0 # OR "2" -> To retrieve the preceding commit. + fetch-depth: 0 - name: Get Changed Files id: changed-files @@ -26,9 +25,6 @@ jobs: echo "$file was changed" done - # Run the python script - # Generate / Save the HTML profile in pages/_profiles - - name: Setup Python 3.8 uses: actions/setup-python@v2 with: @@ -38,23 +34,42 @@ jobs: with: path: "./.github/workflows/requirements.txt" + - name: Checkout the Website repo + env: + GITHUB_TOKEN: ${{ secrets.Sahar_Workflows_Token }} + run: | + git clone https://user:$GITHUB_TOKEN@github.com/BioSchemas/bioschemas.github.io + ls + + - name: Checkout the branch profile-auto-generation + run: | + cd bioschemas.github.io + git pull + git checkout -b profile-auto-generation + cd .. + - name: Execute the Python Script run: | - python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} + python ./.github/workflows/conversion.py ${{steps.changed-files.outputs.all_changed_files}} - # Commit and push the changes to the branch - name: Setup the Github TOKEN uses: oleksiyrudenko/gha-git-credentials@v2-latest with: - token: '${{secrets.GITHUB_TOKEN}}' - - name: Git Status - run: git status - - name: Git Add Changed Files - run: git add . - - name: Git Commit Changed Files - run: git commit -m "Updating Profile" # How to commit with a specific msg - - name: Push Code to Branch - run: git push origin HEAD:git-actions-test # Updated to master after the merge + path: bioschemas.github.io + email: sahar.frikha1@gmail.com + name: sahar-frikha + actor: sahar-frikha + token: '${{secrets.Sahar_Workflows_Token}}' + + - name: Commit and Push the changes in the website + run: | + cd bioschemas.github.io + git config user.name "sahar-frikha" + git config user.email "sahar.frikha1@gmail.com" + git add . + git commit -m "Updating Profile" # How to commit with a specific msg + git push origin -f profile-auto-generation + - name: End Workflow run: | - echo "End Workflow!" \ No newline at end of file + echo "Check the Website !" From 2f5e53837b55ec46e94f5303fa529bebfe051c5e Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Mon, 4 Jul 2022 15:30:45 +0200 Subject: [PATCH 007/162] Delete trigger_the_website_workflow.yml --- .../trigger_the_website_workflow.yml | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/trigger_the_website_workflow.yml diff --git a/.github/workflows/trigger_the_website_workflow.yml b/.github/workflows/trigger_the_website_workflow.yml deleted file mode 100644 index 84823678..00000000 --- a/.github/workflows/trigger_the_website_workflow.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Trigger bioschemas.github.io Workflow -on: [push] -jobs: - build: - name: Fire the "auto-generate-profile" Action - runs-on: ubuntu-latest - steps: - - name: Wait 5s - run: | - echo "Wait 5s,so that workflows do not overlap" - sleep 5s - - uses: convictional/trigger-workflow-and-wait@v1.3.0 - with: - owner: BioSchemas - repo: bioschemas.github.io - github_token: ${{ secrets.Sahar_Workflows_Token }} - workflow_file_name: generate_profile_workflow.yml - ref: profile-auto-generation - - name: Done! - run: | - echo "Done! Check bioschemas.github.io Repo " \ No newline at end of file From d63290c5430b6df2cd6c8e2dfbd30e4e05f0824c Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Mon, 4 Jul 2022 15:32:26 +0200 Subject: [PATCH 008/162] little fix --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index cee2e573..9165479c 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -50,7 +50,7 @@ jobs: - name: Execute the Python Script run: | - python ./.github/workflows/conversion.py ${{steps.changed-files.outputs.all_changed_files}} + python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} - name: Setup the Github TOKEN uses: oleksiyrudenko/gha-git-credentials@v2-latest From 62a073a04409343e4519a3744b7115c741458418 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 15:37:40 +0200 Subject: [PATCH 009/162] some change in the Taxon profile --- Taxon/jsonld/Taxon_v0.7-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.7-DRAFT.json b/Taxon/jsonld/Taxon_v0.7-DRAFT.json index 4ff80c36..c858bd2b 100644 --- a/Taxon/jsonld/Taxon_v0.7-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.7-DRAFT.json @@ -12,7 +12,7 @@ { "@id": "bioschemasdrafts:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "Bioschemas profile for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", + "rdfs:comment": "It's a Bioschemas profile for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.7-DRAFT" ], From 4fd7fcab62125624878e52badc689eceb4bf1310 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 15:39:57 +0200 Subject: [PATCH 010/162] some change in the Taxon profile --- Taxon/jsonld/Taxon_v0.7-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.7-DRAFT.json b/Taxon/jsonld/Taxon_v0.7-DRAFT.json index c858bd2b..4ff80c36 100644 --- a/Taxon/jsonld/Taxon_v0.7-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.7-DRAFT.json @@ -12,7 +12,7 @@ { "@id": "bioschemasdrafts:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "It's a Bioschemas profile for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", + "rdfs:comment": "Bioschemas profile for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.7-DRAFT" ], From 03698baaed80a94a54268722a6f840e1b8a0eea3 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 15:41:31 +0200 Subject: [PATCH 011/162] some change in the Taxon profile --- .github/workflows/profile_generation_script.py | 4 ++-- Taxon/jsonld/Taxon_v0.7-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 7a27139e..9692f8fc 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -228,8 +228,8 @@ def generate_transformed_profile(g): ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually folderpath = "./bioschemas.github.io/pages/_profiles/"+profile_name - out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" - #out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" + #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" + out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" if path.exists(folderpath): print ("folder esists") diff --git a/Taxon/jsonld/Taxon_v0.7-DRAFT.json b/Taxon/jsonld/Taxon_v0.7-DRAFT.json index 4ff80c36..615cc25a 100644 --- a/Taxon/jsonld/Taxon_v0.7-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.7-DRAFT.json @@ -12,7 +12,7 @@ { "@id": "bioschemasdrafts:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "Bioschemas profile for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", + "rdfs:comment": "a Bioschemas profile for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.7-DRAFT" ], From 57656b7aea95838da6641b058648a76e7b9ddb29 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 16:11:25 +0200 Subject: [PATCH 012/162] some change in the comutational tool profile --- .github/workflows/generate_profile_workflow.yml | 2 +- .github/workflows/profile_generation_script.py | 8 ++++++-- .../jsonld/ComputationalTool_v1.0-RELEASE.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 9165479c..04812139 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -50,7 +50,7 @@ jobs: - name: Execute the Python Script run: | - python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} + python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io - name: Setup the Github TOKEN uses: oleksiyrudenko/gha-git-credentials@v2-latest diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 9692f8fc..6effba4a 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -193,7 +193,11 @@ def generate_transformed_profile(g): # Generate the HTML profile page # For each new uploaded JSON-LD file -for arg in sys.argv: +args = sys.argv +website_repo= args[-1] +args.remove(website_repo) + +for arg in args: if 'json' in arg.split('.'): arglist= arg.split('/') profile_name=arg.split('/')[-1].split('.')[0].split('_')[0] @@ -227,7 +231,7 @@ def generate_transformed_profile(g): ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually - folderpath = "./bioschemas.github.io/pages/_profiles/"+profile_name + folderpath = "./"+website_repo+"/pages/_profiles/"+profile_name #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" diff --git a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json index 53cb677d..c44e8ca4 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json +++ b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": "The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover. Version 1.0-RELEASE.", + "rdfs:comment": "The Life Science Tools specification, provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover. Version 1.0-RELEASE.", "rdfs:label": "ComputationalTool", "rdfs:subClassOf": { "@id": "schema:SoftwareApplication" From 8a991e162f2431cd4b83a4e6542ed80778622007 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 16:13:44 +0200 Subject: [PATCH 013/162] some change in the comutational tool profile --- Phenotype/jsonld/Phenotype_v0.1-DRAFT-2018_11_15.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Phenotype/jsonld/Phenotype_v0.1-DRAFT-2018_11_15.json b/Phenotype/jsonld/Phenotype_v0.1-DRAFT-2018_11_15.json index 222eecc0..af20a4df 100644 --- a/Phenotype/jsonld/Phenotype_v0.1-DRAFT-2018_11_15.json +++ b/Phenotype/jsonld/Phenotype_v0.1-DRAFT-2018_11_15.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:Phenotype", "@type": "rdfs:Class", - "rdfs:comment": "Bioschemas profile describing a Phenotype in Life Sciences This Phenotype type specification presents the markup for describing a Phenotype. Version: 0.1-DRAFT-2018_11_15", + "rdfs:comment": "Bioschemas ee describing a Phenotype in Life Sciences This Phenotype type specification presents the markup for describing a Phenotype. Version: 0.1-DRAFT-2018_11_15", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Phenotype/0.1-DRAFT-2018_11_15" ], From ee512a23921e473cd61fc677c34ed3d27f1c458e Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 16:15:16 +0200 Subject: [PATCH 014/162] some change in the comutational tool profile --- ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json index c44e8ca4..cf80e220 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json +++ b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": "The Life Science Tools specification, provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover. Version 1.0-RELEASE.", + "rdfs:comment": "The Life Science Tools Hello, provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover. Version 1.0-RELEASE.", "rdfs:label": "ComputationalTool", "rdfs:subClassOf": { "@id": "schema:SoftwareApplication" From d04d4f06623b9a8368712bb0263dd66539cf709e Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 4 Jul 2022 16:21:59 +0200 Subject: [PATCH 015/162] fix in the script --- .github/workflows/profile_generation_script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 6effba4a..4df42864 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -142,7 +142,7 @@ def generate_spec_info(g): if "schema:schemaVersion" in g.keys(): spec_info["version"] = g['schema:schemaVersion'][0].split('/')[-1] else: - spec_info["version"]="0.5-DRAFT" + spec_info["version"]="" #raise Exception("Please Provide the version of your profile!") if "rdfs:subClassOf" in g.keys(): From d9edbd8568936c3017f3269db67d9d2af05de7c4 Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Mon, 11 Jul 2022 15:36:12 +0200 Subject: [PATCH 016/162] Create readme.md --- .github/readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/readme.md diff --git a/.github/readme.md b/.github/readme.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.github/readme.md @@ -0,0 +1 @@ + From 178d7ca8e4b30bfbd8b2d93048518655067fe1de Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Thu, 21 Jul 2022 14:09:23 +0200 Subject: [PATCH 017/162] Walkthrough --- ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 480b55e3..1b4eddc5 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -23,7 +23,7 @@ "type": "object", "properties": { "additionalType": { - "description": "Type of tool e.g. Command-line tool, Web application etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "Type of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", @@ -827,4 +827,4 @@ ] } ] -} \ No newline at end of file +} From bfbbcbc4dd8013b8adbde7d6f41faba4b8367e96 Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Thu, 21 Jul 2022 14:34:47 +0200 Subject: [PATCH 018/162] Update Dataset_v0.5-DRAFT.json --- Dataset/jsonld/Dataset_v0.5-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dataset/jsonld/Dataset_v0.5-DRAFT.json b/Dataset/jsonld/Dataset_v0.5-DRAFT.json index cf07c524..84b485d0 100644 --- a/Dataset/jsonld/Dataset_v0.5-DRAFT.json +++ b/Dataset/jsonld/Dataset_v0.5-DRAFT.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:Dataset", "@type": "rdfs:Class", - "rdfs:comment": " A guide for how to describe datasets in the life-sciences using Schema.org-like annotation.

Summary of Changes

  • Many: Other #473 \u2013 Updated properties used in the profile to be aligned with schema.org v12.0
  • keywords: Other #311 \u2013 Updated guidance
  • maintainer: Added \u2013 New property in schema.org that is of particular relevance for datasets
  • identifier: Other #310 \u2013 Updated guidance and example
  • alternateName: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • hasPart: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • isPartOf: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • license: Marginality Increase \u2013 Licenses are required to know what terms the dataset can be used under
  • isAccessibleForFree: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • dateCreated: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • dateModified: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • datePublished: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • publisher: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • isBasedOn: Added #477 \u2013 Link a Dataset to a Study that produced it
Version: 0.4-DRAFT", + "rdfs:comment": " A guide for how to describe datasets in the life-sciences using Schema.org-like annotation.

Summary of Changes

  • Many: Other #473 \u2013 Updated properties used in the profile to be aligned with schema.org v12.0
  • keywords: Other #311 \u2013 Updated guidance
  • maintainer: Added \u2013 New property in schema.org that is of particular relevance for datasets
  • identifier: Other #310 \u2013 Updated guidance and example
  • alternateName: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • hasPart: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • isPartOf: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • license: Marginality Increase \u2013 Licenses are required to know what terms the dataset can be used under
  • isAccessibleForFree: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • dateCreated: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • dateModified: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • datePublished: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • publisher: Added #312 \u2013 Adding terms used by other recommendations such as Google or FigShare as optional
  • isBasedOn: Added #477 \u2013 Link a Dataset to a Study that produced it
Version: 0.4-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Dataset/0.5-DRAFT" ], From 6fd5b58bfab77f2d77dad616c6ccd70a8a211960 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 25 Jul 2022 13:38:23 +0200 Subject: [PATCH 019/162] parse the dde csv --- .../workflows/generate_profile_workflow.yml | 7 ++ .../workflows/profile_generation_script.py | 105 +++++++++--------- BioSample/jsonld/BioSample_v0.1-RELEASE.json | 2 +- 3 files changed, 61 insertions(+), 53 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 04812139..7b8c3e60 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -33,6 +33,13 @@ jobs: uses: py-actions/py-dependency-install@v3 with: path: "./.github/workflows/requirements.txt" + - name: Checkout the DDE repo + env: + GITHUB_TOKEN: ${{ secrets.Sahar_Workflows_Token }} + run: | + git clone https://user:$GITHUB_TOKEN@github.com/BioSchemas/bioschemas-dde + git branch + ls - name: Checkout the Website repo env: diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 4df42864..b878adc0 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -198,57 +198,58 @@ def generate_transformed_profile(g): args.remove(website_repo) for arg in args: - if 'json' in arg.split('.'): - arglist= arg.split('/') - profile_name=arg.split('/')[-1].split('.')[0].split('_')[0] - print(Fore.YELLOW + 'added/updated profile: ' + arg + Style.RESET_ALL) - - in_file = "./"+arg - - with open(in_file, "r", encoding="utf-8") as i: - data = json.load(i) - - #print(json.dumps(data['@graph'][0], indent=True)) - - - for g in data["@graph"]: - - print(Fore.BLUE + Style.BRIGHT + f'Profile : {g["@id"]}' + Style.RESET_ALL) - #print(Style.BRIGHT + f'{g.keys()}' + Style.RESET_ALL) - - #For each profile : - #Prepare the transfermed profile : spec_info & mapping fields - transformed_profile = generate_transformed_profile(g) + if 'jsonld' in arg.split('.'): + if 'json' in arg.split('.'): + arglist= arg.split('/') + profile_name=arg.split('/')[-1].split('.')[0].split('_')[0] + print(Fore.YELLOW + 'added/updated profile: ' + arg + Style.RESET_ALL) + + in_file = "./"+arg + + with open(in_file, "r", encoding="utf-8") as i: + data = json.load(i) + + #print(json.dumps(data['@graph'][0], indent=True)) + + + for g in data["@graph"]: + + print(Fore.BLUE + Style.BRIGHT + f'Profile : {g["@id"]}' + Style.RESET_ALL) + #print(Style.BRIGHT + f'{g.keys()}' + Style.RESET_ALL) + + #For each profile : + #Prepare the transfermed profile : spec_info & mapping fields + transformed_profile = generate_transformed_profile(g) + + #print(json.dumps(transformed_profile, indent=True)) + #print(yaml.dump(transformed_profile, indent=4, default_flow_style=False)) + + #To display only the bioschemas:ComputationalTool + break + + # Inject the YAML in a HTML File + # Note: The folder should be in the transformed_profile["spec_info"]["title"] folder + + ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually - #print(json.dumps(transformed_profile, indent=True)) - #print(yaml.dump(transformed_profile, indent=4, default_flow_style=False)) - - #To display only the bioschemas:ComputationalTool - break - - # Inject the YAML in a HTML File - # Note: The folder should be in the transformed_profile["spec_info"]["title"] folder - - ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually - - folderpath = "./"+website_repo+"/pages/_profiles/"+profile_name - #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" - out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" + folderpath = "./"+website_repo+"/pages/_profiles/"+profile_name + #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" + out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" - if path.exists(folderpath): - print ("folder esists") - else: - #os.makedirs(os.path.dirname(folderpath), exist_ok=True) - Path(folderpath).mkdir(parents=True, exist_ok=True) - print("Create folder : ", folderpath) + if path.exists(folderpath): + print ("folder esists") + else: + #os.makedirs(os.path.dirname(folderpath), exist_ok=True) + Path(folderpath).mkdir(parents=True, exist_ok=True) + print("Create folder : ", folderpath) - #with open(out_YAML_file, "w", encoding="utf-8") as o: - # yaml.dump(transformed_profile, o) + #with open(out_YAML_file, "w", encoding="utf-8") as o: + # yaml.dump(transformed_profile, o) - #print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) - - top_of_the_page=''' + #print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) + + top_of_the_page=''' redirect_from: - "devSpecs/Tool/specification" - "devSpecs/Tool/specification/" @@ -289,10 +290,10 @@ def generate_transformed_profile(g): # spec_info content generated using GOWeb # DO NOT MANUALLY EDIT THE CONTENT ''' - with open(out_HTML_file, "w", encoding="utf-8") as o: - o.write("---") - o.write(top_of_the_page) - yaml.dump(transformed_profile, o) - o.write("---") + with open(out_HTML_file, "w", encoding="utf-8") as o: + o.write("---") + o.write(top_of_the_page) + yaml.dump(transformed_profile, o) + o.write("---") - print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) + print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) diff --git a/BioSample/jsonld/BioSample_v0.1-RELEASE.json b/BioSample/jsonld/BioSample_v0.1-RELEASE.json index 278fd275..4c327359 100644 --- a/BioSample/jsonld/BioSample_v0.1-RELEASE.json +++ b/BioSample/jsonld/BioSample_v0.1-RELEASE.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:BioSample", "@type": "rdfs:Class", - "rdfs:comment": "A biological material entity that is representative of a whole.\nComments: Typically samples are intended to be representative of the whole or aspects thereof. Examples of samples include biomedical samples (blood, urine) and plant specimens held at herbaria. Version 0.1-RELEASE. Note, the parent class for this schema has been updated to a pending class in schema.org.", + "rdfs:comment": "A biological frzer entity that is representative of a whole.\nComments: Typically samples are intended to be representative of the whole or aspects thereof. Examples of samples include biomedical samples (blood, urine) and plant specimens held at herbaria. Version 0.1-RELEASE. Note, the parent class for this schema has been updated to a pending class in schema.org.", "rdfs:label": "BioSample", "schema:additionalType":"https://bioschemas.org/types#nav-release", "schema:schemaVersion":"0.1-RELEASE", From d7f342c545dced781271a4dcf837e4914394da32 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Mon, 25 Jul 2022 13:40:37 +0200 Subject: [PATCH 020/162] parse the dde csv --- .github/workflows/profile_generation_script.py | 2 +- BioSample/jsonld/BioSample_v0.1-RELEASE.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index b878adc0..cf4707fd 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -198,7 +198,7 @@ def generate_transformed_profile(g): args.remove(website_repo) for arg in args: - if 'jsonld' in arg.split('.'): + if 'jsonld' in arg.split('/'): if 'json' in arg.split('.'): arglist= arg.split('/') profile_name=arg.split('/')[-1].split('.')[0].split('_')[0] diff --git a/BioSample/jsonld/BioSample_v0.1-RELEASE.json b/BioSample/jsonld/BioSample_v0.1-RELEASE.json index 4c327359..226bacea 100644 --- a/BioSample/jsonld/BioSample_v0.1-RELEASE.json +++ b/BioSample/jsonld/BioSample_v0.1-RELEASE.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:BioSample", "@type": "rdfs:Class", - "rdfs:comment": "A biological frzer entity that is representative of a whole.\nComments: Typically samples are intended to be representative of the whole or aspects thereof. Examples of samples include biomedical samples (blood, urine) and plant specimens held at herbaria. Version 0.1-RELEASE. Note, the parent class for this schema has been updated to a pending class in schema.org.", + "rdfs:comment": "A biological frzer ss that is representative of a whole.\nComments: Typically samples are intended to be representative of the whole or aspects thereof. Examples of samples include biomedical samples (blood, urine) and plant specimens held at herbaria. Version 0.1-RELEASE. Note, the parent class for this schema has been updated to a pending class in schema.org.", "rdfs:label": "BioSample", "schema:additionalType":"https://bioschemas.org/types#nav-release", "schema:schemaVersion":"0.1-RELEASE", From 03810cefe098f112d01fe387ab8594dfc00e28e6 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 26 Jul 2022 13:48:28 +0200 Subject: [PATCH 021/162] parse the dde csv --- .../workflows/profile_generation_script.py | 72 ++++++++----------- 1 file changed, 31 insertions(+), 41 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index cf4707fd..b9a43f3a 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -6,6 +6,7 @@ from colorama import Style import sys import os.path +import csv from os import path def generate_types_cardianlity(g,prop): @@ -224,8 +225,33 @@ def generate_transformed_profile(g): #print(json.dumps(transformed_profile, indent=True)) #print(yaml.dump(transformed_profile, indent=4, default_flow_style=False)) - #To display only the bioschemas:ComputationalTool - break + ### Metadata + profile_metadata = dict() + + profile_metadata['name']=g["@id"].split(':')[1] + profile_metadata['use_cases_url']='/useCases/'+profile_metadata['name'] + + with open('bioschemas-dde/draft_profile_list.txt') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + line_count = 0 + for row in csv_reader: + line_count += 1 + if line_count > 1: + fields = row[0].split('\t') + if fields[1]==profile_metadata['name']: + #print(f'\n namespace={fields[0]}, name={fields[1]}, subclassof={fields[2]}, type={fields[3]}, version={fields[4]}, url={fields[5]}.') + + profile_metadata['redirect_from']=list() + profile_metadata['hierarchy']=list() + profile_metadata['previous_version']=fields[4] + profile_metadata['previous_release']="" + profile_metadata['status']="" + profile_metadata['spec_type']=fields[3] + profile_metadata['group']="tools" + profile_metadata['cross_walk_url']=fields[5] + profile_metadata['gh_tasks']="" + profile_metadata['live_deploy']="/liveDeploys" + profile_metadata['parent_type']="" # Inject the YAML in a HTML File # Note: The folder should be in the transformed_profile["spec_info"]["title"] folder @@ -249,50 +275,14 @@ def generate_transformed_profile(g): #print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) - top_of_the_page=''' -redirect_from: -- "devSpecs/Tool/specification" -- "devSpecs/Tool/specification/" -- "/devSpecs/Tool/" -- "/devSpecs/Tool" -- "/specifications/drafts/Tool" -- "/specifications/drafts/Tool/" -- "/profiles/Tool/" -- "/profiles/Tool" -- "/profiles/ComputationalTool/" -- "/profiles/ComputationalTool" -- "/profiles/Tool/0.6-DRAFT/" - -hierarchy: -- Thing -- CreativeWork -- SoftwareApplication - -name: ComputationalTool - -previous_version: 0.5-DRAFT -previous_release: - -status: revision -spec_type: Profile -group: tools -use_cases_url: '/useCases/ComputationalTool' -cross_walk_url: https://docs.google.com/spreadsheets/d/12W7DQkUfsY0lrHEVvowgHXAcO2WJyNI6c8ZJzXgzoRI/edit -gh_tasks: https://github.com/Bioschemas/bioschemas/labels/type%3A%20Tool -live_deploy: /liveDeploys - -parent_type: SoftwareApplication -hierarchy: -- Thing -- CreativeWork -- SoftwareApplication - + message=''' # spec_info content generated using GOWeb # DO NOT MANUALLY EDIT THE CONTENT ''' with open(out_HTML_file, "w", encoding="utf-8") as o: o.write("---") - o.write(top_of_the_page) + yaml.dump(profile_metadata, o) + o.write(message) yaml.dump(transformed_profile, o) o.write("---") From f1074c18be759fbd940eebca2a31cfe59f123f01 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 26 Jul 2022 13:48:45 +0200 Subject: [PATCH 022/162] parse the dde csv --- BioSample/jsonld/BioSample_v0.1-RELEASE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BioSample/jsonld/BioSample_v0.1-RELEASE.json b/BioSample/jsonld/BioSample_v0.1-RELEASE.json index 226bacea..25c39532 100644 --- a/BioSample/jsonld/BioSample_v0.1-RELEASE.json +++ b/BioSample/jsonld/BioSample_v0.1-RELEASE.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:BioSample", "@type": "rdfs:Class", - "rdfs:comment": "A biological frzer ss that is representative of a whole.\nComments: Typically samples are intended to be representative of the whole or aspects thereof. Examples of samples include biomedical samples (blood, urine) and plant specimens held at herbaria. Version 0.1-RELEASE. Note, the parent class for this schema has been updated to a pending class in schema.org.", + "rdfs:comment": "A rgrfr frzer ss that is representative of a whole.\nComments: Typically samples are intended to be representative of the whole or aspects thereof. Examples of samples include biomedical samples (blood, urine) and plant specimens held at herbaria. Version 0.1-RELEASE. Note, the parent class for this schema has been updated to a pending class in schema.org.", "rdfs:label": "BioSample", "schema:additionalType":"https://bioschemas.org/types#nav-release", "schema:schemaVersion":"0.1-RELEASE", From 5d018cfeed17699fbec2282550fde767a086c57e Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 26 Jul 2022 13:52:01 +0200 Subject: [PATCH 023/162] parse the dde csv --- .github/workflows/profile_generation_script.py | 3 ++- ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index b9a43f3a..fc8335eb 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -280,7 +280,8 @@ def generate_transformed_profile(g): # DO NOT MANUALLY EDIT THE CONTENT ''' with open(out_HTML_file, "w", encoding="utf-8") as o: - o.write("---") + o.write('''--- +''') yaml.dump(profile_metadata, o) o.write(message) yaml.dump(transformed_profile, o) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 1b4eddc5..b0e95e79 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": "Bioschemas specification for describing a SoftwareApplication in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": "zzzz specification for describing a SoftwareApplication in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.5-DRAFT" ], From 23858d161370400c5deb1126fe4caeeaca94cdcb Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 28 Jul 2022 11:33:04 +0200 Subject: [PATCH 024/162] change the branch name --- .github/workflows/generate_profile_workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 7b8c3e60..dfa0a3a0 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -79,4 +79,5 @@ jobs: - name: End Workflow run: | + date /t echo "Check the Website !" From 450ab813bf596c1a9b71bae8f5059a4f53228a43 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 28 Jul 2022 11:55:39 +0200 Subject: [PATCH 025/162] change the branch name --- .github/workflows/generate_profile_workflow.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index dfa0a3a0..731f471a 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -54,7 +54,11 @@ jobs: git pull git checkout -b profile-auto-generation cd .. - + + - name: Some random tests + run: | + date /t + - name: Execute the Python Script run: | python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io @@ -79,5 +83,4 @@ jobs: - name: End Workflow run: | - date /t - echo "Check the Website !" + echo "Check the Website !" \ No newline at end of file From 93dd9c22698e5d2b764265b9dab1bf32a9be1a67 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 28 Jul 2022 14:00:45 +0200 Subject: [PATCH 026/162] change the branch name --- .github/workflows/generate_profile_workflow.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 731f471a..0b84d6a1 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -52,12 +52,16 @@ jobs: run: | cd bioschemas.github.io git pull - git checkout -b profile-auto-generation + git checkout profile-auto-generation cd .. - name: Some random tests run: | - date /t + date + today=`date +%F` + echo $today + cd bioschemas.github.io + git checkout -b $today - name: Execute the Python Script run: | From c79b8869799e3c11c487f4411c7bfd41e2771dbe Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 28 Jul 2022 14:06:00 +0200 Subject: [PATCH 027/162] change the branch name --- .github/workflows/generate_profile_workflow.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 0b84d6a1..04ce8ecd 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -55,13 +55,14 @@ jobs: git checkout profile-auto-generation cd .. - - name: Some random tests + - name: Create and checkout to a new branch run: | - date + echo "the workflow has runed at:" date today=`date +%F` - echo $today cd bioschemas.github.io + git pull git checkout -b $today + cd .. - name: Execute the Python Script run: | From 34ab7d8dae1cf23603afe12f00ba5da3bfa5dbe1 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 28 Jul 2022 14:08:57 +0200 Subject: [PATCH 028/162] change the branch name --- .github/workflows/generate_profile_workflow.yml | 14 ++++---------- .../jsonld/ComputationalTool_v1.0-RELEASE.json | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 04ce8ecd..d1339b8a 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -48,16 +48,10 @@ jobs: git clone https://user:$GITHUB_TOKEN@github.com/BioSchemas/bioschemas.github.io ls - - name: Checkout the branch profile-auto-generation - run: | - cd bioschemas.github.io - git pull - git checkout profile-auto-generation - cd .. - - - name: Create and checkout to a new branch + - name: Checkout a new branch run: | - echo "the workflow has runed at:" date + echo "the workflow has runed at:" + date today=`date +%F` cd bioschemas.github.io git pull @@ -84,7 +78,7 @@ jobs: git config user.email "sahar.frikha1@gmail.com" git add . git commit -m "Updating Profile" # How to commit with a specific msg - git push origin -f profile-auto-generation + git push origin -f $today - name: End Workflow run: | diff --git a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json index cf80e220..5e4e6429 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json +++ b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": "The Life Science Tools Hello, provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover. Version 1.0-RELEASE.", + "rdfs:comment": "The Life Science Tools Hello, provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the ssss is to make it easier to discover. Version 1.0-RELEASE.", "rdfs:label": "ComputationalTool", "rdfs:subClassOf": { "@id": "schema:SoftwareApplication" From 7d47077d0f91e1b6e4612e4b01aa1320a16d4991 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 28 Jul 2022 14:14:00 +0200 Subject: [PATCH 029/162] change the branch name --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index d1339b8a..b988e224 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -78,7 +78,7 @@ jobs: git config user.email "sahar.frikha1@gmail.com" git add . git commit -m "Updating Profile" # How to commit with a specific msg - git push origin -f $today + git push --set-upstream origin $today - name: End Workflow run: | From 877525f25248b0bfe3f85b50574cc66ddc6fe2f7 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 28 Jul 2022 14:24:16 +0200 Subject: [PATCH 030/162] change the branch name --- ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json index 5e4e6429..3018c7de 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json +++ b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json @@ -19,7 +19,7 @@ "type": "object", "properties": { "codeRepository": { - "description": "Link to the source code repository of the tool.", + "description": "Link to the dd code repository of the tool.", "oneOf": [ { "type": "string", From 4d535f4471e4966cb824ca426c14259dfb65b472 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 28 Jul 2022 14:27:01 +0200 Subject: [PATCH 031/162] change the branch name --- .github/workflows/generate_profile_workflow.yml | 1 + ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index b988e224..2a1d9113 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -78,6 +78,7 @@ jobs: git config user.email "sahar.frikha1@gmail.com" git add . git commit -m "Updating Profile" # How to commit with a specific msg + today=`date +%F` git push --set-upstream origin $today - name: End Workflow diff --git a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json index 3018c7de..2f559880 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json +++ b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json @@ -19,7 +19,7 @@ "type": "object", "properties": { "codeRepository": { - "description": "Link to the dd code repository of the tool.", + "description": "Link to the drrrrd code repository of the tool.", "oneOf": [ { "type": "string", From cf54bd277525d3139c915207cba6a81a4949bbce Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Thu, 28 Jul 2022 17:00:05 +0200 Subject: [PATCH 032/162] Update Course_v0.7-DRAFT-2019_11_08.json --- Course/jsonld/Course_v0.7-DRAFT-2019_11_08.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Course/jsonld/Course_v0.7-DRAFT-2019_11_08.json b/Course/jsonld/Course_v0.7-DRAFT-2019_11_08.json index d48c04bc..502a6843 100644 --- a/Course/jsonld/Course_v0.7-DRAFT-2019_11_08.json +++ b/Course/jsonld/Course_v0.7-DRAFT-2019_11_08.json @@ -22,7 +22,7 @@ "type": "object", "properties": { "about": { - "description": "The subject of this Course. Use the DefinedTerm type to add a controlled-vocabulary term to categorise the course (e.g., using the [EDAM Topic ontology](EDAM Topic ontology](https://bioportal.bioontology.org/ontologies/EDAM/?p=classes&conceptid=http%3A%2F%2Fedamontology.org%2Ftopic_0003)). The subject matter of the content.\nInverse property: subjectOf.", + "description": "The subject of this Course. Sahar the DefinedTerm type to add a controlled-vocabulary term to categorise the course (e.g., using the [EDAM Topic ontology](EDAM Topic ontology](https://bioportal.bioontology.org/ontologies/EDAM/?p=classes&conceptid=http%3A%2F%2Fedamontology.org%2Ftopic_0003)). The subject matter of the content.\nInverse property: subjectOf.", "oneOf": [ { "$ref": "#/definitions/thing" @@ -726,4 +726,4 @@ ] } ] -} \ No newline at end of file +} From 977c4db5ceb2b6a32a1f33a0c4c10d0bd12ecb0b Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Thu, 28 Jul 2022 17:07:48 +0200 Subject: [PATCH 033/162] Update generate_profile_workflow.yml --- .github/workflows/generate_profile_workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 2a1d9113..7793cf25 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -46,6 +46,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.Sahar_Workflows_Token }} run: | git clone https://user:$GITHUB_TOKEN@github.com/BioSchemas/bioschemas.github.io + cd bioschemas.github.io + git pull ls - name: Checkout a new branch @@ -83,4 +85,4 @@ jobs: - name: End Workflow run: | - echo "Check the Website !" \ No newline at end of file + echo "Check the Website !" From eef18bf4e0b28f7cbc05304b2cfb9c2e617c0711 Mon Sep 17 00:00:00 2001 From: Sahar FRIKHA Date: Thu, 28 Jul 2022 17:08:19 +0200 Subject: [PATCH 034/162] Update ComputationalTool_v0.5-DRAFT.json --- ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index b0e95e79..712bfe66 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": "zzzz specification for describing a SoftwareApplication in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.5-DRAFT" ], From 5231dcb4332df64c81ac3feffcc0fbfb036262be Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 3 Aug 2022 11:08:17 +0200 Subject: [PATCH 035/162] enourmous change --- .../generate_metadata.cpython-39.pyc | Bin 0 -> 1727 bytes .../generate_property.cpython-39.pyc | Bin 0 -> 791 bytes .../generate_spec_info.cpython-39.pyc | Bin 0 -> 800 bytes ...enerate_transformed_profile.cpython-39.pyc | Bin 0 -> 2006 bytes .../generate_types_cardinality.cpython-39.pyc | Bin 0 -> 1252 bytes .github/workflows/generate_metadata.py | 52 +++++ .../workflows/generate_profile_workflow.yml | 14 ++ .github/workflows/generate_property.py | 38 ++++ .github/workflows/generate_spec_info.py | 27 +++ .../workflows/generate_transformed_profile.py | 66 +++++++ .../workflows/generate_types_cardinality.py | 78 ++++++++ .../workflows/profile_generation_script.py | 185 +----------------- 12 files changed, 277 insertions(+), 183 deletions(-) create mode 100644 .github/workflows/__pycache__/generate_metadata.cpython-39.pyc create mode 100644 .github/workflows/__pycache__/generate_property.cpython-39.pyc create mode 100644 .github/workflows/__pycache__/generate_spec_info.cpython-39.pyc create mode 100644 .github/workflows/__pycache__/generate_transformed_profile.cpython-39.pyc create mode 100644 .github/workflows/__pycache__/generate_types_cardinality.cpython-39.pyc create mode 100644 .github/workflows/generate_metadata.py create mode 100644 .github/workflows/generate_property.py create mode 100644 .github/workflows/generate_spec_info.py create mode 100644 .github/workflows/generate_transformed_profile.py create mode 100644 .github/workflows/generate_types_cardinality.py diff --git a/.github/workflows/__pycache__/generate_metadata.cpython-39.pyc b/.github/workflows/__pycache__/generate_metadata.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6f12984bcdc333fb11d527718b0b0e7c43d9f52c GIT binary patch literal 1727 zcmbVN&2Jk;6rUOImmND_jS?a%6d^!Z5W8@IOB9ikv>-(}*x|AgvbH;8dy`%7_RYAF ztK^hQzzq(ZxWLi>(q1`*E4N(Wy-CtEZiPfgdh_PZ$NqlvK4zmvqsFlP`sH6wes&rA zlZ;oJK;tVEU0^4f#0eZr4mw6>~aq-72UZ6w*4xPVzG@#VPxp$;uyGI_qqWy|i4iequkcK9`>K zUj&B#$jOR4-E|l97p8#iXolQ3T>VE4J$h{x=GH{_#MWUIFS^ zl8<%o8Ir+Iwzkqdj#9migPSAGpmcSSCI-j{rCUHUGC;lv-N&HR2z;9N9(KNc{LNum z?d)~;4tqQM`^`$ZL^tlm!)P>6vS&lTIExup^HDmXHEn$Z^Y}Sfpl`0ci6fzDoA}%j z8)8-5=kN~By%sKt;n%b|z>czqVm%cHK(>Wy3RuN)dCLhDx*Q`zLAvVRK;(MU67JEI zq6~?^yQp8IKsjJ3e1QW?fznrC`c~GNbdCkwm+l!Kt=dGsnfGx1bLn3Z#^khwFZt%h zKiEQdx3lx;Fbp~vI*M87clP%8cDj3EZC9alF*%fMa#%)4%s>A+w56v_WX9J%w)eAF ztC5edme%lurVPOg@n!CzI2<<6j%o6ykzZ$hi^b4ou#PKNj>VE5Kt3*J9a$wbyRw0M zZ@u?ET5ka|A49Hn?<7i(dt*pv(UuAA?v{`4z<%(bu#{wmowGB0yD2}I;)_LffiG4A z6h3JxHoZRN*(~r90pHp2=`F4&p!q*=;X~XE#2aC&!vyOa;^AZ#vO$n9S3kQ0_X%1D z&4p6r`l^WiT(|6FMCl9o?_gyR=V=a67TMCaHEqkvCbmripdbOc%<>2N>MJa6Q!3cX dayd@bHa!@61-m+5+3C%z#u>WEQKVAS<9_I;yBlPgDS zt!k-lwn6m<0F~Usl2Hrw^AG=bYme6*LiJoRXIqh7dG4JB0XCgo*iwb=Ui1* ztD?ZO*NU@cI*>Q4tPANPe`*%GNaWmVf2l6o%EruMN7gR#ZMmVA@3Mj|Wug7mxVV!0 zto{OeirJrS^2SJQl9kT48#Xt|OT~AktgK0%=gRPnESZ_}Lb6JV`L3R8Su2wmoF!l7 zocZ=map7M-au5TBh7d{{*C89*2e926Ue^5_&NMg0r(L%4=tk2D{|YS zAV9FsZ~-DZhh8ONl=^Rhqk1?Yx8Eo@xPgyMum#+*JGcbXT~Kug7EDA(Fsr*rRBqTO zCaNpqn22gg)B-_dtpg0i+KMnltaU)Fci^@n>UT^uO1>F*u|XB|C0Z-~3-PUzXs-zR z5}QFq2lha0?FB{KM-*wMoztReL~0LJJVfPdPCA7}?@VEAv3q9pr4-n8WAbp))oFLG zbJNX?PNl-zB){ zhhnR|$mYWn6F6xy>+<#K)nv z<<21TX>1)DUNksf$J0!qy=bMmQiFfnUe#BHOq{PyaBh9$&2@sMbYHWXlCBqdHu8;d z^+3*2{T0ksP_OtqOS*Y#~OH^xS!4algH`sAKGW(CD~fkVw+KY6`w}+$}+PXnH?fdd#qeb=?}s- So%#CFREu2U%W&f_a`+2J(&O>~ literal 0 HcmV?d00001 diff --git a/.github/workflows/__pycache__/generate_transformed_profile.cpython-39.pyc b/.github/workflows/__pycache__/generate_transformed_profile.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94942a2c6fec289b1922b7ffa7c804ae99edc308 GIT binary patch literal 2006 zcmaJ?&2QX96rZuZySDeENxDr~C{UmU1toE5`BD|CexwDY&`N1hRSRUfp4r{$`YSWD z8#eNu!U+kHdxg{-xpU%AnJW@fd*PlFZ@in3mI{x?{=GNzp5MpMKO((LqluMdbi8-~N2IyEe0~p0KW-u!h`UVLh7dc4pSK z6V~AI_}w+)zQX!<*j)Z;-_f>g(z* zt)qRsz48D!VZqn~7NiRwflmB%5tyRKLzvPna9RJ?Ag1~ZcK|oQ2Zj#3-kJ924bV0B zbo6HdwMz6Rvzli-vf(NrNwzbb0xZ<_duRECe5Nr@W9+R zcpH#0MRHy)JU%VkkIz8GnokgUzc31@<`eX*xr9K!xCC)wv~O&;3j-MZ!5!rsQ&!cI zFwa@q+pV7;g)t+cWLc_gPPd1QQ{uZb9y2O@d+SJB=QPTagr)?x)V^UUONNPWXSucx zV`bl+pi-V6m5o@xRNB8`I~k9QXd54$pecXnA!gO~}q zCV!BJcm=*1htQZMOj6FZw?phaGqu-gHgcR(HJ5WbV%bmxBg%!&h0E73T)L?2UO$kb7>M157qb!Fpn05)g{o^IAf@Ctvo82xVH}k4*Yl9m zR8EB^)E{~f$)L-#L^*v1=M9hg<6ZOI7w49jltox1xjsphrAwu(0UZlo7NrVph4!e5 z$YTa8a2Tb^jKoM)ISmQre!E9?rC+SqOWIk@d{^(CmdkfEE=%Ua87PAn%jUxgD1#Rw z_nTUE9KEXKoTZXmI_~PjTbrAAAMi>k+}Qg1%dhS$XY1CzTla(Oo14omg?s*d9?E_Y z^~1DBNuZgbPD>u9qMPvqG&8#R4zM;T8{u1;wtgk0J3;Qdnys@12RJ%~%7$u8y}24q z%c9(vr9jDSm`Y{xY)4hQjK)ML%zi`sGQ@c}^1c;7FR#nlpdYRZZzGF_@G(enf*`9A z&@H88b(pVmnrHuE%-WP!-cH5`-8kD3-toWV70IpTV|DibHs~LS*n%4}s%FD%nGHM# zqlM>;m!9S#=v-K_unj|_1>=&@zzy66$ptGLCLq%W&5FT40k3zKYbDjD^s=KY&Ul!F uWgE-(>CVsohzXS;oFrjsSk~;s?PGAJ?DZrg!=pVau3xW*ZTtiGWIjXy literal 0 HcmV?d00001 diff --git a/.github/workflows/__pycache__/generate_types_cardinality.cpython-39.pyc b/.github/workflows/__pycache__/generate_types_cardinality.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de98803f01bc7d8fb3d2db54c0e4859a46016e9e GIT binary patch literal 1252 zcmZ`%zi-n(6uvv39mh=riXx#_P<3DlQfjFa145;gt)xTCKm=-C-=#g0*pBbgHppHm zBSVLd4DHC;zk#6xf5ELRl$EUm@a(uh1!ukUd+&SieeXTno1AnI9Q*Ol%@1XSzGueu zL%>)7krlWYV)!F!BSuzH!|*fg;!J>IfjkG1EkG37M=4=AH5f_o5k5vcC|+R3r9PjK zBS4rjg^n>sLA9{S*k<%H@&uyj6k0-W-=q{O(4v~kGr%*>7_2e#5<4s~v#4gJ#$auX zLY-P_j`5_x2cIFkbisIl<43?*$~iY~aQ?W(d3wbOSPw^f3T$R#X4|{k3gDk^_881u>%bmk zi9Oy6bZ`i=3^K2*gzRHh&U^UEoYdGtX*uU#1b$#VDzS-U3^8_>0?+TH3}3MDvdR=X zvX3vmOsq_(^$;sMi+kRp)E3w*9A6TZ?`%=_UE*G7*A+LTdG zDDC)OB$U?^@4+v*YD{Phb)z_p+D=w=J?m4pAueXZ3wmOtG1pjWEHr-CF3WHz^B7&_ zdlB~)XGKcg?{P0!zv=yg;`=bmxpH4g9!s|qi|)49lMjCmAFR|13R2;Wm845T}^CDitC)7=f@Zl@RSN_UF~JoXeH_pqLK9l&^MG#8EZ z^#9>(&9am2nOK;T3a;S0q?*4$1FMQHuxg|VdgiGXo;snJVh6;ArvmTHszP=JPeU{{ sD6w%JPg^ykV%UHIYQ{6b)N0`Tov-BD^#Cw!Kk0{T*yB&L&VGTQzXpg)jQ{`u literal 0 HcmV?d00001 diff --git a/.github/workflows/generate_metadata.py b/.github/workflows/generate_metadata.py new file mode 100644 index 00000000..755f32a5 --- /dev/null +++ b/.github/workflows/generate_metadata.py @@ -0,0 +1,52 @@ +# display all files and get the -1 file +from os import listdir +from os.path import isfile, join +from colorama import Fore +from colorama import Style + +def get_previous_version(path_changed_file): + previous_version="" + + mypath="../"+path_changed_file.split('/')[0]+path_changed_file.split('/')[1] + + onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] + + print(Fore.Green + Style.BRIGHT + f'{onlyfiles}' + Style.RESET_ALL) + return previous_version + +def get_previous_release(path_changed_file): + previous_release="" + + return previous_release + +# if its draft it's revision, case release, deprecated +def get_status(version): + status ="" + if version.split("-")[-1]=="DRAFT": + status = "Revision" + elif version.split("-")[-1]=="RELEASE": + status ="Deprecated" + return status + +# Create a mapping file grp == classes, and put it in the _data/ then fetch them from there +def get_group(): + group="" + + return group + +# same as grps, we need a mapping file. [The admin should make sure he updates the config files in the right order!] +def get_cross_walk_url(): + cross_walk_url="" + + return cross_walk_url + +# follow the pattern for most, and when I see an exception, hardcoded it an dictionary +def get_redirect_from(): + redirect_from=list() + + return redirect_from + +def get_hierarchy(): + hierarchy=list() + + return hierarchy \ No newline at end of file diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 2a1d9113..08ead9e5 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -29,10 +29,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8 #install the python needed + - name: Install Python dependencies uses: py-actions/py-dependency-install@v3 with: path: "./.github/workflows/requirements.txt" + - name: Checkout the DDE repo env: GITHUB_TOKEN: ${{ secrets.Sahar_Workflows_Token }} @@ -58,6 +60,18 @@ jobs: git checkout -b $today cd .. + - name: Tests + run: | + for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined MyDate set MyDate=%%x + set today=%MyDate:~0,4%-%MyDate:~4,2%-%MyDate:~6,2% + echo $today + for /f %%x in ('wmic path win32_localtime get /format:list ^| findstr "="') do set %%x + set today=%Year%-%Month%-%Day% + echo $today + for /f %%x in ('wmic path win32_utctime get /format:list ^| findstr "="') do set %%x + set today=%Year%-%Month%-%Day% + echo $today + - name: Execute the Python Script run: | python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io diff --git a/.github/workflows/generate_property.py b/.github/workflows/generate_property.py new file mode 100644 index 00000000..bd8bc9a0 --- /dev/null +++ b/.github/workflows/generate_property.py @@ -0,0 +1,38 @@ +from generate_types_cardinality import generate_types_cardinality + +def generate_property (g, prop, req_label, marginality): + + #print(Fore.GREEN + Style.BRIGHT + f'Property : {req_label}' + Style.RESET_ALL) + new_p = dict() + #If I want to create a dict, new_p[] = {'description':prop["description"]} + + new_p['property'] = req_label + new_p['marginality'] = marginality + new_p['cardinality'], new_p['expected_types'] = generate_types_cardinality(g, prop) + + if "description" in prop.keys(): + new_p['description'] = prop["description"] + else: + new_p['description']="" + if "type_url" in prop.keys(): + new_p['type_url'] = prop["type_url"] + else: + new_p['type_url']="" + if "bsc_description" in prop.keys(): + new_p['bsc_description'] = prop["bsc_description"] + else: + new_p['bsc_description']="" + if "controlled_vocab" in prop.keys(): + new_p['controlled_vocab'] = prop["controlled_vocab"] + else: + new_p['controlled_vocab']="" + + if "example" in prop.keys(): + new_p['example'] = prop["example"] + else: + new_p['example']="" + + # Here we'll suppose that all properties are in default schemas.org + new_p['type']="" + + return new_p \ No newline at end of file diff --git a/.github/workflows/generate_spec_info.py b/.github/workflows/generate_spec_info.py new file mode 100644 index 00000000..8412ba53 --- /dev/null +++ b/.github/workflows/generate_spec_info.py @@ -0,0 +1,27 @@ +def generate_spec_info(g): + spec_info = dict() + + if "rdfs:label" in g.keys(): + spec_info["title"] = g['rdfs:label'] + else: + raise Exception("Please Provide the title of your profile!") + + if "rdfs:comment" in g.keys(): + spec_info["description"] = g['rdfs:comment'] + else: + spec_info["description"] + + if "schema:schemaVersion" in g.keys(): + spec_info["version"] = g['schema:schemaVersion'][0].split('/')[-1] + else: + spec_info["version"]="" + #raise Exception("Please Provide the version of your profile!") + + if "rdfs:subClassOf" in g.keys(): + spec_info["official_type"] = g['rdfs:subClassOf'] + else: + spec_info["official_type"]="" + + spec_info["full_example"] = "https://github.com/BioSchemas/specifications/tree/master/"+spec_info["title"]+"/examples" + + return spec_info \ No newline at end of file diff --git a/.github/workflows/generate_transformed_profile.py b/.github/workflows/generate_transformed_profile.py new file mode 100644 index 00000000..77f1d06e --- /dev/null +++ b/.github/workflows/generate_transformed_profile.py @@ -0,0 +1,66 @@ + +from generate_spec_info import generate_spec_info +from generate_property import generate_property +from colorama import Fore +from colorama import Style +from generate_metadata import * + +def generate_transformed_profile(g, path_changed_file): + + transformed_profile = dict() + + ### Spec_info + transformed_profile["spec_info"] = generate_spec_info(g) + + ### Mapping + transformed_profile["mapping"] = list(dict()) + + # Browse properties by marginality and add them to the mappings + if "$validation" in g.keys(): + for req_label in g['$validation']["required"]: + prop = g['$validation']["properties"][req_label] + new_p = generate_property (g, prop, req_label, "Required") + transformed_profile["mapping"].append(new_p) + + for reco_label in g['$validation']["recommended"]: + prop = g['$validation']["properties"][reco_label] + new_p = generate_property (g, prop, reco_label, "Minimum") + transformed_profile["mapping"].append(new_p) + + for opt_label in g['$validation']["optional"]: + prop = g['$validation']["properties"][opt_label] + new_p = generate_property (g, prop, opt_label, "Optional") + transformed_profile["mapping"].append(new_p) + + ### Generate the metadata + transformed_profile['name']=g["@id"].split(':')[1] + transformed_profile['use_cases_url']='/useCases/'+transformed_profile['name'] + + with open('draft_profile_list.txt') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + line_count = 0 + for row in csv_reader: + line_count += 1 + if line_count > 1: + fields = row[0].split('\t') + if fields[1]==transformed_profile['name']: + #print(f'\n namespace={fields[0]}, name={fields[1]}, subclassof={fields[2]}, type={fields[3]}, version={fields[4]}, url={fields[5]}.') + transformed_profile['spec_type']={fields[3]} + + transformed_profile['previous_version']=get_previous_version(path_changed_file) + transformed_profile['previous_release']= get_previous_release(path_changed_file) + transformed_profile['status']=get_status(transformed_profile["spec_info"]["version"]) + transformed_profile['group']=get_group() + transformed_profile['cross_walk_url']=get_cross_walk_url() + transformed_profile['gh_tasks']= "https://github.com/Bioschemas/specifications/labels/type%3A%20"+transformed_profile['name'] + transformed_profile['live_deploy']="/liveDeploys" + transformed_profile['parent_type']=transformed_profile["spec_info"]["official_type"] + transformed_profile['redirect_from']=get_redirect_from() + transformed_profile['hierarchy']=get_hierarchy() + + + for i in transformed_profile: + if i !="spec_info" and i!="mapping": + print(Fore.YELLOW + Style.BRIGHT + f'{i} = {transformed_profile[i]}' + Style.RESET_ALL) + + return transformed_profile \ No newline at end of file diff --git a/.github/workflows/generate_types_cardinality.py b/.github/workflows/generate_types_cardinality.py new file mode 100644 index 00000000..3613d733 --- /dev/null +++ b/.github/workflows/generate_types_cardinality.py @@ -0,0 +1,78 @@ +def generate_types_cardinality(g,prop): + + list_types=list() + cardianliy="ONE" + + if "type" in prop.keys(): + if "format" in prop.keys(): + list_types.append(prop["format"]) + else : + list_types.append(prop["type"]) + + if "anyOf" in prop.keys(): + for e in prop["anyOf"]: + if "format" in e.keys(): + list_types.append(e["format"]) + elif "items" in e.keys(): + list_types.append(e["items"]) + cardianliy = "MANY" + else : + for t in e.keys(): + list_types.append(e[t]) + + if "oneOf" in prop.keys(): + for e in prop["oneOf"]: + if "format" in e.keys(): + list_types.append(e["format"]) + elif "items" in e.keys(): + list_types.append(e["items"]) + cardianliy = "MANY" + else : + for t in e.keys(): + list_types.append(e[t]) + + i=1 + j=1 + while i==1: + i=0 + j=j+1 + for t in list_types: + if isinstance(t,dict): + i=1 + e=t + list_types.remove(t) + if "format" in e.keys(): + list_types.append(e["format"]) + else: + for sous_type in e.keys(): + list_types.append(e[sous_type]) + + if len(list_types)==0: + cardianliy="" + + #Some cleaning up + expected_types =[] + + for t in list_types: + if len(t.split('/'))>1 : + expected_types.append(t.split('/')[-1].capitalize()) + ##If we ever needed it + #external_type= g['$validation']["definitions"][t.split('/')[-1]] + #print(Fore.YELLOW + f'Def of the External Type : {external_type}' + Style.RESET_ALL) + + else : + expected_types.append(t.capitalize()) + + ##Remove duplicates + clean_expected_types = list(set(expected_types)) + + #Replace 'String' with 'Text' + for i in clean_expected_types: + if i == "String": + clean_expected_types.remove(i) + clean_expected_types.append("Text") + #print(Fore.MAGENTA + f'Expected Types : {clean_expected_types}' + Style.RESET_ALL) + + #print(Fore.RED + f'Cardinality = {cardianliy}' + Style.RESET_ALL) + + return cardianliy, clean_expected_types \ No newline at end of file diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index fc8335eb..fd2ec580 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -9,195 +9,15 @@ import csv from os import path -def generate_types_cardianlity(g,prop): - - list_types=list() - cardianliy="ONE" - - if "type" in prop.keys(): - if "format" in prop.keys(): - list_types.append(prop["format"]) - else : - list_types.append(prop["type"]) - - if "anyOf" in prop.keys(): - for e in prop["anyOf"]: - if "format" in e.keys(): - list_types.append(e["format"]) - elif "items" in e.keys(): - list_types.append(e["items"]) - cardianliy = "MANY" - else : - for t in e.keys(): - list_types.append(e[t]) - - if "oneOf" in prop.keys(): - for e in prop["oneOf"]: - if "format" in e.keys(): - list_types.append(e["format"]) - elif "items" in e.keys(): - list_types.append(e["items"]) - cardianliy = "MANY" - else : - for t in e.keys(): - list_types.append(e[t]) - - i=1 - j=1 - while i==1: - i=0 - j=j+1 - for t in list_types: - if isinstance(t,dict): - i=1 - e=t - list_types.remove(t) - if "format" in e.keys(): - list_types.append(e["format"]) - else: - for sous_type in e.keys(): - list_types.append(e[sous_type]) - - if len(list_types)==0: - cardianliy="" - - #Some cleaning up - expected_types =[] - - for t in list_types: - if len(t.split('/'))>1 : - expected_types.append(t.split('/')[-1].capitalize()) - ##If we ever needed it - #external_type= g['$validation']["definitions"][t.split('/')[-1]] - #print(Fore.YELLOW + f'Def of the External Type : {external_type}' + Style.RESET_ALL) - - else : - expected_types.append(t.capitalize()) - - ##Remove duplicates - clean_expected_types = list(set(expected_types)) - - #Replace 'String' with 'Text' - for i in clean_expected_types: - if i == "String": - clean_expected_types.remove(i) - clean_expected_types.append("Text") - #print(Fore.MAGENTA + f'Expected Types : {clean_expected_types}' + Style.RESET_ALL) - - #print(Fore.RED + f'Cardinality = {cardianliy}' + Style.RESET_ALL) - - return cardianliy, clean_expected_types - - -def generate_property (g, prop, req_label, marginality): - - #print(Fore.GREEN + Style.BRIGHT + f'Property : {req_label}' + Style.RESET_ALL) - new_p = dict() - #If I want to create a dict, new_p[] = {'description':prop["description"]} - - new_p['property'] = req_label - new_p['marginality'] = marginality - new_p['cardinality'], new_p['expected_types'] = generate_types_cardianlity(g, prop) - - if "description" in prop.keys(): - new_p['description'] = prop["description"] - else: - new_p['description']="" - if "type_url" in prop.keys(): - new_p['type_url'] = prop["type_url"] - else: - new_p['type_url']="" - if "bsc_description" in prop.keys(): - new_p['bsc_description'] = prop["bsc_description"] - else: - new_p['bsc_description']="" - if "controlled_vocab" in prop.keys(): - new_p['controlled_vocab'] = prop["controlled_vocab"] - else: - new_p['controlled_vocab']="" - - if "example" in prop.keys(): - new_p['example'] = prop["example"] - else: - new_p['example']="" - - # Here we'll suppose that all properties are in default schemas.org - new_p['type']="" - - return new_p - - -def generate_spec_info(g): - spec_info = dict() - - if "rdfs:label" in g.keys(): - spec_info["title"] = g['rdfs:label'] - else: - raise Exception("Please Provide the title of your profile!") - - if "rdfs:comment" in g.keys(): - spec_info["description"] = g['rdfs:comment'] - else: - spec_info["description"] - - if "schema:schemaVersion" in g.keys(): - spec_info["version"] = g['schema:schemaVersion'][0].split('/')[-1] - else: - spec_info["version"]="" - #raise Exception("Please Provide the version of your profile!") - - if "rdfs:subClassOf" in g.keys(): - spec_info["official_type"] = g['rdfs:subClassOf'] - else: - spec_info["official_type"]="" - - spec_info["full_example"] = "https://github.com/BioSchemas/specifications/tree/master/"+spec_info["title"]+"/examples" - - return spec_info - - -def generate_transformed_profile(g): - - transformed_profile = dict() - - ###Spec_info - transformed_profile["spec_info"] = generate_spec_info(g) - print(Style.BRIGHT + "Spec Info Generated" + Style.RESET_ALL) - - ### Mapping - transformed_profile["mapping"] = list(dict()) - - # Browse properties by marginality and add them to the mappings - if "$validation" in g.keys(): - for req_label in g['$validation']["required"]: - prop = g['$validation']["properties"][req_label] - new_p = generate_property (g, prop, req_label, "Minimum") - transformed_profile["mapping"].append(new_p) - - for reco_label in g['$validation']["recommended"]: - prop = g['$validation']["properties"][reco_label] - new_p = generate_property (g, prop, reco_label, "Recommended") - transformed_profile["mapping"].append(new_p) - - for opt_label in g['$validation']["optional"]: - prop = g['$validation']["properties"][opt_label] - new_p = generate_property (g, prop, opt_label, "Optional") - transformed_profile["mapping"].append(new_p) - - print(Style.BRIGHT + "Mappings Generated" + Style.RESET_ALL) - - return transformed_profile +from generate_transformed_profile import generate_transformed_profile # ## Main Script -# -# Prepare the YAML data, save then display it -# Generate the HTML profile page -# For each new uploaded JSON-LD file args = sys.argv website_repo= args[-1] args.remove(website_repo) +# For each new uploaded JSON-LD file for arg in args: if 'jsonld' in arg.split('/'): if 'json' in arg.split('.'): @@ -269,7 +89,6 @@ def generate_transformed_profile(g): Path(folderpath).mkdir(parents=True, exist_ok=True) print("Create folder : ", folderpath) - #with open(out_YAML_file, "w", encoding="utf-8") as o: # yaml.dump(transformed_profile, o) From fd98f9200a67385523fcf2f6f63ce1a5453cf1e2 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 3 Aug 2022 11:39:29 +0200 Subject: [PATCH 036/162] enourmous change --- .github/workflows/generate_profile_workflow.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 017b4d67..edf45675 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -62,18 +62,6 @@ jobs: git checkout -b $today cd .. - - name: Tests - run: | - for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined MyDate set MyDate=%%x - set today=%MyDate:~0,4%-%MyDate:~4,2%-%MyDate:~6,2% - echo $today - for /f %%x in ('wmic path win32_localtime get /format:list ^| findstr "="') do set %%x - set today=%Year%-%Month%-%Day% - echo $today - for /f %%x in ('wmic path win32_utctime get /format:list ^| findstr "="') do set %%x - set today=%Year%-%Month%-%Day% - echo $today - - name: Execute the Python Script run: | python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io From 3d98a2d8b2310f371e7df4f88bef73caf88c5676 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 11:38:12 +0200 Subject: [PATCH 037/162] enourmous change --- Dataset/jsonld/Dataset_v0.2-DRAFT-2018_02_25.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dataset/jsonld/Dataset_v0.2-DRAFT-2018_02_25.json b/Dataset/jsonld/Dataset_v0.2-DRAFT-2018_02_25.json index 03e1f322..8b881e60 100644 --- a/Dataset/jsonld/Dataset_v0.2-DRAFT-2018_02_25.json +++ b/Dataset/jsonld/Dataset_v0.2-DRAFT-2018_02_25.json @@ -30,7 +30,7 @@ { "type": "array", "items": { - "$ref": "#/definitions/creativework" + "$ref": "#/''definitions''/creativework" } }, { From 822b260f6790c89f3dcdab0574b665b0ba539f2b Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 13:31:31 +0200 Subject: [PATCH 038/162] enourmous change --- .github/workflows/generate_metadata.py | 52 --- .github/workflows/generate_property.py | 38 -- .github/workflows/generate_spec_info.py | 27 -- .../workflows/generate_transformed_profile.py | 66 --- .../workflows/generate_types_cardinality.py | 78 ---- .../workflows/profile_generation_script.py | 383 +++++++++++++++--- 6 files changed, 316 insertions(+), 328 deletions(-) delete mode 100644 .github/workflows/generate_metadata.py delete mode 100644 .github/workflows/generate_property.py delete mode 100644 .github/workflows/generate_spec_info.py delete mode 100644 .github/workflows/generate_transformed_profile.py delete mode 100644 .github/workflows/generate_types_cardinality.py diff --git a/.github/workflows/generate_metadata.py b/.github/workflows/generate_metadata.py deleted file mode 100644 index 755f32a5..00000000 --- a/.github/workflows/generate_metadata.py +++ /dev/null @@ -1,52 +0,0 @@ -# display all files and get the -1 file -from os import listdir -from os.path import isfile, join -from colorama import Fore -from colorama import Style - -def get_previous_version(path_changed_file): - previous_version="" - - mypath="../"+path_changed_file.split('/')[0]+path_changed_file.split('/')[1] - - onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] - - print(Fore.Green + Style.BRIGHT + f'{onlyfiles}' + Style.RESET_ALL) - return previous_version - -def get_previous_release(path_changed_file): - previous_release="" - - return previous_release - -# if its draft it's revision, case release, deprecated -def get_status(version): - status ="" - if version.split("-")[-1]=="DRAFT": - status = "Revision" - elif version.split("-")[-1]=="RELEASE": - status ="Deprecated" - return status - -# Create a mapping file grp == classes, and put it in the _data/ then fetch them from there -def get_group(): - group="" - - return group - -# same as grps, we need a mapping file. [The admin should make sure he updates the config files in the right order!] -def get_cross_walk_url(): - cross_walk_url="" - - return cross_walk_url - -# follow the pattern for most, and when I see an exception, hardcoded it an dictionary -def get_redirect_from(): - redirect_from=list() - - return redirect_from - -def get_hierarchy(): - hierarchy=list() - - return hierarchy \ No newline at end of file diff --git a/.github/workflows/generate_property.py b/.github/workflows/generate_property.py deleted file mode 100644 index bd8bc9a0..00000000 --- a/.github/workflows/generate_property.py +++ /dev/null @@ -1,38 +0,0 @@ -from generate_types_cardinality import generate_types_cardinality - -def generate_property (g, prop, req_label, marginality): - - #print(Fore.GREEN + Style.BRIGHT + f'Property : {req_label}' + Style.RESET_ALL) - new_p = dict() - #If I want to create a dict, new_p[] = {'description':prop["description"]} - - new_p['property'] = req_label - new_p['marginality'] = marginality - new_p['cardinality'], new_p['expected_types'] = generate_types_cardinality(g, prop) - - if "description" in prop.keys(): - new_p['description'] = prop["description"] - else: - new_p['description']="" - if "type_url" in prop.keys(): - new_p['type_url'] = prop["type_url"] - else: - new_p['type_url']="" - if "bsc_description" in prop.keys(): - new_p['bsc_description'] = prop["bsc_description"] - else: - new_p['bsc_description']="" - if "controlled_vocab" in prop.keys(): - new_p['controlled_vocab'] = prop["controlled_vocab"] - else: - new_p['controlled_vocab']="" - - if "example" in prop.keys(): - new_p['example'] = prop["example"] - else: - new_p['example']="" - - # Here we'll suppose that all properties are in default schemas.org - new_p['type']="" - - return new_p \ No newline at end of file diff --git a/.github/workflows/generate_spec_info.py b/.github/workflows/generate_spec_info.py deleted file mode 100644 index 8412ba53..00000000 --- a/.github/workflows/generate_spec_info.py +++ /dev/null @@ -1,27 +0,0 @@ -def generate_spec_info(g): - spec_info = dict() - - if "rdfs:label" in g.keys(): - spec_info["title"] = g['rdfs:label'] - else: - raise Exception("Please Provide the title of your profile!") - - if "rdfs:comment" in g.keys(): - spec_info["description"] = g['rdfs:comment'] - else: - spec_info["description"] - - if "schema:schemaVersion" in g.keys(): - spec_info["version"] = g['schema:schemaVersion'][0].split('/')[-1] - else: - spec_info["version"]="" - #raise Exception("Please Provide the version of your profile!") - - if "rdfs:subClassOf" in g.keys(): - spec_info["official_type"] = g['rdfs:subClassOf'] - else: - spec_info["official_type"]="" - - spec_info["full_example"] = "https://github.com/BioSchemas/specifications/tree/master/"+spec_info["title"]+"/examples" - - return spec_info \ No newline at end of file diff --git a/.github/workflows/generate_transformed_profile.py b/.github/workflows/generate_transformed_profile.py deleted file mode 100644 index 77f1d06e..00000000 --- a/.github/workflows/generate_transformed_profile.py +++ /dev/null @@ -1,66 +0,0 @@ - -from generate_spec_info import generate_spec_info -from generate_property import generate_property -from colorama import Fore -from colorama import Style -from generate_metadata import * - -def generate_transformed_profile(g, path_changed_file): - - transformed_profile = dict() - - ### Spec_info - transformed_profile["spec_info"] = generate_spec_info(g) - - ### Mapping - transformed_profile["mapping"] = list(dict()) - - # Browse properties by marginality and add them to the mappings - if "$validation" in g.keys(): - for req_label in g['$validation']["required"]: - prop = g['$validation']["properties"][req_label] - new_p = generate_property (g, prop, req_label, "Required") - transformed_profile["mapping"].append(new_p) - - for reco_label in g['$validation']["recommended"]: - prop = g['$validation']["properties"][reco_label] - new_p = generate_property (g, prop, reco_label, "Minimum") - transformed_profile["mapping"].append(new_p) - - for opt_label in g['$validation']["optional"]: - prop = g['$validation']["properties"][opt_label] - new_p = generate_property (g, prop, opt_label, "Optional") - transformed_profile["mapping"].append(new_p) - - ### Generate the metadata - transformed_profile['name']=g["@id"].split(':')[1] - transformed_profile['use_cases_url']='/useCases/'+transformed_profile['name'] - - with open('draft_profile_list.txt') as csv_file: - csv_reader = csv.reader(csv_file, delimiter=',') - line_count = 0 - for row in csv_reader: - line_count += 1 - if line_count > 1: - fields = row[0].split('\t') - if fields[1]==transformed_profile['name']: - #print(f'\n namespace={fields[0]}, name={fields[1]}, subclassof={fields[2]}, type={fields[3]}, version={fields[4]}, url={fields[5]}.') - transformed_profile['spec_type']={fields[3]} - - transformed_profile['previous_version']=get_previous_version(path_changed_file) - transformed_profile['previous_release']= get_previous_release(path_changed_file) - transformed_profile['status']=get_status(transformed_profile["spec_info"]["version"]) - transformed_profile['group']=get_group() - transformed_profile['cross_walk_url']=get_cross_walk_url() - transformed_profile['gh_tasks']= "https://github.com/Bioschemas/specifications/labels/type%3A%20"+transformed_profile['name'] - transformed_profile['live_deploy']="/liveDeploys" - transformed_profile['parent_type']=transformed_profile["spec_info"]["official_type"] - transformed_profile['redirect_from']=get_redirect_from() - transformed_profile['hierarchy']=get_hierarchy() - - - for i in transformed_profile: - if i !="spec_info" and i!="mapping": - print(Fore.YELLOW + Style.BRIGHT + f'{i} = {transformed_profile[i]}' + Style.RESET_ALL) - - return transformed_profile \ No newline at end of file diff --git a/.github/workflows/generate_types_cardinality.py b/.github/workflows/generate_types_cardinality.py deleted file mode 100644 index 3613d733..00000000 --- a/.github/workflows/generate_types_cardinality.py +++ /dev/null @@ -1,78 +0,0 @@ -def generate_types_cardinality(g,prop): - - list_types=list() - cardianliy="ONE" - - if "type" in prop.keys(): - if "format" in prop.keys(): - list_types.append(prop["format"]) - else : - list_types.append(prop["type"]) - - if "anyOf" in prop.keys(): - for e in prop["anyOf"]: - if "format" in e.keys(): - list_types.append(e["format"]) - elif "items" in e.keys(): - list_types.append(e["items"]) - cardianliy = "MANY" - else : - for t in e.keys(): - list_types.append(e[t]) - - if "oneOf" in prop.keys(): - for e in prop["oneOf"]: - if "format" in e.keys(): - list_types.append(e["format"]) - elif "items" in e.keys(): - list_types.append(e["items"]) - cardianliy = "MANY" - else : - for t in e.keys(): - list_types.append(e[t]) - - i=1 - j=1 - while i==1: - i=0 - j=j+1 - for t in list_types: - if isinstance(t,dict): - i=1 - e=t - list_types.remove(t) - if "format" in e.keys(): - list_types.append(e["format"]) - else: - for sous_type in e.keys(): - list_types.append(e[sous_type]) - - if len(list_types)==0: - cardianliy="" - - #Some cleaning up - expected_types =[] - - for t in list_types: - if len(t.split('/'))>1 : - expected_types.append(t.split('/')[-1].capitalize()) - ##If we ever needed it - #external_type= g['$validation']["definitions"][t.split('/')[-1]] - #print(Fore.YELLOW + f'Def of the External Type : {external_type}' + Style.RESET_ALL) - - else : - expected_types.append(t.capitalize()) - - ##Remove duplicates - clean_expected_types = list(set(expected_types)) - - #Replace 'String' with 'Text' - for i in clean_expected_types: - if i == "String": - clean_expected_types.remove(i) - clean_expected_types.append("Text") - #print(Fore.MAGENTA + f'Expected Types : {clean_expected_types}' + Style.RESET_ALL) - - #print(Fore.RED + f'Cardinality = {cardianliy}' + Style.RESET_ALL) - - return cardianliy, clean_expected_types \ No newline at end of file diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index fd2ec580..51b01f0d 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -9,7 +9,288 @@ import csv from os import path -from generate_transformed_profile import generate_transformed_profile + + +def generate_transformed_profile(g, path_changed_file): + + transformed_profile = dict() + + ### Spec_info + transformed_profile["spec_info"] = generate_spec_info(g) + + ### Mapping + transformed_profile["mapping"] = list(dict()) + + # Browse properties by marginality and add them to the mappings + if "$validation" in g.keys(): + for req_label in g['$validation']["required"]: + prop = g['$validation']["properties"][req_label] + new_p = generate_property (g, prop, req_label, "Required") + transformed_profile["mapping"].append(new_p) + + for reco_label in g['$validation']["recommended"]: + prop = g['$validation']["properties"][reco_label] + new_p = generate_property (g, prop, reco_label, "Minimum") + transformed_profile["mapping"].append(new_p) + + for opt_label in g['$validation']["optional"]: + prop = g['$validation']["properties"][opt_label] + new_p = generate_property (g, prop, opt_label, "Optional") + transformed_profile["mapping"].append(new_p) + + ### Generate the metadata + transformed_profile['name']=g["@id"].split(':')[1] + transformed_profile['use_cases_url']='/useCases/'+transformed_profile['name'] + + with open('draft_profile_list.txt') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + line_count = 0 + for row in csv_reader: + line_count += 1 + if line_count > 1: + fields = row[0].split('\t') + if fields[1]==transformed_profile['name']: + #print(f'\n namespace={fields[0]}, name={fields[1]}, subclassof={fields[2]}, type={fields[3]}, version={fields[4]}, url={fields[5]}.') + transformed_profile['spec_type']={fields[3]} + + transformed_profile['previous_version']= get_previous_version(path_changed_file) + transformed_profile['previous_release']= get_previous_release(path_changed_file) + transformed_profile['status']=get_status(transformed_profile["spec_info"]["version"]) + transformed_profile['group']=get_group(transformed_profile['name']) + transformed_profile['cross_walk_url']=get_cross_walk_url(transformed_profile['name']) + transformed_profile['gh_tasks']= "https://github.com/Bioschemas/specifications/labels/type%3A%20"+transformed_profile['name'] + transformed_profile['live_deploy']="/liveDeploys" + transformed_profile['parent_type']=transformed_profile["spec_info"]["official_type"] + transformed_profile['redirect_from']=get_redirect_from(transformed_profile['name']) + transformed_profile['hierarchy']=get_hierarchy() + + + for i in transformed_profile: + if i !="spec_info" and i!="mapping": + print(Fore.YELLOW + Style.BRIGHT + f'{i} = {transformed_profile[i]}' + Style.RESET_ALL) + + return transformed_profile + +# display all files and get the -1 file +from os import listdir +from os.path import isfile, join + +def get_previous_version(path_changed_file): + previous_version="" + + hey = ''' #mypath="../"+path_changed_file.split('/')[0]+path_changed_file.split('/')[1] + mypath="./" + onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] + print(onlyfiles) + ''' + return previous_version + +def get_previous_release(path_changed_file): + previous_release="" + + return previous_release + +# if its draft it's revision, case release, deprecated +def get_status(version): + status ="" + if version.split("-")[-1]=="DRAFT": + status = "Revision" + elif version.split("-")[-1]=="RELEASE": + status ="Deprecated" + return status + +# Create a mapping file grp == classes, and put it in the _data/ then fetch them from there +def get_group(profile_name): + group="" + + with open('metadata_mapping.csv') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + line_count = 0 + for row in csv_reader: + line_count += 1 + if line_count > 1: + if row[0]==profile_name: + group=row[1] + return group + +# same as grps, we need a mapping file. [The admin should make sure he updates the config files in the right order!] +def get_cross_walk_url(profile_name): + cross_walk_url="" + + with open('metadata_mapping.csv') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + line_count = 0 + for row in csv_reader: + line_count += 1 + if line_count > 1: + if row[0]==profile_name: + cross_walk_url=row[3] + + return cross_walk_url + +# follow the pattern for most, and when I see an exception, hardcoded it an dictionary +def get_redirect_from(profile_name): + redirect_from=list() + + with open('metadata_mapping.csv') as csv_file: + csv_reader = csv.reader(csv_file, delimiter=',') + line_count = 0 + for row in csv_reader: + line_count += 1 + if line_count > 1: + if row[0]==profile_name: + redirect_from=row[2] + + return redirect_from + +# from the profiles json-ld : +def get_hierarchy(): + hierarchy=list() + + return hierarchy + +def generate_spec_info(g): + spec_info = dict() + + if "rdfs:label" in g.keys(): + spec_info["title"] = g['rdfs:label'] + else: + raise Exception("Please Provide the title of your profile!") + + if "rdfs:comment" in g.keys(): + spec_info["description"] = g['rdfs:comment'] + else: + spec_info["description"] + + if "schema:schemaVersion" in g.keys(): + spec_info["version"] = g['schema:schemaVersion'][0].split('/')[-1] + else: + raise Exception("Please Provide the version of your profile!") + + if "rdfs:subClassOf" in g.keys(): + spec_info["official_type"] = g['rdfs:subClassOf']['@id'].split(':')[1] + else: + spec_info["official_type"]="" + + spec_info["full_example"] = "https://github.com/BioSchemas/specifications/tree/master/"+spec_info["title"]+"/examples" + + return spec_info + +def generate_property (g, prop, req_label, marginality): + + print(Fore.GREEN + Style.BRIGHT + f'Property : {req_label}' + Style.RESET_ALL) + new_p = dict() + #If I want to create a dict, new_p[] = {'description':prop["description"]} + + new_p['property'] = req_label + new_p['marginality'] = marginality + new_p['cardinality'], new_p['expected_types'] = generate_types_cardianlity(g, prop) + + if "description" in prop.keys(): + new_p['description'] = prop["description"] + else: + new_p['description']="" + if "type_url" in prop.keys(): + new_p['type_url'] = prop["type_url"] + else: + new_p['type_url']="" + if "bsc_description" in prop.keys(): + new_p['bsc_description'] = prop["bsc_description"] + else: + new_p['bsc_description']="" + if "controlled_vocab" in prop.keys(): + new_p['controlled_vocab'] = prop["controlled_vocab"] + else: + new_p['controlled_vocab']="" + + if "example" in prop.keys(): + new_p['example'] = prop["example"] + else: + new_p['example']="" + + # Here we'll suppose that all properties are in default schemas.org + new_p['type']="" + + return new_p + +def generate_types_cardianlity(g,prop): + + list_types=list() + cardianliy="ONE" + + if "type" in prop.keys(): + if "format" in prop.keys(): + list_types.append(prop["format"]) + else : + list_types.append(prop["type"]) + + if "anyOf" in prop.keys(): + for e in prop["anyOf"]: + if "format" in e.keys(): + list_types.append(e["format"]) + elif "items" in e.keys(): + list_types.append(e["items"]) + cardianliy = "MANY" + else : + for t in e.keys(): + list_types.append(e[t]) + + if "oneOf" in prop.keys(): + for e in prop["oneOf"]: + if "format" in e.keys(): + list_types.append(e["format"]) + elif "items" in e.keys(): + list_types.append(e["items"]) + cardianliy = "MANY" + else : + for t in e.keys(): + list_types.append(e[t]) + + i=1 + j=1 + while i==1: + i=0 + j=j+1 + for t in list_types: + if isinstance(t,dict): + i=1 + e=t + list_types.remove(t) + if "format" in e.keys(): + list_types.append(e["format"]) + else: + for sous_type in e.keys(): + list_types.append(e[sous_type]) + + if len(list_types)==0: + cardianliy="" + + #Some cleaning up + expected_types =[] + + for t in list_types: + if len(t.split('/'))>1 : + expected_types.append(t.split('/')[-1].capitalize()) + ##If we ever needed it + #external_type= g['$validation']["definitions"][t.split('/')[-1]] + #print(Fore.YELLOW + f'Def of the External Type : {external_type}' + Style.RESET_ALL) + + else : + expected_types.append(t.capitalize()) + + ##Remove duplicates + clean_expected_types = list(set(expected_types)) + + #Replace 'String' with 'Text' + for i in clean_expected_types: + if i == "String": + clean_expected_types.remove(i) + clean_expected_types.append("Text") + print(Fore.MAGENTA + f'Expected Types : {clean_expected_types}' + Style.RESET_ALL) + + print(Fore.RED + f'Cardinality = {cardianliy}' + Style.RESET_ALL) + + return cardianliy, clean_expected_types # ## Main Script @@ -34,76 +315,44 @@ for g in data["@graph"]: + + if g["@type"]=="rdfs:Class": - print(Fore.BLUE + Style.BRIGHT + f'Profile : {g["@id"]}' + Style.RESET_ALL) - #print(Style.BRIGHT + f'{g.keys()}' + Style.RESET_ALL) - - #For each profile : - #Prepare the transfermed profile : spec_info & mapping fields - transformed_profile = generate_transformed_profile(g) - - #print(json.dumps(transformed_profile, indent=True)) - #print(yaml.dump(transformed_profile, indent=4, default_flow_style=False)) - - ### Metadata - profile_metadata = dict() - - profile_metadata['name']=g["@id"].split(':')[1] - profile_metadata['use_cases_url']='/useCases/'+profile_metadata['name'] - - with open('bioschemas-dde/draft_profile_list.txt') as csv_file: - csv_reader = csv.reader(csv_file, delimiter=',') - line_count = 0 - for row in csv_reader: - line_count += 1 - if line_count > 1: - fields = row[0].split('\t') - if fields[1]==profile_metadata['name']: - #print(f'\n namespace={fields[0]}, name={fields[1]}, subclassof={fields[2]}, type={fields[3]}, version={fields[4]}, url={fields[5]}.') - - profile_metadata['redirect_from']=list() - profile_metadata['hierarchy']=list() - profile_metadata['previous_version']=fields[4] - profile_metadata['previous_release']="" - profile_metadata['status']="" - profile_metadata['spec_type']=fields[3] - profile_metadata['group']="tools" - profile_metadata['cross_walk_url']=fields[5] - profile_metadata['gh_tasks']="" - profile_metadata['live_deploy']="/liveDeploys" - profile_metadata['parent_type']="" - - # Inject the YAML in a HTML File - # Note: The folder should be in the transformed_profile["spec_info"]["title"] folder - - ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually - - folderpath = "./"+website_repo+"/pages/_profiles/"+profile_name - #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" - out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" + print(Fore.BLUE + Style.BRIGHT + f'Profile : {g["@id"]}' + Style.RESET_ALL) + #print(Style.BRIGHT + f'{g.keys()}' + Style.RESET_ALL) + + #For each profile : + #Prepare the transfermed profile : spec_info & mapping fields + transformed_profile = generate_transformed_profile(g, arg) + + # Inject the YAML in a HTML File + # Note: The folder should be in the transformed_profile["spec_info"]["title"] folder - if path.exists(folderpath): - print ("folder esists") - else: - #os.makedirs(os.path.dirname(folderpath), exist_ok=True) - Path(folderpath).mkdir(parents=True, exist_ok=True) - print("Create folder : ", folderpath) + ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually + + folderpath = "./"+website_repo+"/pages/_profiles/"+profile_name + #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" + out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" - #with open(out_YAML_file, "w", encoding="utf-8") as o: - # yaml.dump(transformed_profile, o) + if path.exists(folderpath): + print ("folder esists") + else: + #os.makedirs(os.path.dirname(folderpath), exist_ok=True) + Path(folderpath).mkdir(parents=True, exist_ok=True) + print("Create folder : ", folderpath) - #print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) - - message=''' + #with open(out_YAML_file, "w", encoding="utf-8") as o: + # yaml.dump(transformed_profile, o) + + #print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) + + message='''--- # spec_info content generated using GOWeb # DO NOT MANUALLY EDIT THE CONTENT ''' - with open(out_HTML_file, "w", encoding="utf-8") as o: - o.write('''--- -''') - yaml.dump(profile_metadata, o) - o.write(message) - yaml.dump(transformed_profile, o) - o.write("---") - - print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) + with open(out_HTML_file, "w", encoding="utf-8") as o: + o.write(message) + yaml.dump(transformed_profile, o) + o.write("---") + + print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) \ No newline at end of file From 490f402994cafd86c18323047e7bfe9dac6e39ac Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 13:31:41 +0200 Subject: [PATCH 039/162] enourmous change --- ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json index 2f559880..a646f3ce 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json +++ b/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": "The Life Science Tools Hello, provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the ssss is to make it easier to discover. Version 1.0-RELEASE.", + "rdfs:comment": "The Life Science eeeee Hello, provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the ssss is to make it easier to discover. Version 1.0-RELEASE.", "rdfs:label": "ComputationalTool", "rdfs:subClassOf": { "@id": "schema:SoftwareApplication" From 43a4c1f7209f894033aab2d7a313c42d0a87325b Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 13:38:26 +0200 Subject: [PATCH 040/162] enourmous change --- .github/workflows/profile_generation_script.py | 8 ++++---- Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 51b01f0d..365d48e9 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -42,7 +42,7 @@ def generate_transformed_profile(g, path_changed_file): transformed_profile['name']=g["@id"].split(':')[1] transformed_profile['use_cases_url']='/useCases/'+transformed_profile['name'] - with open('draft_profile_list.txt') as csv_file: + with open('bioschemas-dde/draft_profile_list.txt') as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: @@ -103,7 +103,7 @@ def get_status(version): def get_group(profile_name): group="" - with open('metadata_mapping.csv') as csv_file: + with open('bioschemas.github.io/_data/metadata_mapping.csv') as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: @@ -117,7 +117,7 @@ def get_group(profile_name): def get_cross_walk_url(profile_name): cross_walk_url="" - with open('metadata_mapping.csv') as csv_file: + with open('bioschemas.github.io/_data/metadata_mapping.csv') as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: @@ -132,7 +132,7 @@ def get_cross_walk_url(profile_name): def get_redirect_from(profile_name): redirect_from=list() - with open('metadata_mapping.csv') as csv_file: + with open('bioschemas.github.io/_data/metadata_mapping.csv') as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: diff --git a/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json b/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json index d8a972ee..8b5606b2 100644 --- a/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json +++ b/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json @@ -30,7 +30,7 @@ { "type": "array", "items": { - "$ref": "#/definitions/creativework" + "$ref": "#/eee/creativework" } }, { From b63bb36892ae5c8fb97016ec78feb652c2d9aab1 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 13:41:50 +0200 Subject: [PATCH 041/162] enourmous change --- .github/workflows/generate_profile_workflow.yml | 1 + ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index edf45675..b7b172f5 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -58,6 +58,7 @@ jobs: date today=`date +%F` cd bioschemas.github.io + git checkout profile-auto-generation git pull git checkout -b $today cd .. diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 712bfe66..32f7f401 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -16,7 +16,7 @@ ], "rdfs:label": "ComputationalTool", "rdfs:subClassOf": { - "@id": "schema:SoftwareApplication" + "@id": "schema:eee" }, "$validation": { "$schema": "http://json-schema.org/draft-07/schema#", From d5386fa23515c3fa4536a7cea00dbd5672c16ae4 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 13:59:54 +0200 Subject: [PATCH 042/162] enourmous change --- .github/workflows/profile_generation_script.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 365d48e9..436e4819 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -63,8 +63,15 @@ def generate_transformed_profile(g, path_changed_file): transformed_profile['parent_type']=transformed_profile["spec_info"]["official_type"] transformed_profile['redirect_from']=get_redirect_from(transformed_profile['name']) transformed_profile['hierarchy']=get_hierarchy() + transformed_profile['json-ld_url']=arg + transformed_profile['dde_ui_url']="https://discovery.biothings.io/view/" - + ## Case Profile + if arg.split("-")[1].split('.')[0]=="DRAFT": + transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemasdrafts/bioschemasdrafts:" + transformed_profile["name"] + elif arg.split("-")[1].split('.')[0]=="RELEASE": + transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemas/bioschemas:" + transformed_profile["name"] + for i in transformed_profile: if i !="spec_info" and i!="mapping": print(Fore.YELLOW + Style.BRIGHT + f'{i} = {transformed_profile[i]}' + Style.RESET_ALL) From aa4168d95626025bd8c85f41f8ca397221ac7f5e Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 14:00:07 +0200 Subject: [PATCH 043/162] enourmous change --- BioSample/jsonld/BioSample_v0.1-RELEASE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BioSample/jsonld/BioSample_v0.1-RELEASE.json b/BioSample/jsonld/BioSample_v0.1-RELEASE.json index 25c39532..1796eba0 100644 --- a/BioSample/jsonld/BioSample_v0.1-RELEASE.json +++ b/BioSample/jsonld/BioSample_v0.1-RELEASE.json @@ -14,7 +14,7 @@ "schema:additionalType":"https://bioschemas.org/types#nav-release", "schema:schemaVersion":"0.1-RELEASE", "rdfs:subClassOf": { - "@id": "schema:BioChemEntity" + "@id": "schema:hhhh" } }, { From 95ad7a1ec96f668b6547e262efe5e8d4d16fa3aa Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 14:20:49 +0200 Subject: [PATCH 044/162] enourmous change --- .github/workflows/profile_generation_script.py | 3 +++ Dataset/jsonld/Dataset_v0.5-DRAFT.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 436e4819..5338822a 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -23,6 +23,7 @@ def generate_transformed_profile(g, path_changed_file): # Browse properties by marginality and add them to the mappings if "$validation" in g.keys(): + transformed_profile["type"]="Profile" for req_label in g['$validation']["required"]: prop = g['$validation']["properties"][req_label] new_p = generate_property (g, prop, req_label, "Required") @@ -37,6 +38,8 @@ def generate_transformed_profile(g, path_changed_file): prop = g['$validation']["properties"][opt_label] new_p = generate_property (g, prop, opt_label, "Optional") transformed_profile["mapping"].append(new_p) + else: + transformed_profile["type"]="Type" ### Generate the metadata transformed_profile['name']=g["@id"].split(':')[1] diff --git a/Dataset/jsonld/Dataset_v0.5-DRAFT.json b/Dataset/jsonld/Dataset_v0.5-DRAFT.json index 84b485d0..6cf2b618 100644 --- a/Dataset/jsonld/Dataset_v0.5-DRAFT.json +++ b/Dataset/jsonld/Dataset_v0.5-DRAFT.json @@ -36,7 +36,7 @@ ] }, "citation": { - "description": "A citation for a publication that describes the dataset. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", + "description": "A citation gdgdg a publication that describes the dataset. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", "anyOf": [ { "$ref": "#/definitions/creativework" From 73a47606cbcd80401b850b0902323b4ed50c436d Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 14:22:24 +0200 Subject: [PATCH 045/162] enourmous change --- BioSample/jsonld/BioSample_v0.1-RELEASE.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BioSample/jsonld/BioSample_v0.1-RELEASE.json b/BioSample/jsonld/BioSample_v0.1-RELEASE.json index 1796eba0..8c91afa8 100644 --- a/BioSample/jsonld/BioSample_v0.1-RELEASE.json +++ b/BioSample/jsonld/BioSample_v0.1-RELEASE.json @@ -159,7 +159,7 @@ { "@id": "bioschemas:samplingAge", "@type": "rdf:Property", - "rdfs:comment": "The age of the object when the Sample was created. ", + "rdfs:comment": "The age of the object when gdge Sample was created. ", "rdfs:label": "samplingAge", "schema:domainIncludes": { "@id": "bioschemas:BioSample" From a0cdf8c1e92b37827ac2d76b002df7e0aab5acc2 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 14:34:48 +0200 Subject: [PATCH 046/162] enourmous change --- .github/workflows/profile_generation_script.py | 5 +++-- Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 5338822a..8226765e 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -342,8 +342,9 @@ def generate_types_cardianlity(g,prop): folderpath = "./"+website_repo+"/pages/_profiles/"+profile_name #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" - out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" - + #out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" + out_HTML_file= folderpath+"/"+ arg.split('/')[-1].split('.')[0].split('_')[1].split('v')[1] +".html" + if path.exists(folderpath): print ("folder esists") else: diff --git a/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json b/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json index 8b5606b2..e06cd936 100644 --- a/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json +++ b/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json @@ -22,7 +22,7 @@ "type": "object", "properties": { "citation": { - "description": "A citation for a publication that describes the dataset. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", + "description": "A citation hhh a publication that describes the dataset. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", "anyOf": [ { "$ref": "#/definitions/creativework" From 308152622b3c3ee80fe13c632b94bb2d0a6a35cc Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 14:39:43 +0200 Subject: [PATCH 047/162] enourmous change --- .github/workflows/profile_generation_script.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 8226765e..e04ed163 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -342,8 +342,7 @@ def generate_types_cardianlity(g,prop): folderpath = "./"+website_repo+"/pages/_profiles/"+profile_name #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" - #out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" - out_HTML_file= folderpath+"/"+ arg.split('/')[-1].split('.')[0].split('_')[1].split('v')[1] +".html" + out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" if path.exists(folderpath): print ("folder esists") From 4a3fac0da16d799db92853990dc6bd19169490ae Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 14:39:54 +0200 Subject: [PATCH 048/162] enourmous change --- Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json b/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json index e06cd936..6d87a10f 100644 --- a/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json +++ b/Dataset/jsonld/Dataset_v0.3-DRAFT-2018_11_12.json @@ -3,7 +3,7 @@ "schema": "http://schema.org/", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "bioschemas": "http://discovery.biothings.io/view/bioschemas/" + "bioschemas": "http://rrr.biothings.io/view/bioschemas/" }, "@graph": [ { From f095288352601b6e2d5efa64472dc6780bf38e31 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 16:33:43 +0200 Subject: [PATCH 049/162] enourmous change --- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 830 ++++++++++++++++++ 1 file changed, 830 insertions(+) create mode 100644 ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json new file mode 100644 index 00000000..50dc7a28 --- /dev/null +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -0,0 +1,830 @@ +{ + "@context": { + "schema": "http://schema.org/", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "bioschemas": "http://discovery.biothings.io/view/bioschemas/", + "edam": "http://edamontology.org/" + }, + "@graph": [ + { + "@id": "bioschemas:ComputationalTool", + "@type": "rdfs:Class", + "rdfs:comment": " specification for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "schema:schemaVersion": [ + "https://bioschemas.org/profiles/ComputationalTool/0.6-DRAFT" + ], + "rdfs:label": "ComputationalTool", + "rdfs:subClassOf": { + "@id": "schema:eee" + }, + "$validation": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "additionalType": { + "description": "Type of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "applicationCategory": { + "description": "The high-level category in the global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "uri" + } + ] + }, + "applicationSubCategory": { + "description": "Use an [EDAM:Topic](http://edamontology.org/topic_0003) to describe the category of application Subcategory of the application, e.g. 'Arcade Game'.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "applicationSuite": { + "description": "A suite of tools, to which the tool belongs. The name of the application suite to which the application belongs (e.g. Excel belongs to Office).", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "author": { + "description": "TODO The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.", + "anyOf": [ + { + "$ref": "#/definitions/organization" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/organization" + } + }, + { + "$ref": "#/definitions/person" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + ] + }, + "citation": { + "description": "Publication about this tool. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", + "anyOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "codeRepository": { + "description": "Link to the source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "contributor": { + "description": "TODO A secondary contributor to the CreativeWork or Event.", + "anyOf": [ + { + "$ref": "#/definitions/organization" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/organization" + } + }, + { + "$ref": "#/definitions/person" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + ] + }, + "description": { + "description": "A short description of the tool. A description of the item.", + "type": "string" + }, + "discussionUrl": { + "description": "TODO A link to the page containing the comments of the CreativeWork.", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "downloadUrl": { + "description": "A link to the downloadable(s). If the file can be downloaded, URL to download the binary.", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "has_input": { + "description": "This is equivalent to edam:has_input. It should be modelled as a MediaObject. ", + "oneOf": [ + { + "$ref": "#/definitions/mediaobject" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/mediaobject" + } + } + ] + }, + "featureList": { + "description": "Functionality provided by the tool.\n**Note:** Bioschemas have removed [Text](http://schema.org/Text) from the Expected Types Features or modules provided by this application (and possibly required by other applications).", + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "funder": { + "description": "TODO A person or organization that supports (sponsors) something through some kind of financial contribution.", + "anyOf": [ + { + "$ref": "#/definitions/organization" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/organization" + } + }, + { + "$ref": "#/definitions/person" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + ] + }, + "hasPart": { + "description": "TODO Indicates an item or CreativeWork that is part of this item, or CreativeWork (in some sense).\nInverse property: isPartOf.", + "oneOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + } + ] + }, + "identifier": { + "description": "TODO The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](http://schema.org/docs/datamodel.html#identifierBg) for more details.", + "anyOf": [ + { + "$ref": "#/definitions/propertyvalue" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/propertyvalue" + } + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "isAccessibleForFree": { + "description": "A flag to signal that the tool or the service are available to be used for free. A flag to signal that the item, event, or place is accessible for free. Supersedes free.", + "type": "boolean" + }, + "isBasedOn": { + "description": "A tool or another work which this tool is based on, or is an extension, distribution, or deployment of. A resource from which this work is derived or from which it is a modification or adaption. Supersedes isBasedOnUrl.", + "anyOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + }, + { + "$ref": "#/definitions/product" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/product" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "isPartOf": { + "description": "A collection, other than a suite of tools, to which the tool belongs. Indicates an item or CreativeWork that this item, or CreativeWork (in some sense), is part of.\nInverse property: hasPart.", + "oneOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + } + ] + }, + "keywords": { + "description": "Additional keywords or tags important for this tool. Multiple entries are delimited by commas. Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas.", + "type": "string" + }, + "license": { + "description": "The license of a software, curated dataset, etc. A license document that applies to this content, typically indicated by URL.", + "anyOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "name": { + "description": " The name of the item.", + "type": "string" + }, + "operatingSystem": { + "description": "Operating systems on which the tool can be used (without additional wrapping). Operating systems supported (Windows 7, OSX 10.6, Android 1.6).", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "programmingLanguage": { + "description": "The main programming language(s) used to build or execute the tool. The computer programming language.", + "anyOf": [ + { + "$ref": "#/definitions/computerlanguage" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/computerlanguage" + } + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "provider": { + "description": "The provider organization of a web application, database portal, web service, etc.\n**Note:** Bioschemas have removed [Person](http://schema.org/Person) from the Expected Types. The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. Supersedes carrier.", + "anyOf": [ + { + "$ref": "#/definitions/organization" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/organization" + } + }, + { + "$ref": "#/definitions/person" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + ] + }, + "serviceOutput": { + "description": "This is equivalent to edam:has_output. It should be modelled as a MediaObject. The tangible thing generated by the service, e.g. a passport, permit, etc. Supersedes produces.", + "oneOf": [ + { + "$ref": "#/definitions/mediaobject" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/mediaobject" + } + } + ] + }, + "softwareAddOn": { + "description": "Additional sub-tools (add-ons, plug-ins, tools in a suite, etc.) that are included in the tool or workflow. Additional content for a software application.", + "oneOf": [ + { + "$ref": "#/definitions/softwareapplication" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/softwareapplication" + } + } + ] + }, + "softwareHelp": { + "description": "A documentation of the tool. Software application help.", + "oneOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + } + ] + }, + "softwareVersion": { + "description": "Version(s) of the tool, which this information is valid for. Can also be a comma-delimited list and include hyphen-separated ranges of versions. Version of the software instance.", + "type": "string" + }, + "thumbnailUrl": { + "description": "A small image representing the tool, such as an icon. A thumbnail image relevant to the Thing.", + "type": "string", + "format": "uri" + }, + "url": { + "description": "Homepage of the tool. URL of the item.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "description", + "name", + "url" + ], + "recommended": [ + "additionalType", + "applicationCategory", + "applicationSubCategory", + "author", + "citation", + "featureList", + "license", + "softwareVersion" + ], + "optional": [ + "applicationSuite", + "codeRepository", + "contributor", + "discussionUrl", + "downloadUrl", + "has_input", + "funder", + "hasPart", + "identifier", + "isAccessibleForFree", + "isBasedOn", + "isPartOf", + "keywords", + "operatingSystem", + "programmingLanguage", + "provider", + "serviceOutput", + "softwareAddOn", + "softwareHelp", + "thumbnailUrl" + ], + "definitions": { + "organization": { + "@type": "Organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "legalName": { + "type": "string" + }, + "description": { + "type": "string" + }, + "sameAs": { + "type": "string", + "format": "uri" + } + } + }, + "person": { + "@type": "Person", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "mainEntityOfPage": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + }, + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + } + ] + } + }, + "required": [ + "name" + ] + }, + "creativework": { + "@type": "CreativeWork", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [] + }, + "mediaobject": { + "@type": "schema:MediaObject", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + }, + "propertyvalue": { + "@type": "PropertyValue", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "identifier": { + "type": "string" + }, + "valuereference": { + "oneOf": [ + { + "$ref": "#/definitions/categorycode" + }, + { + "type": "array", + "items": [ + { + "$ref": "#/definitions/categorycode" + } + ] + } + ] + }, + "unitCode": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "uri" + } + ] + }, + "unitText": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "recommended": [ + "valueReference" + ], + "optional": [ + "unitCode", + "unitText" + ] + }, + "categorycode": { + "@type": "CategoryCode", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "codeValue": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ] + }, + "product": { + "@type": "schema:Product", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + }, + "computerlanguage": { + "@type": "schema:ComputerLanguage", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + }, + "softwareapplication": { + "@type": "schema:SoftwareApplication", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + } + } + } + }, + { + "@id": "bioschemas:codeRepository", + "@type": "rdf:Property", + "rdfs:comment": "Link to the source code repository of the tool.", + "rdfs:label": "codeRepository", + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:URL" + } + ] + }, + { + "@id": "bioschemas:programmingLanguage", + "@type": "rdf:Property", + "rdfs:comment": "The main programming language(s) used to build or execute the tool. Please use terms from the ‘Programming language’ table in the Bio.Tools documentation", + "rdfs:label": "programmingLanguage", + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:Text" + }, + { + "@id": "schema:ComputerLanguage" + } + ] + }, + { + "@id": "edam:has_input", + "rdfs:comment": " This is equivalent to edam:has_input. It should be modelled as a MediaObject.", + "@type": "rdf:Property", + "rdfs:label": "has_input", + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:MediaObject" + } + ] + }, + { + "@id": "bioschemas:serviceOutput", + "rdfs:comment": " This is equivalent to edam:has_output. It should be modelled as a MediaObject.", + "@type": "rdf:Property", + "rdfs:label": "serviceOutput", + "sameAs": { + "@id": "edam:has_output" + }, + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:MediaObject" + } + ] + } + ] +} From 5379ea93b969dd2aea543dc02c6f79653a5291fc Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 17:05:57 +0200 Subject: [PATCH 050/162] Ginger --- .../jsonld/ComputationalTool_v0.7-DRAFT.json | 830 ++++++++++++++++++ 1 file changed, 830 insertions(+) create mode 100644 ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json new file mode 100644 index 00000000..93fc6bb9 --- /dev/null +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -0,0 +1,830 @@ +{ + "@context": { + "schema": "http://schema.org/", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "bioschemas": "http://discovery.biothings.io/view/bioschemas/", + "edam": "http://edamontology.org/" + }, + "@graph": [ + { + "@id": "bioschemas:ComputationalTool", + "@type": "rdfs:Class", + "rdfs:comment": " specification for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "schema:schemaVersion": [ + "https://bioschemas.org/profiles/ComputationalTool/0.7-DRAFT" + ], + "rdfs:label": "ComputationalTool", + "rdfs:subClassOf": { + "@id": "schema:eee" + }, + "$validation": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "additionalType": { + "description": "Type of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "applicationCategory": { + "description": "The high-level category in the global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "uri" + } + ] + }, + "applicationSubCategory": { + "description": "Use an [EDAM:Topic](http://edamontology.org/topic_0003) to describe the category of application Subcategory of the application, e.g. 'Arcade Game'.", + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "applicationSuite": { + "description": "A suite of tools, to which the tool belongs. The name of the application suite to which the application belongs (e.g. Excel belongs to Office).", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "author": { + "description": "TODO The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.", + "anyOf": [ + { + "$ref": "#/definitions/organization" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/organization" + } + }, + { + "$ref": "#/definitions/person" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + ] + }, + "citation": { + "description": "Publication about this tool. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", + "anyOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "codeRepository": { + "description": "Link to the source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "contributor": { + "description": "TODO A secondary contributor to the CreativeWork or Event.", + "anyOf": [ + { + "$ref": "#/definitions/organization" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/organization" + } + }, + { + "$ref": "#/definitions/person" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + ] + }, + "description": { + "description": "A short description of the tool. A description of the item.", + "type": "string" + }, + "discussionUrl": { + "description": "TODO A link to the page containing the comments of the CreativeWork.", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "downloadUrl": { + "description": "A link to the downloadable(s). If the file can be downloaded, URL to download the binary.", + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "has_input": { + "description": "This is equivalent to edam:has_input. It should be modelled as a MediaObject. ", + "oneOf": [ + { + "$ref": "#/definitions/mediaobject" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/mediaobject" + } + } + ] + }, + "featureList": { + "description": "Functionality provided by the tool.\n**Note:** Bioschemas have removed [Text](http://schema.org/Text) from the Expected Types Features or modules provided by this application (and possibly required by other applications).", + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "funder": { + "description": "TODO A person or organization that supports (sponsors) something through some kind of financial contribution.", + "anyOf": [ + { + "$ref": "#/definitions/organization" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/organization" + } + }, + { + "$ref": "#/definitions/person" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + ] + }, + "hasPart": { + "description": "TODO Indicates an item or CreativeWork that is part of this item, or CreativeWork (in some sense).\nInverse property: isPartOf.", + "oneOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + } + ] + }, + "identifier": { + "description": "TODO The identifier property represents any kind of identifier for any kind of Thing, such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](http://schema.org/docs/datamodel.html#identifierBg) for more details.", + "anyOf": [ + { + "$ref": "#/definitions/propertyvalue" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/propertyvalue" + } + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "isAccessibleForFree": { + "description": "A flag to signal that the tool or the service are available to be used for free. A flag to signal that the item, event, or place is accessible for free. Supersedes free.", + "type": "boolean" + }, + "isBasedOn": { + "description": "A tool or another work which this tool is based on, or is an extension, distribution, or deployment of. A resource from which this work is derived or from which it is a modification or adaption. Supersedes isBasedOnUrl.", + "anyOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + }, + { + "$ref": "#/definitions/product" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/product" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "isPartOf": { + "description": "A collection, other than a suite of tools, to which the tool belongs. Indicates an item or CreativeWork that this item, or CreativeWork (in some sense), is part of.\nInverse property: hasPart.", + "oneOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + } + ] + }, + "keywords": { + "description": "Additional keywords or tags important for this tool. Multiple entries are delimited by commas. Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas.", + "type": "string" + }, + "license": { + "description": "The license of a software, curated dataset, etc. A license document that applies to this content, typically indicated by URL.", + "anyOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + }, + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + } + ] + }, + "name": { + "description": " The name of the item.", + "type": "string" + }, + "operatingSystem": { + "description": "Operating systems on which the tool can be used (without additional wrapping). Operating systems supported (Windows 7, OSX 10.6, Android 1.6).", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "programmingLanguage": { + "description": "The main programming language(s) used to build or execute the tool. The computer programming language.", + "anyOf": [ + { + "$ref": "#/definitions/computerlanguage" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/computerlanguage" + } + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "provider": { + "description": "The provider organization of a web application, database portal, web service, etc.\n**Note:** Bioschemas have removed [Person](http://schema.org/Person) from the Expected Types. The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. Supersedes carrier.", + "anyOf": [ + { + "$ref": "#/definitions/organization" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/organization" + } + }, + { + "$ref": "#/definitions/person" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/person" + } + } + ] + }, + "serviceOutput": { + "description": "This is equivalent to edam:has_output. It should be modelled as a MediaObject. The tangible thing generated by the service, e.g. a passport, permit, etc. Supersedes produces.", + "oneOf": [ + { + "$ref": "#/definitions/mediaobject" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/mediaobject" + } + } + ] + }, + "softwareAddOn": { + "description": "Additional sub-tools (add-ons, plug-ins, tools in a suite, etc.) that are included in the tool or workflow. Additional content for a software application.", + "oneOf": [ + { + "$ref": "#/definitions/softwareapplication" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/softwareapplication" + } + } + ] + }, + "softwareHelp": { + "description": "A documentation of the tool. Software application help.", + "oneOf": [ + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + } + ] + }, + "softwareVersion": { + "description": "Version(s) of the tool, which this information is valid for. Can also be a comma-delimited list and include hyphen-separated ranges of versions. Version of the software instance.", + "type": "string" + }, + "thumbnailUrl": { + "description": "A small image representing the tool, such as an icon. A thumbnail image relevant to the Thing.", + "type": "string", + "format": "uri" + }, + "url": { + "description": "Homepage of the tool. URL of the item.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "description", + "name", + "url" + ], + "recommended": [ + "additionalType", + "applicationCategory", + "applicationSubCategory", + "author", + "citation", + "featureList", + "license", + "softwareVersion" + ], + "optional": [ + "applicationSuite", + "codeRepository", + "contributor", + "discussionUrl", + "downloadUrl", + "has_input", + "funder", + "hasPart", + "identifier", + "isAccessibleForFree", + "isBasedOn", + "isPartOf", + "keywords", + "operatingSystem", + "programmingLanguage", + "provider", + "serviceOutput", + "softwareAddOn", + "softwareHelp", + "thumbnailUrl" + ], + "definitions": { + "organization": { + "@type": "Organization", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "legalName": { + "type": "string" + }, + "description": { + "type": "string" + }, + "sameAs": { + "type": "string", + "format": "uri" + } + } + }, + "person": { + "@type": "Person", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "mainEntityOfPage": { + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "array", + "items": { + "type": "string", + "format": "uri" + } + }, + { + "$ref": "#/definitions/creativework" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/creativework" + } + } + ] + } + }, + "required": [ + "name" + ] + }, + "creativework": { + "@type": "CreativeWork", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [] + }, + "mediaobject": { + "@type": "schema:MediaObject", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + }, + "propertyvalue": { + "@type": "PropertyValue", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + }, + "identifier": { + "type": "string" + }, + "valuereference": { + "oneOf": [ + { + "$ref": "#/definitions/categorycode" + }, + { + "type": "array", + "items": [ + { + "$ref": "#/definitions/categorycode" + } + ] + } + ] + }, + "unitCode": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "uri" + } + ] + }, + "unitText": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "recommended": [ + "valueReference" + ], + "optional": [ + "unitCode", + "unitText" + ] + }, + "categorycode": { + "@type": "CategoryCode", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "codeValue": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "name", + "codeValue", + "url" + ] + }, + "product": { + "@type": "schema:Product", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + }, + "computerlanguage": { + "@type": "schema:ComputerLanguage", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + }, + "softwareapplication": { + "@type": "schema:SoftwareApplication", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + } + } + } + }, + { + "@id": "bioschemas:codeRepository", + "@type": "rdf:Property", + "rdfs:comment": "Link to the source code repository of the tool.", + "rdfs:label": "codeRepository", + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:URL" + } + ] + }, + { + "@id": "bioschemas:programmingLanguage", + "@type": "rdf:Property", + "rdfs:comment": "The main programming language(s) used to build or execute the tool. Please use terms from the ‘Programming language’ table in the Bio.Tools documentation", + "rdfs:label": "programmingLanguage", + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:Text" + }, + { + "@id": "schema:ComputerLanguage" + } + ] + }, + { + "@id": "edam:has_input", + "rdfs:comment": " This is equivalent to edam:has_input. It should be modelled as a MediaObject.", + "@type": "rdf:Property", + "rdfs:label": "has_input", + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:MediaObject" + } + ] + }, + { + "@id": "bioschemas:serviceOutput", + "rdfs:comment": " This is equivalent to edam:has_output. It should be modelled as a MediaObject.", + "@type": "rdf:Property", + "rdfs:label": "serviceOutput", + "sameAs": { + "@id": "edam:has_output" + }, + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:MediaObject" + } + ] + } + ] +} From 9040727733df9384c79eee7b66684ade4d21e100 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 9 Aug 2022 17:09:21 +0200 Subject: [PATCH 051/162] Ginger --- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 93fc6bb9..e6a17c92 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification for ccc a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.7-DRAFT" ], From bd25d6ca292d57c3119fe0eff6422b49972893a0 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:10:51 +0200 Subject: [PATCH 052/162] previous-version --- .github/workflows/profile_generation_script.py | 8 ++++---- .../jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index e04ed163..c94648cd 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -88,11 +88,11 @@ def generate_transformed_profile(g, path_changed_file): def get_previous_version(path_changed_file): previous_version="" - hey = ''' #mypath="../"+path_changed_file.split('/')[0]+path_changed_file.split('/')[1] - mypath="./" + mypath="../"+path_changed_file.split('/')[0]+path_changed_file.split('/')[1] + print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL) onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] - print(onlyfiles) - ''' + print(Fore.LIGHTRED_EX + 'onlyfiles: ' + onlyfiles + Style.RESET_ALL) + return previous_version def get_previous_release(path_changed_file): diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index e6a17c92..84251d42 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -23,7 +23,7 @@ "type": "object", "properties": { "additionalType": { - "description": "Type of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "Type sss tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", From a358d6040ae19bc90731dd2e8e5b1073e0e3b052 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:12:51 +0200 Subject: [PATCH 053/162] previous-version --- .github/workflows/profile_generation_script.py | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index c94648cd..14387305 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -88,7 +88,7 @@ def generate_transformed_profile(g, path_changed_file): def get_previous_version(path_changed_file): previous_version="" - mypath="../"+path_changed_file.split('/')[0]+path_changed_file.split('/')[1] + mypath="../"+path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL) onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] print(Fore.LIGHTRED_EX + 'onlyfiles: ' + onlyfiles + Style.RESET_ALL) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 84251d42..7ede904f 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -51,7 +51,7 @@ ] }, "applicationSubCategory": { - "description": "Use an [EDAM:Topic](http://edamontology.org/topic_0003) to describe the category of application Subcategory of the application, e.g. 'Arcade Game'.", + "description": "Use an [EDAM:Topic](http://edamontology.org/topic_0003) to hhh the category of application Subcategory of the application, e.g. 'Arcade Game'.", "anyOf": [ { "type": "string" From 448c99b0d30340c62fd1430018db9b16c6993ea9 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:14:27 +0200 Subject: [PATCH 054/162] previous-version --- .github/workflows/profile_generation_script.py | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 14387305..f941c523 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -88,7 +88,7 @@ def generate_transformed_profile(g, path_changed_file): def get_previous_version(path_changed_file): previous_version="" - mypath="../"+path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] + mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL) onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] print(Fore.LIGHTRED_EX + 'onlyfiles: ' + onlyfiles + Style.RESET_ALL) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 7ede904f..4c007cbf 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -113,7 +113,7 @@ ] }, "citation": { - "description": "Publication about this tool. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", + "description": "yrtyr about this tool. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", "anyOf": [ { "$ref": "#/definitions/creativework" From 4a2aef63bcbc8d07cc63c12fb8c69c48c4053a77 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:21:10 +0200 Subject: [PATCH 055/162] previous-version --- .github/workflows/profile_generation_script.py | 14 ++++++++++++-- .../jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index f941c523..90f01881 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -89,15 +89,25 @@ def get_previous_version(path_changed_file): previous_version="" mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] - print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL) + #print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL) onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] - print(Fore.LIGHTRED_EX + 'onlyfiles: ' + onlyfiles + Style.RESET_ALL) + + for f in onlyfiles: + if f.split('_')[1].split('.')[0].split('-')[1]=="DRAFT": + print(Fore.LIGHTRED_EX + 'onlyfiles: ' + f + Style.RESET_ALL) return previous_version def get_previous_release(path_changed_file): previous_release="" + mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] + #print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL) + onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] + for f in onlyfiles: + if f.split('_')[1].split('.')[0].split('-')[1]=="RELEASE": + print(Fore.LIGHTBLUE_EX + 'onlyfiles: ' + f + Style.RESET_ALL) + return previous_release # if its draft it's revision, case release, deprecated diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 4c007cbf..24d9e444 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -113,7 +113,7 @@ ] }, "citation": { - "description": "yrtyr about this tool. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", + "description": "yrtyr eee this tool. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", "anyOf": [ { "$ref": "#/definitions/creativework" From 31fe2f12f01dd003a9f2889e722f80027e208cf4 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:29:44 +0200 Subject: [PATCH 056/162] previous-version --- .github/workflows/profile_generation_script.py | 4 ++-- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 90f01881..a2465f9d 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -93,7 +93,7 @@ def get_previous_version(path_changed_file): onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] for f in onlyfiles: - if f.split('_')[1].split('.')[0].split('-')[1]=="DRAFT": + if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": print(Fore.LIGHTRED_EX + 'onlyfiles: ' + f + Style.RESET_ALL) return previous_version @@ -105,7 +105,7 @@ def get_previous_release(path_changed_file): onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] for f in onlyfiles: - if f.split('_')[1].split('.')[0].split('-')[1]=="RELEASE": + if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": print(Fore.LIGHTBLUE_EX + 'onlyfiles: ' + f + Style.RESET_ALL) return previous_release diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 24d9e444..b43909a7 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -23,7 +23,7 @@ "type": "object", "properties": { "additionalType": { - "description": "Type sss tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "Type sss dd e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", From 61ee2be7a4a9a6250e99c6417f4f6abbb651af86 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:34:28 +0200 Subject: [PATCH 057/162] previous-version --- .github/workflows/profile_generation_script.py | 7 +++++-- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index a2465f9d..a7f346ba 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -93,8 +93,11 @@ def get_previous_version(path_changed_file): onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] for f in onlyfiles: + max=0 if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": - print(Fore.LIGHTRED_EX + 'onlyfiles: ' + f + Style.RESET_ALL) + if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: + max = int(f.split('_')[1].split('-')[0].split('.')[1]) + print(Fore.LIGHTRED_EX + 'Latest Draft: ' + max + Style.RESET_ALL) return previous_version @@ -106,7 +109,7 @@ def get_previous_release(path_changed_file): for f in onlyfiles: if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": - print(Fore.LIGHTBLUE_EX + 'onlyfiles: ' + f + Style.RESET_ALL) + print(Fore.LIGHTBLUE_EX + 'Releases: ' + f + Style.RESET_ALL) return previous_release diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index b43909a7..95b79846 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification for ccc a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification e ccc a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.7-DRAFT" ], From 37718eadff2dda691f4802d268bd4f3046bb6d56 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:37:18 +0200 Subject: [PATCH 058/162] previous-version --- .github/workflows/profile_generation_script.py | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index a7f346ba..ff9b80a8 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -97,7 +97,7 @@ def get_previous_version(path_changed_file): if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[1]) - print(Fore.LIGHTRED_EX + 'Latest Draft: ' + max + Style.RESET_ALL) + print(Fore.LIGHTRED_EX + 'Latest Draft: ' + str(max) + Style.RESET_ALL) return previous_version diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 95b79846..661b798f 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification e ccc a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification e ccc a in eeee Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.7-DRAFT" ], From 2266dc8742710b8e2b1161f246a9daa6730496bb Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:41:06 +0200 Subject: [PATCH 059/162] previous-version --- .github/workflows/profile_generation_script.py | 7 +++++-- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index ff9b80a8..5a9f06dd 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -97,7 +97,7 @@ def get_previous_version(path_changed_file): if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[1]) - print(Fore.LIGHTRED_EX + 'Latest Draft: ' + str(max) + Style.RESET_ALL) + print(Fore.LIGHTRED_EX + 'Previous Draft: ' + str(max-1) + Style.RESET_ALL) return previous_version @@ -108,8 +108,11 @@ def get_previous_release(path_changed_file): onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] for f in onlyfiles: + max=0 if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": - print(Fore.LIGHTBLUE_EX + 'Releases: ' + f + Style.RESET_ALL) + if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: + max = int(f.split('_')[1].split('-')[0].split('.')[1].split('v')[1]) + print(Fore.LIGHTRED_EX + 'Previous Release: ' + str(max-1) + Style.RESET_ALL) return previous_release diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 661b798f..b7102cf2 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification e ccc a in eeee Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification e ccc a inzz eeee Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.7-DRAFT" ], From d8f2732a6accb52f15df0a1a63e35cc5a8723597 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:45:55 +0200 Subject: [PATCH 060/162] previous-version --- .github/workflows/profile_generation_script.py | 4 ++-- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 5a9f06dd..ff322f00 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -110,8 +110,8 @@ def get_previous_release(path_changed_file): for f in onlyfiles: max=0 if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": - if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: - max = int(f.split('_')[1].split('-')[0].split('.')[1].split('v')[1]) + if int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) > max: + max = int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) print(Fore.LIGHTRED_EX + 'Previous Release: ' + str(max-1) + Style.RESET_ALL) return previous_release diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index b7102cf2..4e7e4f0e 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification e ccc a inzz eeee Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification e ccc a inzz eeee Life Sciensssces The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.7-DRAFT" ], From 99d64ac498c3d203ec200d48bcd40290a5f09726 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:48:40 +0200 Subject: [PATCH 061/162] previous-version --- .github/workflows/profile_generation_script.py | 6 ++++-- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index ff322f00..255e07a4 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -97,7 +97,8 @@ def get_previous_version(path_changed_file): if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[1]) - print(Fore.LIGHTRED_EX + 'Previous Draft: ' + str(max-1) + Style.RESET_ALL) + previous_version=f + print(Fore.LIGHTRED_EX + 'Previous Draft: ' + previous_version + Style.RESET_ALL) return previous_version @@ -112,7 +113,8 @@ def get_previous_release(path_changed_file): if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": if int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) - print(Fore.LIGHTRED_EX + 'Previous Release: ' + str(max-1) + Style.RESET_ALL) + previous_release=f + print(Fore.LIGHTRED_EX + 'Previous Release: ' +previous_release + Style.RESET_ALL) return previous_release diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 4e7e4f0e..f2f474a8 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification e ccc a inzz eeee Life Sciensssces The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification e ccssssc a inzz eeee Life Sciensssces The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.7-DRAFT" ], From 3fc7c363dd80e36275bb98b0257106f896191e72 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:52:23 +0200 Subject: [PATCH 062/162] previous-version --- .github/workflows/profile_generation_script.py | 5 +++-- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 255e07a4..f85cb4cf 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -97,7 +97,7 @@ def get_previous_version(path_changed_file): if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[1]) - previous_version=f + previous_version=f.split('_')[1].split('v')[0].split('.json')[0] print(Fore.LIGHTRED_EX + 'Previous Draft: ' + previous_version + Style.RESET_ALL) return previous_version @@ -111,9 +111,10 @@ def get_previous_release(path_changed_file): for f in onlyfiles: max=0 if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": + print(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) if int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) - previous_release=f + previous_release=f.split('_')[1].split('v')[1].split('.json')[0] print(Fore.LIGHTRED_EX + 'Previous Release: ' +previous_release + Style.RESET_ALL) return previous_release diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index f2f474a8..2f91ab0b 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification e ccssssc a inzz eeee Life Sciensssces The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification e ccssssc a inzz eeee Life sssssSciensssces The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.7-DRAFT" ], From f5df9492d8388a450a3a7199b59d7f0fbaab46b5 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 10:56:52 +0200 Subject: [PATCH 063/162] previous-version --- .github/workflows/profile_generation_script.py | 4 ++-- ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index f85cb4cf..26f9456c 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -97,8 +97,8 @@ def get_previous_version(path_changed_file): if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[1]) - previous_version=f.split('_')[1].split('v')[0].split('.json')[0] - print(Fore.LIGHTRED_EX + 'Previous Draft: ' + previous_version + Style.RESET_ALL) + previous_version=f.split('_')[1].split('v')[1].split('.json')[0] + print(Fore.LIGHTRED_EX + 'Previous Draft: '+ previous_version + Style.RESET_ALL) return previous_version diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index 2f91ab0b..e2816a22 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -23,7 +23,7 @@ "type": "object", "properties": { "additionalType": { - "description": "Type sss dd e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "Type sss dd e.g. eeee-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", From 2d6655cd319aa47107e7ddb669c9c5ed06132a95 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:29:32 +0200 Subject: [PATCH 064/162] previous-version --- .../workflows/profile_generation_script.py | 49 ++++++++++++------- Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json | 2 +- 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 26f9456c..5cf9c56b 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -11,7 +11,7 @@ -def generate_transformed_profile(g, path_changed_file): +def generate_transformed_profile(g, path_changed_file, external_properties): transformed_profile = dict() @@ -26,17 +26,17 @@ def generate_transformed_profile(g, path_changed_file): transformed_profile["type"]="Profile" for req_label in g['$validation']["required"]: prop = g['$validation']["properties"][req_label] - new_p = generate_property (g, prop, req_label, "Required") + new_p = generate_property (g, prop, req_label, "Required",external_properties) transformed_profile["mapping"].append(new_p) for reco_label in g['$validation']["recommended"]: prop = g['$validation']["properties"][reco_label] - new_p = generate_property (g, prop, reco_label, "Minimum") + new_p = generate_property (g, prop, reco_label, "Minimum",external_properties) transformed_profile["mapping"].append(new_p) for opt_label in g['$validation']["optional"]: prop = g['$validation']["properties"][opt_label] - new_p = generate_property (g, prop, opt_label, "Optional") + new_p = generate_property (g, prop, opt_label, "Optional",external_properties) transformed_profile["mapping"].append(new_p) else: transformed_profile["type"]="Type" @@ -89,7 +89,6 @@ def get_previous_version(path_changed_file): previous_version="" mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] - #print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL) onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] for f in onlyfiles: @@ -98,24 +97,20 @@ def get_previous_version(path_changed_file): if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[1]) previous_version=f.split('_')[1].split('v')[1].split('.json')[0] - print(Fore.LIGHTRED_EX + 'Previous Draft: '+ previous_version + Style.RESET_ALL) return previous_version def get_previous_release(path_changed_file): previous_release="" mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] - #print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL) onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] for f in onlyfiles: max=0 if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": - print(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) if int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) previous_release=f.split('_')[1].split('v')[1].split('.json')[0] - print(Fore.LIGHTRED_EX + 'Previous Release: ' +previous_release + Style.RESET_ALL) return previous_release @@ -205,7 +200,7 @@ def generate_spec_info(g): return spec_info -def generate_property (g, prop, req_label, marginality): +def generate_property (g, prop, req_label, marginality,external_properties): print(Fore.GREEN + Style.BRIGHT + f'Property : {req_label}' + Style.RESET_ALL) new_p = dict() @@ -237,8 +232,15 @@ def generate_property (g, prop, req_label, marginality): else: new_p['example']="" - # Here we'll suppose that all properties are in default schemas.org - new_p['type']="" + # Here we'll suppose that all properties are in default schemas.org !!!!!!! + for p in external_properties: + if req_label==p.split(':')[1]: + if p.split(':')[0].split('bioschemas').len >0: + new_p['type']="Bioschemas" + else: + new_p['type']=p.split(':')[0] + else: + new_p['type']="" return new_p @@ -294,7 +296,7 @@ def generate_types_cardianlity(g,prop): if len(list_types)==0: cardianliy="" - #Some cleaning up + ### Some cleaning up expected_types =[] for t in list_types: @@ -307,7 +309,7 @@ def generate_types_cardianlity(g,prop): else : expected_types.append(t.capitalize()) - ##Remove duplicates + #Remove duplicates clean_expected_types = list(set(expected_types)) #Replace 'String' with 'Text' @@ -315,6 +317,13 @@ def generate_types_cardianlity(g,prop): if i == "String": clean_expected_types.remove(i) clean_expected_types.append("Text") + + #Replace 'Uri' with 'URI' + for i in clean_expected_types: + if i == "Uri": + clean_expected_types.remove(i) + clean_expected_types.append("URI") + print(Fore.MAGENTA + f'Expected Types : {clean_expected_types}' + Style.RESET_ALL) print(Fore.RED + f'Cardinality = {cardianliy}' + Style.RESET_ALL) @@ -341,10 +350,14 @@ def generate_types_cardianlity(g,prop): data = json.load(i) #print(json.dumps(data['@graph'][0], indent=True)) - - + + external_properties=[] for g in data["@graph"]: + if g["@type"]=="rdfs:Property": + external_properties.append(g["@id"]) + for g in data["@graph"]: + if g["@type"]=="rdfs:Class": print(Fore.BLUE + Style.BRIGHT + f'Profile : {g["@id"]}' + Style.RESET_ALL) @@ -352,7 +365,7 @@ def generate_types_cardianlity(g,prop): #For each profile : #Prepare the transfermed profile : spec_info & mapping fields - transformed_profile = generate_transformed_profile(g, arg) + transformed_profile = generate_transformed_profile(g, arg, external_properties) # Inject the YAML in a HTML File # Note: The folder should be in the transformed_profile["spec_info"]["title"] folder @@ -384,4 +397,4 @@ def generate_types_cardianlity(g,prop): yaml.dump(transformed_profile, o) o.write("---") - print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) \ No newline at end of file + print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) \ No newline at end of file diff --git a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json index da9d56b3..8c27567d 100644 --- a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json +++ b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json @@ -22,7 +22,7 @@ "type": "object", "properties": { "additionalType": { - "description": "A Taxon type from a well known vocabulary, e.g. DarwinCore http://rs.tdwg.org/dwc/terms/Taxon or http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.\nBioChemEntity: Whenever a suitable profile exists, the profile type should be used in addition to the BioChemEntity type. Other additional types are always possible via the additionalType property. For instance, http://purl.obolibrary.org/obo/PR_000000001 is the type used for the Protein profile but http://semanticscience.org/resource/SIO_010043 or https://www.wikidata.org/wiki/Q8054 can be used as an additionalType if that results useful somehow to the data providers.", + "description": "A Taxon type frsssssom a well known vocabulary, e.g. DarwinCore http://rs.tdwg.org/dwc/terms/Taxon or http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.\nBioChemEntity: Whenever a suitable profile exists, the profile type should be used in addition to the BioChemEntity type. Other additional types are always possible via the additionalType property. For instance, http://purl.obolibrary.org/obo/PR_000000001 is the type used for the Protein profile but http://semanticscience.org/resource/SIO_010043 or https://www.wikidata.org/wiki/Q8054 can be used as an additionalType if that results useful somehow to the data providers.", "oneOf": [ { "type": "string", From 937496b317041352e097560ba676db3c794247de Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:34:32 +0200 Subject: [PATCH 065/162] previous-version --- .github/workflows/profile_generation_script.py | 2 ++ Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 5cf9c56b..62628b43 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -241,6 +241,8 @@ def generate_property (g, prop, req_label, marginality,external_properties): new_p['type']=p.split(':')[0] else: new_p['type']="" + t=new_p['type'] + print(Fore.GREEN + Style.DIM + f'Property type : {t}' + Style.RESET_ALL) return new_p diff --git a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json index 8c27567d..79b8a8f0 100644 --- a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json +++ b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json @@ -52,7 +52,7 @@ ] }, "isContainedIn": { - "description": "Direct, most proximate higher-rank parent taxon Indicates a BioChemEntity that this BioChemEntity is (in some sense) part of.", + "description": "Direct, most proxissssmate higher-rank parent taxon Indicates a BioChemEntity that this BioChemEntity is (in some sense) part of.", "$ref": "#/definitions/biochementity" }, "name": { From 0ab8a17740cb0387b3453fecc66d9634819b2a40 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:36:11 +0200 Subject: [PATCH 066/162] previous-version --- .github/workflows/profile_generation_script.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 62628b43..2eac7013 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -233,14 +233,14 @@ def generate_property (g, prop, req_label, marginality,external_properties): new_p['example']="" # Here we'll suppose that all properties are in default schemas.org !!!!!!! + new_p['type']="" + for p in external_properties: if req_label==p.split(':')[1]: if p.split(':')[0].split('bioschemas').len >0: new_p['type']="Bioschemas" else: - new_p['type']=p.split(':')[0] - else: - new_p['type']="" + new_p['type']=p.split(':')[0] t=new_p['type'] print(Fore.GREEN + Style.DIM + f'Property type : {t}' + Style.RESET_ALL) From 28fc95fe74a7e649bc06ce086e291c3e99f5163d Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:36:24 +0200 Subject: [PATCH 067/162] previous-version --- Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json index 79b8a8f0..2de64bf0 100644 --- a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json +++ b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json @@ -52,7 +52,7 @@ ] }, "isContainedIn": { - "description": "Direct, most proxissssmate higher-rank parent taxon Indicates a BioChemEntity that this BioChemEntity is (in some sense) part of.", + "description": "Direct, most proxcccissssmate higher-rank parent taxon Indicates a BioChemEntity that this BioChemEntity is (in some sense) part of.", "$ref": "#/definitions/biochementity" }, "name": { From d0015e2d554d787cf2825d056a8c0ce73ce69f95 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:36:33 +0200 Subject: [PATCH 068/162] previous-version --- Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json index 2de64bf0..307b4ece 100644 --- a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json +++ b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json @@ -56,7 +56,7 @@ "$ref": "#/definitions/biochementity" }, "name": { - "description": "Taxon name (without authorship nor date information) of the currently valid (zoological) or accepted (botanical) taxon. The name of the item.", + "description": "Taxon name (without ggg nor date information) of the currently valid (zoological) or accepted (botanical) taxon. The name of the item.", "type": "string" }, "rank": { From 3ea1886cd720e3a2670ae39b7d52efec4d4b2bb7 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:38:42 +0200 Subject: [PATCH 069/162] previous-version --- .github/workflows/profile_generation_script.py | 1 + Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 2eac7013..84e9edf4 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -236,6 +236,7 @@ def generate_property (g, prop, req_label, marginality,external_properties): new_p['type']="" for p in external_properties: + print(p) if req_label==p.split(':')[1]: if p.split(':')[0].split('bioschemas').len >0: new_p['type']="Bioschemas" diff --git a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json index 307b4ece..7156a20d 100644 --- a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json +++ b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json @@ -52,7 +52,7 @@ ] }, "isContainedIn": { - "description": "Direct, most proxcccissssmate higher-rank parent taxon Indicates a BioChemEntity that this BioChemEntity is (in some sense) part of.", + "description": "Direct, most dd higher-rank parent taxon Indicates a BioChemEntity that this BioChemEntity is (in some sense) part of.", "$ref": "#/definitions/biochementity" }, "name": { From ae5abb6f6a8645e9ca110df168480120246a062d Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:42:35 +0200 Subject: [PATCH 070/162] previous-version --- .github/workflows/profile_generation_script.py | 4 ++-- Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 84e9edf4..37a5724a 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -234,7 +234,7 @@ def generate_property (g, prop, req_label, marginality,external_properties): # Here we'll suppose that all properties are in default schemas.org !!!!!!! new_p['type']="" - + print(external_properties) for p in external_properties: print(p) if req_label==p.split(':')[1]: @@ -356,7 +356,7 @@ def generate_types_cardianlity(g,prop): external_properties=[] for g in data["@graph"]: - if g["@type"]=="rdfs:Property": + if g["@type"]=="rdf:Property": external_properties.append(g["@id"]) for g in data["@graph"]: diff --git a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json index 7156a20d..91223cf8 100644 --- a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json +++ b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "Bioschemas specification for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, authority, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI. Version: 0.1-DRAFT-2018_09_25", + "rdfs:comment": "Bioschemas ddd for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, authority, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI. Version: 0.1-DRAFT-2018_09_25", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.1-DRAFT-2018_09_25" ], From c3f35c9ca5f6aaec880dcf4360045bcda601f2eb Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:45:55 +0200 Subject: [PATCH 071/162] previous-version --- .github/workflows/profile_generation_script.py | 12 ++++++------ Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 37a5724a..727c60db 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -234,14 +234,14 @@ def generate_property (g, prop, req_label, marginality,external_properties): # Here we'll suppose that all properties are in default schemas.org !!!!!!! new_p['type']="" - print(external_properties) for p in external_properties: print(p) - if req_label==p.split(':')[1]: - if p.split(':')[0].split('bioschemas').len >0: - new_p['type']="Bioschemas" - else: - new_p['type']=p.split(':')[0] + if len(p.split(':')) >0: + if req_label==p.split(':')[1]: + if len(p.split(':')[0].split('bioschemas'))>0: + new_p['type']="Bioschemas" + else: + new_p['type']=p.split(':')[0] t=new_p['type'] print(Fore.GREEN + Style.DIM + f'Property type : {t}' + Style.RESET_ALL) diff --git a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json index 91223cf8..dca266d4 100644 --- a/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json +++ b/Taxon/jsonld/Taxon_v0.1-DRAFT-2018_09_25.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "Bioschemas ddd for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, authority, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI. Version: 0.1-DRAFT-2018_09_25", + "rdfs:comment": "Bioschemas ddd for rfrgr a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, authority, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI. Version: 0.1-DRAFT-2018_09_25", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.1-DRAFT-2018_09_25" ], From f6d034fc920d6c78e6f9d952a35c04b73424c0f8 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:46:12 +0200 Subject: [PATCH 072/162] previous-version --- Taxon/jsonld/Taxon_v0.7-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.7-DRAFT.json b/Taxon/jsonld/Taxon_v0.7-DRAFT.json index 615cc25a..fd4e2119 100644 --- a/Taxon/jsonld/Taxon_v0.7-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.7-DRAFT.json @@ -12,7 +12,7 @@ { "@id": "bioschemasdrafts:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "a Bioschemas profile for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", + "rdfs:comment": "a Bioschemas profile for describing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.7-DRAFT" ], From 1ce5e7a1f5fcab3ca0bdcd79139384e9c7a5a966 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 11:48:51 +0200 Subject: [PATCH 073/162] external properties --- .github/workflows/profile_generation_script.py | 2 +- Taxon/jsonld/Taxon_v0.7-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 727c60db..16af6419 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -238,7 +238,7 @@ def generate_property (g, prop, req_label, marginality,external_properties): print(p) if len(p.split(':')) >0: if req_label==p.split(':')[1]: - if len(p.split(':')[0].split('bioschemas'))>0: + if len(p.split(':')[0].split('bioschemas'))>1: new_p['type']="Bioschemas" else: new_p['type']=p.split(':')[0] diff --git a/Taxon/jsonld/Taxon_v0.7-DRAFT.json b/Taxon/jsonld/Taxon_v0.7-DRAFT.json index fd4e2119..45ac7020 100644 --- a/Taxon/jsonld/Taxon_v0.7-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.7-DRAFT.json @@ -12,7 +12,7 @@ { "@id": "bioschemasdrafts:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "a Bioschemas profile for describing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", + "rdfs:comment": "a Bioschemas prsssofile for describing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.7-DRAFT" ], From a4534ae3df57fb41657bf2cdbcb17df642444f9a Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 14:07:49 +0200 Subject: [PATCH 074/162] external properties --- .github/workflows/profile_generation_script.py | 15 ++++++++++----- .../jsonld/FormalParameter_v1.0-RELEASE.json | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 16af6419..6ce2df6f 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -69,11 +69,16 @@ def generate_transformed_profile(g, path_changed_file, external_properties): transformed_profile['json-ld_url']=arg transformed_profile['dde_ui_url']="https://discovery.biothings.io/view/" - ## Case Profile - if arg.split("-")[1].split('.')[0]=="DRAFT": - transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemasdrafts/bioschemasdrafts:" + transformed_profile["name"] - elif arg.split("-")[1].split('.')[0]=="RELEASE": - transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemas/bioschemas:" + transformed_profile["name"] + if transformed_profile["type"]="Profile": + if arg.split("-")[1].split('.')[0]=="DRAFT": + transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemasdrafts/bioschemasdrafts:" + transformed_profile["name"] + elif arg.split("-")[1].split('.')[0]=="RELEASE": + transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemas/bioschemas:" + transformed_profile["name"] + else: + if arg.split("-")[1].split('.')[0]=="DRAFT": + transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemastypesdrafts/bioschemastypesdrafts:" + transformed_profile["name"] + elif arg.split("-")[1].split('.')[0]=="RELEASE": + transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemas/bioschemastypes/bioschemastypes:" + transformed_profile["name"] for i in transformed_profile: if i !="spec_info" and i!="mapping": diff --git a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json index c519d671..5c8a2ca3 100644 --- a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json +++ b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json @@ -34,7 +34,7 @@ "type": "boolean" }, "encodingFormat": { - "description": "URLs to accepted formats. It is strongly recommented that this be specified. If it is not specified, then nothing should be assumed about the encoding formats of the FormalParameter.", + "description": "URLs to accepted formats. It is strongly ffff that this be specified. If it is not specified, then nothing should be assumed about the encoding formats of the FormalParameter.", "oneOf": [ { "$ref": "#/definitions/edmoformats" From b1c6e39e32bbac84aada72189087e9914efe7367 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 14:09:51 +0200 Subject: [PATCH 075/162] external properties --- .github/workflows/profile_generation_script.py | 2 +- FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 6ce2df6f..ed4a13c2 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -69,7 +69,7 @@ def generate_transformed_profile(g, path_changed_file, external_properties): transformed_profile['json-ld_url']=arg transformed_profile['dde_ui_url']="https://discovery.biothings.io/view/" - if transformed_profile["type"]="Profile": + if transformed_profile["type"]=="Profile": if arg.split("-")[1].split('.')[0]=="DRAFT": transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemasdrafts/bioschemasdrafts:" + transformed_profile["name"] elif arg.split("-")[1].split('.')[0]=="RELEASE": diff --git a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json index 5c8a2ca3..8528ae69 100644 --- a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json +++ b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json @@ -19,7 +19,7 @@ "type": "object", "properties": { "defaultValue": { - "description": "The default value for the FormalParameter. This is commonly only used for Inputs.", + "description": "The default value for the tgeg. This is commonly only used for Inputs.", "oneOf": [ { "$ref": "#/definitions/thing" From 25998128d2330fb8f42556eb9e92dda4c7d41d04 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 14:38:00 +0200 Subject: [PATCH 076/162] throwing exeptions removal --- .github/workflows/profile_generation_script.py | 8 ++++---- FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index ed4a13c2..86a585c5 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -16,7 +16,7 @@ def generate_transformed_profile(g, path_changed_file, external_properties): transformed_profile = dict() ### Spec_info - transformed_profile["spec_info"] = generate_spec_info(g) + transformed_profile["spec_info"] = generate_spec_info(g, path_changed_file) ### Mapping transformed_profile["mapping"] = list(dict()) @@ -178,13 +178,13 @@ def get_hierarchy(): return hierarchy -def generate_spec_info(g): +def generate_spec_info(g, path_changed_file): spec_info = dict() if "rdfs:label" in g.keys(): spec_info["title"] = g['rdfs:label'] else: - raise Exception("Please Provide the title of your profile!") + spec_info["title"]=path_changed_file.split('_')[0] if "rdfs:comment" in g.keys(): spec_info["description"] = g['rdfs:comment'] @@ -194,7 +194,7 @@ def generate_spec_info(g): if "schema:schemaVersion" in g.keys(): spec_info["version"] = g['schema:schemaVersion'][0].split('/')[-1] else: - raise Exception("Please Provide the version of your profile!") + spec_info["version"] = path_changed_file.split('_')[1].split('v')[1].split('.json')[0] if "rdfs:subClassOf" in g.keys(): spec_info["official_type"] = g['rdfs:subClassOf']['@id'].split(':')[1] diff --git a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json index 8528ae69..8e7de99e 100644 --- a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json +++ b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json @@ -19,7 +19,7 @@ "type": "object", "properties": { "defaultValue": { - "description": "The default value for the tgeg. This is commonly only used for Inputs.", + "description": "The default value for the tgettttg. This is commonly only used for Inputs.", "oneOf": [ { "$ref": "#/definitions/thing" From 2aedf3e027635f41c2dda12f1b5bc70d81861532 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 14:56:02 +0200 Subject: [PATCH 077/162] throwing exeptions removal --- .github/workflows/profile_generation_script.py | 4 ++-- FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 86a585c5..fa5f65aa 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -100,7 +100,8 @@ def get_previous_version(path_changed_file): max=0 if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: - max = int(f.split('_')[1].split('-')[0].split('.')[1]) + max = int(f.split('_')[1].split('-')[0].split('v')[1].split('.')[0]+f.split('_')[1].split('-')[0].split('.')[1]) + print(max) previous_version=f.split('_')[1].split('v')[1].split('.json')[0] return previous_version @@ -240,7 +241,6 @@ def generate_property (g, prop, req_label, marginality,external_properties): # Here we'll suppose that all properties are in default schemas.org !!!!!!! new_p['type']="" for p in external_properties: - print(p) if len(p.split(':')) >0: if req_label==p.split(':')[1]: if len(p.split(':')[0].split('bioschemas'))>1: diff --git a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json index 8e7de99e..ee785648 100644 --- a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json +++ b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json @@ -139,7 +139,7 @@ "format": "uri" }, "additionalType": { - "description": "An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "An additionalzzz type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "type": "string", "format": "uri" } From 2e34387eae27aaa77229e556cb89829cc0be427a Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 14:58:28 +0200 Subject: [PATCH 078/162] throwing exeptions removal --- Taxon/jsonld/Taxon_v0.7-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.7-DRAFT.json b/Taxon/jsonld/Taxon_v0.7-DRAFT.json index 45ac7020..c2687497 100644 --- a/Taxon/jsonld/Taxon_v0.7-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.7-DRAFT.json @@ -12,7 +12,7 @@ { "@id": "bioschemasdrafts:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "a Bioschemas prsssofile for describing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", + "rdfs:comment": "a Bioschemas prsssofile hgfhgfh describing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.7-DRAFT" ], From 5cc35c4a82b5b86adfc8d87ed6cf521dac82f339 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 14:58:49 +0200 Subject: [PATCH 079/162] throwing exeptions removal --- Taxon/jsonld/Taxon_v0.7-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.7-DRAFT.json b/Taxon/jsonld/Taxon_v0.7-DRAFT.json index c2687497..4b2cca38 100644 --- a/Taxon/jsonld/Taxon_v0.7-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.7-DRAFT.json @@ -12,7 +12,7 @@ { "@id": "bioschemasdrafts:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "a Bioschemas prsssofile hgfhgfh describing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", + "rdfs:comment": "a Bioschemas prsssofile hgfhgfh desiiiicribing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.7-DRAFT" ], From e2f2f2c19dc2914ae5a57ebaf169f84e65c7c9bc Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 15:00:47 +0200 Subject: [PATCH 080/162] throwing exeptions removal --- .github/workflows/profile_generation_script.py | 4 ++-- Taxon/jsonld/Taxon_v0.7-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index fa5f65aa..b639ede6 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -96,8 +96,8 @@ def get_previous_version(path_changed_file): mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] + max=0 for f in onlyfiles: - max=0 if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('v')[1].split('.')[0]+f.split('_')[1].split('-')[0].split('.')[1]) @@ -111,8 +111,8 @@ def get_previous_release(path_changed_file): mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] + max=0 for f in onlyfiles: - max=0 if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": if int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) diff --git a/Taxon/jsonld/Taxon_v0.7-DRAFT.json b/Taxon/jsonld/Taxon_v0.7-DRAFT.json index 4b2cca38..f1439cb1 100644 --- a/Taxon/jsonld/Taxon_v0.7-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.7-DRAFT.json @@ -12,7 +12,7 @@ { "@id": "bioschemasdrafts:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "a Bioschemas prsssofile hgfhgfh desiiiicribing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", + "rdfs:comment": "a Bioschemas prsssofile ddd desiiiicribing a htyrty taxon This profile aims to denote a taxon by common properties such as its scientific name, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI.
Changes in 0.7:
  • Use of identifier to add the taxon id within well known authorities (NCBI id, GBIF id, EoL id etc.)
  • Add property isBasedOn
  • Add properties scientificName and alternateScientificName to link the Taxon to TaxonName instances
Version: 0.7-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.7-DRAFT" ], From dd22187cf67c5f8a1bef8ebe58c2335406053e90 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 17 Aug 2022 15:11:52 +0200 Subject: [PATCH 081/162] throwing exeptions removal --- .github/workflows/profile_generation_script.py | 3 +-- FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index b639ede6..76e87189 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -101,7 +101,6 @@ def get_previous_version(path_changed_file): if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: max = int(f.split('_')[1].split('-')[0].split('v')[1].split('.')[0]+f.split('_')[1].split('-')[0].split('.')[1]) - print(max) previous_version=f.split('_')[1].split('v')[1].split('.json')[0] return previous_version @@ -115,7 +114,7 @@ def get_previous_release(path_changed_file): for f in onlyfiles: if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": if int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) > max: - max = int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) + max = int(f.split('_')[1].split('-')[0].split('v')[1].split('.')[0]+f.split('_')[1].split('-')[0].split('.')[1]) previous_release=f.split('_')[1].split('v')[1].split('.json')[0] return previous_release diff --git a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json index ee785648..ee2ab391 100644 --- a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json +++ b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE.json @@ -162,7 +162,7 @@ "strict": false }, "propertyValue": { - "description": "A property-value pair, e.g. representing a feature of a product or place. Use the 'name' property for the name of the property. If there is an additional human-readable version of the value, put that into the 'description' property.", + "description": "A property-fff pair, e.g. representing a feature of a product or place. Use the 'name' property for the name of the property. If there is an additional human-readable version of the value, put that into the 'description' property.", "@type": "PropertyValue", "type": "object", "properties": { From f0ba87631d3c0311d0b648d0692790e1ec3af81b Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:19:34 +0200 Subject: [PATCH 082/162] some final rectifications --- .../workflows/generate_profile_workflow.yml | 20 ++++--- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 56 +++++++++---------- 2 files changed, 41 insertions(+), 35 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index b7b172f5..cc9f3a4f 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -4,6 +4,9 @@ name: generate-profile on: [push] +# pull_request: +# types: [opened, reopened] + jobs: generate-profile: runs-on: ubuntu-latest @@ -52,15 +55,15 @@ jobs: git pull ls - - name: Checkout a new branch + - name: Checkout a new branch - Website repository run: | - echo "the workflow has runed at:" - date - today=`date +%F` + today= `date +%F` + timing= `time +%F` + branch_name= %today%-%timing% cd bioschemas.github.io git checkout profile-auto-generation git pull - git checkout -b $today + git checkout -b $branch_name cd .. - name: Execute the Python Script @@ -83,8 +86,11 @@ jobs: git config user.email "sahar.frikha1@gmail.com" git add . git commit -m "Updating Profile" # How to commit with a specific msg - today=`date +%F` - git push --set-upstream origin $today + today= `date +%F` + timing= `time +%F` + branch_name= %today%-%timing% + git push --set-upstream origin $tbranch_nameoday + hub pull-request -m "The profile is now created and the branch is ready to be merged" -b master -h $branch_name - name: End Workflow run: | diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 50dc7a28..87cf5165 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -14,7 +14,7 @@ "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.6-DRAFT" ], - "rdfs:label": "ComputationalTool", + "rdfs:label": "ddddddd", "rdfs:subClassOf": { "@id": "schema:eee" }, @@ -765,35 +765,35 @@ } }, { - "@id": "bioschemas:codeRepository", - "@type": "rdf:Property", - "rdfs:comment": "Link to the source code repository of the tool.", - "rdfs:label": "codeRepository", - "schema:domainIncludes": { - "@id": "bioschemas:ComputationalTool" - }, - "schema:rangeIncludes": [ - { - "@id": "schema:URL" - } - ] + "@id": "bioschemas:codeRepository", + "@type": "rdf:Property", + "rdfs:comment": "Link to the source code repository of the tool.", + "rdfs:label": "codeRepository", + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" + }, + "schema:rangeIncludes": [ + { + "@id": "schema:URL" + } + ] }, { - "@id": "bioschemas:programmingLanguage", - "@type": "rdf:Property", - "rdfs:comment": "The main programming language(s) used to build or execute the tool. Please use terms from the ‘Programming language’ table in the Bio.Tools documentation", - "rdfs:label": "programmingLanguage", - "schema:domainIncludes": { - "@id": "bioschemas:ComputationalTool" - }, - "schema:rangeIncludes": [ - { - "@id": "schema:Text" + "@id": "bioschemas:programmingLanguage", + "@type": "rdf:Property", + "rdfs:comment": "The main programming language(s) used to build or execute the tool. Please use terms from the ‘Programming language’ table in the Bio.Tools documentation", + "rdfs:label": "programmingLanguage", + "schema:domainIncludes": { + "@id": "bioschemas:ComputationalTool" }, - { - "@id": "schema:ComputerLanguage" - } - ] + "schema:rangeIncludes": [ + { + "@id": "schema:Text" + }, + { + "@id": "schema:ComputerLanguage" + } + ] }, { "@id": "edam:has_input", @@ -827,4 +827,4 @@ ] } ] -} +} \ No newline at end of file From 6e55fafb13405eced5638d5978e54026c97a14d1 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:21:34 +0200 Subject: [PATCH 083/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index cc9f3a4f..1c1fa45b 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -58,8 +58,9 @@ jobs: - name: Checkout a new branch - Website repository run: | today= `date +%F` - timing= `time +%F` + timing= %time% branch_name= %today%-%timing% + echo branch_name cd bioschemas.github.io git checkout profile-auto-generation git pull From 7c86487062869fa31e06a397a0cb4cc7d5d812aa Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:23:45 +0200 Subject: [PATCH 084/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 1c1fa45b..cef651e5 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,9 +57,10 @@ jobs: - name: Checkout a new branch - Website repository run: | - today= `date +%F` - timing= %time% - branch_name= %today%-%timing% + echo "the date is:" date time + today=`date +%F` + timing=%time% + branch_name=%today%-%timing% echo branch_name cd bioschemas.github.io git checkout profile-auto-generation From 562fd654bcad3940315c27622e63b561659483e6 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:28:04 +0200 Subject: [PATCH 085/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index cef651e5..70446b62 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,11 +57,11 @@ jobs: - name: Checkout a new branch - Website repository run: | - echo "the date is:" date time + echo "the date is:" date today=`date +%F` - timing=%time% - branch_name=%today%-%timing% - echo branch_name + timing=`time +%F` + branch_name=$today-$timing + echo $branch_name cd bioschemas.github.io git checkout profile-auto-generation git pull From 92b744410388ada37475d10583b557fb0b050adc Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:29:16 +0200 Subject: [PATCH 086/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 70446b62..585f207b 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -59,7 +59,7 @@ jobs: run: | echo "the date is:" date today=`date +%F` - timing=`time +%F` + timing=`date +%F` branch_name=$today-$timing echo $branch_name cd bioschemas.github.io From 3d7aa9bc17039b766a110f56d73361e20a20f9bb Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:40:01 +0200 Subject: [PATCH 087/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 585f207b..6e42b6d5 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -59,7 +59,7 @@ jobs: run: | echo "the date is:" date today=`date +%F` - timing=`date +%F` + timing=`time /T` branch_name=$today-$timing echo $branch_name cd bioschemas.github.io From 7c07d03e4a1eb81e5b089bb28828ec0db1372e7b Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:43:08 +0200 Subject: [PATCH 088/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 6e42b6d5..943cc371 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,7 +57,7 @@ jobs: - name: Checkout a new branch - Website repository run: | - echo "the date is:" date + date '+%Y/%m/%d %H:%M:%S' today=`date +%F` timing=`time /T` branch_name=$today-$timing From fb329f1da6c48e7619468e531082e45bec4007c1 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:43:29 +0200 Subject: [PATCH 089/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 943cc371..ecfc1f2b 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -59,7 +59,7 @@ jobs: run: | date '+%Y/%m/%d %H:%M:%S' today=`date +%F` - timing=`time /T` + timing=`time` branch_name=$today-$timing echo $branch_name cd bioschemas.github.io From d494eaf2ecaa070a3d4e41b23430d0f3abf7a9fc Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:49:12 +0200 Subject: [PATCH 090/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index ecfc1f2b..0ce0e497 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,7 +57,7 @@ jobs: - name: Checkout a new branch - Website repository run: | - date '+%Y/%m/%d %H:%M:%S' + hey= date '+%Y/%m/%d-%H:%M:%S' today=`date +%F` timing=`time` branch_name=$today-$timing @@ -65,7 +65,7 @@ jobs: cd bioschemas.github.io git checkout profile-auto-generation git pull - git checkout -b $branch_name + git checkout -b $hey cd .. - name: Execute the Python Script From 5753cb9869032736e9a5267f66b013f44682f6d3 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 14:50:51 +0200 Subject: [PATCH 091/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 0ce0e497..6fa9c593 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,15 +57,12 @@ jobs: - name: Checkout a new branch - Website repository run: | - hey= date '+%Y/%m/%d-%H:%M:%S' - today=`date +%F` - timing=`time` - branch_name=$today-$timing + branch_name=date '+%Y/%m/%d-%H:%M:%S' echo $branch_name cd bioschemas.github.io git checkout profile-auto-generation git pull - git checkout -b $hey + git checkout -b $branch_name cd .. - name: Execute the Python Script From 1fa8e0e80801e79e577abefc6d1310144d71b61a Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:00:13 +0200 Subject: [PATCH 092/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 6fa9c593..17efa3bd 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,7 +57,7 @@ jobs: - name: Checkout a new branch - Website repository run: | - branch_name=date '+%Y/%m/%d-%H:%M:%S' + branch_name = date '+%Y/%m/%d-%H:%M:%S' echo $branch_name cd bioschemas.github.io git checkout profile-auto-generation From b9cac2658766b1ed7929dfbae871dbb5612042ca Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:02:35 +0200 Subject: [PATCH 093/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 17efa3bd..95def137 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,7 +57,7 @@ jobs: - name: Checkout a new branch - Website repository run: | - branch_name = date '+%Y/%m/%d-%H:%M:%S' + branch_name = 'date +%Y/%m/%d-%H:%M:%S' echo $branch_name cd bioschemas.github.io git checkout profile-auto-generation From ccd32321269456d30da708538b987072f4b0b5b9 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:04:25 +0200 Subject: [PATCH 094/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 95def137..4f442605 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,12 +57,12 @@ jobs: - name: Checkout a new branch - Website repository run: | - branch_name = 'date +%Y/%m/%d-%H:%M:%S' - echo $branch_name + today= `date +%Y/%m/%d-%H:%M:%S` + echo $today cd bioschemas.github.io git checkout profile-auto-generation git pull - git checkout -b $branch_name + git checkout -b $today cd .. - name: Execute the Python Script From 5ece3e7354e143f3943b792ab7abea0eb4f99d7e Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:05:49 +0200 Subject: [PATCH 095/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 4f442605..d4cf3524 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -58,7 +58,7 @@ jobs: - name: Checkout a new branch - Website repository run: | today= `date +%Y/%m/%d-%H:%M:%S` - echo $today + echo today cd bioschemas.github.io git checkout profile-auto-generation git pull From 559dc8de7231c4fbbaa07cfc0583d61aa6a779a2 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:06:58 +0200 Subject: [PATCH 096/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index d4cf3524..1655a47b 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -58,7 +58,6 @@ jobs: - name: Checkout a new branch - Website repository run: | today= `date +%Y/%m/%d-%H:%M:%S` - echo today cd bioschemas.github.io git checkout profile-auto-generation git pull From ce9d30ecf5a72948fa45f377b53f7e3a02f7ecde Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:09:20 +0200 Subject: [PATCH 097/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 1655a47b..79cdfb66 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -57,11 +57,10 @@ jobs: - name: Checkout a new branch - Website repository run: | - today= `date +%Y/%m/%d-%H:%M:%S` cd bioschemas.github.io git checkout profile-auto-generation git pull - git checkout -b $today + git checkout -b `date +%Y/%m/%d-%H:%M:%S` cd .. - name: Execute the Python Script From 6980fe146b2f1a0459e58cb24fa16e8e6ba5307e Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:10:26 +0200 Subject: [PATCH 098/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 79cdfb66..382aeb7a 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -60,7 +60,7 @@ jobs: cd bioschemas.github.io git checkout profile-auto-generation git pull - git checkout -b `date +%Y/%m/%d-%H:%M:%S` + git checkout -b `date +%Y_%m_%d-%H_%M_%S` cd .. - name: Execute the Python Script From a5fa0239b91aa4e2764f662d6252971e42c555f5 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:12:14 +0200 Subject: [PATCH 099/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 382aeb7a..cf09f19e 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -83,11 +83,8 @@ jobs: git config user.email "sahar.frikha1@gmail.com" git add . git commit -m "Updating Profile" # How to commit with a specific msg - today= `date +%F` - timing= `time +%F` - branch_name= %today%-%timing% - git push --set-upstream origin $tbranch_nameoday - hub pull-request -m "The profile is now created and the branch is ready to be merged" -b master -h $branch_name + git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` + hub pull-request -m "The profile is now created and the branch is ready to be merged" -b master -h `date +%Y_%m_%d-%H_%M_%S` - name: End Workflow run: | From 32642222745d4e298f7c01751fc7b0baff331046 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:13:10 +0200 Subject: [PATCH 100/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index cf09f19e..2d953c32 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -88,4 +88,4 @@ jobs: - name: End Workflow run: | - echo "Check the Website !" + echo "Check the Website !" \ No newline at end of file diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 87cf5165..e4e668d2 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -16,7 +16,7 @@ ], "rdfs:label": "ddddddd", "rdfs:subClassOf": { - "@id": "schema:eee" + "@id": "sssss:eee" }, "$validation": { "$schema": "http://json-schema.org/draft-07/schema#", From 3a6a2b4b85d1e559d63ed954dd03f1d4999db8e3 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:21:54 +0200 Subject: [PATCH 101/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 2d953c32..eeb3592a 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -77,6 +77,8 @@ jobs: token: '${{secrets.Sahar_Workflows_Token}}' - name: Commit and Push the changes in the website + with: + super_secret: ${{secrets.Sahar_Workflows_Token}} run: | cd bioschemas.github.io git config user.name "sahar-frikha" From d1d52e20be8730d4b85b2547068f0a719b2496eb Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:22:04 +0200 Subject: [PATCH 102/162] some final rectifications --- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index e4e668d2..cca26ba2 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -121,7 +121,7 @@ { "type": "array", "items": { - "$ref": "#/definitions/creativework" + "$ref": "#/sss/creativework" } }, { From 67895d8505c4fb49aad8bbae6fd3b5ea127693d7 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 18 Oct 2022 15:33:04 +0200 Subject: [PATCH 103/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 -- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index eeb3592a..2d953c32 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -77,8 +77,6 @@ jobs: token: '${{secrets.Sahar_Workflows_Token}}' - name: Commit and Push the changes in the website - with: - super_secret: ${{secrets.Sahar_Workflows_Token}} run: | cd bioschemas.github.io git config user.name "sahar-frikha" diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index cca26ba2..9b9c16fb 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -136,7 +136,7 @@ ] }, "codeRepository": { - "description": "Link to the source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", + "description": "fffff to the source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", "oneOf": [ { "type": "string", From 6491b9ef6619da604a9f23a68f977846beb8cc36 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 10:19:14 +0200 Subject: [PATCH 104/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 2d953c32..800bd354 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -84,7 +84,7 @@ jobs: git add . git commit -m "Updating Profile" # How to commit with a specific msg git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` - hub pull-request -m "The profile is now created and the branch is ready to be merged" -b master -h `date +%Y_%m_%d-%H_%M_%S` + gh pr create `date +%Y_%m_%d-%H_%M_%S` - name: End Workflow run: | From 56df367ab4dcb9c5b837d3c3bb6bedc7db10e7fe Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 10:19:43 +0200 Subject: [PATCH 105/162] some final rectifications --- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 9b9c16fb..b717e8eb 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -121,7 +121,7 @@ { "type": "array", "items": { - "$ref": "#/sss/creativework" + "$ref": "#/sss/ttttt" } }, { From f02b724cf2412bc77aea89191d000007a1d5f929 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 10:22:40 +0200 Subject: [PATCH 106/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 800bd354..2934dac9 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -84,7 +84,7 @@ jobs: git add . git commit -m "Updating Profile" # How to commit with a specific msg git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` - gh pr create `date +%Y_%m_%d-%H_%M_%S` + gh pr create -h `date +%Y_%m_%d-%H_%M_%S` - name: End Workflow run: | diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index b717e8eb..0ad868ea 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -136,7 +136,7 @@ ] }, "codeRepository": { - "description": "fffff to the source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", + "description": "fffff to the ddd code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", "oneOf": [ { "type": "string", From f103d19ff172c270e7aaf22f1ef52acf22aafa94 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 10:24:20 +0200 Subject: [PATCH 107/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 3 ++- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 2934dac9..77084338 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -84,8 +84,9 @@ jobs: git add . git commit -m "Updating Profile" # How to commit with a specific msg git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` - gh pr create -h `date +%Y_%m_%d-%H_%M_%S` + gh pr create +# hub pull-request -m "The profile is now created and the branch is ready to be merged" -b master -h `date +%Y_%m_%d-%H_%M_%S` - name: End Workflow run: | echo "Check the Website !" \ No newline at end of file diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 0ad868ea..3987d263 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -128,7 +128,7 @@ "type": "string" }, { - "type": "array", + "type": "hdfgd", "items": { "type": "string" } From 482bb4b424ba80382c23727ac3be38045dd4630c Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 10:25:54 +0200 Subject: [PATCH 108/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 3 +++ ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 77084338..fcc38659 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -7,6 +7,9 @@ on: [push] # pull_request: # types: [opened, reopened] +env: + GH_TOKEN: ${{ secrets.Sahar_Workflows_Token }} + jobs: generate-profile: runs-on: ubuntu-latest diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 3987d263..31f71071 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -23,7 +23,7 @@ "type": "object", "properties": { "additionalType": { - "description": "Type of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "Typessss of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", From c1d468de9f78f0672ae8fed3ffc04a674c233b87 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 10:27:18 +0200 Subject: [PATCH 109/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index fcc38659..e85a449d 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -87,7 +87,7 @@ jobs: git add . git commit -m "Updating Profile" # How to commit with a specific msg git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` - gh pr create + gh pr create --title "Pull request title" --body "Pull request body" # hub pull-request -m "The profile is now created and the branch is ready to be merged" -b master -h `date +%Y_%m_%d-%H_%M_%S` - name: End Workflow diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 31f71071..fe11aa69 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -23,7 +23,7 @@ "type": "object", "properties": { "additionalType": { - "description": "Typessss of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "Typssssessss of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", From c65db81fbebcfa5f9f0c92f0ed2206655c79df69 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 10:30:35 +0200 Subject: [PATCH 110/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index e85a449d..edfc4446 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -85,7 +85,7 @@ jobs: git config user.name "sahar-frikha" git config user.email "sahar.frikha1@gmail.com" git add . - git commit -m "Updating Profile" # How to commit with a specific msg + git commit -m "Updating Profile" git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` gh pr create --title "Pull request title" --body "Pull request body" diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index fe11aa69..12577738 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -23,7 +23,7 @@ "type": "object", "properties": { "additionalType": { - "description": "Typssssessss of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "fffff of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", @@ -39,7 +39,7 @@ ] }, "applicationCategory": { - "description": "The high-level category in the global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", + "description": "The high-level category in tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", "oneOf": [ { "type": "string" From 5557a7893ec6ef8b415580c81690a5c514d4ec63 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:01:57 +0200 Subject: [PATCH 111/162] some final rectifications --- .../workflows/config_file_update_script.py | 28 +++++++++++++++++++ .../workflows/generate_profile_workflow.yml | 6 +++- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/config_file_update_script.py diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py new file mode 100644 index 00000000..5310b012 --- /dev/null +++ b/.github/workflows/config_file_update_script.py @@ -0,0 +1,28 @@ +import json +from pathlib import Path +import yaml +from colorama import Fore +from colorama import Style +import sys +import csv +from os import path +from os import listdir +from os.path import isfile, join + + +## Main Script +print(Fore.YELLOW + 'Started updating profile versions config file' + Style.RESET_ALL) + +profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" + +if path.exists(profile_verions_file): + print ("file esists") + + + + with open(profile_verions_file) as f: + data = yaml.load(f) + print(data) + + + print(Style.BRIGHT + "Profile versions updated " + profile_verions_file + Style.RESET_ALL) \ No newline at end of file diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index edfc4446..e70f08a5 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -66,7 +66,11 @@ jobs: git checkout -b `date +%Y_%m_%d-%H_%M_%S` cd .. - - name: Execute the Python Script + - name: Execute the config files update Python Script + run: | + python ./.github/workflows/config_file_update_script.py + + - name: Execute the profile rendering Python Script run: | python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 12577738..bc83c1fd 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -23,7 +23,7 @@ "type": "object", "properties": { "additionalType": { - "description": "fffff of tool e.g. Command-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "fffff of tool e.g. Comddddmand-line tool, Web app etc.\n**Note:** Bioschemas have changed [URL](http://schema.org/URL) to [Text](http://schema.org/Text) in the Expected Types. This will be reverted once Bio.Tools provides stable URIs for tool types. An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", From e21a20028c1d49b03a5157e2897805d87d989cfc Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:03:58 +0200 Subject: [PATCH 112/162] some final rectifications --- .github/workflows/config_file_update_script.py | 16 +++++++++------- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 5310b012..21f81ca3 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -11,18 +11,20 @@ ## Main Script -print(Fore.YELLOW + 'Started updating profile versions config file' + Style.RESET_ALL) +print(Fore.YELLOW + "Started updating profile versions config file" + Style.RESET_ALL) profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" if path.exists(profile_verions_file): - print ("file esists") + print("file esists") - - with open(profile_verions_file) as f: - data = yaml.load(f) + data = yaml.parse(f) print(data) - - print(Style.BRIGHT + "Profile versions updated " + profile_verions_file + Style.RESET_ALL) \ No newline at end of file + print( + Style.BRIGHT + + "Profile versions updated " + + profile_verions_file + + Style.RESET_ALL + ) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index bc83c1fd..21f8fd4a 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -32,7 +32,7 @@ { "type": "array", "items": { - "type": "string", + "type": "strissssng", "format": "uri" } } From d1d60cfcc905656940ee5a75e249d7bbe6a519e7 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:06:15 +0200 Subject: [PATCH 113/162] some final rectifications --- .github/workflows/config_file_update_script.py | 4 ++-- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 21f81ca3..a4014a75 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -8,7 +8,7 @@ from os import path from os import listdir from os.path import isfile, join - +from yaml.loader import SafeLoader ## Main Script print(Fore.YELLOW + "Started updating profile versions config file" + Style.RESET_ALL) @@ -19,7 +19,7 @@ print("file esists") with open(profile_verions_file) as f: - data = yaml.parse(f) + data = yaml.load(f, Loader=SafeLoader) print(data) print( diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 21f8fd4a..3dfb1941 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -58,7 +58,7 @@ }, { "type": "array", - "items": { + "items": {c "type": "string" } }, From d52577b499a396cbe839cc34b4b0daef313a352f Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:09:08 +0200 Subject: [PATCH 114/162] some final rectifications --- .github/workflows/config_file_update_script.py | 10 +++++----- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index a4014a75..0bdc802c 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -16,11 +16,11 @@ profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" if path.exists(profile_verions_file): - print("file esists") - - with open(profile_verions_file) as f: - data = yaml.load(f, Loader=SafeLoader) - print(data) + with open(profile_verions_file, "r") as stream: + try: + print(yaml.safe_load(stream)) + except yaml.YAMLError as exc: + print(exc) print( Style.BRIGHT diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 3dfb1941..21f8fd4a 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -58,7 +58,7 @@ }, { "type": "array", - "items": {c + "items": { "type": "string" } }, From daba8184fccec3e21774e0606be78869d5125c95 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:19:08 +0200 Subject: [PATCH 115/162] some final rectifications --- .github/workflows/config_file_update_script.py | 4 ++-- .github/workflows/generate_profile_workflow.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 0bdc802c..eba51339 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -16,9 +16,9 @@ profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" if path.exists(profile_verions_file): - with open(profile_verions_file, "r") as stream: + with open(profile_verions_file, "r", encoding="utf-8") as f: try: - print(yaml.safe_load(stream)) + print(yaml.load(f)) except yaml.YAMLError as exc: print(exc) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index e70f08a5..9a6bd7b7 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -91,7 +91,7 @@ jobs: git add . git commit -m "Updating Profile" git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` - gh pr create --title "Pull request title" --body "Pull request body" + gh pr create --title "Auto-Rendering Profile" --body "This pull request has been created by a guithub action, after adding/updating a profile in the specifications repo." # hub pull-request -m "The profile is now created and the branch is ready to be merged" -b master -h `date +%Y_%m_%d-%H_%M_%S` - name: End Workflow From 13a69bbd6f957e7c48fa5120850da34a1e0fcdaa Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:22:27 +0200 Subject: [PATCH 116/162] some final rectifications --- .../workflows/config_file_update_script.py | 5 +- .github/workflows/profile_versions.yaml | 212 ++++++++++++++++++ 2 files changed, 215 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/profile_versions.yaml diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index eba51339..af6183bc 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -13,12 +13,13 @@ ## Main Script print(Fore.YELLOW + "Started updating profile versions config file" + Style.RESET_ALL) -profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" +profile_verions_file = "profile_versions.yaml" +# profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" if path.exists(profile_verions_file): with open(profile_verions_file, "r", encoding="utf-8") as f: try: - print(yaml.load(f)) + print(yaml.safe_load(f)) except yaml.YAMLError as exc: print(exc) diff --git a/.github/workflows/profile_versions.yaml b/.github/workflows/profile_versions.yaml new file mode 100644 index 00000000..f1ffc275 --- /dev/null +++ b/.github/workflows/profile_versions.yaml @@ -0,0 +1,212 @@ +Beacon: + name: "Beacon" + latest_publication: "0.2-DRAFT-2018_04_23" + latest_release: + status: "deprecated" + deprecated_date: "2019-11-22" + +BioSample: + name: "BioSample" + latest_publication: "0.1-DRAFT-2019_11_12" + latest_release: + status: "active" + +ChemicalSubstance: + name: "ChemicalSubstance" + latest_publication: + latest_release: "0.4-RELEASE" + status: "active" + +ComputationalTool: + name: "ComputationalTool" + latest_publication: + latest_release: "1.0-RELEASE" + status: "active" + +ComputationalWorkflow: + name: "ComputationalWorkflow" + latest_publication: + latest_release: "1.0-RELEASE" + status: "active" + +Course: + name: "Course" + latest_publication: "0.9-DRAFT-2020_12_08" + latest_release: + status: "active" + +CourseInstance: + name: "CourseInstance" + latest_publication: "0.8-DRAFT-2020_10_06" + latest_release: + status: "active" + +DataCatalog: + name: "DataCatalog" + latest_publication: + latest_release: "0.3-RELEASE-2019_07_01" + status: "active" + +DataRecord: + name: "DataRecord" + latest_publication: "0.2-DRAFT-2019_06_14" + latest_release: + status: "deprecated" + deprecated_date: "2021-02-22" + +Dataset: + name: "Dataset" + latest_publication: "0.5-DRAFT" + latest_release: "0.3-RELEASE-2019_06_14" + status: "active" + +Disease: + name: "Disease" + latest_publication: "0.1-DRAFT" + latest_release: + status: "active" + +Event: + name: "Event" + latest_publication: "0.2-DRAFT-2019_06_14" + latest_release: + status: "active" + +FormalParameter: + name: "FormalParameter" + latest_publication: + latest_release: "1.0-RELEASE" + status: "active" + +Gene: + name: "Gene" + latest_publication: "1.1-DRAFT" + latest_release: "1.0-RELEASE" + status: "active" + +Journal: + name: "Journal" + latest_publication: "0.2-DRAFT-2020_12_03" + latest_release: + status: "active" + +LabProtocol: + name: "LabProtocol" + latest_publication: "0.6-DRAFT-2020_12_08" + latest_release: + status: "active" + +MolecularEntity: + name: "MolecularEntity" + latest_publication: + latest_release: "0.5-RELEASE" + status: "active" + +Organization: + name: "Organization" + latest_publication: "0.2-DRAFT-2019_07_19" + latest_release: + status: "active" + +Person: + name: "Person" + latest_publication: "0.2-DRAFT-2019_07_19" + latest_release: + status: "active" + +Phenotype: + name: "Phenotype" + latest_publication: "0.2-DRAFT" + latest_release: + status: "active" + +Protein: + name: "Protein" + latest_publication: "0.12-DRAFT" + latest_release: "0.11-RELEASE" + status: "active" + +ProteinAnnotation: + name: "ProteinAnnotation" + latest_publication: "0.6-DRAFT" + latest_release: + status: "deprecated" + superseded_by: "SequenceAnnotation" + +ProteinStructure: + name: "ProteinStructure" + latest_publication: "0.5-DRAFT-2018_08_15" + latest_release: + status: "active" + +PublicationIssue: + name: "PublicationIssue" + latest_publication: "0.2-DRAFT-2020_12_03" + latest_release: + status: "active" + +PublicationVolume: + name: "PublicationVolume" + latest_publication: "0.2-DRAFT-2020_12_03" + latest_release: + status: "active" + +RNA: + name: "RNA" + latest_publication: "0.1-DRAFT-2019_11_15" + latest_release: + status: "active" + +Sample: + name: "Sample" + latest_publication: + latest_release: "0.2-RELEASE-2018_11_10" + status: "active" + +ScholarlyArticle: + name: "ScholarlyArticle" + latest_publication: "0.2-DRAFT-2020_12_03" + latest_release: + status: "active" + +SemanticTextAnnotation: + name: "SemanticTextAnnotation" + latest_publication: "0.2-DRAFT-2020_12_03" + latest_release: + status: "active" + +SequenceAnnotation: + name: "SequenceAnnotation" + latest_publication: "0.7-DRAFT" + latest_release: + status: "active" + +SequenceRange: + name: "SequenceRange" + latest_publication: "0.1-DRAFT" + latest_release: + status: "active" + +Study: + name: "Study" + latest_publication: "0.2-DRAFT" + latest_release: + status: "active" + +Taxon: + name: "Taxon" + latest_publication: "0.7-DRAFT" + latest_release: "0.6-RELEASE" + status: "active" + +TaxonName: + name: "TaxonName" + latest_publication: "0.1-DRAFT" + latest_release: + status: "active" + +TrainingMaterial: + name: "TrainingMaterial" + latest_publication: + latest_release: "1.0-RELEASE" + status: "active" \ No newline at end of file From 475aa4cc7498ef4b2c17890c4c8aa8860cbf7868 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:27:39 +0200 Subject: [PATCH 117/162] some final rectifications --- .github/workflows/config_file_update_script.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index af6183bc..f79bfe31 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -13,11 +13,12 @@ ## Main Script print(Fore.YELLOW + "Started updating profile versions config file" + Style.RESET_ALL) -profile_verions_file = "profile_versions.yaml" -# profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" +profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" if path.exists(profile_verions_file): with open(profile_verions_file, "r", encoding="utf-8") as f: + print(Fore.YELLOW + "File opened!" + Style.RESET_ALL) + try: print(yaml.safe_load(f)) except yaml.YAMLError as exc: From 38f2d54bb55d0f8825d5f61be995554d07aca66a Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:28:04 +0200 Subject: [PATCH 118/162] some final rectifications --- .github/workflows/config_file_update_script.py | 3 ++- .github/workflows/profile_versions.yaml | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index f79bfe31..3b6c865c 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -13,7 +13,8 @@ ## Main Script print(Fore.YELLOW + "Started updating profile versions config file" + Style.RESET_ALL) -profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" +profile_verions_file = "profile_versions.yaml" +# profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" if path.exists(profile_verions_file): with open(profile_verions_file, "r", encoding="utf-8") as f: diff --git a/.github/workflows/profile_versions.yaml b/.github/workflows/profile_versions.yaml index f1ffc275..0476e4a5 100644 --- a/.github/workflows/profile_versions.yaml +++ b/.github/workflows/profile_versions.yaml @@ -1,3 +1,4 @@ +--- Beacon: name: "Beacon" latest_publication: "0.2-DRAFT-2018_04_23" @@ -209,4 +210,6 @@ TrainingMaterial: name: "TrainingMaterial" latest_publication: latest_release: "1.0-RELEASE" - status: "active" \ No newline at end of file + status: "active" + +--- From b7f12d8662c198c216b13baa35505617d0850292 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:30:49 +0200 Subject: [PATCH 119/162] some final rectifications --- .github/workflows/config_file_update_script.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 3b6c865c..93cde7a8 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -25,6 +25,14 @@ except yaml.YAMLError as exc: print(exc) + stream = open("test", "r") + docs = yaml.load_all(stream, yaml.FullLoader) + for doc in docs: + for k,v in doc.items(): + print (k, "->", v) + print ("\n"), + + print( Style.BRIGHT + "Profile versions updated " From 2471da3c319e07fdcfa3d9d1501a48bb3f89a10a Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:32:36 +0200 Subject: [PATCH 120/162] some final rectifications --- .github/workflows/config_file_update_script.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 93cde7a8..80cac1bd 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -25,12 +25,12 @@ except yaml.YAMLError as exc: print(exc) - stream = open("test", "r") - docs = yaml.load_all(stream, yaml.FullLoader) - for doc in docs: - for k,v in doc.items(): - print (k, "->", v) - print ("\n"), + stream = open(profile_verions_file, "r") + docs = yaml.load_all(stream, yaml.FullLoader) + for doc in docs: + for k,v in doc.items(): + print (k, "->", v) + print ("\n"), print( From d9a20a7d6e243720c0079c5d4e91fac356e090e6 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:33:56 +0200 Subject: [PATCH 121/162] some final rectifications --- .../workflows/config_file_update_script.py | 33 +++++++------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 80cac1bd..c54cc029 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -16,26 +16,17 @@ profile_verions_file = "profile_versions.yaml" # profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" -if path.exists(profile_verions_file): - with open(profile_verions_file, "r", encoding="utf-8") as f: - print(Fore.YELLOW + "File opened!" + Style.RESET_ALL) +stream = open(profile_verions_file, "r") +docs = yaml.load_all(stream, yaml.FullLoader) +for doc in docs: + for k,v in doc.items(): + print (k, "->", v) + print ("\n"), - try: - print(yaml.safe_load(f)) - except yaml.YAMLError as exc: - print(exc) - stream = open(profile_verions_file, "r") - docs = yaml.load_all(stream, yaml.FullLoader) - for doc in docs: - for k,v in doc.items(): - print (k, "->", v) - print ("\n"), - - - print( - Style.BRIGHT - + "Profile versions updated " - + profile_verions_file - + Style.RESET_ALL - ) +print( + Style.BRIGHT + + "Profile versions updated " + + profile_verions_file + + Style.RESET_ALL +) From bc5bcd5448de885c52505d52c84f3e51e5abcc88 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 11:36:37 +0200 Subject: [PATCH 122/162] some final rectifications --- .github/workflows/config_file_update_script.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index c54cc029..2cd2135e 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -13,8 +13,7 @@ ## Main Script print(Fore.YELLOW + "Started updating profile versions config file" + Style.RESET_ALL) -profile_verions_file = "profile_versions.yaml" -# profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" +profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" stream = open(profile_verions_file, "r") docs = yaml.load_all(stream, yaml.FullLoader) From cdd2df0b769b5dcc933929f6672d822a7a6bd42a Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 12:53:11 +0200 Subject: [PATCH 123/162] some final rectifications --- .../workflows/config_file_update_script.py | 34 +++++++++++++++---- .../workflows/generate_profile_workflow.yml | 2 +- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 2cd2135e..52705981 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -15,13 +15,35 @@ profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" -stream = open(profile_verions_file, "r") -docs = yaml.load_all(stream, yaml.FullLoader) -for doc in docs: - for k,v in doc.items(): - print (k, "->", v) - print ("\n"), +args = sys.argv +website_repo= args[-1] +args.remove(website_repo) +# For each new uploaded JSON-LD file +for arg in args: + if 'jsonld' in arg.split('/'): + if 'json' in arg.split('.'): + arglist= arg.split('/') + profile_name=arg.split('/')[-1].split('.')[0].split('_')[0] + profile_version=arg.split('_')[1].split('v')[1].split('.json')[0] + print(Fore.YELLOW + 'added/updated profile: ' + arg + Style.RESET_ALL) + + stream = open(profile_verions_file, "r") + docs = yaml.load_all(stream, yaml.FullLoader) + + d=dict() + + for doc in docs: + for k,v in doc.items(): + print (k, "->", v) + d[k]=v + print ("\n") + + if profile_name in d.keys(): + if arg.split("-")[1].split('.')[0]=="DRAFT": + print(Fore.GREEN + v + Style.RESET_ALL) + elif arg.split("-")[1].split('.')[0]=="RELEASE": + print(Fore.GREEN + v + Style.RESET_ALL) print( Style.BRIGHT diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 9a6bd7b7..8dadd316 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -68,7 +68,7 @@ jobs: - name: Execute the config files update Python Script run: | - python ./.github/workflows/config_file_update_script.py + python ./.github/workflows/config_file_update_script.py ${{steps.changed-files.outputs.all_changed_files}} - name: Execute the profile rendering Python Script run: | From 783f73de1ed49f5a0d4add6efe43d6f3522a75da Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 12:54:03 +0200 Subject: [PATCH 124/162] some final rectifications --- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 21f8fd4a..4a1168c3 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -32,7 +32,7 @@ { "type": "array", "items": { - "type": "strissssng", + "type": "ssss", "format": "uri" } } From ab3f09e9d089e6479ec955243e1e964275c21298 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 12:59:49 +0200 Subject: [PATCH 125/162] some final rectifications --- .../workflows/config_file_update_script.py | 44 ++++++++++--------- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 52705981..a98628a3 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -16,38 +16,40 @@ profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" args = sys.argv -website_repo= args[-1] -args.remove(website_repo) -# For each new uploaded JSON-LD file +# For each new uploaded JSON-LD file for arg in args: - if 'jsonld' in arg.split('/'): - if 'json' in arg.split('.'): - arglist= arg.split('/') - profile_name=arg.split('/')[-1].split('.')[0].split('_')[0] - profile_version=arg.split('_')[1].split('v')[1].split('.json')[0] - print(Fore.YELLOW + 'added/updated profile: ' + arg + Style.RESET_ALL) + if "jsonld" in arg.split("/"): + if "json" in arg.split("."): + arglist = arg.split("/") + profile_name = arg.split("/")[-1].split(".")[0].split("_")[0] + profile_version = arg.split("_")[1].split("v")[1].split(".json")[0] + + print( + Fore.LIGHTBLUE_EX + + "profile name and version: " + + profile_name + + profile_version + + Style.RESET_ALL + ) stream = open(profile_verions_file, "r") docs = yaml.load_all(stream, yaml.FullLoader) - d=dict() + d = dict() for doc in docs: - for k,v in doc.items(): - print (k, "->", v) - d[k]=v - print ("\n") - + for k, v in doc.items(): + print(k, "->", v) + d[k] = v + print("\n") + if profile_name in d.keys(): - if arg.split("-")[1].split('.')[0]=="DRAFT": + if arg.split("-")[1].split(".")[0] == "DRAFT": print(Fore.GREEN + v + Style.RESET_ALL) - elif arg.split("-")[1].split('.')[0]=="RELEASE": + elif arg.split("-")[1].split(".")[0] == "RELEASE": print(Fore.GREEN + v + Style.RESET_ALL) print( - Style.BRIGHT - + "Profile versions updated " - + profile_verions_file - + Style.RESET_ALL + Fore.YELLOW + "Profile versions updated " + profile_verions_file + Style.RESET_ALL ) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 4a1168c3..ce53bac1 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -39,7 +39,7 @@ ] }, "applicationCategory": { - "description": "The high-level category in tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", + "description": "The high-level ssss in tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", "oneOf": [ { "type": "string" From 4fa1a2b203e4b105894e218e9843ef86f13290d0 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:02:29 +0200 Subject: [PATCH 126/162] some final rectifications --- .github/workflows/config_file_update_script.py | 3 ++- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index a98628a3..ab99f7fe 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -29,6 +29,7 @@ Fore.LIGHTBLUE_EX + "profile name and version: " + profile_name + + ", " + profile_version + Style.RESET_ALL ) @@ -36,7 +37,7 @@ stream = open(profile_verions_file, "r") docs = yaml.load_all(stream, yaml.FullLoader) - d = dict() + d = {} for doc in docs: for k, v in doc.items(): diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index ce53bac1..1c7ff2bc 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -39,7 +39,7 @@ ] }, "applicationCategory": { - "description": "The high-level ssss in tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", + "description": "The high-level ssss isssn tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", "oneOf": [ { "type": "string" From c0924b93d51a715e4956528e7d7bf0dba3f2167a Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:04:31 +0200 Subject: [PATCH 127/162] some final rectifications --- .../workflows/config_file_update_script.py | 22 +++++++++---------- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index ab99f7fe..829b38d3 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -15,6 +15,17 @@ profile_verions_file = "./bioschemas.github.io/_data/profile_versions.yaml" +stream = open(profile_verions_file, "r") +docs = yaml.load_all(stream, yaml.FullLoader) + +d = {} + +for doc in docs: + for k, v in doc.items(): + print(k, "->", v) + d[k] = v + print("\n") + args = sys.argv # For each new uploaded JSON-LD file @@ -34,17 +45,6 @@ + Style.RESET_ALL ) - stream = open(profile_verions_file, "r") - docs = yaml.load_all(stream, yaml.FullLoader) - - d = {} - - for doc in docs: - for k, v in doc.items(): - print(k, "->", v) - d[k] = v - print("\n") - if profile_name in d.keys(): if arg.split("-")[1].split(".")[0] == "DRAFT": print(Fore.GREEN + v + Style.RESET_ALL) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 1c7ff2bc..c6f9be1c 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -39,7 +39,7 @@ ] }, "applicationCategory": { - "description": "The high-level ssss isssn tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", + "description": "The high-level ssss issscvvvn tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", "oneOf": [ { "type": "string" From f3c1b56a23b511f646930425782b8e32169e3c3e Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:10:43 +0200 Subject: [PATCH 128/162] some final rectifications --- .github/workflows/config_file_update_script.py | 11 +++++++---- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 829b38d3..c8a84895 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -21,10 +21,13 @@ d = {} for doc in docs: - for k, v in doc.items(): - print(k, "->", v) - d[k] = v - print("\n") + try: + for k, v in doc.items(): + print(k, "->", v) + d[k] = v + print("\n") + except Exception as e: + print(e) args = sys.argv diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index c6f9be1c..ea648ac0 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -39,7 +39,7 @@ ] }, "applicationCategory": { - "description": "The high-level ssss issscvvvn tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", + "description": "The high-level ssss dd tzzhe global context, **please always use \"Computational science tool\"**. Type of software application, e.g. 'Game, Multimedia'.", "oneOf": [ { "type": "string" From 5064432e4bfea29b6629623820dfc639748addda Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:13:14 +0200 Subject: [PATCH 129/162] some final rectifications --- .github/workflows/config_file_update_script.py | 4 ++-- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index c8a84895..7f7d9e9b 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -50,9 +50,9 @@ if profile_name in d.keys(): if arg.split("-")[1].split(".")[0] == "DRAFT": - print(Fore.GREEN + v + Style.RESET_ALL) + print(Fore.GREEN + d[profile_name] + Style.RESET_ALL) elif arg.split("-")[1].split(".")[0] == "RELEASE": - print(Fore.GREEN + v + Style.RESET_ALL) + print(Fore.GREEN + d[profile_name] + Style.RESET_ALL) print( Fore.YELLOW + "Profile versions updated " + profile_verions_file + Style.RESET_ALL diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index ea648ac0..7bbe0e26 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the downloadable(s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the downlssssoadable(s). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From 14bcdb37bd4070b86330aabd7fe52d49813b5808 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:15:49 +0200 Subject: [PATCH 130/162] some final rectifications --- .github/workflows/config_file_update_script.py | 4 ++-- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 7f7d9e9b..8e582e2f 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -50,9 +50,9 @@ if profile_name in d.keys(): if arg.split("-")[1].split(".")[0] == "DRAFT": - print(Fore.GREEN + d[profile_name] + Style.RESET_ALL) + print(Fore.GREEN + str(d[profile_name]) + Style.RESET_ALL) elif arg.split("-")[1].split(".")[0] == "RELEASE": - print(Fore.GREEN + d[profile_name] + Style.RESET_ALL) + print(Fore.GREEN + str(d[profile_name]) + Style.RESET_ALL) print( Fore.YELLOW + "Profile versions updated " + profile_verions_file + Style.RESET_ALL diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 7bbe0e26..a0421e20 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the downlssssoadable(s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the downlssssddddoadable(s). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From 16c8f319c2e5fc608beab06436a33411db3bdc96 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:22:32 +0200 Subject: [PATCH 131/162] some final rectifications --- .github/workflows/config_file_update_script.py | 7 +++++-- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index 8e582e2f..ee915aa7 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -49,10 +49,13 @@ ) if profile_name in d.keys(): + print(Fore.GREEN + str(d[profile_name]) + Style.RESET_ALL) if arg.split("-")[1].split(".")[0] == "DRAFT": - print(Fore.GREEN + str(d[profile_name]) + Style.RESET_ALL) + d[profile_name]["latest_publication"] = profile_version + elif arg.split("-")[1].split(".")[0] == "RELEASE": - print(Fore.GREEN + str(d[profile_name]) + Style.RESET_ALL) + d[profile_name]["latest_release"] = profile_version + print(Fore.LIGHTGREEN_EX + str(d[profile_name]) + Style.RESET_ALL) print( Fore.YELLOW + "Profile versions updated " + profile_verions_file + Style.RESET_ALL diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index a0421e20..df8ad9cb 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the downlssssddddoadable(s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the downlssdddddssddddoadable(s). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From 7d564e4adad3c1a09258509752c84cada18475e2 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:25:05 +0200 Subject: [PATCH 132/162] some final rectifications --- .github/workflows/config_file_update_script.py | 16 +++++++++++----- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index ee915aa7..da3288c1 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -23,11 +23,11 @@ for doc in docs: try: for k, v in doc.items(): - print(k, "->", v) + # print(k, "->", v) d[k] = v - print("\n") + # print("\n") except Exception as e: - print(e) + print("This exception occured in parsing the YAML file", e) args = sys.argv @@ -49,13 +49,19 @@ ) if profile_name in d.keys(): - print(Fore.GREEN + str(d[profile_name]) + Style.RESET_ALL) + print( + Fore.GREEN + "Before the change:", + str(d[profile_name]) + Style.RESET_ALL, + ) if arg.split("-")[1].split(".")[0] == "DRAFT": d[profile_name]["latest_publication"] = profile_version elif arg.split("-")[1].split(".")[0] == "RELEASE": d[profile_name]["latest_release"] = profile_version - print(Fore.LIGHTGREEN_EX + str(d[profile_name]) + Style.RESET_ALL) + print( + Fore.LIGHTGREEN_EX + "After the update:", + str(d[profile_name]) + Style.RESET_ALL, + ) print( Fore.YELLOW + "Profile versions updated " + profile_verions_file + Style.RESET_ALL diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index df8ad9cb..4caa13ee 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the downlssdddddssddddoadable(s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the dohhhhwnlssdddddssddddoadable(s). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From 578494f848e12d67a885ddbc77cd7b96ae527989 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:29:01 +0200 Subject: [PATCH 133/162] some final rectifications --- .github/workflows/config_file_update_script.py | 5 ++++- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/config_file_update_script.py b/.github/workflows/config_file_update_script.py index da3288c1..b649bd70 100644 --- a/.github/workflows/config_file_update_script.py +++ b/.github/workflows/config_file_update_script.py @@ -63,6 +63,9 @@ str(d[profile_name]) + Style.RESET_ALL, ) +f = open(profile_verions_file, "w+") +yaml.dump(d, f, allow_unicode=True) + print( Fore.YELLOW + "Profile versions updated " + profile_verions_file + Style.RESET_ALL -) +) \ No newline at end of file diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 4caa13ee..787120bc 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the dohhhhwnlssdddddssddddoadable(s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the dohhhhddwnlssdddddssddddoadable(s). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From 68b0e0c24fd2ee2ad9585f946c19a12b311117fa Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:30:49 +0200 Subject: [PATCH 134/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 9 --------- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 8dadd316..c067017f 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -74,15 +74,6 @@ jobs: run: | python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io - - name: Setup the Github TOKEN - uses: oleksiyrudenko/gha-git-credentials@v2-latest - with: - path: bioschemas.github.io - email: sahar.frikha1@gmail.com - name: sahar-frikha - actor: sahar-frikha - token: '${{secrets.Sahar_Workflows_Token}}' - - name: Commit and Push the changes in the website run: | cd bioschemas.github.io diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 787120bc..c7239172 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the dohhhhddwnlssdddddssddddoadable(s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the dohhhhddwnlsssssdddddssddddoadable(s). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From a75e85ec778871c887fc342717ff63a4af1180e6 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:33:24 +0200 Subject: [PATCH 135/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 13 ++++++++++++- .../jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index c067017f..a799674c 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -74,6 +74,15 @@ jobs: run: | python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io + - name: Setup the Github TOKEN + uses: oleksiyrudenko/gha-git-credentials@v2-latest + with: + path: bioschemas.github.io + email: sahar.frikha1@gmail.com + name: sahar-frikha + actor: sahar-frikha + token: '${{secrets.Sahar_Workflows_Token}}' + - name: Commit and Push the changes in the website run: | cd bioschemas.github.io @@ -82,9 +91,11 @@ jobs: git add . git commit -m "Updating Profile" git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` + + - name: Create a pull request + run: | gh pr create --title "Auto-Rendering Profile" --body "This pull request has been created by a guithub action, after adding/updating a profile in the specifications repo." -# hub pull-request -m "The profile is now created and the branch is ready to be merged" -b master -h `date +%Y_%m_%d-%H_%M_%S` - name: End Workflow run: | echo "Check the Website !" \ No newline at end of file diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index c7239172..5823ee77 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the dohhhhddwnlsssssdddddssddddoadable(s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the (s). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From e3c3dfc3bc7e163cecdd0fdd963ab2d1f4f37c02 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:35:58 +0200 Subject: [PATCH 136/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 1 + ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index a799674c..ddb61c00 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -88,6 +88,7 @@ jobs: cd bioschemas.github.io git config user.name "sahar-frikha" git config user.email "sahar.frikha1@gmail.com" + git status git add . git commit -m "Updating Profile" git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 5823ee77..a2556d41 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the (s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the sss(s). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From ab2a888d2695e66518e238753805ba4d3731d149 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:38:17 +0200 Subject: [PATCH 137/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 3 ++- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index ddb61c00..345bfc85 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -94,7 +94,8 @@ jobs: git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` - name: Create a pull request - run: | + run: | + cd bioschemas.github.io gh pr create --title "Auto-Rendering Profile" --body "This pull request has been created by a guithub action, after adding/updating a profile in the specifications repo." - name: End Workflow diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index a2556d41..241d06f1 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the sss(s). If the file can be downloaded, URL to download the binary.", + "description": "A link to the sss(sss). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From 1cf32cc68d19624f50131a1c0baddac771593e82 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:41:43 +0200 Subject: [PATCH 138/162] some final rectifications --- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 241d06f1..ba6a6ad9 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the sss(sss). If the file can be downloaded, URL to download the binary.", + "description": "A link to the sss(ssjjs). If the file can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From ced3ce57a4f1042ba38688e927173c053a4517c9 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 13:43:06 +0200 Subject: [PATCH 139/162] some final rectifications --- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index ba6a6ad9..a73ff018 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -211,7 +211,7 @@ ] }, "has_input": { - "description": "This is equivalent to edam:has_input. It should be modelled as a MediaObject. ", + "description": "This is errquivalent to edam:has_input. It should be modelled as a MediaObject. ", "oneOf": [ { "$ref": "#/definitions/mediaobject" From 924887b6785c0641c5aaf676d4038a54a26500e5 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 14:20:11 +0200 Subject: [PATCH 140/162] some final rectifications --- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index a73ff018..12339c41 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -195,7 +195,7 @@ ] }, "downloadUrl": { - "description": "A link to the sss(ssjjs). If the file can be downloaded, URL to download the binary.", + "description": "A link to the sss(ssjjs). If the fcccccile can be downloaded, URL to download the binary.", "oneOf": [ { "type": "string", From a31b8b7e718abd32cc7fd7e9ecf255ab519a119e Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 15:22:40 +0200 Subject: [PATCH 141/162] some final rectifications --- .github/workflows/generate_profile_workflow.yml | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 345bfc85..c53bbe6b 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -91,7 +91,7 @@ jobs: git status git add . git commit -m "Updating Profile" - git push --set-upstream origin `date +%Y_%m_%d-%H_%M_%S` + git push --set-upstream -u origin `date +%Y_%m_%d-%H_%M_%S` - name: Create a pull request run: | diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json index 12339c41..d8338eae 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.6-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specification for describing a ddin the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.6-DRAFT" ], From 0cf9a280e0b6407257e0227db294136a06dc650b Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 16:30:25 +0200 Subject: [PATCH 142/162] new computationlTool profile draft --- .../ComputationalTool_v0.9-DRAFT.json.jsonld | 1372 +++++++++++++++++ 1 file changed, 1372 insertions(+) create mode 100644 ComputationalTool/jsonld/ComputationalTool_v0.9-DRAFT.json.jsonld diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.9-DRAFT.json.jsonld b/ComputationalTool/jsonld/ComputationalTool_v0.9-DRAFT.json.jsonld new file mode 100644 index 00000000..dedc882e --- /dev/null +++ b/ComputationalTool/jsonld/ComputationalTool_v0.9-DRAFT.json.jsonld @@ -0,0 +1,1372 @@ +{ + "@context": { + "schema": "http://schema.org/", + "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + "rdfs": "http://www.w3.org/2000/01/rdf-schema#", + "temperary": "https://discovery.biothings.io/view/temperary/", + "bioschemas": "https://discovery.biothings.io/view/bioschemas/" + }, + "@graph": [ + { + "@id": "temperary:ComputationalTool", + "@type": "rdfs:Class", + "rdfs:comment": "Trash HhhhhhhhhhhhhTrash HhhhhhhhhhhhhTrash HhhhhhhhhhhhhTrash HhhhhhhhhhhhhTrash HhhhhhhhhhhhhTrash Hhhhhhhhhhhhh", + "rdfs:label": "ComputationalTool", + "rdfs:subClassOf": { + "@id": "bioschemas:ComputationalTool" + }, + "$validation": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "codeRepository": { + "description": "Link to the source code repository of the tool.", + "oneOf": [ + { + "format": "uri", + "type": "string" + }, + { + "type": "array", + "items": { + "format": "uri", + "type": "string" + } + } + ] + }, + "programmingLanguage": { + "description": "The main programming language(s) used to build or execute the tool. Please use terms from the ‘Programming language’ table in the Bio.Tools documentation", + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "@type": "ComputerLanguage", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "ComputerLanguage", + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": [] + } + } + ] + }, + "conformsTo": { + "description": "Used to state the Bioschemas profile that the markup relates to. The versioned URL of the profile must be used. Note that we use a CURIE in the table here but the full URL for Dublin Core terms must be used in the markup (http://purl.org/dc/terms/conformsTo), see example.", + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "oneOf": [ + { + "enum": [ + "https://github.com/BioSchemas/specifications/blob/master/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json" + ] + }, + { + "format": "uri", + "type": "string" + } + ], + "description": "The url of the version bioschemas profile that was used. For jsonschema, set @id to the identifier" + } + }, + "required": [ + "identifier" + ] + }, + "applicationCategory": { + "description": "Type of software application, e.g. 'Game, Multimedia'.", + "anyOf": [ + { + "type": "string" + }, + { + "format": "uri", + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "array", + "items": { + "format": "uri", + "type": "string" + } + } + ] + }, + "applicationSubCategory": { + "description": "Subcategory of the application, e.g. 'Arcade Game'.", + "oneOf": [ + { + "vocabulary": { + "children_of": [ + "http://edamontology.org/topic_0003" + ], + "property": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "ontology": [ + "edamTopic" + ] + }, + "@type": "DefinedTerm", + "type": "object", + "strict": false + }, + { + "type": "array", + "items": { + "vocabulary": { + "children_of": [ + "http://edamontology.org/topic_0003" + ], + "property": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "ontology": [ + "edamTopic" + ] + }, + "@type": "DefinedTerm", + "type": "object", + "strict": false + } + } + ] + }, + "applicationSuite": { + "description": "The name of the application suite to which the application belongs (e.g. Excel belongs to Office).", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "downloadUrl": { + "description": "If the file can be downloaded, URL to download the binary.", + "oneOf": [ + { + "format": "uri", + "type": "string" + }, + { + "type": "array", + "items": { + "format": "uri", + "type": "string" + } + } + ] + }, + "featureList": { + "description": "Features or modules provided by this application (and possibly required by other applications).", + "anyOf": [ + { + "vocabulary": { + "children_of": [ + "http://edamontology.org/operation_0004" + ], + "property": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "ontology": [ + "edamOperation" + ] + }, + "@type": "DefinedTerm", + "type": "object", + "strict": false + }, + { + "type": "array", + "items": { + "vocabulary": { + "children_of": [ + "http://edamontology.org/operation_0004" + ], + "property": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "ontology": [ + "edamOperation" + ] + }, + "@type": "DefinedTerm", + "type": "object", + "strict": false + } + }, + { + "format": "uri", + "type": "string" + }, + { + "type": "array", + "items": { + "format": "uri", + "type": "string" + } + } + ] + }, + "operatingSystem": { + "description": "Operating systems supported (Windows 7, OSX 10.6, Android 1.6).", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "softwareAddOn": { + "description": "Additional content for a software application.", + "oneOf": [ + { + "@type": "SoftwareApplication", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "SoftwareApplication", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + } + } + ] + }, + "softwareHelp": { + "description": "Software application help.", + "oneOf": [ + { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + } + } + ] + }, + "softwareVersion": { + "description": "Version of the software instance.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "author": { + "description": "The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.", + "anyOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + }, + { + "@type": "Person", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "affiliation": { + "oneOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "identifier": { + "type": "string" + }, + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Person", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "affiliation": { + "oneOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "identifier": { + "type": "string" + }, + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "citation": { + "description": "A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", + "oneOf": [ + { + "@type": "CreativeWork", + "description": "A citation object for a resource.", + "type": "object", + "properties": { + "identifier": { + "description": "An identifier associated with the citation", + "type": "string" + }, + "name": { + "description": "Name of or title of the citation", + "type": "string" + }, + "pmid": { + "description": "A pubmed identifier if available", + "type": "string" + }, + "url": { + "format": "uri", + "description": "The url of the resource cited", + "type": "string" + }, + "doi": { + "description": "A doi if available", + "type": "string" + }, + "citeText": { + "description": "The bibliographic citation for the referenced resource as is provided", + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "CreativeWork", + "description": "A citation object for a resource.", + "type": "object", + "properties": { + "identifier": { + "description": "An identifier associated with the citation", + "type": "string" + }, + "name": { + "description": "Name of or title of the citation", + "type": "string" + }, + "pmid": { + "description": "A pubmed identifier if available", + "type": "string" + }, + "url": { + "format": "uri", + "description": "The url of the resource cited", + "type": "string" + }, + "doi": { + "description": "A doi if available", + "type": "string" + }, + "citeText": { + "description": "The bibliographic citation for the referenced resource as is provided", + "type": "string" + } + }, + "required": [] + } + } + ] + }, + "contributor": { + "description": "A secondary contributor to the CreativeWork or Event.", + "anyOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + }, + { + "@type": "Person", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "affiliation": { + "oneOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "identifier": { + "type": "string" + }, + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Person", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "affiliation": { + "oneOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "identifier": { + "type": "string" + }, + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "discussionUrl": { + "description": "A link to the page containing the comments of the CreativeWork.", + "oneOf": [ + { + "format": "uri", + "type": "string" + }, + { + "type": "array", + "items": { + "format": "uri", + "type": "string" + } + } + ] + }, + "funder": { + "description": "A person or organization that supports (sponsors) something through some kind of financial contribution.", + "anyOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + }, + { + "@type": "Person", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "affiliation": { + "oneOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "identifier": { + "type": "string" + }, + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Person", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "affiliation": { + "oneOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "givenName": { + "type": "string" + }, + "familyName": { + "identifier": { + "type": "string" + }, + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "hasPart": { + "description": "Indicates an item or CreativeWork that is part of this item, or CreativeWork (in some sense).", + "oneOf": [ + { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + } + } + ] + }, + "isAccessibleForFree": { + "description": "A flag to signal that the item, event, or place is accessible for free.", + "type": "boolean" + }, + "isBasedOn": { + "description": "A resource from which this work is derived or from which it is a modification or adaption.", + "anyOf": [ + { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + } + }, + { + "@type": "Product", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "Product", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + } + }, + { + "format": "uri", + "type": "string" + }, + { + "type": "array", + "items": { + "format": "uri", + "type": "string" + } + } + ] + }, + "isPartOf": { + "description": "Indicates an item or CreativeWork that this item, or CreativeWork (in some sense), is part of.", + "oneOf": [ + { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + } + } + ] + }, + "keywords": { + "description": "Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "license": { + "description": "A license document that applies to this content, typically indicated by URL.", + "anyOf": [ + { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + }, + { + "format": "uri", + "type": "string" + }, + { + "type": "array", + "items": { + "@type": "CreativeWork", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [] + } + }, + { + "type": "array", + "items": { + "format": "uri", + "type": "string" + } + } + ] + }, + "provider": { + "description": "The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.", + "anyOf": [ + { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + }, + { + "type": "array", + "items": { + "@type": "Organization", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternateName": { + "type": "string" + } + } + } + } + ] + }, + "thumbnailUrl": { + "description": "A thumbnail image relevant to the Thing.", + "format": "uri", + "type": "string" + }, + "description": { + "description": "A description of the item.", + "type": "string" + }, + "identifier": { + "description": "The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.\n ", + "anyOf": [ + { + "@type": "PropertyValue", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [] + }, + { + "type": "array", + "items": { + "@type": "PropertyValue", + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [] + } + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "format": "uri", + "type": "string" + }, + { + "type": "array", + "items": { + "format": "uri", + "type": "string" + } + } + ] + }, + "name": { + "description": "The name of the item.", + "type": "string" + }, + "url": { + "description": "URL of the item.", + "format": "uri", + "type": "string" + } + }, + "required": [ + "conformsTo", + "description", + "name", + "url" + ], + "recommended": [ + "applicationCategory", + "applicationSubCategory", + "featureList", + "softwareVersion", + "author", + "citation", + "license" + ], + "optional": [ + "codeRepository", + "programmingLanguage", + "applicationSuite", + "downloadUrl", + "operatingSystem", + "softwareAddOn", + "softwareHelp", + "contributor", + "discussionUrl", + "funder", + "hasPart", + "isAccessibleForFree", + "isBasedOn", + "isPartOf", + "keywords", + "provider", + "thumbnailUrl", + "identifier" + ] + } + } + ] +} \ No newline at end of file From 60297d78e2006ff5c1414f81b8e64d768cfc0080 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 16:31:02 +0200 Subject: [PATCH 143/162] new computationlTool profile draft --- .../ComputationalTool_v0.9-DRAFT.json.jsonld | 1372 ----------------- 1 file changed, 1372 deletions(-) delete mode 100644 ComputationalTool/jsonld/ComputationalTool_v0.9-DRAFT.json.jsonld diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.9-DRAFT.json.jsonld b/ComputationalTool/jsonld/ComputationalTool_v0.9-DRAFT.json.jsonld deleted file mode 100644 index dedc882e..00000000 --- a/ComputationalTool/jsonld/ComputationalTool_v0.9-DRAFT.json.jsonld +++ /dev/null @@ -1,1372 +0,0 @@ -{ - "@context": { - "schema": "http://schema.org/", - "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - "rdfs": "http://www.w3.org/2000/01/rdf-schema#", - "temperary": "https://discovery.biothings.io/view/temperary/", - "bioschemas": "https://discovery.biothings.io/view/bioschemas/" - }, - "@graph": [ - { - "@id": "temperary:ComputationalTool", - "@type": "rdfs:Class", - "rdfs:comment": "Trash HhhhhhhhhhhhhTrash HhhhhhhhhhhhhTrash HhhhhhhhhhhhhTrash HhhhhhhhhhhhhTrash HhhhhhhhhhhhhTrash Hhhhhhhhhhhhh", - "rdfs:label": "ComputationalTool", - "rdfs:subClassOf": { - "@id": "bioschemas:ComputationalTool" - }, - "$validation": { - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "codeRepository": { - "description": "Link to the source code repository of the tool.", - "oneOf": [ - { - "format": "uri", - "type": "string" - }, - { - "type": "array", - "items": { - "format": "uri", - "type": "string" - } - } - ] - }, - "programmingLanguage": { - "description": "The main programming language(s) used to build or execute the tool. Please use terms from the ‘Programming language’ table in the Bio.Tools documentation", - "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "@type": "ComputerLanguage", - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "ComputerLanguage", - "type": "object", - "properties": { - "name": { - "type": "string" - } - }, - "required": [] - } - } - ] - }, - "conformsTo": { - "description": "Used to state the Bioschemas profile that the markup relates to. The versioned URL of the profile must be used. Note that we use a CURIE in the table here but the full URL for Dublin Core terms must be used in the markup (http://purl.org/dc/terms/conformsTo), see example.", - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "oneOf": [ - { - "enum": [ - "https://github.com/BioSchemas/specifications/blob/master/ComputationalTool/jsonld/ComputationalTool_v1.0-RELEASE.json" - ] - }, - { - "format": "uri", - "type": "string" - } - ], - "description": "The url of the version bioschemas profile that was used. For jsonschema, set @id to the identifier" - } - }, - "required": [ - "identifier" - ] - }, - "applicationCategory": { - "description": "Type of software application, e.g. 'Game, Multimedia'.", - "anyOf": [ - { - "type": "string" - }, - { - "format": "uri", - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "array", - "items": { - "format": "uri", - "type": "string" - } - } - ] - }, - "applicationSubCategory": { - "description": "Subcategory of the application, e.g. 'Arcade Game'.", - "oneOf": [ - { - "vocabulary": { - "children_of": [ - "http://edamontology.org/topic_0003" - ], - "property": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "ontology": [ - "edamTopic" - ] - }, - "@type": "DefinedTerm", - "type": "object", - "strict": false - }, - { - "type": "array", - "items": { - "vocabulary": { - "children_of": [ - "http://edamontology.org/topic_0003" - ], - "property": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "ontology": [ - "edamTopic" - ] - }, - "@type": "DefinedTerm", - "type": "object", - "strict": false - } - } - ] - }, - "applicationSuite": { - "description": "The name of the application suite to which the application belongs (e.g. Excel belongs to Office).", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "downloadUrl": { - "description": "If the file can be downloaded, URL to download the binary.", - "oneOf": [ - { - "format": "uri", - "type": "string" - }, - { - "type": "array", - "items": { - "format": "uri", - "type": "string" - } - } - ] - }, - "featureList": { - "description": "Features or modules provided by this application (and possibly required by other applications).", - "anyOf": [ - { - "vocabulary": { - "children_of": [ - "http://edamontology.org/operation_0004" - ], - "property": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "ontology": [ - "edamOperation" - ] - }, - "@type": "DefinedTerm", - "type": "object", - "strict": false - }, - { - "type": "array", - "items": { - "vocabulary": { - "children_of": [ - "http://edamontology.org/operation_0004" - ], - "property": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "ontology": [ - "edamOperation" - ] - }, - "@type": "DefinedTerm", - "type": "object", - "strict": false - } - }, - { - "format": "uri", - "type": "string" - }, - { - "type": "array", - "items": { - "format": "uri", - "type": "string" - } - } - ] - }, - "operatingSystem": { - "description": "Operating systems supported (Windows 7, OSX 10.6, Android 1.6).", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "softwareAddOn": { - "description": "Additional content for a software application.", - "oneOf": [ - { - "@type": "SoftwareApplication", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "SoftwareApplication", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - } - } - ] - }, - "softwareHelp": { - "description": "Software application help.", - "oneOf": [ - { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - } - } - ] - }, - "softwareVersion": { - "description": "Version of the software instance.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "author": { - "description": "The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.", - "anyOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - }, - { - "@type": "Person", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "affiliation": { - "oneOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "givenName": { - "type": "string" - }, - "familyName": { - "identifier": { - "type": "string" - }, - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Person", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "affiliation": { - "oneOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "givenName": { - "type": "string" - }, - "familyName": { - "identifier": { - "type": "string" - }, - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "citation": { - "description": "A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.", - "oneOf": [ - { - "@type": "CreativeWork", - "description": "A citation object for a resource.", - "type": "object", - "properties": { - "identifier": { - "description": "An identifier associated with the citation", - "type": "string" - }, - "name": { - "description": "Name of or title of the citation", - "type": "string" - }, - "pmid": { - "description": "A pubmed identifier if available", - "type": "string" - }, - "url": { - "format": "uri", - "description": "The url of the resource cited", - "type": "string" - }, - "doi": { - "description": "A doi if available", - "type": "string" - }, - "citeText": { - "description": "The bibliographic citation for the referenced resource as is provided", - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "CreativeWork", - "description": "A citation object for a resource.", - "type": "object", - "properties": { - "identifier": { - "description": "An identifier associated with the citation", - "type": "string" - }, - "name": { - "description": "Name of or title of the citation", - "type": "string" - }, - "pmid": { - "description": "A pubmed identifier if available", - "type": "string" - }, - "url": { - "format": "uri", - "description": "The url of the resource cited", - "type": "string" - }, - "doi": { - "description": "A doi if available", - "type": "string" - }, - "citeText": { - "description": "The bibliographic citation for the referenced resource as is provided", - "type": "string" - } - }, - "required": [] - } - } - ] - }, - "contributor": { - "description": "A secondary contributor to the CreativeWork or Event.", - "anyOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - }, - { - "@type": "Person", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "affiliation": { - "oneOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "givenName": { - "type": "string" - }, - "familyName": { - "identifier": { - "type": "string" - }, - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Person", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "affiliation": { - "oneOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "givenName": { - "type": "string" - }, - "familyName": { - "identifier": { - "type": "string" - }, - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "discussionUrl": { - "description": "A link to the page containing the comments of the CreativeWork.", - "oneOf": [ - { - "format": "uri", - "type": "string" - }, - { - "type": "array", - "items": { - "format": "uri", - "type": "string" - } - } - ] - }, - "funder": { - "description": "A person or organization that supports (sponsors) something through some kind of financial contribution.", - "anyOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - }, - { - "@type": "Person", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "affiliation": { - "oneOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "givenName": { - "type": "string" - }, - "familyName": { - "identifier": { - "type": "string" - }, - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Person", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "affiliation": { - "oneOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "givenName": { - "type": "string" - }, - "familyName": { - "identifier": { - "type": "string" - }, - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "hasPart": { - "description": "Indicates an item or CreativeWork that is part of this item, or CreativeWork (in some sense).", - "oneOf": [ - { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - } - } - ] - }, - "isAccessibleForFree": { - "description": "A flag to signal that the item, event, or place is accessible for free.", - "type": "boolean" - }, - "isBasedOn": { - "description": "A resource from which this work is derived or from which it is a modification or adaption.", - "anyOf": [ - { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - } - }, - { - "@type": "Product", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "Product", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - } - }, - { - "format": "uri", - "type": "string" - }, - { - "type": "array", - "items": { - "format": "uri", - "type": "string" - } - } - ] - }, - "isPartOf": { - "description": "Indicates an item or CreativeWork that this item, or CreativeWork (in some sense), is part of.", - "oneOf": [ - { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - } - } - ] - }, - "keywords": { - "description": "Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "license": { - "description": "A license document that applies to this content, typically indicated by URL.", - "anyOf": [ - { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - }, - { - "format": "uri", - "type": "string" - }, - { - "type": "array", - "items": { - "@type": "CreativeWork", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "format": "uri", - "type": "string" - } - }, - "required": [] - } - }, - { - "type": "array", - "items": { - "format": "uri", - "type": "string" - } - } - ] - }, - "provider": { - "description": "The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.", - "anyOf": [ - { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - }, - { - "type": "array", - "items": { - "@type": "Organization", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "alternateName": { - "type": "string" - } - } - } - } - ] - }, - "thumbnailUrl": { - "description": "A thumbnail image relevant to the Thing.", - "format": "uri", - "type": "string" - }, - "description": { - "description": "A description of the item.", - "type": "string" - }, - "identifier": { - "description": "The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.\n ", - "anyOf": [ - { - "@type": "PropertyValue", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [] - }, - { - "type": "array", - "items": { - "@type": "PropertyValue", - "type": "object", - "properties": { - "identifier": { - "type": "string" - }, - "name": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [] - } - }, - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "format": "uri", - "type": "string" - }, - { - "type": "array", - "items": { - "format": "uri", - "type": "string" - } - } - ] - }, - "name": { - "description": "The name of the item.", - "type": "string" - }, - "url": { - "description": "URL of the item.", - "format": "uri", - "type": "string" - } - }, - "required": [ - "conformsTo", - "description", - "name", - "url" - ], - "recommended": [ - "applicationCategory", - "applicationSubCategory", - "featureList", - "softwareVersion", - "author", - "citation", - "license" - ], - "optional": [ - "codeRepository", - "programmingLanguage", - "applicationSuite", - "downloadUrl", - "operatingSystem", - "softwareAddOn", - "softwareHelp", - "contributor", - "discussionUrl", - "funder", - "hasPart", - "isAccessibleForFree", - "isBasedOn", - "isPartOf", - "keywords", - "provider", - "thumbnailUrl", - "identifier" - ] - } - } - ] -} \ No newline at end of file From 7da32d71b9e2379f36c2bc462afa758f0d33979c Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 16:54:00 +0200 Subject: [PATCH 144/162] change --- Beacon/jsonld/Beacon_v0.2-DRAFT-2018_04_23-DEPRECATED.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Beacon/jsonld/Beacon_v0.2-DRAFT-2018_04_23-DEPRECATED.json b/Beacon/jsonld/Beacon_v0.2-DRAFT-2018_04_23-DEPRECATED.json index 2e6cce79..15d67c68 100644 --- a/Beacon/jsonld/Beacon_v0.2-DRAFT-2018_04_23-DEPRECATED.json +++ b/Beacon/jsonld/Beacon_v0.2-DRAFT-2018_04_23-DEPRECATED.json @@ -12,7 +12,7 @@ "@id": "bioschemasdeprecated:Beacon", "@type": "rdfs:Class", "owl:deprecated": "True", - "rdfs:comment": "A convention for beacon to self-describe. In this document we propose a simple way for a beacons to self-describe their genetic variant cardinality service for better integration with other beacons within the beacon-network. It builds upon the Beacon service API and uses existing schema.org entities and properties. Version: 0.2-DRAFT-2018_04_23", + "rdfs:comment": "A ddd for beacon to self-describe. In this document we propose a simple way for a beacons to self-describe their genetic variant cardinality service for better integration with other beacons within the beacon-network. It builds upon the Beacon service API and uses existing schema.org entities and properties. Version: 0.2-DRAFT-2018_04_23", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Beacon/0.2-DRAFT-2018_04_23" ], From 360edb1ccb2d6a00097902b32682d1de6c026870 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 17:24:46 +0200 Subject: [PATCH 145/162] change --- Taxon/jsonld/Taxon_v0.4-DRAFT.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.4-DRAFT.json b/Taxon/jsonld/Taxon_v0.4-DRAFT.json index d8bbdf9d..810f6555 100644 --- a/Taxon/jsonld/Taxon_v0.4-DRAFT.json +++ b/Taxon/jsonld/Taxon_v0.4-DRAFT.json @@ -37,7 +37,7 @@ }, { "@id": "bioschemastypesdrafts:parentTaxon", - "rdfs:comment": "Closest parent taxon of the taxon in question.\nInverse property: childTaxon Direct, most proximate higher-rank parent taxon", + "rdfs:comment": "Ginger heyyyy parent taxon of the taxon in question.\nInverse property: childTaxon Direct, most proximate higher-rank parent taxon", "@type": "rdf:Property", "rdfs:label": "parentTaxon", "schema:domainIncludes": { From bde0a75878cc4fd008a859fd647ff1aae8b7a1e2 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 18:01:45 +0200 Subject: [PATCH 146/162] change --- Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json b/Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json index a24b4a69..17cc6544 100644 --- a/Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json +++ b/Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json @@ -22,7 +22,7 @@ "type": "object", "properties": { "additionalType": { - "description": "A Taxon type from a well known vocabulary, e.g. DarwinCore http://rs.tdwg.org/dwc/terms/Taxon or http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", + "description": "A Taxon yty from a well known vocabulary, e.g. DarwinCore http://rs.tdwg.org/dwc/terms/Taxon or http://rs.tdwg.org/ontology/voc/TaxonConcept#TaxonConcept An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.", "oneOf": [ { "type": "string", From 1f24616847c4e0273358df953d67b327abfff50d Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 19 Oct 2022 18:08:11 +0200 Subject: [PATCH 147/162] change --- .../workflows/profile_generation_script.py | 490 ++++++++++-------- Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json | 2 +- 2 files changed, 286 insertions(+), 206 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 76e87189..37d03217 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -10,258 +10,318 @@ from os import path - def generate_transformed_profile(g, path_changed_file, external_properties): - + transformed_profile = dict() - + ### Spec_info - transformed_profile["spec_info"] = generate_spec_info(g, path_changed_file) - + transformed_profile["spec_info"] = generate_spec_info(g, path_changed_file) + ### Mapping transformed_profile["mapping"] = list(dict()) - - # Browse properties by marginality and add them to the mappings + + # Browse properties by marginality and add them to the mappings if "$validation" in g.keys(): - transformed_profile["type"]="Profile" - for req_label in g['$validation']["required"]: - prop = g['$validation']["properties"][req_label] - new_p = generate_property (g, prop, req_label, "Required",external_properties) + transformed_profile["type"] = "Profile" + for req_label in g["$validation"]["required"]: + prop = g["$validation"]["properties"][req_label] + new_p = generate_property( + g, prop, req_label, "Required", external_properties + ) transformed_profile["mapping"].append(new_p) - for reco_label in g['$validation']["recommended"]: - prop = g['$validation']["properties"][reco_label] - new_p = generate_property (g, prop, reco_label, "Minimum",external_properties) + for reco_label in g["$validation"]["recommended"]: + prop = g["$validation"]["properties"][reco_label] + new_p = generate_property( + g, prop, reco_label, "Minimum", external_properties + ) transformed_profile["mapping"].append(new_p) - for opt_label in g['$validation']["optional"]: - prop = g['$validation']["properties"][opt_label] - new_p = generate_property (g, prop, opt_label, "Optional",external_properties) + for opt_label in g["$validation"]["optional"]: + prop = g["$validation"]["properties"][opt_label] + new_p = generate_property( + g, prop, opt_label, "Optional", external_properties + ) transformed_profile["mapping"].append(new_p) else: - transformed_profile["type"]="Type" + transformed_profile["type"] = "Type" ### Generate the metadata - transformed_profile['name']=g["@id"].split(':')[1] - transformed_profile['use_cases_url']='/useCases/'+transformed_profile['name'] + transformed_profile["name"] = g["@id"].split(":")[1] + transformed_profile["use_cases_url"] = "/useCases/" + transformed_profile["name"] - with open('bioschemas-dde/draft_profile_list.txt') as csv_file: - csv_reader = csv.reader(csv_file, delimiter=',') + with open("bioschemas-dde/draft_profile_list.txt") as csv_file: + csv_reader = csv.reader(csv_file, delimiter=",") line_count = 0 for row in csv_reader: line_count += 1 if line_count > 1: - fields = row[0].split('\t') - if fields[1]==transformed_profile['name']: - #print(f'\n namespace={fields[0]}, name={fields[1]}, subclassof={fields[2]}, type={fields[3]}, version={fields[4]}, url={fields[5]}.') - transformed_profile['spec_type']={fields[3]} - - transformed_profile['previous_version']= get_previous_version(path_changed_file) - transformed_profile['previous_release']= get_previous_release(path_changed_file) - transformed_profile['status']=get_status(transformed_profile["spec_info"]["version"]) - transformed_profile['group']=get_group(transformed_profile['name']) - transformed_profile['cross_walk_url']=get_cross_walk_url(transformed_profile['name']) - transformed_profile['gh_tasks']= "https://github.com/Bioschemas/specifications/labels/type%3A%20"+transformed_profile['name'] - transformed_profile['live_deploy']="/liveDeploys" - transformed_profile['parent_type']=transformed_profile["spec_info"]["official_type"] - transformed_profile['redirect_from']=get_redirect_from(transformed_profile['name']) - transformed_profile['hierarchy']=get_hierarchy() - transformed_profile['json-ld_url']=arg - transformed_profile['dde_ui_url']="https://discovery.biothings.io/view/" - - if transformed_profile["type"]=="Profile": - if arg.split("-")[1].split('.')[0]=="DRAFT": - transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemasdrafts/bioschemasdrafts:" + transformed_profile["name"] - elif arg.split("-")[1].split('.')[0]=="RELEASE": - transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemas/bioschemas:" + transformed_profile["name"] + fields = row[0].split("\t") + if fields[1] == transformed_profile["name"]: + # print(f'\n namespace={fields[0]}, name={fields[1]}, subclassof={fields[2]}, type={fields[3]}, version={fields[4]}, url={fields[5]}.') + transformed_profile["spec_type"] = {fields[3]} + + transformed_profile["previous_version"] = get_previous_version(path_changed_file) + transformed_profile["previous_release"] = get_previous_release(path_changed_file) + transformed_profile["status"] = get_status( + transformed_profile["spec_info"]["version"] + ) + transformed_profile["group"] = get_group(transformed_profile["name"]) + transformed_profile["cross_walk_url"] = get_cross_walk_url( + transformed_profile["name"] + ) + transformed_profile["gh_tasks"] = ( + "https://github.com/Bioschemas/specifications/labels/type%3A%20" + + transformed_profile["name"] + ) + transformed_profile["live_deploy"] = "/liveDeploys" + transformed_profile["parent_type"] = transformed_profile["spec_info"][ + "official_type" + ] + transformed_profile["redirect_from"] = get_redirect_from( + transformed_profile["name"] + ) + transformed_profile["hierarchy"] = get_hierarchy() + transformed_profile["json-ld_url"] = arg + transformed_profile["dde_ui_url"] = "https://discovery.biothings.io/view/" + + if transformed_profile["type"] == "Profile": + if arg.split("-")[1].split(".")[0] == "DRAFT": + transformed_profile["dde_ui_url"] = ( + transformed_profile["dde_ui_url"] + + "bioschemasdrafts/bioschemasdrafts:" + + transformed_profile["name"] + ) + elif arg.split("-")[1].split(".")[0] == "RELEASE": + transformed_profile["dde_ui_url"] = ( + transformed_profile["dde_ui_url"] + + "bioschemas/bioschemas:" + + transformed_profile["name"] + ) else: - if arg.split("-")[1].split('.')[0]=="DRAFT": - transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemastypesdrafts/bioschemastypesdrafts:" + transformed_profile["name"] - elif arg.split("-")[1].split('.')[0]=="RELEASE": - transformed_profile['dde_ui_url'] = transformed_profile['dde_ui_url'] + "bioschemas/bioschemastypes/bioschemastypes:" + transformed_profile["name"] + if arg.split("-")[1].split(".")[0] == "DRAFT": + transformed_profile["dde_ui_url"] = ( + transformed_profile["dde_ui_url"] + + "bioschemastypesdrafts/bioschemastypesdrafts:" + + transformed_profile["name"] + ) + elif arg.split("-")[1].split(".")[0] == "RELEASE": + transformed_profile["dde_ui_url"] = ( + transformed_profile["dde_ui_url"] + + "bioschemas/bioschemastypes/bioschemastypes:" + + transformed_profile["name"] + ) for i in transformed_profile: - if i !="spec_info" and i!="mapping": - print(Fore.YELLOW + Style.BRIGHT + f'{i} = {transformed_profile[i]}' + Style.RESET_ALL) + if i != "spec_info" and i != "mapping": + print( + Fore.YELLOW + + Style.BRIGHT + + f"{i} = {transformed_profile[i]}" + + Style.RESET_ALL + ) return transformed_profile + # display all files and get the -1 file from os import listdir from os.path import isfile, join + def get_previous_version(path_changed_file): - previous_version="" - - mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] + previous_version = "" + + mypath = path_changed_file.split("/")[0] + "/" + path_changed_file.split("/")[1] onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] - - max=0 + + max = 0 for f in onlyfiles: - if f.split('_')[1].split('-')[1].split('.')[0]=="DRAFT": - if int(f.split('_')[1].split('-')[0].split('.')[1]) > max: - max = int(f.split('_')[1].split('-')[0].split('v')[1].split('.')[0]+f.split('_')[1].split('-')[0].split('.')[1]) - previous_version=f.split('_')[1].split('v')[1].split('.json')[0] - + if f.split("_")[1].split("-")[1].split(".")[0] == "DRAFT": + if int(f.split("_")[1].split("-")[0].split(".")[1]) > max: + max = int( + f.split("_")[1].split("-")[0].split("v")[1].split(".")[0] + + f.split("_")[1].split("-")[0].split(".")[1] + ) + previous_version = f.split("_")[1].split("v")[1].split(".json")[0] + return previous_version + def get_previous_release(path_changed_file): - previous_release="" - mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1] + previous_release = "" + mypath = path_changed_file.split("/")[0] + "/" + path_changed_file.split("/")[1] onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] - - max=0 + + max = 0 for f in onlyfiles: - if f.split('_')[1].split('-')[1].split('.')[0]=="RELEASE": - if int(f.split('_')[1].split('-')[0].split('.')[0].split('v')[1]) > max: - max = int(f.split('_')[1].split('-')[0].split('v')[1].split('.')[0]+f.split('_')[1].split('-')[0].split('.')[1]) - previous_release=f.split('_')[1].split('v')[1].split('.json')[0] + if f.split("_")[1].split("-")[1].split(".")[0] == "RELEASE": + if int(f.split("_")[1].split("-")[0].split(".")[0].split("v")[1]) > max: + max = int( + f.split("_")[1].split("-")[0].split("v")[1].split(".")[0] + + f.split("_")[1].split("-")[0].split(".")[1] + ) + previous_release = f.split("_")[1].split("v")[1].split(".json")[0] return previous_release + # if its draft it's revision, case release, deprecated def get_status(version): - status ="" - if version.split("-")[-1]=="DRAFT": + status = "" + if version.split("-")[-1] == "DRAFT": status = "Revision" - elif version.split("-")[-1]=="RELEASE": - status ="Deprecated" + elif version.split("-")[-1] == "RELEASE": + status = "Deprecated" return status + # Create a mapping file grp == classes, and put it in the _data/ then fetch them from there def get_group(profile_name): - group="" - - with open('bioschemas.github.io/_data/metadata_mapping.csv') as csv_file: - csv_reader = csv.reader(csv_file, delimiter=',') + group = "" + + with open("bioschemas.github.io/_data/metadata_mapping.csv") as csv_file: + csv_reader = csv.reader(csv_file, delimiter=",") line_count = 0 for row in csv_reader: line_count += 1 if line_count > 1: - if row[0]==profile_name: - group=row[1] + if row[0] == profile_name: + group = row[1] return group + # same as grps, we need a mapping file. [The admin should make sure he updates the config files in the right order!] def get_cross_walk_url(profile_name): - cross_walk_url="" - - with open('bioschemas.github.io/_data/metadata_mapping.csv') as csv_file: - csv_reader = csv.reader(csv_file, delimiter=',') + cross_walk_url = "" + + with open("bioschemas.github.io/_data/metadata_mapping.csv") as csv_file: + csv_reader = csv.reader(csv_file, delimiter=",") line_count = 0 for row in csv_reader: line_count += 1 if line_count > 1: - if row[0]==profile_name: - cross_walk_url=row[3] + if row[0] == profile_name: + cross_walk_url = row[3] return cross_walk_url + # follow the pattern for most, and when I see an exception, hardcoded it an dictionary def get_redirect_from(profile_name): - redirect_from=list() + redirect_from = list() - with open('bioschemas.github.io/_data/metadata_mapping.csv') as csv_file: - csv_reader = csv.reader(csv_file, delimiter=',') + with open("bioschemas.github.io/_data/metadata_mapping.csv") as csv_file: + csv_reader = csv.reader(csv_file, delimiter=",") line_count = 0 for row in csv_reader: line_count += 1 if line_count > 1: - if row[0]==profile_name: - redirect_from=row[2] + if row[0] == profile_name: + redirect_from = row[2] return redirect_from -# from the profiles json-ld : + +# from the profiles json-ld : def get_hierarchy(): - hierarchy=list() - + hierarchy = list() + return hierarchy + def generate_spec_info(g, path_changed_file): - spec_info = dict() - + spec_info = dict() + if "rdfs:label" in g.keys(): - spec_info["title"] = g['rdfs:label'] + spec_info["title"] = g["rdfs:label"] else: - spec_info["title"]=path_changed_file.split('_')[0] + spec_info["title"] = path_changed_file.split("_")[0] if "rdfs:comment" in g.keys(): - spec_info["description"] = g['rdfs:comment'] + spec_info["description"] = g["rdfs:comment"] else: spec_info["description"] - + if "schema:schemaVersion" in g.keys(): - spec_info["version"] = g['schema:schemaVersion'][0].split('/')[-1] + spec_info["version"] = g["schema:schemaVersion"][0].split("/")[-1] else: - spec_info["version"] = path_changed_file.split('_')[1].split('v')[1].split('.json')[0] - + spec_info["version"] = ( + path_changed_file.split("_")[1].split("v")[1].split(".json")[0] + ) + if "rdfs:subClassOf" in g.keys(): - spec_info["official_type"] = g['rdfs:subClassOf']['@id'].split(':')[1] + spec_info["official_type"] = g["rdfs:subClassOf"]["@id"].split(":")[1] else: - spec_info["official_type"]="" + spec_info["official_type"] = "" - spec_info["full_example"] = "https://github.com/BioSchemas/specifications/tree/master/"+spec_info["title"]+"/examples" + spec_info["full_example"] = ( + "https://github.com/BioSchemas/specifications/tree/master/" + + spec_info["title"] + + "/examples" + ) return spec_info -def generate_property (g, prop, req_label, marginality,external_properties): - - print(Fore.GREEN + Style.BRIGHT + f'Property : {req_label}' + Style.RESET_ALL) + +def generate_property(g, prop, req_label, marginality, external_properties): + + print(Fore.GREEN + Style.BRIGHT + f"Property : {req_label}" + Style.RESET_ALL) new_p = dict() - #If I want to create a dict, new_p[] = {'description':prop["description"]} - - new_p['property'] = req_label - new_p['marginality'] = marginality - new_p['cardinality'], new_p['expected_types'] = generate_types_cardianlity(g, prop) + # If I want to create a dict, new_p[] = {'description':prop["description"]} + + new_p["property"] = req_label + new_p["marginality"] = marginality + new_p["cardinality"], new_p["expected_types"] = generate_types_cardianlity(g, prop) if "description" in prop.keys(): - new_p['description'] = prop["description"] + new_p["description"] = prop["description"] else: - new_p['description']="" + new_p["description"] = "" if "type_url" in prop.keys(): - new_p['type_url'] = prop["type_url"] + new_p["type_url"] = prop["type_url"] else: - new_p['type_url']="" + new_p["type_url"] = "" if "bsc_description" in prop.keys(): - new_p['bsc_description'] = prop["bsc_description"] + new_p["bsc_description"] = prop["bsc_description"] else: - new_p['bsc_description']="" + new_p["bsc_description"] = "" if "controlled_vocab" in prop.keys(): - new_p['controlled_vocab'] = prop["controlled_vocab"] + new_p["controlled_vocab"] = prop["controlled_vocab"] else: - new_p['controlled_vocab']="" - + new_p["controlled_vocab"] = "" + if "example" in prop.keys(): - new_p['example'] = prop["example"] + new_p["example"] = prop["example"] else: - new_p['example']="" + new_p["example"] = "" # Here we'll suppose that all properties are in default schemas.org !!!!!!! - new_p['type']="" + new_p["type"] = "" for p in external_properties: - if len(p.split(':')) >0: - if req_label==p.split(':')[1]: - if len(p.split(':')[0].split('bioschemas'))>1: - new_p['type']="Bioschemas" + if len(p.split(":")) > 1: + if req_label == p.split(":")[1]: + if len(p.split(":")[0].split("bioschemas")) > 1: + new_p["type"] = "Bioschemas" else: - new_p['type']=p.split(':')[0] - t=new_p['type'] - print(Fore.GREEN + Style.DIM + f'Property type : {t}' + Style.RESET_ALL) + new_p["type"] = p.split(":")[0] + t = new_p["type"] + print(Fore.GREEN + Style.DIM + f"Property type : {t}" + Style.RESET_ALL) return new_p -def generate_types_cardianlity(g,prop): - - list_types=list() - cardianliy="ONE" - + +def generate_types_cardianlity(g, prop): + + list_types = list() + cardianliy = "ONE" + if "type" in prop.keys(): if "format" in prop.keys(): list_types.append(prop["format"]) - else : + else: list_types.append(prop["type"]) - + if "anyOf" in prop.keys(): for e in prop["anyOf"]: if "format" in e.keys(): @@ -269,10 +329,10 @@ def generate_types_cardianlity(g,prop): elif "items" in e.keys(): list_types.append(e["items"]) cardianliy = "MANY" - else : + else: for t in e.keys(): list_types.append(e[t]) - + if "oneOf" in prop.keys(): for e in prop["oneOf"]: if "format" in e.keys(): @@ -280,128 +340,148 @@ def generate_types_cardianlity(g,prop): elif "items" in e.keys(): list_types.append(e["items"]) cardianliy = "MANY" - else : + else: for t in e.keys(): list_types.append(e[t]) - i=1 - j=1 - while i==1: - i=0 - j=j+1 + i = 1 + j = 1 + while i == 1: + i = 0 + j = j + 1 for t in list_types: - if isinstance(t,dict): - i=1 - e=t + if isinstance(t, dict): + i = 1 + e = t list_types.remove(t) if "format" in e.keys(): list_types.append(e["format"]) else: for sous_type in e.keys(): list_types.append(e[sous_type]) - - if len(list_types)==0: - cardianliy="" - + + if len(list_types) == 0: + cardianliy = "" + ### Some cleaning up - expected_types =[] - + expected_types = [] + for t in list_types: - if len(t.split('/'))>1 : - expected_types.append(t.split('/')[-1].capitalize()) + if len(t.split("/")) > 1: + expected_types.append(t.split("/")[-1].capitalize()) ##If we ever needed it - #external_type= g['$validation']["definitions"][t.split('/')[-1]] - #print(Fore.YELLOW + f'Def of the External Type : {external_type}' + Style.RESET_ALL) + # external_type= g['$validation']["definitions"][t.split('/')[-1]] + # print(Fore.YELLOW + f'Def of the External Type : {external_type}' + Style.RESET_ALL) - else : - expected_types.append(t.capitalize()) + else: + expected_types.append(t.capitalize()) - #Remove duplicates + # Remove duplicates clean_expected_types = list(set(expected_types)) - #Replace 'String' with 'Text' + # Replace 'String' with 'Text' for i in clean_expected_types: if i == "String": clean_expected_types.remove(i) clean_expected_types.append("Text") - - #Replace 'Uri' with 'URI' + + # Replace 'Uri' with 'URI' for i in clean_expected_types: if i == "Uri": clean_expected_types.remove(i) clean_expected_types.append("URI") - print(Fore.MAGENTA + f'Expected Types : {clean_expected_types}' + Style.RESET_ALL) + print(Fore.MAGENTA + f"Expected Types : {clean_expected_types}" + Style.RESET_ALL) - print(Fore.RED + f'Cardinality = {cardianliy}' + Style.RESET_ALL) + print(Fore.RED + f"Cardinality = {cardianliy}" + Style.RESET_ALL) return cardianliy, clean_expected_types + # ## Main Script args = sys.argv -website_repo= args[-1] +website_repo = args[-1] args.remove(website_repo) -# For each new uploaded JSON-LD file +# For each new uploaded JSON-LD file for arg in args: - if 'jsonld' in arg.split('/'): - if 'json' in arg.split('.'): - arglist= arg.split('/') - profile_name=arg.split('/')[-1].split('.')[0].split('_')[0] - print(Fore.YELLOW + 'added/updated profile: ' + arg + Style.RESET_ALL) + if "jsonld" in arg.split("/"): + if "json" in arg.split("."): + arglist = arg.split("/") + profile_name = arg.split("/")[-1].split(".")[0].split("_")[0] + print(Fore.YELLOW + "added/updated profile: " + arg + Style.RESET_ALL) - in_file = "./"+arg + in_file = "./" + arg with open(in_file, "r", encoding="utf-8") as i: data = json.load(i) - #print(json.dumps(data['@graph'][0], indent=True)) - - external_properties=[] + # print(json.dumps(data['@graph'][0], indent=True)) + + external_properties = [] for g in data["@graph"]: - if g["@type"]=="rdf:Property": - external_properties.append(g["@id"]) + if g["@type"] == "rdf:Property": + external_properties.append(g["@id"]) for g in data["@graph"]: - - if g["@type"]=="rdfs:Class": - - print(Fore.BLUE + Style.BRIGHT + f'Profile : {g["@id"]}' + Style.RESET_ALL) - #print(Style.BRIGHT + f'{g.keys()}' + Style.RESET_ALL) - - #For each profile : - #Prepare the transfermed profile : spec_info & mapping fields - transformed_profile = generate_transformed_profile(g, arg, external_properties) - + + if g["@type"] == "rdfs:Class": + + print( + Fore.BLUE + + Style.BRIGHT + + f'Profile : {g["@id"]}' + + Style.RESET_ALL + ) + # print(Style.BRIGHT + f'{g.keys()}' + Style.RESET_ALL) + + # For each profile : + # Prepare the transfermed profile : spec_info & mapping fields + transformed_profile = generate_transformed_profile( + g, arg, external_properties + ) + # Inject the YAML in a HTML File # Note: The folder should be in the transformed_profile["spec_info"]["title"] folder ### PROBLEM: if the forlder "profile name" doesn't exist it will throw an exception, so we need to create it manually - - folderpath = "./"+website_repo+"/pages/_profiles/"+profile_name - #out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" - out_HTML_file= folderpath+"/"+ transformed_profile["spec_info"]["version"] +".html" - + + folderpath = ( + "./" + website_repo + "/pages/_profiles/" + profile_name + ) + # out_YAML_file = folderpath+"/"+"generated_"+profile_name+".yaml" + out_HTML_file = ( + folderpath + + "/" + + transformed_profile["spec_info"]["version"] + + ".html" + ) + if path.exists(folderpath): - print ("folder esists") + print("folder esists") else: - #os.makedirs(os.path.dirname(folderpath), exist_ok=True) - Path(folderpath).mkdir(parents=True, exist_ok=True) + # os.makedirs(os.path.dirname(folderpath), exist_ok=True) + Path(folderpath).mkdir(parents=True, exist_ok=True) print("Create folder : ", folderpath) - #with open(out_YAML_file, "w", encoding="utf-8") as o: + # with open(out_YAML_file, "w", encoding="utf-8") as o: # yaml.dump(transformed_profile, o) - #print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) - - message='''--- + # print(Style.BRIGHT + "Transformed profiles Generated and saved in " + out_YAML_file + Style.RESET_ALL) + + message = """--- # spec_info content generated using GOWeb # DO NOT MANUALLY EDIT THE CONTENT -''' +""" with open(out_HTML_file, "w", encoding="utf-8") as o: o.write(message) yaml.dump(transformed_profile, o) o.write("---") - print(Style.BRIGHT + "HTML Profile page created " + out_HTML_file + Style.RESET_ALL) \ No newline at end of file + print( + Style.BRIGHT + + "HTML Profile page created " + + out_HTML_file + + Style.RESET_ALL + ) diff --git a/Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json b/Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json index 17cc6544..c328a612 100644 --- a/Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json +++ b/Taxon/jsonld/Taxon_v0.3-DRAFT-2018_11_10.json @@ -9,7 +9,7 @@ { "@id": "bioschemas:Taxon", "@type": "rdfs:Class", - "rdfs:comment": "Bioschemas profile for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, authority, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI. Version: 0.3-DRAFT-2018_11_10", + "rdfs:comment": "Bioschemas profileèè for describing a biological taxon This profile aims to denote a taxon by common properties such as its scientific name, authority, taxonomic rank and vernacular names. It is also a means to link to existing taxonomic registers where each taxon has a URI. Version: 0.3-DRAFT-2018_11_10", "schema:schemaVersion": [ "https://bioschemas.org/profiles/Taxon/0.3-DRAFT-2018_11_10" ], From d56be6ffad85670afa73f7bad38a734f964df1b6 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 25 Oct 2022 16:06:29 +0200 Subject: [PATCH 148/162] change --- .../workflows/generate_profile_workflow.yml | 12 +++++- .../workflows/profile_generation_script.py | 38 +++++++++++++++++++ .../jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index c53bbe6b..17df5586 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -46,7 +46,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.Sahar_Workflows_Token }} run: | git clone https://user:$GITHUB_TOKEN@github.com/BioSchemas/bioschemas-dde - git branch + git checkout latest-updated-profiles ls - name: Checkout the Website repo @@ -83,6 +83,16 @@ jobs: actor: sahar-frikha token: '${{secrets.Sahar_Workflows_Token}}' + - name: Commit and Push the changes in the DDE repository + run: | + cd bioschemas-dde + git config user.name "sahar-frikha" + git config user.email "sahar.frikha1@gmail.com" + git status + git add . + git commit -m "Updating Profile" + git push origin latest-updated-profiles + - name: Commit and Push the changes in the website run: | cd bioschemas.github.io diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 37d03217..56c848fc 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -485,3 +485,41 @@ def generate_types_cardianlity(g, prop): + out_HTML_file + Style.RESET_ALL ) + + ############# DDE REPOSITORY ############# + dde_folderpath = "./bioschemas-dde/latest-updated-profiles" + if path.exists(dde_folderpath): + print("Folder latest-updated-profiles exists in DDE") + else: + # os.makedirs(os.path.dirname(folderpath), exist_ok=True) + Path(dde_folderpath).mkdir(parents=True, exist_ok=True) + print("Create folder in DDE: ", dde_folderpath) + + latest_updated_profiles = ( + dde_folderpath + "/" + profile_name + "csv" + ) + + header = [ + "namespace", + "name", + "subclassOf", + "type" "version", + "url", + ] + data = [ + "bioschams", + profile_name, + "", + transformed_profile["spec_info"]["version"], + arg, + ] + + with open(latest_updated_profiles, "w", encoding="utf-8") as f: + writer = csv.writer(f) + + # write the header + writer.writerow(header) + + # write the data + writer.writerow(data) + diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 32f7f401..35163fd0 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -10,7 +10,7 @@ { "@id": "bioschemas:ComputationalTool", "@type": "rdfs:Class", - "rdfs:comment": " specification for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", + "rdfs:comment": " specificarrrrtion for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ "https://bioschemas.org/profiles/ComputationalTool/0.5-DRAFT" ], From 3f660cbc1dd4cb71ee5943962c9bc628db417eef Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 25 Oct 2022 16:13:20 +0200 Subject: [PATCH 149/162] change --- .github/workflows/generate_profile_workflow.yml | 1 + ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 17df5586..f88863f5 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -46,6 +46,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.Sahar_Workflows_Token }} run: | git clone https://user:$GITHUB_TOKEN@github.com/BioSchemas/bioschemas-dde + cd bioschemas-dde git checkout latest-updated-profiles ls diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 35163fd0..7d765ee9 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -8,7 +8,7 @@ }, "@graph": [ { - "@id": "bioschemas:ComputationalTool", + "@id": "bioschemas:ComputasssstionalTool", "@type": "rdfs:Class", "rdfs:comment": " specificarrrrtion for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ From 49509042b9b1ad7cdc3bd6a90a89009cf4debb4b Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 25 Oct 2022 16:17:52 +0200 Subject: [PATCH 150/162] change --- .github/workflows/profile_generation_script.py | 7 +++---- ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 56c848fc..ebea0cfb 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -496,7 +496,7 @@ def generate_types_cardianlity(g, prop): print("Create folder in DDE: ", dde_folderpath) latest_updated_profiles = ( - dde_folderpath + "/" + profile_name + "csv" + dde_folderpath + "/" + profile_name + ".csv" ) header = [ @@ -513,13 +513,12 @@ def generate_types_cardianlity(g, prop): transformed_profile["spec_info"]["version"], arg, ] - + with open(latest_updated_profiles, "w", encoding="utf-8") as f: writer = csv.writer(f) - + # write the header writer.writerow(header) # write the data writer.writerow(data) - diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 7d765ee9..e7075967 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -8,7 +8,7 @@ }, "@graph": [ { - "@id": "bioschemas:ComputasssstionalTool", + "@id": "bioschemas:ComputasddddssstionalTool", "@type": "rdfs:Class", "rdfs:comment": " specificarrrrtion for describing a in the Life Sciences The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ From 3b9cdf5816b078e1056073517d6f7650d9fa28c8 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Tue, 25 Oct 2022 16:21:19 +0200 Subject: [PATCH 151/162] change --- .github/workflows/profile_generation_script.py | 3 ++- ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index ebea0cfb..795039a4 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -511,7 +511,8 @@ def generate_types_cardianlity(g, prop): profile_name, "", transformed_profile["spec_info"]["version"], - arg, + "https://github.com/BioSchemas/specifications/tree/master/" + + arg, ] with open(latest_updated_profiles, "w", encoding="utf-8") as f: diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index e7075967..93070c7d 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -130,7 +130,7 @@ { "type": "array", "items": { - "type": "string" + "type": "strsssing" } } ] From 599d27d78a01df25fb1118a230633d656541bfc8 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 26 Oct 2022 09:59:41 +0200 Subject: [PATCH 152/162] change --- .github/workflows/generate_profile_workflow.yml | 1 + .github/workflows/profile_generation_script.py | 16 +++++++++++++++- .../jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index f88863f5..cc776dc9 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -106,6 +106,7 @@ jobs: - name: Create a pull request run: | + timeout 300 cd bioschemas.github.io gh pr create --title "Auto-Rendering Profile" --body "This pull request has been created by a guithub action, after adding/updating a profile in the specifications repo." diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 795039a4..7ffde567 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -506,10 +506,24 @@ def generate_types_cardianlity(g, prop): "type" "version", "url", ] + + SubClass = "" + + with open( + "bioschemas.github.io/_data/metadata_mapping.csv" + ) as csv_file: + csv_reader = csv.reader(csv_file, delimiter=",") + line_count = 0 + for row in csv_reader: + line_count += 1 + if line_count > 1: + if row[0] == profile_name: + SubClass = row[4] + data = [ "bioschams", profile_name, - "", + SubClass, transformed_profile["spec_info"]["version"], "https://github.com/BioSchemas/specifications/tree/master/" + arg, diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 93070c7d..0c345515 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -136,7 +136,7 @@ ] }, "codeRepository": { - "description": "Link to the source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", + "description": "Link to tddhe source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", "oneOf": [ { "type": "string", From 8cccb2dc88e0f22a04e1cf4ad20c6baa8101d4de Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 26 Oct 2022 10:04:50 +0200 Subject: [PATCH 153/162] change --- .github/workflows/profile_generation_script.py | 2 +- ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/profile_generation_script.py b/.github/workflows/profile_generation_script.py index 7ffde567..5e0ec61a 100644 --- a/.github/workflows/profile_generation_script.py +++ b/.github/workflows/profile_generation_script.py @@ -518,7 +518,7 @@ def generate_types_cardianlity(g, prop): line_count += 1 if line_count > 1: if row[0] == profile_name: - SubClass = row[4] + SubClass = row[0] data = [ "bioschams", diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 0c345515..56d8ef24 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -136,7 +136,7 @@ ] }, "codeRepository": { - "description": "Link to tddhe source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", + "description": "Link to tdlldhe source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", "oneOf": [ { "type": "string", From 3120f6806e76cf0d01d164252beff9bbba084afe Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 26 Oct 2022 13:49:12 +0200 Subject: [PATCH 154/162] change --- .github/workflows/generate_profile_workflow.yml | 9 --------- .../jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index cc776dc9..de947fcd 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -75,15 +75,6 @@ jobs: run: | python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io - - name: Setup the Github TOKEN - uses: oleksiyrudenko/gha-git-credentials@v2-latest - with: - path: bioschemas.github.io - email: sahar.frikha1@gmail.com - name: sahar-frikha - actor: sahar-frikha - token: '${{secrets.Sahar_Workflows_Token}}' - - name: Commit and Push the changes in the DDE repository run: | cd bioschemas-dde diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index e2816a22..c8648a93 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -8,7 +8,7 @@ }, "@graph": [ { - "@id": "bioschemas:ComputationalTool", + "@id": "bioschemas:CompuddddtationalTool", "@type": "rdfs:Class", "rdfs:comment": " specification e ccssssc a inzz eeee Life sssssSciensssces The Life Science Tools specification provides a way to describe bioscience tools and software on the World Wide Web. It defines a set of metadata and vocabularies, built on top of existing technologies and standards, that can be used to represent such tools in Web pages and applications. The goal of the specification is to make it easier to discover, exchange and integrate information about life science tools across the Internet.

Summary of Changes

Changes since the 0.4-DRAFT of the tools profile:

  • Profile name changed from Tool to ComputationalTool
  • outputData and outputFormat replaced with serviceOutput
  • Expected types of additionalType changed from Text to URL
  • Expected types of applicationCategory extended to include URL
  • Expected types of applicationSubCategory extended to include URL
  • inputData and inputFormat replaced with edam:has_input
  • Expected types of featureList extended to include Text
  • Expected types of provider extended to include Person
Version: 0.5-DRAFT", "schema:schemaVersion": [ From 33bd4707a0bd4c7e9e05966c68bf874759fb09da Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 26 Oct 2022 13:53:30 +0200 Subject: [PATCH 155/162] change --- .github/workflows/generate_profile_workflow.yml | 13 +++++++++++-- .../jsonld/ComputationalTool_v0.7-DRAFT.json | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index de947fcd..5ef66ced 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -7,8 +7,8 @@ on: [push] # pull_request: # types: [opened, reopened] -env: - GH_TOKEN: ${{ secrets.Sahar_Workflows_Token }} +# env: +# GH_TOKEN: ${{ secrets.Sahar_Workflows_Token }} jobs: generate-profile: @@ -75,6 +75,15 @@ jobs: run: | python ./.github/workflows/profile_generation_script.py ${{steps.changed-files.outputs.all_changed_files}} bioschemas.github.io + - name: Setup the Github TOKEN + uses: oleksiyrudenko/gha-git-credentials@v2-latest + with: + path: bioschemas.github.io + email: sahar.frikha1@gmail.com + name: sahar-frikha + actor: sahar-frikha + token: '${{secrets.Sahar_Workflows_Token}}' + - name: Commit and Push the changes in the DDE repository run: | cd bioschemas-dde diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json index c8648a93..8071b321 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json @@ -791,7 +791,7 @@ "@id": "schema:Text" }, { - "@id": "schema:ComputerLanguage" + "@id": "schema:ComputerbbLanguage" } ] }, From cff1785c6c6314c9c7bc069380231468144f88b3 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Wed, 26 Oct 2022 13:55:05 +0200 Subject: [PATCH 156/162] change --- Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json b/Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json index 8d804163..e7b4f65a 100644 --- a/Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json +++ b/Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json @@ -11,7 +11,7 @@ "@type": "rdfs:Class", "rdfs:comment": "Specification for describing an event in the Life Sciences. Specification for describing a Life Science event. This includes conferences, workshops, meetings, courses, receptions, networking and prizegivings. Version: 0.1-DRAFT-2018_03_10", "schema:schemaVersion": [ - "https://bioschemas.org/profiles/Event/0.1-DRAFT-2018_03_10" + "https://bioschefffffmas.org/profiles/Event/0.1-DRAFT-2018_03_10" ], "rdfs:label": "Event", "rdfs:subClassOf": { From 833c9f2a3cf835c00b4043aa9a54fc80d23be0d1 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 27 Oct 2022 09:36:29 +0200 Subject: [PATCH 157/162] change --- .github/workflows/generate_profile_workflow.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 5ef66ced..bb820f38 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -10,6 +10,11 @@ on: [push] # env: # GH_TOKEN: ${{ secrets.Sahar_Workflows_Token }} +inputs: + branch-name: + description: $`date +%Y_%m_%d-%H_%M_%S` + required: true + jobs: generate-profile: runs-on: ubuntu-latest @@ -64,7 +69,7 @@ jobs: cd bioschemas.github.io git checkout profile-auto-generation git pull - git checkout -b `date +%Y_%m_%d-%H_%M_%S` + git checkout -b ${{ inputs.branch-name }} cd .. - name: Execute the config files update Python Script From 4390576d890f97c3881e19fb9ea0916601e8b4a2 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 27 Oct 2022 09:41:27 +0200 Subject: [PATCH 158/162] change --- .github/workflows/generate_profile_workflow.yml | 12 ++++++------ .../jsonld/FormalParameter_v1.0-RELEASE-type.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index bb820f38..e37adbf2 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -10,10 +10,10 @@ on: [push] # env: # GH_TOKEN: ${{ secrets.Sahar_Workflows_Token }} -inputs: - branch-name: - description: $`date +%Y_%m_%d-%H_%M_%S` - required: true +# inputs: +# branch-name: +# description: $`date +%Y_%m_%d-%H_%M_%S` +# required: true jobs: generate-profile: @@ -69,7 +69,7 @@ jobs: cd bioschemas.github.io git checkout profile-auto-generation git pull - git checkout -b ${{ inputs.branch-name }} + git checkout -b `date +%Y_%m_%d-%H_%M` cd .. - name: Execute the config files update Python Script @@ -107,7 +107,7 @@ jobs: git status git add . git commit -m "Updating Profile" - git push --set-upstream -u origin `date +%Y_%m_%d-%H_%M_%S` + git push --set-upstream -u origin `date +%Y_%m_%d-%H_%M` - name: Create a pull request run: | diff --git a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE-type.json b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE-type.json index af4d0262..231edce8 100644 --- a/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE-type.json +++ b/FormalParameter/jsonld/FormalParameter_v1.0-RELEASE-type.json @@ -15,7 +15,7 @@ ], "rdfs:label": "FormalParameter", "rdfs:subClassOf": { - "@id": "schema:Intangible" + "@id": "schema:Intahhngible" } }, { From 001b0f5c80ec987d3cbccf904cddc1e7d843df63 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 27 Oct 2022 09:43:04 +0200 Subject: [PATCH 159/162] change --- .github/workflows/generate_profile_workflow.yml | 2 +- Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index e37adbf2..a8acacdb 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -111,7 +111,7 @@ jobs: - name: Create a pull request run: | - timeout 300 + sleep 60 cd bioschemas.github.io gh pr create --title "Auto-Rendering Profile" --body "This pull request has been created by a guithub action, after adding/updating a profile in the specifications repo." diff --git a/Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json b/Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json index e7b4f65a..8a1306b0 100644 --- a/Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json +++ b/Event/jsonld/Event_v0.1-DRAFT-2018_03_10.json @@ -22,7 +22,7 @@ "type": "object", "properties": { "acceptanceNotificationDate": { - "description": "Date for the host to confirm acceptance to applicants. ", + "description": "Date for thhhe host to confirm acceptance to applicants. ", "oneOf": [ { "type": "string", From c5d64c4ebccc7c6680a6e0d120886123ba9f5dc1 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 27 Oct 2022 09:44:07 +0200 Subject: [PATCH 160/162] change --- Tool/examples/0.4-DRAFT/validata_tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tool/examples/0.4-DRAFT/validata_tools.json b/Tool/examples/0.4-DRAFT/validata_tools.json index 1b622b34..a3f17bc1 100644 --- a/Tool/examples/0.4-DRAFT/validata_tools.json +++ b/Tool/examples/0.4-DRAFT/validata_tools.json @@ -7,6 +7,6 @@ "description": "Validata is an intuitive, standalone web-based tool to help building valid RDF documents by validating against preset schemas written in the Shape Expressions (ShEx) language.", "url": "http://hw-swel.github.io/Validata/", "featureList": "http://edamontology.org/operation_0336", - "applicationCategory": "Computational science tool", + "applicationCategory": "Computatibhbhonal science tool", "applicationSubCategory": "http://edamontology.org/topic_0605" } From 154eab188d4ace56bffb695fa0c6b475a8c8c0c6 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 27 Oct 2022 09:45:48 +0200 Subject: [PATCH 161/162] change --- .../workflows/generate_profile_workflow.yml | 22 +++++++++---------- .../jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index a8acacdb..448fe150 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -88,16 +88,6 @@ jobs: name: sahar-frikha actor: sahar-frikha token: '${{secrets.Sahar_Workflows_Token}}' - - - name: Commit and Push the changes in the DDE repository - run: | - cd bioschemas-dde - git config user.name "sahar-frikha" - git config user.email "sahar.frikha1@gmail.com" - git status - git add . - git commit -m "Updating Profile" - git push origin latest-updated-profiles - name: Commit and Push the changes in the website run: | @@ -114,7 +104,17 @@ jobs: sleep 60 cd bioschemas.github.io gh pr create --title "Auto-Rendering Profile" --body "This pull request has been created by a guithub action, after adding/updating a profile in the specifications repo." - + + - name: Commit and Push the changes in the DDE repository + run: | + cd bioschemas-dde + git config user.name "sahar-frikha" + git config user.email "sahar.frikha1@gmail.com" + git status + git add . + git commit -m "Updating Profile" + git push origin latest-updated-profiles + - name: End Workflow run: | echo "Check the Website !" \ No newline at end of file diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 56d8ef24..16962e29 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -136,7 +136,7 @@ ] }, "codeRepository": { - "description": "Link to tdlldhe source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", + "description": "Linkcc to tdlldhe source code repository of the tool. Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).", "oneOf": [ { "type": "string", From d3f6b96bc299f7f91815e9d9ddd6eacc86aadf55 Mon Sep 17 00:00:00 2001 From: Sahar Frikha Date: Thu, 27 Oct 2022 10:32:58 +0200 Subject: [PATCH 162/162] change --- .github/workflows/generate_profile_workflow.yml | 6 +++--- ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate_profile_workflow.yml b/.github/workflows/generate_profile_workflow.yml index 448fe150..bcd47b72 100644 --- a/.github/workflows/generate_profile_workflow.yml +++ b/.github/workflows/generate_profile_workflow.yml @@ -7,8 +7,8 @@ on: [push] # pull_request: # types: [opened, reopened] -# env: -# GH_TOKEN: ${{ secrets.Sahar_Workflows_Token }} +env: + GH_TOKEN: ${{ secrets.Sahar_Workflows_Token }} # inputs: # branch-name: @@ -114,7 +114,7 @@ jobs: git add . git commit -m "Updating Profile" git push origin latest-updated-profiles - + - name: End Workflow run: | echo "Check the Website !" \ No newline at end of file diff --git a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json index 16962e29..6146f409 100644 --- a/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json +++ b/ComputationalTool/jsonld/ComputationalTool_v0.5-DRAFT.json @@ -130,7 +130,7 @@ { "type": "array", "items": { - "type": "strsssing" + "type": "strddsssing" } } ]