Skip to content
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

DM-44763: Refactor the UWS support library #171

Merged
merged 1 commit into from
Jun 13, 2024
Merged

DM-44763: Refactor the UWS support library #171

merged 1 commit into from
Jun 13, 2024

Conversation

rra
Copy link
Member

@rra rra commented Jun 13, 2024

Rework the way that code is divided between the service and the UWS library to try to move more of the complexity into the library.

The service no longer has to define any routes; instead, it defines FastAPI dependencies that return the job parameters, and all the route code is handled by the UWS library.

The policy layer has been removed in favor of adding callbacks to the UWS configuration layer that accomplish the same thing. This refactor standardizes the arguments to the backend worker and passes it a Pydantic model, since we can rely on Pydantic being available in stack containers.

Refactor the parameter models for cutouts to support Pydantic serialization so that there's no need to implement a separate to_dict function.

Rework the way that code is divided between the service and the
UWS library to try to move more of the complexity into the library.

The service no longer has to define any routes; instead, it defines
FastAPI dependencies that return the job parameters, and all the
route code is handled by the UWS library.

The policy layer has been removed in favor of adding callbacks to
the UWS configuration layer that accomplish the same thing.  This
refactor standardizes the arguments to the backend worker and passes
it a Pydantic model, since we can rely on Pydantic being available
in stack containers.

Refactor the parameter models for cutouts to support Pydantic
serialization so that there's no need to implement a separate
to_dict function.
@rra rra merged commit 14b77e1 into main Jun 13, 2024
3 checks passed
@rra rra deleted the tickets/DM-44763 branch June 13, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant