Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Python version to 3.13 in Dockerfile and Pipfile #552

Merged
merged 9 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 8 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
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,24 @@ on:
- master

jobs:
setup:
runs-on: ubuntu-latest
outputs:
python_version: ${{ steps.read_python_version.outputs.python_version }}
steps:
- uses: actions/checkout@v4
- name: Read Python version
id: read_python_version
run: echo "::set-output name=python_version::$(cat .python-version)"
black:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand All @@ -37,12 +47,13 @@ jobs:
python -m black --check .
flake8:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand All @@ -61,12 +72,13 @@ jobs:
flake8
mypy:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand All @@ -84,6 +96,7 @@ jobs:
python -m mypy .
test:
runs-on: ubuntu-latest
needs: setup
services:
postgres:
image: postgres:14.5
Expand All @@ -103,7 +116,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ needs.setup.outputs.python_version }}
- uses: actions/cache@v4
with:
path: ~/.cache/pip
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ target/
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use slim for a smaller image size and install only the required packages
FROM python:3.8-slim
FROM python:3.13-slim

# > Setting PYTHONUNBUFFERED to a non empty value ensures that the python output is sent straight to
# > terminal (e.g. your container log) without being first buffered and that you can see the output
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sqlalchemy = "~=2.0"
flask-migrate = "*"

[requires]
python_version = "3.8"
python_version = "3.13"

[pipenv]
allow_prereleases = true
Expand Down
1,227 changes: 452 additions & 775 deletions Pipfile.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions baracoda/barcodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_new_barcode_group(prefix: str) -> Tuple[Any, int]:
- OtherError: HTTP 500 with JSON representation of error.
"""
try:
logger.debug(f"Creating a barcode group for '{ prefix }'")
logger.debug(f"Creating a barcode group for '{prefix}'")
count = get_count_param()

operator = BarcodeOperations(prefix=prefix)
Expand Down Expand Up @@ -70,7 +70,7 @@ def get_new_barcode(prefix: str) -> Tuple[Any, int]:
- OtherError: HTTP 500 with JSON representation of error.
"""
try:
logger.debug(f"Creating a barcode for '{ prefix }'")
logger.debug(f"Creating a barcode for '{prefix}'")
text = get_text_param()
operator = BarcodeOperations(prefix=prefix, text=text)
barcode = operator.create_barcode()
Expand Down Expand Up @@ -98,7 +98,7 @@ def get_last_barcode(prefix: str) -> Tuple[Any, int]:
- OtherError: HTTP 500 with JSON representation of error.
"""
try:
logger.debug(f"Obtaining last from '{ prefix }'")
logger.debug(f"Obtaining last from '{prefix}'")
operator = BarcodeOperations(prefix=prefix)

barcode = operator.get_last_barcode(prefix)
Expand Down
2 changes: 1 addition & 1 deletion baracoda/formats/sequencescape.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ def barcode_with_checksum(self, barcode: str) -> str:
Returns:
str -- the same barcode but with the suffix attached separated by '-'
"""
return f"{ barcode }-{ self.suffix(barcode) }"
return f"{barcode}-{self.suffix(barcode)}"
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __DANGER_restart_sequence_with(value):
)
raise ValueError(description)
# Last value in database is 2564197, we want to move forward past this value
op.execute(f"ALTER SEQUENCE heron RESTART WITH { value };")
op.execute(f"ALTER SEQUENCE heron RESTART WITH {value};")


def upgrade():
Expand Down
Loading
Loading