Merge ppa-dev-tools:add_suite_module into ppa-dev-tools:main
Status: | Merged |
---|---|
Merge reported by: | Bryce Harrington |
Merged at revision: | e0d63243e9c09aaceaa519755361a4fe7b91aca8 |
Proposed branch: | ppa-dev-tools:add_suite_module |
Merge into: | ppa-dev-tools:main |
Diff against target: |
719 lines (+586/-48) 5 files modified
.pylintrc (+16/-0) ppa/repository.py (+9/-34) ppa/suite.py (+219/-0) tests/test_repository.py (+11/-14) tests/test_suite.py (+331/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Athos Ribeiro (community) | Needs Information | ||
Sergio Durigan Junior | Pending | ||
Canonical Server packageset reviewers | Pending | ||
Canonical Server Reporter | Pending | ||
Review via email: mp+439032@code.staging.launchpad.net |
Description of the change
Splits out and fleshes out the Suite class from the Repository class. This will house the major logic for the rdepends testing functionality, but this initial branch just gets the basic structure in place for accessing the packages within an archive.
A Suite is defined as a particular pocket of a release, so that's like lunar-proposed or focal-backports. Internally it is further divided by component, IOW main, restricted, universe, multiverse. The Suite class encapsulates the logic for dealing with all these divisions.
As usual, the unit tests for Repository and Suite can be run via:
$ pytest-3 tests/test_
For static testing, I've been using the check-scripts tool from ubuntu-helpers:
$ check-scripts ./tests/
Last, there's also a smoketest for the Suite class, which can be used if you have a local mirror of the Apt repository (I made mine using the `apt-mirror` utility). Here's what the output looks like on my system:
$ python3 -m ppa.suite
lunar-proposed
series: lunar
pocket: proposed
components: main
architectures: amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
sources: (203 items)
0 adsys
1 apt
2 at-spi2-core
[...]
200 xorg-server
201 xz-utils
202 zip
binaries: (931 items)
0 adsys:amd64
1 apt:amd64
2 apt-doc:amd64
[...]
928 xz-utils:amd64
929 zip:amd64
930 zstd:amd64
lunar
series: lunar
pocket: release
components: main
architectures: amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
sources: (2369 items)
0 aalib
1 abseil
2 accountsservice
[...]
2366 zsh
2367 zsys
2368 zvmcloudconnector
binaries: (6045 items)
0 accountsservice
1 acct:amd64
2 acl:amd64
[...]
6042 zstd:amd64
6043 zsys:amd64
6044 zvmcloudconnect
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
Thanks, Bryce!
Overall, LGTM. I have a few comments inline below.
nitpick: The new Suit class is being imported in a commit created before the class was introduced.