From c2241af53b2e33e02d9f9d8d5f774b2dc9b6b079 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 20:18:36 -0500 Subject: [PATCH] autoupdate pre-commit hooks (#38) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * autoupdate pre-commit hooks updates: - [github.com/adamchainz/blacken-docs: 1.16.0 → 1.18.0](https://github.com/adamchainz/blacken-docs/compare/1.16.0...1.18.0) - [github.com/pre-commit/mirrors-mypy: v1.10.0 → v1.10.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.10.0...v1.10.1) - [github.com/pycqa/pylint: v3.2.2 → v3.2.4](https://github.com/pycqa/pylint/compare/v3.2.2...v3.2.4) - [github.com/astral-sh/ruff-pre-commit: v0.4.6 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.6...v0.5.0) * exclude numpy 2.0 from ci * fix dumb error from pylint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kevin Meagher <11620178+kjmeagher@users.noreply.github.com> --- .github/workflows/tests.yml | 5 ++++- .pre-commit-config.yaml | 8 ++++---- src/simweights/_utils.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 28da8bf..4c7c4de 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,8 +32,11 @@ jobs: cache-dependency-path: pyproject.toml - name: Install SimWeights run: | - python3 -m pip install flit + python3 -m pip install flit 'numpy<2' python3 -m flit install --symlink --deps=production --extras=test + if [ "$RUNNER_OS" == "Linux" ]; then + python3 -m pip install nuflux + fi - name: Download Test Data run: curl -u icecube:${{secrets.ICECUBE_PASSWORD}} https://convey.icecube.wisc.edu/data/user/kmeagher/simweights_testdata.tar.gz | tar xz - name: Run Tests diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4548f8a..0758ef5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,26 +25,26 @@ repos: hooks: - id: codespell - repo: https://github.com/adamchainz/blacken-docs - rev: "1.16.0" + rev: "1.18.0" hooks: - id: blacken-docs args: [-l 100] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.0 + rev: v1.10.1 hooks: - id: mypy files: simweights additional_dependencies: [numpy] exclude: ^contrib/ - repo: https://github.com/pycqa/pylint - rev: v3.2.2 + rev: v3.2.4 hooks: - id: pylint files: simweights exclude: ^contrib/ additional_dependencies: [numpy, pandas] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.6 + rev: v0.5.0 hooks: - id: ruff args: [--fix, --show-fixes] diff --git a/src/simweights/_utils.py b/src/simweights/_utils.py index c63cbe4..b3ca7fe 100644 --- a/src/simweights/_utils.py +++ b/src/simweights/_utils.py @@ -7,7 +7,7 @@ from typing import TYPE_CHECKING, Any, Union import numpy as np -from numpy.random import Generator, RandomState +from numpy.random import Generator, RandomState # pylint: disable=no-name-in-module from ._pdgcode import PDGCode