reporters.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. class BaseReporter(object):
  2. """Delegate class to provider progress reporting for the resolver.
  3. """
  4. def starting(self):
  5. """Called before the resolution actually starts.
  6. """
  7. def starting_round(self, index):
  8. """Called before each round of resolution starts.
  9. The index is zero-based.
  10. """
  11. def ending_round(self, index, state):
  12. """Called before each round of resolution ends.
  13. This is NOT called if the resolution ends at this round. Use `ending`
  14. if you want to report finalization. The index is zero-based.
  15. """
  16. def ending(self, state):
  17. """Called before the resolution ends successfully.
  18. """
  19. def adding_requirement(self, requirement, parent):
  20. """Called when adding a new requirement into the resolve criteria.
  21. :param requirement: The additional requirement to be applied to filter
  22. the available candidaites.
  23. :param parent: The candidate that requires ``requirement`` as a
  24. dependency, or None if ``requirement`` is one of the root
  25. requirements passed in from ``Resolver.resolve()``.
  26. """
  27. def backtracking(self, candidate):
  28. """Called when rejecting a candidate during backtracking.
  29. """
  30. def pinning(self, candidate):
  31. """Called when adding a candidate to the potential solution.
  32. """