Skip to content

phenoflow/importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phenoflow

Phenoflow - Import parsed definitions and make them available for generation as CWL workflows

StackShare

Prerequisites

  1. Docker (machine).
  2. Python 3.

.env

  1. Create a .env file in project root

  2. Add NODE_EXTRA_CA_CERTS=certs/phenoflow.pem

.env (development)

  1. Add GitHub Enterprise credentials:

GHE_ACCESS_TOKEN=

  1. (Optional) Add a Zenodo sandbox webhook for DOIs

GHE_ZENODO_WEBHOOK=

.env (development and staging)

  1. Generate an RSA private key (for JWT signing), generated by openssl genrsa -out key.pem 2048, and reference its location (e.g. certs/key.pem, if the key is generated and stored within certs):

RSA_PRIVATE_KEY_FULL_PATH=

.env (staging and production)

  1. Add the following, which should be chosen at random:
DEFAULT_PASSWORD=
MYSQL_ROOT_PASSWORD=
MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DATABASE=
  1. Add GitHub credentials:

GITHUB_ACCESS_TOKEN=

  1. (Optional) Add a Zenodo webhook for DOIs

GITHUB_ZENODO_WEBHOOK=

.env (production)

  1. Generate an RSA private key (for JWT signing), generated by openssl genrsa -out key.pem 2048, and reference its name only, e.g. key.pem:

RSA_PRIVATE_KEY=

  1. Add a path on the target deployment host to the RSA private key (without the key name), e.g. /home/ubuntu/.certs/:

HOST_RSA_PRIVATE_KEY_PATH=

Note: As this is used as a pseudo secret by compose, permissions must be edited.

DB encryption

Misc

Development

Install and Run

  1. Create a node virtual environment (within a python virtual environment), and activate it:
python -m venv .venv
. .venv/bin/activate
pip install nodeenv
nodeenv .nenv
. .nenv/bin/activate
  1. Install dependencies:
cat requirements.txt | xargs npm install -g
  1. Run server:
npm start

Deployment

  1. Deployment is via Docker. If using remote machine, ensure it is activated:
docker context use [machine-name]

Staging

  1. From the root directory, build container:
docker compose -f docker-compose.dev.yml build
  1. Run container:
docker compose -f docker-compose.dev.yml up -d

Production

  1. From the root directory, build container:
docker compose build
  1. Run container:
docker compose up -d

Tests

Development

  • Run all tests:

npm test

  • Run specific test(s), e.g.:

NODE_ENV=test npx mocha -g "basic" --exit

Staging

  1. Specify test ID (e.g. `TB1') in docker-compose.dev.test.yml.

  2. From the root directory run:

docker-compose -f docker-compose.dev.test.yml build;
docker-compose -f docker-compose.dev.test.yml up;

Production

  1. Specify test ID in docker-compose.test.yml.

  2. From the root directory run:

docker-compose -f docker-compose.test.yml build;
docker-compose -f docker-compose.test.yml up;

Notes:

  1. Tests can be used to set up a default user if you wish to run Phenoflow as a private instance.

  2. Tests can also be used to import phenotypes from different data sources.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

kclhi

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

About

Import parsed phenotype definitions and store them as CWL workflows

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages