Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Oct 17, 2024
1 parent 765e861 commit 3c9e72a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 49 deletions.
46 changes: 0 additions & 46 deletions backend_py/primary/primary/routers/seismic/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,49 +99,3 @@ async def post_get_seismic_fence(
min_fence_depth=depth_axis_meta.min,
max_fence_depth=depth_axis_meta.max,
)


"""
@router.get("/get_seismic_attribute_near_surface/")
async def get_seismic_attribute_near_surface(
authenticated_user: AuthenticatedUser = Depends(AuthHelper.get_authenticated_user),
case_uuid: str = Query(description="Sumo case uuid"),
ensemble_name: str = Query(description="Ensemble name"),
realization_num: int = Query(description="Realization number"),
seismic_cube_attribute: str = Query(description="Seismic cube attribute"),
seismic_timestamp_or_timestep: str = Query(description="Timestamp or timestep"),
surface_name: str = Query(description="Surface name"),
surface_attribute: str = Query(description="Surface attribute"),
) -> schemas.SurfaceMeshAndProperty:
""
Get a directory of surface names, attributes and time/interval strings for simulated dynamic surfaces.
""
seismic_access = SeismicAccess(authenticated_user.get_sumo_access_token(), case_uuid, ensemble_name)
timestamp = None
timestep = None
if "--" in seismic_timestamp_or_timestep:
timestep = seismic_timestamp_or_timestep
else:
timestamp = seismic_timestamp_or_timestep
vds_handle: Optional[VdsHandle] = None
try:
vds_handle = await seismic_access.get_vds_handle_async(
realization=1,
iteration=ensemble_name,
cube_tagname=seismic_cube_attribute,
timestep=timestep,
timestamp=timestamp,
)
except ValueError as err:
raise HTTPException(status_code=404, detail=str(err)) from err
surface_access = SurfaceAccess(authenticated_user.get_sumo_access_token(), case_uuid, ensemble_name)
xtg_surf = surface_access.get_static_surf(real_num=1, name=surface_name, attribute=surface_attribute).copy()
vdsaccess = VdsAccess(sas_token=vds_handle.sas_token, vds_url=vds_handle.vds_url)
seismic_values = vdsaccess.get_surface_values(xtgeo_surf=xtg_surf, above=5, below=5, attribute="mean")
return converters.to_api_surface_data(xtg_surf, seismic_values)
"""
4 changes: 1 addition & 3 deletions backend_py/primary/primary/routers/well/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ def convert_wellbore_header_to_schema(
wellNorthing=drilled_wellbore_header.well_northing,
depthReferencePoint=drilled_wellbore_header.depth_reference_point,
depthReferenceElevation=drilled_wellbore_header.depth_reference_elevation,
wellborePurpose=(
drilled_wellbore_header.wellbore_purpose if drilled_wellbore_header.wellbore_purpose else ""
), # TODO: Handle None
wellborePurpose=(drilled_wellbore_header.wellbore_purpose if drilled_wellbore_header.wellbore_purpose else ""),
wellboreStatus=drilled_wellbore_header.wellbore_status if drilled_wellbore_header.wellbore_status else "",
)

Expand Down

0 comments on commit 3c9e72a

Please sign in to comment.