/connect-1

LinuxForHealth Data Flows

Primary LanguagePythonApache License 2.0Apache-2.0

Connect

LinuxForHealth Connectors for Inbound Data Processing

Where to Contribute

Type Link
🚨 Bug Reports GitHub Issues Tracker
🎁 Feature Requests & Ideas GitHub Issues Tracker
❔ Questions LFH Slack Channel
🚙 Roadmap Project Board

Getting Started

Read the Documentation

The LinuxForHealth documentation includes architectural overviews, development guidelines, and deployment options.

Required Software

The LinuxForHealth Connect development environment requires the following:

For Windows 10 users, we suggest using Windows Subsystem for Linux

Set Up A Local Environment

Clone the project and navigate to the root directory

git clone https://github.com/LinuxForHealth/connect
cd connect

Confirm that Python build tooling, pip and pipenv are installed

pip --version
pipenv --version

Install core and dev dependencies

pip install --upgrade pip
pipenv sync --dev

Install git pre-commit hooks

pipenv run pre-commit install

Process registered with pre-commit hooks include:

Run tests

pipenv run pytest

Black code formatting integration

LinuxForHealth connect utilizes the black library to provide standard code formatting. The connect project registers black with a git pre-commit hook to ensure that code is formatted when it is committed to a developer's local repository. The pyproject.toml and .pre-commit-config.yaml are used to configure the integration.

Commit Output - No Python Source Committed
black................................................(no files to check)Skipped
[black-formatter 95bb1c6] settings black version to latest release
 1 file changed, 1 insertion(+), 1 deletion(-)
Commit Output - Python Source is Correctly Formatted
black....................................................................Passed
[format-test c3e1b4a] test commit
 1 file changed, 1 insertion(+)
Commit Output - Black Updates Python Source
black....................................................................Failed
- hook id: black
- files were modified by this hook

reformatted connect/routes/api.py
All done! ✨ 🍰 ✨
1 file reformatted.

Generate trusted local certs for connect and supporting services

./local-certs/install-certificates.sh

For more information on connect and HTTPS/TLS support, please refer to the local cert readme.

Start connect and supporting services

docker-compose up -d
docker-compose ps
pipenv run connect

Browse to https://localhost:5000/docs to view the Open API documentation

Docker Image

The connect docker image is an "incubating" feature and is subject to change. The image is associated with the "deployment" profile to provide separation from core services.

Build the image

The connect image build integrates the application's x509 certificate (PEM encoded) into the image.

The APPLICATION_CERT_PATH build argument is used to specify the location of the certificate on the host machine. If the APPLICATION_CERT_PATH build argument is not provided, a default value of ./local-certs/lfh.pem is used.

Build the image with Docker CLI

docker build --build-arg APPLICATION_BUILD_CERT_PATH=./local-certs/ -t linuxforhealth/connect:0.42.0 .

Build the image with Docker-Compose

The docker-compose command below parses the build context, arguments, and image tag from the docker-compose.yaml file.

docker-compose build connect

Run connect and Supporting Services

docker-compose --profile deployment up -d

Links and Resources

Type Link
📰 Documentation LinuxForHealth Docs Site
📰 Documentation IPFS