diff --git a/pyproject.toml b/pyproject.toml index a8d9a52..587c8f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,78 @@ +[build-system] +requires = ["setuptools>=61", "wheel"] +build-backend = "setuptools.build_meta" + [project] name = "zeldarose" +version = "0.4.0" +description = "Train transformer-based models" +license = {text = "MIT"} +authors = [{name = "Loïc Grobol", email = "loic.grobol@gmail.com"}] +classifiers = [ + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Environment :: Console", +] +keywords = [ + "nlp", + "transformers", + "language-model", +] requires-python = ">=3.8" +dependencies = [ + "click", + "click_pathlib", + "datasets", + "filelock", + "loguru", + "pydantic", + "pytorch-lightning >= 1.5.6, < 1.6.0", + "rich", + "torch > 1.8, < 1.12", + "torchmetrics", + "tokenizers ~= 0.10", + "toml", + "tqdm", + "transformers >= 4.0.0, < 5.0.0", +] -[build-system] -requires = ["setuptools>=54", "wheel"] -build-backend = "setuptools.build_meta" +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.optional-dependencies] +lint = [ + "flakeheaven", + "flake8-bugbear", + "flake8-pytest-style", +] +tests = [ + "pytest", + "pytest-console-scripts", + "pytest-lazy-fixture", +] + + +[project.scripts] +zeldarose-tokenizer = "zeldarose.train_tokenizer:main" +zeldarose-transformer = "zeldarose.train_transformer:main" + + +[tool.flakeheaven] +max_line_length = 100 + +[tool.flakeheaven.plugins] +bugbear = ["+*"] +pycodestyle = ["+*"] +pyflakes = ["+*", "-E203","-E266","-E501","-W503"] +pytest-style = ["+*"] + +[tool.mypy] +allow_redefinition = true +warn_unreachable = true +plugins = ["pydantic.mypy"] [tool.black] -line-length = 88 +line-length = 100 diff --git a/setup.cfg b/setup.cfg index f22a149..d116db4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,61 +1,7 @@ -[metadata] -name = zeldarose -version = 0.4.0 -description = Train transformer-based models -license = MIT -author = Loïc Grobol -author_email = loic.grobol@gmail.com -long_description = file: README.md -long_description_content_type = text/markdown -classifiers = - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Environment :: Console -keywords = - nlp - transformers - language-model - - [options] packages = find: -include_package_data = True -python_requires = >=3.8 -install_requires = - click - click_pathlib - datasets - filelock - loguru - pydantic - pytorch-lightning >= 1.5.6, < 1.6.0 - rich - torch > 1.8, < 1.12 - torchmetrics - tokenizers ~= 0.10 - toml - tqdm - transformers >= 4.0.0, < 5.0.0 - -[options.extras_require] -tests = - pytest - pytest-console-scripts - pytest-lazy-fixture - -[options.entry_points] -console_scripts = - zeldarose-tokenizer = zeldarose.train_tokenizer:main - zeldarose-transformer = zeldarose.train_transformer:main [flake8] max-line-length = 100 ignore = E203,E266,E501,W503 max-complexity = 18 - -[mypy] -allow_redefinition = True -warn_unreachable = True -plugins = pydantic.mypy