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

Blocking/Refactor: Make Config.setSnapshotsPath() dumb #1864

Closed
buhtz opened this issue Sep 6, 2024 · 1 comment · Fixed by #1867
Closed

Blocking/Refactor: Make Config.setSnapshotsPath() dumb #1864

buhtz opened this issue Sep 6, 2024 · 1 comment · Fixed by #1867
Assignees
Labels
Bug Code Quality About code quality, refactoring, (unit) testing, linting, ... High

Comments

@buhtz
Copy link
Member

buhtz commented Sep 6, 2024

This is about common/config.py::Config.setSnapshotsPath().

def setSnapshotsPath(self, value, profile_id = None, mode = None):

That method is to complex and does to many things for a "simple" config setter. We need to find a solution to decouple/isolate that code somehow.

The reason is I do have two big PRs that are blocked because of that one method. One is PR #1850 (replace class Config with a new one) and the other is PR #1865 (heavy refactoring of the Manage Profiles dialog).

@buhtz buhtz self-assigned this Sep 6, 2024
@buhtz buhtz added High Bug Code Quality About code quality, refactoring, (unit) testing, linting, ... labels Sep 6, 2024
@buhtz buhtz added this to the Upcoming release milestone Sep 6, 2024
@buhtz
Copy link
Member Author

buhtz commented Sep 8, 2024

Work in progress ...

buhtz referenced this issue Sep 10, 2024
Refactoring of the Daemon class in tools.py and separating it into its own file.

The license situation is cleared after contacting its original author. Details in the modules docstring.
buhtz added a commit that referenced this issue Sep 13, 2024
Comprehensive and complex refactoring and also code moving.

The method Config.setSnapshotsPaths() has to much logic in it, not belonging in that method nor into its class. Code was extracted and "parked" in the tools.py module. This in consequences gives the ability to easier decouple code in SettingsDialog.saveProfile() (PR #1865).

Prepares for a new config management class (PR #1850) and refactoring the manage profiles dialog (PR #1865).

Close #1864
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Code Quality About code quality, refactoring, (unit) testing, linting, ... High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant