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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: CI

on:
workflow_dispatch:
push:
branches: [main, master]
branches: [main]
pull_request:

permissions: read-all
Expand All @@ -18,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

Expand Down
50 changes: 10 additions & 40 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,18 @@ on:
workflow_dispatch:
inputs:
version:
description: 'The version to prepare for release'
description: The version to prepare for release
required: true
permissions:
contents: read
pull-requests: write
jobs:
prepare_release:
name: Prepare Release v${{ github.event.inputs.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
cache: pip
python-version: 3.x
- name: Install dependencies
run: pip install packaging
- name: Prepare Git Variables
run: |
git config --global author.email ${{ github.actor }}@users.noreply.github.com
git config --global author.name ${{ github.actor }}
git config --global committer.email noreply@github.com
git config --global committer.name GitHub
- name: Set desired version
run: |
tools/set_version.py ${{ github.event.inputs.version }} > tmp_version
echo "version=$(cat tmp_version)" >> $GITHUB_ENV
- name: Commit desired version
run: git commit -am "Bump to v${{ env.version }}"
- name: Set development version
run: |
tools/set_version.py Unreleased > tmp_version
echo "dev_version=$(cat tmp_version)" >> $GITHUB_ENV
rm tmp_version
- name: Commit development version
run: git commit -am "Set development version v${{ env.dev_version }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
body:
branch: prepare_release_v${{ env.version }}
draft: false
title: Release v${{ env.version }}
name: Prepare Release
secrets:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
uses: praw-dev/.github/.github/workflows/prepare_release.yml@9ff8957d0cab4cf8c9d7cb5592aedb3d456cc058 # v1.4.0
with:
package: codesorter
version: ${{ inputs.version }}
version_file: const.py
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
schedule:
- cron: '36 1 * * 3'
push:
branches: ["main", "master"]
branches: ["main"]
permissions: read-all
jobs:
analysis:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/tag_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Tag Release
on:
push:
branches: [main]
permissions:
contents: write
jobs:
tag_release:
name: Tag Release
uses: praw-dev/.github/.github/workflows/tag_release.yml@9ff8957d0cab4cf8c9d7cb5592aedb3d456cc058 # v1.4.0
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Change Log
############

codesorter follows `semantic versioning <https://semver.org/>`_.

************
Unreleased
************
Expand Down
18 changes: 2 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Utilities"
Expand Down Expand Up @@ -175,28 +176,13 @@ ban-relative-imports = "all"
"S101", # pytest tests use assert
"SLF001"
]
"tools/*.py" = [
"ANN", # release scripts are short procedural shell-style code
"D", # release scripts are not part of the public docs surface
"DTZ", # naive dates are intentional (changelog dates)
"EM", # release scripts speak directly to stderr
"INP", # tools/ is a script folder, not a package
"PLR", # release scripts have simple linear flow
"PLW1514", # default encoding is fine for release scripts
"PTH", # plain open() is fine for release scripts
"RET503", # implicit None return is fine for release scripts
"RUF", # release scripts intentionally use simple constructs
"S", # subprocess/asserts are fine in maintenance scripts
"T20", # print is the script's primary output channel
"TRY" # release scripts use simple error reporting
]

[tool.tomlsort]
sort_inline_tables = true
sort_table_keys = true

[tool.tox]
envlist = ["py310", "py311", "py312", "py313", "pre-commit", "type"]
envlist = ["py310", "py311", "py312", "py313", "py314", "pre-commit", "type"]
minversion = "4.22"

[tool.tox.env.pre-commit]
Expand Down
Empty file removed tools/__init__.py
Empty file.
18 changes: 0 additions & 18 deletions tools/bump_version.py

This file was deleted.

122 changes: 0 additions & 122 deletions tools/set_version.py

This file was deleted.

Loading