experimental_design

experimental_design is a package for tools to create and manage design of experiments (DOE), or statistical design of experiments

 1# -----------------------------------------------------------------------------
 2# Authors:     aric.sanders@nist.gov
 3# Created:     04/02/2025
 4# License:     NIST License
 5# -----------------------------------------------------------------------------
 6"""
 7experimental_design is a package for tools to create and manage
 8design of experiments (DOE), or statistical design of experiments
 9
10"""
11
12#----------------------------------------------------------------------
13# Standard Imports
14import os
15import sys
16
17# -----------------------------------------------------------------------------
18# Third Party Imports
19
20# -----------------------------------------------------------------------------
21# Module Constants
22VERBOSE_IMPORT = True
23TIMED_IMPORT = True
24__version__ = "0.0.3"
25"Constant that determines if import statements are echoed to output"
26# The new module load scheme can be for module in DE_API_MODULES.keys()
27# -----------------------------------------------------------------------------
28DE_API_MODULES = {"experimental_design.experimental_designs":True}
29"Dictionary that controls the definition of the API, this can be set to leave out any unwanted modules. Also it is" \
30    "possible to discover all modules by DE_API_MODULES.keys()"
31
32# This makes sure this file is the one loaded
33sys.path.append(os.path.dirname(__file__))
34# To tune the imported API change the DE_API_MODULES dictionary
35if TIMED_IMPORT:
36    import datetime
37
38    first_timer = datetime.datetime.now(datetime.timezone.utc)
39    start_timer = datetime.datetime.now(datetime.timezone.utc)
40for module in sorted(DE_API_MODULES.keys()):
41    try:
42        if DE_API_MODULES[module]:
43            if VERBOSE_IMPORT:
44                print(("Importing {0}".format(module)))
45            exec('from {0} import *'.format(module))
46            if TIMED_IMPORT:
47                end_timer = datetime.datetime.now(datetime.timezone.utc)
48                time_difference = end_timer - start_timer
49                print(("It took {0} s to import {1}".format(time_difference.total_seconds(), module)))
50                start_timer = end_timer
51    except:
52        print(f"The {module}failed to import")
53        pass
54if TIMED_IMPORT:
55    end_timer = datetime.datetime.now(datetime.timezone.utc)
56    time_difference = end_timer - first_timer
57    print(("It took {0} s to import all of the active modules".format(time_difference.total_seconds())))
VERBOSE_IMPORT = True
TIMED_IMPORT = True
DE_API_MODULES = {'experimental_design.experimental_designs': True}

Dictionary that controls the definition of the API, this can be set to leave out any unwanted modules. Also it ispossible to discover all modules by DE_API_MODULES.keys()