Code review comment for lp:~wgrant/launchpad/archive-debug-archive

Revision history for this message
William Grant (wgrant) wrote :

= Summary =

For my ddebs-in-soyuz work, I need to be able to identify an archive's corresponding debug archive in many places. This is currently only done in lp.soyuz.model.queue.

== Proposed fix ==

Factor the calculation out into a property: IArchive.debug_archive.

== Pre-implementation notes ==

None.

== Implementation details ==

Nothing special.

== Tests ==

Added new tests in lp.soyuz.tests.test_archive.TestCorrespondingDebugArchive, for each possible situation.

bin/test -vvt TestCorrespondingDebugArchive

== Demo and Q/A ==

This is purely a refactor; there is no functional change.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/soyuz/interfaces/archive.py
  lib/lp/soyuz/model/archive.py
  lib/lp/soyuz/model/queue.py
  lib/lp/soyuz/tests/test_archive.py

== Pylint notices ==

lib/lp/soyuz/interfaces/archive.py
    40: [F0401] Unable to import 'lazr.enum' (No module named enum)
    53: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)
    59: [F0401] Unable to import 'lazr.restful.fields' (No module named restful)

lib/lp/soyuz/model/archive.py
    14: [F0401] Unable to import 'lazr.lifecycle.event' (No module named lifecycle)

lib/lp/soyuz/model/queue.py
    547: [C0301] Line too long (93/78)
    562: [C0301] Line too long (80/78)

« Back to merge proposal