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
e1c2cd62
Commit
e1c2cd62
authored
8 years ago
by
Jason R Laura
Browse files
Options
Downloads
Patches
Plain Diff
Setup travis, coveralls, and README
parent
e95ca037
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.coveragerc
+1
-0
1 addition, 0 deletions
.coveragerc
README.rst
+23
-0
23 additions, 0 deletions
README.rst
plio/io_controlnetwork.py
+1
-0
1 addition, 0 deletions
plio/io_controlnetwork.py
plio/tests/test_io_controlnetwork.py
+13
-21
13 additions, 21 deletions
plio/tests/test_io_controlnetwork.py
with
38 additions
and
21 deletions
.coveragerc
+
1
−
0
View file @
e1c2cd62
...
...
@@ -3,6 +3,7 @@ source = autocnet
[report]
omit =
plio/ControlNetFileV0002_pb2.py
*/sqlalchemy_json/*
*/tests/*
exclude_lines =
pragma: no cover
...
...
This diff is collapsed.
Click to expand it.
README.rst
0 → 100644
+
23
−
0
View file @
e1c2cd62
===============================
AutoCNet
===============================
.. image:: https://badges.gitter.im/USGS-Astrogeology/autocnet.svg
:alt: Join the chat at https://gitter.im/USGS-Astrogeology/autocnet
:target: https://gitter.im/USGS-Astrogeology/autocnet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. image:: https://img.shields.io/pypi/v/autocnet.svg
:target: https://pypi.python.org/pypi/plio
.. image:: https://travis-ci.org/USGS-Astrogeology/plio.svg?branch=master
:target: https://travis-ci.org/USGS-Astrogeology/plio
.. image:: https://coveralls.io/repos/USGS-Astrogeology/plio/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/USGS-Astrogeology/plio?branch=master
.. image:: https://readthedocs.org/projects/plio/badge/?version=latest
:target: http://plio.readthedocs.org/en/latest/
:alt: Documentation Status
A planetary file I/O API
This diff is collapsed.
Click to expand it.
plio/io_controlnetwork.py
+
1
−
0
View file @
e1c2cd62
...
...
@@ -87,6 +87,7 @@ def to_isis(path, obj, mode='w', version=VERSION,
point_sizes
,
creation_date
,
modified_date
)
print
(
point_sizes
)
# Write the buffer header
store
.
write
(
buffer_header
,
HEADERSTARTBYTE
)
# Then write the points, so we know where to start writing, + 1 to avoid overwrite
...
...
This diff is collapsed.
Click to expand it.
plio/tests/test_io_controlnetwork.py
+
13
−
21
View file @
e1c2cd62
import
os
import
sys
from
time
import
strftime
,
gmtime
import
unittest
import
numpy
as
np
import
pandas
as
pd
import
pvl
...
...
@@ -22,29 +22,21 @@ class TestWriteIsisControlNetwork(unittest.TestCase):
serial_times
=
{
295
:
'
1971-07-31T01:24:11.754
'
,
296
:
'
1971-07-31T01:24:36.970
'
}
cls
.
serials
=
[
'
APOLLO15/METRIC/{}
'
.
format
(
i
)
for
i
in
serial_times
.
values
()]
net
=
CandidateGraph
({
'
a
'
:
[
'
b
'
],
'
b
'
:
[
'
a
'
]})
for
i
,
n
in
net
.
nodes_iter
(
data
=
True
):
n
.
_keypoints
=
pd
.
DataFrame
(
np
.
arange
(
10
).
reshape
(
cls
.
npts
,
-
1
),
columns
=
[
'
x
'
,
'
y
'
])
n
.
_isis_serial
=
cls
.
serials
[
i
]
columns
=
[
'
point_id
'
,
'
point_type
'
,
'
serialnumber
'
,
'
measure_type
'
,
'
x
'
,
'
y
'
,
'
node_id
'
]
source
=
np
.
zeros
(
cls
.
npts
)
destination
=
np
.
ones
(
cls
.
npts
)
pid
=
np
.
arange
(
cls
.
npts
)
data
=
[]
for
i
in
range
(
cls
.
npts
):
data
.
append
((
i
,
2
,
cls
.
serials
[
0
],
2
,
0
,
0
,
0
))
data
.
append
((
i
,
2
,
cls
.
serials
[
1
],
2
,
0
,
0
,
1
))
matches
=
pd
.
DataFrame
(
np
.
vstack
((
source
,
pid
,
destination
,
pid
)).
T
,
columns
=
[
'
source_image
'
,
'
source_idx
'
,
'
destination_image
'
,
'
destination_idx
'
])
dfs
=
[
pd
.
DataFrame
(
data
,
columns
=
columns
)]
net
.
edge
[
0
][
1
].
matches
=
matches
net
.
generate_cnet
(
clean_keys
=
[])
cls
.
creation_date
=
strftime
(
"
%Y-%m-%d %H:%M:%S
"
,
gmtime
())
cls
.
modified_date
=
strftime
(
"
%Y-%m-%d %H:%M:%S
"
,
gmtime
())
io_controlnetwork
.
to_isis
(
'
test.net
'
,
dfs
,
mode
=
'
wb
'
,
targetname
=
'
Moon
'
)
cls
.
creation_date
=
net
.
creationdate
cls
.
modified_date
=
net
.
modifieddate
io_controlnetwork
.
to_isis
(
'
test.net
'
,
net
,
mode
=
'
wb
'
,
targetname
=
'
Moon
'
)
cls
.
header_message_size
=
98
cls
.
point_start_byte
=
65634
cls
.
header_message_size
=
78
cls
.
point_start_byte
=
65614
def
test_create_buffer_header
(
self
):
with
open
(
'
test.net
'
,
'
rb
'
)
as
f
:
...
...
@@ -94,7 +86,7 @@ class TestWriteIsisControlNetwork(unittest.TestCase):
self
.
assertEqual
(
675
,
points_bytes
)
points_start_byte
=
find_in_dict
(
pvl_header
,
'
PointsStartByte
'
)
self
.
assertEqual
(
65634
,
points_start_byte
)
self
.
assertEqual
(
self
.
point_start_byte
,
points_start_byte
)
@classmethod
def
tearDownClass
(
cls
):
...
...
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