Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ on:
pull_request:
branches: [ master ]

env:
PYTHON_VERSION: 3.13.3

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -25,10 +22,10 @@ jobs:
- name: Lint commit messages
uses: wagoid/commitlint-github-action@v6.2.1

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v6.1.0
- name: Set up Python
uses: actions/setup-python@v6.0.0
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: '.python-version'
cache: 'pip'

- name: Install lint dependencies
Expand All @@ -51,10 +48,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6.0.0

- name: Set up Python ${{ env.PYTHON_VERSION }}
- name: Set up Python
uses: actions/setup-python@v6.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: '.python-version'
cache: 'pip'

- name: Install test dependencies
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# Track .python-version for consistent Python version across environments

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down Expand Up @@ -158,4 +158,4 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#.idea/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13.3
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Stage 1: Builder
# This stage builds the application and its dependencies.
# ------------------------------------------------------------------------------
# Python version should match .python-version file (currently 3.13.3)
FROM python:3.13.3-slim-bookworm AS builder

WORKDIR /app
Expand All @@ -19,6 +20,7 @@ RUN pip wheel --no-cache-dir --wheel-dir=/app/wheelhouse -r requirements.txt
# Stage 2: Runtime
# This stage creates the final, minimal image to run the application.
# ------------------------------------------------------------------------------
# Python version should match .python-version file (currently 3.13.3)
FROM python:3.13.3-slim-bookworm AS runtime

WORKDIR /app
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Proof of Concept for a RESTful API made with [Python 3](https://www.python.org/)

_Figure: Simplified, conceptual project structure and main application flow. Not all dependencies are shown._

## Python Version Management

This project uses `.python-version` to specify the required Python version. If you use [pyenv](https://github.com/pyenv/pyenv), [asdf](https://asdf-vm.com/), or [mise](https://mise.jdx.dev/), the correct Python version will be automatically activated when you enter the project directory.

Alternatively, ensure you have Python 3.13.3 (or the version specified in `.python-version`) installed.

## Install

```console
Expand Down
1 change: 0 additions & 1 deletion runtime.txt

This file was deleted.