Skip to content

Commit 0f00313

Browse files
committed
Migrates to pyproject.toml
1 parent 67f19b4 commit 0f00313

File tree

4 files changed

+46
-55
lines changed

4 files changed

+46
-55
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Installation
2222
Documentation
2323
=============
2424

25-
*discriminative_lexicon_model* uses ``sphinx`` to create a documentation manual. The documentation is hosted on `Read the Docs <http://discriminative-lexicon-model.readthedocs.io/en/latest/>`_.
25+
*discriminative_lexicon_model* uses ``sphinx`` to create a documentation manual. The documentation is hosted on `Read the Docs <https://discriminative-lexicon-model.readthedocs.io/en/latest/>`_.
2626

2727

2828
Authors and Contributers

discriminative_lexicon_model/__init__.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,3 @@
2525
except ModuleNotFoundError:
2626
pass
2727

28-
__author__ = 'Motoki Saito'
29-
__author_email__ = '[email protected]'
30-
__version__ = '1.4.1'
31-
__license__ = 'MIT'
32-
__description__ = 'Discriminative Lexicon Model in Python'
33-
__classifiers__ = [
34-
'Development Status :: 3 - Alpha',
35-
'Environment :: Console',
36-
'Intended Audience :: Science/Research',
37-
'License :: OSI Approved :: MIT License',
38-
'Operating System :: POSIX :: Linux',
39-
'Operating System :: MacOS',
40-
'Operating System :: Microsoft :: Windows',
41-
'Programming Language :: Python',
42-
'Programming Language :: Python :: 3.11',
43-
'Programming Language :: Python :: 3 :: Only',
44-
'Topic :: Scientific/Engineering'
45-
]
46-

pyproject.toml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,44 @@
1-
[project.optional-dependencies]
2-
docs = ["sphinx-rtd-theme", "sphinx_rtd_theme"]
1+
[tool.poetry]
2+
name = "discriminative_lexicon_model"
3+
version = "1.4.1"
4+
description = "Python-implementation of Discriminative Lexicon Model / Linear Discriminative Learning"
5+
6+
license = "MIT"
7+
8+
authors = ["Motoki Saito <[email protected]>"]
9+
10+
readme = "README.rst"
11+
12+
repository = "https://github.com/quantling/discriminative_lexicon_model"
13+
homepage = "https://discriminative-lexicon-model.readthedocs.io/en/latest/"
14+
15+
classifiers = ['Development Status :: 3 - Alpha',
16+
'Environment :: Console',
17+
'Intended Audience :: Science/Research',
18+
'License :: OSI Approved :: MIT License',
19+
'Operating System :: POSIX :: Linux',
20+
'Operating System :: MacOS',
21+
'Operating System :: Microsoft :: Windows',
22+
'Programming Language :: Python',
23+
'Programming Language :: Python :: 3.11',
24+
'Programming Language :: Python :: 3 :: Only',
25+
'Topic :: Scientific/Engineering']
26+
27+
[tool.poetry.dependencies]
28+
python = ">=3.11"
29+
numpy = ">=1.26"
30+
scipy = ">=1.13"
31+
pandas = ">=2.2"
32+
xarray = ">=2023.6"
33+
fasttext = ">=0.9"
34+
tqdm = ">=4.66"
35+
setuptools = ">=72.1"
36+
37+
[tool.poetry.dev-dependencies]
38+
pytest = ">=7.4"
39+
sphinx = ">=7.3"
40+
sphinx_rtd_theme = ">=2.0"
41+
42+
[build-system]
43+
requires = ["poetry-core", "setuptools", "Cython", "numpy"]
44+
build-backend = "poetry.core.masonry.api"

setup.py

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,3 @@
11
from setuptools import setup
22

3-
pkg = __import__('discriminative_lexicon_model')
4-
author = pkg.__author__
5-
email = pkg.__author_email__
6-
version = pkg.__version__
7-
license = pkg.__license__
8-
description = pkg.__description__
9-
classifiers = pkg.__classifiers__
10-
11-
def load_requirements (fname):
12-
"""
13-
Read a requirement.txt
14-
"""
15-
with open(fname, 'r') as f:
16-
return [ i.rstrip() for i in list(f) if i and not i.startswith('#') ]
17-
18-
setup(
19-
name='discriminative_lexicon_model',
20-
version=version,
21-
license=license,
22-
description=description,
23-
long_description=open('README.rst').read(),
24-
author=author,
25-
author_email=email,
26-
url='https://github.com/msaito8623/discriminative_lexicon_model',
27-
classifiers=classifiers,
28-
platform='Linux',
29-
packages=['discriminative_lexicon_model'],
30-
install_requires=load_requirements('requirements.txt'),
31-
extras_require={
32-
'tests': ['pytest'],
33-
'docs': ['sphinx', 'sphinx_rtd_theme', 'sphinx-rtd-theme']
34-
},
35-
)
3+
setup()

0 commit comments

Comments
 (0)