From c55ecd15050ae5e4aada1438ac53848ef5b11055 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 23 Jan 2025 17:33:03 -0500 Subject: [PATCH] tests: limit dask --- .github/workflows/ci.yml | 2 +- noxfile.py | 2 +- pyproject.toml | 32 +++++++++----------------------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 852617ec..e31e2088 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,7 @@ jobs: run: uv pip list - name: Install package - run: uv pip install -e ".[test]" + run: uv pip install -e ".[test,dask]" - name: Test package run: python -m pytest diff --git a/noxfile.py b/noxfile.py index e2e6f7e3..54a065b7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -29,7 +29,7 @@ def pylint(session: nox.Session) -> None: Run pylint. """ - session.install("pylint~=2.17.0") + session.install("pylint~=3.3.3") session.install("-e.") session.run("pylint", "hist", *session.posargs) diff --git a/pyproject.toml b/pyproject.toml index 1a40142e..b5878091 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,37 +67,21 @@ fit = [ "iminuit >=2", ] dask = [ - "dask[dataframe] >=2022", + "dask[dataframe] >=2022,<2025", "dask_histogram >=2023.1", ] test = [ "pytest >=6", "pytest-mpl >=0.12", - "dask[dataframe] >=2022; python_version<'3.13'", - "dask_histogram >=2023.1; python_version<'3.13'", ] dev = [ - "pytest >=6", - "pytest-mpl >=0.12", - "matplotlib >=3.0", - "mplhep >=0.2.16", - "scipy >=1.4", - "iminuit >=2; python_version<'3.11'", + "hist[mpl,fit,test,dask]", "ipykernel", - "dask[dataframe] >=2022", - "dask_histogram >=2023.1", ] docs = [ - "pytest >=6", - "pytest-mpl >=0.12", - "matplotlib >=3.0", - "mplhep >=0.2.16", - "scipy >=1.4", - "iminuit >=2", + "hist[test,plot,fit,dask]", "ipython_genutils", "graphviz >=0.20.1", - "dask[dataframe] >=2022", - "dask_histogram >=2023.1", "nbsphinx", "sphinx >=3.0.0", "sphinx_copybutton", @@ -115,6 +99,10 @@ docs = [ version.source = "vcs" build.hooks.vcs.version-file = "src/hist/version.py" +[tool.uv] +dev-dependencies = ["hist[dev]", "ipython"] + + [tool.pytest.ini_options] minversion = "6.0" addopts = ["-ra", "--strict-markers", "--strict-config"] @@ -124,7 +112,7 @@ required_plugins = ["pytest-mpl"] log_cli_level = "DEBUG" filterwarnings = [ "error", - "ignore::matplotlib._api.deprecation.MatplotlibDeprecationWarning" + "ignore::matplotlib._api.deprecation.MatplotlibDeprecationWarning", ] [tool.mypy] @@ -173,6 +161,7 @@ messages_control.disable = [ "too-many-locals", "too-many-return-statements", "too-many-statements", + "too-many-positional-arguments", "wrong-import-position", "duplicate-code", "import-outside-toplevel", @@ -184,9 +173,6 @@ messages_control.disable = [ ] -[tool.ruff] -src = ["src"] - [tool.ruff.lint] extend-select = [ "B", # flake8-bugbear