Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timestamp required to instantiate files #162

Closed
thclark opened this issue May 12, 2021 · 0 comments · Fixed by #163
Closed

timestamp required to instantiate files #162

thclark opened this issue May 12, 2021 · 0 comments · Fixed by #163
Assignees
Labels
bug Unintended behaviour in any area of the app

Comments

@thclark
Copy link
Contributor

thclark commented May 12, 2021

Bug report

What is the current behavior?

A timestamp is required to instantiate Datafiles

What is the expected behavior?

If data files don't have a timestamp naturally associated with them, they should be able to be instantiated without one.

Your environment

  • Library Version: 0.1.17
  • Platform MacOS | Windows | Linux | Other

Other information

    def save(self, *args, **kwargs):
        """ Override the save method to synchronize metadata to the cloud store
        """
        meta = self.get_instance_metadata()
        tags = list(f"{k}:{v}" for k, v in meta.items())
        # Make a DUMMY datafile (path may or may not be correct) used solely as a serialisation helper for the metadata
>       df = Datafile(id=self.id, path=self._file_field.name, tags=tags)
E       TypeError: __init__() missing 1 required positional argument: 'timestamp'

=================================================================================================== short test summary info ====================================================================================================
FAILED backend/test/datalake/test_datalake.py::DatalakeTestCase::test_creation_with_meta - TypeError: __init__() missing 1 required positional argument: 'timestamp'
root@6dd4ad891cb2:/app# pip show octue
Name: octue
Version: 0.1.17
Summary: A package providing template applications for data services, and a python SDK to the Octue API
Home-page: https://www.github.com/octue/octue-sdk-python
Author: Thomas Clark (github: thclark)
Author-email: support@octue.com
License: MIT
Location: /usr/local/lib/python3.8/site-packages
Requires: Flask, google-cloud-pubsub, google-crc32c, google-cloud-storage, click, coolname, gunicorn, twined, google-cloud-secret-manager
Required-by: 
root@6dd4ad891cb2:/app# 
@thclark thclark added the bug Unintended behaviour in any area of the app label May 12, 2021
@thclark thclark added this to Triage in Twined Ecosystem Roadmap via automation May 12, 2021
@thclark thclark moved this from Triage to Highest Priority in Twined Ecosystem Roadmap May 12, 2021
@cortadocodes cortadocodes mentioned this issue May 12, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended behaviour in any area of the app
Projects
Development

Successfully merging a pull request may close this issue.

2 participants