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
As noted with @rabbull, all ORM entities for the SQLite backends are contained in storage/sqlite_zip/orm.py, while the other SQLite-based storage backends then import from there, e.g.:
While it's not critical, functionality-wise, we could still consider a refactor, as it's a bit confusing that everything sqlite ORM related is contained under sqlite_zip, while sqlite_dos and sqlite_temp are actually implemented in directories at the same level, so one would expect those to stand on equal footing.
Similarly, I wouldn't actually have expected the SqliteDosStorage to inherit from PsqlDosBackend, but rather both of them to have a common parent class, or using composition? Wondering if there was a reason for this structure when the SqliteDosStorage was implemented in #6148. I guess this is mainly historical? Pinging also @unkcpz preaching "composition over inheritance" :D
The text was updated successfully, but these errors were encountered:
I think it is also a great place to use python protocol for duck typing. If there have N database backend and M file-repository backend, we don't want to end up with NxM storage backend.
We can have a discuss on coding week and see how to initialize the work on it.
As noted with @rabbull, all ORM entities for the SQLite backends are contained in
storage/sqlite_zip/orm.py
, while the other SQLite-based storage backends then import from there, e.g.:aiida-core/src/aiida/storage/sqlite_dos/backend.py
Line 33 in dd866ce
While it's not critical, functionality-wise, we could still consider a refactor, as it's a bit confusing that everything
sqlite
ORM related is contained undersqlite_zip
, whilesqlite_dos
andsqlite_temp
are actually implemented in directories at the same level, so one would expect those to stand on equal footing.Similarly, I wouldn't actually have expected the
SqliteDosStorage
to inherit fromPsqlDosBackend
, but rather both of them to have a common parent class, or using composition? Wondering if there was a reason for this structure when theSqliteDosStorage
was implemented in #6148. I guess this is mainly historical? Pinging also @unkcpz preaching "composition over inheritance" :DThe text was updated successfully, but these errors were encountered: