Skip to content

Commit

Permalink
Update environment, requirements, workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
morganjwilliams committed Jul 7, 2023
1 parent 997eb2a commit 07fad8a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 59 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/docstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
pull_request:
branches:
- develop
- develop
- feature/**
schedule:
- cron: '0 0 * * 0' # weekly
- cron: "0 0 * * 0" # weekly

jobs:
build:
Expand All @@ -15,24 +16,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7, 3.8]
python-version: [3.8, 3.9, "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
id: pip-cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "setup.py"
- name: Python Packages Install
run: |
python -m pip install --upgrade pip # upgrade pip
Expand Down
45 changes: 19 additions & 26 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,30 @@ on:
push:
pull_request:
branches:
- develop
- develop
- feature/**
schedule:
- cron: '0 0 * * 0' # weekly
- cron: "0 0 * * 0" # weekly

jobs:
unit_tests:
name: Unit Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.6, 3.7, 3.8]
python-version: [3.8, 3.9, "3.10", "3.11"]
exclude:
# excludes macOS, until a fix can be found for process failure (#134)
- os: macos-latest
# excludes macOS, until a fix can be found for process failure (#134)
- os: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
id: pip-cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "setup.py"
- name: Python Packages Install
run: |
python -m pip install --upgrade pip # upgrade pip
Expand Down Expand Up @@ -67,16 +59,17 @@ jobs:
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
run: |
coveralls
coveralls
coveralls:
name: Indicate completion to coveralls.io
needs: unit_tests
if: success() || failure()
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 13 additions & 13 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults

dependencies:
- python=3.7
- python=3.10
# pandas and scientific python
- numpy
- pandas>=1.0
Expand All @@ -23,19 +23,19 @@ dependencies:
- ipykernel
- pip
- black
- jedi<0.18.0 # for use on atom/ipython
- isort
- pytest
- pytest-runner
- pytest-cov
- coverage
- codecov
- sphinx_rtd_theme
- recommonmark
- versioneer
- twine
- pip:
- pytest
- pytest-runner
- pytest-cov
- coverage
- codecov
- sphinx_rtd_theme
- sphinx-autodoc-annotation
- recommonmark
- versioneer
- twine
- -e . # install the local autopew package
- sphinx-autodoc-annotation
- -e . # install the local autopew package

# conda env create -f environment.yml
# python -m ipykernel install --user --name autopew
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from setuptools import setup, find_packages
from setuptools import find_packages, setup

import versioneer

tests_require = ["pytest", "pytest-runner", "pytest-cov", "coverage", "codecov"]
Expand All @@ -24,9 +25,8 @@
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
],
Expand Down

0 comments on commit 07fad8a

Please sign in to comment.