Skip to content

Commit

Permalink
Merge pull request #93 from aburrell/v2.7.0_rc
Browse files Browse the repository at this point in the history
RC V2.7.0
  • Loading branch information
aburrell authored Dec 31, 2024
2 parents ab78335 + 91810c8 commit 2c25565
Show file tree
Hide file tree
Showing 136 changed files with 6,083 additions and 4,950 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]
python-version: ["3.11"]

env:
FC: gfortran
Expand All @@ -31,7 +31,7 @@ jobs:
run: |
pip install build
python -m build .
pip install -r docs/requirements.txt
pip install .[doc]
- name: Check documentation build
run: sphinx-build -E -b html docs dist/docs
Expand Down
64 changes: 50 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,27 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
numpy-ver: ["latest"]
test_config: ["latest"]
include:
# Support different GA Mac environmnets
- python-version: "3.9"
os: "macos-13"
- python-version: "3.10"
os: "macos-13"
- python-version: "3.11"
os: "macos-latest"
- python-version: "3.12"
os: "macos-latest"
# NEP29 compliance settings
- python-version: "3.10"
numpy-ver: "1.25"
os: "ubuntu-latest"
test_config: "NEP29"

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with Numpy ${{ matrix.numpy-ver }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -25,17 +42,22 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: 'x64'

- name: Install NEP29 dependencies
if: ${{ matrix.test_config == 'NEP29'}}
run: |
pip install numpy==${{ matrix.numpy-ver }}
- name: Install standard and test dependencies
run: pip install build coverage coveralls flake8 numpy pytest
run: pip install --upgrade-strategy only-if-needed .[test]

- name: Install on Linux/Windows
if: ${{ matrix.os != 'macos-latest' }}
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'}}
run: |
python -m build .
pip install -e .
- name: Install on MacOS
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-13' }}
run: |
brew reinstall gcc
python -m build .
Expand All @@ -48,18 +70,32 @@ jobs:
run: flake8 . --count --exit-zero --max-complexity=10 --statistics

- name: Run unit and integration tests
run: coverage run --rcfile=setup.cfg -m pytest
run: pytest --cov=aacgmv2 --cov-report xml

- name: Publish results to coveralls upon success
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coverage combine
coverage report -m
coveralls --rcfile=setup.cfg --service=github
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run=${{ join(matrix.*, '-') }}
parallel: true
format: cobertura
debug: true

- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: dist/*.whl
if-no-files-found: warn

finish:
name: Finish Coverage Analysis
needs: build
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

25 changes: 25 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py


# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- doc
11 changes: 11 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
Changelog
=========

2.7.0 (2024-12-31)
------------------

* Updated C source code to version 2.7
* Updated coefficients for IGRF-14
* Added yaml for ReadTheDocs and moved requirements to pyproject.toml
* Cycled supported Python versions
* Updated GitHub Actions CI to use new Coveralls integration
* Updated documentation to include instructions for future IGRF and C updates
* Removed the deprecated function module

2.6.3 (2023-02-08)
------------------

Expand Down
8 changes: 4 additions & 4 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ further defined and clarified by project maintainers.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project head at angeline.burrell@nrl.navy.mil. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
reported by contacting the project head at angeline.g.burrell.civ@us.navy.mil.
All complaints will be reviewed and investigated and will result in a response
that is deemed necessary and appropriate to the circumstances. The project team
is obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.

Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Overview
|docs| |version| |doi|

This is a Python wrapper for the `AACGM-v2 C library
<http://superdarn.thayer.dartmouth.edu/aacgm.html>`_, which allows
<https://superdarn.thayer.dartmouth.edu/aacgm.html>`_, which allows
converting between geographic and magnetic coordinates. The currently included
version of the C library is 2.6. The package is free software
version of the C library is 2.7. The package is free software
(MIT license). When referencing this package, please cite both the package DOI
and the AACGM-v2 journal article:

Expand Down Expand Up @@ -55,7 +55,7 @@ Documentation

https://aacgmv2.readthedocs.io/en/latest/

http://superdarn.thayer.dartmouth.edu/aacgm.html
https://superdarn.thayer.dartmouth.edu/aacgm.html

Badges
======
Expand Down Expand Up @@ -93,7 +93,7 @@ Badges
:target: https://app.codacy.com/gh/aburrell/aacgmv2?utm_source=github.com&utm_medium=referral&utm_content=aburrell/aacgmv2&utm_campaign=Badge_Grade

.. |codeclimate| image:: https://api.codeclimate.com/v1/badges/91f5a91bf3d9ba90cb57/maintainability.svg
:target: https://codeclimate.com/github/aburrell/aacgmv2
:target: https://codeclimate.com/github/aburrell/aacgmv2/builds
:alt: CodeClimate Quality Status

.. |version| image:: https://img.shields.io/pypi/v/aacgmv2.svg?style=flat
Expand Down
17 changes: 11 additions & 6 deletions aacgmv2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"""
# Imports
from importlib import metadata
from importlib import resources
import logging
import os as _os
from sys import stderr
Expand All @@ -33,11 +35,10 @@
from aacgmv2.wrapper import get_aacgm_coord # noqa F401
from aacgmv2.wrapper import get_aacgm_coord_arr # noqa F401
from aacgmv2 import _aacgmv2 # noqa F401
from aacgmv2 import deprecated # noqa F401
from aacgmv2 import utils # noqa F401

# Define global variables
__version__ = "2.6.3"
__version__ = metadata.version('aacgmv2')

# Define a logger object to allow easier log handling
logger = logging.getLogger('aacgmv2_logger')
Expand All @@ -47,10 +48,14 @@
high_alt_trace = 6378.0 # 1 RE, these are ionospheric coordinates

# Path and filename prefix for the IGRF coefficients
AACGM_v2_DAT_PREFIX = _os.path.join(_os.path.realpath(
_os.path.dirname(__file__)), 'aacgm_coeffs', 'aacgm_coeffs-13-')
IGRF_COEFFS = _os.path.join(_os.path.realpath(_os.path.dirname(__file__)),
'magmodel_1590-2020.txt')
AACGM_v2_DAT_PREFIX = _os.path.join(
_os.path.split(str(resources.path(__package__,
'__init__.py').__enter__()))[0],
'aacgm_coeffs', 'aacgm_coeffs-14-')
IGRF_COEFFS = _os.path.join(
_os.path.split(str(resources.path(__package__,
'__init__.py').__enter__()))[0],
'magmodel_1590-2025.txt')

# If not defined, set the IGRF and AACGM environment variables
__reset_warn__ = False
Expand Down
1 change: 0 additions & 1 deletion aacgmv2/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

def main():
"""Entry point for the script."""

desc = 'Converts between geographical coordinates, AACGM-v2, and MLT'
parser = argparse.ArgumentParser(description=desc)

Expand Down
Loading

0 comments on commit 2c25565

Please sign in to comment.