Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: testing syntax #39

Merged
merged 9 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:

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

Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,29 @@ jobs:
numpy_ver: [latest]
include:
- python-version: "3.8"
numpy_ver: "1.19"
numpy_ver: "1.20"
os: "ubuntu-latest"

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

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

- name: Install NEP29 dependencies
if: ${{ matrix.numpy_ver != 'latest'}}
run: |
pip install --no-binary :numpy: numpy==${{ matrix.numpy_ver }}
# Need to force a version of pandas compliant with NEP29
pip install "pandas<1.5"

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

- name: Test PEP8 compliance
run: flake8 . --count --select=E,F,W --show-source --statistics
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/pysat_rc.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: Test with latest pysat RC

on: [push]
jklenzing marked this conversation as resolved.
Show resolved Hide resolved

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["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 }}

- name: Reinstall fortran on MacOS
if: ${{ matrix.os == 'macos-latest' }}
run: brew reinstall gcc

- name: Install pysat RC
run: pip install --no-deps -i https://test.pypi.org/simple/ pysat

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

- name: Set up pysat
run: |
mkdir pysatData
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"

- name: Install
run: python setup.py develop

- name: Test with pytest
run: pytest -vs --cov=pysatCDF/

- name: Publish results to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --rcfile=setup.cfg --service=github
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,21 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Shifted from TravisCI to GitHub Actions for online testing.
* Adopted setup.cfg
* Improved PEP8 compliance
* Adopt pytest syntax

[0.3.2] - 2022-05-13
--------------------
* New Features
* Compatible with pysat v3.0+
* Deprecations
* Documentation
* Added pull request templates and other GitHub project documentation.
* Switched Windows installation instructions to favor installing WSL.
* Bug Fix
* Improved builds for newer compilers.
* Replaces uninterpretable characters with '*' so data loading may continue.
* Maintenance
* Adopted latest pysat development standards.
* Shifted from TravisCI to GitHub Actions for online testing.
* Adopted setup.cfg
* Improved PEP8 compliance
aburrell marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 2 additions & 3 deletions pysatCDF/tests/test_cdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@


class TestBasics(object):

def setup(self):
def setup_method(self):
"""Run before every method to create a clean testing setup."""

def teardown(self):
def teardown_method(self):
"""Run after every method to clean up previous testing."""

def test_vefi_load(self):
Expand Down
1 change: 1 addition & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
coveralls
flake8<6.0
ipython
m2r2
numpydoc
Expand Down