Skip to content

Commit

Permalink
Merge pull request #81 from aburrell/rc_v2.6.3
Browse files Browse the repository at this point in the history
Release Candidate version 2.6.3
  • Loading branch information
aburrell authored Feb 8, 2023
2 parents fdc1aef + aeab8ec commit ab78335
Show file tree
Hide file tree
Showing 39 changed files with 1,492 additions and 1,674 deletions.
8 changes: 4 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ your test configuration
- [ ] Test B

**Test Configuration**:
* Operating system
* Version number
* Any details about your local setup that are relevant
* Operating system: Hal
* Version number: Python 3.0
* Any details about your local setup that are relevant:

# Checklist:

Expand All @@ -42,4 +42,4 @@ your test configuration
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] Add a note to ``Changelog.rst``, summarising the changes
- [ ] Add yourself to ``AUTHORS.rst``
- [ ] Add yourself to ``AUTHORS.rst`` and ``.zenodo.json``
43 changes: 43 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will install Python dependencies, run tests and lint with a
# variety of Python versions. For more information see:
# https://help.github.com/actions/language-and-framework-guides/
# using-python-with-github-actions

name: Documentation test

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]

env:
FC: gfortran

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

- name: Install standard and test dependencies, then apexpy
run: |
pip install build
python -m build .
pip install -r docs/requirements.txt
- name: Check documentation build
run: sphinx-build -E -b html docs dist/docs

- name: Check documentation links
run: sphinx-build -b linkcheck docs dist/docs

- name: Load .zenodo.json to check for errors
run: python -c "import json; json.loads(open('.zenodo.json').read())"
65 changes: 65 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This workflow will install Python dependencies, run tests and lint with a
# variety of Python versions. For more information see:
# https://help.github.com/actions/language-and-framework-guides/
# using-python-with-github-actions

name: pytest with flake8

on: [push, pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]

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

- name: Install standard and test dependencies
run: pip install build coverage coveralls flake8 numpy pytest

- name: Install on Linux/Windows
if: ${{ matrix.os != 'macos-latest' }}
run: |
python -m build .
pip install -e .
- name: Install on MacOS
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew reinstall gcc
python -m build .
pip install -e .
- name: Test PEP8 compliance
run: flake8 . --count --select=D,E,F,H,W --show-source --statistics

- name: Evaluate complexity
run: flake8 . --count --exit-zero --max-complexity=10 --statistics

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

- 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: Upload wheels
uses: actions/upload-artifact@v3
with:
path: dist/*.whl
if-no-files-found: warn
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

6 changes: 4 additions & 2 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ Authors
=======

* Angeline G. Burrell - https://github.com/aburrell
* Christer van der Meeren
* Karl M. Laundal
* Christer van der Meeren - https://github.com/cmeeren
* Karl M. Laundal - https://github.com/klaundal
* Hugo van Kemenade - https://github.com/hugovk

Thanks
======

* Marina Shmidt - Testing and code review
* Bill Rideout - Testing
* dinsmoro - Testing - https://github.com/dinsmoro
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
Changelog
=========

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

* Moved CI support to GitHub actions
* Added a pyproject.toml for PyPi support
* Updated unit tests to current pytest standards
* Updated links in the documentation
* Improved the documentation style and added docstring tests
* Fixed memory leak in the array C wrappers
* Fixed longitude output format for `convert_mlt`
* Added more examples to the documentation

2.6.2 (2020-01-13)
------------------

Expand Down
31 changes: 12 additions & 19 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ time you have given to improve this project.
Short version
=============

* Submit bug reports and feature requests at `GitHub <https://github.com/aburrell/aacgmv2/issues>`_
* Submit bug reports and feature requests at
`GitHub <https://github.com/aburrell/aacgmv2/issues>`_
* Make pull requests to the ``develop`` branch

Bug reports
Expand Down Expand Up @@ -50,7 +51,11 @@ To set up `aacgmv2` for local development:

git clone [email protected]:your_name_here/aacgmv2.git

3. Create a branch for local development::
3. Build the local code to allow for local Python development::

pip install -e .

4. Create a branch for local development::

git checkout -b name-of-your-bugfix-or-feature

Expand All @@ -62,18 +67,17 @@ To set up `aacgmv2` for local development:
written as normal functions (starting with ``test_``) containing a standard
``assert`` statement for testing output, or use the numpy testing suite.

4. When you're done making changes, run all the checks, doc builder and spell
checker with `tox <https://tox.readthedocs.io/en/latest/install.html>`_ [1]_::
5. When you're done making changes, run the local unit tests using pytest::

tox
python -m pytest

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

git add .
git commit -m "Brief description of your changes"
git push origin name-of-your-bugfix-or-feature

6. Submit a pull request through the GitHub website. Pull requests should be
7. Submit a pull request through the GitHub website. Pull requests should be
made to the ``develop`` branch.

Pull Request Guidelines
Expand All @@ -91,16 +95,5 @@ For merging, you should:

.. [1] If you don't have all the necessary Python versions available locally or
have trouble building all the testing environments, you can rely on
Travis and AppVeyor - they will run the tests for each change you add in
GitHub Actions - it will run the tests for each change you add in
the pull request.
Tips
----

To run a subset of tests::

tox -e envname -- pytest -k test_myfeature

To run all the test environments in parallel (you need to ``pip install detox``)::

detox
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
graft docs
graft ci
graft aacgmv2/tests
graft c_aacgmv2

Expand All @@ -17,7 +16,6 @@ include LICENSE-AstAlg.txt
include README.rst
include CODE_OF_CONDUCT.md

include tox.ini
include *.yml
include .*.yml
include .zenodo.json
Expand Down
26 changes: 11 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,27 @@ Badges
:stub-columns: 1

* - docs
- |docs|
- |docs| |links|
* - tests
- | |travis| |appveyor| |requires|
| |codeclimate| |scrutinizer| |codacy| |coveralls|
- | |ga| |coveralls|
| |codeclimate| |scrutinizer| |codacy|
* - package
- | |version| |supported-versions|
| |wheel| |supported-implementations|
.. |docs| image:: https://readthedocs.org/projects/aacgmv2/badge/?version=latest
:target: https://aacgmv2.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
:alt: RTD Documentation Status

.. |travis| image:: https://api.travis-ci.org/aburrell/aacgmv2.svg?branch=main
:alt: Travis-CI Build Status
:target: https://travis-ci.org/github/aburrell/aacgmv2
.. |links| image:: https://github.com/aburrell/aacgmv2/actions/workflows/docs.yml/badge.svg
:target: https://github.com/aburrell/aacgmv2/actions/workflows/docs.yml
:alt: GitHub Actions Documentation Status

.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/qo01t2obf7bscveu?svg=true
:alt: AppVeyor Build Status
:target: https://ci.appveyor.com/project/aburrell/aacgmv2
.. |ga| image:: https://github.com/aburrell/aacgmv2/actions/workflows/main.yml/badge.svg
:alt: GitHub Actions-CI Build Status
:target: https://github.com/aburrell/aacgmv2/actions/workflows/main.yml

.. |requires| image:: https://requires.io/github/aburrell/aacgmv2/requirements.svg?branch=main
:alt: Requirements Status
:target: https://requires.io/github/aburrell/aacgmv2/requirements/?branch=main

.. |coveralls| image:: https://coveralls.io/repos/github/aburrell/aacgmv2/badge.svg
.. |coveralls| image:: https://s3.amazonaws.com/assets.coveralls.io/badges/coveralls_97.svg
:alt: Coverage Status (Coveralls)
:target: https://coveralls.io/github/aburrell/aacgmv2

Expand Down
25 changes: 14 additions & 11 deletions aacgmv2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
# the root in the LICENSE file
#
# -*- coding: utf-8 -*-
""" Functions to convert between geographic/geodetic and AACGM-V2 magnetic
coordinates
"""Conversion functions between geo-graphic/detic and AACGM-V2 magnetic coords.
Attributes
---------------------------------------------------------------------------
----------
logger : (logger)
Logger handle
high_alt_coeff : (float)
Expand All @@ -26,15 +25,19 @@
import os as _os
from sys import stderr

from aacgmv2.wrapper import (convert_latlon, convert_mlt, get_aacgm_coord)
from aacgmv2.wrapper import (convert_latlon_arr, get_aacgm_coord_arr)
from aacgmv2.wrapper import (convert_bool_to_bit, convert_str_to_bit)
from aacgmv2 import (utils)
from aacgmv2 import (deprecated)
from aacgmv2 import (_aacgmv2)
from aacgmv2.wrapper import convert_bool_to_bit # noqa F401
from aacgmv2.wrapper import convert_latlon # noqa F401
from aacgmv2.wrapper import convert_latlon_arr # noqa F401
from aacgmv2.wrapper import convert_mlt # noqa F401
from aacgmv2.wrapper import convert_str_to_bit # noqa F401
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.2"
__version__ = "2.6.3"

# Define a logger object to allow easier log handling
logger = logging.getLogger('aacgmv2_logger')
Expand All @@ -43,7 +46,7 @@
high_alt_coeff = 2000.0 # Tested and published in Shepherd (2014)
high_alt_trace = 6378.0 # 1 RE, these are ionospheric coordinates

# path and filename prefix for the IGRF coefficients
# 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__)),
Expand Down
Loading

0 comments on commit ab78335

Please sign in to comment.