Skip to content

Commit

Permalink
Migrate to uv (project + package management) and ruff (formatting + l…
Browse files Browse the repository at this point in the history
…inting)

Also increment version 0.0.4.

CMK-21132
  • Loading branch information
jherbel committed Jan 13, 2025
1 parent aa3f89f commit 49bc8b3
Show file tree
Hide file tree
Showing 7 changed files with 193 additions and 332 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v5
with:
python-version-file: "pyproject.toml"
version: "latest"

- run: python3 -m pip install poetry
- run: uv sync

- run: poetry build
- run: uv build

- run: tar --create --gzip --verbose --file dist.tar.gz dist

- name: "Set release according to package version"
id: compute-tag
run: |
version="$(poetry version | cut --delimiter " " --fields 2)"
echo "TAG=v${version}" >> "${GITHUB_OUTPUT}"
version="$(uv tree | grep --regexp "^robotframework-robotmklibrary v.*" | cut --delimiter " " --fields 2)"
echo "TAG=${version}" >> "${GITHUB_OUTPUT}"
- name: "Push release tag"
# This is publicly visible and needs to be manually fixed if any
Expand All @@ -42,7 +42,7 @@
git tag ${{ steps.compute-tag.outputs.TAG }} # Fails, if tag exists.
git push origin ${{ steps.compute-tag.outputs.TAG }}
- uses: ncipollo/release-action@v1.13.0
- uses: ncipollo/release-action@v1
with:
allowUpdates: false
artifacts: "dist.tar.gz"
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,26 @@ jobs:

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"

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python_version }}
version: "latest"
python-version: ${{ matrix.python-version }}

- run: python3 -m pip install poetry
- run: uv sync

- run: poetry install --with dev
- run: uv run ruff format --diff

- run: poetry run black --check ./
- run: uv run ruff check

- run: poetry run isort --check-only ./

- run: poetry run mypy ./

- run: poetry run pylint RobotmkLibrary/
- run: uv run mypy src
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
290 changes: 0 additions & 290 deletions poetry.lock

This file was deleted.

Loading

0 comments on commit 49bc8b3

Please sign in to comment.