Skip to content
Snippets Groups Projects

Add model for package consumption

Merged David Runge requested to merge package_parser into master
  1. Jun 18, 2022
    • David Runge's avatar
      Add documentation about Package · fc714bee
      David Runge authored
      docs/packages/contents.rst:
      Add documentation about Package and include PackageV1 JSON schema.
      Verified
      fc714bee
    • David Runge's avatar
      Export JSON schema for PackageV1 in docs target · 0495b27c
      David Runge authored
      tox.ini:
      Export JSON schema for PackageV1 in docs target.
      Verified
      0495b27c
    • David Runge's avatar
      Remove redundant file read functions · a0b786a0
      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`.
      Verified
      a0b786a0
    • David Runge's avatar
      Add package model for reading · 3bf0a029
      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.
      Verified
      3bf0a029
    • David Runge's avatar
      Add features to function for reading file from tarfile · b1a0441c
      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()`.
      Verified
      b1a0441c
    • David Runge's avatar
      Ensure that default pkginfo fixtures are valid · 3fb6b144
      David Runge authored
      tests/conftest.py:
      Ensure to not add empty lines to StringIO representations of .PKGINFO
      files.
      Verified
      3fb6b144
    • David Runge's avatar
      Raise project specific error on invalid .PKGINFO line · a2774346
      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.
      Verified
      a2774346
    • David Runge's avatar
      Add fixture for default package · a82141b3
      David Runge authored
      tests/conftest.py:
      Add fixture for a default package file, containing .BUILDINFO, .MTREE
      and .PKGINFO file.
      Verified
      a82141b3
Loading