Codemods and Other Upgrade Automation
Much of the work of major software upgrades can now be automated via “codemods” - software that modifies other software’s source code (source code modification). Here is a collection of such codemods that either have saved us time in previous upgrades or seem likely to do so in future ones. For more context on many of these, see Herding Ponies: Coordinating and Automating Django Upgrades Across 100+ Repositories .
Applying Codemods Across Multiple Repositories
Continuous Integration
https://github.com/edx/repo-tools/tree/master/edx_repo_tools/codemods/django3 - Examples for auto-updating GitHub Actions workflows, tox.ini, and .travis.yml
Django
https://github.com/edx/repo-tools/tree/master/edx_repo_tools/codemods
New options may appear in Django Packages : Auto-Upgrade
Python
Codemod Frameworks - Python
Fixit 2: Meta’s next-generation auto-fixing linter (built on LibCST)
https://github.com/facebookincubator/Bowler - deprecated/inactive
https://github.com/google/pasta - inactive
https://github.com/PyCQA/redbaron - inactive
Deprecation Warnings Classification - Python
https://github.com/edx/edx-platform/blob/master/openedx/core/process_warnings.py
https://github.com/edx/pytest-warnings-report (incomplete refactoring of the edx-platform code above to make it usable in other repos)