Closed enmar-alkhafagi closed 1 month ago
This pull request implements a major refactoring of the PASTA-ELN project, transitioning from CouchDB to SQLite as the backend database. The changes are extensive, affecting nearly all parts of the codebase, including the core backend functionality, GUI components, installation process, and testing suite.
classDiagram
class Backend {
+checkDB(outputStyle: str, repair: bool)
+db: SqlLiteDB
}
class SqlLiteDB {
+basePath: Path
+saveDoc(doc: dict)
+remove(docID: str)
+cursor: Cursor
+connection: Connection
}
class serverActions {
+couchDB2SQLite(userName: str, password: str, database: str, path: str)
+translateDoc(doc: dict, comment: str) : tuple
+translateV2_V3(path: str)
+verifyPasta(projectGroup: str, repair: bool)
+repairPropertiesDot(projectGroup: str)
+delete(projectGroup: str, docID: str)
+__returnBackend__(projectGroup: str) : Backend
}
Backend --> SqlLiteDB
serverActions --> Backend
serverActions --> SqlLiteDB
classDiagram
class Form {
-comm: Communicate
-doc: dict
-flagNewDoc: bool
-skipKeys: list
-allHidden: bool
-allUserElements: list
+autosave()
+execute(command: list)
+textChanged()
+delTag(_: str, tag: str)
+addTag(tag: Union[str, int])
+updateTagsBar()
}
class Communicate {
+backend: Backend
}
Form --> Communicate
Form --> Backend
classDiagram
class installationTools {
+getOS() : str
+createDefaultConfiguration(pathPasta: Optional[Path]) : dict
+configuration(command: str, pathData: str) : str
+exampleData(force: bool, callbackPercent: Optional[Callable], projectGroup: str, outputFormat: str) : str
}
class Backend {
+addData(docType: str, data: dict, newProjID: list)
+changeHierarchy(projID: str)
+db: SqlLiteDB
}
installationTools --> Backend
Backend --> SqlLiteDB
Change | Details | Files |
---|---|---|
Replaced CouchDB with SQLite as the backend database |
|
pasta_eln/sqlite.py pasta_eln/backend.py pasta_eln/GUI/table.py pasta_eln/GUI/project.py |
Refactored data model and document structure |
|
pasta_eln/fixedStringsJson.py pasta_eln/handleDictionaries.py pasta_eln/GUI/form.py |
Updated installation and configuration process |
|
pasta_eln/installationTools.py pasta_eln/GUI/configSetup.py |
Refactored GUI components to work with new backend |
|
pasta_eln/GUI/details.py pasta_eln/GUI/projectLeafRenderer.py pasta_eln/GUI/palette.py |
Updated and expanded test suite |
|
tests/test_01_DefaultExample.py tests/test_02_copyMove.py tests/test_03_dragDrop.py |
Refactored utility functions and string handling |
|
pasta_eln/stringChanges.py pasta_eln/miscTools.py |
Updated extractor functionality |
|
pasta_eln/Extractors/extractor_png.py pasta_eln/Extractors/extractor_csv.py pasta_eln/Extractors/extractor_json.py |
Tried to merge into main, error
Summary by Sourcery
Replace the CouchDB backend with a new SQLite-based implementation, introducing advanced extractor tutorials and enhancing the GUI with a slide show feature. Improve testing infrastructure and update CI workflows to support multiple Python versions. Remove obsolete CouchDB-related files and update documentation to reflect these changes.
New Features:
Bug Fixes:
Enhancements:
Build:
CI:
Deployment:
Documentation:
Tests:
Chores: