forked from python-graphblas/python-graphblas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove style checks from main CI tests; rely on pre-commit (python-gr…
…aphblas#359) * Remove style checks from main CI tests; rely on pre-commit * Randomly run notebook checks 1/3 of the time * Some github action cleanup
- Loading branch information
Showing
2 changed files
with
28 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,37 +52,30 @@ jobs: | |
miniforge-version: latest | ||
use-mamba: true | ||
python-version: ${{ matrix.cfg.pyver }} | ||
channels: conda-forge,defaults | ||
channels: conda-forge,nodefaults | ||
channel-priority: strict | ||
activate-environment: graphblas | ||
auto-activate-base: false | ||
- name: Update env | ||
run: | | ||
mamba install -c conda-forge pytest coverage black flake8 \ | ||
coveralls=3.3.1 pytest-randomly flake8-comprehensions flake8-bugbear | ||
mamba install pytest coverage coveralls=3.3.1 pytest-randomly black \ | ||
pandas numba scipy networkx cffi donfig pyyaml awkward | ||
- name: Build extension module | ||
run: | | ||
mamba install -c conda-forge pandas numba scipy networkx cffi donfig pyyaml awkward | ||
if [[ ${{ matrix.cfg.sourcetype }} == "wheel" ]]; then | ||
pip install suitesparse-graphblas | ||
else | ||
mamba install -c conda-forge "graphblas>=7.4.0" | ||
mamba install "graphblas>=7.4.0" | ||
fi | ||
if [[ ${{ matrix.cfg.sourcetype }} == "source" ]]; then | ||
pip install --no-binary=all suitesparse-graphblas | ||
elif [[ ${{ matrix.cfg.sourcetype }} == "upstream" ]]; then | ||
# I can't get pip install from git to work, so git clone instead. | ||
# pip install git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas | ||
mamba install -c conda-forge cython | ||
git clone --depth=1 https://github.com/GraphBLAS/python-suitesparse-graphblas.git ssgb | ||
pushd ssgb | ||
python setup.py install # deprecated? | ||
# pip install . # doesn't work | ||
popd | ||
mamba install cython | ||
pip install --no-deps git+https://github.com/GraphBLAS/python-suitesparse-graphblas.git@main#egg=suitesparse-graphblas | ||
elif [[ ${{ matrix.cfg.sourcetype }} == "conda-forge" ]]; then | ||
mamba install -c conda-forge python-suitesparse-graphblas | ||
mamba install python-suitesparse-graphblas | ||
fi | ||
python setup.py develop --no-deps | ||
pip install --no-deps -e . | ||
- name: Unit tests | ||
run: | | ||
coverage run --branch -m pytest ${{ matrix.cfg.testopts }} -v | ||
|
@@ -114,10 +107,6 @@ jobs: | |
coverage run -a --branch -m graphblas.core.infixmethods | ||
git diff --exit-code | ||
coverage xml | ||
- name: Style Checks | ||
run: | | ||
flake8 | ||
black . --check --diff | ||
- name: Coverage | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -128,26 +117,34 @@ jobs: | |
coveralls --service=github | ||
- name: codecov | ||
uses: codecov/codecov-action@v3 | ||
# Randomly test notebooks 1/3 of the time | ||
- name: random number | ||
uses: ddradar/[email protected] | ||
id: rand | ||
with: | ||
contents: | | ||
true | ||
false | ||
weights: | | ||
1 | ||
2 | ||
- name: Notebooks Execution check | ||
if: ${{ steps.rand.outputs.selected == 'true' }} | ||
run: | | ||
mamba install -c conda-forge matplotlib nbconvert jupyter 'ipython>=7' | ||
mamba install matplotlib nbconvert jupyter 'ipython>=7' | ||
jupyter nbconvert --to notebook --execute notebooks/*ipynb | ||
finish: | ||
needs: build_and_test | ||
if: always() | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup conda env | ||
run: | | ||
source "$CONDA/etc/profile.d/conda.sh" | ||
conda config --set always_yes yes --set changeps1 no | ||
conda update -q conda | ||
conda create -n coveralls_final -c conda-forge python=3.9 coveralls=3.3.1 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- run: python -m pip install --upgrade pip | ||
- run: pip install coveralls | ||
- name: Coveralls Finished | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
source "$CONDA/etc/profile.d/conda.sh" | ||
conda activate coveralls_final | ||
coveralls --finish | ||
run: coveralls --finish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters