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 440857d
Show file tree
Hide file tree
Showing 8 changed files with 516 additions and 460 deletions.
6 changes: 3 additions & 3 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 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
17 changes: 16 additions & 1 deletion docs/dev/dev-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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
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 440857d

Please sign in to comment.