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

feat!: expose per-release edx-sandbox dependency pins #34509

Merged
merged 5 commits into from
Apr 18, 2024
Merged
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ shell: ## launch a bash shell in a Docker container with all edx-platform depend
REQ_FILES = \
requirements/edx/coverage \
requirements/edx/paver \
requirements/edx-sandbox/py38 \
requirements/edx-sandbox/base \
requirements/edx/base \
requirements/edx/doc \
requirements/edx/testing \
Expand All @@ -130,7 +130,7 @@ endef
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: curl has a -O which will do the same thing as the wget -O so maybe just use curl -OL here?

Ref: https://curl.se/docs/manpage.html#-O

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they're a bit different:

wget -O "$(@)" means "write to a file named $(@)", which means "write to the Makefile target", which is requirements/common_constraints.txt

curl -O means "write to a file of the same name as the remote file", which would be just common_constraints.txt (no requirements/ prefix)

curl -L https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt > "$(@)"
printf "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

compile-requirements: export CUSTOM_COMPILE_COMMAND=make upgrade
Expand Down
59 changes: 59 additions & 0 deletions requirements/edx-sandbox/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
edx-sandbox: a Python environment for sandboxed execution with CodeJail
#######################################################################

The requirements in this directory describe a Python environment separate from
the general edx-platform environment. When correctly configured with
`CodeJail <https://github.com/openedx/codejail>`_, edx-platform can use
it to execute untrusted code, particularly instructor-authored Python code
within ``<script type="loncapa/python">`` ProblemBlock tags.

Files in this directory
***********************

base.in
=======

This is the current set of requirements or the edx-sandbox
environment, and it is used to generate the ``.txt`` files described below.
These requirements share some constraints with the general edx-platform
requirements (via ``../constraints.txt``), but otherwise, they are completely
separate.

We do not recommend installing from this file directly, because
the packages are not pinned.

base.txt
========

These are the latest requirement pins for edx-sandbox.
They are regularly updated with the latest compatible versions of each package.

Install from this file if you wish to always run the latest edx-sandbox
environment. Take note that there will periodically be breaking changes to
``base.txt``. For example, we may update the Python version used to generate
the pins, which may break edx-sandbox environments running older Python
versions.

releases/(RELEASE_NAME).txt
===========================

*e.g. releases/redwood.txt, releases/sumac.txt, etc.*

Starting with Quince, every named Open edX release adds one of these files.
They contain the requirement pins corresponding to ``base.txt`` at the time
of each release.

Install from one of these files if you want to run a stable edx-sandbox
environment without breaking changes.

Support windows
***************

Only ``base.txt`` and the latest ``release/*.txt`` from the latest named
release are supported by the Open edX community. However, we will leave
old ``release/*.txt`` files in the repository to assist:

* operators who want to stagger their edx-sandbox upgrade from their general
edx-platform upgrade
* operators who need to temporarily roll back their edx-sandbox environments
so that instructors can fix their loncapa Python code.
File renamed without changes.
97 changes: 97 additions & 0 deletions requirements/edx-sandbox/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
cffi==1.16.0
# via cryptography
chem==1.2.0
# via -r requirements/edx-sandbox/base.in
click==8.1.6
# via
# -c requirements/edx-sandbox/../constraints.txt
# nltk
codejail-includes==1.0.0
# via -r requirements/edx-sandbox/base.in
contourpy==1.1.1
# via matplotlib
cryptography==38.0.4
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/base.in
cycler==0.12.1
# via matplotlib
fonttools==4.49.0
# via matplotlib
importlib-resources==6.1.1
# via matplotlib
joblib==1.3.2
# via nltk
kiwisolver==1.4.5
# via matplotlib
lxml==4.9.4
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/base.in
# openedx-calc
markupsafe==2.1.5
# via
# chem
# openedx-calc
matplotlib==3.7.5
# via -r requirements/edx-sandbox/base.in
mpmath==1.3.0
# via sympy
networkx==3.1
# via -r requirements/edx-sandbox/base.in
nltk==3.8.1
# via
# -r requirements/edx-sandbox/base.in
# chem
numpy==1.22.4
# via
# chem
# contourpy
# matplotlib
# openedx-calc
# scipy
openedx-calc==3.1.0
# via -r requirements/edx-sandbox/base.in
packaging==23.2
# via matplotlib
pillow==10.2.0
# via matplotlib
pycparser==2.21
# via cffi
pyparsing==3.1.1
# via
# -r requirements/edx-sandbox/base.in
# chem
# matplotlib
# openedx-calc
python-dateutil==2.8.2
# via matplotlib
random2==1.0.2
# via -r requirements/edx-sandbox/base.in
regex==2023.12.25
# via nltk
scipy==1.7.3
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/base.in
# chem
# openedx-calc
six==1.16.0
# via
# chem
# codejail-includes
# python-dateutil
sympy==1.12
# via
# -r requirements/edx-sandbox/base.in
# openedx-calc
tqdm==4.66.2
# via nltk
zipp==3.17.0
# via importlib-resources
101 changes: 4 additions & 97 deletions requirements/edx-sandbox/py38.txt
Original file line number Diff line number Diff line change
@@ -1,97 +1,4 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
cffi==1.16.0
# via cryptography
chem==1.2.0
# via -r requirements/edx-sandbox/py38.in
click==8.1.6
# via
# -c requirements/edx-sandbox/../constraints.txt
# nltk
codejail-includes==1.0.0
# via -r requirements/edx-sandbox/py38.in
contourpy==1.1.1
# via matplotlib
cryptography==38.0.4
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/py38.in
cycler==0.12.1
# via matplotlib
fonttools==4.49.0
# via matplotlib
importlib-resources==6.1.1
# via matplotlib
joblib==1.3.2
# via nltk
kiwisolver==1.4.5
# via matplotlib
lxml==4.9.4
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/py38.in
# openedx-calc
markupsafe==2.1.5
# via
# chem
# openedx-calc
matplotlib==3.7.5
# via -r requirements/edx-sandbox/py38.in
mpmath==1.3.0
# via sympy
networkx==3.1
# via -r requirements/edx-sandbox/py38.in
nltk==3.8.1
# via
# -r requirements/edx-sandbox/py38.in
# chem
numpy==1.22.4
# via
# chem
# contourpy
# matplotlib
# openedx-calc
# scipy
openedx-calc==3.1.0
# via -r requirements/edx-sandbox/py38.in
packaging==23.2
# via matplotlib
pillow==10.2.0
# via matplotlib
pycparser==2.21
# via cffi
pyparsing==3.1.1
# via
# -r requirements/edx-sandbox/py38.in
# chem
# matplotlib
# openedx-calc
python-dateutil==2.8.2
# via matplotlib
random2==1.0.2
# via -r requirements/edx-sandbox/py38.in
regex==2023.12.25
# via nltk
scipy==1.7.3
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/py38.in
# chem
# openedx-calc
six==1.16.0
# via
# chem
# codejail-includes
# python-dateutil
sympy==1.12
# via
# -r requirements/edx-sandbox/py38.in
# openedx-calc
tqdm==4.66.2
# via nltk
zipp==3.17.0
# via importlib-resources
# This file is a temporary compatibility wrapper around quince.txt.
# It will be removed before Sumac.

-r releases/quince.txt
Empty file.
97 changes: 97 additions & 0 deletions requirements/edx-sandbox/releases/quince.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# make upgrade
#
cffi==1.16.0
# via cryptography
chem==1.2.0
# via -r requirements/edx-sandbox/base.in
click==8.1.6
# via
# -c requirements/edx-sandbox/../constraints.txt
# nltk
codejail-includes==1.0.0
# via -r requirements/edx-sandbox/base.in
contourpy==1.1.1
# via matplotlib
cryptography==38.0.4
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/base.in
cycler==0.12.1
# via matplotlib
fonttools==4.49.0
# via matplotlib
importlib-resources==6.1.1
# via matplotlib
joblib==1.3.2
# via nltk
kiwisolver==1.4.5
# via matplotlib
lxml==4.9.4
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/base.in
# openedx-calc
markupsafe==2.1.5
# via
# chem
# openedx-calc
matplotlib==3.7.5
# via -r requirements/edx-sandbox/base.in
mpmath==1.3.0
# via sympy
networkx==3.1
# via -r requirements/edx-sandbox/base.in
nltk==3.8.1
# via
# -r requirements/edx-sandbox/base.in
# chem
numpy==1.22.4
# via
# chem
# contourpy
# matplotlib
# openedx-calc
# scipy
openedx-calc==3.1.0
# via -r requirements/edx-sandbox/base.in
packaging==23.2
# via matplotlib
pillow==10.2.0
# via matplotlib
pycparser==2.21
# via cffi
pyparsing==3.1.1
# via
# -r requirements/edx-sandbox/base.in
# chem
# matplotlib
# openedx-calc
python-dateutil==2.8.2
# via matplotlib
random2==1.0.2
# via -r requirements/edx-sandbox/base.in
regex==2023.12.25
# via nltk
scipy==1.7.3
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/base.in
# chem
# openedx-calc
six==1.16.0
# via
# chem
# codejail-includes
# python-dateutil
sympy==1.12
# via
# -r requirements/edx-sandbox/base.in
# openedx-calc
tqdm==4.66.2
# via nltk
zipp==3.17.0
# via importlib-resources
14 changes: 0 additions & 14 deletions requirements/edx-sandbox/shared.in

This file was deleted.

Loading
Loading