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.
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)
= 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. TestCorrespondi ngDebugArchive, for each possible situation.
bin/test -vvt TestCorrespondi ngDebugArchive
== 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: soyuz/interface s/archive. py soyuz/model/ archive. py soyuz/model/ queue.py soyuz/tests/ test_archive. py
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ soyuz/interface s/archive. py declarations' (No module named restful) fields' (No module named restful)
40: [F0401] Unable to import 'lazr.enum' (No module named enum)
53: [F0401] Unable to import 'lazr.restful.
59: [F0401] Unable to import 'lazr.restful.
lib/lp/ soyuz/model/ archive. py .event' (No module named lifecycle)
14: [F0401] Unable to import 'lazr.lifecycle
lib/lp/ soyuz/model/ queue.py
547: [C0301] Line too long (93/78)
562: [C0301] Line too long (80/78)