diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0182404..c493323 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,13 +16,12 @@ jobs: matrix: os: - ubuntu-20.04 - python-version: - - 3.8 - toxenv: [ py38, quality ] + python-version: ['3.8', '3.12'] + toxenv: [ unittest, quality ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -35,7 +34,7 @@ jobs: run: tox - name: Run Coverage - if: matrix.python-version == '3.8' && matrix.toxenv=='py38' + if: matrix.python-version == '3.8' && matrix.toxenv=='unittest' uses: codecov/codecov-action@v2 with: fail_ci_if_error: true diff --git a/Makefile b/Makefile index 0610314..e97c828 100644 --- a/Makefile +++ b/Makefile @@ -31,3 +31,4 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with pip-compile --rebuild --upgrade -o requirements/test.txt requirements/test.in pip-compile --rebuild --upgrade -o requirements/ci.txt requirements/ci.in pip-compile --rebuild --upgrade -o requirements/dev.txt requirements/dev.in + pip-compile --rebuild --upgrade -o requirements/quality.txt requirements/quality.in diff --git a/requirements/ci.txt b/requirements/ci.txt index 88a39ff..9f335db 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -16,7 +16,7 @@ filelock==3.13.1 # via # tox # virtualenv -packaging==23.2 +packaging==24.0 # via # pyproject-api # tox @@ -32,7 +32,7 @@ tomli==2.0.1 # via # pyproject-api # tox -tox==4.13.0 +tox==4.14.1 # via -r requirements/ci.in virtualenv==20.25.1 # via tox diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 96cc5db..e3bf8ea 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -21,3 +21,12 @@ elasticsearch<7.14.0 # django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected django-simple-history==3.0.0 + +# opentelemetry requires version 6.x at the moment: +# https://github.com/open-telemetry/opentelemetry-python/issues/3570 +# Normally this could be added as a constraint in edx-django-utils, where we're +# adding the opentelemetry dependency. However, when we compile pip-tools.txt, +# that uses version 7.x, and then there's no undoing that when compiling base.txt. +# So we need to pin it globally, for now. +# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407 +importlib-metadata<7 diff --git a/requirements/dev.txt b/requirements/dev.txt index 963cc00..da89842 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -35,7 +35,7 @@ click-log==0.4.0 # via # -r requirements/test.txt # edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via # -r requirements/test.txt # edx-lint @@ -44,7 +44,7 @@ colorama==0.4.6 # -r requirements/ci.txt # -r requirements/test.txt # tox -coverage==7.4.3 +coverage==7.4.4 # via -r requirements/test.txt ddt==1.7.2 # via -r requirements/test.txt @@ -71,8 +71,9 @@ filelock==3.13.1 # -r requirements/test.txt # tox # virtualenv -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c requirements/common_constraints.txt # -r requirements/pip-tools.txt # build iniconfig==2.0.0 @@ -99,7 +100,7 @@ mccabe==0.7.0 # pylint mock==5.1.0 # via -r requirements/test.txt -packaging==23.2 +packaging==24.0 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -112,7 +113,7 @@ pbr==6.0.0 # via # -r requirements/test.txt # stevedore -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.txt platformdirs==4.2.0 # via @@ -163,7 +164,7 @@ pyproject-hooks==1.0.0 # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.1.0 +pytest==8.1.1 # via -r requirements/test.txt python-slugify==8.0.4 # via @@ -202,7 +203,7 @@ tomlkit==0.12.4 # via # -r requirements/test.txt # pylint -tox==4.13.0 +tox==4.14.1 # via # -r requirements/ci.txt # -r requirements/test.txt @@ -217,11 +218,11 @@ virtualenv==20.25.1 # -r requirements/ci.txt # -r requirements/test.txt # tox -wheel==0.42.0 +wheel==0.43.0 # via # -r requirements/pip-tools.txt # pip-tools -zipp==3.17.0 +zipp==3.18.1 # via # -r requirements/pip-tools.txt # importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 8528adb..b1ac4e5 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -8,11 +8,13 @@ build==1.1.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==7.0.1 - # via build -packaging==23.2 +importlib-metadata==6.11.0 + # via + # -c requirements/common_constraints.txt + # build +packaging==24.0 # via build -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via @@ -23,9 +25,9 @@ tomli==2.0.1 # build # pip-tools # pyproject-hooks -wheel==0.42.0 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 +zipp==3.18.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index 6665603..cf44902 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.42.0 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via -r requirements/pip.in -setuptools==69.1.1 +setuptools==69.2.0 # via -r requirements/pip.in diff --git a/requirements/quality.in b/requirements/quality.in new file mode 100644 index 0000000..90749fd --- /dev/null +++ b/requirements/quality.in @@ -0,0 +1,4 @@ +-c constraints.txt + +pycodestyle +pylint diff --git a/requirements/quality.txt b/requirements/quality.txt new file mode 100644 index 0000000..542586a --- /dev/null +++ b/requirements/quality.txt @@ -0,0 +1,28 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# make upgrade +# +astroid==3.1.0 + # via pylint +dill==0.3.8 + # via pylint +isort==5.13.2 + # via pylint +mccabe==0.7.0 + # via pylint +platformdirs==4.2.0 + # via pylint +pycodestyle==2.11.1 + # via -r requirements/quality.in +pylint==3.1.0 + # via -r requirements/quality.in +tomli==2.0.1 + # via pylint +tomlkit==0.12.4 + # via pylint +typing-extensions==4.10.0 + # via + # astroid + # pylint diff --git a/requirements/test.txt b/requirements/test.txt index ed5bd70..396ff0b 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -19,11 +19,11 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via edx-lint colorama==0.4.6 # via tox -coverage==7.4.3 +coverage==7.4.4 # via -r requirements/test.in ddt==1.7.2 # via -r requirements/test.in @@ -55,7 +55,7 @@ mccabe==0.7.0 # via pylint mock==5.1.0 # via -r requirements/test.in -packaging==23.2 +packaging==24.0 # via # pyproject-api # pytest @@ -95,7 +95,7 @@ pymongo==3.13.0 # edx-opaque-keys pyproject-api==1.6.1 # via tox -pytest==8.1.0 +pytest==8.1.1 # via -r requirements/test.in python-slugify==8.0.4 # via code-annotations @@ -120,7 +120,7 @@ tomli==2.0.1 # tox tomlkit==0.12.4 # via pylint -tox==4.13.0 +tox==4.14.1 # via -r requirements/test.in typing-extensions==4.10.0 # via diff --git a/setup.py b/setup.py index 64967f7..bb4891f 100644 --- a/setup.py +++ b/setup.py @@ -67,6 +67,7 @@ def get_version(file_path): 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.12', ], packages=[ 'ccx_keys', diff --git a/tox.ini b/tox.ini index 692aefc..d4d8848 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] -envlist = py38,quality +envlist = unittest, quality -[testenv] +[testenv:unittest] deps = -r{toxinidir}/requirements/test.txt commands = @@ -10,6 +10,8 @@ commands = coverage xml [testenv:quality] +deps = + -r{toxinidir}/requirements/quality.txt commands = pycodestyle --config=.pep8 ccx_keys pylint --rcfile=pylintrc ccx_keys