Skip to content

uw-ssec/coaching-companion

Coaching Companion

BSD License Hatch project Ruff

pre-commit.ci status CI

This repository contains the code for the Coaching Companion project. The project is a set of migration tools that provides an internal package for Cultivate Learning engineers to modernize the existing database design. The project is built using Python and Jupyter Notebooks.

Getting Started

To get started with your development (or fork), click the "Open with GitHub Codespaces" button below to launch a fully configured development environment with all the necessary tools and extensions.

Open in GitHub Codespaces

Testing

Running Tests with Pytest

To run your tests using pytest from the terminal, follow these steps:

  1. Navigate to Your Project Directory: Open your terminal and navigate to the root directory of your project where your tests are located.

Run pytest: Execute the following command to run all tests:

pytest
  1. Run Specific Tests: To run a specific test file or directory, provide the path:
pytest path/to/test_file.py
  1. View Detailed Output: For more detailed output, use the -v (verbose) flag:
pytest -v
  1. Generate a Test Report: To generate a test report, you can use the --junitxml option:
pytest --junitxml=report.xml

By following these steps, you can easily run and manage your tests using pytest from the terminal.

Generate List of SQLModels [Optional]

Access the tests/utils/generate_list_of_models.ipynb notebook to generate a list of SQLModels from the database schema. This step is optional and only required if you want to update mulitple models. This notebook allows you to retrieve models in batches.

The output of this notebook is a list of SQLModels in a YAML file that can be used to generate unit tests.

Generate Unit Tests from Templates

Access the tests/utils/generate_test_from_template.ipynb notebook to generate unit tests from the templates. This step is required if you want to update mulitple models. This notebook allows you to generate tests in batches. Currently, the template is based on models inheriting the BaseTableModel class, and you will need to add a new template for other models.

As written, the notebook will generate unit tests for the models in the tests/models/ directory.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •