aai-institute / jobq

https://aai-institute.github.io/jobq/latest
Apache License 2.0
2 stars 1 forks source link

Add persistence layer to backend #138

Closed AdrianoKF closed 3 weeks ago

AdrianoKF commented 4 weeks ago

Major changes

Settings

Pydantic Settings are used to control behavior of the backend (see config.py). The following settings are currently available:

These settings can be passed through environment variables of the same name.

Database Migrations

Alembic is used to perform database migrations.

As part of its entry point script, the container image automatically upgrades to the head revision (alembic upgrade head).

For local development, the AUTO_MIGRATE setting can be used to automatically run migrations on startup (or you can manually use the Alembic CLI).

Tests

The automatic db fixture in the integration test suite provides an in-memory SQLite database session.


Closes #133

codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 73.56322% with 23 lines in your changes missing coverage. Please review.

Project coverage is 57.34%. Comparing base (ff36c96) to head (09fd9b7). Report is 1 commits behind head on main.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
backend/src/jobq_server/__main__.py 45.00% 11 Missing :warning:
backend/src/jobq_server/alembic/env.py 80.76% 5 Missing :warning:
backend/src/jobq_server/db.py 81.48% 5 Missing :warning:
backend/src/jobq_server/dependencies/__init__.py 71.42% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #138 +/- ## ========================================== + Coverage 56.92% 57.34% +0.42% ========================================== Files 63 66 +3 Lines 3164 3247 +83 ========================================== + Hits 1801 1862 +61 - Misses 1363 1385 +22 ``` | [Flag](https://app.codecov.io/gh/aai-institute/jobq/pull/138/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aai-institute) | Coverage Δ | | |---|---|---| | [backend](https://app.codecov.io/gh/aai-institute/jobq/pull/138/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aai-institute) | `86.51% <73.56%> (-1.68%)` | :arrow_down: | | [client](https://app.codecov.io/gh/aai-institute/jobq/pull/138/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aai-institute) | `48.92% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aai-institute#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.