You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making plugins using dialog, it's useful to leverage from dialog-lib modules, which are available during development since dialog-lib is distributed package. But since dialog itself is not a package, this function get_session, for example, can not be inspected or accessed (specially when pytests runs and look at available modules). It's only accessed when we run the application using dialog's image.
I think I'd be a good idea to move this functionality to dialog-lib to make it available in the distributed package.
The text was updated successfully, but these errors were encountered:
Even though we could copy/move this to the distributed package, I think the best solution would be to keep session management inside each function that access the database, like I've suggested in #213 , in a way that dialog users shouldn't care about this when using ready functions like generate_memory_instance. Also, each db access would be close to the session creation in code (with context manager), making it easier to maintain and debug the code as the project grows.
dialog/src/dialog/db/__init__.py
Lines 1 to 12 in 833ae63
When making plugins using dialog, it's useful to leverage from dialog-lib modules, which are available during development since dialog-lib is distributed package. But since dialog itself is not a package, this function
get_session
, for example, can not be inspected or accessed (specially when pytests runs and look at available modules). It's only accessed when we run the application using dialog's image.I think I'd be a good idea to move this functionality to dialog-lib to make it available in the distributed package.
The text was updated successfully, but these errors were encountered: