-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move metadata to pyproject.toml (#23)
We still need a stub setup.cfg [until](pypa/setuptools#2816) setuptools gets proper editable installs and either flake8 [**finally**](PyCQA/flake8#234) gets the hint and support pyproject or [flakeheaven](https://github.com/flakeheaven/flakeheaven) is usable with vscode.
- Loading branch information
1 parent
1080979
commit 40b5145
Showing
6 changed files
with
83 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = "[email protected]"}] | ||
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", | ||
"mypy", | ||
] | ||
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 = ["+*", "-W503", "-E501"] | ||
pyflakes = ["+*", "-E203", "-E266"] | ||
pytest-style = ["+*"] | ||
|
||
[tool.mypy] | ||
allow_redefinition = true | ||
warn_unreachable = true | ||
plugins = ["pydantic.mypy"] | ||
|
||
[tool.black] | ||
line-length = 88 | ||
line-length = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,7 @@ | ||
[metadata] | ||
name = zeldarose | ||
version = 0.4.0 | ||
description = Train transformer-based models | ||
license = MIT | ||
author = Loïc Grobol | ||
author_email = [email protected] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,4 +166,4 @@ def test_train_mlm_with_remote_dataset( | |
"--max-epochs", | ||
"2", | ||
) | ||
assert ret.success | ||
assert ret.success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters