commit 7bea08ddac2ddd78dfd9e9305329c39b11d27897 Author: Jef Roosens Date: Fri May 22 10:09:59 2026 +0200 feat: set up modularized version of project with testing diff --git a/.coverage b/.coverage new file mode 100644 index 0000000..addd3c5 Binary files /dev/null and b/.coverage differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..505a3b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Python-generated files +__pycache__/ +*.py[oc] +build/ +dist/ +wheels/ +*.egg-info + +# Virtual environments +.venv diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..24ee5b1 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13 diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..eb8b696 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,112 @@ +# Timesheets — Agent Guide + +## Project overview + +A Python CLI tool that parses markdown pipe-delimited timesheet tables and +exports them to CSV for import into Odoo (or similar tools). It also supports +a human-readable summary view. + +### Package layout + +``` +timesheets/ +├── pyproject.toml # package metadata, entry point, dev dependencies +├── AGENTS.md +└── src/timesheets/ + ├── cli.py # argument parsing, main() entry point + ├── parser.py # markdown table parsing and row aggregation + ├── projects.py # project_map.json loading and key resolution + ├── output.py # CSV writing and summary printing + └── utils.py # shared low-level helpers (duration parsing, formatting, etc.) +``` + +Tests live in `tests/`, one file per source module: + +``` +tests/ +├── test_utils.py +├── test_parser.py +├── test_projects.py +└── test_output.py +``` + +--- + +## Package manager — uv + +All dependency management and script execution is done via [`uv`](https://docs.astral.sh/uv/). +Do **not** use `pip` or `python` directly. + +| Task | Command | +|---|---| +| Install / sync dependencies | `uv sync` | +| Add a runtime dependency | `uv add ` | +| Add a dev-only dependency | `uv add --dev ` | +| Run the CLI | `uv run timesheets ` | +| Run any Python script | `uv run python