Skip to content
Snippets Groups Projects
Commit b9116bd2 authored by Christophe Lallement's avatar Christophe Lallement
Browse files

welllog documentation improvements

parent d9a9eca4
No related branches found
No related tags found
1 merge request!319Wellbore consistency
Pipeline #78317 failed
Pipeline: Wellbore Domain Services

#78318

    ......@@ -12,14 +12,19 @@ class ReferenceCurveIdNotFoundException(RuntimeError):
    def welllog_consistency_check(wl: WellLog):
    """Check if Is wellLog consistent.
    """Check if wellLog is consistent.
    Each curves in data.Curves must have a unique CurveID.
    Welllog must have a curve whose curveID value is equal to the wellLog's ReferenceCurveID value
    raise DuplicatedCurveIdException when CurveID are not unique
    raise ReferenceCurveIdNotFoundException in case there is no curve id egale to ReferenceCurveID
    raise:
    Args:
    wl (Welllog): wellLog object to be verified
    Returns:
    Raises:
    DuplicatedCurveIdException: All CurveIDs are not unique.
    ReferenceCurveIdNotFoundException: No curve whose curveID value are equal to ReferenceCurveID value.
    """
    if not wl.data:
    return
    ......
    ......@@ -159,12 +159,12 @@ async def post_welllog_osdu(
    except DuplicatedCurveIdException:
    raise HTTPException(
    status_code=status.HTTP_400_BAD_REQUEST,
    detail=f"All CurveID in WellLog[{idx}] are not unique"
    detail=f"All CurveID in WellLog[{idx}] should be unique"
    )
    except ReferenceCurveIdNotFoundException:
    raise HTTPException(
    status_code=status.HTTP_400_BAD_REQUEST,
    detail=f"WellLog[{idx}] doesn't have a curve with a curveID value equal to the ReferenceCurveID value: '{w.data.ReferenceCurveID}'"
    detail=f"WellLog[{idx}] should have a curve with a curveID value equal to the ReferenceCurveID value: '{w.data.ReferenceCurveID}'"
    )
    storage_client = await get_storage_record_service(ctx)
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment