Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tox config #254

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ __pycache__
*$py.class

# Distribution / packaging
build
dist
site
build/
dist/
site/

# Cache
.cache
.hypothesis
.pytest_cache
.ruff_cache
.cache/
.hypothesis/
.pytest_cache/
.ruff_cache/
.tox/

# Environments
.env
.venv
venv
.venv/
venv/

# IntelliJ
.idea
.run
.idea/
.run/
68 changes: 13 additions & 55 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ tox = "^4.15.1"

[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.0"
mkdocs-material = "^9.5.27"
mkdocs-include-markdown-plugin = "^6.2.1"
mkdocstrings = {version = "^0.25.1", extras = ["python"]}
mkdocs-git-revision-date-localized-plugin = "^1.2.6"
mkdocs-include-markdown-plugin = "^6.2.1"
mkdocs-material = "^9.5.27"
mkdocs-minify-plugin = "^0.8.0"
mkdocstrings = {version = "^0.25.1", extras = ["python"]}

[tool.poetry.group.debug.dependencies]
ipython = "^8.25.0"
Expand Down Expand Up @@ -109,35 +109,21 @@ doctest_plus = "enabled"
doctest_subpackage_requires = {"lmo/contrib/pandas.py" = "pandas>=1.5"}
filterwarnings = ["error"]
log_cli_level = "INFO"
testpaths = ["tests", "lmo"]
testpaths = ["lmo", "tests"]
xfail_strict = true


[tool.pyright]
include = ["lmo"]
exclude = [
"**/__pycache__",
".git",
".github",
".hypothesis",
".pytest_cache",
".ruff_cache",
".vscode",
"dist",
"docs",
"site",
"tests",
]
ignore = [
"lmo/contrib/pandas.py",
]
defineConstant = { NP_V2 = true }
stubPath = 'typings'
exclude = ["tests"]
ignore = ["lmo/contrib/pandas.py"]
stubPath = "typings"
venvPath = "."
venv = ".venv"
pythonVersion = "3.10"
pythonPlatform = "All"
typeCheckingMode = "strict"
defineConstant = {NP_V2 = true}

useLibraryCodeForTypes = true
reportMissingTypeStubs = false
Expand Down Expand Up @@ -296,7 +282,6 @@ inline-quotes = "single"
[tool.ruff.lint.pylint]
allow-dunder-method-names = [
"__array__",
"__array_ufunc__",
"__lmo_register__",
]
allow-magic-value-types = ["int"]
Expand All @@ -311,37 +296,18 @@ exclude = ["typing.py"]


[tool.codespell]
skip = """\
./.git,\
./.github,\
./.hypothesis,\
./.pytest_cache,\
./.ruff_cache,\
./.venv,\
./.vscode,\
./dist,\
./site,\
*.lock,\
*.pyc,\
*.js,\
*.css,\
*.svg,\
*.png,\
*.ico,\
*.ipynb\
"""
skip = "./site,*.lock,*.pyc,*.css,*.js,*.svg"
context = 2


[tool.yapf]
based_on_style = 'pep8'

based_on_style = "pep8"
align_closing_bracket_with_visual_indent = false
blank_lines_around_top_level_definition = 1
blank_line_before_nested_class_or_def = false
blank_lines_between_top_level_imports_and_variables = 2
coalesce_brackets = true
continuation_align_style = 'space'
continuation_align_style = "space"
dedent_closing_brackets = true
force_multiline_dict = true
indent_dictionary_value = true
Expand All @@ -361,28 +327,20 @@ legacy_tox_ini = """
isolated_build = true
requires = tox>=4
envlist =
repo-review
pre-commit
py{310,311,312,313b2}

[testenv]
description = pytest
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --sync
commands_pre = poetry install --without debug,docs --sync
commands = poetry run pytest

[testenv:pre-commit]
description = pre-commit
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --sync
commands_pre = poetry install --without debug,docs --sync
commands = poetry run pre-commit run --all-files

[testenv:repo-review]
description = repo-review
skip_install = true
allowlist_externals = poetry
commands_pre = poetry install --sync
commands = poetry run repo-review .
"""