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
60 changes: 48 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,58 @@ on:
# manually triggered

jobs:
build:

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
env:
UV_PYTHON: ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@v3
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Tests
run: |
python -m venv .env
.env/bin/pip install -U setuptools pip
.env/bin/pip install '.[testing]'
.env/bin/pytest tests
uv venv
uv pip install ".[testing]"
.venv/bin/pytest tests

publish:
if: startsWith(github.ref, 'refs/tags/')
needs: test
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install hatch
run: pip install hatch

- name: Build package
run: hatch build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
skip-existing: true
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Slash-Step ChangeLog

Next Version
------------
* Update supported python version: add 3.13
* Publish to PyPi through CI
* Remove code compatibility for unsupported python versions

Version 1.2.0 (Released 2021-09-07)
-----------------------------------
* Update supported python version: add 3.12 & remove 3.7
Expand Down
15 changes: 7 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,27 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"Logbook>=1.2.0",
"gossip",
"slash>=0.7.0",
# Slash still using pkg_resources, installing setuptools as temporary workaround
# so this repo can be installed with UV
# Should be removed once a new version of slash will be released.
"setuptools<81",
]

dynamic = ["version"]

authors = [
{ name = "Omer Gertel", email = "omer.gertel@gmail.com" },
]
authors = [{ name = "Omer Gertel", email = "omer.gertel@gmail.com" }]

[project.urls]
"Homepage" = "https://github.com/getslash/slash-step"

[project.optional-dependencies]
testing = [
"pytest",
"pylint",
"munch",
]
testing = ["pytest", "pylint", "munch"]

[tool.hatch.version]
source = "vcs"
4 changes: 2 additions & 2 deletions slash_step/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from ._compat import get_distribution
from importlib.metadata import distribution

__version__ = get_distribution("slash-step").version
__version__ = distribution("slash-step").version
14 changes: 0 additions & 14 deletions slash_step/_compat.py

This file was deleted.