Skip to content

Commit

Permalink
Merge pull request #129 from pysat/template_update
Browse files Browse the repository at this point in the history
Template update
  • Loading branch information
aburrell authored Oct 23, 2023
2 parents 47a1c6b + f2c6fe1 commit 0d33b54
Show file tree
Hide file tree
Showing 27 changed files with 285 additions and 191 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Consider including images or test files to help others reproduce the bug and
solve the problem.

## Test configuration
- OS: [e.g. Hal]
- Version [e.g. Python 3.47]
- OS: [e.g., Hal]
- Version [e.g., Python 3.47]
- Other details about your setup that could be relevant

# Additional context
Add any other context about the problem here.
Add any other context about the problem here, including expected behaviour.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ If relevant, include sample code, images, or files so that others can understand
the full context of your question.

## Configuration
- OS: [e.g. Hal]
- Version [e.g. Python 3.47]
- OS: [e.g., Hal]
- Version: [e.g., Python 3.47]
- Other details about your setup that could be relevant
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Description

Addresses # (issue)
Addresses #(issue)

Please include a summary of the change and which issue is fixed. Please also
include relevant motivation and context. List any dependencies that are required
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 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
# 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

Expand All @@ -8,30 +9,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.10"]

name:
name: Documentation tests
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
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
- name: Install with dependencies
run: pip install .[doc]

- name: Set up pysat
run: |
mkdir pysatData
python -c "import pysat; pysat.params['data_dirs'] = './pysatData'"
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
- name: Check documentation build
run: sphinx-build -E -b html docs dist/docs
Expand Down
32 changes: 22 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,21 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10"]
numpy_ver: [latest]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11"]
numpy_ver: ["latest"]
test_config: ["latest"]
include:
- python-version: "3.8"
# NEP29 compliance settings
- python-version: "3.9"
numpy_ver: "1.21"
os: ubuntu-latest
test_config: "NEP29"
# Operational compliance settings
- python-version: "3.6.8"
numpy_ver: "1.19.5"
os: "ubuntu-20.04"
test_config: "Ops"

name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with numpy ${{ matrix.numpy_ver }}
runs-on: ${{ matrix.os }}
Expand All @@ -35,16 +40,23 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install standard dependencies
- name: Install Operational dependencies
if: ${{ matrix.test_config == 'Ops'}}
run: |
python -m pip install --upgrade pip
pip install numpy==${{ matrix.numpy_ver }}
pip install -r requirements.txt
pip install -r test_requirements.txt
pip install .
- name: Install NEP29 dependencies
if: ${{ matrix.numpy_ver != 'latest'}}
if: ${{ matrix.test_config == 'NEP29'}}
run: |
pip install numpy==${{ matrix.numpy_ver }}
pip install --upgrade-strategy only-if-needed .[test]
- name: Install standard dependencies
if: ${{ matrix.test_config == 'latest'}}
run: pip install .[test]

- name: Set up pysat
run: |
Expand All @@ -57,10 +69,10 @@ jobs:
- name: Evaluate complexity
run: flake8 . --count --exit-zero --max-complexity=10 --statistics

- name: Run unit and integration tests
run: pytest --cov=pysatSpaceWeather/
- name: Test with pytest
run: pytest

- name: Run Coveralls
- name: Publish results to coveralls
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
run: coveralls --rcfile=setup.cfg --service=github
19 changes: 15 additions & 4 deletions .github/workflows/pip_rc_install.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# This workflow will install Python dependencies and the latest RC of pysatNASA from test pypi.
# This test should be manually run before a pysatSpaceWeather RC is officially approved and versioned.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# This workflow will install Python dependencies and the latest RC of
# pysatSpaceWeather from test pypi. This test should be manually run before a
# pysatSpaceWeather RC 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

Expand All @@ -12,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10"] # Keep this version at the highest supported Python version
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 }}
Expand All @@ -28,3 +29,13 @@ jobs:

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

- name: Set up pysat
run: |
mkdir pysatData
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
- name: Check that install imports correctly
run: |
cd ..
python -c "import pysatSpaceWeather; print(pysatSpaceWeather.__version__)"
16 changes: 8 additions & 8 deletions .github/workflows/pysat_rc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 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
# 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

Expand All @@ -10,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10"]

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
Expand All @@ -25,18 +26,17 @@ jobs:
- name: Install pysat RC
run: pip install --no-deps --pre -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pysat

- name: Install standard dependencies
run: |
pip install -r requirements.txt
pip install -r test_requirements.txt
- name: Install standard dependencies and package
if: ${{ matrix.test_config == 'latest'}}
run: pip install .[test]

- name: Set up pysat
run: |
mkdir pysatData
python -c "import pysat; pysat.params['data_dirs'] = 'pysatData'"
- name: Test with pytest
run: pytest -vs --cov=pysatSpaceWeather/
run: pytest

- name: Publish results to coveralls
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*~
.DS_store

# Python Repository Ignores as Recommended by github.com########################
# Python Repository Ignores as Recommended by github.com
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
25 changes: 25 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required version of readthedocs
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

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


# Declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- doc
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Created a general download routine for the GFZ and LASP data
* Added new examples to the documentation
* Added new test attributes for clean messages to the ACE instruments
* Maintenance
* Updated package documentation, yamls, and other supporting files

[0.0.10] - 2023-06-01
---------------------
Expand Down
6 changes: 6 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,11 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
[https://contributor-covenant.org/version/1/4][version]

## FAQ

For answers to common questions about this code of conduct, see
[https://www.contributor-covenant.org/faq][faq]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
[faq]: https://www.contributor-covenant.org/faq
Loading

0 comments on commit 0d33b54

Please sign in to comment.