Rewrote docstrings for sys_type() and got rid of unused functions

This commit is contained in:
Mario Melara 2015-12-11 12:03:13 -08:00
parent 028cca16e6
commit fee88d289d

View file

@ -189,22 +189,6 @@ def get_sys_type_from_uname():
except: except:
return None return None
def get_sys_type_from_config_file():
spack_home_dir = os.environ["HOME"] + "/.spack"
yaml_file = os.path.join(spack_home_dir, 'architecture.yaml')
try:
config_dict = yaml.load(open(yaml_file)) # Fix this to have yaml.load()
arch = config_dict['architecture']
front = arch['front']
back = arch['back']
return Architecture(front,back)
except:
print "No architecture.yaml config file found"
return None
@memoized @memoized
def all_architectures(): def all_architectures():
modules = [] modules = []
@ -225,14 +209,10 @@ def all_architectures():
@memoized @memoized
def sys_type(): def sys_type():
"""Priority of gathering sys-type. """ Gather a list of all available subclasses of architectures.
1. YAML file that the user specifies the name of the architecture. e.g Cray-XC40 or Cray-XC30 Sorts the list according to their priority looking. Priority is
2. UNAME an arbitrarily set number. Detects arch either using uname or
3. GLOBALS a file path (/opt/cray...)
4. MAC OSX
Yaml should be a priority here because we want the user to be able to specify the type of architecture to use.
If there is no yaml present then it should move on to the next function and stop immediately once it gets a
arch name
""" """
# Try to create an architecture object using the config file FIRST # Try to create an architecture object using the config file FIRST
architecture_list = all_architectures() architecture_list = all_architectures()