A Flask-based web application for managing collections of tissue samples and their associated metadata.
- Route:
/
- Fetches all collections stored in the database.
- Displays a list of collections with their respective titles and associated disease terms.
- Route:
/collection/<id>
- Displays detailed information about a specific collection, including its samples (donor count, material type, last updated).
- Route:
/collection/<id>/add-sample
- Provides a form to input sample details including:
- Donor count
- Material type
- Last updated date (defaults to the current date)
- Saves the new sample to the database.
- Route:
/collection/add
- Allows users to create a new collection by providing the following details:
- Title
- Disease term
- Saves the new collection to the database.
- Python 3.10+
- Poetry (used for managing dependencies)
git clone https://github.com/bp1183/TissueHub.git
cd TissueHub
If you don't have poetry installed, you can install it by following the official installation guide.
poetry install
This will install all required dependencies as specified in the pyproject.toml.
First, initialize the Flask-Migrate migration environment:
poetry run flask db init
Next, generate the migration script for creating the initial database tables:
poetry run flask db migrate -m "Initial migration"
Apply the migration to create the tables in the database:
poetry run flask db upgrade
Finally, populate the database with the seed data
poetry run flask init-db
poetry run start
Open your browser and navigate to http://127.0.0.1:5000
Test can be run using pytest
:
poetry run pytest