Skip to content

Latest commit

 

History

History
32 lines (30 loc) · 2.48 KB

THOUGHTS.adoc

File metadata and controls

32 lines (30 loc) · 2.48 KB

Thoughts for code evolution

As I go through a major rewrite and see things I don’t like, or would like to improve, a place to store easily such thoughts:

  • get rid of a maximum of global variables

  • split truly global (also remote) from local singletons

  • renumber verbosities to avoid "holes" between 0 and 9

  • replace log verbosity with IntEnum

  • replace return codes with IntFlag

  • split logging mechanism between front-end and back-end (writing to file, which is specific to the repository format)

  • replace own Logger implementation with standard one (in the background)

  • extend runtime info to also check locations and output file system information

  • set api version to 300 (or 290-299 to start with)

  • make check and setup functions mostly remote to encapsulate repo structure

  • use shadow object instead of shadow class, at least locally, to have more repeatable runs within same context?

  • allow keyword type parameters across the connection keyword=value

  • go through all the functions and make sure their names are more consistent

  • merge somehow the ErrorLog and Log functionalities to have one single interface

  • check all tests and make sure that they don’t generate uncaptured exceptions in rdiff-backup, capture them and make messages user friendly/ier

  • add unnecessary keyword parameters to simplify unit testing of shadow classes (as done for the locking functions)

  • write security concept paper

  • re-write security module to fit better new concepts around remote dir/repo, especially update-only doesn’t block backup to a new directory anymore. Possibly split _Repo_Shadow into Read and Write variants.

  • rewrite QuotedRPath to be an RPath variant specific to repositories, to encapsulate the increment aspects & co (taking them out of the standard RPath class)

  • does statistics really need direct access to the get_increment function? Or could it use the (shadow) repo as back-end like thought for logs?

  • add https://docs.python.org/3/library/argparse.html#argument-groups to arguments coming from actions

  • pass null_separator to selection functions

  • get rid of usage of selection module in fs_abilities

  • simplify usage of connections and connection_dict (get rid of one of both?)

  • get rid of the backup_writer variables (in singleton/specifics), replace with log/stats access to repository

  • get rid of compression as generics variable, replacing with usage of values.

  • replace null_separator with something like line_separator, directly having the character

  • replace all usage of print through log.Log