Skip to content

Rename cookiecutter to cookiecutter-pytask-project #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---

name: Bug Report
about: Create a bug report to help us improve cookiecutter-pytask
about: Create a bug report to help us improve cookiecutter-pytask-project
title: "BUG:"
labels: "bug"

---

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

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

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

---

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

name: Enhancement
about: Suggest an idea for cookiecutter-pytask
about: Suggest an idea for cookiecutter-pytask-project
title: "ENH:"
labels: "enhancement"

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

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

#### Describe the solution you'd like

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

name: Submit Question
about: Ask a general question about cookiecutter-pytask
about: Ask a general question about cookiecutter-pytask-project
title: "QST:"
labels: "question"

Expand Down
22 changes: 1 addition & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,9 @@ jobs:
shell: bash -l {0}
run: conda install -c conda-forge tox-conda coverage

# Unit, integration, and end-to-end tests.

# - name: Run unit tests and doctests.
# shell: bash -l {0}
# run: tox -e pytest -- "\{\{cookiecutter.project_slug\}\}" tests -m "unit or (not integration and not end_to_end)" --cov=./ --cov-report=xml -n auto

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

# - name: Run integration tests.
# shell: bash -l {0}
# run: tox -e pytest -- "\{\{cookiecutter.project_slug\}\}" tests -m integration --cov=./ --cov-report=xml -n auto

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

- name: Run end-to-end tests.
shell: bash -l {0}
run: tox -e pytest -- "\{\{cookiecutter.project_slug\}\}" tests -m end_to_end --cov=./ --cov-report=xml -n auto
run: tox -e pytest -- tests -m end_to_end --cov=./ --cov-report=xml -n auto

- name: Upload coverage reports of end-to-end tests.
if: runner.os == 'Linux' && matrix.python-version == '3.8'
Expand Down
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ repos:
rev: v2.6.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.20.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
Expand Down
12 changes: 10 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
Changes
=======

This is a record of all past cookiecutter-pytask releases and what went into them in
reverse chronological order.
This is a record of all past cookiecutter-pytask-project releases and what went into
them in reverse chronological order.


1.1.0 - 2022-01-16
------------------

- :gh:`4` renames the cookiecutter from cookiecutter-pytask to
cookiecutter-pytask-project to avoid confusion with the cookiecutter for plugins. And
remove unnecessary packaging stuff.


1.0.0 - 2021-01-05
Expand Down
24 changes: 12 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
cookiecutter-pytask
===================
cookiecutter-pytask-project
===========================

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

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

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

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

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

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

.. code-block:: console

$ cookiecutter https://github.com/pytask-dev/cookiecutter-pytask
$ cookiecutter https://github.com/pytask-dev/cookiecutter-pytask-project


FAQ
Expand Down
3 changes: 0 additions & 3 deletions docs/rtd_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ dependencies:
- sphinx-click
- sphinx-copybutton
- sphinx-panels

- pip:
- -e ..
8 changes: 3 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
documentation: https://www.sphinx-doc.org/en/master/usage/configuration.html

"""
from importlib.metadata import version

# -- Project information -----------------------------------------------------

project = "cookiecutter-pytask"
project = "cookiecutter-pytask-project"
author = "Tobias Raabe"
copyright = f"2021, {author}" # noqa: A001

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


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Welcome to cookiecutter-pytask's documentation!
===============================================
Welcome to cookiecutter-pytask-project's documentation!
=======================================================

.. include:: ../../README.rst
12 changes: 1 addition & 11 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ def main():

if "{{ cookiecutter.make_initial_commit }}" == "yes":
# Create an initial commit on the main branch and restore global default name.
p = subprocess.run(
("git", "config", "init.defaultBranch"), check=True, capture_output=True
)
old_branch_default = p.stdout.decode().strip()
subprocess.run(
("git", "config", "--global", "init.defaultBranch", "main"), check=True
)
subprocess.run(
("git", "config", "user.name", "'{{ cookiecutter.github_username }}'"),
check=True,
Expand All @@ -67,10 +60,7 @@ def main():
check=True,
capture_output=True,
)
subprocess.run(
("git", "config", "--global", "init.defaultBranch", old_branch_default),
check=True,
)
subprocess.run(("git", "branch", "-m", "main"), check=True)

if "{{ cookiecutter.create_conda_environment_at_finish }}" == "yes":
if shutil.which("mamba") is not None:
Expand Down
9 changes: 1 addition & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]


[tool.setuptools_scm]
write_to = "version.py"


[tool.tryceratops]
ignore = ["TC003"]


[tool.mypy]
files = ["{{cookiecutter.project_slug}}", "tests"]
exclude = "{{cookiecutter.project_slug}}/tests"
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
Expand Down
39 changes: 0 additions & 39 deletions setup.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions setup.py

This file was deleted.

8 changes: 7 additions & 1 deletion tests/test_cookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
result = cookies.bake(
extra_context={
"conda_environment_name": "__test__",
"make_initial_commit": "yes",
"create_conda_environment_at_finish": "yes",
}
)
Expand All @@ -107,7 +108,12 @@ def test_check_conda_environment_creation_and_run_all_checks(cookies):
("git", "checkout", "-b", "test"), cwd=result.project_path, check=True
)

# Do not check exit code on Windows since something weird happens.
# Check linting, but not on the first try since formatters fix stuff.
subprocess.run(
("conda", "run", "-n", "__test__", "pre-commit", "run", "--all-files"),
cwd=result.project_path,
check=False,
)
subprocess.run(
("conda", "run", "-n", "__test__", "pre-commit", "run", "--all-files"),
cwd=result.project_path,
Expand Down
4 changes: 0 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ ignore =
W503 ; ignore linebreak before binary operator which is enforced by Black.
PT006 ; ignore that parametrizing tests with tuple argument names is preferred.
max-line-length = 88
per-file-ignores =
src/_pytask/hookspecs.py: U100
src/_pytask/outcomes.py: N818
tests/test_capture.py: T000, T001, N802, PT011
pytest-mark-no-parentheses = true
warn-symbols =
pytest.mark.wip = Remove 'wip' mark for tests.
Expand Down
3 changes: 1 addition & 2 deletions {{cookiecutter.project_slug}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ repos:
rev: 1.5.0
hooks:
- id: interrogate
args: [-v, --fail-under=40, "{{cookiecutter.project_slug}}"]
pass_filenames: false
args: [-v, --fail-under=40]
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ Credits
-------

This project was created with `cookiecutter <https://github.com/audreyr/cookiecutter>`_
and the `cookiecutter-pytask <https://github.com/pytask-dev/cookiecutter-pytask>`_
and the `cookiecutter-pytask-project <https://github.com/pytask-dev/cookiecutter-pytask-project>`_
template.
3 changes: 0 additions & 3 deletions {{cookiecutter.project_slug}}/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,3 @@ dependencies:
- sphinx-click
- sphinx-copybutton
- sphinx-panels

- pip:
- -e .
Empty file.