-
Notifications
You must be signed in to change notification settings - Fork 11
Use POST requests for perforations, completions and casings from SubsurfaceDataApi #1144
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
base: main
Are you sure you want to change the base?
Use POST requests for perforations, completions and casings from SubsurfaceDataApi #1144
Conversation
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.
Pull Request Overview
Switches from GET to POST requests for wellbore perforations, completions, and casings API endpoints to enable fetching data for multiple wellbores simultaneously in support of webviz-4d functionality.
- Replaces single wellbore UUID parameters with arrays of UUIDs across API endpoints
- Updates both frontend query hooks and backend service methods to handle multiple wellbores
- Consolidates backend logic into a generic method for processing wellbore list data
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/modules/Intersection/view/hooks/queryHooks.ts | Updates query hook to pass wellbore UUID as array instead of single string |
| frontend/src/api/autogen/types.gen.ts | Updates API type definitions to use wellbore_uuids arrays and adds wellbore identifier fields |
| backend_py/primary/primary/services/ssdl_access/well_access.py | Refactors to use POST requests and generic method for handling multiple wellbores |
| backend_py/primary/primary/services/ssdl_access/types.py | Adds wellbore_id and wellbore_uuid fields to data models |
| backend_py/primary/primary/services/ssdl_access/_ssdl_request.py | Introduces unified request handling for both GET and POST methods |
| backend_py/primary/primary/services/ssdl_access/_ssdl_get_request.py | Removes old GET-only request implementation |
| backend_py/primary/primary/routers/well/schemas.py | Adds wellbore identifier fields to schema models |
| backend_py/primary/primary/routers/well/router.py | Updates endpoints to accept arrays of wellbore UUIDs |
| backend_py/primary/primary/routers/well/converters.py | Maps new wellbore identifier fields in converter functions |
Comments suppressed due to low confidence (1)
backend_py/primary/primary/services/ssdl_access/_ssdl_request.py:1
- Debug print statement should be removed from production code. The LOGGER.debug statement on the next line already handles this logging.
import logging
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| wellbore_uuids: List[str] = Query(description="List of wellbore uuids"), | ||
| # fmt:on | ||
| ) -> List[schemas.WellborePerforation]: | ||
| """Get well bore casing for a single well bore""" |
Copilot
AI
Sep 25, 2025
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.
Function docstring is outdated and incorrect. It should describe getting perforations for multiple wellbores, not 'casing for a single well bore'.
| """Get well bore casing for a single well bore""" | |
| """Get well bore perforations for multiple wellbores""" |
| wellbore_uuids: List[str] = Query(description="List of wellbore uuids"), | ||
| # fmt:on | ||
| ) -> List[schemas.WellboreCompletion]: | ||
| """Get well bore completions for a single well bore""" |
Copilot
AI
Sep 25, 2025
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.
Function docstrings are outdated. These functions now handle multiple wellbores, not a single wellbore.
| """Get well bore completions for a single well bore""" | |
| """Get wellbore completions for multiple wellbores.""" |
| wellbore_uuids: List[str] = Query(description="List of wellbore uuids"), | ||
| # fmt:on | ||
| ) -> List[schemas.WellboreCasing]: | ||
| """Get well bore casings for a single well bore""" |
Copilot
AI
Sep 25, 2025
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.
Function docstrings are outdated. These functions now handle multiple wellbores, not a single wellbore.
| """Get well bore casings for a single well bore""" | |
| """Get wellbore casings for multiple wellbores.""" |
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.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Looks good to me, apart from some comments that could be changed
| # POST requests always return dict, so we can safely cast | ||
| return result if isinstance(result, dict) else result[0] |
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.
You're not casting here? Is this comment outdated?
| * Get Wellbore Completions | ||
| * Get well bore completions for a single well bore | ||
| * Get wellbore completions |
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.
Now you're just repeating the line, so might as well just remove this line fully (same goes for L:995 and L:1008 too)
To facilitate webviz-4d functionality we switch to POST requests for this data.
This will allow us to fetch the data for multiple/all wells at once.