Skip to content

Commit c6afb41

Browse files
authored
Merge pull request #54 from rstoneback/develop
v1.0 Release
2 parents 7711872 + 2c29978 commit c6afb41

48 files changed

Lines changed: 6044 additions & 8004 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will install Python dependencies, run tests and lint with a
2+
# variety of Python versions. For more information see:
3+
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
4+
5+
name: Documentation Check
6+
7+
on: [push, pull_request]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: [3.9]
17+
18+
name: Documentation tests
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -r test_requirements.txt
30+
pip install -r requirements.txt
31+
32+
- name: Set up pysat
33+
run: |
34+
mkdir pysatData
35+
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
36+
37+
- name: Check documentation build
38+
run: sphinx-build -E -b html docs dist/docs
39+
40+
# - name: Check documentation links
41+
# run: sphinx-build -b linkcheck docs dist/docs
42+
43+
- name: Load .zenodo.json to check for errors
44+
run: python -c "import json; json.loads(open('.zenodo.json').read())"

.github/workflows/main.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This workflow will install Python dependencies, run tests and lint with a
2+
# variety of Python versions. For more information see:
3+
# https://help.github.com/actions/language-and-framework-guides/
4+
# using-python-with-github-actions
5+
6+
name: Pytest with Flake8
7+
8+
on: [pull_request, push]
9+
10+
jobs:
11+
build:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest]
16+
python-version: ["3.9", "3.10"]
17+
numpy_ver: [latest]
18+
include:
19+
- python-version: "3.8"
20+
numpy_ver: "1.19"
21+
os: "ubuntu-latest"
22+
23+
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }}
24+
runs-on: ${{ matrix.os }}
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
32+
- name: Install standard dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -r test_requirements.txt
36+
pip install -r requirements.txt
37+
38+
- name: Install NEP29 dependencies
39+
if: ${{ matrix.numpy_ver != 'latest'}}
40+
run: |
41+
pip install --no-binary :numpy: numpy==${{ matrix.numpy_ver }}
42+
43+
- name: Set up pysat
44+
run: |
45+
mkdir pysatData
46+
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
47+
48+
- name: Test PEP8 compliance
49+
run: flake8 . --count --select=D,E,F,H,W --show-source --statistics
50+
51+
- name: Evaluate complexity
52+
run: flake8 . --count --exit-zero --max-complexity=10 --statistics
53+
54+
- name: Run OMMBV setup.py
55+
run: |
56+
python setup.py develop
57+
58+
- name: Run unit and integration tests
59+
run: pytest --cov=OMMBV/
60+
61+
- name: Publish results to coveralls
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
run: coveralls --rcfile=setup.cfg --service=github

.readthedocs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/conf.py
11+
12+
# Build documentation with MkDocs
13+
#mkdocs:
14+
# configuration: mkdocs.yml
15+
16+
# Optionally build your docs in additional formats such as PDF
17+
formats:
18+
- pdf
19+
20+
# Optionally set the version of Python and requirements
21+
# required to build your docs
22+
python:
23+
version: 3.7
24+
install:
25+
- requirements: docs/requirements.txt
26+

.zenodo.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"creators": [
3+
{
4+
"affiliation": "Stoneris",
5+
"name": "Stoneback, Russell",
6+
"orcid": "0000-0001-7216-4336"
7+
},
8+
{
9+
"affiliation": "Goddard Space Flight Center",
10+
"name": "Klenzing, Jeff",
11+
"orcid": "0000-0001-8321-6074"
12+
},
13+
{
14+
"name": "Iyer, Gayatri"
15+
}
16+
],
17+
"keywords": [
18+
"Magnetosphere",
19+
"Ionosphere",
20+
"Thermosphere",
21+
"Heliophysics",
22+
"Magnetic Field",
23+
"Electric Field"
24+
]
25+
}

CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,42 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [1.0.0] - 2021-12-24
6+
- Updated vector basis algorithm and reduced uncertainty when
7+
scaling ion drifts and electric fields for multipole fields by four orders of magnitude.
8+
- Added support for multiple unit test magnetic fields, from dipole up to octupole.
9+
- Added support for testing vector basis determination with a spherical Earth.
10+
- Improved tolerance checks on vector basis during iteration so outputs better
11+
reflect user settings.
12+
- Improved robustness of vector basis calculation at higher latitudes.
13+
- Updated IGRF step method to slow integration when reaching target altitude
14+
to use user provided step size.
15+
- Allow automatic expansion of `field_line_trace` step_size after many iterations.
16+
- Improved robustness of `apex_location_info` to unreported changes in
17+
`field_line_trace` step_size.
18+
- Added `pole_tol` keyword which specifies how close to vertical local
19+
magnetic field must be to be considered a pole.
20+
- Added `utils.datetimes_to_doubles` a method to calculate year and
21+
fractional day of year for IGRF calls.
22+
- Added keyword `max_steps` to `apex_location_info`
23+
- Corrected normalization error in `magnetic_vector`.
24+
- Deprecated `scalar` input for basis vectors.
25+
- Reduced number of allowed recursive calls for `field_line_trace`
26+
- Moved vector functions to `OMMBV.vector`
27+
- Moved transformation functions to `OMMBV.trans`
28+
- Moved tracing functions to `OMMBV.trace`
29+
- Moved older algorithms not needed for current outputs to `OMMBV.heritage`
30+
- Moved supporting Fortran functions from `OMMBV.igrf13` to `OMMBV.sources`
31+
- Improved robustness of `apex_location_info` to `full_field_line` tracing failures.
32+
- Added support for GitHub Workflows
33+
- Refactored unit testing
34+
- Moved to `setup.cfg`
35+
- Added `.zenodo.json`
36+
- Improved documentation
37+
- Updated docstrings
38+
- Added logo
39+
- Updated testing versions
40+
541
## [0.5.5] - 2021-06-16
642
- Updated setup.py
743
- Added compatibility with pysat v3.x
@@ -13,7 +49,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1349
- Metadata clarity improvements
1450

1551
## [0.5.2] - 2020-06-04
16-
- Fixed bugs coupling the code repo to community services related to the name change from pysatMagvect to OMMBV
52+
- Fixed bugs coupling the code repo to community services related to the name
53+
change from pysatMagvect to OMMBV
1754

1855
## [0.5.0] - 2020-02-01
1956
- Added community documents

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
include OMMBV/version.txt
21
include LICENSE
32
include CONTRIBUTING.md

OMMBV/__init__.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
# -*- coding: utf-8 -*-
2-
import os
3-
here = os.path.abspath(os.path.dirname(__file__))
4-
with open(os.path.join(here, 'version.txt')) as version_file:
5-
__version__ = version_file.read().strip()
6-
del here
2+
"""init routine for OMMBV."""
73

8-
on_rtd = os.environ.get('ONREADTHEDOCS') == 'True'
4+
__version__ = '1.0.0'
95

10-
if not on_rtd:
6+
try:
117
from OMMBV import igrf
12-
else:
13-
igrf = None
8+
from OMMBV import fortran_coords
9+
from OMMBV import sources
10+
except ImportError:
11+
# Warning about lack of import handled in trans
12+
igrf, sources, fortran_coords = None, None, None
13+
14+
from OMMBV import satellite
15+
from OMMBV import trace
16+
from OMMBV import trans
17+
from OMMBV import utils
18+
from OMMBV import vector
1419

1520
from OMMBV import _core
1621
from OMMBV._core import *
17-
from OMMBV import satellite
1822

19-
__all__ = []
23+
from OMMBV import heritage
24+
25+
__all__ = ['heritage', 'satellite', 'trace', 'trans', 'utils', 'vector']

0 commit comments

Comments
 (0)