diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0f2ece..9620a0c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: TUTOR_PLUGIN: xqueue TUTOR_IMAGES: xqueue TUTOR_PYPI_PACKAGE: tutor-xqueue - OPENEDX_RELEASE: palm + OPENEDX_RELEASE: quince GITHUB_REPO: overhangio/tutor-xqueue include: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d5d920..41f024f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,3 +19,13 @@ instructions, because git commits are used to generate release notes: + +## v17.0.0 (2023-12-09) + +- 💥 [Feature] Upgrade to Quince (by @jfavellar90). +- [Improvement] Add a scriv-compliant changelog. (by @regisb) +- [Improvement] Removing the xqueue permissions container in favor of a global single permissions container. (by @jfavellar90) +- [Bugfix] Fix "Error: service "xqueue-job" depends on undefined service mysql: invalid compose project" - add conditional statement to check whether the mysql service is enabled or if the user is using an external mysql instance. (by @ravikhetani) +- [Improvement] Added Typing to code, Makefile and test action to the repository and formatted code with Black and isort. (by @CodeWithEmad) + + diff --git a/README.rst b/README.rst index 0d09970..20107a0 100644 --- a/README.rst +++ b/README.rst @@ -56,7 +56,7 @@ For a problem that includes a file submission, write instead:: Note that in all cases, the queue name must be "openedx". -Save and publish the created unit. Then, access the unit from the LMS and attempt to answer the problem. The answer is sent to the Xqueue service. If you know how to use the Xqueue API, you can access it at http(s)://xqueue.LMS_HOST (in production) or http://xqueue.local.overhang.io (in development). However, the Xqueue API is a bit awkward to use. Tutor provides a simple command-line interface to interact with the Xqueue service. +Save and publish the created unit. Then, access the unit from the LMS and attempt to answer the problem. The answer is sent to the Xqueue service. If you know how to use the Xqueue API, you can access it at http(s)://xqueue.LMS_HOST (in production) or http://xqueue.local.edly.io (in development). However, the Xqueue API is a bit awkward to use. Tutor provides a simple command-line interface to interact with the Xqueue service. Count the number of submissions that need to be graded:: diff --git a/changelog.d/20230519_161836_regis.md b/changelog.d/20230519_161836_regis.md deleted file mode 100644 index 7d796ae..0000000 --- a/changelog.d/20230519_161836_regis.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Add a scriv-compliant changelog. (by @regisb) diff --git a/changelog.d/20230731_080653_jhony.avella_remove_permissions_container.md b/changelog.d/20230731_080653_jhony.avella_remove_permissions_container.md deleted file mode 100644 index 0908ab0..0000000 --- a/changelog.d/20230731_080653_jhony.avella_remove_permissions_container.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Removing the xqueue permissions container in favor of a global single permissions container. (by @jfavellar90) diff --git a/changelog.d/20231113_135404_r.khetani.md b/changelog.d/20231113_135404_r.khetani.md deleted file mode 100644 index f66c13e..0000000 --- a/changelog.d/20231113_135404_r.khetani.md +++ /dev/null @@ -1 +0,0 @@ -- [Bugfix] Fix "Error: service "xqueue-job" depends on undefined service mysql: invalid compose project" - add conditional statement to check whether the mysql service is enabled or if the user is using an external mysql instance. (by @ravikhetani) \ No newline at end of file diff --git a/changelog.d/20231118_161232_codewithemad.md b/changelog.d/20231118_161232_codewithemad.md deleted file mode 100644 index 952a383..0000000 --- a/changelog.d/20231118_161232_codewithemad.md +++ /dev/null @@ -1 +0,0 @@ -- [Improvement] Added Typing to code, Makefile and test action to the repository and formatted code with Black and isort. (by @CodeWithEmad) \ No newline at end of file diff --git a/setup.py b/setup.py index 81cb4e1..1d1832f 100644 --- a/setup.py +++ b/setup.py @@ -33,9 +33,9 @@ packages=find_packages(exclude=["tests*"]), include_package_data=True, python_requires=">=3.8", - install_requires=["tutor>=16.0.0,<17.0.0", "requests"], + install_requires=["tutor>=17.0.0,<18.0.0", "requests"], extras_require={ - "dev": ["tutor[dev]>=16.0.0,<17.0.0"], + "dev": ["tutor[dev]>=17.0.0,<18.0.0"], }, entry_points={"tutor.plugin.v1": ["xqueue = tutorxqueue.plugin"]}, classifiers=[ diff --git a/tutorxqueue/__about__.py b/tutorxqueue/__about__.py index eabf3d3..a08b09c 100644 --- a/tutorxqueue/__about__.py +++ b/tutorxqueue/__about__.py @@ -1 +1 @@ -__version__ = "16.0.2" +__version__ = "17.0.0" diff --git a/tutorxqueue/plugin.py b/tutorxqueue/plugin.py index 0d3b095..d5f143a 100644 --- a/tutorxqueue/plugin.py +++ b/tutorxqueue/plugin.py @@ -9,6 +9,7 @@ import pkg_resources import requests # type: ignore from tutor import config as tutor_config +from tutor.__about__ import __version_suffix__ from tutor import exceptions from tutor import hooks as tutor_hooks from tutor.__about__ import __version_suffix__ diff --git a/tutorxqueue/templates/xqueue/build/xqueue/Dockerfile b/tutorxqueue/templates/xqueue/build/xqueue/Dockerfile index bce2402..205f68b 100644 --- a/tutorxqueue/templates/xqueue/build/xqueue/Dockerfile +++ b/tutorxqueue/templates/xqueue/build/xqueue/Dockerfile @@ -1,13 +1,20 @@ -{% if is_buildkit_enabled() %}# syntax=docker/dockerfile:1.4{% endif %} +# syntax=docker/dockerfile:1.4 ###### Minimal image with base system requirements for most stages ###### FROM docker.io/ubuntu:20.04 as minimal ARG DEBIAN_FRONTEND=noninteractive -RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \ +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt update && \ apt upgrade -y && \ - apt install -y language-pack-en git python3 python3-pip python3-venv libmysqlclient-dev + apt install -y \ + language-pack-en \ + git \ + python3 \ + python3-pip \ + python3-venv \ + libmysqlclient-dev \ + pkg-config RUN ln -s /usr/bin/python3 /usr/bin/python ###### Git-clone xqueue repo ###### @@ -20,10 +27,12 @@ WORKDIR /openedx/xqueue ###### Install python venv ###### RUN python -m venv /openedx/venv ENV PATH /openedx/venv/bin:${PATH} - -RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install --upgrade pip setuptools -RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install -r requirements.txt -RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install uwsgi==2.0.21 +# https://pypi.org/project/setuptools/ +# https://pypi.org/project/pip/ +# https://pypi.org/project/wheel/ +RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install setuptools==68.2.2 pip==23.2.1. wheel==0.41.2 +RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install -r requirements.txt +RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install uwsgi==2.0.22 RUN mkdir /openedx/data /openedx/data/media