Skip to content

Conversation

@cortadocodes
Copy link
Member

@cortadocodes cortadocodes commented May 3, 2021

Contents

New Features

  • Allow datetime and posix timestamps for Datafile.timestamp
  • Add Datafile.posix_timestamp property

Minor improvements

  • Close Use GCS custom_time as timestamp metadata storage #149: use Google Cloud Storage custom_time metadata field for storing Datafile.timestamp
  • Get datetime objects directly from blob instead of parsing string serialisations
  • Add time utils module
  • Add hash preparation function to Hashable for datetime instances

Quality Checklist

  • New features are fully tested (No matter how much Coverage Karma you have)

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2021

Codecov Report

Merging #154 (8b5822f) into release/0.1.17 (89b0fa9) will decrease coverage by 0.15%.
The diff coverage is 91.66%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           release/0.1.17     #154      +/-   ##
==================================================
- Coverage           94.61%   94.45%   -0.16%     
==================================================
  Files                  54       55       +1     
  Lines                1542     1570      +28     
==================================================
+ Hits                 1459     1483      +24     
- Misses                 83       87       +4     
Impacted Files Coverage Δ
octue/resources/datafile.py 96.02% <85.00%> (-2.51%) ⬇️
octue/cloud/storage/client.py 96.29% <100.00%> (+0.35%) ⬆️
octue/mixins/hashable.py 100.00% <100.00%> (ø)
octue/utils/time.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89b0fa9...8b5822f. Read the comment docs.

@cortadocodes cortadocodes self-assigned this May 3, 2021
@cortadocodes cortadocodes changed the title Refactor/group datafile metadata via method Allow datetime timestamps for datafiles; pull Datafile metadata gathering into method May 3, 2021
@cortadocodes cortadocodes changed the base branch from main to release/0.1.17 May 3, 2021 19:33
@cortadocodes cortadocodes requested a review from thclark May 3, 2021 19:33
@cortadocodes cortadocodes changed the title Allow datetime timestamps for datafiles; pull Datafile metadata gathering into method Allow datetime timestamps for datafiles; use GCS custom time field for Datafile.timestamp May 3, 2021
Copy link
Contributor

@thclark thclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, but there's a merge conflict since merging the GCS metadata fix branch... and test coverage of the Datafile resource has dropped a bit.

Can you improve the coverage and sort the merge conflict please?

@thclark
Copy link
Contributor

thclark commented May 5, 2021

Also, @cortadocodes just to check, is it possible for the timestamp to be None? That's a legitimate possibility in doing from_cloud with a cloud object whose metadata is not yet in place.

@cortadocodes cortadocodes merged commit ee8cc7f into release/0.1.17 May 5, 2021
@cortadocodes cortadocodes deleted the refactor/group-datafile-metadata-via-method branch May 5, 2021 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use GCS custom_time as timestamp metadata storage Improved ease of construction for object metadata

4 participants