Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Plio
Commits
a57851aa
Commit
a57851aa
authored
6 years ago
by
Jay
Browse files
Options
Downloads
Patches
Plain Diff
Fixes MRO serial issue
parent
e2fbdf2e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plio/data/data.db
+0
-0
0 additions, 0 deletions
plio/data/data.db
plio/io/isis_serial_number.py
+1
-0
1 addition, 0 deletions
plio/io/isis_serial_number.py
plio/io/tests/test_isis_serial_numbers.py
+16
-9
16 additions, 9 deletions
plio/io/tests/test_isis_serial_numbers.py
with
17 additions
and
9 deletions
plio/data/data.db
+
0
−
0
View file @
a57851aa
No preview for this file type
This diff is collapsed.
Click to expand it.
plio/io/isis_serial_number.py
+
1
−
0
View file @
a57851aa
...
@@ -82,6 +82,7 @@ def generate_serial_number(label):
...
@@ -82,6 +82,7 @@ def generate_serial_number(label):
# Sort the keys to ensure proper iteration order
# Sort the keys to ensure proper iteration order
keys
=
sorted
(
translation
.
keys
())
keys
=
sorted
(
translation
.
keys
())
for
k
in
keys
:
for
k
in
keys
:
try
:
try
:
group
=
translation
[
k
]
group
=
translation
[
k
]
...
...
This diff is collapsed.
Click to expand it.
plio/io/tests/test_isis_serial_numbers.py
+
16
−
9
View file @
a57851aa
import
os
import
os
import
sys
import
sys
import
unittest
from
plio.examples
import
get_path
import
pytest
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'
..
'
))
from
plio.io
import
isis_serial_number
from
plio.io
import
isis_serial_number
from
plio.examples
import
get_path
@pytest.fixture
def
apollo_lbl
():
return
get_path
(
'
Test_PVL.lbl
'
)
@pytest.fixture
def
ctx_lbl
():
return
get_path
(
'
ctx.pvl
'
)
class
TestIsisSerials
(
unittest
.
TestCase
):
@pytest.mark.parametrize
(
"
label, expected
"
,
[(
apollo_lbl
(),
'
APOLLO15/METRIC/1971-07-31T14:02:27.179
'
),
(
ctx_lbl
(),
'
MRO/CTX/0906095311:038
'
)
])
def
test_generate_serial_number
(
label
,
expected
):
serial
=
isis_serial_number
.
generate_serial_number
(
label
)
assert
serial
==
expected
def
test_generate_serial_number
(
self
):
label
=
get_path
(
'
Test_PVL.lbl
'
)
\ No newline at end of file
serial
=
isis_serial_number
.
generate_serial_number
(
label
)
self
.
assertEqual
(
'
APOLLO15/METRIC/1971-07-31T14:02:27.179
'
,
serial
)
\ 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