Skip to content

Commit 03cc983

Browse files
[pre-commit.ci] pre-commit autoupdate (#6)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tobias Raabe <[email protected]>
1 parent 27a4d07 commit 03cc983

File tree

3 files changed

+29
-38
lines changed

3 files changed

+29
-38
lines changed

.github/workflows/continuous-integration-workflow.yml

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@ jobs:
1111

1212
run-tests:
1313

14-
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
14+
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }} and ${{ matrix.r-version }}
1515
runs-on: ${{ matrix.os }}
1616

1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
2121
python-version: ['3.6', '3.7', '3.8']
22+
r-version: ['3.6.3']
2223

2324
steps:
2425
- uses: actions/checkout@v2
2526
- uses: r-lib/actions/setup-r@v1
2627
with:
27-
r-version: '3.6.1' # The R version to download (if necessary) and use.
28-
- uses: goanpeca/setup-miniconda@v1
28+
r-version: ${{ matrix.r-version }}
29+
- uses: conda-incubator/setup-miniconda@v2
2930
with:
3031
auto-update-conda: true
3132
python-version: ${{ matrix.python-version }}
@@ -41,7 +42,7 @@ jobs:
4142
run: tox -e pytest -- -m "unit or (not integration and not end_to_end)" --cov=./ --cov-report=xml -n auto
4243

4344
- name: Upload coverage report for unit tests and doctests.
44-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
45+
if: runner.os == 'Linux' && matrix.python-version == '3.8' && matrix.r-version == '3.6.3'
4546
shell: bash -l {0}
4647
run: bash <(curl -s https://codecov.io/bash) -F unit -c
4748

@@ -50,7 +51,7 @@ jobs:
5051
# run: tox -e pytest -- -m integration --cov=./ --cov-report=xml -n auto
5152

5253
# - name: Upload coverage reports of integration tests.
53-
# if: runner.os == 'Linux' && matrix.python-version == '3.8'
54+
# if: runner.os == 'Linux' && matrix.python-version == '3.8' && matrix.r-version == '3.6.3'
5455
# shell: bash -l {0}
5556
# run: bash <(curl -s https://codecov.io/bash) -F integration -c
5657

@@ -59,31 +60,11 @@ jobs:
5960
run: tox -e pytest -- -m end_to_end --cov=./ --cov-report=xml -n auto
6061

6162
- name: Upload coverage reports of end-to-end tests.
62-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
63+
if: runner.os == 'Linux' && matrix.python-version == '3.8' && matrix.r-version == '3.6.3'
6364
shell: bash -l {0}
6465
run: bash <(curl -s https://codecov.io/bash) -F end_to_end -c
6566

6667
- name: Validate codecov.yml
67-
if: runner.os == 'Linux' && matrix.python-version == '3.8'
68+
if: runner.os == 'Linux' && matrix.python-version == '3.8' && matrix.r-version == '3.6.3'
6869
shell: bash -l {0}
6970
run: cat codecov.yml | curl --data-binary @- https://codecov.io/validate
70-
71-
72-
pre-commit:
73-
74-
name: Run pre-commit.
75-
runs-on: ubuntu-latest
76-
77-
steps:
78-
- uses: actions/checkout@v2
79-
80-
- name: Set up Python 3.8
81-
uses: actions/setup-python@v1
82-
with:
83-
python-version: 3.8
84-
85-
- name: Install dependencies
86-
run: pip install tox
87-
88-
- name: Run pre-commit
89-
run: tox -e pre-commit

.pre-commit-config.yaml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.2.0
3+
rev: v3.4.0
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=100']
@@ -9,26 +9,38 @@ repos:
99
exclude: meta.yaml
1010
- id: debug-statements
1111
- id: end-of-file-fixer
12+
- repo: https://github.com/pre-commit/pygrep-hooks
13+
rev: v1.7.0 # Use the ref you want to point at
14+
hooks:
15+
- id: python-check-blanket-noqa
16+
- id: python-check-mock-methods
17+
- id: python-no-eval
18+
- id: python-no-log-warn
19+
- id: python-use-type-annotations
20+
- id: rst-backticks
21+
- id: rst-directive-colons
22+
- id: rst-inline-touching-normal
23+
- id: text-unicode-replacement-char
1224
- repo: https://github.com/asottile/pyupgrade
13-
rev: v2.7.2
25+
rev: v2.7.4
1426
hooks:
1527
- id: pyupgrade
1628
args: [--py36-plus]
1729
- repo: https://github.com/asottile/reorder_python_imports
18-
rev: v2.3.5
30+
rev: v2.3.6
1931
hooks:
2032
- id: reorder-python-imports
2133
- repo: https://github.com/psf/black
2234
rev: 20.8b1
2335
hooks:
2436
- id: black
2537
- repo: https://github.com/asottile/blacken-docs
26-
rev: v1.8.0
38+
rev: v1.9.1
2739
hooks:
2840
- id: blacken-docs
2941
additional_dependencies: [black]
3042
- repo: https://gitlab.com/pycqa/flake8
31-
rev: 3.8.3
43+
rev: 3.8.4
3244
hooks:
3345
- id: flake8
3446
types: [python]
@@ -52,12 +64,12 @@ repos:
5264
hooks:
5365
- id: doc8
5466
- repo: https://github.com/econchick/interrogate
55-
rev: 1.3.1
67+
rev: 1.3.2
5668
hooks:
5769
- id: interrogate
5870
args: [-v, --fail-under=40, src, tests]
5971
- repo: https://github.com/codespell-project/codespell
60-
rev: v1.17.1
72+
rev: v2.0.0
6173
hooks:
6274
- id: codespell
6375
- repo: meta

tests/test_collect.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,9 @@ def test_pytask_collect_task_teardown(depends_on, produces, expectation, r_sourc
9191

9292
task = DummyClass()
9393
task.depends_on = {
94-
i: FilePathNode(n.split(".")[0], Path(n)) for i, n in enumerate(depends_on)
95-
}
96-
task.produces = {
97-
i: FilePathNode(n.split(".")[0], Path(n)) for i, n in enumerate(produces)
94+
i: FilePathNode.from_path(Path(n)) for i, n in enumerate(depends_on)
9895
}
96+
task.produces = {i: FilePathNode.from_path(Path(n)) for i, n in enumerate(produces)}
9997
task.markers = [Mark("r", (), {})]
10098
task.function = task_dummy
10199
task.function.pytaskmark = task.markers

0 commit comments

Comments
 (0)