Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Contributing

Development Setup

# 1. Clone and enter the repo
git clone https://github.com/jupyterhealth/jupyterhealth-exchange.git
cd jupyterhealth-exchange

# 2. Install dependencies
pipenv install --dev
pipenv shell

# 3. Start the test database
source ci/test_env.sh
bash ci/start-db.sh

# 4. Install pre-commit hooks (runs linters automatically on each commit)
pre-commit install

Code Quality Standards

Every pull request must include tests that cover the code you added or changed. PRs without adequate test coverage will not be merged.

Test Categories

TypePurpose
UnitTest a single function/method in isolation
IntegrationTest multiple components working together
RegressionProve a specific bug stays fixed

Test Requirements

  1. New features: Unit tests for new functions/methods. At least one integration test.

  2. Bug fixes: A regression test that fails before the fix and passes after.

  3. Refactors: Existing tests must still pass. Add tests if coverage gaps are found.

Running Tests

# Run all tests (coverage is collected automatically via pyproject.toml)
pytest

# Run a specific test file
pytest tests/test_model_methods.py

Writing Tests

Pull Request Checklist

Settings Architecture

Runtime configuration lives in the database via the JheSetting model, accessed through get_setting(key, default).

Rules:

Reporting Issues

Open a GitHub Issue with:

  1. Steps to reproduce

  2. Expected vs actual behavior

  3. Relevant logs or screenshots

Tag with appropriate labels (bug, enhancement, documentation).