Skip to content

Commit 655d86e

Browse files
authored
Merge pull request #1271 from Sage-Bionetworks/develop
Schematic 23.7.1
2 parents d4a1e8b + 5a6e595 commit 655d86e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2065
-1493
lines changed

.github/workflows/docker_build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
push:
99
tags:
1010
- 'v[0-9]+.[0-9]+.[0-9]+'
11+
- 'v[0-9]+.[0-9]+.[0-9]+-[A-Za-z0-9]+'
1112

1213
env:
1314
REGISTRY: ghcr.io

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
run: |
9797
# ran only on certain files for now
9898
# add here when checked
99-
poetry run black schematic/configuration.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py --check
99+
poetry run black schematic/configuration/*.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py --check
100100
101101
#----------------------------------------------
102102
# type checking/enforcement
@@ -105,9 +105,9 @@ jobs:
105105
run: |
106106
# ran only on certain files for now
107107
# add here when checked
108-
poetry run mypy --install-types --non-interactive schematic/configuration.py
108+
# poetry run mypy --install-types --non-interactive
109109
# add here when enforced
110-
poetry run mypy --disallow-untyped-defs --install-types --non-interactive schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py
110+
poetry run mypy --disallow-untyped-defs --install-types --non-interactive schematic/configuration/*.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py
111111
112112
#----------------------------------------------
113113
# linting
@@ -116,7 +116,7 @@ jobs:
116116
run: |
117117
# ran only on certain files for now
118118
# add here when checked
119-
poetry run pylint schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py
119+
poetry run pylint schematic/configuration/*.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py
120120
121121
#----------------------------------------------
122122
# run test suite

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,11 @@ tests/data/mock_manifests/valid_test_manifest_censored.csv
172172
tests/data/mock_manifests/Rule_Combo_Manifest_censored.csv
173173

174174
# Pickle file
175-
tests/data/schema.gpickle
175+
tests/data/schema.gpickle
176+
177+
# Created during testting
178+
Example*
179+
manifests/*
180+
181+
# schematic config file
182+
config.yml

CONTRIBUTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in
88

99
### Reporting bugs or feature requests
1010

11-
You can use the [`Issues`](https://github.com/Sage-Bionetworks/schematic/issues) tab to **create bug and feature requests**. Providing enough details to the developers to verify and troubleshoot your issue is paramount:
11+
You can use [Sage Bionetwork's FAIR Data service desk](https://sagebionetworks.jira.com/servicedesk/customer/portal/5/group/8) to **create bug and feature requests**. Providing enough details to the developers to verify and troubleshoot your issue is paramount:
1212
- **Provide a clear and descriptive title as well as a concise summary** of the issue to identify the problem.
1313
- **Describe the exact steps which reproduce the problem** in as many details as possible.
1414
- **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.

README.md

Lines changed: 64 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -88,45 +88,69 @@ editor of your choice and edit the `username` and `authtoken` attribute under th
8888
8989
<strong>Configure config.yml File</strong>
9090

91-
*Note*: Below is only a brief explanation of some attributes in `config.yml`. <strong>Please use the link [here](https://github.com/Sage-Bionetworks/schematic/blob/develop/config.yml) to get the latest version of `config.yml` in `develop` branch</strong>.
92-
93-
Description of `config.yml` attributes
94-
95-
definitions:
96-
synapse_config: "~/path/to/.synapseConfig"
97-
service_acct_creds: "~/path/to/service_account_creds.json"
98-
99-
synapse:
100-
master_fileview: "syn23643253" # fileview of project with datasets on Synapse
101-
manifest_folder: "~/path/to/manifest_folder/" # manifests will be downloaded to this folder
102-
manifest_basename: "filename" # base name of the manifest file in the project dataset, without extension
103-
service_acct_creds: "syn25171627" # synapse ID of service_account_creds.json file
104-
105-
manifest:
106-
title: "example" # title of metadata manifest file
107-
# to make all manifests enter only 'all manifests'
108-
data_type:
109-
- "Biospecimen"
110-
- "Patient"
111-
112-
model:
113-
input:
114-
location: "data/schema_org_schemas/example.jsonld" # path to JSON-LD data model
115-
file_type: "local" # only type "local" is supported currently
116-
style: # configuration of google sheet
117-
google_manifest:
118-
req_bg_color:
119-
red: 0.9215
120-
green: 0.9725
121-
blue: 0.9803
122-
opt_bg_color:
123-
red: 1.0
124-
green: 1.0
125-
blue: 0.9019
126-
master_template_id: '1LYS5qE4nV9jzcYw5sXwCza25slDfRA1CIg3cs-hCdpU'
127-
strict_validation: true
128-
129-
*Note*: Paths can be specified relative to the `config.yml` file or as absolute paths.
91+
There are some defaults in schematic that can be configured. These fields are in ``config_example.yml``:
92+
93+
```text
94+
95+
# This is an example config for Schematic.
96+
# All listed values are those that are the default if a config is not used.
97+
# Save this as config.yml, this will be gitignored.
98+
# Remove any fields in the config you don't want to change
99+
# Change the values of any fields you do want to change
100+
101+
102+
# This describes where assets such as manifests are stored
103+
asset_store:
104+
# This is when assets are stored in a synapse project
105+
synapse:
106+
# Synapse ID of the file view listing all project data assets.
107+
master_fileview_id: "syn23643253"
108+
# Path to the synapse config file, either absolute or relative to this file
109+
config: ".synapseConfig"
110+
# Base name that manifest files will be saved as
111+
manifest_basename: "synapse_storage_manifest"
112+
113+
# This describes information about manifests as it relates to generation and validation
114+
manifest:
115+
# Location where manifests will saved to
116+
manifest_folder: "manifests"
117+
# Title or title prefix given to generated manifest(s)
118+
title: "example"
119+
# Data types of manifests to be generated or data type (singular) to validate manifest against
120+
data_type:
121+
- "Biospecimen"
122+
- "Patient"
123+
124+
# Describes the location of your schema
125+
model:
126+
# Location of your schema jsonld, it must be a path relative to this file or absolute
127+
location: "tests/data/example.model.jsonld"
128+
129+
# This section is for using google sheets with Schematic
130+
google_sheets:
131+
# The Synapse id of the Google service account credentials.
132+
service_acct_creds_synapse_id: "syn25171627"
133+
# Path to the synapse config file, either absolute or relative to this file
134+
service_acct_creds: "schematic_service_account_creds.json"
135+
# When doing google sheet validation (regex match) with the validation rules.
136+
# true is alerting the user and not allowing entry of bad values.
137+
# false is warning but allowing the entry on to the sheet.
138+
strict_validation: true
139+
```
140+
141+
If you want to change any of these copy ``config_example.yml`` to ``config.yml``, change any fields you want to, and remove any fields you don't.
142+
143+
For example if you wanted to change the folder where manifests are downloaded your config should look like:
144+
145+
```text
146+
147+
manifest:
148+
manifest_folder: "my_manifest_folder_path"
149+
```
150+
151+
_Note_: `config.yml` is ignored by git.
152+
153+
_Note_: Paths can be specified relative to the `config.yml` file or as absolute paths.
130154

131155
6. Login to Synapse by using the command line
132156
On the CLI in your virtual environment, run the following command:
@@ -264,7 +288,7 @@ docker run -v %cd%:/schematic \
264288
If you install external libraries by using `poetry add <name of library>`, please make sure that you include `pyproject.toml` and `poetry.lock` file in your commit.
265289

266290
## Reporting bugs or feature requests
267-
You can use the [`Issues`](https://github.com/Sage-Bionetworks/schematic/issues) tab to **create bug and feature requests**. Providing enough details to the developers to verify and troubleshoot your issue is paramount:
291+
You can **create bug and feature requests** through [Sage Bionetwork's FAIR Data service desk](https://sagebionetworks.jira.com/servicedesk/customer/portal/5/group/8). Providing enough details to the developers to verify and troubleshoot your issue is paramount:
268292
- **Provide a clear and descriptive title as well as a concise summary** of the issue to identify the problem.
269293
- **Describe the exact steps which reproduce the problem** in as many details as possible.
270294
- **Describe the behavior you observed after following the steps** and point out what exactly is the problem with that behavior.

certificate.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ server {
44
include /etc/nginx/conf.d/self-signed.conf;
55
include /etc/nginx/conf.d/ssl-params.conf;
66
server_name 127.0.0.1;
7-
7+
proxy_read_timeout 300;
8+
proxy_connect_timeout 300;
9+
proxy_send_timeout 300;
810
location / {
911
try_files $uri @app;
1012
}

config.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

config_example.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This is an example config for Schematic.
2+
# All listed values are those that are the default if a config is not used.
3+
# Save this as config.yml, this will be gitignored.
4+
# Remove any fields in the config you don't want to change
5+
# If you remove all fields from a section, the entire section should be removed including the header.
6+
# Change the values of any fields you do want to change
7+
8+
9+
# This describes where assets such as manifests are stored
10+
asset_store:
11+
# This is when assets are stored in a synapse project
12+
synapse:
13+
# Synapse ID of the file view listing all project data assets.
14+
master_fileview_id: "syn23643253"
15+
# Path to the synapse config file, either absolute or relative to this file
16+
config: ".synapseConfig"
17+
# Base name that manifest files will be saved as
18+
manifest_basename: "synapse_storage_manifest"
19+
20+
# This describes information about manifests as it relates to generation and validation
21+
manifest:
22+
# Location where manifests will saved to
23+
manifest_folder: "manifests"
24+
# Title or title prefix given to generated manifest(s)
25+
title: "example"
26+
# Data types of manifests to be generated or data type (singular) to validate manifest against
27+
data_type:
28+
- "Biospecimen"
29+
- "Patient"
30+
31+
# Describes the location of your schema
32+
model:
33+
# Location of your schema jsonld, it must be a path relative to this file or absolute
34+
location: "tests/data/example.model.jsonld"
35+
36+
# This section is for using google sheets with Schematic
37+
google_sheets:
38+
# The Synapse id of the Google service account credentials.
39+
service_acct_creds_synapse_id: "syn25171627"
40+
# Path to the synapse config file, either absolute or relative to this file
41+
service_acct_creds: "schematic_service_account_creds.json"
42+
# When doing google sheet validation (regex match) with the validation rules.
43+
# true is alerting the user and not allowing entry of bad values.
44+
# false is warning but allowing the entry on to the sheet.
45+
strict_validation: true

0 commit comments

Comments
 (0)