This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from flywheel-apps/python-run
Use python to parse configs
- Loading branch information
Showing
4 changed files
with
21 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# curate-bids | ||
|
||
FROM flywheel/bids-client:0.6.2 | ||
FROM flywheel/bids-client:0.6.3 | ||
MAINTAINER Flywheel <[email protected]> | ||
|
||
# Install JQ to parse config file | ||
|
@@ -9,7 +9,7 @@ RUN apk add --no-cache jq | |
# Make directory for flywheel spec (v0) | ||
ENV FLYWHEEL /flywheel/v0 | ||
RUN mkdir -p ${FLYWHEEL} | ||
COPY run ${FLYWHEEL}/run | ||
COPY run.py ${FLYWHEEL}/run.py | ||
COPY manifest.json ${FLYWHEEL}/manifest.json | ||
|
||
# Set the entrypoint | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,9 @@ | |
"maintainer": "Flywheel <[email protected]>", | ||
"source": "https://github.com/flywheel-apps/curate-bids", | ||
"url": "http://bids.neuroimaging.io/", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"custom": { | ||
"docker-image": "flywheel/curate-bids:v0.6.2" | ||
"docker-image": "flywheel/curate-bids:v0.6.3" | ||
}, | ||
"license": "BSD-3-Clause", | ||
"inputs": { | ||
|
@@ -22,5 +22,6 @@ | |
"type": "boolean", | ||
"default": false | ||
} | ||
} | ||
}, | ||
"command": "python run.py" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import json | ||
from flywheel_bids.curate_bids import main_with_args | ||
|
||
if __name__ == '__main__': | ||
|
||
# Grab Config | ||
CONFIG_FILE_PATH = '/flywheel/v0/config.json' | ||
with open(CONFIG_FILE_PATH) as config_file: | ||
config = json.load(CONFIG_FILE) | ||
|
||
api_key = config['inputs']['api_key']['key'] | ||
session_id = config['destination']['id'] | ||
reset = config['config']['reset'] | ||
|
||
main_with_args(api_key, session_id, reset) |