Skip to content

Commit

Permalink
Merge pull request #138 from nf-osi/develop
Browse files Browse the repository at this point in the history
Update prod
  • Loading branch information
allaway authored Aug 31, 2022
2 parents 142cb80 + b34b04a commit b2449e7
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 14 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/update_model_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Update source model for dev

# Update model download_url in `schematic_config.yml`
# to point to new source URL in `develop` branch.
on:
# Note: can also run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
source:
description: 'URL of new source'
required: true

env:
SOURCE_URL: ${{ github.event.inputs.source }}

jobs:
update-model:
runs-on: ubuntu-latest

steps:
# Check out development branch under $GITHUB_WORKSPACE
- uses: actions/checkout@v3
with:
ref: develop
persist-credentials: false

# Check steps matter more for rare occasions of manual input
# vs. programmatic dispatches
- name: Check that source link works
run: wget $SOURCE_URL -O model.json

# Check format as can be easy to not grab the actual raw.github URL
- name: Check is JSON
run: cat model.json | python -m simplejson.tool > validated.json

- name: Update config
uses: mikefarah/yq@master
with:
cmd: yq -i '.model.input.download_url = strenv(SOURCE_URL)' schematic_config.yml

- name: Commit files
run: |
git config user.email "[email protected]"
git config user.name "nfosi-service"
git commit -m "Update model source in config" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: ${{ github.ref }}
github_token: ${{ secrets.SERVICE_TOKEN }}

4 changes: 2 additions & 2 deletions functions/validationResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ validationResult <- function(anno.res, template, manifest) {

# create table to display errors for users
error_table <- lapply(errors, function(i) {
data.frame(Row = as.numeric(i[[1]]), Column = i[[2]], Value = i[[4]][[1]], Error = i[[3]])
data.frame(Row = as.numeric(i[[1]]), Column = as.character(i[[2]]), Value = as.character(i[[4]][[1]]), Error = i[[3]])
}) %>% bind_rows()

# create list for hightlight function; key: error_column, value: error_value
Expand Down Expand Up @@ -106,4 +106,4 @@ validationResult <- function(anno.res, template, manifest) {
errorHighlight = highlight_values,
errorType = error_type
))
}
}
12 changes: 4 additions & 8 deletions schematic_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@ definitions:
creds_path: 'credentials.json'
token_pickle: 'token.pickle'
service_acct_creds: 'schematic_service_account_creds.json'

synapse:
master_fileview: 'syn16858331'
manifest_folder: 'manifests'
manifest_basename: 'synapse_storage_manifest'
manifest_basename: 'synapse_storage_manifest'
token_creds: 'syn21088684'
service_acct_creds: 'syn25171627'

manifest:
title: 'NF'
data_type:
data_type:
- 'NF'

model:
input:
download_url: 'https://raw.githubusercontent.com/nf-osi/nf-metadata-dictionary/v5.0.0/NF.jsonld' # url to download JSON-LD data model
download_url: 'https://raw.githubusercontent.com/nf-osi/nf-metadata-dictionary/v6.1.0/NF.jsonld' # url to download JSON-LD data model
location: 'data-models/NF.jsonld' # path to JSON-LD data model
file_type: 'local'

file_type: 'local'
style:
google_manifest:
req_bg_color:
Expand Down
15 changes: 11 additions & 4 deletions www/config.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
{
"manifest_schemas": [
{"display_name": "Genomics Assay", "schema_name": "GenomicsAssayTemplate", "type": "assay"},
{"display_name": "Whole Genome Sequencing Assay", "schema_name": "WGSTemplate", "type": "assay"},
{"display_name": "Whole Exome Sequencing Assay", "schema_name": "WESTemplate", "type": "assay"},
{"display_name": "RNA Sequencing Assay", "schema_name": "RNASeqTemplate", "type": "assay"},
{"display_name": "Single-cell RNA Sequencing Assay", "schema_name": "ScRNASeqTemplate", "type": "assay"},
{"display_name": "Epigenetics Assay", "schema_name": "EpigeneticsAssayTemplate", "type": "assay"},
{"display_name": "PDX Genomics Assay", "schema_name": "PdxGenomicsAssayTemplate", "type": "assay"},
{"display_name": "Other Genomics Assay", "schema_name": "GenomicsAssayTemplate", "type": "assay"},
{"display_name": "Other Genomics Assay (Extended)", "schema_name": "GenomicsAssayTemplateExtended", "type": "assay"},
{"display_name": "Imaging Assay", "schema_name": "ImagingAssayTemplate", "type": "assay"},
{"display_name": "MRI Assay", "schema_name": "MRIAssayTemplate", "type": "assay"},
{"display_name": "Epigenetics Assay", "schema_name": "EpigeneticsAssayTemplate", "type": "assay"},
{"display_name": "Pharmacokinetics Assay", "schema_name": "PharmacokineticsAssayTemplate", "type": "assay"},
{"display_name": "Proteomics Assay", "schema_name": "ProteomicsAssayTemplate", "type": "assay"},
{"display_name": "Plate-Based Reporter Assay", "schema_name": "PlateBasedReporterAssayTemplate", "type": "assay"},
{"display_name": "Update Milestone Report Values", "schema_name": "UpdateMilestoneReportTemplate", "type": "assay"},
{"display_name": "Patient Metadata (not for annotation)", "schema_name": "PatientTimepointsTemplate", "type": "assay"},
{"display_name": "Clinical Assay Template", "schema_name": "ClinicalAssayTemplate", "type": "assay"}
{"display_name": "Clinical Assay Template", "schema_name": "ClinicalAssayTemplate", "type": "assay"},
{"display_name": "Processed/Aligned Sequencing Reads", "schema_name": "ProcessedAlignedReadsTemplate", "type": "assay"},
{"display_name": "Processed Variant Calls", "schema_name": "ProcessedVariantCallsTemplate", "type": "assay"},
{"display_name": "Processed Expression Data", "schema_name": "ProcessedExpressionTemplate", "type": "assay"}
],
"main_fileview" : "syn16858331",
"community" : "NF",
Expand Down

0 comments on commit b2449e7

Please sign in to comment.