Add model for package consumption
- Jun 18, 2022
-
-
David Runge authored
docs/packages/contents.rst: Add documentation about Package and include PackageV1 JSON schema.
-
David Runge authored
tox.ini: Export JSON schema for PackageV1 in docs target.
-
David Runge authored
repod/files/buildinfo.py: Remove `read_buildinfo()` as it is superseded by `repod.files.common.read_file_from_tarfile`. repod/files/mtree.py: Remove `read_mtree()` as it is superseded by `repod.files.common.read_file_from_tarfile`. repod/files/pkginfo.py: Remove `read_pkginfo()` as it is superseded by `repod.files.common.read_file_from_tarfile`. tests/files/test_{buildinfo,mtree,pkginfo}.py: Remove tests for removed functions. Adapt integration tests to make use of `repod.files.common.read_file_from_tarfile`.
-
David Runge authored
repod/files/package.py: Add integration for reading and representing package data in a versioned `Package` model. tests/files/test_package.py: Add tests for `Package.from_file()`. repod/files/__init__.py: Expose repod.files.package.Package.
-
David Runge authored
repod/files/common.py: Extend `extract_file_from_tarfile()` to optionally return the extracted file contents in a StringIO and to deal with extracting from gzip compressed files in the tarfile. Add `names_in_tarfile()` to check whether all strings in a list or set are found in the list of filenames in a tarfile. tests/files/test_common.py: Parametrize the test for `extract_file_from_tarfile()`. Add parametrized tests for `names_in_tarfile()`.
-
David Runge authored
tests/conftest.py: Ensure to not add empty lines to StringIO representations of .PKGINFO files.
-
David Runge authored
repod/files/pkginfo.py: Try/except ValueError when evaluating .PKGINFO lines in `PkgInfo.from_file()` and raise a RepoManagementFileError instead. Add debug message about which line is being processed. tests/files/test_pkginfo.py: Raise on more invalid lines when testing `PkgInfo.from_file()` and also show debug log output.
-
David Runge authored
tests/conftest.py: Add fixture for a default package file, containing .BUILDINFO, .MTREE and .PKGINFO file.
-