Skip to content

Commit

Permalink
Merge pull request #247 from pysat/rc_0_0_6
Browse files Browse the repository at this point in the history
Pull RC 0.0.6 back into develop
  • Loading branch information
jklenzing authored Oct 7, 2024
2 parents 0972945 + f306c96 commit 01aa488
Show file tree
Hide file tree
Showing 29 changed files with 406 additions and 216 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:

name: Documentation tests
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
70 changes: 17 additions & 53 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
numpy_ver: "1.24"
os: ubuntu-latest
test_config: "NEP29"
- python-version: "3.6.8"
numpy_ver: "1.19.5"
- python-version: "3.9"
numpy_ver: "1.23.5"
os: "ubuntu-20.04"
test_config: "Ops"

name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -40,18 +40,8 @@ jobs:
- name: Install Operational dependencies
if: ${{ matrix.test_config == 'Ops'}}
run: |
sudo apt-get install libhdf5-serial-dev netcdf-bin libnetcdf-dev
pip install --no-cache-dir numpy==${{ matrix.numpy_ver }}
pip install "cdflib<1.0"
pip install -r requirements.txt
pip install -r test_requirements.txt
cd ..
git clone https://github.com/pysat/pysat.git
cd pysat
git checkout pip_rc_install
python setup.py develop
cd ../pysatNASA
pip install .
pip install --upgrade-strategy only-if-needed .[test]
- name: Install NEP29 dependencies
if: ${{ matrix.test_config == 'NEP29'}}
Expand All @@ -78,46 +68,20 @@ jobs:
- name: Test with pytest
run: pytest

- name: Coveralls Parallel (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz
./coveralls report --parallel --repo-token=${{ secrets.COVERALLS_REPO_TOKEN }} --build-number ${{ github.run_number }}
- name: Coveralls Parallel (Windows)
if: startsWith(matrix.os, 'windows')
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
curl -L https://github.com/coverallsapp/coverage-reporter/releases/latest/download/coveralls-windows.exe -o coveralls.exe
./coveralls.exe report --parallel --repo-token=${{ secrets.COVERALLS_REPO_TOKEN }} --build-number ${{ github.run_number }}
- name: Coveralls Parallel (MacOS)
if: startsWith(matrix.os, 'macos')
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
brew tap coverallsapp/coveralls --quiet
brew install coveralls --quiet
ls -lh .coverage
ls -lh coverage.xml
coveralls report coverage.xml --format=cobertura --verbose --parallel --repo-token=${{ secrets.COVERALLS_REPO_TOKEN }} --build-number ${{ github.run_number }} --debug --dry-run
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true

finish:
name: Finish Coverage Analysis
needs: build
if: always()
runs-on: "ubuntu-latest"
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finish
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz
./coveralls done --build-number ${{ github.run_number }}
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true

4 changes: 2 additions & 2 deletions .github/workflows/pip_rc_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/pysat_rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -42,20 +42,20 @@ jobs:
- name: Test with pytest
run: pytest

- name: Publish results to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
run: coveralls --rcfile=pyproject.toml --service=github
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true

finish:
name: Finish Coverage Analysis
needs: build
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install --upgrade coveralls
coveralls --service=github --finish
uses: coverallsapp/github-action@v2
with:
parallel-finished: true

16 changes: 11 additions & 5 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"atmosphere",
"thermosphere",
"magnetosphere",
"mars",
"heliosphere",
"observations",
"models",
Expand All @@ -18,16 +19,16 @@
"name": "Klenzing, Jeff",
"orcid": "0000-0001-8321-6074"
},
{
"affiliation": "Cosmic Studio",
"name": "Stoneback, Russell",
"orcid": "0000-0001-7216-4336"
},
{
"affiliation": "U.S. Naval Research Laboratory",
"name": "Burrell, Angeline G.",
"orcid": "0000-0001-8875-9326"
},
{
"affiliation": "Cosmic Studio",
"name": "Stoneback, Russell",
"orcid": "0000-0001-7216-4336"
},
{
"affiliation": "Catholic University of America, Goddard Space Flight Center",
"name": "Smith, Jonathon",
Expand All @@ -43,6 +44,11 @@
"name": "Esman, Teresa",
"orcid": "0000-0003-0382-6281"
},
{
"affiliation": "Universities Space Research Association, Goddard Space Flight Center",
"name": "Govada, Aadarsh",
"orcid": "0009-0004-7873-5899"
},
{
"affiliation": "Predictive Science",
"name": "Pembroke, Asher"
Expand Down
1 change: 1 addition & 0 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Missions
- NASA Scintillation Observations and Response of the Ionosphere to
Electrodynamics (SORTIE)
- NASA Scintillation Prediction Observations Research Task (SPORT)
- NOAA Constellation Observing System for Meteorology Ionosphere and Climate (COSMIC-2)

Disclaimers
===========
Expand Down
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## [0.0.6] - 2024-XX-XX
## [0.0.6] - 2024-10-03
* New Instruments
* DE2 VEFIMAGB - electric and magnetic field on the same cadence
* MAVEN mag
* MAVEN MAG
* MAVEN SEP
* MAVEN in situ key parameters
* REACH Dosimeter
Expand All @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Allow files to be unzipped after download
* Added custom `concat_data` method to JHUAPL methods, for TIMED-GUVI and
DMSP-SSUSI data
* Added time-dependent, file format function for DMSP SSUSI to DMSP methods
* Added cleaning to TIMED-GUVI SDR imaging data
* Bug Fixes
* Fix general clean routine to skip transformation matrices
Expand All @@ -23,10 +24,13 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Allow graceful failure with no files in jhuapl load functions
* New window needs to be integer for calculate_imf_steadiness
* Fixed a bug where cdas_download may drop the requested end date file
* Reverted the coveralls integration to the GitHub service for MacOS runs
* Fixed a bug where cdas_list_remote_files errored without remote data
* Documentation
* Added example of how to export data for archival
* Updated documentation refs
* Add keywords to zenodo
* Fixed broken links
* Deprecations
* Deprecated '' tag for de2_vefi module, support moved to de2_vefimagb
* Maintenance
Expand All @@ -38,6 +42,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Added version cap for sphinx_rtd_theme
* Include standard tests for ICON IVM-B
* Update NEP29 standards for Jun 2024
* Updated standards for pandas, numpy, and pysat
* Updated versions in GitHub Actions
* Implement coveralls app in GitHub Actions
* Cycled Operational Environment testing

## [0.0.5] - 2023-06-27
* New Instruments
Expand Down
6 changes: 5 additions & 1 deletion docs/archival.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ preferred formats. An example of this is:
In this case, note that the pysat 'name' label is output to three different
metadata values required by the ITSP standards. Additionally, the
:py:attr:`export_pysat_info` option is set to false here. This drops several
internal :py:mod:`pysat` metadata values before writing to file.
internal :py:mod:`pysat` metadata values before writing to file. Note that
this includes the default acknowledgements and references objects. These
are set manually to avoid conflicts between the original dataset and the
new dataset, as well as keeping in line with requirements with potentially
different data servers. An example can be found in the [REACH Operational Software](https://github.com/jklenzing/ops_reach/blob/main/ops_reach/instruments/methods/reach.py).

A full guide to SPDF metadata standards can be found
`at SPDF <https://spdf.gsfc.nasa.gov/istp_guide/istp_guide.html>`_.
Expand Down
6 changes: 4 additions & 2 deletions docs/supported_instruments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ DMSP SSUSI

FORMOSAT-1 IVM
--------------
Note that the Ion Velocity Meter data product is managed here since the repository is
at CDAWeb. For other FORMOSAT-X data products, please see pysatCDAAC.

.. automodule:: pysatNASA.instruments.formosat1_ivm
:members:
Expand Down Expand Up @@ -188,8 +190,8 @@ JPL GPS

.. _maven_insitu_kp:

MAVEN INSITU KP
---------------
MAVEN IN SITU KP
----------------

.. automodule:: pysatNASA.instruments.maven_insitu_kp
:members:
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pysatNASA"
version = "0.0.5"
version = "0.0.6"
description = "pysat support for NASA Instruments"
readme = "README.md"
requires-python = ">=3.6"
Expand Down Expand Up @@ -44,7 +44,7 @@ dependencies = [
"netCDF4",
"numpy",
"pandas",
"pysat >= 3.1",
"pysat >= 3.2",
"requests",
"scipy >= 1.4",
"xarray"
Expand All @@ -53,7 +53,6 @@ dependencies = [
[project.optional-dependencies]
pysatcdf = ["pysatCDF"]
test = [
"coveralls",
"flake8",
"flake8-docstrings",
"hacking >= 1.0",
Expand Down Expand Up @@ -84,6 +83,7 @@ markers = [
"download",
"no_download",
"load_options",
"new_tests",
"first",
"second"
]
2 changes: 1 addition & 1 deletion pysatNASA/instruments/cnofs_vefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
spacecraft is to enable an accurate V x B measurement along the spacecraft
trajectory. In order to provide an in-flight calibration of the magnetic field
data, we compare the most recent POMME model (the POtsdam Magnetic Model of the
Earth, https://geomag.us/models/pomme5.html) with the actual magnetometer
Earth, https://geomag.org/models/pomme5.html) with the actual magnetometer
measurements to help determine a set of calibration parameters for the gains,
offsets, and non-orthogonality matrix of the sensor axes. The calibrated
magnetic field measurements are provided in the data file here. The VEFI
Expand Down
14 changes: 11 additions & 3 deletions pysatNASA/instruments/de2_vefi.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@
tag
'', 'dca', 'ac'
inst_id
none supported
None supported
Warnings
--------
- Currently no cleaning routine.
- The deprecated '' tag will drop the E-field data. To use this data
product, please use the new de2_vefimagb instrument.
"""
Expand Down Expand Up @@ -133,7 +135,9 @@ def load(fnames, tag='', inst_id='', **kwargs):
inst_id : str
Instrument ID used to identify particular data set to be loaded.
This input is nominally provided by pysat itself. (default='')
**kwargs : unpacked dict
Optional kwargs that will be passed to the
`pysatNASA.instruments.methods.cdaweb.load_xarray` function
Returns
-------
data : pds.DataFrame
Expand All @@ -146,12 +150,16 @@ def load(fnames, tag='', inst_id='', **kwargs):
Several variables relating to time stored in different formats are dropped.
These are redundant and complicate the load procedure.
See Also
--------
pysatNASA.instruments.methods.cdaweb.load_xarray
"""

if tag == '':
# Warn user that e-field data is dropped.
estr = 'E-field data dropped'
pysat.logger.warn(estr)
pysat.logger.warning(estr)

# Drop E-field data
if 'use_cdflib' in kwargs.keys():
Expand Down
2 changes: 1 addition & 1 deletion pysatNASA/instruments/de2_vefimagb.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

# Set the load routine
def load(fnames, tag='', inst_id='', **kwargs):
"""Load DE2 VEFI data.
"""Load DE2 VEFI MAG B-field data.
This routine is called as needed by pysat. It is not intended
for direct user interaction.
Expand Down
Loading

0 comments on commit 01aa488

Please sign in to comment.