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

[omm] Interfaces for storage #1353

Merged
merged 1 commit into from
Aug 30, 2023
Merged

[omm] Interfaces for storage #1353

merged 1 commit into from
Aug 30, 2023

Conversation

Dcallies
Copy link
Contributor

Summary

Adds a shim for storage for a few interfaces, including a mock for storage.

TODO: I know I need to add threatexchange to a dependency somewhere, but I didn't see it (looked for a setup.py), will either add it in a followup PR once I find it or add it here. I suspect I just need to read CONTRIBUTING.

Test Plan

For now, just python repl

>>> import OpenMediaMatch.storage.default as s
>>> inst = s.DefaultOMMStore()
>>> inst.get_signal_type_configs()
{'pdq': SignalTypeConfig(enabled=True, signal_type=<class 'threatexchange.signal_type.pdq.signal.PdqSignal'>), 'video_md5': SignalTypeConfig(enabled=True, signal_type=<class 'threatexchange.signal_type.md5.VideoMD5Signal'>)}

@Dcallies
Copy link
Contributor Author

Discussed offline with @dougneal - currently hard to see how things connect, so as a fast follow will try and add the interfaces for bank (name, enabled), and then add a mocked version, with the intent to add a post-gres backed impl when I get back from PTO.

@dougneal dougneal merged commit 621e030 into main Aug 30, 2023
2 checks passed
@dougneal dougneal deleted the omm-strore-iface branch August 30, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants