alces-software / adminware

A sandbox CLI for running commands remotely across nodes
1 stars 0 forks source link

Seperate command hash generation from unrelated code #152

Closed DavidMarchant closed 5 years ago

DavidMarchant commented 5 years ago

As it stands creation of the hashes used by generate_commands are done in Config (for tools and tool families) and groups (for node groups). This code is not really tied to the purposes of the respective modules and should be generalized and combined.

The current set up also requires that the Config function __copy_values is imported into groups.

The functions being class functions for some purposes and not for others is also puzzling.

Additionally this results in some code duplication; all 'hashify' methods use similar structure which is repeated. This should be DRYed.

also see: https://github.com/alces-software/adminware/pull/148#discussion_r231081079