Skip to content

Commit 5e41571

Browse files
awoll-bdaiCopilot
authored andcommitted
Use insert-license pre-commit hook (#81)
### What change is being made Use insert-license pre-commit hook. ### Why this change is being made Ensure copyright headers are added automatically. ### Tested Run pre-commit on all files and detected a missing header. --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> GitOrigin-RevId: 7c7e53576df62a5ad102d9cfa9f9432a0b614081
1 parent fea9bcd commit 5e41571

4 files changed

Lines changed: 16 additions & 20 deletions

File tree

.copyright.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright (c) 2024 Robotics and AI Institute LLC dba RAI Institute. All rights reserved.

.pre-commit-config.yaml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,16 @@ repos:
2929
# fix trailing whitespace in files of all types
3030
- id: trailing-whitespace
3131

32-
- repo: https://github.com/rai-inst/actions-int
33-
rev: v9.7.1
32+
# check (or insert) new license headers on standard file extensions we use
33+
- repo: https://github.com/Lucas-C/pre-commit-hooks
34+
rev: v1.5.5
3435
hooks:
35-
- id: check-copyright
36-
name: check and fix copyright
37-
entry: copyright-checker/copyright-checker.sh
38-
language: script
39-
types: [ text ]
40-
args: [ --fix ]
41-
exclude: >
42-
(?x)^(
43-
\.github/PULL_REQUEST_TEMPLATE.md|
44-
\.github/ISSUE_TEMPLATE/bug_report.md|
45-
\.github/ISSUE_TEMPLATE/feature_request.md|
46-
)$
36+
- id: insert-license
37+
files: (\.cpp|\.cc|\.c|\.hpp|\.h)$
38+
args: [--comment-style, //, --license-filepath, .copyright.txt, --allow-past-years, --use-current-year, --no-extra-eol]
39+
- id: insert-license
40+
files: (\.sh|\.bash|\.py|CMakeLists\.txt|\.cmake|\.cmake\.in|\.yaml|\.yml|\.toml)$
41+
args: [--license-filepath, .copyright.txt, --allow-past-years, --use-current-year, --no-extra-eol]
4742

4843

4944
- repo: https://github.com/igorshubovych/markdownlint-cli

python/exploy/exporter/core/session_wrapper.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ def __init__(
4242
if optimize:
4343
sess_options = ort.SessionOptions()
4444
sess_options.graph_optimization_level = ort.GraphOptimizationLevel.ORT_ENABLE_EXTENDED
45-
# Setting `optimized_model_filepath` tells ONNX to store the optimized graph to a file.
46-
# This additional optimized ONNX file is useful for inspection with Netron (see https://github.com/lutzroeder/netron),
47-
# since the computational graph is optimized and cleaned up.
48-
# The optimization of the computational graph depends on additional features in ONNX and version control of
49-
# the ONNX dependencies, which are not correctly managed in control. For this reason, this file
50-
# is to be used, at the moment, only for debugging.
45+
# Setting `optimized_model_filepath` tells ONNX Runtime to write the optimized graph to a file
46+
# as part of `InferenceSession` creation in this process. The resulting optimized ONNX file is
47+
# primarily useful for inspection/debugging with tools like Netron (see https://github.com/lutzroeder/netron),
48+
# while deployment on the target hardware may still apply its own optimizations when loading the model.
5149
sess_options.optimized_model_filepath = str(session_paths.get_debug_path("optimized"))
5250

5351
self._onnx_file_path = session_paths.main

python/exploy/exporter/frameworks/isaaclab/environments.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) 2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved.
2+
13
import gymnasium as gym
24
from isaaclab.utils import configclass
35
from isaaclab_rl.rsl_rl import RslRlPpoActorCriticRecurrentCfg

0 commit comments

Comments
 (0)