Skip to content

Commit 0b26a01

Browse files
authored
Merge pull request #1417 from Sage-Bionetworks/develop
Schematic v24.4.1
2 parents d58ce8e + c51af2d commit 0b26a01

File tree

67 files changed

+7238
-2489
lines changed

Some content is hidden

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

67 files changed

+7238
-2489
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
# add here when checked
102102
# poetry run mypy --install-types --non-interactive
103103
# add here when enforced
104-
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 schematic/visualization
104+
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 schematic/visualization schematic/utils/
105105
106106
#----------------------------------------------
107107
# linting
@@ -110,11 +110,7 @@ jobs:
110110
run: |
111111
# ran only on certain files for now
112112
# add here when checked
113-
poetry run pylint schematic/visualization/* schematic/configuration/*.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py
114-
# do all utils but schema_utils.py
115-
poetry run pylint schematic/utils/cli_utils.py schematic/utils/curie_utils.py schematic/utils/df_utils.py
116-
poetry run pylint schematic/utils/general.py schematic/utils/google_api_utils.py schematic/utils/io_utils.py
117-
poetry run pylint schematic/utils/validate_rules_utils.py schematic/utils/validate_utils.py schematic/utils/viz_utils.py
113+
poetry run pylint schematic/visualization/* schematic/configuration/*.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py schematic/utils/*.py schematic/schemas/*.py
118114
119115
#----------------------------------------------
120116
# run test suite

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repos:
2+
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
3+
# This is recommended by psf/black: https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml
4+
- repo: https://github.com/psf/black-pre-commit-mirror
5+
rev: 23.7.0
6+
hooks:
7+
- id: black
8+
# It is recommended to specify the latest version of Python
9+
# supported by your project here, or alternatively use
10+
# pre-commit's default_language_version, see
11+
# https://pre-commit.com/#top_level-default_language_version
12+
language_version: python3.10
13+
files: schematic/

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ SCHEMATIC is an acronym for _Schema Engine for Manifest Ingress and Curation_. T
2020

2121
# Installation
2222
## Installation Requirements
23-
* Python version 3.9.0≤x<3.11.0
23+
* Python version 3.9.0≤x<3.11.0
24+
* You need to be a registered and certified user on [`synapse.org`](https://www.synapse.org/)
2425

25-
Note: You need to be a registered and certified user on [`synapse.org`](https://www.synapse.org/), and also have the right permissions to download the Google credentials files from Synapse.
26+
Note: Our credential policy for Google credentials in order to create Google sheet files from Schematic, see tutorial ['HERE'](https://scribehow.com/shared/Get_Credentials_for_Google_Drive_and_Google_Sheets_APIs_to_use_with_schematicpy__yqfcJz_rQVeyTcg0KQCINA). If you plan to use `config.yml`, please ensure that the path of `schematic_service_account_creds.json` is indicated there (see `google_sheets > service_account_creds` section)
2627

2728

2829
## Installation guide for data curator app
@@ -169,13 +170,10 @@ On the CLI in your virtual environment, run the following command:
169170
```
170171
synapse login -u <synapse username> -p <synapse password> --rememberMe
171172
```
172-
Please make sure that you run the command before running `schematic init` below
173173

174174
7. Obtain Google credential Files
175-
To obtain ``schematic_service_account_creds.json``, please run:
176-
```
177-
schematic init --config ~/path/to/config.yml
178-
```
175+
Running `schematic init` is no longer supported due to security concerns. To obtain `schematic_service_account_creds.json`, please follow the instructions [here](https://scribehow.com/shared/Enable_Google_Drive_and_Google_Sheets_APIs_for_project__yqfcJz_rQVeyTcg0KQCINA).
176+
179177
> As v22.12.1 version of schematic, using `token` mode of authentication (in other words, using `token.pickle` and `credentials.json`) is no longer supported due to Google's decision to move away from using OAuth out-of-band (OOB) flow. Click [here](https://developers.google.com/identity/protocols/oauth2/resources/oob-migration) to learn more.
180178
181179
*Notes*: Use the ``schematic_service_account_creds.json`` file for the service
@@ -189,6 +187,13 @@ Most Google sheet functionality could be authenticated with service account. How
189187
requires token-based authentication. As browser support that requires the token-based authentication diminishes, we are hoping to deprecate
190188
token-based authentication and keep only service account authentication in the future.
191189

190+
8. Set up pre-commit hooks
191+
192+
This repository is configured to utilize pre-commit hooks as part of the development process. To enable these hooks, please run the following command and look for the following success message:
193+
```
194+
$ pre-commit install
195+
pre-commit installed at .git/hooks/pre-commit
196+
```
192197

193198
### Development process instruction
194199

0 commit comments

Comments
 (0)