Skip to content

Commit 02506ad

Browse files
authored
First version. (#1)
1 parent 0d814a6 commit 02506ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2339
-16
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
3+
name: Bug Report
4+
about: Create a bug report to help us improve cookiecutter-pytask
5+
title: "BUG:"
6+
labels: "bug"
7+
8+
---
9+
10+
- [ ] I have checked that this issue has not already been reported.
11+
12+
- [ ] I have confirmed this bug exists on the latest version of cookiecutter-pytask.
13+
14+
- [ ] (optional) I have confirmed this bug exists on the `main` branch of
15+
cookiecutter-pytask.
16+
17+
---
18+
19+
**Note**: Please read [this
20+
guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing
21+
how to provide the necessary information for us to reproduce your bug.
22+
23+
#### Code Sample, a copy-pastable example
24+
25+
```python
26+
# Your code here
27+
```
28+
29+
#### Problem description
30+
31+
Explain **why** the current behaviour is a problem and why the expected output is a
32+
better solution.
33+
34+
#### Expected Output
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
3+
name: Documentation Improvement
4+
about: Report wrong or missing documentation
5+
title: "DOC:"
6+
labels: "documentation"
7+
8+
---
9+
10+
#### Location of the documentation
11+
12+
Provide the location of the documentation, e.g. an URL to a section of the readme.
13+
14+
#### Documentation problem
15+
16+
Provide a description of what documentation you believe needs to be fixed/improved.
17+
18+
#### Suggested fix for documentation
19+
20+
Explain the suggested fix and **why** it's better than the existing documentation.

.github/ISSUE_TEMPLATE/enhancement.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
3+
name: Enhancement
4+
about: Suggest an idea for cookiecutter-pytask
5+
title: "ENH:"
6+
labels: "enhancement"
7+
8+
---
9+
10+
#### Is your feature request related to a problem?
11+
12+
Provide a description of what the problem is, e.g. "I wish I could use
13+
cookiecutter-pytask to do [...]".
14+
15+
#### Describe the solution you'd like
16+
17+
Provide a description of the feature request and how it might be implemented.
18+
19+
#### API breaking implications
20+
21+
Provide a description of how this feature will affect the API.
22+
23+
#### Describe alternatives you've considered
24+
25+
Provide a description of any alternative solutions or features you've considered.
26+
27+
#### Additional context
28+
29+
Add any other context, code examples, or references to existing implementations about
30+
the feature request here.
31+
32+
```python
33+
# Your code here, if applicable
34+
```

.github/ISSUE_TEMPLATE/question.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
3+
name: Submit Question
4+
about: Ask a general question about cookiecutter-pytask
5+
title: "QST:"
6+
labels: "question"
7+
8+
---
9+
10+
#### Question about pytask
11+
12+
**Note**: If you'd still like to submit a question, please read [this guide](
13+
https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to
14+
provide the necessary information for us to reproduce your question.
15+
16+
```python
17+
# Your code here, if applicable
18+
```

.github/pull_request_template.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#### Changes
2+
3+
Provide a description and/or bullet points to describe the changes in this PR.
4+
5+
#### Todo
6+
7+
- [ ] Reference issues which can be closed due to this PR with "Closes #x".
8+
- [ ] Review whether the documentation needs to be updated.
9+
- [ ] Document PR in CHANGES.rst.

.github/workflows/main.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
13+
run-tests:
14+
15+
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
16+
runs-on: ${{ matrix.os }}
17+
env:
18+
CONDA_EXE: mamba
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
24+
python-version: ['3.7', '3.8', '3.9']
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- uses: conda-incubator/setup-miniconda@v2
29+
with:
30+
auto-update-conda: true
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Install core dependencies.
34+
shell: bash -l {0}
35+
run: conda install -c conda-forge tox-conda coverage
36+
37+
# Unit, integration, and end-to-end tests.
38+
39+
# - name: Run unit tests and doctests.
40+
# shell: bash -l {0}
41+
# run: tox -e pytest -- "\{\{cookiecutter.project_slug\}\}" tests -m "unit or (not integration and not end_to_end)" --cov=./ --cov-report=xml -n auto
42+
43+
# - name: Upload coverage report for unit tests and doctests.
44+
# if: runner.os == 'Linux' && matrix.python-version == '3.8'
45+
# shell: bash -l {0}
46+
# run: bash <(curl -s https://codecov.io/bash) -F unit -c
47+
48+
# - name: Run integration tests.
49+
# shell: bash -l {0}
50+
# run: tox -e pytest -- "\{\{cookiecutter.project_slug\}\}" tests -m integration --cov=./ --cov-report=xml -n auto
51+
52+
# - name: Upload coverage reports of integration tests.
53+
# if: runner.os == 'Linux' && matrix.python-version == '3.8'
54+
# shell: bash -l {0}
55+
# run: bash <(curl -s https://codecov.io/bash) -F integration -c
56+
57+
- name: Run end-to-end tests.
58+
shell: bash -l {0}
59+
run: tox -e pytest -- "\{\{cookiecutter.project_slug\}\}" tests -m end_to_end --cov=./ --cov-report=xml -n auto
60+
61+
- name: Upload coverage reports of end-to-end tests.
62+
if: runner.os == 'Linux' && matrix.python-version == '3.8'
63+
shell: bash -l {0}
64+
run: bash <(curl -s https://codecov.io/bash) -F end_to_end -c
65+
66+
67+
docs:
68+
69+
name: Run documentation.
70+
runs-on: ubuntu-latest
71+
72+
steps:
73+
- uses: actions/checkout@v2
74+
- uses: conda-incubator/setup-miniconda@v2
75+
with:
76+
auto-update-conda: true
77+
78+
- name: Install core dependencies.
79+
shell: bash -l {0}
80+
run: conda install -c conda-forge tox-conda
81+
82+
- name: Build docs
83+
shell: bash -l {0}
84+
run: tox -e sphinx

.gitignore

+24-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ instance/
6969
.scrapy
7070

7171
# Sphinx documentation
72-
docs/_build/
72+
docs/build/
7373

7474
# PyBuilder
7575
target/
@@ -127,3 +127,26 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
# Files
132+
.coverage
133+
coverage.*
134+
135+
# Folders
136+
.idea
137+
.ipynb_checkpoints
138+
.tox
139+
.vscode
140+
_build
141+
__pycache__
142+
_generated
143+
144+
*.egg-info
145+
.eggs
146+
147+
.pytask.sqlite3
148+
149+
build
150+
dist
151+
152+
version.py

.pre-commit-config.yaml

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-added-large-files
6+
args: ['--maxkb=25']
7+
- id: check-case-conflict
8+
- id: check-merge-conflict
9+
- id: check-vcs-permalinks
10+
- id: check-yaml
11+
exclude: "{{cookiecutter.project_slug}}/environment.yml"
12+
- id: debug-statements
13+
- id: end-of-file-fixer
14+
- id: fix-byte-order-marker
15+
- id: forbid-new-submodules
16+
- id: mixed-line-ending
17+
- id: no-commit-to-branch
18+
args: [--branch, main]
19+
- id: trailing-whitespace
20+
- repo: https://github.com/pre-commit/pygrep-hooks
21+
rev: v1.9.0
22+
hooks:
23+
- id: python-check-blanket-noqa
24+
- id: python-check-mock-methods
25+
- id: python-no-eval
26+
- id: python-no-log-warn
27+
- id: python-use-type-annotations
28+
- id: rst-backticks
29+
- id: rst-directive-colons
30+
- id: rst-inline-touching-normal
31+
- id: text-unicode-replacement-char
32+
- repo: https://github.com/asottile/pyupgrade
33+
rev: v2.29.1
34+
hooks:
35+
- id: pyupgrade
36+
args: [--py36-plus]
37+
- repo: https://github.com/asottile/reorder_python_imports
38+
rev: v2.6.0
39+
hooks:
40+
- id: reorder-python-imports
41+
- repo: https://github.com/asottile/setup-cfg-fmt
42+
rev: v1.20.0
43+
hooks:
44+
- id: setup-cfg-fmt
45+
- repo: https://github.com/psf/black
46+
rev: 21.12b0
47+
hooks:
48+
- id: black
49+
- repo: https://github.com/asottile/blacken-docs
50+
rev: v1.12.0
51+
hooks:
52+
- id: blacken-docs
53+
additional_dependencies: [black]
54+
- repo: https://github.com/PyCQA/flake8
55+
rev: 4.0.1
56+
hooks:
57+
- id: flake8
58+
additional_dependencies: [
59+
flake8-alfred,
60+
flake8-bugbear,
61+
flake8-builtins,
62+
flake8-comprehensions,
63+
flake8-docstrings,
64+
flake8-eradicate,
65+
flake8-print,
66+
flake8-pytest-style,
67+
flake8-todo,
68+
flake8-typing-imports,
69+
flake8-unused-arguments,
70+
pep8-naming,
71+
pydocstyle,
72+
Pygments,
73+
]
74+
- repo: https://github.com/PyCQA/doc8
75+
rev: 0.10.1
76+
hooks:
77+
- id: doc8
78+
- repo: https://github.com/econchick/interrogate
79+
rev: 1.5.0
80+
hooks:
81+
- id: interrogate
82+
args: [-v, --fail-under=40, "{{cookiecutter.project_slug}}"]
83+
pass_filenames: false
84+
- repo: https://github.com/codespell-project/codespell
85+
rev: v2.1.0
86+
hooks:
87+
- id: codespell
88+
- repo: https://github.com/guilatrova/tryceratops
89+
rev: v1.0.0
90+
hooks:
91+
- id: tryceratops
92+
- repo: https://github.com/pre-commit/mirrors-mypy
93+
rev: 'v0.910-1'
94+
hooks:
95+
- id: mypy
96+
args: [
97+
--no-strict-optional,
98+
--ignore-missing-imports,
99+
]
100+
pass_filenames: false
101+
language_version: "3.9"
102+
- repo: meta
103+
hooks:
104+
- id: check-hooks-apply
105+
- id: check-useless-excludes
106+
# - id: identity # Prints all files passed to pre-commits. Debugging.

.readthedocs.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
3+
build:
4+
image: latest
5+
6+
python:
7+
version: 3.8
8+
9+
conda:
10+
environment: docs/rtd_environment.yml

CHANGES.rst

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Changes
2+
=======
3+
4+
This is a record of all past cookiecutter-pytask releases and what went into them in
5+
reverse chronological order.
6+
7+
8+
1.0.0 - 2021-12-22
9+
------------------
10+
11+
- :gh:`1` creates first release of a minimal cookiecutter template for a pytask project.

0 commit comments

Comments
 (0)