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 Sep 30, 2024
1 parent 6ac8729 commit baf62e5
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 43 deletions.
Empty file added py.typed
Empty file.
48 changes: 47 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,59 @@
[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.package-data]
sfst_transduce = ["py.typed", "sfst_transduce.pyi"]
42 changes: 0 additions & 42 deletions setup.cfg

This file was deleted.

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

class Transducer:
@staticmethod
def create(filename: str) -> CompactTransducer:
pass
def analyse(self, s: str) -> List[str]:
pass
def generate(self, s: str) -> List[str]:
pass

class CompactTransducer:
@staticmethod
def create(filename: str) -> CompactTransducer:
pass
def analyse(self, s: str) -> List[str]:
pass
def generate(self, s: str) -> List[str]:
pass

0 comments on commit baf62e5

Please sign in to comment.