Skip to content

Commit

Permalink
Merge pull request #36 from legend-exp/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
chore: update pre-commit hooks
  • Loading branch information
gipert authored Apr 15, 2024
2 parents af891dc + 77ad264 commit a5f67cb
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 18 deletions.
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

0 comments on commit a5f67cb

Please sign in to comment.