-
Notifications
You must be signed in to change notification settings - Fork 32
✨ web-server RPC: exposes list_my_projects_marked_as_jobs
#7534
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
Merged
pcrespov
merged 10 commits into
ITISFoundation:master
from
pcrespov:is7399/list-projects-rpc
Apr 16, 2025
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
457479e
drafts tests
pcrespov 937b5d7
draft query
pcrespov 7defd4c
testing
pcrespov 5322bc9
✨ Refactor ProjectJobsRepository to streamline database column select…
pcrespov 530d33a
✨ Enhance test coverage for job-marked projects by introducing fixtur…
pcrespov 766f460
drafts rpc
pcrespov 7090c9e
✨ Update ProjectRpcGet model to remove workbench field and add docstr…
pcrespov e742141
fixes mypy
pcrespov b0a07e1
fixes mypy
pcrespov 2f4901c
@bisgaard-itis review: rename
pcrespov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
packages/models-library/src/models_library/rpc/webserver/projects.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| from datetime import datetime | ||
| from typing import Annotated, TypeAlias | ||
|
|
||
| from models_library.projects import ProjectID | ||
| from models_library.rpc_pagination import PageRpc | ||
| from pydantic import BaseModel, ConfigDict, Field | ||
|
|
||
|
|
||
| class ProjectRpcGet(BaseModel): | ||
| """ | ||
| Minimal information about a project that (for now) will fullfill | ||
| the needs of the api-server. Specifically, the fields needed in | ||
| project to call create_job_from_project | ||
| """ | ||
|
|
||
| uuid: Annotated[ | ||
| ProjectID, | ||
| Field(description="project unique identifier"), | ||
| ] | ||
| name: Annotated[ | ||
| str, | ||
| Field(description="project display name"), | ||
| ] | ||
| description: str | ||
|
|
||
| # timestamps | ||
| creation_date: datetime | ||
| last_change_date: datetime | ||
|
|
||
| model_config = ConfigDict( | ||
| extra="forbid", | ||
| populate_by_name=True, | ||
| ) | ||
|
|
||
|
|
||
| PageRpcProjectRpcGet: TypeAlias = PageRpc[ | ||
| # WARNING: keep this definition in models_library and not in the RPC interface | ||
| # otherwise the metaclass PageRpc[*] will create *different* classes in server/client side | ||
| # and will fail to serialize/deserialize these parameters when transmitted/received | ||
| ProjectRpcGet | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.