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

Running tests using python 3.12 #163

Merged
merged 25 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 21 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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # Add macos-latest later?
python-version: ['3.8']
toxenv: ["py38-django32", "py38-django42", "package", "quality"]
python-version: ['3.8','3.12']
toxenv: ["django42", "package", "quality"]
# We're only testing against MySQL 8 right now because 5.7 is
# incompatible with Djagno 4.2. We'd have to make the tox.ini file more
# complicated than it's worth given the short expected shelf-life of
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ PIP_COMPILE = pip-compile --rebuild $(PIP_COMPILE_OPTS)
compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
compile-requirements: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -qr requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
# Make sure to compile files after any other files they include!
$(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in
$(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/doc.txt requirements/doc.in
Expand Down
2 changes: 1 addition & 1 deletion openedx_learning/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
Open edX Learning ("Learning Core").
"""
__version__ = "0.6.3"
__version__ = "0.7.0"
3 changes: 2 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ asgiref==3.7.2
# via django
attrs==23.2.0
# via -r requirements/base.in
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# celery
# kombu
billiard==4.2.0
Expand Down
1 change: 1 addition & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ tox<4.0.0

# Develop primarily on Django 3.2, but we'll want to start testing against 4.2
Django<4.0
backports-zoneinfo[tzdata]; python_version < '3.9'
21 changes: 6 additions & 15 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ astroid==3.1.0
# pylint-celery
attrs==23.2.0
# via -r requirements/quality.txt
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# celery
# kombu
Expand Down Expand Up @@ -92,8 +93,7 @@ cryptography==42.0.5
# via
# -r requirements/quality.txt
# pyjwt
# secretstorage
ddt==1.7.1
ddt==1.7.2
# via -r requirements/quality.txt
diff-cover==8.0.3
# via -r requirements/dev.in
Expand Down Expand Up @@ -215,17 +215,12 @@ jaraco-classes==3.3.1
# via
# -r requirements/quality.txt
# keyring
jeepney==0.8.0
# via
# -r requirements/quality.txt
# keyring
# secretstorage
jinja2==3.1.3
# via
# -r requirements/quality.txt
# code-annotations
# diff-cover
keyring==24.3.0
keyring==24.3.1
# via
# -r requirements/quality.txt
# twine
Expand Down Expand Up @@ -399,7 +394,7 @@ pyyaml==6.0.1
# -r requirements/quality.txt
# code-annotations
# edx-i18n-tools
readme-renderer==42.0
readme-renderer==43.0
# via
# -r requirements/quality.txt
# twine
Expand All @@ -424,10 +419,6 @@ rich==13.7.0
# twine
rules==3.3
# via -r requirements/quality.txt
secretstorage==3.3.3
# via
# -r requirements/quality.txt
# keyring
semantic-version==2.10.0
# via
# -r requirements/quality.txt
Expand Down Expand Up @@ -473,7 +464,7 @@ tomli==2.0.1
# pyproject-hooks
# pytest
# tox
tomlkit==0.12.3
tomlkit==0.12.4
# via
# -r requirements/quality.txt
# pylint
Expand Down
7 changes: 4 additions & 3 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ babel==2.14.0
# via
# pydata-sphinx-theme
# sphinx
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# celery
# kombu
Expand Down Expand Up @@ -80,7 +81,7 @@ cryptography==42.0.5
# via
# -r requirements/test.txt
# pyjwt
ddt==1.7.1
ddt==1.7.2
# via -r requirements/test.txt
django==3.2.24
# via
Expand Down Expand Up @@ -274,7 +275,7 @@ pyyaml==6.0.1
# via
# -r requirements/test.txt
# code-annotations
readme-renderer==42.0
readme-renderer==43.0
# via -r requirements/doc.in
requests==2.31.0
# via
Expand Down
10 changes: 5 additions & 5 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
wheel==0.36.2
wheel==0.42.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==20.3.3
pip==24.0
# via -r requirements/pip.in
setuptools==51.3.3
setuptools==69.1.1
# via -r requirements/pip.in
18 changes: 6 additions & 12 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ astroid==3.1.0
# pylint-celery
attrs==23.2.0
# via -r requirements/test.txt
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# celery
# kombu
Expand Down Expand Up @@ -80,8 +81,7 @@ cryptography==42.0.5
# via
# -r requirements/test.txt
# pyjwt
# secretstorage
ddt==1.7.1
ddt==1.7.2
# via -r requirements/test.txt
dill==0.3.8
# via pylint
Expand Down Expand Up @@ -173,15 +173,11 @@ isort==5.13.2
# pylint
jaraco-classes==3.3.1
# via keyring
jeepney==0.8.0
# via
# keyring
# secretstorage
jinja2==3.1.3
# via
# -r requirements/test.txt
# code-annotations
keyring==24.3.0
keyring==24.3.1
# via twine
kombu==5.3.5
# via
Expand Down Expand Up @@ -304,7 +300,7 @@ pyyaml==6.0.1
# via
# -r requirements/test.txt
# code-annotations
readme-renderer==42.0
readme-renderer==43.0
# via twine
requests==2.31.0
# via
Expand All @@ -321,8 +317,6 @@ rich==13.7.0
# via twine
rules==3.3
# via -r requirements/test.txt
secretstorage==3.3.3
# via keyring
semantic-version==2.10.0
# via
# -r requirements/test.txt
Expand Down Expand Up @@ -358,7 +352,7 @@ tomli==2.0.1
# mypy
# pylint
# pytest
tomlkit==0.12.3
tomlkit==0.12.4
# via pylint
twine==5.0.0
# via -r requirements/quality.in
Expand Down
5 changes: 3 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ asgiref==3.7.2
# django
attrs==23.2.0
# via -r requirements/base.txt
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/base.txt
# celery
# kombu
Expand Down Expand Up @@ -70,7 +71,7 @@ cryptography==42.0.5
# via
# -r requirements/base.txt
# pyjwt
ddt==1.7.1
ddt==1.7.2
# via -r requirements/test.in
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,6 @@ def is_requirement(line):
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.12',
],
)
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,42}, quality, docs, pii_check, lint-imports
envlist = py{38,312}-django{42}, quality, docs, pii_check, lint-imports

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

[testenv]
deps =
django32: Django>=3.2,<3.3
setuptools
django42: Django>=4.2,<4.3
-r{toxinidir}/requirements/test.txt
setenv =
Expand Down Expand Up @@ -71,6 +71,8 @@ allowlist_externals =
rm
touch
deps =
setuptools
django42: Django>=4.2,<4.3
-r{toxinidir}/requirements/quality.txt
commands =
pylint openedx_learning openedx_tagging tests test_utils manage.py setup.py
Expand Down
Loading