Skip to content

Commit 5709324

Browse files
authored
Rename cookiecutter to cookiecutter-pytask-project (#4)
1 parent 734ec2a commit 5709324

20 files changed

+45
-129
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22

33
name: Bug Report
4-
about: Create a bug report to help us improve cookiecutter-pytask
4+
about: Create a bug report to help us improve cookiecutter-pytask-project
55
title: "BUG:"
66
labels: "bug"
77

88
---
99

1010
- [ ] I have checked that this issue has not already been reported.
1111

12-
- [ ] I have confirmed this bug exists on the latest version of cookiecutter-pytask.
12+
- [ ] I have confirmed this bug exists on the latest version of cookiecutter-pytask-project.
1313

1414
- [ ] (optional) I have confirmed this bug exists on the `main` branch of
15-
cookiecutter-pytask.
15+
cookiecutter-pytask-project.
1616

1717
---
1818

.github/ISSUE_TEMPLATE/enhancement.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

33
name: Enhancement
4-
about: Suggest an idea for cookiecutter-pytask
4+
about: Suggest an idea for cookiecutter-pytask-project
55
title: "ENH:"
66
labels: "enhancement"
77

@@ -10,7 +10,7 @@ labels: "enhancement"
1010
#### Is your feature request related to a problem?
1111

1212
Provide a description of what the problem is, e.g. "I wish I could use
13-
cookiecutter-pytask to do [...]".
13+
cookiecutter-pytask-project to do [...]".
1414

1515
#### Describe the solution you'd like
1616

.github/ISSUE_TEMPLATE/question.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

33
name: Submit Question
4-
about: Ask a general question about cookiecutter-pytask
4+
about: Ask a general question about cookiecutter-pytask-project
55
title: "QST:"
66
labels: "question"
77

.github/workflows/main.yml

+1-21
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,9 @@ jobs:
3434
shell: bash -l {0}
3535
run: conda install -c conda-forge tox-conda coverage
3636

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-
5737
- name: Run end-to-end tests.
5838
shell: bash -l {0}
59-
run: tox -e pytest -- "\{\{cookiecutter.project_slug\}\}" tests -m end_to_end --cov=./ --cov-report=xml -n auto
39+
run: tox -e pytest -- tests -m end_to_end --cov=./ --cov-report=xml -n auto
6040

6141
- name: Upload coverage reports of end-to-end tests.
6242
if: runner.os == 'Linux' && matrix.python-version == '3.8'

.pre-commit-config.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ repos:
3737
rev: v2.6.0
3838
hooks:
3939
- id: reorder-python-imports
40-
- repo: https://github.com/asottile/setup-cfg-fmt
41-
rev: v1.20.0
42-
hooks:
43-
- id: setup-cfg-fmt
4440
- repo: https://github.com/psf/black
4541
rev: 21.12b0
4642
hooks:

CHANGES.rst

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
Changes
22
=======
33

4-
This is a record of all past cookiecutter-pytask releases and what went into them in
5-
reverse chronological order.
4+
This is a record of all past cookiecutter-pytask-project releases and what went into
5+
them in reverse chronological order.
6+
7+
8+
1.1.0 - 2022-01-16
9+
------------------
10+
11+
- :gh:`4` renames the cookiecutter from cookiecutter-pytask to
12+
cookiecutter-pytask-project to avoid confusion with the cookiecutter for plugins. And
13+
remove unnecessary packaging stuff.
614

715

816
1.0.0 - 2021-01-05

README.rst

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
cookiecutter-pytask
2-
===================
1+
cookiecutter-pytask-project
2+
===========================
33

4-
.. image:: https://img.shields.io/github/license/pytask-dev/cookiecutter-pytask
4+
.. image:: https://img.shields.io/github/license/pytask-dev/cookiecutter-pytask-project
55
:alt: MIT license
66
:target: https://pypi.org/project/pytask
77

8-
.. image:: https://readthedocs.org/projects/cookiecutter-pytask/badge/?version=latest
9-
:target: https://cookiecutter-pytask.readthedocs.io/en/latest
8+
.. image:: https://readthedocs.org/projects/cookiecutter-pytask-project/badge/?version=latest
9+
:target: https://cookiecutter-pytask-project.readthedocs.io/en/latest
1010

11-
.. image:: https://img.shields.io/github/workflow/status/pytask-dev/cookiecutter-pytask/main/main
12-
:target: https://github.com/pytask-dev/cookiecutter-pytask/actions?query=branch%3Amain
11+
.. image:: https://img.shields.io/github/workflow/status/pytask-dev/cookiecutter-pytask-project/main/main
12+
:target: https://github.com/pytask-dev/cookiecutter-pytask-project/actions?query=branch%3Amain
1313

14-
.. image:: https://codecov.io/gh/pytask-dev/cookiecutter-pytask/branch/main/graph/badge.svg
15-
:target: https://codecov.io/gh/pytask-dev/cookiecutter-pytask
14+
.. image:: https://codecov.io/gh/pytask-dev/cookiecutter-pytask-project/branch/main/graph/badge.svg
15+
:target: https://codecov.io/gh/pytask-dev/cookiecutter-pytask-project
1616

17-
.. image:: https://results.pre-commit.ci/badge/github/pytask-dev/cookiecutter-pytask/main.svg
18-
:target: https://results.pre-commit.ci/latest/github/pytask-dev/cookiecutter-pytask/main
17+
.. image:: https://results.pre-commit.ci/badge/github/pytask-dev/cookiecutter-pytask-project/main.svg
18+
:target: https://results.pre-commit.ci/latest/github/pytask-dev/cookiecutter-pytask-project/main
1919
:alt: pre-commit.ci status
2020

2121
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
@@ -41,7 +41,7 @@ Then, set up the template with
4141

4242
.. code-block:: console
4343
44-
$ cookiecutter https://github.com/pytask-dev/cookiecutter-pytask
44+
$ cookiecutter https://github.com/pytask-dev/cookiecutter-pytask-project
4545
4646
4747
FAQ

docs/rtd_environment.yml

-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,3 @@ dependencies:
1717
- sphinx-click
1818
- sphinx-copybutton
1919
- sphinx-panels
20-
21-
- pip:
22-
- -e ..

docs/source/conf.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@
44
documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html
55
66
"""
7-
from importlib.metadata import version
8-
97
# -- Project information -----------------------------------------------------
108

11-
project = "cookiecutter-pytask"
9+
project = "cookiecutter-pytask-project"
1210
author = "Tobias Raabe"
1311
copyright = f"2021, {author}" # noqa: A001
1412

1513
# The version, including alpha/beta/rc tags, but not commit hash and datestamps
16-
release = version("cookiecutter-pytask")
14+
release = "1.1.0"
1715
# The short X.Y version.
18-
version = ".".join(release.split(".")[:2])
16+
version = "1.1"
1917

2018

2119
# -- General configuration ---------------------------------------------------

docs/source/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Welcome to cookiecutter-pytask's documentation!
2-
===============================================
1+
Welcome to cookiecutter-pytask-project's documentation!
2+
=======================================================
33

44
.. include:: ../../README.rst

hooks/post_gen_project.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ def main():
4646

4747
if "{{ cookiecutter.make_initial_commit }}" == "yes":
4848
# Create an initial commit on the main branch and restore global default name.
49-
p = subprocess.run(
50-
("git", "config", "init.defaultBranch"), check=True, capture_output=True
51-
)
52-
old_branch_default = p.stdout.decode().strip()
53-
subprocess.run(
54-
("git", "config", "--global", "init.defaultBranch", "main"), check=True
55-
)
5649
subprocess.run(
5750
("git", "config", "user.name", "'{{ cookiecutter.github_username }}'"),
5851
check=True,
@@ -67,10 +60,7 @@ def main():
6760
check=True,
6861
capture_output=True,
6962
)
70-
subprocess.run(
71-
("git", "config", "--global", "init.defaultBranch", old_branch_default),
72-
check=True,
73-
)
63+
subprocess.run(("git", "branch", "-m", "main"), check=True)
7464

7565
if "{{ cookiecutter.create_conda_environment_at_finish }}" == "yes":
7666
if shutil.which("mamba") is not None:

pyproject.toml

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
[build-system]
2-
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
3-
4-
5-
[tool.setuptools_scm]
6-
write_to = "version.py"
7-
8-
91
[tool.tryceratops]
102
ignore = ["TC003"]
113

124

135
[tool.mypy]
146
files = ["{{cookiecutter.project_slug}}", "tests"]
7+
exclude = "{{cookiecutter.project_slug}}/tests"
158
check_untyped_defs = true
169
disallow_any_generics = true
1710
disallow_incomplete_defs = true

setup.cfg

-39
This file was deleted.

setup.py

-5
This file was deleted.

tests/test_cookie.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
9393
result = cookies.bake(
9494
extra_context={
9595
"conda_environment_name": "__test__",
96+
"make_initial_commit": "yes",
9697
"create_conda_environment_at_finish": "yes",
9798
}
9899
)
@@ -107,7 +108,12 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
107108
("git", "checkout", "-b", "test"), cwd=result.project_path, check=True
108109
)
109110

110-
# Do not check exit code on Windows since something weird happens.
111+
# Check linting, but not on the first try since formatters fix stuff.
112+
subprocess.run(
113+
("conda", "run", "-n", "__test__", "pre-commit", "run", "--all-files"),
114+
cwd=result.project_path,
115+
check=False,
116+
)
111117
subprocess.run(
112118
("conda", "run", "-n", "__test__", "pre-commit", "run", "--all-files"),
113119
cwd=result.project_path,

tox.ini

-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ ignore =
5050
W503 ; ignore linebreak before binary operator which is enforced by Black.
5151
PT006 ; ignore that parametrizing tests with tuple argument names is preferred.
5252
max-line-length = 88
53-
per-file-ignores =
54-
src/_pytask/hookspecs.py: U100
55-
src/_pytask/outcomes.py: N818
56-
tests/test_capture.py: T000, T001, N802, PT011
5753
pytest-mark-no-parentheses = true
5854
warn-symbols =
5955
pytest.mark.wip = Remove 'wip' mark for tests.

{{cookiecutter.project_slug}}/.pre-commit-config.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ repos:
7878
rev: 1.5.0
7979
hooks:
8080
- id: interrogate
81-
args: [-v, --fail-under=40, "{{cookiecutter.project_slug}}"]
82-
pass_filenames: false
81+
args: [-v, --fail-under=40]
8382
- repo: https://github.com/codespell-project/codespell
8483
rev: v2.1.0
8584
hooks:

{{cookiecutter.project_slug}}/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ Credits
3939
-------
4040

4141
This project was created with `cookiecutter <https://github.com/audreyr/cookiecutter>`_
42-
and the `cookiecutter-pytask <https://github.com/pytask-dev/cookiecutter-pytask>`_
42+
and the `cookiecutter-pytask-project <https://github.com/pytask-dev/cookiecutter-pytask-project>`_
4343
template.

{{cookiecutter.project_slug}}/environment.yml

-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,3 @@ dependencies:
3232
- sphinx-click
3333
- sphinx-copybutton
3434
- sphinx-panels
35-
36-
- pip:
37-
- -e .

{{cookiecutter.project_slug}}/tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)