-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
consolidate Python configs into pyproject.toml, other clean up (#353)
Co-authored-by: Akshita Bhagia <[email protected]>
- Loading branch information
Showing
9 changed files
with
90 additions
and
97 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
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
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,18 +1,10 @@ | ||
# Checks style, syntax, and other useful errors. | ||
flake8 | ||
|
||
# Static type checking | ||
ruff | ||
mypy>=1.0,<1.4 | ||
|
||
# Automatic code formatting | ||
black>=23.1,<24.0 | ||
isort>=5.12,<5.13 | ||
|
||
# Running tests | ||
pytest | ||
pytest-sphinx | ||
|
||
# Needed for packaging and uploading to PyPi | ||
twine>=1.11.0 | ||
setuptools | ||
wheel | ||
build |
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,3 +1,51 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "olmo" | ||
dynamic = ["version", "dependencies", "optional-dependencies"] | ||
readme = "README.md" | ||
description = "Open Language Model (OLMo)" | ||
authors = [ | ||
{ name = "Allen Institute for Artificial Intelligence", email = "[email protected]" } | ||
] | ||
requires-python = ">=3.8" | ||
license = {file = "LICENSE"} | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/allenai/LLM" | ||
Repository = "https://github.com/allenai/LLM" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
|
||
[tool.setuptools.package-data] | ||
olmo = ["py.typed"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "olmo.version.VERSION" } | ||
dependencies = { file = ["requirements.txt"] } | ||
optional-dependencies = { dev = { file = ["dev-requirements.txt"] } } | ||
|
||
[tool.setuptools.packages.find] | ||
include = ["olmo*", "hf_olmo*"] | ||
exclude = [ | ||
"*.tests", | ||
"*.tests.*", | ||
"tests.*", | ||
"tests", | ||
"test_fixtures", | ||
"test_fixtures.*", | ||
"docs*", | ||
"scripts*", | ||
"olmo_tokenizer.*", | ||
"evaluation.*", | ||
"pretrain_data.*", | ||
"tmp_*", | ||
"inference.*", | ||
] | ||
|
||
[tool.black] | ||
line-length = 115 | ||
include = '\.pyi?$' | ||
|
@@ -12,6 +60,7 @@ exclude = ''' | |
| \bdist\b | ||
| \bdoc\b | ||
| pretrain_data/ | ||
| inference/ | ||
) | ||
''' | ||
|
||
|
@@ -20,14 +69,42 @@ profile = "black" | |
multi_line_output = 3 | ||
extend_skip = ["pretrain_data", "tokenizer"] | ||
|
||
[tool.ruff] | ||
line-length = 115 | ||
ignore = ["F403", "F405", "E501"] | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".venv", | ||
"venv", | ||
".mypy_cache", | ||
"__pycache__", | ||
".nox", | ||
".pants.d", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"doc", | ||
"pretrain_data", | ||
"inference", | ||
] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"**/__init__.py" = ["F401"] | ||
|
||
[tool.pyright] | ||
reportPrivateImportUsage = false | ||
exclude = ["pretrain_data/", "tokenizer/"] | ||
|
||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
no_site_packages = true | ||
|
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