Merge ppa-dev-tools:add_binary_package_module into ppa-dev-tools:main

Proposed by Bryce Harrington
Status: Merged
Merge reported by: Bryce Harrington
Merged at revision: 2a5048d99b5e35c4e69356bcabc99a263488acf1
Proposed branch: ppa-dev-tools:add_binary_package_module
Merge into: ppa-dev-tools:main
Diff against target: 3464 lines (+3432/-0)
4 files modified
ppa/binary_package.py (+200/-0)
tests/data/binary-amd64/Packages (+3116/-0)
tests/data/binary-amd64/Release (+6/-0)
tests/test_binary_package.py (+110/-0)
Reviewer Review Type Date Requested Status
Athos Ribeiro (community) Approve
Canonical Server Pending
Canonical Server Core Reviewers Pending
Canonical Server Reporter Pending
Review via email: mp+439769@code.staging.launchpad.net

Description of the change

This adds the BinaryPackage class, allowing access to the per-package Apt data about installable packages.

The installation_dependencies() and recommended_packages() are probably not actually going to be used for anything, but are included for completeness. However these routines are basically the same implementations we'll need in SourcePackage for its depends which we *do* need. So review feedback on these will pay off in the next MP. :-)

As usual, the unit tests can be run via:

    $ pytest-3 ./tests/test_binary_package.py

With static tests run via:

    $ check-scripts ./tests/test_binary_package.py ./ppa/binary_package.py

And there is also a smoketest, using some sample data added to tests/data/:

    $ python3 -m ppa.binary_package

To post a comment you must log in.
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks Bryce, LGTM. The test data is a bit large compared to the changed here, but still looks great!

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Noted on the size; I did trim it down from the original with that in mind, but maybe not enough. I'll be adding more sample data in the next few MPs so may condense further. I do want to include some real-world data to catch edge cases but I know there's a balance to strike.

Thanks again for the reviews!

Revision history for this message
Bryce Harrington (bryce) wrote :

Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To git+ssh://git.launchpad.net/ppa-dev-tools
   03aadb2..2a5048d main -> main

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: