Skip to content

Commit

Permalink
Merge pull request #54 from pysat/rc_v0.2.2
Browse files Browse the repository at this point in the history
Release Candidate v0.2.2
  • Loading branch information
jklenzing committed Jun 18, 2021
2 parents e307266 + 25ddaf2 commit 830c951
Show file tree
Hide file tree
Showing 49 changed files with 1,173 additions and 1,681 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 Check

on: [push, pull_request]

jobs:
build:

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

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test_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())"
51 changes: 51 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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:
python-version: [3.7, 3.8, 3.9]
os: [ubuntu-latest]

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test_requirements.txt
pip install -r requirements.txt
# Manual install of OMMBV
pip install --no-binary :OMMBV: OMMBV
- name: Set up pysat
run: |
mkdir pysatData
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
- name: Test PEP8 compliance
run: flake8 . --count --select=E,F,W --show-source --statistics

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

- name: Test with pytest
run: |
pytest --cov=pysatMissions/
- name: Publish results to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --rcfile=setup.cfg --service=github
86 changes: 0 additions & 86 deletions .travis.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"creators": [
{
"affiliation": "Goddard Space Flight Center",
"name": "Klenzing, Jeffrey",
"orcid": "0000-0001-8321-6074"
},
{
"affiliation": "The University of Texas at Dallas",
"name": "Stoneback, Russell",
"orcid": "0000-0001-7216-4336"
},
{
"affiliation": "U.S. Naval Research Laboratory",
"name": "Burrell, Angeline G.",
"orcid": "0000-0001-8875-9326"
},
{
"affiliation": "The University of Texas at Dallas",
"name": "Depew, Matthew"
},
{
"name": "Spence, Carey",
"orcid": "0000-0001-8340-5625"
}
]
}
51 changes: 30 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This project adheres to [Semantic Versioning](https://semver.org/).

## [0.2.2] - 2021-06-18
* Migrate pyglow interface to pysatIncubator
* Style updates for consistency with pysat 3.0
* Use `inst_id` instead of `sat_id`
* Use `cadence` instead of `freq`
* Use 'missions' as the platform name ('pysat' now reserved for core code)
* Migrate CI testing to Github Actions
* Use OMMBV instead of pysatMagVect

## [0.2.1] - 2020-07-29
- Use conda to manage Travis CI environment
- Updated style to be compliant with pandas 2.0 and pysat 3.0
- Import datetime from datetime
- import DataFrame and Series from pandas rather than pysat
- Rename default branch as `main`
* Use conda to manage Travis CI environment
* Updated style to be compliant with pandas 2.0 and pysat 3.0
* Import datetime from datetime
* import DataFrame and Series from pandas rather than pysat
* Rename default branch as `main`

## [0.2.0] - 2020-03-07
- Renamed as pysatMissions
- Added method files to access aacgmv2, apexpy, pyglow for any pysat instrument
- Added method for spacecraft to handle attitude and coordinates
- Added method for plotting simulated data
- Added support for readthedocs
- Updates to testing environment
- Split pysat_sgp4 into pysat_sgp4 and pysat_ephem to allow different propagators
- Removed basemap
- Added numeric strings as options for sat_id
- Added `_get_times` to streamline time steps for simulated instruments
- Bugs
- Fixed wrong metadata name for mlt in apexpy
* Renamed as pysatMissions
* Added method files to access aacgmv2, apexpy, pyglow for any pysat instrument
* Added method for spacecraft to handle attitude and coordinates
* Added method for plotting simulated data
* Added support for readthedocs
* Updates to testing environment
* Split pysat_sgp4 into pysat_sgp4 and pysat_ephem to allow different propagators
* Removed basemap
* Added numeric strings as options for sat_id
* Added `_get_times` to streamline time steps for simulated instruments
* Bugs
* Fixed wrong metadata name for mlt in apexpy

## [0.1.1] - 2019-10-22
- pypi compatibility
- Add DOI badge
* pypi compatibility
* Add DOI badge

## [0.1.0] - 2019-10-07
- Initial release
* Initial release
49 changes: 42 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ To set up `pysatMissions` for local development:
git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally. Tests for new instruments are
performed automatically. Tests for custom functions should be added to the
appropriately named file in ``pysatMissions/tests``. For example, the averaging routines in avg.py are tested in ``pysatMissions/tests/test_avg.py``. If no
test file exists, then you should create one. This testing uses pytest, which
performed automatically. Tests for custom functions should be added to
the appropriately named file in ``pysatMissions/tests``. If no test
file exists, then you should create one. This testing uses pytest, which
will run tests on any python file in the test directory that starts with
``test_``.

Expand Down Expand Up @@ -80,11 +80,46 @@ For merging, you should:

1. Include an example for use
2. Add a note to ``CHANGELOG.md`` about the changes
3. Ensure that all checks passed (current checks include Travis-CI
3. Ensure that all checks passed (current checks include GitHub Actions
and Coveralls) [1]_

.. [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 to run the tests for each change you add in the pull request.
Because testing here will delay tests by other developers, please ensure
that the code passes all tests on your local system first.
GitHub Actions to run the tests for each change you add in the pull
request. Because testing here will delay tests by other developers,
please ensure that the code passes all tests on your local system first.

Project Style Guidelines
^^^^^^^^^^^^^^^^^^^^^^^^

In general, pysat follows PEP8 and numpydoc guidelines. Pytest runs the unit
and integration tests, flake8 checks for style, and sphinx-build performs
documentation tests. However, there are certain additional style elements that
have been settled on to ensure the project maintains a consistent coding style.
These include:

* Line breaks should occur before a binary operator (ignoring flake8 W503)
* Combine long strings using `join`
* Preferably break long lines on open parentheses rather than using `\`
* Use no more than 80 characters per line
* Avoid using Instrument class key attribute names as unrelated variable names:
`platform`, `name`, `tag`, and `inst_id`
* The pysat logger is imported into each sub-module and provides status updates
at the info and warning levels (as appropriate)
* Several dependent packages have common nicknames, including:
* `import datetime as dt`
* `import numpy as np`
* `import pandas as pds`
* `import xarray as xr`
* All classes should have `__repr__` and `__str__` functions
* Docstrings use `Note` instead of `Notes`
* Try to avoid creating a try/except statement where except passes
* Use setup and teardown in test classes
* Use pytest parametrize in test classes when appropriate
* Provide testing class methods with informative failure statements and
descriptive, one-line docstrings
* Block and inline comments should use proper English grammar and punctuation
with the exception of single sentences in a block, which may then omit the
final period
* When casting is necessary, use `np.int64` and `np.float64` to ensure operating
system agnosticism

0 comments on commit 830c951

Please sign in to comment.