diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 794fe20..b0f2ece 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: olive + OPENEDX_RELEASE: palm GITHUB_REPO: overhangio/tutor-xqueue include: diff --git a/README.rst b/README.rst index cdf6b17..d85a278 100644 --- a/README.rst +++ b/README.rst @@ -108,9 +108,11 @@ Configuration - ``XQUEUE_DOCKER_IMAGE`` (default: ``"{{ DOCKER_REGISTRY }}overhangio/openedx-xqueue:{{ TUTOR_VERSION }}"``) - ``XQUEUE_HOST`` (default: ``"xqueue.{{ LMS_HOST }}"``) - ``XQUEUE_MYSQL_PASSWORD`` (default: ``"{{ 8|random_string }}"``) -- ``XQUEUE_MYSQL_DATABASE`` (default: ``"xqueue"`` +- ``XQUEUE_MYSQL_DATABASE`` (default: ``"xqueue"``) - ``XQUEUE_MYSQL_USERNAME`` (default: ``"xqueue"``) - ``XQUEUE_SECRET_KEY`` (default: ``"{{ 24|random_string }}"``) +- ``XQUEUE_REPOSITORY`` (default: ``"https://github.com/openedx/xqueue"``) +- ``XQUEUE_REPOSITORY_VERSION`` (default: ``"{{ OPENEDX_COMMON_VERSION }}"``) These values can be modified with ``tutor config save --set PARAM_NAME=VALUE`` commands. diff --git a/setup.py b/setup.py index 4b2613b..936b3f3 100644 --- a/setup.py +++ b/setup.py @@ -32,8 +32,8 @@ setup( long_description_content_type="text/x-rst", packages=find_packages(exclude=["tests*"]), include_package_data=True, - python_requires=">=3.7", - install_requires=["tutor>=15.0.0,<16.0.0", "requests"], + python_requires=">=3.8", + install_requires=["tutor>=16.0.0,<17.0.0", "requests"], entry_points={"tutor.plugin.v1": ["xqueue = tutorxqueue.plugin"]}, classifiers=[ "Development Status :: 3 - Alpha", @@ -41,9 +41,9 @@ setup( "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", ], ) diff --git a/tutorxqueue/__about__.py b/tutorxqueue/__about__.py index 8daf65e..b950532 100644 --- a/tutorxqueue/__about__.py +++ b/tutorxqueue/__about__.py @@ -1,4 +1,4 @@ -__version__ = "15.0.1" +__version__ = "16.0.0" __package_version__ = __version__ # Handle version suffix for nightly, just like tutor core. diff --git a/tutorxqueue/plugin.py b/tutorxqueue/plugin.py index 672b8b3..814d6b7 100644 --- a/tutorxqueue/plugin.py +++ b/tutorxqueue/plugin.py @@ -1,18 +1,20 @@ -from glob import glob +from __future__ import annotations + import json import os +import typing as t +from glob import glob import click import pkg_resources import requests from tutor import config as tutor_config +from tutor import exceptions from tutor import hooks as tutor_hooks -from tutor.exceptions import TutorError from .__about__ import __version__ - config = { "unique": { "AUTH_PASSWORD": "{{ 8|random_string }}", @@ -26,21 +28,34 @@ config = { "HOST": "xqueue.{{ LMS_HOST }}", "MYSQL_DATABASE": "xqueue", "MYSQL_USERNAME": "xqueue", + "REPOSITORY": "https://github.com/openedx/xqueue", + "REPOSITORY_VERSION": "{{ OPENEDX_COMMON_VERSION }}", }, } -# Inizialization hooks -tutor_hooks.Filters.COMMANDS_INIT.add_item(( - "mysql", - ("xqueue", "tasks", "mysql", "init"), -)) +# Initialization hooks -tutor_hooks.Filters.COMMANDS_INIT.add_item(( - "xqueue", - ("xqueue", "tasks", "xqueue", "init"), -)) +# To add a custom initialization task, create a bash script template under: +# tutorcodejail/templates/codejail/tasks/ +# and then add it to the MY_INIT_TASKS list. Each task is in the format: +# ("", ("", "", "