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 https://2021.djangocon.us/talks/herding-ponies-coordinating-and-django/ .
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 https://djangopackages.org/grids/g/auto-upgrade/
Python
Codemod Frameworks - Python
https://engineering.fb.com/2023/08/07/developer-tools/fixit-2-linter-meta/ (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)