Skip to content

Commit

Permalink
bump python to 4.12 and upgrade all libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Sispheor committed May 15, 2024
1 parent 6dfd4b0 commit 729fafb
Show file tree
Hide file tree
Showing 9 changed files with 994 additions and 873 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/on-merge-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ jobs:
run: |
echo ${{ steps.vars.outputs.version }}
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs==1.5.3 mkdocs-material==9.4.2 mike==1.1.2
pip install mkdocs==1.6.0 mkdocs-material==9.5.22 mike==2.1.1
- name: Get current branch name
shell: bash
Expand All @@ -52,4 +52,4 @@ jobs:
git checkout --orphan gh-pages
git pull origin gh-pages
git checkout ${{ steps.extract_branch.outputs.branch }}
mike deploy --push --update-aliases ${{ steps.vars.outputs.version }} latest
mike deploy --push --update-aliases ${{ steps.vars.outputs.version }} latest --alias-type=redirect
4 changes: 2 additions & 2 deletions .github/workflows/on-pull-request-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
poetry-version: ['1.3.2']
python-version: ['3.12']
poetry-version: ['1.8.0']

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 3 additions & 0 deletions Squest/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
if BACKUP_ENABLED:
print(f"BACKUP_CRONTAB: {BACKUP_CRONTAB}")

if DEBUG:
print(os.environ)

# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- "./docker/scripts/mariadb-init.sh:/docker-entrypoint-initdb.d/db-init.sh"

rabbitmq:
image: rabbitmq:3.10.23-management
image: rabbitmq:3.13.2-management
env_file: docker/environment_variables/rabbitmq.env
volumes:
- rabbitmq_data:/var/lib/rabbitmq
Expand Down
16 changes: 3 additions & 13 deletions docker/squest.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@
#-p 8000:8000 \
#squest

FROM python:3.10-slim-bullseye
FROM python:3.12-slim-bullseye

# Set environment variables
ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE=Squest.settings
ENV POETRY_VERSION=1.3.2
ENV NODE_VERSION=16.15.1
ENV NVM_VERSION=v0.39.1
ENV NVM_DIR=/root/.nvm
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
ENV RUN_DEPS="git default-libmysqlclient-dev default-mysql-client graphviz curl libldap2-dev libsasl2-dev libpq-dev python3-dev libssl-dev pkg-config"
ENV POETRY_VERSION=1.8.0
ENV RUN_DEPS="git default-libmysqlclient-dev default-mysql-client graphviz curl libldap2-dev libsasl2-dev libpq-dev python3-dev libssl-dev pkg-config npm"
ENV BUID_DEPS="gcc"

# Install system deps
Expand All @@ -31,12 +27,6 @@ RUN set -ex \
# Install poetry
RUN pip install "poetry==$POETRY_VERSION"

# Install node and NPM from NodeJS
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/${NVM_VERSION}/install.sh | bash
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}

# Prepare a path to receive the project
RUN mkdir /app
WORKDIR /app
Expand Down
19 changes: 17 additions & 2 deletions docs/dev/dev-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Following tools need to be installed on your workstation:

- Docker
- Docker-compose
- Python 3.9
- Python 3.12
- Python virtualenv
- [Poetry](https://python-poetry.org/)
- npm 8
- npm

### System packages

Expand Down Expand Up @@ -54,6 +54,21 @@ npm install

### Python environment

Install python via pyenv then create a virtual environment for Squest
```
cd /path/to/squest
# install python
pyenv install 3.12.3
# create a venv
pyenv virtualenv 3.12.3 squest
# assign the venv to the current folder
pyenv local squest
# activate the env
pyenv activate squest
# Install poetry in the venv
pip3 install poetry
```

Initializing and installing python libraries with Poetry
```bash
poetry install
Expand Down
64 changes: 52 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 729fafb

Please sign in to comment.