Skip to content

Commit

Permalink
Fix make upgrade (#51)
Browse files Browse the repository at this point in the history
* fix: fix make upgrade
  • Loading branch information
aht007 authored Oct 25, 2022
1 parent adf3320 commit 0f0ea6c
Show file tree
Hide file tree
Showing 13 changed files with 460 additions and 261 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,19 @@ coverage: clean ## generate and view HTML coverage report
pytest --cov-report html
$(BROWSER) htmlcov/index.html

upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q pip-tools
COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT)
## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade --rebuild --allow-unsafe -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in
pip install -qr requirements/pip.txt
pip install -qr requirements/pip-tools.txt
pip-compile --upgrade -o requirements/dev.txt requirements/base.in requirements/dev.in requirements/quality.in requirements/test.in requirements/travis.in
pip-compile --upgrade -o requirements/quality.txt requirements/base.in requirements/quality.in requirements/test.in
pip-compile --upgrade -o requirements/test.txt requirements/base.in requirements/test.in
Expand Down
47 changes: 22 additions & 25 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,71 +2,68 @@
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile --output-file=requirements/ci.txt requirements/ci.in
# make upgrade
#
asgiref==3.4.1
asgiref==3.5.2
# via django
backports.entry-points-selectable==1.1.1
# via virtualenv
certifi==2021.10.8
certifi==2022.9.24
# via requests
charset-normalizer==2.0.9
charset-normalizer==2.1.1
# via requests
coverage==6.2
coverage==6.5.0
# via coveralls
coveralls==3.3.1
# via -r requirements/ci.in
distlib==0.3.4
distlib==0.3.6
# via virtualenv
django==3.2.10
django==3.2.16
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
# edx-i18n-tools
docopt==0.6.2
# via coveralls
edx-i18n-tools==0.8.1
edx-i18n-tools==0.9.2
# via -r requirements/ci.in
filelock==3.4.0
filelock==3.8.0
# via
# tox
# virtualenv
idna==3.3
idna==3.4
# via requests
packaging==21.3
# via tox
path==16.2.0
path==16.5.0
# via edx-i18n-tools
platformdirs==2.4.0
platformdirs==2.5.2
# via virtualenv
pluggy==1.0.0
# via tox
polib==1.1.1
# via edx-i18n-tools
py==1.11.0
# via tox
pyparsing==3.0.6
pyparsing==3.0.9
# via packaging
pytz==2021.3
pytz==2022.5
# via django
pyyaml==6.0
# via edx-i18n-tools
requests==2.26.0
requests==2.28.1
# via coveralls
six==1.16.0
# via
# tox
# virtualenv
sqlparse==0.4.2
# via tox
sqlparse==0.4.3
# via django
toml==0.10.2
tomli==2.0.1
# via tox
tox==3.24.4
tox==3.26.0
# via
# -r requirements/ci.in
# tox-battery
tox-battery==0.6.1
# via -r requirements/ci.in
urllib3==1.26.7
urllib3==1.26.12
# via requests
virtualenv==20.10.0
virtualenv==20.16.5
# via tox
27 changes: 27 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# A central location for most common version constraints
# (across edx repos) for pip-installation.
#
# Similar to other constraint files this file doesn't install any packages.
# It specifies version constraints that will be applied if a package is needed.
# When pinning something here, please provide an explanation of why it is a good
# idea to pin this package across all edx repos, Ideally, link to other information
# that will help people in the future to remove the pin when possible.
# Writing an issue against the offending project and linking to it here is good.
#
# Note: Changes to this file will automatically be used by other repos, referencing
# this file from Github directly. It does not require packaging in edx-lint.


# using LTS django version
Django<4.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
elasticsearch<7.14.0

# setuptools==60.0 had breaking changes and busted several service's pipeline.
# Details can be found here: https://github.com/pypa/setuptools/issues/2940
setuptools<60

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0
2 changes: 2 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# pin when possible. Writing an issue against the offending project and
# linking to it here is good.

-c common_constraints.txt

# TODO: Many pinned dependencies should be unpinned and/or moved to this constraints file.

# Use latest Django LTS version
Expand Down
Loading

0 comments on commit 0f0ea6c

Please sign in to comment.