Allow get_app_pending_mutations to take precomputed values.

Review Request #11249 — Created Oct. 26, 2020 and submitted — Latest diff uploaded

Information

Django Evolution
master

Reviewers

get_app_pending_mutations() is responsible for looking up the
evolutions, stored signature, and current signature for an app, and then
filtering a list of mutations based on the differences between those
signatures. This requires lookups to be performed, which can be slow and
may not reflect the state we want used for the computations.

This change allows the project signatures and the list of mutations to
be provided by the caller instead of automatically looking them up.

It also adds unit tests for this function, since those didn't exist
before.

Unit tests pass for all versions of Python and Django.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Allow get_app_pending_mutations to take precomputed values.
`get_app_pending_mutations()` is responsible for looking up the evolutions, stored signature, and current signature for an app, and then filtering a list of mutations based on the differences between those signatures. This requires lookups to be performed, which can be slow and may not reflect the state we want used for the computations. This change allows the project signatures and the list of mutations to be provided by the caller instead of automatically looking them up. It also adds unit tests for this function, since those didn't exist before.
4a72e41c5a462f61637e0460132f8843a6c1d995 Christian Hammond
Allow get_app_pending_mutations to take precomputed values.
`get_app_pending_mutations()` is responsible for looking up the evolutions, stored signature, and current signature for an app, and then filtering a list of mutations based on the differences between those signatures. This requires lookups to be performed, which can be slow and may not reflect the state we want used for the computations. This change allows the project signatures and the list of mutations to be provided by the caller instead of automatically looking them up. It also adds unit tests for this function, since those didn't exist before.
59a029353236547f1814983b1fbf20310ad7d3eb Christian Hammond
django_evolution/utils/evolutions.py
Loading...