Loading...
Loading...
GitHub workflow for ToolUniverse - push code safely by moving temp files, activating pre-commit hooks, running tests, and cleaning staged files. Use when pushing to GitHub, fixing CI failures, or cleaning up before commits.
npx skill4agent add mims-harvard/tooluniverse devtu-github# Move session markdown files to temp_docs_and_tests/
for f in $(ls *.md 2>/dev/null | grep -v README.md | grep -v CHANGELOG.md | grep -v LICENSE.md); do
mv "$f" temp_docs_and_tests/
done
# Move root-level test scripts to temp_docs_and_tests/
for f in $(ls test_*.py 2>/dev/null); do
mv "$f" temp_docs_and_tests/
donegit status --short*_SUMMARY.md*_REPORT.mdSESSION_*.mdtest_*.py.envtemp_docs_and_tests/pre-commit installgit commitruff check --fixruff formatls -la .git/hooks/pre-commitpython -m pytest tests/ -x --tb=short -qgit add .git add -Agit add src/tooluniverse/specific_file.py tests/specific_test.pygit commit -m "Clear, descriptive message"git push origin <branch-name>temp_docs_and_tests/| Pattern | Example |
|---|---|
| |
| |
| |
| |
| |
| |
| |
README.mdCHANGELOG.mdLICENSE.mdtest_*.pytests/temp_docs_and_tests/| File | Purpose |
|---|---|
| One-off tool cleanup test |
| Ad-hoc tool validation |
| Ad-hoc tool validation |
| Bug reproduction |
| Ad-hoc tool validation |
| Skill test |
| Bug reproduction |
| Ad-hoc tool validation |
.envtemp_docs_and_tests/.claude/__pycache__/*.pyc.DS_StoreKeyError: 'role'return_message=Truetu.run().get()messages = tu.run(calls, use_cache=True, return_message=True)
if msg.get("role") == "tool":TypeError: 'Mock' object is not subscriptableall_tool_dict_get_tool_instancemock_tu.all_tool_dict = {"Tool": mock_tool}
mock_tu._get_tool_instance = lambda name, cache=True: mock_tu.all_tool_dict.get(name)__ = func()defgit statusgit rm -r --cached temp_docs_and_tests/
git rm --cached API_DISCOVERY_SESSION_SUMMARY.md
git commit -m "Remove temp files from tracking".pre-commit-config.yamlrepos:
- repo: https://github.com/pre-commit/pre-commit-hooks
hooks: [end-of-file-fixer, trailing-whitespace, check-yaml, check-toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
hooks: [ruff-check --fix, ruff-format]^(ToolUniverse/)?src/tooluniverse/| Task | Command |
|---|---|
| Activate hooks | |
| Run all tests | |
| Run specific test | |
| Check staged files | |
| Unstage a file | |
| Remove from tracking | |
| Move temp files | See Phase 1 commands |
| Run hooks manually | |
temp_docs_and_tests/test_*.pytemp_docs_and_tests/pre-commit installpytest tests/ -x.envgit add <specific-files>git add .