Skip to main content

Package for data model and data ingress management

Project description

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:

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:

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:

pip[3] install -e .

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

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:

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:

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:

synapse get syn21088684

For quickstart-1560359685924-198a7114b6b5.json file:

synapse get syn22316486

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

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

schematic-test-0.1.11.tar.gz (238.3 kB view hashes)

Uploaded Source

Built Distribution

schematic_test-0.1.11-py3-none-any.whl (256.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page