This file provides guidance to agents when working with code in this repository.
- KISS (Keep It Simple, Stupid): Aim for simplicity and clarity. Avoid unnecessary abstractions or metaprogramming.
- DRY (Don't Repeat Yourself): Reuse code appropriately but avoid over-engineering. Each command handler has single responsibility.
- YAGNI (You Aren't Gonna Need It): Always implement things when you actually need them, never when you just foresee that you need them.
- ALWAYS use
ruff check <filepath>on each Python file you modify to ensure proper linting and formatting:- Use
ruff check --fix <filepath>to automatically fix any fixable errors. - Use
ruff format path/to/file.pyto format a specific file. - Use
ruff format path/to/code/to format all files inpath/to/code(and any subdirectories). - Use
ruff formatto format all files in the current directory.
- Use
Critical: Run tests after any change to ensure nothing breaks.
# Run all tests:
uv run pytest
# Run specific test file:
uv run pytest tests/test_config.py
# Run specific test function:
uv run pytest tests/test_config.py::test_function_name
# Run with coverage
uv run pytest tests/python/ --cov=aps.<folder>.<module>
uv run pytest tests/cli/test_parser.py --cov=my_unicorn.cli.parser- Use built-in types:
list[str],dict[str, int] - Use
%sstyle formatting in logging statements - Use
logger.exception("message")in exception handlers to log stack traces
AutoTarCompress is a Python 3.12+ CLI tool for automating the process of backup and compression. It's backup the dirs that user written to config file while ignoring the dirs that user don't need - node_modules, pycache - or custom dirs that user want to ignore.