Skip to content

Commit c38d0eb

Browse files
committed
Merge branch 'release/0.0.4'
2 parents 4a0f6cf + 1490aa6 commit c38d0eb

7 files changed

Lines changed: 63 additions & 13 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/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
__project__ = "devpack"
1212
__author__ = "Christian Heider Nielsen"
13-
__version__ = "0.0.3"
13+
__version__ = "0.0.4"
1414
__doc__ = """
1515
Created on 15/04/2020
1616

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: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
import unittest
44
from pathlib import Path
5-
5+
import pytest
66
import pkg_resources
77

8+
89
_REQUIREMENTS_PATH = Path(__file__).parent.with_name("requirements.txt")
910
_EXTRA_REQUIREMENTS_PATH = Path(__file__).parent.parent / "requirements"
1011

1112

1213
class TestRequirements(unittest.TestCase):
1314
"""Test availability of required packages."""
1415

16+
# @pytest.skip
1517
def test_requirements(self):
1618
"""Test that each required package is available."""
1719
requirements = pkg_resources.parse_requirements(_REQUIREMENTS_PATH.open())
@@ -20,6 +22,10 @@ def test_requirements(self):
2022
with self.subTest(requirement=requirement):
2123
pkg_resources.require(requirement)
2224

25+
# @pytest.skip
26+
@pytest.mark.xfail(
27+
strict=False
28+
) # DO not successfully parse recursing of reqs using -r
2329
def test_extra_requirements(self):
2430
"""Test that each required package is available."""
2531
if _EXTRA_REQUIREMENTS_PATH.exists():

0 commit comments

Comments
 (0)