Skip to content

Fix/get dir creation date

Karim Ahmed requested to merge fix/get_dir_creation_date into master

Add transparency to get_dir_creation_date() nested methods and unify returned creation date to UTC

Description

This MR started by updating the returned creation_time from myMDC to UTC and ended with splitting the functions for get_dir_creation_date to different functions and adding transparent prints on which method is used at the end to derive the creation date for a run directory.

  1. Unify creation date to UTC
  2. add a separate function to get creation date from myMDC
  3. add a separate function to get creation date from METADATA/creationDate using Extra-data
  4. add tests for both functions and fix old test after unify datetime timezone.
  5. add a fixture to avoid running tests with myMDC connection. as it seems to be the current case at the moment for the CI.

How Has This Been Tested?

By running pytest tests/test_cal_tools locally.

Relevant Documents (optional)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (refactoring code with no functionality changes)
  • Test (additional or refactored tests)

Checklist:

  • My code follows the code style of this project.
  • I added tests where appropriate.

Reviewers

@danilevc @roscar @schmidtp

Edited by Karim Ahmed

Merge request reports