Skip to content

Commit

Permalink
Merge pull request #1417 from Sage-Bionetworks/develop
Browse files Browse the repository at this point in the history
Schematic v24.4.1
  • Loading branch information
lakikowolfe authored Apr 25, 2024
2 parents d58ce8e + c51af2d commit 0b26a01
Show file tree
Hide file tree
Showing 67 changed files with 7,238 additions and 2,489 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
# add here when checked
# poetry run mypy --install-types --non-interactive
# add here when enforced
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
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/
#----------------------------------------------
# linting
Expand All @@ -110,11 +110,7 @@ jobs:
run: |
# ran only on certain files for now
# add here when checked
poetry run pylint schematic/visualization/* schematic/configuration/*.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py
# do all utils but schema_utils.py
poetry run pylint schematic/utils/cli_utils.py schematic/utils/curie_utils.py schematic/utils/df_utils.py
poetry run pylint schematic/utils/general.py schematic/utils/google_api_utils.py schematic/utils/io_utils.py
poetry run pylint schematic/utils/validate_rules_utils.py schematic/utils/validate_utils.py schematic/utils/viz_utils.py
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
#----------------------------------------------
# run test suite
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
# This is recommended by psf/black: https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.10
files: schematic/
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ SCHEMATIC is an acronym for _Schema Engine for Manifest Ingress and Curation_. T

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

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.
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)


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

7. Obtain Google credential Files
To obtain ``schematic_service_account_creds.json``, please run:
```
schematic init --config ~/path/to/config.yml
```
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).

> 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.
*Notes*: Use the ``schematic_service_account_creds.json`` file for the service
Expand All @@ -189,6 +187,13 @@ Most Google sheet functionality could be authenticated with service account. How
requires token-based authentication. As browser support that requires the token-based authentication diminishes, we are hoping to deprecate
token-based authentication and keep only service account authentication in the future.

8. Set up pre-commit hooks

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:
```
$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
```

### Development process instruction

Expand Down
Loading

0 comments on commit 0b26a01

Please sign in to comment.