Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Wellbore Domain Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
Domain Data Management Services
Wellbore
Wellbore Domain Services
Commits
95b8ea2c
Commit
95b8ea2c
authored
4 years ago
by
Luc Yriarte
Browse files
Options
Downloads
Patches
Plain Diff
Remove dipset/persistence_test.py dependant from stripped tokens
parent
3df41ae9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!19
Slb code push #3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/unit/routers/dipset/persistence_test.py
+0
-107
0 additions, 107 deletions
tests/unit/routers/dipset/persistence_test.py
with
0 additions
and
107 deletions
tests/unit/routers/dipset/persistence_test.py
deleted
100644 → 0
+
0
−
107
View file @
3df41ae9
import
pandas
as
pd
import
pytest
from
app.model.model_curated
import
ValueWithUnit
from
app.routers.dipset.dip_model
import
Dip
from
app.routers.dipset.persistence
import
series_to_dip
@pytest.mark.parametrize
(
"
series,dip
"
,
[
(
pd
.
Series
(
{
"
reference
"
:
1000.0
,
"
azimuth
"
:
34.0
,
"
inclination
"
:
18.0
,
"
classification
"
:
"
fracture
"
},
dtype
=
"
object
"
,
),
Dip
(
reference
=
ValueWithUnit
(
unitKey
=
"
meter
"
,
value
=
1000.0
),
azimuth
=
ValueWithUnit
(
unitKey
=
"
dega
"
,
value
=
34
),
inclination
=
ValueWithUnit
(
unitKey
=
"
dega
"
,
value
=
18.0
),
classification
=
"
fracture
"
,
),
),
(
pd
.
Series
(
{
"
reference
"
:
1000.0
,
"
azimuth
"
:
34.0
,
"
inclination
"
:
18.0
,
"
classification
"
:
"
fracture
"
,
"
quality
"
:
float
(
"
nan
"
),
"
xCoordinate
"
:
float
(
"
nan
"
),
"
yCoordinate
"
:
float
(
"
nan
"
),
"
zCoordinate
"
:
float
(
"
nan
"
),
},
dtype
=
"
object
"
,
),
Dip
(
reference
=
ValueWithUnit
(
unitKey
=
"
meter
"
,
value
=
1000.0
),
azimuth
=
ValueWithUnit
(
unitKey
=
"
dega
"
,
value
=
34
),
inclination
=
ValueWithUnit
(
unitKey
=
"
dega
"
,
value
=
18.0
),
classification
=
"
fracture
"
,
quality
=
None
,
xCoordinate
=
None
,
yCoordinate
=
None
,
zCoordinate
=
None
,
),
),
(
pd
.
Series
(
{
"
reference
"
:
0.
REMOVED_FOR_CICD_SCAN
,
"
azimuth
"
:
34.0
,
"
inclination
"
:
18.0
,
"
classification
"
:
None
,
"
quality
"
:
float
(
"
nan
"
),
"
xCoordinate
"
:
float
(
"
nan
"
),
"
yCoordinate
"
:
float
(
"
nan
"
),
"
zCoordinate
"
:
float
(
"
nan
"
),
},
dtype
=
"
object
"
,
),
Dip
(
reference
=
ValueWithUnit
(
unitKey
=
"
meter
"
,
value
=
0.
REMOVED_FOR_CICD_SCAN
),
azimuth
=
ValueWithUnit
(
unitKey
=
"
dega
"
,
value
=
34
),
inclination
=
ValueWithUnit
(
unitKey
=
"
dega
"
,
value
=
18.0
),
classification
=
None
,
quality
=
None
,
xCoordinate
=
None
,
yCoordinate
=
None
,
zCoordinate
=
None
,
),
),
],
)
def
test_series_to_dip
(
series
,
dip
):
computed_dip
=
series_to_dip
(
series
)
assert
computed_dip
==
dip
def
test_dip_to_series
():
expected
=
Dip
(
reference
=
ValueWithUnit
(
unitKey
=
"
meter
"
,
value
=
0.
REMOVED_FOR_CICD_SCAN
),
azimuth
=
ValueWithUnit
(
unitKey
=
"
dega
"
,
value
=
34
),
inclination
=
ValueWithUnit
(
unitKey
=
"
dega
"
,
value
=
18.0
),
classification
=
None
,
quality
=
None
,
xCoordinate
=
None
,
yCoordinate
=
None
,
zCoordinate
=
None
,
)
data
=
pd
.
Series
(
{
"
reference
"
:
0.
REMOVED_FOR_CICD_SCAN
,
"
azimuth
"
:
34.0
,
"
inclination
"
:
18.0
,
"
classification
"
:
None
,
"
quality
"
:
float
(
"
nan
"
),
"
xCoordinate
"
:
float
(
"
nan
"
),
"
yCoordinate
"
:
float
(
"
nan
"
),
"
zCoordinate
"
:
float
(
"
nan
"
),
},
dtype
=
"
object
"
)
computed_dip
=
series_to_dip
(
data
)
assert
computed_dip
==
expected
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment