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
28 changes: 0 additions & 28 deletions .flake8

This file was deleted.

4 changes: 3 additions & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ categories:
- title: 'Testing'
label: 'tests'
- title: 'Under the Bonnet'
label: 'code improvement'
labels:
- 'code improvement'
- 'code tidy'
- title: 'Continuous Integration'
label: 'CI'
template: |
Expand Down
25 changes: 8 additions & 17 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
name: Build and test

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
check-black:
# fail it if doesn't conform to black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check --verbose"
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
- uses: pre-commit/action@v3.0.1

build-and-test:
needs: pre-commit

runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -40,11 +35,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements_tests.txt
pip install -e .
- name: Lint with flake8
# fail it if doesn't pass flake8
run: |
flake8 . --statistics
- name: Test with pytest
# fail it if doesn't pass test suite
run: |
pytest
pytest
32 changes: 14 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.13
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.13.0
hooks:
# Run the linter.
- id: ruff-check
# Run the formatter.
- id: ruff-format
87 changes: 0 additions & 87 deletions .pylintrc

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# valimp

<!-- UPDATE BADGE ADDRESSES! -->
[![PyPI](https://img.shields.io/pypi/v/valimp)](https://pypi.org/project/valimp/) ![Python Support](https://img.shields.io/pypi/pyversions/valimp) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI](https://img.shields.io/pypi/v/valimp)](https://pypi.org/project/valimp/) ![Python Support](https://img.shields.io/pypi/pyversions/valimp) [![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-D7FF64.svg)](https://github.com/astral-sh/ruff) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/maread99/valimp/main.svg)](https://results.pre-commit.ci/latest/github/maread99/valimp/main)

In Python use type hints to validate, parse and coerce inputs to **public functions and dataclasses**.

Expand Down
27 changes: 8 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=43.0.0", "wheel", "setuptools_scm[toml]>=6.2"]
requires = ["setuptools>=77.0.0", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -10,7 +10,7 @@ authors = [
{name = "Marcus Read"},
]
readme = "README.md"
license = {text = "MIT License"}
license = "MIT"
keywords = [
"validation",
"parsing",
Expand All @@ -20,12 +20,11 @@ keywords = [
"input",
"function"
]
requires-python = "~=3.9"
requires-python = ">=3.9, <4"

classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
Expand All @@ -43,22 +42,16 @@ classifiers = [

dynamic = ["version"]

[project.optional-dependencies]
tests = [
"black",
"flake8",
"flake8-docstrings",
[dependency-groups]
test = [
"pytest",
]

dev = [
"black",
"flake8",
"flake8-docstrings",
"pytest",
{include-group = "test"},
"mypy",
"pip-tools",
"pre-commit",
"pylint",
# "ruff", # use local standalone install or ruff extension for editor.
]

[project.urls]
Expand All @@ -69,7 +62,3 @@ documentation = "https://github.com/maread99/valimp"

[tool.setuptools_scm]
write_to = "src/valimp/_version.py"

[tool.black]
line-length = 88
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
Loading
Loading