Skip to content
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

feat!: Update cookiecutters to Python 3.12 #487

Merged
merged 3 commits into from
Sep 27, 2024
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: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version:
- '3.8'
- '3.11'
- '3.12'
toxenv: [py, quality]

steps:
Expand Down Expand Up @@ -53,8 +52,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version:
- '3.8'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v4

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
$(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in
$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
$(PIP_COMPILE) --allow-unsafe -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) --allow-unsafe -o requirements/test.txt requirements/test.in
$(PIP_COMPILE) --allow-unsafe -o requirements/ci.txt requirements/ci.in
$(PIP_COMPILE) --allow-unsafe -o requirements/dev.txt requirements/dev.in

make upgrade_template

Expand Down Expand Up @@ -60,4 +60,4 @@ test: ## run tests on every supported Python version
tox

validate: ## run tests and quality checks
tox -e quality,py38
tox -e quality,py
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Using the cookiecutters
cd edx-cookiecutters

# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
mkvirtualenv -p python3.8 edx-cookiecutters
mkvirtualenv -p python3.12 edx-cookiecutters

2. Create a cookiecutter Repository
===================================
Expand Down Expand Up @@ -77,7 +77,7 @@ Directions for contributing to this repository
cd edx-cookiecutters

# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
mkvirtualenv -p python3.8 edx-cookiecutters
mkvirtualenv -p python3.12 edx-cookiecutters
# Activate the virtualenv
workon edx-cookiecutters

Expand Down
5 changes: 2 additions & 3 deletions cookiecutter-django-app/{{cookiecutter.repo_name}}/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}
envlist = py312-django{42}

[doc8]
; D001 = Line too long
Expand Down Expand Up @@ -36,8 +36,7 @@ norecursedirs = .* docs requirements site-packages

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.0,<5.0
-r{toxinidir}/requirements/test.txt
commands =
python manage.py check
Expand Down
5 changes: 2 additions & 3 deletions cookiecutter-django-ida/{{cookiecutter.repo_name}}/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}, quality, docs, pii_check
envlist = py312-django{42}, quality, docs, pii_check
skipsdist = true

[doc8]
Expand Down Expand Up @@ -43,8 +43,7 @@ filterwarnings =

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.0,<5.0
-r{toxinidir}/requirements/test.txt
commands =
pytest {posargs}
Expand Down
5 changes: 2 additions & 3 deletions cookiecutter-xblock/{{cookiecutter.repo_name}}/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}, quality, docs
envlist = py312-django{42}, quality, docs
skipsdist = true

[doc8]
Expand Down Expand Up @@ -37,8 +37,7 @@ norecursedirs = .* docs requirements site-packages

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.0,<5.0
-r{toxinidir}/requirements/test.txt
allowlist_externals =
mkdir
Expand Down
14 changes: 7 additions & 7 deletions python-template/{{cookiecutter.placeholder_repo_name}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
pip install -r requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
$(PIP_COMPILE) --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in
$(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in
$(PIP_COMPILE) --allow-unsafe -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -r requirements/pip-tools.txt
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
$(PIP_COMPILE) -o requirements/doc.txt requirements/doc.in
$(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in
$(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in
$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
$(PIP_COMPILE) --allow-unsafe -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) --allow-unsafe -o requirements/test.txt requirements/test.in
$(PIP_COMPILE) --allow-unsafe -o requirements/doc.txt requirements/doc.in
$(PIP_COMPILE) --allow-unsafe -o requirements/quality.txt requirements/quality.in
$(PIP_COMPILE) --allow-unsafe -o requirements/ci.txt requirements/ci.in
$(PIP_COMPILE) --allow-unsafe -o requirements/dev.txt requirements/dev.in

quality: ## check coding style with pycodestyle and pylint
touch tests/__init__.py
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Core requirements for using this application
-c constraints.txt

setuptools
Original file line number Diff line number Diff line change
@@ -1,34 +1,23 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
build==1.1.1
build==1.2.2
# via pip-tools
click==8.1.7
# via pip-tools
importlib-metadata==6.11.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# build
packaging==24.0
packaging==24.1
# via build
pip-tools==7.4.1
# via -r python-template/{{cookiecutter.placeholder_repo_name}}/requirements/pip-tools.in
pyproject-hooks==1.0.0
# via
# build
# pip-tools
tomli==2.0.1
pyproject-hooks==1.1.0
# via
# build
# pip-tools
# pyproject-hooks
wheel==0.43.0
wheel==0.44.0
# via pip-tools
zipp==3.18.1
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
wheel==0.42.0
wheel==0.44.0
# via -r python-template/{{cookiecutter.placeholder_repo_name}}/requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==24.0
pip==24.2
# via -r python-template/{{cookiecutter.placeholder_repo_name}}/requirements/pip.in
setuptools==69.1.1
setuptools==75.1.0
# via -r python-template/{{cookiecutter.placeholder_repo_name}}/requirements/pip.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{38}
envlist = py{312}

[doc8]
; D001 = Line too long
Expand Down
43 changes: 18 additions & 25 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
arrow==1.3.0
# via cookiecutter
astroid==3.1.0
astroid==3.3.4
# via
# pylint
# pylint-celery
binaryornot==0.4.4
# via cookiecutter
certifi==2024.2.2
certifi==2024.8.30
# via requests
chardet==5.2.0
# via binaryornot
Expand All @@ -26,19 +26,19 @@ click==8.1.7
# edx-lint
click-log==0.4.0
# via edx-lint
code-annotations==1.7.0
code-annotations==1.8.0
# via edx-lint
cookiecutter==2.6.0
# via -r requirements/base.in
dill==0.3.8
# via pylint
edx-lint==5.3.6
edx-lint==5.4.0
# via -r requirements/base.in
idna==3.6
idna==3.10
# via requests
isort==5.13.2
# via pylint
jinja2==3.1.3
jinja2==3.1.4
# via
# code-annotations
# cookiecutter
Expand All @@ -50,13 +50,13 @@ mccabe==0.7.0
# via pylint
mdurl==0.1.2
# via markdown-it-py
pbr==6.0.0
pbr==6.1.0
# via stevedore
platformdirs==4.2.0
platformdirs==4.3.6
# via pylint
pygments==2.17.2
pygments==2.18.0
# via rich
pylint==3.1.0
pylint==3.3.1
# via
# edx-lint
# pylint-celery
Expand All @@ -76,32 +76,25 @@ python-slugify==8.0.4
# via
# code-annotations
# cookiecutter
pyyaml==6.0.1
pyyaml==6.0.2
# via
# code-annotations
# cookiecutter
requests==2.31.0
requests==2.32.3
# via cookiecutter
rich==13.7.1
rich==13.8.1
# via cookiecutter
six==1.16.0
# via
# edx-lint
# python-dateutil
stevedore==5.2.0
stevedore==5.3.0
# via code-annotations
text-unidecode==1.3
# via python-slugify
tomli==2.0.1
tomlkit==0.13.2
# via pylint
tomlkit==0.12.4
# via pylint
types-python-dateutil==2.9.0.20240316
types-python-dateutil==2.9.0.20240906
# via arrow
typing-extensions==4.10.0
# via
# astroid
# pylint
# rich
urllib3==2.2.1
urllib3==2.2.3
# via requests
22 changes: 9 additions & 13 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
cachetools==5.3.3
cachetools==5.5.0
# via tox
chardet==5.2.0
# via tox
colorama==0.4.6
# via tox
distlib==0.3.8
# via virtualenv
filelock==3.13.3
filelock==3.16.1
# via
# tox
# virtualenv
packaging==24.0
packaging==24.1
# via
# pyproject-api
# tox
platformdirs==4.2.0
platformdirs==4.3.6
# via
# tox
# virtualenv
pluggy==1.4.0
pluggy==1.5.0
# via tox
pyproject-api==1.6.1
pyproject-api==1.8.0
# via tox
tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.14.2
tox==4.20.0
# via -r requirements/ci.in
virtualenv==20.25.1
virtualenv==20.26.5
# via tox
Loading