Recently we have made 2 improvements in ERPNext contribution process to streamline contributions and reduce manual work.
Automated backports
~1 month ago we started automating backports of small PRs (that can be squashed). This is done using github action: GitHub - frappe/backport: backport automation @ frappe
What this means for you(the contributor)?: less time spent on manual cherry-picking work.
Standardized linter/style checks
We have added pre-commit
configuration to ensure that all commits pass a bare minimum correctness and style requirement. Currently this includes just two things:
- Flake8 correctness checks (all fluff non-critical issues are ignored)
- whitespace trimming (style)
- sorted imports using
isort
(style)
You need to do one time setup of pre-commit hooks so all your future commits will be automatically checked using current config.
$ (virtualenv) pip install pre-commit
$ (virtualenv) pre-commit install
There could be more in future like…
- auto-formatter - GitHub - frappe/black: Python black with tabs (depends on this change on github )
- semantic commit title check.
What this means for you(the contributor)?: quick feedback on trivial issues.
Just to clarify: This is NOT mandatory. You can also just set up your code editor to strip whitespace, lint code using flake8 and run isort
before sending a patch…
Updated contribution guideline page: Pull Request Checklist · frappe/erpnext Wiki · GitHub