Skip to content

Conversation

@cortadocodes
Copy link
Member

@cortadocodes cortadocodes commented May 12, 2021

Contents

New Features

  • Make Datafiles and Datasets labelable
  • Use new version of tags in all Taggables
  • Replace string tags in a TagSet with key-value pairs in a TagDict
  • Add new Taggable mixin for providing the new tags interface
  • Add FilterDict, allowing filtering of key-value pairs by their values
  • Allow nested attribute/dictionary filtering in the filter containers FilterSet, FilterList and FilterDict
  • Allow any number of filters to be specified when filtering in filter containers
  • Allow ignoring of filterables missing the filtered-for attribute in a filter container instead of raising an error
  • Add filter container one method?
  • Allow ordering by nested attributes in all FilterContainers

Breaking changes

  • Use new format for manifests' datasets in twine.json files
  • Convert old Taggable mixin to Labelable mixin
  • Convert old Tag class to Label class
  • Convert TagSet to LabelSet
  • Use key-value pairs for filter names and values when filtering Filterables
  • Stop logging in Serialisable
  • Always exclude logger field in Serialisable
  • Simplify tag name pattern to ^[a-z0-9][a-z0-9_]*(?<!_)$
  • Simplify label pattern to ^[a-z0-9][a-z0-9-]*(?<!-)$
  • Store tags as key-value pairs in GCS custom metadata
  • Unbase TagDict and LabelSet from filter containers
  • JSON-encode cloud storage custom metadata again
  • Store tags in tags field of cloud metadata again

Minor improvements

  • Remove filters field from manifest strand in twines
  • Allow tags to be added via kwargs in Taggable.add_tags
  • Remove unused _FILTERSET_ATTRIBUTE class variables
  • Base Label on str
  • Support non-English characters in case-insensitive filtering
  • Add octue-sdk-python version to datafile metadata
  • Base filter containers on new FilterContainer abstract class
  • Move filter and order methods into FilterContainer
  • Use OctueJSONDecoder in Serialisable and GoogleCloudStorageClient
  • Add de/serialisation of datetime objects to de/encoders
  • Clarify name of some GoogleCloudStorageClient methods
  • Add set and UserString encoding to OctueJSONEncoder
  • Use OctueJSONDecoder
  • Add set and datetime decoding to OctueJSONDecoder
  • Remove unnecessary methods from LabelSet
  • Rename add_labels method and add add method to LabelSet

Fixes

  • Handle timestamps from cloud with/without timezone information
  • Fix OctueJSONDecoder
  • Make it harder to add invalid labels to LabelSet

Dependencies

  • Use new version of twined that distinguishes tags from labels

Testing

  • Use latest GCS emulator

Quality Checklist

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

@cortadocodes cortadocodes self-assigned this May 12, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2021

Codecov Report

Merging #164 (d0b48dc) into release/0.1.19 (fe3a8a0) will increase coverage by 0.09%.
The diff coverage is 99.50%.

Impacted file tree graph

@@                Coverage Diff                 @@
##           release/0.1.19     #164      +/-   ##
==================================================
+ Coverage           95.01%   95.11%   +0.09%     
==================================================
  Files                  55       58       +3     
  Lines                1626     1679      +53     
==================================================
+ Hits                 1545     1597      +52     
- Misses                 81       82       +1     
Impacted Files Coverage Δ
octue/resources/label.py 98.41% <98.41%> (ø)
octue/exceptions.py 100.00% <100.00%> (ø)
octue/mixins/__init__.py 100.00% <100.00%> (ø)
octue/mixins/filterable.py 100.00% <100.00%> (ø)
octue/mixins/labelable.py 100.00% <100.00%> (ø)
octue/mixins/serialisable.py 100.00% <100.00%> (ø)
octue/mixins/taggable.py 100.00% <100.00%> (ø)
octue/resources/analysis.py 81.63% <100.00%> (ø)
octue/resources/datafile.py 99.07% <100.00%> (+0.03%) ⬆️
octue/resources/dataset.py 100.00% <100.00%> (ø)
... and 9 more

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 fe3a8a0...d0b48dc. Read the comment docs.

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.

All the docstrings ;)

Code is great though!

bucket_name=<bucket-name>,
path_in_bucket=<path/to/file/in/bucket>,
metadata={"tags": ["blah", "glah", "jah"], "cleaned": True, "id": 3}
metadata={"id": 3, "labels": ["blah", "glah", "jah"], "cleaned": True, "colour": "blue"}
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't the id a uuid?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is for Identifiables but this is just metadata for any given file (this isn't a method of an Identifiable)

@cortadocodes
Copy link
Member Author

All the docstrings ;)

Code is great though!

🙈 I should refer myself to the docstring doctor 👨‍⚕️

@thclark
Copy link
Contributor

thclark commented Jun 2, 2021

All the docstrings ;)
Code is great though!

🙈 I should refer myself to the docstring doctor 👨‍⚕️

You should refer to yourself as the docstring vortex 🌪️ ;)

@cortadocodes cortadocodes merged commit 93a9744 into release/0.1.19 Jun 2, 2021
@cortadocodes cortadocodes deleted the feature/tag-templates branch June 2, 2021 21:18
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.

4 participants