From 0e66febe9a128e40af0095c187a755ab07e6c69b Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Thu, 2 Jan 2025 14:03:04 +0500 Subject: [PATCH 1/3] fix: fix failing workflow builds --- .github/workflows/ci.yml | 6 +++--- .github/workflows/upgrade-python-requirements.yml | 1 + README.rst | 2 +- channel_integrations/__init__.py | 5 ++++- manage.py | 2 +- setup.py | 3 ++- tox.ini | 5 ++++- 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b0f4d0..ce7d368 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.8'] - toxenv: [quality, docs, pii_check, django32, django40] + python-version: ['3.12'] + toxenv: [quality, docs, pii_check, django42] steps: - uses: actions/checkout@v3 @@ -37,7 +37,7 @@ jobs: run: tox - name: Run coverage - if: matrix.python-version == '3.8' && matrix.toxenv == 'django32' + if: matrix.python-version == '3.12' && matrix.toxenv == 'django42' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index e12b108..c030c30 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -18,6 +18,7 @@ jobs: team_reviewers: "2u-iris" email_address: enterprise-integrations@edx.org send_success_notification: false + python_version: "3.12" secrets: requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }} requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }} diff --git a/README.rst b/README.rst index 154318d..ddff4a1 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ enterprise-integrated-channels -############################# +############################## .. note:: diff --git a/channel_integrations/__init__.py b/channel_integrations/__init__.py index cc8141b..6b0e83c 100644 --- a/channel_integrations/__init__.py +++ b/channel_integrations/__init__.py @@ -1,5 +1,8 @@ """ -An integrated channel is an abstraction meant to represent a third-party system which provides an API that can be used to transmit EdX data to the third-party system. +API bridge for EdX. + +An integrated channel is an abstraction meant to represent a third-party system +which provides an API that can be used to transmit EdX data to the third-party system. """ __version__ = '0.1.0' diff --git a/manage.py b/manage.py index 4afa5aa..c4c1f40 100644 --- a/manage.py +++ b/manage.py @@ -18,7 +18,7 @@ # issue is really that Django is missing to avoid masking other # exceptions on Python 2. try: - import django # pylint: disable=unused-import, wrong-import-position + import django # pylint: disable=unused-import except ImportError as import_error: raise ImportError( "Couldn't import Django. Are you sure it's installed and " diff --git a/setup.py b/setup.py index 1574e64..2478063 100755 --- a/setup.py +++ b/setup.py @@ -131,7 +131,8 @@ def is_requirement(line): setup( name='enterprise-integrated-channels', version=VERSION, - description="""An integrated channel is an abstraction meant to represent a third-party system which provides an API that can be used to transmit EdX data to the third-party system.""", + description="""An integrated channel is an abstraction meant to represent a third-party system \ + which provides an API that can be used to transmit EdX data to the third-party system.""", long_description=README + '\n\n' + CHANGELOG, author='Open edX Project', author_email='oscm@openedx.org', diff --git a/tox.ini b/tox.ini index 194c2f4..edd4bce 100644 --- a/tox.ini +++ b/tox.ini @@ -36,6 +36,7 @@ norecursedirs = .* docs requirements site-packages [testenv] deps = + setuptools django42: Django>=4.0,<5.0 -r{toxinidir}/requirements/test.txt commands = @@ -52,6 +53,7 @@ allowlist_externals = make rm deps = + setuptools -r{toxinidir}/requirements/doc.txt commands = doc8 --ignore-path docs/_build README.rst docs @@ -68,6 +70,7 @@ allowlist_externals = rm touch deps = + setuptools -r{toxinidir}/requirements/quality.txt commands = touch tests/__init__.py @@ -82,7 +85,7 @@ commands = setenv = DJANGO_SETTINGS_MODULE = test_settings deps = + setuptools -r{toxinidir}/requirements/test.txt commands = code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage - From 541a7d9b107ead121c6f4ecaec92ff8619c92bdc Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Fri, 3 Jan 2025 19:19:13 +0500 Subject: [PATCH 2/3] build: setup package to use Python 3.11 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/pypi-publish.yml | 2 +- .github/workflows/upgrade-python-requirements.yml | 2 +- setup.py | 4 ++-- tox.ini | 6 +----- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce7d368..51cf2bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: ['3.12'] + python-version: ['3.11'] toxenv: [quality, docs, pii_check, django42] steps: @@ -37,7 +37,7 @@ jobs: run: tox - name: Run coverage - if: matrix.python-version == '3.12' && matrix.toxenv == 'django42' + if: matrix.python-version == '3.11' && matrix.toxenv == 'django42' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 5cd627a..95743ed 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -14,7 +14,7 @@ jobs: - name: setup python uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: 3.11 - name: Install pip run: pip install -r requirements/pip.txt diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index c030c30..1940a84 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -18,7 +18,7 @@ jobs: team_reviewers: "2u-iris" email_address: enterprise-integrations@edx.org send_success_notification: false - python_version: "3.12" + python_version: "3.11" secrets: requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }} requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }} diff --git a/setup.py b/setup.py index 2478063..acaa879 100755 --- a/setup.py +++ b/setup.py @@ -144,7 +144,7 @@ def is_requirement(line): include_package_data=True, install_requires=load_requirements('requirements/base.in'), - python_requires=">=3.12", + python_requires=">=3.11", license="AGPL 3.0", zip_safe=False, keywords='Python edx', @@ -156,6 +156,6 @@ def is_requirement(line): 'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)', 'Natural Language :: English', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.11', ], ) diff --git a/tox.ini b/tox.ini index edd4bce..70fa738 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py312-django{42} +envlist = py311-django{42} [doc8] ; D001 = Line too long @@ -36,7 +36,6 @@ norecursedirs = .* docs requirements site-packages [testenv] deps = - setuptools django42: Django>=4.0,<5.0 -r{toxinidir}/requirements/test.txt commands = @@ -53,7 +52,6 @@ allowlist_externals = make rm deps = - setuptools -r{toxinidir}/requirements/doc.txt commands = doc8 --ignore-path docs/_build README.rst docs @@ -70,7 +68,6 @@ allowlist_externals = rm touch deps = - setuptools -r{toxinidir}/requirements/quality.txt commands = touch tests/__init__.py @@ -85,7 +82,6 @@ commands = setenv = DJANGO_SETTINGS_MODULE = test_settings deps = - setuptools -r{toxinidir}/requirements/test.txt commands = code_annotations django_find_annotations --config_file .pii_annotations.yml --lint --report --coverage From 7c4cb93305b19a81f025b2a286564367f7e74be2 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Fri, 3 Jan 2025 19:20:46 +0500 Subject: [PATCH 3/3] chore: upgrade requirements with Python 3.11 --- requirements/base.txt | 6 +++--- requirements/ci.txt | 6 +++--- requirements/dev.txt | 34 +++++++++++++++--------------- requirements/doc.txt | 43 ++++++++++++++++++++------------------ requirements/pip-tools.txt | 8 +++---- requirements/pip.txt | 6 +++--- requirements/quality.txt | 26 +++++++++++------------ requirements/test.txt | 18 ++++++++-------- 8 files changed, 75 insertions(+), 72 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 0f021c9..d09430c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,16 +1,16 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # asgiref==3.8.1 # via django -django==4.2.16 +django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in openedx-atlas==0.6.2 # via -r requirements/base.in -sqlparse==0.5.1 +sqlparse==0.5.3 # via django diff --git a/requirements/ci.txt b/requirements/ci.txt index dc61486..56fef6c 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -16,7 +16,7 @@ filelock==3.16.1 # via # tox # virtualenv -packaging==24.1 +packaging==24.2 # via # pyproject-api # tox @@ -30,5 +30,5 @@ pyproject-api==1.8.0 # via tox tox==4.23.2 # via -r requirements/ci.in -virtualenv==20.27.1 +virtualenv==20.28.1 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 06e880a..05e3ca2 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -8,7 +8,7 @@ asgiref==3.8.1 # via # -r requirements/quality.txt # django -astroid==3.3.5 +astroid==3.3.8 # via # -r requirements/quality.txt # pylint @@ -26,7 +26,7 @@ chardet==5.2.0 # -r requirements/ci.txt # diff-cover # tox -click==8.1.7 +click==8.1.8 # via # -r requirements/pip-tools.txt # -r requirements/quality.txt @@ -38,7 +38,7 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations==1.8.0 +code-annotations==2.1.0 # via # -r requirements/quality.txt # edx-lint @@ -46,11 +46,11 @@ colorama==0.4.6 # via # -r requirements/ci.txt # tox -coverage[toml]==7.6.4 +coverage[toml]==7.6.10 # via # -r requirements/quality.txt # pytest-cov -diff-cover==9.2.0 +diff-cover==9.2.1 # via -r requirements/dev.in dill==0.3.9 # via @@ -60,7 +60,7 @@ distlib==0.3.9 # via # -r requirements/ci.txt # virtualenv -django==4.2.16 +django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt @@ -82,7 +82,7 @@ isort==5.13.2 # via # -r requirements/quality.txt # pylint -jinja2==3.1.4 +jinja2==3.1.5 # via # -r requirements/quality.txt # code-annotations @@ -91,7 +91,7 @@ lxml[html-clean,html_clean]==5.3.0 # via # edx-i18n-tools # lxml-html-clean -lxml-html-clean==0.3.1 +lxml-html-clean==0.4.1 # via lxml markupsafe==3.0.2 # via @@ -103,7 +103,7 @@ mccabe==0.7.0 # pylint openedx-atlas==0.6.2 # via -r requirements/quality.txt -packaging==24.1 +packaging==24.2 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -142,7 +142,7 @@ pydocstyle==6.3.0 # via -r requirements/quality.txt pygments==2.18.0 # via diff-cover -pylint==3.3.1 +pylint==3.3.3 # via # -r requirements/quality.txt # edx-lint @@ -171,7 +171,7 @@ pyproject-hooks==1.2.0 # -r requirements/pip-tools.txt # build # pip-tools -pytest==8.3.3 +pytest==8.3.4 # via # -r requirements/quality.txt # pytest-cov @@ -189,7 +189,7 @@ pyyaml==6.0.2 # -r requirements/quality.txt # code-annotations # edx-i18n-tools -six==1.16.0 +six==1.17.0 # via # -r requirements/quality.txt # edx-lint @@ -197,11 +197,11 @@ snowballstemmer==2.2.0 # via # -r requirements/quality.txt # pydocstyle -sqlparse==0.5.1 +sqlparse==0.5.3 # via # -r requirements/quality.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via # -r requirements/quality.txt # code-annotations @@ -215,11 +215,11 @@ tomlkit==0.13.2 # pylint tox==4.23.2 # via -r requirements/ci.txt -virtualenv==20.27.1 +virtualenv==20.28.1 # via # -r requirements/ci.txt # tox -wheel==0.44.0 +wheel==0.45.1 # via # -r requirements/pip-tools.txt # pip-tools diff --git a/requirements/doc.txt b/requirements/doc.txt index b43a557..3787470 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -16,25 +16,27 @@ babel==2.16.0 # via # pydata-sphinx-theme # sphinx +backports-tarfile==1.2.0 + # via jaraco-context beautifulsoup4==4.12.3 # via pydata-sphinx-theme build==1.2.2.post1 # via -r requirements/doc.in -certifi==2024.8.30 +certifi==2024.12.14 # via requests -charset-normalizer==3.4.0 +charset-normalizer==3.4.1 # via requests -click==8.1.7 +click==8.1.8 # via # -r requirements/test.txt # code-annotations -code-annotations==1.8.0 +code-annotations==2.1.0 # via -r requirements/test.txt -coverage[toml]==7.6.4 +coverage[toml]==7.6.10 # via # -r requirements/test.txt # pytest-cov -django==4.2.16 +django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt @@ -52,7 +54,7 @@ idna==3.10 imagesize==1.4.1 # via sphinx importlib-metadata==8.5.0 - # via twine + # via keyring iniconfig==2.0.0 # via # -r requirements/test.txt @@ -63,12 +65,12 @@ jaraco-context==6.0.1 # via keyring jaraco-functools==4.1.0 # via keyring -jinja2==3.1.4 +jinja2==3.1.5 # via # -r requirements/test.txt # code-annotations # sphinx -keyring==25.5.0 +keyring==25.6.0 # via twine markdown-it-py==3.0.0 # via rich @@ -82,27 +84,28 @@ more-itertools==10.5.0 # via # jaraco-classes # jaraco-functools -nh3==0.2.18 +nh3==0.2.20 # via readme-renderer openedx-atlas==0.6.2 # via -r requirements/test.txt -packaging==24.1 +packaging==24.2 # via # -r requirements/test.txt # build # pytest # sphinx + # twine pbr==6.1.0 # via # -r requirements/test.txt # stevedore -pkginfo==1.10.0 +pkginfo==1.12.0 # via twine pluggy==1.5.0 # via # -r requirements/test.txt # pytest -pydata-sphinx-theme==0.16.0 +pydata-sphinx-theme==0.16.1 # via sphinx-book-theme pygments==2.18.0 # via @@ -114,7 +117,7 @@ pygments==2.18.0 # sphinx pyproject-hooks==1.2.0 # via build -pytest==8.3.3 +pytest==8.3.4 # via # -r requirements/test.txt # pytest-cov @@ -169,11 +172,11 @@ sphinxcontrib-qthelp==2.0.0 # via sphinx sphinxcontrib-serializinghtml==2.0.0 # via sphinx -sqlparse==0.5.1 +sqlparse==0.5.3 # via # -r requirements/test.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via # -r requirements/test.txt # code-annotations @@ -182,13 +185,13 @@ text-unidecode==1.3 # via # -r requirements/test.txt # python-slugify -twine==5.1.1 +twine==6.0.1 # via -r requirements/doc.in typing-extensions==4.12.2 # via pydata-sphinx-theme -urllib3==2.2.3 +urllib3==2.3.0 # via # requests # twine -zipp==3.20.2 +zipp==3.21.0 # via importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index cf4131e..5461e43 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # build==1.2.2.post1 # via pip-tools -click==8.1.7 +click==8.1.8 # via pip-tools -packaging==24.1 +packaging==24.2 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in @@ -16,7 +16,7 @@ pyproject-hooks==1.2.0 # via # build # pip-tools -wheel==0.44.0 +wheel==0.45.1 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index baa068d..25d1d69 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade # -wheel==0.44.0 +wheel==0.45.1 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: @@ -12,5 +12,5 @@ pip==24.2 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/pip.in -setuptools==75.3.0 +setuptools==75.6.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index f3e1d28..39543c1 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -8,11 +8,11 @@ asgiref==3.8.1 # via # -r requirements/test.txt # django -astroid==3.3.5 +astroid==3.3.8 # via # pylint # pylint-celery -click==8.1.7 +click==8.1.8 # via # -r requirements/test.txt # click-log @@ -20,17 +20,17 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.8.0 +code-annotations==2.1.0 # via # -r requirements/test.txt # edx-lint -coverage[toml]==7.6.4 +coverage[toml]==7.6.10 # via # -r requirements/test.txt # pytest-cov dill==0.3.9 # via pylint -django==4.2.16 +django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt @@ -44,7 +44,7 @@ isort==5.13.2 # via # -r requirements/quality.in # pylint -jinja2==3.1.4 +jinja2==3.1.5 # via # -r requirements/test.txt # code-annotations @@ -56,7 +56,7 @@ mccabe==0.7.0 # via pylint openedx-atlas==0.6.2 # via -r requirements/test.txt -packaging==24.1 +packaging==24.2 # via # -r requirements/test.txt # pytest @@ -74,7 +74,7 @@ pycodestyle==2.12.1 # via -r requirements/quality.in pydocstyle==6.3.0 # via -r requirements/quality.in -pylint==3.3.1 +pylint==3.3.3 # via # edx-lint # pylint-celery @@ -88,7 +88,7 @@ pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pytest==8.3.3 +pytest==8.3.4 # via # -r requirements/test.txt # pytest-cov @@ -105,15 +105,15 @@ pyyaml==6.0.2 # via # -r requirements/test.txt # code-annotations -six==1.16.0 +six==1.17.0 # via edx-lint snowballstemmer==2.2.0 # via pydocstyle -sqlparse==0.5.1 +sqlparse==0.5.3 # via # -r requirements/test.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via # -r requirements/test.txt # code-annotations diff --git a/requirements/test.txt b/requirements/test.txt index 47574cf..b2b73a4 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # make upgrade @@ -8,30 +8,30 @@ asgiref==3.8.1 # via # -r requirements/base.txt # django -click==8.1.7 +click==8.1.8 # via code-annotations -code-annotations==1.8.0 +code-annotations==2.1.0 # via -r requirements/test.in -coverage[toml]==7.6.4 +coverage[toml]==7.6.10 # via pytest-cov # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt iniconfig==2.0.0 # via pytest -jinja2==3.1.4 +jinja2==3.1.5 # via code-annotations markupsafe==3.0.2 # via jinja2 openedx-atlas==0.6.2 # via -r requirements/base.txt -packaging==24.1 +packaging==24.2 # via pytest pbr==6.1.0 # via stevedore pluggy==1.5.0 # via pytest -pytest==8.3.3 +pytest==8.3.4 # via # pytest-cov # pytest-django @@ -43,11 +43,11 @@ python-slugify==8.0.4 # via code-annotations pyyaml==6.0.2 # via code-annotations -sqlparse==0.5.1 +sqlparse==0.5.3 # via # -r requirements/base.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via code-annotations text-unidecode==1.3 # via python-slugify