-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Dockerfile & CI workflows to use Ubuntu 24.04 and Python 3.12 (#…
…397) * fix: Updates the Dockerfile to use Ubuntu 24.04 and Python 3.12 * fix: Replaces the deprecated docker-compose command with docker compose * fix: Upgrades Ubuntu to 24.04 in the CI, Docker-publish, and PyPI-publish workflows * fix: replaces pkg_resources with importlib.resources in cookiecutter
- Loading branch information
1 parent
5fa9b3c
commit fee0ef7
Showing
25 changed files
with
69 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
jobs: | ||
|
||
push: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- name: Checkout | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
FROM edxops/focal-common:latest | ||
FROM ubuntu:noble | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
gettext \ | ||
lib32z1-dev \ | ||
zlib1g-dev \ | ||
libjpeg62-dev \ | ||
libxslt1-dev \ | ||
zlib1g-dev \ | ||
python3 \ | ||
python3-dev \ | ||
python3-venv \ | ||
python3-pip && \ | ||
pip3 install --upgrade pip setuptools && \ | ||
rm -rf /var/lib/apt/lists/* | ||
python3.12 \ | ||
python3.12-dev \ | ||
python3.12-venv \ | ||
curl \ | ||
make \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY . /usr/local/src/xblock-sdk | ||
WORKDIR /usr/local/src/xblock-sdk | ||
|
||
ENV VIRTUAL_ENV=/venvs/xblock-sdk | ||
RUN python3.11 -m venv $VIRTUAL_ENV | ||
RUN python3.12 -m venv $VIRTUAL_ENV | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
|
||
RUN pip install --upgrade pip && pip install -r /usr/local/src/xblock-sdk/requirements/dev.txt | ||
|
||
RUN curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodejs-setup && \ | ||
/bin/bash /tmp/nodejs-setup && \ | ||
RUN curl -sL https://deb.nodesource.com/setup_22.x -o /tmp/nodejs-setup && \ | ||
bash /tmp/nodejs-setup && \ | ||
rm /tmp/nodejs-setup && \ | ||
apt-get -y install nodejs && \ | ||
echo $PYTHONPATH && \ | ||
make install | ||
apt-get install -y nodejs | ||
|
||
RUN pip install --upgrade pip setuptools | ||
RUN make install | ||
|
||
EXPOSE 8000 | ||
ENTRYPOINT ["python", "manage.py"] | ||
CMD ["runserver", "0.0.0.0:8000"] | ||
|
||
ENTRYPOINT ["bash", "-c", "python manage.py migrate && exec python manage.py runserver 0.0.0.0:8000"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: '3.5' | ||
services: | ||
xblock_sdk: | ||
image: openedx/xblock-sdk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,3 @@ | |
|
||
# Common constraints for edx repos | ||
-c common_constraints.txt | ||
backports.zoneinfo;python_version<"3.9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# XBlock Static Files | ||
|
||
An XBlock can load resources from its package using Python's | ||
[pkg_resources](http://pythonhosted.org/distribute/pkg_resources.html). | ||
[importlib.resources](https://docs.python.org/3/library/importlib.resources.html). | ||
|
||
We use a directory structure with folders for `css`, `html`, and `js` | ||
files. However, this structure is not mandatory. Each XBlock can | ||
choose its directory structure, as long as it specifies the correct | ||
paths to `pkg_resources`. | ||
paths to `importlib.resources`. | ||
|
||
We include unit tests for JavaScript in the `js` folder. See `js/README.md` | ||
for details on how to run these tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# XBlock Static Files | ||
|
||
An XBlock can load resources from its package using Python's | ||
[pkg_resources](http://pythonhosted.org/distribute/pkg_resources.html). | ||
[importlib.resources](https://docs.python.org/3/library/importlib.resources.html). | ||
|
||
We use a directory structure with folders for `css`, `html`, and `js` | ||
files. However, this structure is not mandatory. Each XBlock can | ||
choose its directory structure, as long as it specifies the correct | ||
paths to `pkg_resources`. | ||
paths to `importlib.resources`. | ||
|
||
We include unit tests for JavaScript in the `js` folder. See `js/README.md` | ||
for details on how to run these tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# pylint: disable=django-not-configured | ||
""" | ||
Provide a djangoapp for XBlock development | ||
""" | ||
|
||
__version__ = '0.12.0' | ||
__version__ = '0.13.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters