Skip to content

Commit

Permalink
89: Update to python 3.10 and update to latest python template.
Browse files Browse the repository at this point in the history
  • Loading branch information
lfse-slafleur committed Dec 11, 2024
1 parent def86d4 commit 06f1ebc
Show file tree
Hide file tree
Showing 15 changed files with 152 additions and 141 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8" ]
python-version: [ "3.10" ]
name: Setup
steps:
- uses: actions/checkout@v3
Expand All @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8" ]
python-version: [ "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Restore venv
Expand All @@ -55,7 +55,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8" ]
python-version: [ "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Restore venv
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ "3.8" ]
python-version: [ "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Restore venv
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-slim-buster
FROM python:3.10-slim-buster

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion ci/linux/_load_dot_env.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -a
source $1
Expand Down
9 changes: 6 additions & 3 deletions ci/linux/create_venv.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

python3.8 -m venv ./.venv
. .venv/bin/activate
python3.10 -m venv ./.venv
if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi
pip3 install pip-tools
2 changes: 1 addition & 1 deletion ci/linux/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
Expand Down
3 changes: 2 additions & 1 deletion ci/linux/lint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi

flake8 ./src/grow_worker ./unit_test/
3 changes: 2 additions & 1 deletion ci/linux/test_unit.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi

PYTHONPATH='$PYTHONPATH:src/' pytest --junit-xml=test-results.xml unit_test/
3 changes: 2 additions & 1 deletion ci/linux/typecheck.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi

python -m mypy ./src/grow_worker ./unit_test/
7 changes: 4 additions & 3 deletions ci/linux/update_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
. .venv/bin/activate
fi

pip-compile --output-file=requirements.txt pyproject.toml
pip-compile --extra=dev -c requirements.txt --output-file=dev-requirements.txt pyproject.toml
pip-compile --upgrade --output-file=requirements.txt pyproject.toml
pip-compile --upgrade --extra=dev -c requirements.txt --output-file=dev-requirements.txt pyproject.toml
2 changes: 1 addition & 1 deletion ci/win32/create_venv.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ rem @echo off

pushd .
cd /D "%~dp0"
py -3.8 -m venv ..\..\venv
py -3.10 -m venv ..\..\venv
call ..\..\venv\Scripts\activate.bat
python -m pip install pip-tools
popd
Loading

0 comments on commit 06f1ebc

Please sign in to comment.