Skip to content
Snippets Groups Projects

Split models into packages based on repo related functionalities

Merged David Runge requested to merge repo_package into main
  1. Jun 19, 2022
    • David Runge's avatar
      Split repository models by functionality · 4463e7fb
      David Runge authored
      repod/repo/package/syncdb.py:
      Add `FILES_VERSIONS`, `DEFAULT_FILES_VERSION`,
      `DEFAULT_PACKAGE_DESC_VERSION`, `PACKAGE_DESC_VERSIONS`, `PackageDesc`,
      `PackageDescV1`, `Files` and `FilesV1`.
      Import from `repod.repo.management.outputpackage` instead of importing
      its models top-level to circumenvent circular import.
      
      repod/repo/management/outputpackage.py:
      Remove `FILES_VERSIONS`, `DEFAULT_FILES_VERSION`,
      `DEFAULT_PACKAGE_DESC_VERSION`, `PACKAGE_DESC_VERSIONS`, `PackageDesc`,
      `PackageDescV1`, `Files` and `FilesV1`.
      
      repod/cli.py:
      Import RepoDbTypeEnum top-level.
      
      repod/convert.py:
      Import functions and classes from `repod.repo.package` top-level.
      
      repod/files/__init__.py:
      Import functions and classes from `repod.repo.package` and
      `repod.repo.management` top-level.
      
      repod/operations.py:
      Import functions and classes from `repod.convert`, `repod.repo.package`
      and `repod.repo.management` top-level.
      
      repod/repo/__init__.py:
      Import from `repod.repo.package` and `repod.repo.management` to expose
      them top level in the `repod.repo` package.
      
      repod/repo/management/__init__.py:
      Import from `repod.repo.management.outputpackage` to expose them top
      level in the `repod.repo.management` package.
      
      repod/repo/package/__init__.py:
      Import from `repod.repo.management.syncdb` to expose them top
      level in the `repod.repo.package` package.
      
      tests/common/test_models.py:
      Add tests for `BuildDate`, `CSize`, `FileList`, `Name` and `Packager`
      from the removed tests/test_models.py.
      
      tests/conftest.py:
      Import repo related classes top-level from their respective new
      locations.
      
      tests/test_cli.py:
      Import `RepoDbTypeEnum` top-level from its new location.
      
      tests/test_convert.py:
      Import `repod.repo.package` and `repod.repo.package.syncdb` classes
      top-level.
      
      tests/test_files.py:
      Import `repod.repo.management.outputpackage` and `repod.repo.package`
      classes top-level.
      
      tests/test_models.py:
      Remove obsolete tests. They have been distributed in the tests for the
      split repo functionality and the common models.
      
      tests/test_operations.py:
      Import `OutputPackageBaseV1` top-level from its new location.
      
      tests/repo/management/test_outputpackage.py:
      Add tests for all classes and functions in
      `repod.repo.management.outputpackage`.
      
      tests/repo/package/test_syncdb.py;
      Add tests for all classes and functions in
      `repod.repo.package.syncdb`.
      
      tox.ini:
      Export the JSON schema for repod.repo subpackages for the docs.
      Verified
      4463e7fb
    • David Runge's avatar
      Move repository related models to repo package · edb2e79e
      David Runge authored
      repod/models/package.py -> repod/repo/management/outputpackage.py:
      Move all repository contents related models to a management repository
      specific location. This still encludes models used by package
      repositories, which are split out in a follow-up commit.
      
      repod/models/repo.py -> repod/repo/package/syncdb.py:
      Move package repository related models and functions to a package
      repository specific location.
      Verified
      edb2e79e
Loading