Skip to content

Commit

Permalink
Fix packaging (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Oct 20, 2024
1 parent 8663ced commit eded4c1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 25 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ concurrency:

jobs:
test:
name: test with ${{ matrix.env }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -25,10 +24,9 @@ jobs:
- "3.11"
- "3.10"
- "3.9"
os:
- ubuntu-latest
- macos-latest
- windows-latest
- type
- dev
- pkg_meta
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -38,23 +36,15 @@ jobs:
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Add .local/bin to Windows PATH
if: runner.os == 'Windows'
shell: bash
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv
- name: Install Python
if: matrix.env != '3.13'
if: startsWith(matrix.env, '3.') && matrix.env != '3.13'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Setup test suite
run: tox run -vv --notest --skip-missing-interpreters false
env:
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
- name: Run test suite
run: tox run --skip-pkg-install
run: tox run --skip-pkg-install -e ${{ matrix.env }}
env:
PYTEST_ADDOPTS: "-vv --durations=20"
DIFF_AGAINST: HEAD
TOX_GH_MAJOR_MINOR: ${{ matrix.env }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# toml-fmt-common
# toml-fmt-py-common

Contains Python code common to all formatters under the `toml-fmt` umbrella.
Contains Python code common to all formatters under the `toml-fmt` umbrella (meant to only be used by that project).

[![Test common](https://github.com/tox-dev/toml-fmt/actions/workflows/py-common.yaml/badge.svg)](https://github.com/tox-dev/toml-fmt/actions/workflows/py-common.yaml)
[![check](https://github.com/tox-dev/toml-fmt-py-common/actions/workflows/check.yaml/badge.svg)](https://github.com/tox-dev/toml-fmt-py-common/actions/workflows/check.yaml)
15 changes: 10 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.4",
"hatchling>=1.25",
]

[project]
name = "toml-fmt-common"
version = "1.0.0"
description = "Common logic to the TOML formatter."
readme = "README.md"
license = "MIT"
Expand All @@ -30,13 +30,18 @@ classifiers = [
"Topic :: Software Development :: Libraries",
"Topic :: System",
]
dynamic = [ "version" ]
dependencies = [
"tomli>=2.0.2; python_version<'3.11'",
]
urls."Bug Tracker" = "https://github.com/tox-dev/toml-fmt/issues"
urls."Changelog" = "https://github.com/tox-dev/toml-fmt/blob/main/py-common/CHANGELOG.md"
urls.Documentation = "https://github.com/tox-dev/toml-fmt/"
urls."Source Code" = "https://github.com/tox-dev/toml-fmt"
urls.Changelog = "https://github.com/tox-dev/toml-fmt-py-common/releases"
urls.Documentation = "https://github.com/tox-dev/toml-fmt-py-common#toml-fmt-py-common"
urls.Homepage = "https://github.com/tox-dev/toml-fmt-py-common"
urls.Source = "https://github.com/tox-dev/toml-fmt-py-common"
urls.Tracker = "https://github.com/tox-dev/toml-fmt-py-common/issues"

[tool.hatch]
version.source = "vcs"

[tool.ruff]
line-length = 120
Expand Down

0 comments on commit eded4c1

Please sign in to comment.