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
57 changes: 36 additions & 21 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,53 @@ jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.X
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.X"
- name: Install black
run: python -m pip install --upgrade pip black
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Install dependencies
run: uv sync --extra dev
- name: black
run: black . --check
run: uv run black . --check

coverage:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.X
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
python-version: "3.X"
- name: Install pytest code coverage
run: python -m pip install ".[dev]"
version: "latest"
- name: Install dependencies
run: uv sync --extra dev
- name: testcoverage
run: python -m pytest -n auto --cov-report=term-missing --cov=tests --cov=schemey --cov=injecty_config_schemey --cov-fail-under=100
run: uv run pytest -n auto --cov-report=term-missing --cov=tests --cov=schemey --cov=injecty_config_schemey --cov-fail-under=100

pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.X
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
python-version: "3.X"
- name: Install pylint
run: python -m pip install ".[dev]"
version: "latest"
- name: Install dependencies
run: uv sync --extra dev
- name: lint
run: pylint injecty_config_schemey schemey
run: uv run pylint injecty_config_schemey schemey
39 changes: 27 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,32 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/checkout@v4
with:
python-version: "3.X"
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/
- name: Publish distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
fetch-depth: 0 # Required for version detection
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
password: ${{ secrets.PYPI_API_TOKEN }}
version: "latest"
- name: Install dependencies
run: uv sync --extra dev
- name: Set version from git tag
run: |
# Extract version from git tag (remove 'v' prefix if present)
VERSION=$(git describe --tags --exact-match 2>/dev/null | sed 's/^v//')
echo "Setting version to: $VERSION"
# Update pyproject.toml with the actual version
sed -i "s/version = \"0.0.0\" # This will be replaced by the release workflow/version = \"$VERSION\"/" pyproject.toml
# Verify the change
grep "version = " pyproject.toml
- name: Build package
run: uv build
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: uv publish
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

48 changes: 48 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[project]
name = "schemey"
version = "0.0.0" # This will be replaced by the release workflow
description = "Convention over configuration Object Schemas for python"
authors = [
{name = "Tim O'Farrell", email = "tofarr@gmail.com"}
]
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"injecty~=0.0",
"marshy~=5.0",
"jsonschema~=4.8",
]

[project.urls]
Repository = "https://github.com/tofarr/schemey"

[project.optional-dependencies]
dev = [
"black~=23.3",
"pytest~=7.2",
"pytest-cov~=4.0",
"pytest-xdist~=3.2",
"pylint~=3.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = ["schemey"]

[tool.hatch.build.targets.sdist]
exclude = ["tests*", "examples", "images"]

[dependency-groups]
dev = [
"hatch-vcs>=0.5.0",
"hatchling>=1.28.0",
]
33 changes: 0 additions & 33 deletions setup.py

This file was deleted.

Loading