Skip to content

Commit 96c76dd

Browse files
authored
build: upgrade python version (#65)
* build: upgrade python version * chore: replace quotes in ci pipeline * chore: upgrade precommit config yaml
1 parent daf1a3c commit 96c76dd

8 files changed

Lines changed: 38 additions & 38 deletions

File tree

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
name: 'Code Quality Checks'
2-
description: 'Runs formatting, linting, and type checking'
1+
name: "Code Quality Checks"
2+
description: "Runs formatting, linting, and type checking"
33

44
inputs:
55
check-type:
6-
description: 'Type of check to run (format, lint, or type-check)'
6+
description: "Type of check to run (format, lint, or type-check)"
77
required: true
88
source-dir:
9-
description: 'Source directory to check'
9+
description: "Source directory to check"
1010
required: false
11-
default: 'src/'
11+
default: "src/"
1212

1313
runs:
1414
using: "composite"
1515
steps:
1616
- name: Run Ruff Formatting
17-
if: inputs.check-type == 'format'
17+
if: inputs.check-type == "format"
1818
shell: bash
1919
run: poetry run ruff format --config pyproject.toml ${{ inputs.source-dir }}
2020

2121
- name: Run Ruff Linting
22-
if: inputs.check-type == 'lint'
22+
if: inputs.check-type == "lint"
2323
shell: bash
2424
run: poetry run ruff check --config pyproject.toml ${{ inputs.source-dir }}
2525

2626
- name: Run Mypy Type Checking
27-
if: inputs.check-type == 'type-check'
27+
if: inputs.check-type == "type-check"
2828
shell: bash
2929
run: poetry run mypy --config-file pyproject.toml ${{ inputs.source-dir }}

.github/actions/setup-env/action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
name: 'Setup Environment'
2-
description: 'Sets up Python, Poetry, and dependencies with caching'
1+
name: "Setup Environment"
2+
description: "Sets up Python, Poetry, and dependencies with caching"
33

44
inputs:
55
python-version:
6-
description: 'Python version to use'
6+
description: "Python version to use"
77
required: false
8-
default: '3.12'
8+
default: "3.12"
99
cache-key-suffix:
10-
description: 'Additional suffix for cache key'
10+
description: "Additional suffix for cache key"
1111
required: false
12-
default: ''
12+
default: ""
1313

1414
runs:
1515
using: "composite"
@@ -29,7 +29,7 @@ runs:
2929
path: |
3030
~/.cache/pypoetry
3131
~/.poetry
32-
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}${{ inputs.cache-key-suffix }}
32+
key: ${{ runner.os }}-poetry-${{ hashFiles("**/poetry.lock") }}${{ inputs.cache-key-suffix }}
3333

3434
- name: Install dependencies
3535
shell: bash

.github/workflows/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
name: 'Shared Configuration'
1+
name: "Shared Configuration"
22

33
on:
44
workflow_call:
55
outputs:
66
python-version:
77
description: "Python version to use"
8-
value: '3.12'
8+
value: "3.12"
99
poetry-cache-path:
1010
description: "Poetry cache paths"
1111
value: |
1212
~/.cache/pypoetry
1313
~/.poetry
1414
source-dir:
1515
description: "Source directory to check"
16-
value: 'src/'
16+
value: "src/"
1717

1818
jobs:
1919
config:
2020
runs-on: ubuntu-latest
2121
outputs:
22-
python-version: '3.12'
22+
python-version: "3.12"
2323
poetry-cache-path: |
2424
~/.cache/pypoetry
2525
~/.poetry
26-
source-dir: 'src/'
26+
source-dir: "src/"
2727
steps:
2828
- run: echo "Shared configuration loaded"

.github/workflows/main.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: 'CI and Release'
1+
name: "CI and Release"
22

33
on:
44
push:
55
branches:
6-
- '*'
6+
- "*"
77
pull_request:
88

99
jobs:
@@ -29,7 +29,7 @@ jobs:
2929
python-version: ${{ needs.config.outputs.python-version }}
3030
- uses: ./.github/actions/code-quality
3131
with:
32-
check-type: 'format'
32+
check-type: "format"
3333
source-dir: ${{ needs.config.outputs.source-dir }}
3434

3535
lint:
@@ -42,7 +42,7 @@ jobs:
4242
python-version: ${{ needs.config.outputs.python-version }}
4343
- uses: ./.github/actions/code-quality
4444
with:
45-
check-type: 'lint'
45+
check-type: "lint"
4646
source-dir: ${{ needs.config.outputs.source-dir }}
4747

4848
type-check:
@@ -55,7 +55,7 @@ jobs:
5555
python-version: ${{ needs.config.outputs.python-version }}
5656
- uses: ./.github/actions/code-quality
5757
with:
58-
check-type: 'type-check'
58+
check-type: "type-check"
5959
source-dir: ${{ needs.config.outputs.source-dir }}
6060

6161
test:
@@ -71,7 +71,7 @@ jobs:
7171

7272
release:
7373
needs: [ config, setup, format, lint, type-check, test ]
74-
if: github.ref == 'refs/heads/main'
74+
if: github.ref == "refs/heads/main"
7575
runs-on: ubuntu-latest
7676
steps:
7777
- uses: actions/checkout@v4
@@ -97,15 +97,15 @@ jobs:
9797
fi
9898
9999
- name: Find Previous Release
100-
if: env.CREATE_RELEASE == 'true'
100+
if: env.CREATE_RELEASE == "true"
101101
run: |
102102
PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
103103
if [ -n "$PREV_TAG" ]; then
104104
echo "PREV_TAG=${PREV_TAG}" >> $GITHUB_ENV
105105
fi
106106
107107
- name: Generate Compare URL
108-
if: env.CREATE_RELEASE == 'true'
108+
if: env.CREATE_RELEASE == "true"
109109
run: |
110110
if [ -n "${{ env.PREV_TAG }}" ]; then
111111
echo "URL=${{ github.server_url }}/${{ github.repository }}/compare/${{ env.PREV_TAG }}...${{ env.VERSION }}" >> $GITHUB_ENV
@@ -114,7 +114,7 @@ jobs:
114114
fi
115115
116116
- name: Generate Changelog
117-
if: env.CREATE_RELEASE == 'true'
117+
if: env.CREATE_RELEASE == "true"
118118
run: |
119119
chmod +x .github/generate_changelog.sh
120120
source .github/generate_changelog.sh
@@ -128,7 +128,7 @@ jobs:
128128
echo "EOF" >> $GITHUB_ENV
129129
130130
- name: Create Release
131-
if: env.CREATE_RELEASE == 'true'
131+
if: env.CREATE_RELEASE == "true"
132132
uses: softprops/action-gh-release@v2
133133
with:
134134
tag_name: ${{ env.VERSION }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
5-
rev: v9.18.0
5+
rev: v9.20.0
66
hooks:
77
- id: commitlint
88
stages: [ commit-msg ]

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12.7
1+
3.12.8

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pyenv install --list
104104
Download & install a specific Python version:
105105

106106
```bash
107-
pyenv install 3.12.7
107+
pyenv install 3.12.8
108108
```
109109

110110
List the global Python version set by your system:
@@ -122,13 +122,13 @@ pyenv local
122122
Set the global Python version for your system:
123123

124124
```bash
125-
pyenv global 3.12.7
125+
pyenv global 3.12.8
126126
```
127127

128128
Set the local Python version for your project:
129129

130130
```bash
131-
pyenv local 3.12.7
131+
pyenv local 3.12.8
132132
```
133133

134134
Feel free to utilize Pyenv and modify the `.python-version` file to your preference.

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)