The Data Curator App is an R Shiny app that serves as the frontend to the schematic Python package. It allows data contributors to easily annotate, validate and submit their metadata.
Follow the steps below to make sure the Data Curator App is fully setup to work with the schematic:
-
Clone this repo (front-end) with one single branch (i.e., main):
git clone --single-branch --branch main https://github.com/Sage-Bionetworks/data_curator.git
-
Create and modify the configuration file (How to obtain OAuth Credential):
cp example_oauth_config.yml oauth_config.yml chmod 400 oauth_config.yml
-
Create and activate a virtual environment within which you can install the package:
python -m venv .venv source .venv/bin/activate
-
Install required R pacakges dependencies:
R -f install-pkgs.R
-
Clone the schematic (backend) as a folder
schematic
inside thedata_curator
folder:git clone --single-branch --branch develop https://github.com/Sage-Bionetworks/schematic.git
-
Install the latest release of the
schematic
viapip
. IF NOT USING CONDA, install the devel version below:python -m pip install schematicpy
For development and test with the latest update from
schematic
, install theschematic
via poetry:cd schematic poetry build pip install dist/schematicpy-1.0.0-py3-none-any.whl
-
Modify the
schematic_config.yml
to set up schematic configuration. To do so, follow the instructions on the schematic's documentation
The app configuration file www/config.json
will be used to adapt the schema dropdown menu in the app. The config.json
file will be automatically created in the deployment workflow.
For local testing, run below snippet to generate www/config.json
and check the docs how to modify it:
-
Create a repo for your data model using this template
-
Clone your data model repo, i.e:
git clone https://github.com/Sage-Bionetworks/data-models
-
Create
config.json
and placed it in thewww
folderpython3 .github/generate_config_json.py \ -jd data-models/example.model.jsonld \ -schema 'Sage-Bionetworks/data-models' \ -service Sage-Bionetworks/schematic'
This utilizes a Synapse Authentication (OAuth) client (code motivated by ShinyOAuthExample and app.R. Each application is required to have its own OAuth client as these clients cannot be shared between one another. View instructions here to learn how to request a client. Once you obtain the client, make sure to add it to the configuration yaml file:
CLIENT_ID
andCLIENT_SECRET
APP_URL
: the redirection url to your app
To deploy the app to shinyapps.io, please follow the instructions in the shinyapps_deploy.md.
Main contributors and developers: