There was a bug on file queue, we inserted photo instead of a file.
I have some general comments that would be nice to consider:
- I cleanup requirement.txt to only list the direct requirements, it makes dependency handling easier. Let me know what you think.
- I've spent some time to clean up queing logic in twitter-v2 plugin. I think it is pretty modular and includes some validation through pydantic. That would have also prevented the bug above. We could iterate on it and merge to pymemri. It is located here https://gitlab.memri.io/memri/plugins/twitter-v2/-/blob/dev/twitter_v2/pod_update_queue.py
- There are some oauth2 scopes, which are not used. I removed them, let me know if they are needed.
'https://www.googleapis.com/auth/drive.metadata.readonly',
'https://www.googleapis.com/auth/drive.readonly',
'https://www.googleapis.com/auth/gmail.readonly',
- What do you think about using
InstalledAppFlow.from_client_secrets_file
to load the credential? I think it looks cleaner. - I was handling Oauth2 like this, just sharing to get your opinion, also as an input to unify the logic around implementing importers: https://gitlab.memri.io/memri/plugins/gmail_oauth/-/blob/dev/gmail_oauth/plugin.py#L52