Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ install:
script:
- py.test --cov=planetary_test_data tests/
- 'if [ "$TRAVIS_PYTHON_VERSION" != "2.6" ]; then flake8 planetary_test_data tests; fi'
- 'if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then sphinx-build -b linkcheck docs/ docs/_build/; fi'
- 'if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then sphinx-build -b html docs/ docs/_build/; fi'
- 'if [ "$TRAVIS_PYTHON_VERSION" == "3.6" ]; then sphinx-build -b linkcheck docs/ docs/_build/; fi'
- 'if [ "$TRAVIS_PYTHON_VERSION" == "3.6" ]; then sphinx-build -b html docs/ docs/_build/; fi'

after_success:
- 'if [ "$TRAVIS_PYTHON_VERSION" == "2.7" ]; then coveralls; fi'
Expand Down
23 changes: 15 additions & 8 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~

.. _numpydocs: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt

Planetary Test Data could always use more documentation, whether as part of the
official Planetary Test Data docs, in docstrings, or even on the web in blog posts,
articles, and such.
articles, and such. Please use `numpy docstrings <numpydocs>`_.

Submit Feedback
~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -68,11 +70,15 @@ Ready to contribute? Here's how to set up `planetary_test_data` for local develo
$ cd planetary_test_data/
$ pip install -r requirements.txt

4. Create a branch for local development::
4. Create a feature branch for local development. If your feature addresses
an issue, include the issue number in the branch name. Remember to update
your master branch first!::

$ git checkout -b name-of-your-bugfix-or-feature
$ git checkout master
$ git pull origin master
$ git checkout -b issue42_short_name_of_issue

Now you can make your changes locally.
Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::

Expand All @@ -84,11 +90,12 @@ Ready to contribute? Here's how to set up `planetary_test_data` for local develo

6. Commit your changes and push your branch to GitHub::

$ git add .
$ git add file_was_that_changed.ext
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.
7. Submit a pull request through the GitHub website. Please make sure the base
branch is ``development``

Pull Request Guidelines
-----------------------
Expand All @@ -99,7 +106,7 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, 3.3, and 3.4, and for PyPy. Check
3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4, 3.5, and 3.6, and for PyPy. Check
https://travis-ci.org/planetarypy/planetary_test_data/pull_requests
and make sure that the tests pass for all supported Python versions.

Expand All @@ -108,4 +115,4 @@ Tips

To run a subset of tests::

py.test tests/test_planetary_test_data
py.test tests/test_planetary_test_data.py
12 changes: 11 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
.. :changelog:

History
-------
=======

0.4.0 (2018-01-21)
------------------

* Made new methods/commands to get products by mission and/or instrument
* Made new methods/command to get a copy of the subset of the data.json file
* Added several new products
* Created new documentation
* Made documentation available on RTD
* Create new tests to get %100 coverage

0.3.3 (2015-07-27)
-------------------
Expand Down
209 changes: 193 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===============================
===================
Planetary Test Data
===============================
===================

.. image:: https://img.shields.io/travis/planetarypy/planetary_test_data.svg
:target: https://travis-ci.org/planetarypy/planetary_test_data
Expand All @@ -22,7 +22,7 @@ Features
--------

* Downloads a core set of sample Planetary test data into
``./mission_data/`` or if ``./tests/mission_data/`` if ``./tests/`` exists.
``./mission_data/`` or ``./tests/mission_data/`` if ``./tests/`` exists.

TODO
------
Expand All @@ -32,8 +32,6 @@ TODO
* Find smaller example images to reduce download times.
* Command line usage improvements

* Include a mode that just copies the ``data.json`` file into the local
directory.
* Include a mode that allows users to somehow specify subsets of data to
retrieve. Perhaps selecting by mission or instrument name.

Expand All @@ -54,42 +52,121 @@ and then run the command ``get_mission_data``::

Additional usage options are shown below::

usage: get_mission_data [-h] [--all] [--file FILE] [--dir DIR]
[--tags [TAGS [TAGS ...]]]
usage: get_mission_data [-h] [--all] [--file FILE] [--dir DIR] [--tags [TAGS]]
[--instruments [INSTRUMENTS]] [--missions [MISSIONS]]

optional arguments:
-h, --help show this help message and exit
--all, -a Download all products.
--file FILE, -f FILE Override default data.json by providing path to custom
data.json file.
--dir DIR, -d DIR Directory to place test data products in.
--tags [TAGS [TAGS ...]], -t [TAGS [TAGS ...]]
--tags [TAGS], -t [TAGS]
Retrieve products whose tags match those provided
here.
--instruments [INSTRUMENTS], -i [INSTRUMENTS]
Get products by instrument
--missions [MISSIONS], -m [MISSIONS]
Get products by mission

To get a copy of a subset of ``data.json``::

get_mission_json

Additional usage options are shown below::

usage: get_mission_json [-h] [--all] [--file FILE] [--dir DIR] [--tags [TAGS]]
[--instruments [INSTRUMENTS]] [--missions [MISSIONS]]

optional arguments:
-h, --help show this help message and exit
--all, -a Download all products.
--file FILE, -f FILE Override default data.json by providing path to custom
data.json file.
--dir DIR, -d DIR Directory to place test data products in.
--tags [TAGS], -t [TAGS]
Retrieve products whose tags match those provided
here.
--instruments [INSTRUMENTS], -i [INSTRUMENTS]
Get products by instrument
--missions [MISSIONS], -m [MISSIONS]
Get products by mission


Description
------------

Running ``get_mission_data`` will do the following
Running ``get_mission_data`` will do the following:

* If ``tests`` directory exists it will create ``tests/mission_data`` if
necessary. If ``tests`` does not exist, it will just create
``mission_data`` in the current directory.
* The data prodcuts tagged to be ``core`` products will be downloaded
into the download directory.

Only products which do not exist in the download directory will be
downloaded.
* Use the ``-a`` or ``--all`` flag to get all the images. This, however, is NOT
recommended for you will download over 200 images and labels.
* The ``-t`` or ``--tags`` will retrieve products matched with the supplied tag.
To give multiple tags, use the flag multiple times.
* The ``-d`` or ``--dir`` flag can be used to save the images in a new custom
location.
* If there exists a custom ``data.json`` locally and you would rather use that
file to download images rather than the default, use the ``-f`` or
``--file`` flag and then the path to the ``data.json``. This is especially
useful if there are test images needed that do not exist in or are not
part of the ``core`` in the default ``data.json`` (see ``get_mission_json``
below).
* To get products by mission use the ``--mission`` or ``-m`` flag. This will
download all the products from the given mission, even non ``core`` products,
unless explicity given ``core`` as a tag. To specify multiple missions, use
the flag multiple times. You must spell the mission the same as spelled in
`Missions and Instruments`_ (case matters!).
* To get products by instruments use the ``--instruments`` or ``-i`` flag. This
will download all the products from the given instrument, even non ``core``
products, unless explicity given ``core`` as a tag. To specify multiple
instruments, use the flag multiple times. You must spell the instrument the
same as spelled in `Missions and Instruments`_ (case matters!).
* Only products which do not exist in the download directory will be downloaded.

Running ``get_mission_json`` will do the following:

* Create a copy of ``data.json`` in the ``tests`` or ``test`` directory. This
will just be the ``core`` data by default. The purpose of getting a copy of
the ``data.json`` is so it is easier to include images in respective
projects that are not included in the default ``data.json``. Then developers
can use the ``-f`` flag on ``get_mission_data`` (see above) to use this
custom ``data.json``.
* If ``data.json`` already exists, an exception is raised.
* The same flags apply to ``get_mission_json`` as ``get_mission_data``.

Mission Data
-------------

The PDS mission data included in the package can be found here::
.. _here: https://github.com/planetarypy/planetary_test_data/blob/master/planetary_test_data/data.json

The PDS mission data included in the package can be found here_.

The following are core products:

https://github.com/planetarypy/planetary_test_data/blob/master/planetary_test_data/data.json
* 0047MH0000110010100214C00_DRCL.IMG
* 0047MH0000110010100214C00_DRCL.LBL
* 1p134482118erp0902p2600r8m1.img
* 1p190678905erp64kcp2600l8c1.img
* 2p129641989eth0361p2600r8m1.img
* 2m132591087cfd1800p2977m2f1.img
* h58n3118.img
* r01090al.img

If there are products you think should be included or removed from this dataset
please file a Github issue.
please file a Github issue. New images should be images from instruments that
are not already included or different file types (i.e. EDR vs RDR). New core
images should be distinctly different than the ones that exist and would expose
test and/or edge cases for multiple PlanetaryPy projects/affiliates. For
example, if there was not an RGB image included in the core products (which
there is), then that would test image would expose an edge case for many
projects. However, it is best to use ``get_mission_json`` to get a copy of
``data.json``, add the desired test images to that json file, and then download
images using ``get_mission_data -f path/to/data.json``. We recommend using a
``make test`` command to get the proper mission data before testing.

data.json Format
-----------------
Expand All @@ -106,4 +183,104 @@ Below is a sample snippet of a ``data.json`` entry::
"label": "PDS3",
"opens": "True",
"url": "http://pds-imaging.jpl.nasa.gov/data/mer/opportunity/mer1mo_0xxx/data/sol1918/edr/1m298459885effa312p2956m2m1.img"
},
},


Missions and Instruments
------------------------

The following missions and their instruments have products available for
testing:

* 2001 Mars Odyssey
* Thermal Emission Imaging System
* Cassini
* Cassini Radar
* Imaging Science Subsystem
* Imaging Science Subsystem Narrow Angle
* Visual And Infrared Mapping Spectrometer
* Chandrayaan-1
* Context Camera
* High Resolution Imaging Science Experiment
* Mars Color Imager
* Moon Mineralogy Mapper
* Clementine
* High Resolution Camera
* Long Wave Infrared Camera
* Nearinfrared Camera
* Ultraviolet/Visible (Uv/Vis) Camera
* Ultraviolet/Visible Camera
* ESA Mars Express
* High Resolution Stereo Camera
* Galileo
* Near-Infrared Mapping Spectrometer
* Solid_State_Imaging
* Lunar Reconnaissance Orbiter
* Lunar Reconnaissance Orbiter Camera
* Lyman Alpha Mapping Project
* Mid Infrared Camera 1
* Mid Infrared Camera 2
* Near Infrared Camera 1
* Near Infrared Camera 2
* Near Infrared Spectrometer 1
* Near Infrared Spectrometer 2
* Total Luminance Photometer
* Visible Camera
* Visible Spectrometer
* MESSENGER
* Mercury Dual Imaging System Narrow Angle Camera
* Mercury Dual Imaging System Narrow Angle Camera, Mercury Dual Imaging System Wide Angle Camera
* Mercury Dual Imaging System Wide Angle Camera
* Magellan
* Global Topography Data Record
* Radar
* Radar System
* Synthetic-Aperture Radar
* Mariner 10
* Mariner 10
* Mariner 9
* Imaging Science Subsystem
* Mars Exploration Rover
* Alpha Particle X-Ray Spectrometer
* Descent Camera
* Front Hazard Avoidance Camera Left
* Front Hazard Avoidance Camera Right
* Hazard Avoidance Camera
* Microscopic Imager
* Moessbauer Spectrometer
* Navigation Camera
* Navigation Camera Left
* Panoramic Camera
* Panoramic Camera Left
* Panoramic Camera Right
* Panoromic Camera
* Rock Abrasion Tool
* Mars Global Surveyor
* Mars Orbiter Camera - Wide Angle
* Mars Orbiter Camera Wide Angle
* Near Infrared Mapping Spectrometer
* Mars Pathfinder
* Alpha X-Ray Spectrometer
* Alpha X-Ray Spectrometer (Apxs)
* Atmospheric Structure Instrument / Meteorology Package
* Imager For Mars Pathfinder
* Rover Camera Left
* Mars Science Laboratory
* Front Hazard Avoidance Camera Left String B
* Mars Descent Imager Camera
* Mars Hand Lens Imager Camera
* Mast Camera Left
* Navigation Camera Left String A
* Phoenix
* Optical Microscope
* Robotic Arm Camera
* Surface Stereo Imager
* Viking Lander
* Camera_1
* Camera_2
* Viking Orbiter
* Viking Visual Imaging Subsystem
* Visual_Imaging_Subsystem_Camera_A, Visual_Imaging_Subsystem_Camera_B
* Voyager
* Imaging Science Subsystem
* Imaging Science Subsystem - Narrow Angle Camera
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
sys.path.insert(0, project_root)

import planetary_test_data
import sphinx_rtd_theme

# -- General configuration ---------------------------------------------

Expand Down Expand Up @@ -111,7 +112,9 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# html_theme = 'default'
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
Expand Down
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
contain the root `toctree` directive.

Welcome to Planetary Test Data's documentation!
======================================
===============================================

Contents:

Expand All @@ -14,6 +14,7 @@ Contents:
readme
installation
usage
planetary_test_data
contributing
authors
history
Expand Down
Loading