Skip to content

Commit d680392

Browse files
authored
Merge pull request #31 from overhangio/redwood
Upgrade to Redwood
2 parents fe3742a + a880f44 commit d680392

File tree

7 files changed

+37
-27
lines changed

7 files changed

+37
-27
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ on:
77
jobs:
88
tests:
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ['3.8', '3.12']
1013
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set up Python 3.8
13-
uses: actions/setup-python@v2
14+
- uses: actions/checkout@v3
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
1417
with:
15-
python-version: 3.8
18+
python-version: ${{ matrix.python-version }}
1619
- name: Upgrade pip
1720
run: python -m pip install --upgrade pip setuptools
1821
- name: Install dependencies

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ instructions, because git commits are used to generate release notes:
1919

2020
<!-- scriv-insert-here -->
2121

22+
<a id='changelog-18.0.0'></a>
23+
## v18.0.0 (2024-05-09)
24+
25+
- [Bugfix] Make plugin compatible with Python 3.12 by removing dependency on `pkg_resources`. (by @regisb)
26+
27+
- 💥[Feature] Upgrade Python version to 3.12.3. (by @jfavellar90)
28+
- 💥[Feature] Upgrade to Redwood. (by @jfavellar90)
29+
2230
<a id='changelog-17.0.0'></a>
2331
## v17.0.0 (2023-12-09)
2432

changelog.d/20240212_115536_regis_pkg_resources.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
packages=find_packages(exclude=["tests*"]),
3434
include_package_data=True,
3535
python_requires=">=3.8",
36-
install_requires=["tutor>=17.0.0,<18.0.0", "requests"],
36+
install_requires=["tutor>=18.0.0,<19.0.0", "requests"],
3737
extras_require={
38-
"dev": ["tutor[dev]>=17.0.0,<18.0.0"],
38+
"dev": ["tutor[dev]>=18.0.0,<19.0.0"],
3939
},
4040
entry_points={"tutor.plugin.v1": ["xqueue = tutorxqueue.plugin"]},
4141
classifiers=[

tutorxqueue/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "17.0.0"
1+
__version__ = "18.0.0"

tutorxqueue/plugin.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,21 +146,19 @@ def grade_submission(
146146
print_result(
147147
context,
148148
"grade_submission",
149-
(
150-
submission_id,
151-
submission_key,
152-
grade,
153-
correct,
154-
message,
155-
),
149+
submission_id,
150+
submission_key,
151+
grade,
152+
correct,
153+
message,
156154
)
157155

158156

159157
def print_result(
160158
context: click.Context,
161159
client_func_name: str,
162-
*args: tuple[Any, ...],
163-
**kwargs: dict[str, Any],
160+
*args: Any,
161+
**kwargs: Any,
164162
) -> None:
165163
user_config = tutor_config.load(context.root) # type: ignore
166164
client = Client(user_config, url=context.url) # type: ignore

tutorxqueue/templates/xqueue/build/xqueue/Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
# syntax=docker/dockerfile:1.4
22
###### Minimal image with base system requirements for most stages ######
3-
FROM docker.io/ubuntu:20.04 as minimal
3+
FROM docker.io/python:3.12-slim-bookworm
44

55
ARG DEBIAN_FRONTEND=noninteractive
66
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
77
--mount=type=cache,target=/var/lib/apt,sharing=locked \
88
apt update && \
99
apt upgrade -y && \
1010
apt install -y \
11-
language-pack-en \
11+
locales \
1212
git \
13-
python3 \
14-
python3-pip \
15-
python3-venv \
16-
libmysqlclient-dev \
17-
pkg-config
18-
RUN ln -s /usr/bin/python3 /usr/bin/python
13+
python3-dev \
14+
build-essential \
15+
default-libmysqlclient-dev \
16+
pkg-config && \
17+
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
18+
locale-gen
19+
ENV LC_ALL en_US.UTF-8
1920

2021
###### Git-clone xqueue repo ######
2122
ARG APP_USER_ID=1000
2223
RUN useradd --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app
2324
USER ${APP_USER_ID}
25+
2426
RUN git clone {{ XQUEUE_REPOSITORY }} --branch {{ XQUEUE_REPOSITORY_VERSION }} --depth 1 /openedx/xqueue
2527
WORKDIR /openedx/xqueue
2628

@@ -30,9 +32,9 @@ ENV PATH /openedx/venv/bin:${PATH}
3032
# https://pypi.org/project/setuptools/
3133
# https://pypi.org/project/pip/
3234
# https://pypi.org/project/wheel/
33-
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install setuptools==68.2.2 pip==23.2.1. wheel==0.41.2
35+
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install setuptools==69.2.0 pip==24.0 wheel==0.43.0
3436
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install -r requirements.txt
35-
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install uwsgi==2.0.22
37+
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install uwsgi==2.0.25.1
3638

3739
RUN mkdir /openedx/data /openedx/data/media
3840

0 commit comments

Comments
 (0)