1. 07 Mar, 2021 5 commits
    • David Runge's avatar
      Add method to read db file · 70bdbd76
      David Runge authored
      repo_management/files.py:
      Add `_read_db_file()` to open a db file and return it as
      tarfile.Tarfile. The method assumes gzip-compressed databases by
      default, but can be used with other compression algorithms.
      
      tests/test_file.py:
      Add fixtures and tests for `_read_db_file()`.
      70bdbd76
    • David Runge's avatar
      Add conversion of 'desc' files · 84e32326
      David Runge authored
      repo_management/defaults.py:
      Add the IntEnmu `FieldType` which tracks the required type for an
      attribute when converting from 'desc' or 'files' files to pydantic
      models.
      Extend the DESC_JSON and FILES_JSON globals by introducing a dict per
      key, that describes the name and the required type, when converting to
      pydantic models.
      
      repo_management/convert.py:
      Rename `_files_data_to_dict()` to `_read_files_data_to_model()` and
      return a pydantic model (`models.Files`) instead of a custom dict.
      Add `_desc_data_to_model()` which allows for conversion of a 'desc' data
      file (represented as io.StringIO) to a pydantic model
      (`models.PackageDesc`).
      
      tests/test_convert.py:
      Add another test for raising RuntimeError in
      `_read_files_data_to_model()`.
      Add a parametrized test for `_desc_data_to_model()`.
      84e32326
    • David Runge's avatar
      Add pydantic models for 'desc' and 'files' files · 72cfd707
      David Runge authored
      repo_management/models.py:
      Add pydantic models for all headers in 'desc' and 'files' files (found
      in a repository database per pkgbase).
      The models describe the attribute names in use when reading data from
      the respective files and whether they are required or not.
      72cfd707
    • David Runge's avatar
      Update lock file to include pydantic · 59dfe2e8
      David Runge authored
      poetry.lock:
      Update the lock file to include the latest version of pydantic.
      59dfe2e8
    • David Runge's avatar
      Add pydantic to dependencies · 505ddd15
      David Runge authored
      pyproject.toml:
      Add pydantic to dependencies, as it will be used to validate
      configuration and internal typing.
      505ddd15
  2. 06 Mar, 2021 10 commits
    • David Runge's avatar
      Add gitlab-ci integration · c7227396
      David Runge authored
      .gitlab-ci.yml:
      Add Gitlab CI integration, that runs tox's linter and coverage targets
      in a lint stage.
      c7227396
    • David Runge's avatar
      Add initial tests for convert · d9105841
      David Runge authored
      tests/test_convert.py:
      Add initial tests for the convert module by adding a parametrized test
      for `_files_data_to_dict()`.
      d9105841
    • David Runge's avatar
      Add repo_management package · 02936e68
      David Runge authored
      repo_management/defaults.py:
      Add the basic defaults module, providing data that translates keywords
      found in the 'desc' and 'files' files of a binary repository database to
      those used in JSON files, representing the same data.
      
      repo_management/convert.py:
      Add the convert module, and introduce the simple private method
      (reimplementing a subset of the features from db2json)
      `_files_data_to_dict()`, which translates the contents of a `files` file
      to a typed dict.
      02936e68
    • David Runge's avatar
      Add tox integration · 190fff47
      David Runge authored
      tox.ini:
      Add tox integration for testing (linting and coverage) in virtual
      environments using poetry.
      190fff47
    • David Runge's avatar
      Add poetry lock file · 355cb562
      David Runge authored
      poetry.lock:
      Add lock file with all dependencies currently used to test the project.
      355cb562
    • David Runge's avatar
      Add pyproject.toml for project · 6a28acf0
      David Runge authored
      pyproject.toml:
      Add a pyproject.toml for describing the project, configuring all
      currently required dependencies and development dependencies.
      The configuration adds entries for the code formatter black, the import
      sorting tool isort and for the coverage report generation tool coverage.
      6a28acf0
    • David Runge's avatar
      Add a gitignore file · 78bc4945
      David Runge authored
      .gitignore:
      Add a ignore file for git, with many default entries for python projects
      related files, that should never end up in version control.
      78bc4945
    • David Runge's avatar
      Add mypy configuration file · 38e95d2b
      David Runge authored
      .mypy.ini:
      As mypy can not yet be configured through pyproject.toml, add a specific
      configuration file for it.
      38e95d2b
    • David Runge's avatar
      Add flake8 configuration · 1370fc60
      David Runge authored
      .flake8:
      As flake8 can not yet be configured in a pyproject.toml, use a specific
      file for it.
      Set the maximum complexity to 10 (can even be lower) and add default
      exclusions for project unrelated files.
      1370fc60
    • David Runge's avatar
      Add editorconfig integration · f9926c15
      David Runge authored
      .editorconfig:
      Add editorconfig integration, that covers .py, .rst and .yml files.
      f9926c15
  3. 28 Dec, 2019 2 commits
  4. 27 Dec, 2019 2 commits
  5. 12 Oct, 2019 1 commit
  6. 09 Oct, 2019 19 commits
  7. 07 Oct, 2019 1 commit