Skip to content

Commit

Permalink
Merge pull request #412 from DagsHub/datapoint_save_docstring
Browse files Browse the repository at this point in the history
Improve docstring for Datapoint.save()
  • Loading branch information
kbolashev authored Jan 2, 2024
2 parents fd76257 + 5d8d339 commit 66041e8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions dagshub/data_engine/model/datapoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ def __setitem__(self, key, value):

def save(self):
"""
call save to commit changes to metadata done with
one ore more dictionary assignment syntax usages, example:
'specific_data_point[metadata-name] = value
specific_data_point.save()'
Commit changes to metadata done with one or more dictionary assignment syntax usages.
`Learn more here <https://dagshub.com/docs/use_cases/data_engine/enrich_datasource\
/#3-enriching-with-with-dictionary-like-assignment>`_.
Example::
specific_data_point['metadata_field_name'] = 42
specific_data_point.save()
"""

# if in context block, don't _upload_metadata, it will be done at context end
Expand Down

0 comments on commit 66041e8

Please sign in to comment.