Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.14"]

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

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.13"]
python-version: ["3.10", "3.13", "3.14"]
numpy_ver: ["latest"]
test_config: ["latest"]
include:
Expand All @@ -34,9 +34,9 @@ jobs:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -52,6 +52,9 @@ jobs:
pip install numpy==${{ matrix.numpy_ver }}
pip install --upgrade-strategy only-if-needed .[test]

- name: Install pysat RC
run: pip install --no-deps --pre -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysat

- name: Install standard dependencies
if: ${{ matrix.test_config == 'latest'}}
run: pip install .[test]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pip_rc_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.12"] # Keep this version at the highest supported Python version
python-version: ["3.14"] # Keep this version at the highest supported Python version

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

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pysat_rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.12"]
python-version: ["3.14"]

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

Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

[0.2.3] - 2026-XX-XX
--------------------
* Maintenance
* Updated GitHub Action versions
* Added support for Python 3.14
* Switched from `m2r2` to `myst_parser`
* Bugs
* Fixed the labels in the documentation to avoid duplicates
* Updated the link locations in downloads and documentation for GFZ
* Updated the SPWC 45-day forecast filename

[0.2.2] - 2025-10-17
--------------------
* Maintenance
Expand Down
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ version 1.4, available at
For answers to common questions about this code of conduct, see
[https://www.contributor-covenant.org/faq][faq]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
[homepage]: https://www.contributor-covenant.org/
[version]: https://www.contributor-covenant.org/version/1/4/
[faq]: https://www.contributor-covenant.org/faq
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Development

To set up `pysatSpaceWeather` for local development:

1. [Fork pysatSpaceWeather on GitHub](https://github.com/pysat/pysatSpaceWeather/fork>).
1. [Fork pysatSpaceWeather on GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).

2. Clone your fork locally:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ give some examples on how to use the routines.

pysatSpaceWeather uses common Python modules, as well as modules developed by
and for the Space Physics community. This module officially supports
Python 3.9+.
Python 3.10+.

| Common modules | Community modules |
| -------------- | ----------------- |
Expand Down
3 changes: 2 additions & 1 deletion docs/acknowledgements.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.. mdinclude:: ../ACKNOWLEDGEMENTS.md
.. include:: ../ACKNOWLEDGEMENTS.md
:parser: myst_parser.sphinx_
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'numpydoc',
'm2r2']
'myst_parser']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
Expand All @@ -65,7 +65,7 @@
author = ', '.join([auth['name'] for auth in zenodo['creators']])
description = 'Tools for space weather indices.'
category = 'Space Physics'
copyright = ', '.join(['2024', author])
copyright = ', '.join(['2026', author])

# The short X.Y version
version = info.project['version'].base_version
Expand Down Expand Up @@ -182,4 +182,5 @@
# Links to ignore when checking for stability
linkcheck_ignore = ['https://lasp.colorado.edu/space_weather/dsttemerin/',
'https://*QUERY',
'https://zenodo.org',
'https://datapub.gfz-potsdam.de/download/10.5880.Kp.0001/*']
3 changes: 2 additions & 1 deletion docs/develop_guide/code_of_conduct.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.. mdinclude:: ../../CODE_OF_CONDUCT.md
.. include:: ../../CODE_OF_CONDUCT.md
:parser: myst_parser.sphinx_
3 changes: 2 additions & 1 deletion docs/develop_guide/contributing.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.. mdinclude:: ../../CONTRIBUTING.md
.. include:: ../../CONTRIBUTING.md
:parser: myst_parser.sphinx_
3 changes: 2 additions & 1 deletion docs/history.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.. _hist:

.. mdinclude:: ../CHANGELOG.md
.. include:: ../CHANGELOG.md
:parser: myst_parser.sphinx_
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Prerequisites

pysatSpaceWeather uses common Python modules, as well as modules developed by
and for the Space Physics community. This module officially supports
Python 3.9+.
Python 3.10+.

============== =================
Common modules Community modules
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
m2r2
myst_parser
numpydoc
pysat
35 changes: 19 additions & 16 deletions docs/supported_instruments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Supports ACE Solar Wind Electron Proton Alpha Monitor data.


.. _norp-inst:

NoRP
----

Expand All @@ -91,6 +92,7 @@ and is updated to extend to the current period, but not in real-time.


.. _sw-inst:

SW
---

Expand Down Expand Up @@ -126,24 +128,24 @@ AL

AL is an auroral electrojet index that reflects the lower envelope, the negative
peak of the electroject currents at Earth. Real-time predictions (last 96
hours) are provided by
`LASP <https://lasp.colorado.edu/space_weather/dsttemerin/dsttemerin.html>`_.
hours) are provided by the
`LASP repository <https://lasp.colorado.edu/space_weather/dsttemerin/dsttemerin.html>`_.


.. automodule:: pysatSpaceWeather.instruments.sw_al
:members:


.. _sw-al-inst:
.. _sw-au-inst:


AU
^^^

AU is an auroral electrojet index that reflects the upper envelope, the positive
peak of the electroject currents at Earth. Real-time predictions (last 96
hours) are provided by
`LASP <https://lasp.colorado.edu/space_weather/dsttemerin/dsttemerin.html>`_.
hours) are provided at the
`LASP page <https://lasp.colorado.edu/space_weather/dsttemerin/dsttemerin.html>`_.


.. automodule:: pysatSpaceWeather.instruments.sw_au
Expand All @@ -157,8 +159,8 @@ Ap

Ap is a geomagnetic index that reflects the magnitude of geomagnetic
disturbances at Earth but unlike Kp uses a linear scale. Historic, recent
(last 30 days), and forecasted values are available from
`GFZ <https://www.gfz-potsdam.de/en/kp-index/>`_ and the
(last 30 days), and forecasted values are available from the
`GFZ Kp <https://kp.gfz.de/en/>`_ and the
`SWPC Forecasts page <https://www.swpc.noaa.gov/forecasts>`_.


Expand All @@ -173,8 +175,8 @@ apo

apo is a linear (half)-hourly, planetary, open-ended, geomagnetic index that
reflects the magnitude of geomagnetic disturbances at Earth. It is like Ap but
does not have an upper limit. Values from 1995 onwards are available from
`GFZ <https://kp.gfz-potsdam.de/en/hp30-hp60>`_.
does not have an upper limit. Values from 1995 onwards are available from the
`GFZ Hpo page <https://kp.gfz.de/en/hp30-hp60>`_.


.. automodule:: pysatSpaceWeather.instruments.sw_apo
Expand All @@ -189,8 +191,7 @@ Cp
Cp is a derivative geomagnetic index that provides a qualitative estimate of the
overall level of magnetic activity for the day. The C9 index provides the same
information on a scale from 0-9 instead of 0.0-2.5. Historic values are
available from
`GFZ <https://spaceweather.gfz-potsdam.de/products-data/nowcasts/nowcast-kp-index/geomagnetic-indices-ap-ap-cp-and-c9-derivative-indices>`_.
available from the `GFZ Kp page <https://kp.gfz.de/en/>`_.


.. automodule:: pysatSpaceWeather.instruments.sw_cp
Expand All @@ -207,7 +208,7 @@ associated with the ring current. The National Centers for Environmental
Information (NCEI), formerly the National Geophysical Data Center (NGDC),
maintains the current database from which the historic Dst is downloaded.
`LASP <https://lasp.colorado.edu/space_weather/dsttemerin/dsttemerin.html>`_
performs the calculates and provides the predicted Dst for the last 96 hours.
performs the calculations and provides the predicted Dst for the last 96 hours.
You can learn more about the Dst Index at the
`WDC Kyoto Observatory page <http://wdc.kugi.kyoto-u.ac.jp/dstdir/index.html>`_.

Expand All @@ -224,7 +225,8 @@ F \ :sub:`10.7`\
F \ :sub:`10.7`\ is the 10.7 cm radio solar flux (measured in solar flux units,
sfu) `[Cortie 1912] <http://adsabs.harvard.edu/full/1912MNRAS..73...52C>`_.
Historic indices, real-time indices, and forecasted indices are available from
`LASP <https://lasp.colorado.edu/lisird/data/noaa_radio_flux/>`_ and the
the
`LASP F107 <https://lasp.colorado.edu/lisird/data/noaa_radio_flux/>`_ and the
`SWPC F107 page <https://www.swpc.noaa.gov/phenomena/f107-cm-radio-emissions>`_.


Expand Down Expand Up @@ -254,8 +256,8 @@ Hpo

Hpo is a (half)-Hourly, planetary, open-ended, geomagnetic index that
reflects the magnitude of geomagnetic disturbances at Earth. It is like Kp but
does not have an upper limit. Values from 1995 onwards are available from
`GFZ <https://kp.gfz-potsdam.de/en/hp30-hp60>`_.
does not have an upper limit. Values from 1995 onwards are available from the
`GFZ Hp30 and Hp60 page <https://kp.gfz.de/en/hp30-hp60>`_.


.. automodule:: pysatSpaceWeather.instruments.sw_hpo
Expand All @@ -270,7 +272,8 @@ Kp

Kp is a geomagnetic index that reflects the magnitude of geomagnetic
disturbances at Earth. Historic, recent (last 30 days), and forecasted values
are available from `GFZ <https://www.gfz-potsdam.de/en/kp-index/>`_, and the
are available from the
`GFZ Kp repository <https://www.gfz-potsdam.de/en/kp-index/>`_, and the
`SWPC Kp page <https://www.swpc.noaa.gov/products/planetary-k-index>`_.


Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pysatSpaceWeather"
version = "0.2.2"
description = 'pysat support for Space Weather Indices'
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
license = {file = "LICENSE"}
authors = [
{name = "Angeline Burrell", email = "pysat.developers@gmail.com"}
Expand All @@ -25,6 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows"
Expand Down Expand Up @@ -59,7 +60,7 @@ test = [
doc = [
"extras_require",
"ipython",
"m2r2",
"myst_parser",
"numpydoc",
"pyproject_parser",
"sphinx",
Expand Down
4 changes: 2 additions & 2 deletions pysatSpaceWeather/instruments/methods/gfz.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def json_downloads(date_array, data_path, local_file_prefix, local_date_fmt,
mock_download_dir))

# Set the local variables
base_url = "https://kp.gfz-potsdam.de/app/json/"
base_url = "https://kp.gfz.de/app/json/"
time_fmt = "%Y-%m-%dT%H:%M:%SZ"
last_file = ''

Expand Down Expand Up @@ -217,7 +217,7 @@ def kp_ap_cp_download(platform, name, date_array, tag, inst_id, data_path,
mock_download_dir))

# Set the page for the definitive or nowcast Kp
burl = ''.join(['https://datapub.gfz-potsdam.de/download/10.5880.Kp.0001',
burl = ''.join(['https://datapub.gfz.de/download/10.5880.Kp.0001',
'/Kp_', 'nowcast' if tag == 'now' else 'definitive', '/'])
data_cols = ['Bartels_solar_rotation_num', 'day_within_Bartels_rotation',
'Kp', 'daily_Kp_sum', 'ap', 'daily_Ap', 'Cp', 'C9']
Expand Down
4 changes: 2 additions & 2 deletions pysatSpaceWeather/instruments/methods/swpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,11 +856,11 @@ def recent_ap_f107_download(name, date_array, data_path,
# Get the file information
raw_txt = general.get_local_or_remote_text(
'https://services.swpc.noaa.gov/text/', mock_download_dir,
'45-day-ap-forecast.txt')
'45-day-forecast.txt')

if raw_txt is None:
pysat.logger.info("".join(["Data not downloaded for ",
"45-day-ap-forecast.txt, data may have been",
"45-day-forecast.txt, data may have been",
" saved to an unexpected filename."]))
else:
# Parse text to get the date the prediction was generated
Expand Down
4 changes: 2 additions & 2 deletions pysatSpaceWeather/tests/test_methods_kp.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def test_convert_kp_to_ap_fill_val(self):
'3hr_ap'][self.testInst.meta.labels.max_val]

# Test the fill value in the data and metadata
assert np.isnan(self.testInst['3hr_ap'][0])
assert np.isnan(self.testInst[0, '3hr_ap'])
assert np.isnan(self.testInst.meta['3hr_ap'][fill_label])

return
Expand Down Expand Up @@ -657,7 +657,7 @@ def test_combine_kp_no_standard(self):
assert kp_inst.data.columns[0] == 'Kp'
assert (kp_inst.meta['Kp'][kp_inst.meta.labels.fill_val]
== self.combine['fill_val'])
assert len(kp_inst['Kp'][kp_inst['Kp']]
assert len(kp_inst['Kp'].iloc[kp_inst['Kp']]
== self.combine['fill_val']) > 0

del kp_inst, combo_in
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ netCDF4
numpy
packaging
pandas
pysat >= 3.0.4
pysat >= 3.2.0
requests
xarray
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[metadata]
name = pysatSpaceWeather
version = 0.2.2

[flake8]
max-line-length = 80
Expand Down
Loading
Loading