Skip to content
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

Refactor Storage class #1635

Merged
merged 8 commits into from
Dec 1, 2023
Merged

Refactor Storage class #1635

merged 8 commits into from
Dec 1, 2023

Conversation

vkbo
Copy link
Owner

@vkbo vkbo commented Dec 1, 2023

Summary:

This PR applies a lot of the changes in the Storage class written for the single project file implementation. It does not include the single file format code itself. I haven't fully decided what to do with that part, but there is a lot of code in that branch that is worth using even without the single file part.

Changes:

  • The storage class separates functions for initialising the class when opening a project and when creating a new project, avoiding the interdependent functionality and need for if-checks to decide course of action.
  • The lock file is now handled entirely within the Storage class, which hides it behind its interface. This is in any case needed for the single file implementation as the lock file will be handled differently in those cases.
  • The opened state of the Storage class is now handled by an enum rather than just True/False.
  • The Project XML Writer class no longer determines the output XML file by itself and is instead provided this file name from the Storage class. This too will be different for single file projects.
  • The prepare storage function has been removed as it is no longer necessary.

Related Issue(s):

Related to #977
Code from #1558

Reviewer's Checklist:

  • The header of all files contain a reference to the repository license
  • The overall test coverage is increased or remains the same as before
  • All tests are passing
  • All flake8 checks are passing and the style guide is followed
  • Documentation (as docstrings) is complete and understandable
  • Only files that have been actively changed are committed

@vkbo vkbo added this to the Release 2.3 Beta 1 milestone Dec 1, 2023
@vkbo vkbo merged commit ded91bc into dev Dec 1, 2023
9 checks passed
@vkbo vkbo deleted the storage_updates branch December 1, 2023 17:22
@vkbo vkbo changed the title Storage updates Refactor Storage class Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant