1. 14 Apr, 2022 1 commit
  2. 05 Sep, 2021 1 commit
    • David Runge's avatar
      files: Add ProjectFiles class to handle synchronization · d4af71d2
      David Runge authored
      arch_release_promotion/files.py:
      Add `load_release_from_json_payload()` to read a JSON payload and return
      it as a Release instance.
      Add the `ProjectFiles` class to aid in the synchronization of promoted
      release types of a project by bundling all necessary functionality.
      The special factory method `ProjectFiles.sync()` allows the creation of
      a `ProjectFiles` instance and direct synchronization of the configured
      amount of release versions of the project.
      
      tests/test_files.py:
      Add tests for `load_release_from_json_payload()`.
      Add tests for `ProjectFiles` and all of its classmethods and instance
      methods.
      d4af71d2
  3. 01 Aug, 2021 1 commit
    • David Runge's avatar
      Read openmetrics of different types · 18bd338d
      David Runge authored
      arch_release_promotion/release.py:
      Add `Metric`, `SizeMetric`, `AmountMetric` and |VersionMetric| models,
      that track metrics with size, amount or version (respectively).
      Change the `Release` model to use `amount_metrics`, `size_metrics` and
      `version_metrics` attributes instead of `info`.
      
      arch_release_promotion/config.py:
      Change the `ReleaseConfig` model to track `version_metrics`,
      `size_metrics` and `amount_metrics` instead of `info_metrics`.
      
      arch_release_promotion/files.py:
      Change `read_metrics_file()` to return a tuple of AmountMetric,
      SizeMetric and VersionMetric lists and read the provided file only if it
      exists.
      
      arch_release_promotion/cli.py:
      Change `main()` to correctly initialize instances of `Release` with the
      different types of metrics.
      
      tests/*:
      Change the tests to match the changes in signature and attributes.
      18bd338d
  4. 25 Jul, 2021 1 commit
    • David Runge's avatar
      Add layer for file operations · d611205e
      David Runge authored
      arch_release_promotion/files.py:
      Add layer to do file introspection, create and remove temporary
      directories, to extract and write zip files, to write JSON files about
      releases and to read openmetrics based metrics files.
      
      tests/test_files.py:
      Add tests for the various file operations.
      d611205e