Skip to content

Commit f90e08b

Browse files
authored
Fix CI, unpin some reqs, pin docs, enable doc lint (#26)
* Fix CI, unpin some reqs, pin docs, enable doc lint * Install pandoc * Fix PETSc/SLEPc pin in tox.ini for macOS
1 parent c266fd8 commit f90e08b

11 files changed

Lines changed: 38 additions & 31 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,43 +46,40 @@ jobs:
4646
key: precommit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}
4747
restore-keys: |
4848
precommit-${{ env.pythonLocation }}-
49-
precommit-
5049
5150
- name: Install dependencies
5251
run: |
52+
sudo apt install pandoc
5353
python -m pip install --upgrade pip
5454
pip install tox
5555
5656
- name: Linting
5757
run: |
58-
tox -e lint,readme
59-
- name: Documentation check
60-
run: |
61-
echo "Uncomment me below once the badges are working..."
62-
# tox -e check-docs
58+
tox -e lint,check-docs,readme
6359
6460
test:
6561
needs: init
6662
if: ${{ github.event_name == 'schedule' || needs.init.outputs.skip == 'false' }}
6763
runs-on: ${{ matrix.os }}
6864
strategy:
6965
fail-fast: false
70-
max-parallel: 4
66+
max-parallel: 5
7167
matrix:
72-
python: [3.8]
68+
python: [3.7, 3.9]
7369
os: [ubuntu-latest]
74-
use_slepc: [true]
70+
use_slepc: [false]
7571
include:
7672
- os: ubuntu-latest
77-
python: 3.7
78-
use_slepc: false
79-
- os: macos-latest
8073
python: 3.8
81-
use_slepc: false
74+
use_slepc: true
8275
- os: macos-latest
8376
python: 3.7
8477
use_slepc: true
78+
- os: macos-latest
79+
python: 3.8
80+
use_slepc: false
8581
env:
82+
# for macOS only, make sure to pin this in tox.ini as well
8683
PC_VERSION: 3.13.5 # PETSc version
8784
SC_VERSION: 3.13.2 # SLEPc version
8885

@@ -123,7 +120,6 @@ jobs:
123120
python -m pip install --upgrade pip
124121
pip install tox tox-gh-actions codecov
125122
126-
127123
- name: Restore PETSc/SLEPc tox cache
128124
if: matrix.use_slepc == true
129125
uses: actions/cache@v2

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
rev: v0.790
1111
hooks:
1212
- id: mypy
13-
additional_dependencies: [numpy>=1.2.0, scipy>=1.6.0]
13+
additional_dependencies: [numpy==1.20.0, scipy>=1.6.0]
1414
- repo: https://github.com/psf/black
1515
rev: 20.8b1
1616
hooks:

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ help:
2121

2222
clean: Makefile
2323
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
24-
rm -rf source/api/
24+
@rm -rf $(SOURCEDIR)/api/

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-r ../requirements.txt
2-
nbsphinx>=0.7
3-
sphinx>=3.3.0
2+
nbsphinx>=0.8
3+
sphinx==4.0.2 # https://github.com/spatialaudio/nbsphinx/issues/584
44
sphinx-autodoc-annotation
55
sphinx-autodoc-typehints>=1.10.3
66
sphinx-copybutton

docs/source/acknowledgments.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ and A. Sikorski for supplying us with an `code example`_ and guidance how to int
1212
The development of *pyGPCCA* started - based on the original `GPCCA`_ program written in MATLAB - at the beginning of
1313
2020 in a fork of `MSMTools`_, since it was planned to integrate GPCCA into MSMTools at this time.
1414
Due to this, some similarities in structure and code (indicated were evident) can be found.
15-
Futher the utility functions found in `pygpcca/utils/_utils.py`_ originate from MSMTools.
15+
Further utility functions found in `pygpcca/utils/_utils.py`_ originate from MSMTools.
1616

1717
.. _`Marcus Weber`: https://www.zib.de/members/weber
1818
.. _`CMD`: https://www.zib.de/numeric/cmd
@@ -23,7 +23,7 @@ Futher the utility functions found in `pygpcca/utils/_utils.py`_ originate from
2323
.. _`Python code`: https://gist.github.com/fabian-paul/14679b43ed27aa25fdb8a2e8f021bad5
2424
.. _`Alexander Sikorski`: https://www.zib.de/members/sikorski
2525
.. _`SLEPc`: https://slepc.upv.es/
26-
.. _`code example`: https://github.com/zib-cmd/cmdtools/blob/1c6b6d8e1c35bb487fcf247c5c1c622b4b665b0a/src/cmdtools/analysis/pcca.py#L64
26+
.. _`code example`: https://github.com/zib-cmd/cmdtools/blob/1c6b6d8e1c35bb487fcf247c5c1c622b4b665b0a/src/cmdtools/analysis/pcca.py#L64-L89
2727
.. _`GPCCA`: https://github.com/msmdev/gpcca
2828
.. _`MSMTools`: https://github.com/markovmodel/msmtools
2929
.. _`pygpcca/utils/_utils.py`: https://github.com/msmdev/pyGPCCA/blob/main/pygpcca/utils/_utils.py

docs/source/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
napoleon_include_init_with_doc = False
8282
napoleon_use_rtype = True
8383
napoleon_use_param = True
84-
napoleon_custom_sections = [("Params", "Parameters")]
84+
napoleon_custom_sections = [("Params", "Parameters"), ("Credits", "References")]
8585
napoleon_use_admonition_for_examples = False
8686
napoleon_use_admonition_for_notes = False
8787
napoleon_use_admonition_for_references = False
@@ -113,6 +113,9 @@
113113
# see: https://pyenchant.github.io/pyenchant/api/enchant.tokenize.html
114114
spelling_filters = ["enchant.tokenize.URLFilter", "enchant.tokenize.EmailFilter"]
115115

116+
# linkcheck
117+
linkcheck_anchors = False # problem with specifying lines on GitHub in `acknowledgments.rst`
118+
116119
# Add any paths that contain custom static files (such as style sheets) here,
117120
# relative to this directory. They are copied after the builtin static files,
118121
# so a file named "default.css" will overwrite the builtin "default.css".

docs/source/release_notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Version 1.0
2323
~~~~~~~~~~~~~~~~~~~~~~~~~
2424
.. rubric:: General
2525

26-
- Minor improvements/fixes in README and acknowledgements.
26+
- Minor improvements/fixes in README and acknowledgments.
2727

2828
1.0.0 :small:`2021-01-29`
2929
~~~~~~~~~~~~~~~~~~~~~~~~~

docs/source/spelling_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ Fackeldey
2525
Röblitz
2626
Sikorski
2727
Zuse
28+
mypy

pygpcca/_sorted_schur.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def _check_conj_split(eigenvalues: np.ndarray) -> bool:
111111

112112
@d.dedent
113113
def _check_schur(P: np.ndarray, Q: np.ndarray, R: np.ndarray, eigenvalues: np.ndarray, method: str) -> None:
114-
"""Run a number of checks on the sorted Schur decomposition.
114+
"""
115+
Run a number of checks on the sorted Schur decomposition.
115116
116117
Parameters
117118
----------
@@ -259,6 +260,11 @@ def sorted_krylov_schur(
259260
# We take the sequence of 1-D arrays and stack them as columns to make a single 2-D array.
260261
Q = np.column_stack([x.array for x in E.getInvariantSubspace()])
261262

263+
try:
264+
# otherwise, R would be of shape `(k + 1, k)`
265+
E.getDS().setExtraRow(False)
266+
except AttributeError:
267+
pass
262268
# Get the schur form
263269
R = E.getDS().getMat(SLEPc.DS.MatType.A)
264270
R.view()

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
extras_require=dict(
3636
# https://gitlab.com/petsc/petsc/-/issues/803
3737
slepc=[
38-
"mpi4py>=3.0.3,<3.1",
39-
"petsc>=3.13,<3.14",
40-
"slepc>=3.13,<3.14",
41-
"petsc4py>=3.13,<3.14",
42-
"slepc4py>=3.13,<3.14",
38+
"mpi4py>=3.0.3",
39+
"petsc>=3.13,!=3.14",
40+
"slepc>=3.13,!=3.14",
41+
"petsc4py>=3.13,!=3.14",
42+
"slepc4py>=3.13,!=3.14",
4343
],
4444
dev=["pre-commit>=2.9.0", "bump2version>=1.0.2"],
4545
test=["tox>=3.20.1"],

0 commit comments

Comments
 (0)