Directory and inheritance structure of storage backends
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.:
https://github.com/aiidateam/aiida-core/blob/dd866ce816e986285f2c5794f431b6e3c68a369b/src/aiida/storage/sqlite_dos/backend.py#L33
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
TODOs:
- [ ] Move ORM entities for SQLite out of
storage/sqlite_zip/orm.pyinto a shared location - [ ] Remove inheritance of
SqliteDosStoragefromPsqlDosBackend - [ ] Move
SQLAQueryBuilderout ofstorage/psql_dosso thatSqliteQueryBuilderdoes not inherit from something inpsql_dos(again)