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 DataBase class and archive/remote modules #140

Open
Zeitsperre opened this issue Jun 30, 2023 · 0 comments
Open

Refactor DataBase class and archive/remote modules #140

Zeitsperre opened this issue Jun 30, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request invalid This doesn't seem right

Comments

@Zeitsperre
Copy link
Collaborator

Proposal

There is a very old and unmaintained DataBase-related class (miranda.data) used for interacting with remote servers. This functionality is only useful when combined with miranda.archive and miranda.remote to perform actions such as ensuring that adequate space is available before transferring data. Unfortunately, a significant effort is needed to bring up the quality and usability of these classes/functions.

Approach

These modules and classes need to be completely refactored and documented. The idea behind this section of Miranda is to facilitate an easier approach to archiving obsolete data for long-term storage. An ideal approach to archiving (as Miranda are presently organized) would be as follows:

  • Folders slated for archiving are identified
  • miranda.archive utilities are used for creating file groupings. Groupings follow a nestec dictionary-based schema: top-level keys are archives, all subsequent keys are folder-structure of archive, drilled-down values are files.
  • If transfer is remote, miranda.remote.Connection is used to establish a connection with an external server.
    • If remote folders are needed: miranda.remote.ops.create_remote_directory
  • miranda.data.DataBase is used with a Connection instance to peform checks prior to transfer of files.
    • Transfer function: miranda.remote.ops.transfer_file

The current approach clearly does not make this obvious. There should be a regrouping of function and utilities. There may even potential for moving some functions to the miranda.io module.

@Zeitsperre Zeitsperre added enhancement New feature or request invalid This doesn't seem right labels Jun 30, 2023
@Zeitsperre Zeitsperre self-assigned this Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant