Skip to content

Commit

Permalink
maintenance: update setup and use pyproject.toml (#138)
Browse files Browse the repository at this point in the history
* maintenance: replace setup.py by pyproject.toml

* update dev dependencies

* update descriptors and remove requirements-dev.txt

* fix syntax
  • Loading branch information
adbar committed Aug 6, 2024
1 parent 63933fc commit 342d26a
Show file tree
Hide file tree
Showing 5 changed files with 127 additions and 130 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
# package setup
- uses: actions/checkout@v4

- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Install package and dependencies
run: pip install .[dev]

# tests
- name: Lint with flake8
Expand All @@ -77,7 +77,7 @@ jobs:

# coverage with default version
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand Down
5 changes: 1 addition & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
include CITATION.cff
include HISTORY.rst
include LICENSE
include README.md
include CITATION.cff HISTORY.rst LICENSE README.md
include licenses/
include simplemma/py.typed
graft simplemma/strategies/
Expand Down
123 changes: 123 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "simplemma"
description = "A lightweight toolkit for multilingual lemmatization and language detection."
readme = "README.md"
license = { text = "MIT License" }
dynamic = ["version"]
requires-python = ">=3.8"
authors = [
{name = "Adrien Barbaresi", email = "[email protected]"}
]
keywords=[
"language detection",
"language identification",
"langid",
"lemmatization",
"lemmatizer",
"lemmatiser",
"nlp",
"tokenization",
"tokenizer",
]
classifiers = [
# https://pypi.org/classifiers/
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: Bulgarian",
"Natural Language :: Catalan",
"Natural Language :: Croatian",
"Natural Language :: Czech",
"Natural Language :: Danish",
"Natural Language :: Dutch",
"Natural Language :: English",
"Natural Language :: Finnish",
"Natural Language :: French",
"Natural Language :: Galician",
"Natural Language :: German",
"Natural Language :: Greek",
"Natural Language :: Hindi",
"Natural Language :: Hungarian",
"Natural Language :: Icelandic",
"Natural Language :: Indonesian",
"Natural Language :: Irish",
"Natural Language :: Italian",
"Natural Language :: Latin",
"Natural Language :: Latvian",
"Natural Language :: Lithuanian",
"Natural Language :: Macedonian",
"Natural Language :: Malay",
"Natural Language :: Norwegian",
"Natural Language :: Polish",
"Natural Language :: Portuguese",
"Natural Language :: Romanian",
"Natural Language :: Russian",
"Natural Language :: Slovak",
"Natural Language :: Slovenian",
"Natural Language :: Spanish",
"Natural Language :: Swedish",
"Natural Language :: Thai",
"Natural Language :: Turkish",
"Natural Language :: Ukrainian",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Software Development :: Internationalization",
"Topic :: Software Development :: Localization",
"Topic :: Text Processing :: Linguistic",
"Typing :: Typed",
]
dependencies = []

# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
[tool.setuptools]
packages = ["simplemma"]

[tool.setuptools.package-data]
simplemma = ["strategies/dictionaries/data/*.plzma"]

# https://packaging.python.org/en/latest/guides/single-sourcing-package-version/
[tool.setuptools.dynamic]
version = {attr = "simplemma.__version__"}

[project.urls]
"Homepage" = "https://github.com/adbar/simplemma"
"Docs" = "https://adbar.github.io/simplemma/"
"Blog" = "https://adrien.barbaresi.eu/blog/"

[project.optional-dependencies]
marisa-trie = [
"marisa_trie == 1.2.0",
"platformdirs == 4.2.2",
]
test = [
"simplemma[marisa-trie]",
"pytest == 8.3.2",
"pytest-cov == 5.0.0",
]
dev = [
"simplemma[test]",
"black == 24.8.0",
"flake8 == 7.1.1",
"mypy == 1.11.0",
"types-requests == 2.32.0.20240712",
]
docs = [
"mkdocs",
"mkdocs-material",
"mkdocstrings",
"mkdocstrings-python",
]
8 changes: 0 additions & 8 deletions requirements-dev.txt

This file was deleted.

115 changes: 0 additions & 115 deletions setup.py

This file was deleted.

0 comments on commit 342d26a

Please sign in to comment.