Skip to content
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
10 changes: 6 additions & 4 deletions tools/skill-evals/src/skill_evals/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def find_cases(path: Path) -> list[tuple[Path, Path]]:
return results


def main() -> None:
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(
description="Print eval prompts for skill cases. Paste into any model and compare against expected.json."
)
Expand All @@ -237,12 +237,12 @@ def main() -> None:
action="store_true",
help="Suppress prompt content; print only case names and expected JSON.",
)
args = parser.parse_args()
args = parser.parse_args(argv)

cases = find_cases(args.path)
if not cases:
print(f"No eval cases found under {args.path}", file=sys.stderr)
sys.exit(1)
return 1

# Cache loaded step configs so we don't re-read prompts for every case in
# the same fixtures dir (common when running a whole skill at once).
Expand Down Expand Up @@ -279,6 +279,8 @@ def main() -> None:
print(json.dumps(expected, indent=2))
print()

return 0


if __name__ == "__main__":
main()
sys.exit(main())
16 changes: 16 additions & 0 deletions tools/skill-evals/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
Loading
Loading