Skip to content

Commit

Permalink
fix: Install pip and pip-tools in upgrade script
Browse files Browse the repository at this point in the history
  • Loading branch information
Jawayria committed Jul 23, 2022
1 parent 4882927 commit d2fd175
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ build
.coverage
venv/
.vscode/
.idea/
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ requirements: ## install development environment requirements
pip install -r requirements/pip_tools.txt
pip install -r requirements/test.txt

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: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
upgrade: $(COMMON_CONSTRAINTS_TXT)
## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q -r requirements/pip_tools.txt
pip-compile --upgrade --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
pip install -qr requirements/pip_tools.txt
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/test.txt requirements/test.in
pip-compile --upgrade -o requirements/tox.txt requirements/tox.in
Expand Down
7 changes: 4 additions & 3 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.2.1
# Generated by edx-lint version: 5.2.4
# ------------------------------
[MASTER]
ignore =
persistent = yes
load-plugins = edx_lint.pylint,pylint_celery
load-plugins = edx_lint.pylint,pylint_django,pylint_celery

[MESSAGES CONTROL]
enable =
Expand Down Expand Up @@ -287,6 +287,7 @@ disable =
illegal-waffle-usage,

logging-fstring-interpolation,
django-not-available,

[REPORTS]
output-format = text
Expand Down Expand Up @@ -383,4 +384,4 @@ int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = Exception

# 0cfdab5f522ca16c0e457065f6599c832489a460
# fad4071fe38e655a180214bd3f6bce3ffa41b2ed
4 changes: 2 additions & 2 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ certifi==2022.6.15
# via requests
charset-normalizer==2.1.0
# via requests
coverage==6.4.1
coverage==6.4.2
# via coveralls
coveralls==3.3.1
# via -r requirements/ci.in
distlib==0.3.4
distlib==0.3.5
# via
# -r requirements/tox.txt
# virtualenv
Expand Down
25 changes: 25 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0
1 change: 1 addition & 0 deletions requirements/pip.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Core dependencies for installing other packages
-c common_constraints.txt

pip
setuptools
Expand Down
8 changes: 5 additions & 3 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ wheel==0.37.1
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==22.1.2
# via -r requirements/pip.in
setuptools==63.1.0
pip==22.2
# via -r requirements/pip.in
setuptools==59.8.0
# via
# -c requirements/common_constraints.txt
# -r requirements/pip.in
8 changes: 4 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ click-log==0.4.0
# via edx-lint
code-annotations==1.3.0
# via edx-lint
coverage==6.4.1
coverage==6.4.2
# via -r requirements/test.in
dill==0.3.5.1
# via pylint
distlib==0.3.4
distlib==0.3.5
# via virtualenv
edx-lint==5.2.4
# via -r requirements/test.in
Expand Down Expand Up @@ -65,7 +65,7 @@ py==1.11.0
# via tox
pycodestyle==2.8.0
# via -r requirements/test.in
pylint==2.14.4
pylint==2.14.5
# via
# -r requirements/test.in
# edx-lint
Expand Down Expand Up @@ -95,7 +95,7 @@ six==1.16.0
# edx-lint
# tox
# virtualenv
stevedore==3.5.0
stevedore==4.0.0
# via code-annotations
sympy==1.10.1
# via -r requirements/base.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/tox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
distlib==0.3.4
distlib==0.3.5
# via virtualenv
filelock==3.7.1
# via
Expand Down
3 changes: 0 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
envlist = py38,quality

[testenv]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
whitelist_externals =
touch
deps =
Expand All @@ -12,10 +11,8 @@ commands =
coverage report

[testenv:quality]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
deps =
-r requirements/test.txt
commands =
pycodestyle calc symmath tests
pylint calc symmath tests

0 comments on commit d2fd175

Please sign in to comment.