immerse-project / nemo-simsar

Tools and guides how to share NEMO user configurations & experiments with others using a git repository.
6 stars 0 forks source link

Fix #16 #24

Closed lmicallef closed 3 years ago

lmicallef commented 4 years ago

Updated Code:

Major update:

The script which contains all the functions (scriptMK_v5.py) has been organised in two classes. One is color and the other is readmeScript. Color Class contains all the inbuild colours which are being used in the script.

readmeScript Class contains an initialisation class (similar to a constructor) which stores attributes that will be used for several methods in this same class. All global variables have been removed and where possible variables are being passed as arguments.

The main script (mkReadme_v5.py) imports the above classes and creates instances to be able to access the attributes and methods.

The above changes were made (i) to avoid global variables (ii) to to have an object-oriented approach to faciliate work when we need to create a package.

P.S. These scripts are still work in progress and script names can be changed