-
Notifications
You must be signed in to change notification settings - Fork 0
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
Database: change db arch #67
base: master
Are you sure you want to change the base?
Conversation
Кажется, должно быть по другому: в отдельных файлах определяешь методы для работы с базой данных, а в сабмодуле db/methods/__init__.py что-то подобное: from .users import *
from .organisations import *
…
__all__ = [
"get_user",
"get_org",
...,
] |
Мы не будем использовать all в таком контексте. В качестве инструмента, который запрещает использовать экспортируемые символы у нас pylint
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 24 changed files in this pull request and generated no suggestions.
Files not reviewed (13)
- src/db/methods/domains.py: Evaluated as low risk
- src/db/types/types.py: Evaluated as low risk
- src/routers/users.py: Evaluated as low risk
- src/routers/auth.py: Evaluated as low risk
- src/routers/test.py: Evaluated as low risk
- src/utils/auth/auth.py: Evaluated as low risk
- src/typings/requests.py: Evaluated as low risk
- tests/src/helpers/api.ts: Evaluated as low risk
- src/config/config_model.py: Evaluated as low risk
- src/db/methods/organizations.py: Evaluated as low risk
- src/db/methods/collections/collections.py: Evaluated as low risk
- src/typings/responses.py: Evaluated as low risk
- src/db/methods/collections/init.py: Evaluated as low risk
Comments skipped due to low confidence (2)
src/routers/organizations.py:15
- The error message for ErrorCodes.NOT_FOUND is missing. It should provide a clear message indicating that the organization was not found.
raise ErrorResponse(code=ErrorCodes.NOT_FOUND)
src/routers/organizations.py:24
- The new behavior in the get_members method should be covered by tests to ensure it works as expected.
return RS.organizations.get_members(members=methods.get_members_of_organization(request.id))
Все методы с бд в одном файле
Удалены коллекции, которые не используются
Участники организации хранятся в отдельной коллекции с compound index
/api/organizations/get_members