8000 Migrate to use Beanie ODM by Nydauron · Pull Request #483 · cbrxyz/pi-bot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Migrate to use Beanie ODM #483

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Nydauron
Copy link
Contributor
@Nydauron Nydauron commented May 31, 2024

Description

Migrates all database calls to use the Beanie ODM. The reason for the change is to allow for query type checking, database migrations, (and hopefully, later on, a customizable caching layer to allow for write-through behavior). This will be used in favor over the src.mongo.mongo.MongoDatabase class.

Here is the list of Mongo collections (checked off means ready for review):

Checks

  • I ran black over the code to ensure formatting.
  • I added docstrings to any new modules, classes, and methods.
  • I updated the docstrings of any updated modules, classes, and methods.
  • I added/updated Python typings for any new/updated class and module.
  • I updated the bot version (if necessary).
  • I ran mypy and reviewed any shown errors related to my changes.

Important Info

  • This pull request adds new pip dependencies.
  • This pull request adds new external dependencies.
  • This pull request changes the required versions of some dependencies.

Issues Closed

My pull request closes the following issues:

  • N/A

Thank You

Thank you for your contribution to Scioly.org! This pull request will be reviewed
in a promptly manner. If not done, please feel free to contact @cbrxyz.

@Nydauron Nydauron force-pushed the feat/beanie-odm/master branch from bbcb5f3 to fa25d40 Compare June 13, 2024 17:06
@Nydauron
Copy link
Contributor Author

@cbrxyz If possible, I would like you to review the child PRs here before I merge them into the main feature branch to make the review process easy yet thorough. Each of the child PRs are broken by DB model. EAch model I just inferred based off any keys that were used to index into any documents (so please correct if need be).

On another note, I am curious whether the reports collection is actually being used at all, given that the in-memory list of reports is not referenced anywhere in the code (apart from the initial population from the DB in tasks.py).

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.

1 participant
0