Metadata-Version: 2.1
Name: schematic-test
Version: 0.1.11
Summary: Package for data model and data ingress management
Home-page: https://github.com/Sage-Bionetworks/schematic
License: MIT
Keywords: schema,metadata,validation,schema.org,data model
Author: Milen Nikolov
Author-email: milen.nikolov@sagebase.org
Requires-Python: >=3.7.1,<4.0.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: PyYAML (>=5.4.1,<6.0.0)
Requires-Dist: click (>=7.1.2,<8.0.0)
Requires-Dist: click-log (>=0.3.2,<0.4.0)
Requires-Dist: fastjsonschema (>=2.14.5,<3.0.0)
Requires-Dist: google-api-python-client (>=1.12.8,<2.0.0)
Requires-Dist: google-auth-httplib2 (>=0.0.4,<0.0.5)
Requires-Dist: google-auth-oauthlib (>=0.4.2,<0.5.0)
Requires-Dist: graphviz (>=0.16,<0.17)
Requires-Dist: importlib-metadata (>=1.6.0,<2.0.0); python_version < "3.8"
Requires-Dist: inflection (>=0.5.1,<0.6.0)
Requires-Dist: jsonschema (>=3.2.0,<4.0.0)
Requires-Dist: networkx (>=2.5,<3.0)
Requires-Dist: orderedset (>=2.0.3,<3.0.0)
Requires-Dist: pandas (>=1.2.1,<2.0.0)
Requires-Dist: pygsheets (>=2.0.4,<3.0.0)
Requires-Dist: rdflib (>=5.0.0,<6.0.0)
Requires-Dist: synapseclient (>=2.2.2,<3.0.0)
Requires-Dist: tabletext (>=0.1,<0.2)
Project-URL: Documentation, https://github.com/Sage-Bionetworks/schematic
Project-URL: Repository, https://github.com/Sage-Bionetworks/schematic
Description-Content-Type: text/markdown

# Schematic

## Usage

### Virtual Environment Setup

Python 3 has built-in support for virtual environments (using `venv` module). Perform the following steps:

After cloning the git repository, navigate into the `schematic` directory and run the command as below:

```bash
python[3] -m venv .venv
```

_Note: It is assumed that you are running all the below commands from the main/root (`schematic`) directory._

This creates a Python3 virtual environment (within the `root` folder/package), with its own site directories (isolated from the system site directories).

To activate the virtual environment, run:

```bash
source .venv/bin/activate
```

_Note: You should now see the name of the virtual environment to the left of the prompt._

### Install App/Package

To install the package/bundle/application:

```bash
pip[3] install -e .
```

To verify that the package has been installed (as a `pip` package), check here:

```bash
pip[3] list
```

Now, your environment is ready to test the modules within the application.

Once you have finished testing the application within the virtual environment and want to deactivate it, simply run:

```bash
deactivate
```

To run any of the example file(s), go to your root directory and execute/run python script in the following way:

Let's say you want to run the `metadata_usage` example - then do this:

```bash
python[3] examples/metadata_usage.py
```

### Configure Synapse Credentials

Download a copy of the `credentials.json` file (or the file needed for authentication using service account, called `quickstart-1560359685924-198a7114b6b5.json`) stored on Synapse, using the synapse client command line utility. The credentials file is necessary for authentication to use Google services/APIs. To do so:


_Note: Make sure you have `download` access/permissions to the above files before running the below commands._

For `credentials.json` file:
```bash
synapse get syn21088684
```

For `quickstart-1560359685924-198a7114b6b5.json` file:
```bash
synapse get syn22316486
```

Find the synapse configuration file (_`.synapseConfig`_) downloaded to the current source directory. Access it like this:

```bash
vi[m] .synapseConfig
```

Open the config file, and under the authentication section, replace _< username >_ and _< apikey >_ with your Synapse username and API key.

_Note: You can get your Synapse API key by: **logging into Synapse > Settings > Synapse API Key > Show API Key**_.

----

### Contribution

Clone a copy of the repository by executing the command as below:
      
```bash
git clone --single-branch --branch develop https://github.com/Sage-Bionetworks/schematic.git
```

1. Fork the repository.
2. Clone the forked repository.
3. Create a branch with a descriptive name that includes the name of the feature under development.
4. Push your changes to that branch.
5. PR into a branch that is developing the same feature on the `schematic` main repository.

For further reference, please consult [CONTRIBUTION.md](https://github.com/Sage-Bionetworks/schematic/blob/develop/CONTRIBUTION.md).
