mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-17 18:34:52 +03:00
Merge pull request #41 from cookiecutter/master
update to upstream v`2022.05.06`
This commit is contained in:
commit
b731fe60e4
5
.github/contributors.json
vendored
5
.github/contributors.json
vendored
|
@ -1257,5 +1257,10 @@
|
||||||
"name": "innicoder",
|
"name": "innicoder",
|
||||||
"github_login": "innicoder",
|
"github_login": "innicoder",
|
||||||
"twitter_username": ""
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Naveen",
|
||||||
|
"github_login": "naveensrinivasan",
|
||||||
|
"twitter_username": "snaveen"
|
||||||
}
|
}
|
||||||
]
|
]
|
6
.github/workflows/pre-commit-autoupdate.yml
vendored
6
.github/workflows/pre-commit-autoupdate.yml
vendored
|
@ -8,10 +8,16 @@ on:
|
||||||
- cron: "15 2 * * *"
|
- cron: "15 2 * * *"
|
||||||
workflow_dispatch: # to trigger manually
|
workflow_dispatch: # to trigger manually
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-update:
|
auto-update:
|
||||||
# Disables this workflow from running in a repository that is not part of the indicated organization/user
|
# Disables this workflow from running in a repository that is not part of the indicated organization/user
|
||||||
if: github.repository_owner == 'cookiecutter'
|
if: github.repository_owner == 'cookiecutter'
|
||||||
|
permissions:
|
||||||
|
contents: write # for peter-evans/create-pull-request to create branch
|
||||||
|
pull-requests: write # for peter-evans/create-pull-request to create a PR
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
5
.github/workflows/update-contributors.yml
vendored
5
.github/workflows/update-contributors.yml
vendored
|
@ -5,10 +5,15 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# Disables this workflow from running in a repository that is not part of the indicated organization/user
|
# Disables this workflow from running in a repository that is not part of the indicated organization/user
|
||||||
if: github.repository_owner == 'cookiecutter'
|
if: github.repository_owner == 'cookiecutter'
|
||||||
|
permissions:
|
||||||
|
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -8,6 +8,13 @@ repos:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
|
|
||||||
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
|
rev: v2.32.1
|
||||||
|
hooks:
|
||||||
|
- id: pyupgrade
|
||||||
|
args: [--py39-plus]
|
||||||
|
exclude: hooks/
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.3.0
|
rev: 22.3.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
18
CHANGELOG.md
18
CHANGELOG.md
|
@ -3,6 +3,24 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
||||||
|
|
||||||
<!-- GENERATOR_PLACEHOLDER -->
|
<!-- GENERATOR_PLACEHOLDER -->
|
||||||
|
|
||||||
|
## 2022.05.07
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Add pyupgrade to pre-commit config ([#3702](https://github.com/cookiecutter/cookiecutter-django/pull/3702))
|
||||||
|
- Set permissions for GitHub actions ([#3698](https://github.com/cookiecutter/cookiecutter-django/pull/3698))
|
||||||
|
### Updated
|
||||||
|
- Update jinja2 to 3.1.2 ([#3700](https://github.com/cookiecutter/cookiecutter-django/pull/3700))
|
||||||
|
|
||||||
|
## 2022.05.06
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update pre-commit to 2.19.0 ([#3697](https://github.com/cookiecutter/cookiecutter-django/pull/3697))
|
||||||
|
|
||||||
|
## 2022.05.04
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Update django-coverage-plugin to 2.0.3 ([#3695](https://github.com/cookiecutter/cookiecutter-django/pull/3695))
|
||||||
|
|
||||||
## 2022.05.03
|
## 2022.05.03
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
|
@ -1349,6 +1349,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Naveen</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/naveensrinivasan">naveensrinivasan</a>
|
||||||
|
</td>
|
||||||
|
<td>snaveen</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Nico Stefani</td>
|
<td>Nico Stefani</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -39,7 +39,7 @@ master_doc = "index"
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = "Cookiecutter Django"
|
project = "Cookiecutter Django"
|
||||||
copyright = "2013-{}, Daniel Roy Greenfeld".format(now.year)
|
copyright = f"2013-{now.year}, Daniel Roy Greenfeld"
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
|
|
|
@ -8,7 +8,7 @@ black==22.3.0
|
||||||
isort==5.10.1
|
isort==5.10.1
|
||||||
flake8==4.0.1
|
flake8==4.0.1
|
||||||
flake8-isort==4.1.1
|
flake8-isort==4.1.1
|
||||||
pre-commit==2.18.1
|
pre-commit==2.19.0
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
@ -22,5 +22,5 @@ pyyaml==6.0
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
PyGithub==1.55
|
PyGithub==1.55
|
||||||
gitpython==3.1.27
|
gitpython==3.1.27
|
||||||
jinja2==3.1.1
|
jinja2==3.1.2
|
||||||
requests==2.27.1
|
requests==2.27.1
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ except ImportError:
|
||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
# We use calendar versioning
|
# We use calendar versioning
|
||||||
version = "2022.05.03"
|
version = "2022.05.07"
|
||||||
|
|
||||||
with open("README.rst") as readme_file:
|
with open("README.rst") as readme_file:
|
||||||
long_description = readme_file.read()
|
long_description = readme_file.read()
|
||||||
|
|
|
@ -149,7 +149,7 @@ def check_paths(paths):
|
||||||
if is_binary(path):
|
if is_binary(path):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for line in open(path, "r"):
|
for line in open(path):
|
||||||
match = RE_OBJ.search(line)
|
match = RE_OBJ.search(line)
|
||||||
assert match is None, f"cookiecutter variable not replaced in {path}"
|
assert match is None, f"cookiecutter variable not replaced in {path}"
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@ def test_travis_invokes_pytest(cookies, context, use_docker, expected_test_scrip
|
||||||
assert result.project_path.name == context["project_slug"]
|
assert result.project_path.name == context["project_slug"]
|
||||||
assert result.project_path.is_dir()
|
assert result.project_path.is_dir()
|
||||||
|
|
||||||
with open(f"{result.project_path}/.travis.yml", "r") as travis_yml:
|
with open(f"{result.project_path}/.travis.yml") as travis_yml:
|
||||||
try:
|
try:
|
||||||
yml = yaml.safe_load(travis_yml)["jobs"]["include"]
|
yml = yaml.safe_load(travis_yml)["jobs"]["include"]
|
||||||
assert yml[0]["script"] == ["flake8"]
|
assert yml[0]["script"] == ["flake8"]
|
||||||
|
@ -241,7 +241,7 @@ def test_gitlab_invokes_flake8_and_pytest(
|
||||||
assert result.project_path.name == context["project_slug"]
|
assert result.project_path.name == context["project_slug"]
|
||||||
assert result.project_path.is_dir()
|
assert result.project_path.is_dir()
|
||||||
|
|
||||||
with open(f"{result.project_path}/.gitlab-ci.yml", "r") as gitlab_yml:
|
with open(f"{result.project_path}/.gitlab-ci.yml") as gitlab_yml:
|
||||||
try:
|
try:
|
||||||
gitlab_config = yaml.safe_load(gitlab_yml)
|
gitlab_config = yaml.safe_load(gitlab_yml)
|
||||||
assert gitlab_config["flake8"]["script"] == ["flake8"]
|
assert gitlab_config["flake8"]["script"] == ["flake8"]
|
||||||
|
@ -268,7 +268,7 @@ def test_github_invokes_linter_and_pytest(
|
||||||
assert result.project_path.name == context["project_slug"]
|
assert result.project_path.name == context["project_slug"]
|
||||||
assert result.project_path.is_dir()
|
assert result.project_path.is_dir()
|
||||||
|
|
||||||
with open(f"{result.project_path}/.github/workflows/ci.yml", "r") as github_yml:
|
with open(f"{result.project_path}/.github/workflows/ci.yml") as github_yml:
|
||||||
try:
|
try:
|
||||||
github_config = yaml.safe_load(github_yml)
|
github_config = yaml.safe_load(github_yml)
|
||||||
linter_present = False
|
linter_present = False
|
||||||
|
@ -319,6 +319,6 @@ def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist)
|
||||||
context.update({"use_pycharm": use_pycharm})
|
context.update({"use_pycharm": use_pycharm})
|
||||||
result = cookies.bake(extra_context=context)
|
result = cookies.bake(extra_context=context)
|
||||||
|
|
||||||
with open(f"{result.project_path}/docs/index.rst", "r") as f:
|
with open(f"{result.project_path}/docs/index.rst") as f:
|
||||||
has_pycharm_docs = "pycharm/configuration" in f.read()
|
has_pycharm_docs = "pycharm/configuration" in f.read()
|
||||||
assert has_pycharm_docs is pycharm_docs_exist
|
assert has_pycharm_docs is pycharm_docs_exist
|
||||||
|
|
|
@ -9,6 +9,12 @@ repos:
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
|
|
||||||
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
|
rev: v2.32.1
|
||||||
|
hooks:
|
||||||
|
- id: pyupgrade
|
||||||
|
args: [--py39-plus]
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.3.0
|
rev: 22.3.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -18,7 +18,7 @@ def merge(
|
||||||
) -> None:
|
) -> None:
|
||||||
with open(output_file_path, "w") as output_file:
|
with open(output_file_path, "w") as output_file:
|
||||||
for merged_file_path in merged_file_paths:
|
for merged_file_path in merged_file_paths:
|
||||||
with open(merged_file_path, "r") as merged_file:
|
with open(merged_file_path) as merged_file:
|
||||||
merged_file_content = merged_file.read()
|
merged_file_content = merged_file.read()
|
||||||
output_file.write(merged_file_content)
|
output_file.write(merged_file_content)
|
||||||
if append_linesep:
|
if append_linesep:
|
||||||
|
@ -41,7 +41,7 @@ def test_merge(tmpdir_factory, merged_file_count: int, append_linesep: bool):
|
||||||
for i in range(merged_file_count):
|
for i in range(merged_file_count):
|
||||||
merged_file_ord = i + 1
|
merged_file_ord = i + 1
|
||||||
|
|
||||||
merged_filename = ".service{}".format(merged_file_ord)
|
merged_filename = f".service{merged_file_ord}"
|
||||||
merged_file_path = tmp_dir_path / merged_filename
|
merged_file_path = tmp_dir_path / merged_filename
|
||||||
|
|
||||||
merged_file_content = merged_filename * merged_file_ord
|
merged_file_content = merged_filename * merged_file_ord
|
||||||
|
@ -57,7 +57,7 @@ def test_merge(tmpdir_factory, merged_file_count: int, append_linesep: bool):
|
||||||
|
|
||||||
merge(output_file_path, merged_file_paths, append_linesep)
|
merge(output_file_path, merged_file_paths, append_linesep)
|
||||||
|
|
||||||
with open(output_file_path, "r") as output_file:
|
with open(output_file_path) as output_file:
|
||||||
actual_output_file_content = output_file.read()
|
actual_output_file_content = output_file.read()
|
||||||
|
|
||||||
assert actual_output_file_content == expected_output_file_content
|
assert actual_output_file_content == expected_output_file_content
|
||||||
|
|
|
@ -41,7 +41,7 @@ pylint-django==2.5.3 # https://github.com/PyCQA/pylint-django
|
||||||
{%- if cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
pre-commit==2.18.1 # https://github.com/pre-commit/pre-commit
|
pre-commit==2.19.0 # https://github.com/pre-commit/pre-commit
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
__version__ = "{{ cookiecutter.version }}"
|
__version__ = "{{ cookiecutter.version }}"
|
||||||
__version_info__ = tuple(
|
__version_info__ = tuple(
|
||||||
[
|
int(num) if num.isdigit() else num
|
||||||
int(num) if num.isdigit() else num
|
for num in __version__.replace("-", ".", 1).split(".")
|
||||||
for num in __version__.replace("-", ".", 1).split(".")
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user