Skip to content
Open
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
11 changes: 11 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,20 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install textparser development and testing dependencies
run: |
pip install --upgrade pip
pip install .
pip install .[test]
- name: Test
run: |
python -m unittest
- name: Static type checking (mypy)
run: |
python -m mypy --strict textparser tests
- name: Linting (ruff)
run: |
ruff check textparser tests

release:
needs: [test]
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

89 changes: 89 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
[build-system]
requires = ["setuptools>=68", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "textparser"
authors = [
{name = "Erik Moqvist"},
]
description = "A text parser library for python."
readme = "README.rst"
requires-python = ">=3.10"
keywords = ['parser', 'parsing']
license = { text = "MIT" }
classifiers = [
"License :: OSI Approved :: MIT License",
]
dependencies = [
]
dynamic = ["version"]

[tool.setuptools_scm]
# can be empty if no extra settings are needed, presence enables setuptools_scm

[project.urls]
homepage = "https://github.com/cantools/textparser"
documentation = "https://textparser.readthedocs.io/"
repository = "https://github.com/cantools/textparser"

[project.optional-dependencies]
examples = [
"lark-parser",
"pyparsing",
"parsita",
"funcparserlib",
"parsy",
"parsimonious",
"textx",
]
test = [
"mypy >= 2.1",
"ruff >= 0.15.16",
"pytest >= 9.0",
"coverage >= 7.14",
]

[tool.setuptools]
packages = ["textparser"]

[tool.mypy]
show_error_codes = true
warn_return_any = true
warn_unused_configs = true
no_implicit_optional = true
disallow_incomplete_defs = true
warn_redundant_casts = true
warn_unused_ignores = true

exclude = [
'build',
]

[tool.ruff]
line-length = 80
lint.extend-select = [
"A", # flake8-builtins
"B", # pyflakes-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle Error
"F", # pyflakes
"FURB", # refurb
"I", # isort
"PIE", # flake8-pie
"PL", # pylint
"RUF", # Ruff-specific rules
"TCH", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle Warning
]
lint.ignore = [
"E501", # line too long
"F541", # f-string-missing-placeholders
"PLR09", # too-many-this, too-many-that
"PLR2004", # magic-value-comparison
"PLW1641", # eq-without-hash
"PLW2901", # redefined-loop-name
"RUF012", # mutable-class-default
]
lint.isort.known-first-party = ["textparser"]
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

29 changes: 0 additions & 29 deletions setup.py

This file was deleted.

Loading
Loading