-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add project creation API endpoint #139
base: main
Are you sure you want to change the base?
Conversation
Integration tests are missing pending a suitable mocking strategy.
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
# Create local queue if it doesn't exist | ||
local_queue = kueue.get_local_queue(project.local_queue, project.namespace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also be an ensure pattern like the namespace bit above, or am I missing something?
i.e. local_queue = kueue.ensure_local_queue(...)
|
||
class LocalQueueResourceUsage(BaseModel): | ||
name: str | ||
total: Any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a JSON struct, or something else?
This PR adds the data model for the Project entity, along with a creation API endpoint
POST /projects
:An Alembic migration that includes the project table has been created.
Behavior of the
POST /projects
creation endpoint:Note
Testing: the
db()
fixture intests/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 theyield
statement and get the database path fromf.name
.Open Questions
TODO
comment)