Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

database-schema

This repository is a Python package that contains SQLAlchemy data models for use in the CARPI Course Planner project.

Installing as a Dependency

In your project's dependency list (often named requirements.txt or similar), add the following line:

carpi-data-model @ git+https://github.com/Project-CARPI/database-schema.git

If installing directly on the command line using pip, use the following command:

pip3 install git+https://github.com/Project-CARPI/database-schema.git

Local Development & Testing

Along with the core SQLAlchemy models, this repository includes a PyTest-based test suite.

Prerequisites

Setup Instructions

1. Set Up a Virtual Environment To avoid cluttering your global Python environment, create a virtual environment in the project root:

# Create a virtual environment directory named .venv
python -m venv .venv

2. Activate the Environment Depending on your operating system, activate the virtual environment:

  • Windows:
    .venv\Scripts\activate
  • macOS / Linux:
    source .venv/bin/activate

You will see a (.venv) prefix in your terminal prompt when the environment is successfully active:

(.venv) raymond@Macbook-Pro database-schema %

3. Install Required Dependencies With the virtual environment active, install the required packages for testing:

pip install -r requirements.txt

Running the Tests

Once your environment is set up and Docker is running in the background, you can execute the test suite using pytest:

pytest tests/

To exit the virtual environment when you are finished, run the deactivate command:

deactivate

About

The CARPI database schemas.

Resources

Stars

Watchers

Forks

Contributors

Languages