Skip to content

Commit

Permalink
Merge 38abaaf into 0eac9a7
Browse files Browse the repository at this point in the history
  • Loading branch information
jklenzing committed Apr 27, 2021
2 parents 0eac9a7 + 38abaaf commit 62beac6
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 94 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

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

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

name: Python ${{ matrix.python-version }}
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 installs required
pip install --no-binary :pysatMagVect: pysatMagVect
- 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
84 changes: 0 additions & 84 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Update sat_id to inst_id for pysat 3.0 compatibility
- migrate pyglow interface to pysatIncubator
- Style updates for consistency with pysat 3.0
- Migrate CI testing to Github Actions

## [0.2.1] - 2020-07-29
- Use conda to manage Travis CI environment
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Documentation Status](https://readthedocs.org/projects/pysatMissions/badge/?version=latest)](http://pysatMissions.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/209358908.svg)](https://zenodo.org/badge/latestdoi/209358908)

[![Build Status](https://travis-ci.com/pysat/pysatMissions.svg?branch=main)](https://travis-ci.com/pysat/pysatMissions)
[![Build Status](https://github.com/github/docs/actions/workflows/main.yml/badge.svg)](https://github.com/github/docs/actions/workflows/main.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/pysat/pysatMissions/badge.svg?branch=main)](https://coveralls.io/github/pysat/pysatMissions?branch=main)
[![Maintainability](https://api.codeclimate.com/v1/badges/83011911691b9d2076e9/maintainability)](https://codeclimate.com/github/pysat/pysatMissions/maintainability)

Expand Down
2 changes: 1 addition & 1 deletion pysatMissions/tests/test_methods_magcoord.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TestBasics():
def setup(self):
"""Runs before every method to create a clean testing setup."""
self.testInst = pysat.Instrument(platform='pysat', name='testing',
inst_id='100', clean_level='clean')
num_samples=100, clean_level='clean')

def teardown(self):
"""Clean up test environment after tests"""
Expand Down
2 changes: 1 addition & 1 deletion pysatMissions/tests/test_methods_spacecraft.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TestBasics():
def setup(self):
"""Runs before every method to create a clean testing setup."""
self.testInst = pysat.Instrument(platform='pysat', name='testing',
inst_id='9', clean_level='clean')
num_samples=9, clean_level='clean')
self.testInst.custom_attach(add_eci)

def teardown(self):
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ sgp4
pyEphem
apexpy
aacgmv2
pysatMagVect
12 changes: 9 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ long_description_content_type = text/markdown
packages = find:
install_requires = file: requirements.txt

[coverage:report]

[flake8]
max-line-length = 90
ignore =
W503
exclude =
docs/conf.py

[tool:pytest]
markers =
all_inst: tests all instruments
download: tests for downloadable instruments
no_download: tests for instruments without download support
first: first tests to run
second: second tests to run
flake8-ignore =
*.py W503
docs/conf.py ALL

0 comments on commit 62beac6

Please sign in to comment.