Skip to content

Commit

Permalink
Adds type information, moves metadata to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
gremid committed Oct 1, 2024
1 parent 6ac8729 commit 8530b9a
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 44 deletions.
51 changes: 50 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,62 @@
[build-system]
requires = [
"setuptools>=42,<72.2.0",
"setuptools>=60,<72.2.0",
"pybind11>=2.10.0"
]
build-backend = "setuptools.build_meta"

[project]
name = "sfst-transduce"
description = "Python bindings for SFST focusing on transducer usage"
authors = [{name = "Gregor Middell", email = "[email protected]"}]
keywords = [
"Finite-state Transducer",
"Morphological Analysis",
"Natural Language Processing",
"NLP",
"SFST",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Education",
"Topic :: Scientific/Engineering",
"Topic :: Text Processing :: Linguistic",
]
requires-python = ">=3.8"
dynamic = ["dependencies", "version", "readme"]

[project.urls]
Homepage = "https://github.com/zentrum-lexikographie/sfst-transduce"
Repository = "https://github.com/zentrum-lexikographie/sfst-transduce.git"

[tool.cibuildwheel]
test-requires = "pytest"
test-command = "pytest {project}/tests"

[tool.isort]
profile = "black"

[tool.setuptools.dynamic]
version = {file = ["VERSION"]}
readme = {file = ["README.md"], content-type = "text/markdown"}

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

[tool.setuptools.package-data]
sfst_transduce = ["py.typed", "sfst_transduce.pyi"]
42 changes: 0 additions & 42 deletions setup.cfg

This file was deleted.

1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import setup

Expand Down
17 changes: 17 additions & 0 deletions sfst_transduce/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from typing import List

class Transducer:
def __init__(self, filename: str):
pass
def analyse(self, s: str) -> List[str]:
pass
def generate(self, s: str) -> List[str]:
pass

class CompactTransducer:
def __init__(self, filename: str):
pass
def analyse(self, s: str) -> List[str]:
pass
def generate(self, s: str) -> List[str]:
pass
Empty file added sfst_transduce/py.typed
Empty file.

0 comments on commit 8530b9a

Please sign in to comment.