Skip to content

Commit

Permalink
Merge pull request #137 from aburrell/rc_v0.4.0
Browse files Browse the repository at this point in the history
RC v0.4.0
  • Loading branch information
aburrell authored Jun 7, 2024
2 parents ef05165 + 589089a commit 495ca10
Show file tree
Hide file tree
Showing 66 changed files with 11,353,035 additions and 3,301,451 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,27 @@ on: [push, pull_request]
jobs:
build:

runs-on: ubuntu-latest
runs-on: ["ubuntu-latest"]
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
python-version: ["3.11"]

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

- name: Set CDF Lib environment variable
run: echo "CDF_LIB=$HOME/lib" >> $GITHUB_ENV

- name: Install standard and test dependencies, then ocbpy
- name: Install dependencies
run: |
pip install -r docs/requirements.txt sphinx sphinx_rtd_theme numpydoc
pip install .[doc]
bash requirements.extra 2
python setup.py install
- name: Check documentation build
run: sphinx-build -E -b html docs dist/docs
Expand Down
71 changes: 42 additions & 29 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,16 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
install-extras: [0, 1, 2]
exclude:
- os: windows-latest
install-extras: 2
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
install-extras: [0, 1] # TODO(#129): update to replace extra flag

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

Expand All @@ -37,16 +34,14 @@ jobs:
env:
CDF_LIB: $HOME/lib
run: |
pip install -r requirements.txt
pip install .[test]
bash requirements.extra ${{ matrix.install-extras }}
python setup.py install
- name: Install standard and test dependencies, then ocbpy without SSJ
if: ${{ matrix.install-extras != 2 }}
run: |
pip install -r requirements.txt
pip install .[test]
bash requirements.extra ${{ matrix.install-extras }}
python setup.py install
- name: Test PEP8 compliance
run: flake8 . --count --show-source --statistics
Expand All @@ -55,30 +50,48 @@ jobs:
run: flake8 . --count --exit-zero --max-complexity=10 --statistics

- name: Run unit and integration tests
run: coverage run --rcfile=setup.cfg -m unittest discover
run: |
coverage run --rcfile=pyproject.toml -m unittest discover
coverage report
coverage xml --rcfile=pyproject.toml
- name: Install and run Coveralls Reporter(Linux)
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 -f coverage.xml --parallel --repo-token=${{ secrets.COVERALLS_REPO_TOKEN }} --build-number ${{ github.run_number }}
- name: Install and run Coveralls Reporter (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 -f coverage.xml --parallel --repo-token=${{ secrets.COVERALLS_REPO_TOKEN }} --build-number ${{ github.run_number }}
- name: Publish results to coveralls upon success
- name: Report and run Coveralls (macOS)
if: startsWith(matrix.os, 'macos')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: run-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.install-extras }}
run: coveralls --rcfile=setup.cfg --service=github || true
run: |
brew tap coverallsapp/coveralls --quiet
brew install coveralls --quiet
coveralls report -f coverage.xml --parallel --repo-token=${{ secrets.COVERALLS_REPO_TOKEN }} --build-number ${{ github.run_number }}
finish:
name: Finish Coverage Analysis
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Coveralls Finished
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_PARALLEL: true
run: |
pip install --upgrade coveralls
coveralls --service=github --finish || true
curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz
./coveralls done --build-number ${{ github.run_number }}
36 changes: 36 additions & 0 deletions .github/workflows/pip_rc_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install Python dependencies and the latest RC of ocbpy from
# Test PyPi. This test should be manually run before a Release Candidate is
# officially approved and versioned. For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test install of latest RC from pip

on: [workflow_dispatch]

jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.11"] # 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
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install standard dependencies
run: pip install -r requirements.txt

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

- name: Check that installation imports correctly
run: |
cd ..
python -c "import ocbpy; print(ocbpy.__version__)"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Autosaves
*~
.DS_Store

# Compiled python modules.
*.py[cod]

# Test directories
# Test directories and files
/build/
.tox
.coverage
coverage.xml

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

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

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

# Declare the Python requirements required to build your docs
# This method includes a local build of the package
python:
install:
- method: pip
path: .
extra_requirements:
- doc
6 changes: 6 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ Contributors
------------

* Dominic Jodoin - https://github.com/cotsog

Acknowledgements
----------------
* Angeline G. Burrell is supported by the Office of Naval Research
(2018-Present)

56 changes: 43 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of
experience, nationality, personal appearance, race, religion, or sexual
identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
Expand All @@ -16,31 +22,55 @@ Examples of behavior that contributes to creating a positive environment include

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions that
are not aligned to this Code of Conduct, or to ban temporarily or permanently
any contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may
be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at agb073000@utdallas.edu. The project team will review and investigate all complaints, and will respond in a way that it deems 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.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at angeline.g.burrell.civ@us.navy.mil.
The project team will review and investigate all complaints, and will respond in
a way that it deems 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.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
[https://www.contributor-covenant.org/version/1/4/][version]

[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/
10 changes: 5 additions & 5 deletions CODE_OF_CONDUCT.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ Enforcement
-----------

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at angeline.burrell@nrl.navy.mil. The
project team will review and investigate all complaints, and will respond in a
way that it deems appropriate to the circumstances. The project team is
reported by contacting the project team at angeline.g.burrell.civ@us.navy.mil.
The project team will review and investigate all complaints, and will respond in
a way that it deems 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 All @@ -78,5 +78,5 @@ Attribution
This Code of Conduct is adapted from the Contributor Covenant [homepage]_,
version [1.4]_.

.. [homepage] https://contributor-covenant.org
.. [1.4] https://contributor-covenant.org/version/1/4/
.. [homepage] https://www.contributor-covenant.org/
.. [1.4] https://www.contributor-covenant.org/version/1/4/
7 changes: 4 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ to respond in a timely manner.
Short version
=============

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

Bug reports
Expand Down Expand Up @@ -82,8 +83,8 @@ Tips

To run a subset of tests from the test directory for a specific environment::

python test_name.py
python -m unittest test_name.py

To run all the tests for a specific environment::

python setup.py test
python -m unittest discover
24 changes: 24 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ Changelog

Summary of all changes made since the first stable release

0.4.0 (06-07-2024)
------------------
* DEP: Deprecated functions that depend on ssj_auroral_boundary_package
* DEP: Removed classes and kwargs deprecated in v0.3.0
* MAINT: Cycled supported Python versions
* MAINT: Added a pyproject.toml file and removed setup.py
* MAINT: Updated numpy logic to address DeprecationWarnings
* MAINT: Updated GitHub Action yamls to use pyproject.toml and cycle versions
* MAINT: Updated GitHub Action yamls to use coveralls-reporter
* ENH: Added AMPERE OCBs up to 2022, using updated AMPERE data
* ENH: Added AMPERE EABs, using the Heppner-Maynard boundary as a valid EAB
* ENH: Changed default directory ID to use `pathlib`
* ENH: Allow data padding in `pysat_instrument` functions
* ENH: Separated vector transformations to support multiple coordinate systems
* ENH: Updated VectorData and pysat_instruments to allow geographic inputs
* BUG: Fixed a typo in the documentation's pysat example
* BUG: Added an error catch for badly formatted SuperMAG file reading
* BUG: Fixed the flat/zero masking for vector pole angles with array input
* TST: Added a new CI test for the Test PyPi Release Candidate
* TST: Reduced duplication by creating a common test class and test variable
* TST: Added a ReadTheDocs yaml
* DOC: Improved docstring style compliance and correctness
* DOC: Updated pysat example to use geodetic inputs and improve the EAB plot

0.3.0 (10-21-2022)
------------------
* BUG: Fixed header initialization error general instrument loading routine
Expand Down
File renamed without changes.
Loading

0 comments on commit 495ca10

Please sign in to comment.