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

chore: update pre-commit hooks #36

Merged
merged 2 commits into from
Apr 15, 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
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ repos:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: "v3.15.0"
rev: "v3.15.2"
hooks:
- id: pyupgrade
args: ["--py38-plus"]

- repo: https://github.com/psf/black
rev: "23.12.1"
rev: "24.3.0"
hooks:
- id: black-jupyter

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
rev: "v1.9.0"
hooks:
- id: mypy
files: src
Expand All @@ -59,7 +59,7 @@ repos:
args: ["--all"]

- repo: https://github.com/PyCQA/flake8
rev: "6.1.0"
rev: "7.0.0"
hooks:
- id: flake8
additional_dependencies: [
Expand All @@ -69,7 +69,7 @@ repos:
]

- repo: https://github.com/kynan/nbstripout
rev: "0.6.1"
rev: "0.7.1"
hooks:
- id: nbstripout
args: ["--drop-empty-cells",
Expand All @@ -88,7 +88,7 @@ repos:
args: ["-L", "nd,unparseable,compiletime"]

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.9.0.6"
rev: "v0.10.0.1"
hooks:
- id: shellcheck

Expand Down
1 change: 1 addition & 0 deletions src/daq2lh5/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""legend-daq2lh5's command line interface utilities."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/daq2lh5/data_decoder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Base classes for decoding data into raw LGDO Tables or files
"""

from __future__ import annotations

import lgdo
Expand Down
1 change: 1 addition & 0 deletions src/daq2lh5/data_streamer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Base classes for streaming data.
"""

from __future__ import annotations

import fnmatch
Expand Down
1 change: 1 addition & 0 deletions src/daq2lh5/logging.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module implements some helpers for setting up logging."""

import logging

import colorlog
Expand Down
24 changes: 12 additions & 12 deletions src/daq2lh5/orca/orca_flashcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,28 +421,28 @@ def decode_packet(
(fd0 + i_card) * 5 + j
] = packet[i_cd + 14 + j]
for j in range(5):
tbl["card_temps"].flattened_data.nda[
(fd0 + i_card) * 5 + j
] = int_packet[i_cd + 19 + j]
tbl["card_temps"].flattened_data.nda[(fd0 + i_card) * 5 + j] = (
int_packet[i_cd + 19 + j]
)
for j in range(6):
tbl["card_voltages"].flattened_data.nda[
(fd0 + i_card) * 6 + j
] = int_packet[i_cd + 24 + j]
tbl["card_voltages"].flattened_data.nda[(fd0 + i_card) * 6 + j] = (
int_packet[i_cd + 24 + j]
)
tbl["card_main_current"].flattened_data.nda[fd0 + i_card] = int_packet[
i_cd + 30
]
tbl["card_humidity"].flattened_data.nda[fd0 + i_card] = int_packet[
i_cd + 31
]
for j in range(2):
tbl["card_adc_temps"].flattened_data.nda[
(fd0 + i_card) * 2 + j
] = int_packet[i_cd + 32 + j]
tbl["card_adc_temps"].flattened_data.nda[(fd0 + i_card) * 2 + j] = (
int_packet[i_cd + 32 + j]
)
# packet[34] is empty / dummy
for j in range(4):
tbl["card_cti_links"].flattened_data.nda[
(fd0 + i_card) * 4 + j
] = packet[i_cd + 35 + j]
tbl["card_cti_links"].flattened_data.nda[(fd0 + i_card) * 4 + j] = (
packet[i_cd + 35 + j]
)
for j in range(256):
value = packet[i_cd + 39 + j] if j < n_link_states else 0
tbl["card_link_states"].flattened_data.nda[
Expand Down
1 change: 1 addition & 0 deletions src/daq2lh5/orca/orca_packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
An ORCA packet is represented by a one-dimensional :class:`numpy.ndarray` of
type :class:`numpy.uint32`.
"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions src/daq2lh5/raw_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
}
}
"""

from __future__ import annotations

import os
Expand Down
Loading