Skip to content

Commit 9f08a30

Browse files
committed
fix postdoc build
1 parent 0578759 commit 9f08a30

6 files changed

Lines changed: 59 additions & 11 deletions

File tree

.github/workflows/publish-to-test-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-18.04
1313
steps:
1414
- uses: actions/checkout@master
15-
- name: Set up Python 3.7
15+
- name: Set up Python 3.8
1616
uses: actions/setup-python@v1
1717
with:
18-
python-version: 3.7
18+
python-version: 3.8
1919
- name: Install pep517
2020
run: >-
2121
python -m
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Python package
2+
3+
on: [ push ]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
max-parallel: 4
11+
matrix:
12+
python-version: [ 3.8 ]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -r requirements.txt
24+
pip install -r requirements/requirements_dev.txt
25+
pip install -r requirements/requirements_tests.txt
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install flake8 pytest
30+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31+
- name: Install package
32+
run: |
33+
pip install -e .[test]
34+
- name: Lint with flake8
35+
run: |
36+
pip install flake8
37+
# stop the build if there are Python syntax errors or undefined names
38+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
39+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41+
- name: Test with pytest
42+
run: |
43+
pytest

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ repos:
1717
hooks:
1818
- id: flake8-check1 # stop the build if there are Python syntax errors or undefined names
1919
name: flake8-check1
20-
entry: flake8 devpack --count --select=E9,F63,F7,F82 --show-source --statistics
20+
entry: flake8 devpack --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=*exclude*
2121
language: system
2222
pass_filenames: false
2323
always_run: true
2424
- repo: local
2525
hooks:
2626
- id: flake8-check2 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
2727
name: flake8-check2
28-
entry: flake8 devpack --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
28+
entry: flake8 devpack --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=*exclude*
2929
language: system
3030
pass_filenames: false
3131
always_run: true

devpack/cli.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ def install_develop():
1616
)
1717
"""
1818
parser.add_argument(
19-
"--SITE",
20-
"-s",
21-
type=bool,
22-
default=False,
23-
metavar="SITE",
24-
help="Open user or site dirs (default: User)",
25-
)
19+
"--SITE",
20+
"-s",
21+
type=bool,
22+
default=False,
23+
metavar="SITE",
24+
help="Open user or site dirs (default: User)",
25+
)
2626
"""
2727
args = parser.parse_args()
2828

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apppath[all]
22
warg[all]
33
draugr[all]
4+
black[d]
45
six

tests/req_unit_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55

66
import pkg_resources
77

8+
# import pytest
9+
810
_REQUIREMENTS_PATH = Path(__file__).parent.with_name("requirements.txt")
911
_EXTRA_REQUIREMENTS_PATH = Path(__file__).parent.parent / "requirements"
1012

1113

1214
class TestRequirements(unittest.TestCase):
1315
"""Test availability of required packages."""
1416

17+
# @pytest.skip
1518
def test_requirements(self):
1619
"""Test that each required package is available."""
1720
requirements = pkg_resources.parse_requirements(_REQUIREMENTS_PATH.open())
@@ -20,6 +23,7 @@ def test_requirements(self):
2023
with self.subTest(requirement=requirement):
2124
pkg_resources.require(requirement)
2225

26+
# @pytest.skip
2327
def test_extra_requirements(self):
2428
"""Test that each required package is available."""
2529
if _EXTRA_REQUIREMENTS_PATH.exists():

0 commit comments

Comments
 (0)