Skip to main content

T-MINUS

Count down to a clean Frappe/ERPNext upgrade.

T-MINUS is a read-only command line scanner that finds what will break (or silently change) when you upgrade a Frappe/ERPNext app from v15 to v16, before you migrate.

It reads your app's source, never your site, and never changes anything.

Install

git clone <this repository> && cd tminus
python3 -m venv .venv && . .venv/bin/activate
pip install -e .

Python 3.12 or newer is needed to run the tool (it analyses code, it does not run it).

Use

tminus scan path/to/your_app --target v16       # scan an app (or a whole bench apps/ folder)
tminus scan path/to/your_app --target v16 --format pdf
tminus scan path/to/your_app --target v16 --format sarif
tminus env path/to/bench --target v16           # compare Python, Node, MariaDB, Redis with v16's needs

Options of scan:

Option Meaning
--format text / html / pdf / json / sarif Terminal, browser, PDF, JSON, or code-scanning report
--output FILE Choose where to save a report instead of its default Downloads-folder location
--no-open Save an HTML or PDF report without opening it (useful in scripts and CI)
--color auto / always / never Use color in terminal output; auto is the default and disables it for saved output
--fail-on error / warning / info / never Lowest severity that gives exit code 1 (default error)
--write-baseline FILE Save today's findings and exit 0
--baseline FILE Hide findings already in the baseline; only new ones count

Exit codes: 0 clean, 1 findings at or above --fail-on, 2 usage error, 3 scan could not run.

The text report starts with a plain-language checklist, then groups complete evidence by the upgrade rule that found it. It retains the rule ID, every file/line, source snippet and rule-provided suggested action. Terminal colors make errors, warnings and behavior reviews easier to distinguish; saved output stays plain text by default.

The HTML report is self-contained and has collapsible location lists. The PDF report is a shareable, paginated version of the same grouped findings. HTML and PDF reports save by default in your Downloads folder as <app>-tminus-<target>-report.<format>; the machine-readable SARIF report saves there too. HTML and PDF reports open automatically after saving; use --no-open in scripts or CI. Use --output FILE to choose another location.

SARIF (.sarif) is for GitHub code scanning, VS Code and CI tools: it preserves each rule ID, severity, file/line location, suggested action and technical context as clickable findings.

Silence one finding with a comment on its line: # tminus: ignore[rule-id] (Python, Jinja {# ... #}, pyproject.toml) or // tminus: ignore[rule-id] (JavaScript).

What it checks (stage T-30)

Area Examples
Python removed stdlib modules (Python 3.14), removed or changed ERPNext/HRMS functions, get_all with SQL strings, frappe.db.commit() in doc_events, get_doc(..., field=value), has_permission hooks that can return None, override_doctype_class that does not subclass
Fields and DocTypes fields removed or moved (for example acc_frozen_upto, gross_purchase_amount), removed DocTypes, in Python, SQL text, query-builder variables, hook parameters
Client code frm.doc.field, frm.set_value(...), frappe.db.get_value(...) and similar in JavaScript; {{ doc.field }} in print formats
Hooks hooks v16 no longer reads (leaderboards, advance_payment_doctypes, ...)
Packaging requires-python, frappe-dependencies bound, dependency pins that conflict with Frappe v16, Node range

Every rule is a YAML file in src/tminus/rules/v16/ with the evidence it was built from. The rules were checked against the real frappe, erpnext and hrms version-15 and version-16 source, and they do not fire on v16's own application code.

Findings are classified as data, loud (fails during migrate), quiet (fails when the code runs) or silent (runs but behaves differently).

What it does not check (yet)

A clean report means "no known problems", not "safe to upgrade".

  • Your site's data (invalid JSON, custom field clashes, rows of removed DocTypes) and code stored in the database (Client Scripts, Server Scripts, Print Formats saved on the site)
  • bench migrate itself (log analysis) and rehearsal timing
  • Differences in behaviour between a v15 and a v16 site (permissions, report numbers)
  • JavaScript in shared controller classes, child-table rows in print formats

See docs/roadmap.md for what comes next.

Development

pip install -e ".[dev]"
ruff check . && ruff format --check . && mypy && pytest

To add a rule, see docs/rule-schema.md: a rule is one YAML file, and tests/test_rule_coverage.py fails until it has a violating and a clean example.

See docs/releasing.md for the wheel, GitHub Release and PyPI release process.

License

MIT

Metadata

Release files for tminus 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tminus 1.0.1
File Size Uploaded Provenance Actions
tminus-1.0.1.tar.gz 108.7 kB Without provenance Details for tminus-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tminus 1.0.1
File Interpreter ABI Platform Actions
tminus-1.0.1-py3-none-any.whl Python 3 none any Details for tminus-1.0.1-py3-none-any.whl

Total release size: 196.7 kB

Release files / tminus-1.0.1.tar.gz

Download URL tminus-1.0.1.tar.gz
Size 108.7 kB
Tags Source
SHA-256 checksum
How to use checksums
70664f8894a750c2a834d823134707a5e742c8839be6da4b7b236eb75de41c48
BLAKE2b-256 checksum
How to use checksums
81f57f4d191d93202001de478acc81c0bd829aa875524f1b0254be17b4742ace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tminus-1.0.1-py3-none-any.whl

Download URL tminus-1.0.1-py3-none-any.whl
Size 88.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cc6f5be3a7f784e801b8762e2afacd3b91bf722d5cbe54152ade42e7a1bd632
BLAKE2b-256 checksum
How to use checksums
151487b879c9042eeda0bb5ad662e435deb66874e00d975c825244051b066f32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for tminus 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page