Skip to content

Commit

Permalink
Merge branch 'IMAP-Science-Operations-Center:dev' into mypy_update
Browse files Browse the repository at this point in the history
  • Loading branch information
daralynnrhode authored Aug 8, 2024
2 parents 1aae043 + cb26199 commit 9f4503a
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 3 deletions.
18 changes: 16 additions & 2 deletions docs/source/data-access-api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ The SDC provides a REST API that allows users to upload and download files, as
well as query for file metadata. The following documentation describes the
various endpoints that are supported and how to use them.

The API can be accessed from the following URL: https://api.dev.imap-mission.com

*Note: Several sections and links begin with* [WIP]. *As development on the API is ongoing, this indicates
that the full implementation of the functionality is yet to be completed.*

The API can be accessed from the following URL [WIP]: https://api.dev.imap-mission.com

.. openapi:: openapi.yml
:group:
:include: /upload

When uploading files to the API, ensure these files are stored properly in a ``data`` directory. Then,
ensure your working directory is one level above the ``data`` directory in order to properly upload files.

[WIP] Certain ancillary files can also be uploaded to the API. For more specific information regarding these files, visit
`Ancillary Files <https://imap-processing.readthedocs.io/en/latest/data-access-api/calibration-files.html>`_

**Example Usage:**

.. code-block:: bash
Expand All @@ -45,6 +52,13 @@ The API can be accessed from the following URL: https://api.dev.imap-mission.com
:group:
:include: /download

It is important to note that your working directory will be established as the default directory. I.e, the ``data``
directory--which files are downloaded to--will automatically be placed in this file path. Choose your working directory
accordingly to suit your desires.

When downloading a file from the API, different folders within the ``data`` directory will be made to better
organize the files. See the example file path: ``data/imap/swe/l0/2024/01/imap_swe_l0_sci_20240105_20240105_v00-01.pkts``

**Example Usage:**

.. code-block:: bash
Expand Down
4 changes: 3 additions & 1 deletion docs/source/data-access-api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ paths:
items:
type: string


'/download/{filepath}':
get:
tags:
Expand Down Expand Up @@ -143,7 +144,8 @@ paths:
type: string
- in: query
name: version
description: The version of data product in the format ``vXX-YY`` (e.g. ``v01-01``).
description: The version of data product in the format ``vNNN`` (e.g. ``v001``). You can also choose to
query ``--version latest`` in order to receive the most recent version of a file.
required: false
schema:
type: string
Expand Down
Empty file.
1 change: 1 addition & 0 deletions imap_processing/spice/geometry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Functions for computing geometry using SPICE."""
1 change: 1 addition & 0 deletions imap_processing/spice/kernels.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Functions for furnishing and tracking SPICE kernels."""
1 change: 1 addition & 0 deletions imap_processing/spice/time.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Time conversion functions that rely on SPICE."""
Empty file.
1 change: 1 addition & 0 deletions imap_processing/tests/spice/test_geometry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Tests coverage for imap_processing/spice/geometry.py"""
1 change: 1 addition & 0 deletions imap_processing/tests/spice/test_kernels.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Tests coverage for imap_processing/spice/kernels.py"""
1 change: 1 addition & 0 deletions imap_processing/tests/spice/test_time.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Tests coverage for imap_processing/spice/time.py"""
6 changes: 6 additions & 0 deletions imap_processing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ def packet_file_to_datasets(
-------
datasets : dict
Mapping from apid to xarray dataset, one dataset per apid.
Notes
-----
This function only handles packet definitions with the same variable structure
across all packets with the same ApId. For example, this cannot be used for IDEX
due to the conditional XML structure defined for their science packet.
"""
# Set up containers to store our data
# We are getting a packet file that may contain multiple apids
Expand Down

0 comments on commit 9f4503a

Please sign in to comment.