This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This directory contains Alan's personal Python utilities that integrate with his extended bash environment. The project serves as a foundational layer of Python tools that support interactive shell functions, file management, development workflows, and personal productivity scripts. This is part of the larger bashrcs/jab project - an expanded .bashrc system.
- Bash Integration: Python scripts are designed to be called from bash functions, not run standalone
- Pysyte Dependency: All utilities depend on the
pysytelibrary (Alan's foundational Python library) for path handling, text processing, and common utilities - Script Registry: Central command discovery via
site/script_path.pymaps shortcuts to scripts across the workspace - Interactive Shell Support: Tools like
vim.py,rf.py, and productivity utilities extend shell capabilities
rf.py: Temporary file removal with configurable glob patterns (development, python, temporary, etc.)files.py: File system utilities and path manipulationvim.py/vim_script.py: Enhanced vim integration with argument parsing and session managementscripts.py: Script discovery and listing utilities with integration toscript_path.py
ptags.py: Python tag generation and code navigation supporttraceback_to_pudb.py: Enhanced Python debugging integrationupdate_hosts.py: Network configuration management
site/todo.py: Priority-based todo list system with colored output (0=bug/red, 1=yesterday/magenta, 2=today/blue, etc.)site/locate.py: Enhanced wrapper around Unixlocatewith glob patterns and filteringsite/work.py: Workspace and server name utilities
first_num.py: Number extraction from command line argumentsadd_to_a_path.py: PATH manipulation utilitiesrounding.py: Number formatting and rounding functions
# Run all doctest-style tests (primary testing method)
nosetests --with-doctest --doctest-extension=test
# Run tests from specific subdirectories
nosetests --with-doctest --doctest-extension=test test/
nosetests --with-doctest --doctest-extension=test site/
# Run individual test files
python -m doctest test/vim.test
python -m doctest site/todo.test
# Run pytest-style tests (if pytest available)
python test/test_rf_extras.py
# Run shell-based tests
bash test/test_first_num.sh# Install in development mode
pip install -e .
# Install dependencies
pip install -r requirements.txt# Check with flake8 (configuration in setup.cfg)
flake8
# Note: Specific linting commands not defined; this is a personal utility collectionThe project uses a hybrid testing approach:
-
Doctest-style (.test files): Primary testing method with narrative documentation
- Configuration in
setup.cfgwith nosetests - Files like
pythonrc.test,vim.test,add_to_a_path.test - Run with:
nosetests --with-doctest --doctest-extension=test
- Configuration in
-
Pytest files: Standard pytest files like
test_rf_extras.py -
Shell tests: Bash scripts like
test_first_num.shfor command-line utilities
- setup.py: Package configuration with pysyte dependency and pytest support
- setup.cfg: nosetests configuration, flake8 settings, version management
- requirements.txt: Dependencies including ipython, pudb, pprintpp, pysyte>=0.7.40
- This directory is part of the larger
/opt/clones/github/jalanb/bashrcs/jab/project - Many utilities are called from bash functions defined in
../bash/directories - Script discovery is centralized through
site/script_path.pyfor cross-project navigation - Python 3.7+ required (as per setup.py classifiers)
- Designed for macOS/Darwin environment (personal development machine)
.testfiles: Doctest-style tests with narrative documentationfred.*files: Temporary placeholder files that can be ignoredsite/οs.py: Uses Greek omicron (ο) to avoid conflict with Python'sosmodule