aai-institute / jobq

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

Add project creation API endpoint #139

Open AdrianoKF opened 3 weeks ago

AdrianoKF commented 3 weeks ago

This PR adds the data model for the Project entity, along with a creation API endpoint POST /projects:

image

An Alembic migration that includes the project table has been created.

Behavior of the POST /projects creation endpoint:

[!note] Testing: the db() fixture in tests/integration/conftest.py automatically creates a temporary SQLite database and applies all database migrations.

If you want to manually inspect the database contents after a test session, you can put a breakpoint() after the yield statement and get the database path from f.name.

Open Questions

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 87.84530% with 22 lines in your changes missing coverage. Please review.

Project coverage is 58.91%. Comparing base (7dcdb6a) to head (76229ad).

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

Files with missing lines Patch % Lines
backend/src/jobq_server/services/kueue.py 75.00% 11 Missing :warning:
backend/src/jobq_server/routers/projects.py 84.37% 5 Missing :warning:
...er/alembic/versions/2837c7c54f35_initial_schema.py 80.00% 3 Missing :warning:
backend/src/jobq_server/services/k8s.py 81.25% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #139 +/- ## ========================================== + Coverage 57.34% 58.91% +1.57% ========================================== Files 66 69 +3 Lines 3247 3420 +173 ========================================== + Hits 1862 2015 +153 - Misses 1385 1405 +20 ``` | [Flag](https://app.codecov.io/gh/aai-institute/jobq/pull/139/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/139/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aai-institute) | `86.88% <87.84%> (+0.36%)` | :arrow_up: | 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.