Skip to content

refactor: prepare-audit writes $db.json to the current directory#5

Merged
nilshamerlinck merged 1 commit into
mainfrom
feat/audit-default-cwd
May 15, 2026
Merged

refactor: prepare-audit writes $db.json to the current directory#5
nilshamerlinck merged 1 commit into
mainfrom
feat/audit-default-cwd

Conversation

@xaviedoanhduy
Copy link
Copy Markdown
Member

Summary

Addresses review feedback on #4 (thread):

  • "wait why do we need this folder?" — we don't. The tracked audits/.gitkeep was meaningless outside this repo.
  • "end users of this tool will not be running it in the source code folder" — correct, so a hardcoded audits/ subfolder polluted whatever cwd the user ran odoo-db from.

Changes

  • Default output of prepare-audit is now <db>.json in the current working directory (still overridable via --output-file).
  • Removed audits/.gitkeep and the audits/*.json gitignore rule.
  • Added /*.json to .gitignore so local audit dumps stay untracked when running from the source tree during development.
  • Docstring, README, and AGENTS.md updated to match.

Test plan

  • make check (lint + format + type-check)
  • make test (4 passed)
  • Live run from /tmp: odoo-db prepare-audit mydb wrote /tmp/mydb.json (not /tmp/audits/mydb.json).

End users `uv tool install` `odoo-db` and invoke it from anywhere on
their machine — not from the source tree. The previous hardcoded
`audits/` directory polluted whatever working directory the user ran
the tool from, and the tracked `audits/.gitkeep` had no purpose
outside this repo.

- Default output is now `<db>.json` in the current working directory
  (still overridable via `--output-file`).
- Removed `audits/.gitkeep` and the `audits/*.json` ignore rule.
- `.gitignore` now ignores `/*.json` at the repo root so local audit
  dumps stay untracked when running prepare-audit from the source
  tree during development.
- Docstring, README, and AGENTS.md updated to match.

Addresses review feedback on #4.
@nilshamerlinck nilshamerlinck merged commit 4715d9a into main May 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants