Skip to content

Commit 696ce95

Browse files
authored
Upgrade to Python 3.11 (#11)
* Verified python 3.11 works, only change here was to fix new logging location in jpeg benchmark * update CI to use python 3.11
1 parent 05b3446 commit 696ce95

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.github/workflows/run-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflow will install Python dependencies and run tests with PyTest using Python 3.8
1+
# This workflow will install Python dependencies and run tests with PyTest using Python 3.11
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

44
name: Run tests
@@ -18,10 +18,10 @@ jobs:
1818
- uses: actions/checkout@v3
1919

2020
# Set Python version
21-
- name: Set up Python 3.8
21+
- name: Set up Python 3.11
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: 3.8
24+
python-version: 3.11
2525

2626
# Set up submodules and submodule dependencies
2727
# TODO: Uncomment when there are submodules

jpeg_benchmark.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
FRAME_COUNT = 300
1717
FRAME_TO_SAVE = 69
1818
INPUT_PATH = pathlib.Path("test_images", "Encode Test Dataset 2024")
19-
OUTPUT_PATH = pathlib.Path(f"log_{int(time.time())}")
19+
OUTPUT_PATH = pathlib.Path("logs", str(int(time.time())))
2020

2121
# Keys for dictionary entries
2222
MAX_TIME_MS = "max_time_ms"
@@ -157,7 +157,11 @@ def main() -> int:
157157

158158
# Save one image (this one has 2 landing pads in it) for reference
159159
if frame_index == FRAME_TO_SAVE:
160-
image.save(OUTPUT_PATH / f"q{quality}.jpeg", format="JPEG", quality=quality)
160+
image.save(
161+
pathlib.Path(OUTPUT_PATH, f"q{quality}.jpeg"),
162+
format="JPEG",
163+
quality=quality,
164+
)
161165

162166
# Save average test results
163167
current_result[MIN_TIME_MS] = min_time_ns / 1e6

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs = 0
2828

2929
# Minimum Python version to use for version dependent checks. Will default to the
3030
# version used to run pylint.
31-
py-version = "3.8"
31+
py-version = "3.11"
3232

3333
# Discover python modules and packages in the file system subtree.
3434
recursive = true
@@ -115,7 +115,7 @@ addopts = "--ignore=modules/common/"
115115

116116
[tool.black]
117117
line-length = 100
118-
target-version = ["py38"]
118+
target-version = ["py311"]
119119
# Excludes files or directories in addition to the defaults
120120
# Submodules
121121
extend-exclude = "modules/common/*"

0 commit comments

Comments
 (0)