From 7adac53cc5a7445a2c51f2e668c85e0af45259fd Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Thu, 26 Oct 2023 02:19:02 +0500 Subject: [PATCH] build: make upgrade job. (#352) --- .github/workflows/ci.yml | 9 ++- Makefile | 5 +- requirements/base.txt | 94 +++++++++--------------- requirements/constraints.txt | 1 + requirements/django.txt | 2 +- requirements/pip-tools.txt | 19 +++-- requirements/pip.txt | 6 +- requirements/production.txt | 0 requirements/test.txt | 138 +++++++++++++---------------------- requirements/travis.txt | 28 ++----- 10 files changed, 120 insertions(+), 182 deletions(-) create mode 100644 requirements/production.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39c68ddc..b88e855b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,11 +16,11 @@ jobs: python-version: ['py38'] django-version: ['django32', 'django42'] db-version: ['mysql57', 'mysql80'] - # excluding mysql5.7 with Django 4.2 since Django 4.2 has + # excluding mysql5.7 with Django 4.2 since Django 4.2 has # dropped support for MySQL<8 exclude: - - django-version: 'django42' - db-version: 'mysql57' + - django-version: 'django42' + db-version: 'mysql57' steps: - uses: actions/checkout@v2 @@ -29,7 +29,8 @@ jobs: docker-compose -f .travis/docker-compose-travis.yml up -d - name: Install Dependencies run: | - pip install -r requirements/travis.txt + docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} --env DB_HOST=${{ matrix.db-version }} -u root edx_notes_api \ + /bin/bash -c "apt-get update && apt-get install python3-dev default-libmysqlclient-dev build-essential pkg-config" - name: Run Tests run: | docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.django-version }} --env DB_HOST=${{ matrix.db-version }} -u root edx_notes_api /edx/app/edx_notes_api/edx_notes_api/.travis/run_tests.sh diff --git a/Makefile b/Makefile index cd8500d9..31b6973c 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,6 @@ piptools: ## install pinned version of pip-compile and pip-sync upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade upgrade: piptools ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in # Make sure to compile files after any other files they include! - pip-compile --upgrade -o requirements/travis.txt requirements/travis.in pip-compile --upgrade --rebuild --allow-unsafe -o requirements/pip.txt requirements/pip.in pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in pip install -qr requirements/pip.txt @@ -77,4 +76,6 @@ upgrade: piptools ## update the requirements/*.txt files with the latest package pip-compile --upgrade -o requirements/test.txt requirements/test.in # Let tox control the Django version for tests grep -e "^django==" requirements/base.txt > requirements/django.txt - sed -i '/^[dD]jango==/d' requirements/test.txt + sed '/^[dD]jango==/d' requirements/test.txt > requirements/test.tmp + mv requirements/test.tmp requirements/test.txt + diff --git a/requirements/base.txt b/requirements/base.txt index 7c7a93aa..6bd9d75f 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,35 +4,30 @@ # # make upgrade # -asgiref==3.6.0 +asgiref==3.7.2 # via django -certifi==2022.12.7 +certifi==2023.7.22 # via # elasticsearch # requests -cffi==1.15.1 +cffi==1.16.0 # via # cryptography # pynacl chardet==3.0.4 # via requests -click==8.1.3 +click==8.1.7 # via edx-django-utils -coreapi==2.3.3 - # via drf-yasg -coreschema==0.0.4 - # via - # coreapi - # drf-yasg -cryptography==40.0.1 +cryptography==41.0.4 # via pyjwt -django==3.2.20 +django==3.2.22 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in # django-cors-headers # django-crum # django-nine + # django-waffle # djangorestframework # drf-jwt # drf-yasg @@ -40,10 +35,12 @@ django==3.2.20 # edx-django-utils # edx-drf-extensions django-cors-headers==3.14.0 - # via -r requirements/base.in + # via + # -c requirements/constraints.txt + # -r requirements/base.in django-crum==0.7.9 # via edx-django-utils -django-elasticsearch-dsl==7.3 +django-elasticsearch-dsl==7.4 # via # -c requirements/constraints.txt # -r requirements/base.in @@ -52,7 +49,7 @@ django-elasticsearch-dsl-drf==0.22.5 # via -r requirements/base.in django-nine==0.2.7 # via django-elasticsearch-dsl-drf -django-waffle==3.0.0 +django-waffle==4.0.0 # via # edx-django-utils # edx-drf-extensions @@ -65,17 +62,17 @@ djangorestframework==3.14.0 # edx-drf-extensions drf-jwt==1.19.2 # via edx-drf-extensions -drf-yasg==1.21.5 +drf-yasg==1.21.7 # via -r requirements/base.in -edx-django-release-util==1.2.0 +edx-django-release-util==1.3.0 # via -r requirements/base.in -edx-django-utils==5.3.0 +edx-django-utils==5.7.0 # via # -r requirements/base.in # edx-drf-extensions -edx-drf-extensions==8.4.1 +edx-drf-extensions==8.12.0 # via -r requirements/base.in -edx-opaque-keys==2.3.0 +edx-opaque-keys==2.5.1 # via edx-drf-extensions elasticsearch==7.13.4 # via @@ -90,46 +87,35 @@ elasticsearch-dsl==7.4.1 # -r requirements/base.in # django-elasticsearch-dsl # django-elasticsearch-dsl-drf -future==0.18.3 - # via pyjwkest -gunicorn==20.1.0 +gunicorn==21.2.0 # via -r requirements/base.in idna==2.10 # via requests inflection==0.5.1 # via drf-yasg -itypes==1.2.0 - # via coreapi -jinja2==3.1.2 - # via coreschema -markupsafe==2.1.2 - # via jinja2 -mysqlclient==2.1.1 +mysqlclient==2.2.0 # via -r requirements/base.in newrelic==4.8.0.110 # via # -c requirements/constraints.txt # -r requirements/base.in # edx-django-utils -packaging==23.0 +packaging==23.2 # via # django-nine # drf-yasg + # gunicorn path-py==9.1 # via # -c requirements/constraints.txt # -r requirements/base.in pbr==5.11.1 # via stevedore -psutil==5.9.4 +psutil==5.9.6 # via edx-django-utils pycparser==2.21 # via cffi -pycryptodomex==3.17 - # via pyjwkest -pyjwkest==1.4.2 - # via edx-drf-extensions -pyjwt[crypto]==2.6.0 +pyjwt[crypto]==2.8.0 # via # -r requirements/base.in # drf-jwt @@ -142,26 +128,21 @@ python-dateutil==2.4.0 # via # -c requirements/constraints.txt # -r requirements/base.in - # edx-drf-extensions # elasticsearch-dsl -pytz==2023.3 +pytz==2023.3.post1 # via # django # djangorestframework # drf-yasg -pyyaml==6.0 - # via edx-django-release-util +pyyaml==6.0.1 + # via + # drf-yasg + # edx-django-release-util requests==2.25.0 # via # -c requirements/constraints.txt # -r requirements/base.in - # coreapi # edx-drf-extensions - # pyjwkest -ruamel-yaml==0.17.21 - # via drf-yasg -ruamel-yaml-clib==0.2.7 - # via ruamel-yaml semantic-version==2.10.0 # via edx-drf-extensions six==1.16.0 @@ -169,24 +150,21 @@ six==1.16.0 # django-elasticsearch-dsl # django-elasticsearch-dsl-drf # edx-django-release-util - # edx-drf-extensions # elasticsearch-dsl - # pyjwkest # python-dateutil -sqlparse==0.4.3 +sqlparse==0.4.4 # via django -stevedore==5.0.0 +stevedore==5.1.0 # via # edx-django-utils # edx-opaque-keys -uritemplate==4.1.1 +typing-extensions==4.8.0 # via - # coreapi - # drf-yasg -urllib3==1.26.15 + # asgiref + # edx-opaque-keys +uritemplate==4.1.1 + # via drf-yasg +urllib3==1.26.18 # via # elasticsearch # requests - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 74c0a461..fa7b0411 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -21,3 +21,4 @@ python-dateutil==2.4.0 newrelic==4.8.0.110 more-itertools==5.0.0 pylint==1.5.0 +django-cors-headers==3.14.0 diff --git a/requirements/django.txt b/requirements/django.txt index 480c0782..5a28da34 100644 --- a/requirements/django.txt +++ b/requirements/django.txt @@ -1 +1 @@ -django==3.2.20 +django==3.2.22 diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index baf1aa51..50d35f22 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,20 +4,27 @@ # # make upgrade # -build==0.10.0 +build==1.0.3 # via pip-tools -click==8.1.3 +click==8.1.7 # via pip-tools -packaging==23.0 +importlib-metadata==6.8.0 # via build -pip-tools==6.12.3 +packaging==23.2 + # via build +pip-tools==7.3.0 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via build tomli==2.0.1 - # via build -wheel==0.40.0 + # via + # build + # pip-tools + # pyproject-hooks +wheel==0.41.2 # via pip-tools +zipp==3.17.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip.txt b/requirements/pip.txt index 896a85ce..2154d29f 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.40.0 +wheel==0.41.2 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==23.0.1 +pip==23.3 # via -r requirements/pip.in -setuptools==67.6.1 +setuptools==68.2.2 # via -r requirements/pip.in diff --git a/requirements/production.txt b/requirements/production.txt new file mode 100644 index 00000000..e69de29b diff --git a/requirements/test.txt b/requirements/test.txt index 53033e81..89d8bced 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,7 +4,7 @@ # # make upgrade # -asgiref==3.6.0 +asgiref==3.7.2 # via # -r requirements/base.txt # django @@ -13,14 +13,12 @@ astroid==1.6.6 # -c requirements/constraints.txt # -r requirements/test.in # pylint -attrs==22.2.0 - # via pytest -certifi==2022.12.7 +certifi==2023.7.22 # via # -r requirements/base.txt # elasticsearch # requests -cffi==1.15.1 +cffi==1.16.0 # via # -r requirements/base.txt # cryptography @@ -30,37 +28,28 @@ chardet==3.0.4 # -r requirements/base.txt # diff-cover # requests -click==8.1.3 +click==8.1.7 # via # -r requirements/base.txt # code-annotations # edx-django-utils -code-annotations==1.3.0 +code-annotations==1.5.0 # via -r requirements/test.in colorama==0.4.6 # via pylint -coreapi==2.3.3 - # via - # -r requirements/base.txt - # drf-yasg -coreschema==0.0.4 - # via - # -r requirements/base.txt - # coreapi - # drf-yasg -coverage[toml]==7.2.2 +coverage[toml]==7.3.2 # via # -r requirements/test.in # pytest-cov -cryptography==40.0.1 +cryptography==41.0.4 # via # -r requirements/base.txt # pyjwt ddt==1.6.0 # via -r requirements/test.in -diff-cover==7.5.0 +diff-cover==7.7.0 # via -r requirements/test.in -distlib==0.3.6 +distlib==0.3.7 # via virtualenv # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt @@ -68,6 +57,7 @@ distlib==0.3.6 # django-cors-headers # django-crum # django-nine + # django-waffle # djangorestframework # drf-jwt # drf-yasg @@ -75,12 +65,14 @@ distlib==0.3.6 # edx-django-utils # edx-drf-extensions django-cors-headers==3.14.0 - # via -r requirements/base.txt + # via + # -c requirements/constraints.txt + # -r requirements/base.txt django-crum==0.7.9 # via # -r requirements/base.txt # edx-django-utils -django-elasticsearch-dsl==7.3 +django-elasticsearch-dsl==7.4 # via # -c requirements/constraints.txt # -r requirements/base.txt @@ -91,7 +83,7 @@ django-nine==0.2.7 # via # -r requirements/base.txt # django-elasticsearch-dsl-drf -django-waffle==3.0.0 +django-waffle==4.0.0 # via # -r requirements/base.txt # edx-django-utils @@ -107,17 +99,17 @@ drf-jwt==1.19.2 # via # -r requirements/base.txt # edx-drf-extensions -drf-yasg==1.21.5 +drf-yasg==1.21.7 # via -r requirements/base.txt -edx-django-release-util==1.2.0 +edx-django-release-util==1.3.0 # via -r requirements/base.txt -edx-django-utils==5.3.0 +edx-django-utils==5.7.0 # via # -r requirements/base.txt # edx-drf-extensions -edx-drf-extensions==8.4.1 +edx-drf-extensions==8.12.0 # via -r requirements/base.txt -edx-opaque-keys==2.3.0 +edx-opaque-keys==2.5.1 # via # -r requirements/base.txt # edx-drf-extensions @@ -134,21 +126,17 @@ elasticsearch-dsl==7.4.1 # -r requirements/base.txt # django-elasticsearch-dsl # django-elasticsearch-dsl-drf -exceptiongroup==1.1.1 +exceptiongroup==1.1.3 # via pytest -factory-boy==3.2.1 +factory-boy==3.3.0 # via -r requirements/test.in -faker==18.3.1 +faker==19.11.0 # via factory-boy -filelock==3.10.7 +filelock==3.12.4 # via # tox # virtualenv -future==0.18.3 - # via - # -r requirements/base.txt - # pyjwkest -gunicorn==20.1.0 +gunicorn==21.2.0 # via -r requirements/base.txt idna==2.10 # via @@ -160,38 +148,31 @@ inflection==0.5.1 # drf-yasg iniconfig==2.0.0 # via pytest -itypes==1.2.0 - # via - # -r requirements/base.txt - # coreapi jinja2==3.1.2 # via - # -r requirements/base.txt # code-annotations - # coreschema # diff-cover lazy-object-proxy==1.9.0 # via astroid -markupsafe==2.1.2 - # via - # -r requirements/base.txt - # jinja2 +markupsafe==2.1.3 + # via jinja2 more-itertools==5.0.0 # via # -c requirements/constraints.txt # -r requirements/test.in -mysqlclient==2.1.1 +mysqlclient==2.2.0 # via -r requirements/base.txt newrelic==4.8.0.110 # via # -c requirements/constraints.txt # -r requirements/base.txt # edx-django-utils -packaging==23.0 +packaging==23.2 # via # -r requirements/base.txt # django-nine # drf-yasg + # gunicorn # pytest # tox path-py==9.1 @@ -204,14 +185,14 @@ pbr==5.11.1 # stevedore pep8==1.7.1 # via -r requirements/test.in -platformdirs==3.2.0 +platformdirs==3.11.0 # via virtualenv -pluggy==1.0.0 +pluggy==1.3.0 # via # diff-cover # pytest # tox -psutil==5.9.4 +psutil==5.9.6 # via # -r requirements/base.txt # edx-django-utils @@ -221,21 +202,14 @@ pycparser==2.21 # via # -r requirements/base.txt # cffi -pycryptodomex==3.17 - # via - # -r requirements/base.txt - # pyjwkest -pygments==2.14.0 +pygments==2.16.1 # via diff-cover -pyjwkest==1.4.2 - # via - # -r requirements/base.txt - # edx-drf-extensions -pyjwt[crypto]==2.6.0 +pyjwt[crypto]==2.8.0 # via # -r requirements/base.txt # drf-jwt # edx-drf-extensions + # pyjwt pylint==1.5.0 # via # -c requirements/constraints.txt @@ -248,12 +222,12 @@ pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils -pytest==7.2.2 +pytest==7.4.2 # via # -r requirements/test.in # pytest-cov # pytest-django -pytest-cov==4.0.0 +pytest-cov==4.1.0 # via -r requirements/test.in pytest-django==4.5.2 # via -r requirements/test.in @@ -261,37 +235,27 @@ python-dateutil==2.4.0 # via # -c requirements/constraints.txt # -r requirements/base.txt - # edx-drf-extensions # elasticsearch-dsl # faker python-slugify==8.0.1 # via code-annotations -pytz==2023.3 +pytz==2023.3.post1 # via # -r requirements/base.txt # django # djangorestframework # drf-yasg -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/base.txt # code-annotations + # drf-yasg # edx-django-release-util requests==2.25.0 # via # -c requirements/constraints.txt # -r requirements/base.txt - # coreapi # edx-drf-extensions - # pyjwkest -ruamel-yaml==0.17.21 - # via - # -r requirements/base.txt - # drf-yasg -ruamel-yaml-clib==0.2.7 - # via - # -r requirements/base.txt - # ruamel-yaml semantic-version==2.10.0 # via # -r requirements/base.txt @@ -303,18 +267,16 @@ six==1.16.0 # django-elasticsearch-dsl # django-elasticsearch-dsl-drf # edx-django-release-util - # edx-drf-extensions # elasticsearch-dsl # more-itertools - # pyjwkest # pylint # python-dateutil # tox -sqlparse==0.4.3 +sqlparse==0.4.4 # via # -r requirements/base.txt # django -stevedore==5.0.0 +stevedore==5.1.0 # via # -r requirements/base.txt # code-annotations @@ -331,20 +293,22 @@ tox==3.28.0 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.in +typing-extensions==4.8.0 + # via + # -r requirements/base.txt + # asgiref + # edx-opaque-keys + # faker uritemplate==4.1.1 # via # -r requirements/base.txt - # coreapi # drf-yasg -urllib3==1.26.15 +urllib3==1.26.18 # via # -r requirements/base.txt # elasticsearch # requests -virtualenv==20.21.0 +virtualenv==20.24.5 # via tox wrapt==1.15.0 # via astroid - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/travis.txt b/requirements/travis.txt index 95c46152..c4b2a642 100644 --- a/requirements/travis.txt +++ b/requirements/travis.txt @@ -4,32 +4,20 @@ # # make upgrade # -certifi==2022.12.7 - # via requests -chardet==3.0.4 - # via requests -coverage==7.2.2 - # via codecov -distlib==0.3.6 +distlib==0.3.7 # via virtualenv -filelock==3.10.7 +filelock==3.12.4 # via # tox # virtualenv -idna==2.10 - # via requests -packaging==23.0 +packaging==23.2 # via tox -platformdirs==3.2.0 +platformdirs==3.11.0 # via virtualenv -pluggy==1.0.0 +pluggy==1.3.0 # via tox py==1.11.0 # via tox -requests==2.25.0 - # via - # -c requirements/constraints.txt - # codecov six==1.16.0 # via tox tomli==2.0.1 @@ -39,9 +27,7 @@ tox==3.28.0 # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/travis.in # tox-battery -tox-battery==0.6.1 +tox-battery==0.6.2 # via -r requirements/travis.in -urllib3==1.26.15 - # via requests -virtualenv==20.21.0 +virtualenv==20.24.5 # via tox