Skip to content

Commit

Permalink
Merge pull request #414 from glotzerlab/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
joaander authored Jan 7, 2025
2 parents cc51109 + c052b33 commit 02ef992
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ repos:
- id: check-case-conflict
- id: mixed-line-ending
- repo: https://github.com/asottile/pyupgrade
rev: 'v3.18.0'
rev: 'v3.19.1'
hooks:
- id: pyupgrade
args:
- --py310-plus
- repo: https://github.com/rhysd/actionlint
rev: v1.7.3
rev: v1.7.6
hooks:
- id: actionlint
- repo: https://github.com/glotzerlab/fix-license-header
Expand All @@ -36,12 +36,12 @@ repos:
- --keep-before=#!
- --keep-after=.. include
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.7.0'
rev: 'v0.8.6'
hooks:
- id: ruff-format
- id: ruff
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.2
rev: v19.1.6
hooks:
- id: clang-format
types_or: [c, c++]
1 change: 0 additions & 1 deletion gsd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ MACRO(copy_file file)
add_custom_command (
OUTPUT ${file}
DEPENDS ${file}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}/${file}
COMMENT "Copy gsd/${file}"
Expand Down
12 changes: 5 additions & 7 deletions gsd/hoomd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1218,18 +1218,16 @@ def read_log(name, scalar_only=False):
)

for idx in range(1, gsdfileobj.nframes):
for key in logged_data_dict.keys():
for key, item in logged_data_dict.items():
if not gsdfileobj.chunk_exists(frame=idx, name=key):
continue
data = gsdfileobj.read_chunk(frame=idx, name=key)
if (
not isinstance(
logged_data_dict[key].dtype, numpy.dtypes.StringDType
)
and len(logged_data_dict[key][idx].shape) == 0
not isinstance(item.dtype, numpy.dtypes.StringDType)
and len(item[idx].shape) == 0
):
logged_data_dict[key][idx] = data[0]
item[idx] = data[0]
else:
logged_data_dict[key][idx] = data
item[idx] = data

return logged_data_dict
1 change: 0 additions & 1 deletion gsd/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ MACRO(copy_file file)
add_custom_command (
OUTPUT ${file}
DEPENDS ${file}
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${file} ${CMAKE_CURRENT_BINARY_DIR}/${file}
COMMENT "Copy gsd/test/${file}"
Expand Down

0 comments on commit 02ef992

Please sign in to comment.