Skip to content
Snippets Groups Projects

Sanitize cal_tools.tools.get_creation_date

Merged Cyril Danilevski requested to merge clean/get_dir_creation_date into master

This is just a little bit of maintenance, as I'm wading through the code.

This MR cleans

It was tested so:

In [1]: from cal_tools.tools import get_dir_creation_date

In [2]: folder = "/gpfs/exfel/exp/DETLAB/202031/p900172/raw"

In [3]: get_dir_creation_date(folder, 10)
Out[3]: datetime.datetime(2020, 7, 20, 12, 39, 20, 631633)

In [4]: get_dir_creation_date(folder, 4)  # no such run, None is returned

In [5]: 

One question maybe is, should this function return None when the date could not be extracted, as it is now, or to raise?
I'd prefer to raise an error, so that it's clear that this step failed, rather than failing later.

@kamile @ahmedk

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading