Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Install pip and pip-tools in upgrade script #3503

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ upgrade: $(COMMON_CONSTRAINTS_TXT)
sed 's/Django<2.3//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp requirements/common_constraints.txt
pip install -q -r requirements/pip_tools.txt
pip-compile --allow-unsafe --upgrade -o requirements/pip.txt requirements/pip.in
pip-compile --upgrade -o requirements/pip_tools.txt requirements/pip_tools.in
pip install -q -r requirements/pip.txt
pip install -q -r requirements/pip_tools.txt
pip-compile --upgrade -o requirements/docs.txt requirements/docs.in
pip-compile --upgrade -o requirements/local.txt requirements/local.in
pip-compile --upgrade -o requirements/production.txt requirements/production.in
Expand Down
1 change: 1 addition & 0 deletions course_discovery/apps/course_metadata/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1868,6 +1868,7 @@ def test_program_topics(self):
def test_start(self):
""" Verify the property returns the minimum start date for the course runs associated with the
program's courses. """

expected_start = min(course_run.start for course_run in self.course_runs)
assert self.program.start == expected_start

Expand Down
1 change: 1 addition & 0 deletions course_discovery/apps/course_metadata/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def test_ensure_draft_world_not_draft_course_run_given(self):
assert draft_seat.official_version == not_draft_seats[i]
assert not_draft_seats[i].draft_version == draft_seat


# Check draft course is also created
draft_course = ensured_draft_course_run.course
not_draft_course = Course.objects.get(uuid=course.uuid)
Expand Down
106 changes: 2 additions & 104 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.2.2
# Generated by edx-lint version: 5.2.4
# ------------------------------
[MASTER]
ignore = ,migrations, settings, wsgi.py
Expand Down Expand Up @@ -102,54 +102,39 @@ enable =
cell-var-from-loop,
confusing-with-statement,
continue-in-finally,
cyclical-import,
dangerous-default-value,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
duplicate-argument-name,
duplicate-bases,
duplicate-except,
duplicate-key,
eq-without-hash,
exception-escape,
exception-message-attribute,
expression-not-assigned,
filter-builtin-not-iterating,
format-combined-specification,
format-needs-mapping,
function-redefined,
global-variable-undefined,
import-error,
import-self,
inconsistent-mro,
indexing-exception,
inherit-non-class,
init-is-generator,
invalid-all-object,
invalid-encoded-data,
invalid-format-index,
invalid-length-returned,
invalid-sequence-index,
invalid-slice-index,
invalid-slots-object,
invalid-slots,
invalid-str-codec,
invalid-unary-operand-type,
logging-too-few-args,
logging-too-many-args,
logging-unsupported-format,
lost-exception,
map-builtin-not-iterating,
method-hidden,
misplaced-bare-raise,
misplaced-future,
missing-format-argument-key,
missing-format-attribute,
missing-format-string-key,
missing-super-argument,
mixed-fomat-string,
model-unicode-not-callable,
no-member,
no-method-argument,
no-name-in-module,
Expand All @@ -158,44 +143,32 @@ enable =
non-iterator-returned,
non-parent-method-called,
nonexistent-operator,
nonimplemented-raised,
nonstandard-exception,
not-a-mapping,
not-an-iterable,
not-callable,
not-context-manager,
not-in-loop,
pointless-statement,
pointless-string-statement,
property-on-old-class,
raising-bad-type,
raising-non-exception,
raising-string,
range-builtin-not-iterating,
redefined-builtin,
redefined-in-handler,
redefined-outer-name,
redefined-variable-type,
redundant-keyword-arg,
relative-import,
repeated-keyword,
return-arg-in-generator,
return-in-init,
return-outside-function,
signature-differs,
slots-on-old-class,
super-init-not-called,
super-method-not-called,
super-on-old-class,
syntax-error,
sys-max-int,
test-inherits-tests,
too-few-format-args,
too-many-format-args,
too-many-function-args,
translation-of-non-string,
truncated-format-string,
unbalance-tuple-unpacking,
undefined-all-variable,
undefined-loop-variable,
undefined-variable,
Expand All @@ -211,11 +184,8 @@ enable =
used-before-assignment,
using-constant-test,
yield-outside-function,
zip-builtin-not-iterating,

astroid-error,
django-not-available-placeholder,
django-not-available,
fatal,
method-check-failed,
parse-error,
Expand All @@ -237,7 +207,6 @@ enable =
bad-classmethod-argument,
bad-mcs-classmethod-argument,
bad-mcs-method-argument,
bad-whitespace,
bare-except,
broad-except,
consider-iterating-dictionary,
Expand All @@ -247,16 +216,10 @@ enable =
literal-used-as-attribute,
logging-format-interpolation,
logging-not-lazy,
metaclass-assignment,
model-has-unicode,
model-missing-unicode,
model-no-explicit-unicode,
multiple-imports,
multiple-statements,
no-classmethod-decorator,
no-staticmethod-decorator,
old-raise-syntax,
old-style-class,
protected-access,
redundant-unittest-assert,
reimported,
Expand Down Expand Up @@ -284,7 +247,6 @@ enable =
wrong-import-position,

missing-final-newline,
mixed-indentation,
mixed-line-endings,
trailing-newlines,
trailing-whitespace,
Expand All @@ -295,25 +257,7 @@ enable =
deprecated-pragma,
unrecognized-inline-option,
useless-suppression,

cmp-method,
coerce-method,
delslice-method,
dict-iter-method,
dict-view-method,
div-method,
getslice-method,
hex-method,
idiv-method,
next-method-called,
next-method-defined,
nonzero-method,
oct-method,
rdiv-method,
setslice-method,
using-cmp-argument,
disable =
bad-continuation,
bad-indentation,
consider-using-f-string,
duplicate-code,
Expand All @@ -322,12 +266,7 @@ disable =
global-statement,
invalid-name,
locally-disabled,
locally-enabled,
lowercase-l-suffix,
misplaced-comparison-constant,
no-else-return,
no-init,
no-self-use,
suppressed-message,
too-few-public-methods,
too-many-ancestors,
Expand All @@ -346,54 +285,14 @@ disable =
feature-toggle-needs-doc,
illegal-waffle-usage,

apply-builtin,
backtick,
bad-python3-import,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
deprecated-itertools-function,
deprecated-operator-function,
deprecated-str-translate-call,
deprecated-string-function,
deprecated-sys-function,
deprecated-types-field,
deprecated-urllib-function,
execfile-builtin,
file-builtin,
import-star-module-level,
input-builtin,
intern-builtin,
long-builtin,
long-suffix,
no-absolute-import,
non-ascii-bytes-literal,
old-division,
old-ne-operator,
old-octal-literal,
parameter-unpacking,
print-statement,
raw_input-builtin,
reduce-builtin,
reload-builtin,
round-builtin,
standarderror-builtin,
unichr-builtin,
unicode-builtin,
unpacking-in-except,
xrange-builtin,

logging-fstring-interpolation,,invalid-name,missing-docstring,cyclic-import,modelform-uses-exclude

[REPORTS]
output-format = text
files-output = no
reports = no
score = no

[BASIC]
bad-functions = map,filter,apply,input
module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns|logger|User)$
class-rgx = [A-Z_][a-zA-Z0-9]+$
Expand All @@ -413,7 +312,6 @@ docstring-min-length = 5
max-line-length = 120
ignore-long-lines = ^\s*(# )?((<?https?://\S+>?)|(\.\. \w+: .*))$
single-line-if-stmt = no
no-space-check = trailing-comma,dict-separator
max-module-lines = 1000
indent-string = ' '

Expand Down Expand Up @@ -484,4 +382,4 @@ int-import-graph =
[EXCEPTIONS]
overgeneral-exceptions = Exception

# 8caf486c1dccce39108ff9d0802431a873b56776
# 752730960f754c7219ba911e3c4e1d17cd9f9dd0
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ elasticsearch-dsl==7.4.0
# django-elasticsearch-dsl
idna==3.3
# via requests
imagesize==1.4.0
imagesize==1.4.1
# via sphinx
importlib-metadata==4.12.0
# via sphinx
Expand Down
17 changes: 9 additions & 8 deletions requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ boltons==21.0.0
# face
# glom
# semgrep
boto3==1.24.21
boto3==1.24.22
# via django-ses
botocore==1.27.21
botocore==1.27.22
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -145,6 +145,7 @@ distlib==0.3.4
# via virtualenv
distro==1.7.0
# via docker-compose
django==3.2.14
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
Expand Down Expand Up @@ -221,7 +222,7 @@ django-elasticsearch-dsl @ git+https://github.com/django-es/django-elasticsearch
# via
# -r requirements/github.in
# django-elasticsearch-dsl-drf
django-elasticsearch-dsl-drf==0.22.4
django-elasticsearch-dsl-drf==0.22.5
# via -r requirements/base.in
django-extensions==3.1.5
# via -r requirements/base.in
Expand Down Expand Up @@ -391,7 +392,7 @@ idna==3.3
# requests
# trio
# urllib3
imagesize==1.4.0
imagesize==1.4.1
# via sphinx
importlib-metadata==4.12.0
# via
Expand Down Expand Up @@ -431,7 +432,7 @@ lazy-object-proxy==1.7.1
# via astroid
libsass==0.21.0
# via django-libsass
lxml==4.9.0
lxml==4.9.1
# via
# -r requirements/base.in
# zeep
Expand Down Expand Up @@ -469,7 +470,7 @@ pbr==5.9.0
# via stevedore
peewee==3.15.0
# via semgrep
pillow==9.1.1
pillow==9.2.0
# via
# -r requirements/base.in
# django-stdimage
Expand Down Expand Up @@ -755,13 +756,13 @@ trio==0.21.0
# trio-websocket
trio-websocket==0.9.2
# via selenium
typing-extensions==4.2.0
typing-extensions==4.3.0
# via
# astroid
# django-countries
# pylint
# semgrep
ujson==5.3.0
ujson==5.4.0
# via python-lsp-jsonrpc
unicodecsv==0.14.1
# via djangorestframework-csv
Expand Down
5 changes: 5 additions & 0 deletions requirements/pip.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-c constraints.txt

pip
setuptools
wheel
16 changes: 16 additions & 0 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile --allow-unsafe --output-file=requirements/pip.txt requirements/pip.in
#
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==59.8.0
# via
# -c requirements/common_constraints.txt
# -r requirements/pip.in
Loading