diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 33682e4e3..40705b1ed 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -47,9 +47,19 @@ jobs: - name: Run Black to verify that the committed code is formatted run: | black --check . + spell-check: + name: Check Spelling + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v3 + - name: Run Spell Checker + uses: crate-ci/typos@master + with: + config: .typos.toml pytest: name: pytest (py${{ matrix.python-version }}/${{ matrix.os }}) - needs: [code-formatting] + needs: [code-formatting, spell-check] runs-on: ${{ matrix.os-version }} strategy: fail-fast: false diff --git a/.gitignore b/.gitignore index 056cc986c..68b25a900 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ eggs/ *.lib *.suo *.zip +Pipfile # OSX *.DS_Store diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 000000000..bf138d558 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,43 @@ +[files] +extend-exclude = [ + "*.smp", + "*.ui", + "*.html", + "*.css", + "*.js", + "*.svg", + "*.foqus", + "*.bkp", + "*.acmf", + "*.for", + "*.his", + "*.def", + "*.ads", + "*.pt", + "*.pkl", + "*.R", + "*.json", +] + +[default.extend-words] +# Ignore IDAES +IDAES = "IDAES" +FO = "FO" # TODO: probably an abbreviation? +sur = "sur" # abbreviation for 'surrogate' +nd = "nd" # used as a variable name in sdoeAnalysisDialog +astroid = "astroid" # Python package name +# proper nouns +Gess = "Gess" +# false positives +strat = "strat" # abbreviation of "strategy" used by Hypothesis + +[default.extend-identifiers] +# false positives +strngComps = "strngComps" # strng = strongly (connected) +# true positives that are part of the API +userInterupt = "userInterupt" +maxTimeInterupt = "maxTimeInterupt" +PyCodeInterupt = "PyCodeInterupt" +simin_nam = "simin_nam" +simout_nam = "simout_nam" +displayAvailablityWarning = "displayAvailablityWarning" diff --git a/README.md b/README.md index 6c9d39696..9e3bfda4a 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ See our [FAQ](FAQs.md) for frequently asked questions and answers See also the list of [contributors](../../graphs/contributors) who participated in this project. ## Development Practices -* Code development will be peformed in a forked copy of the repo. Commits will not be +* Code development will be performed in a forked copy of the repo. Commits will not be made directly to the repo. Developers will submit a pull request that is then merged by another team member, if another team member is available. * Each pull request should contain only related modifications to a feature or bug fix. * Sensitive information (secret keys, usernames etc) and configuration data (e.g database host port) should not be checked in to the repo. -* A practice of rebasing with the main repo should be used rather that merge commmits. +* A practice of rebasing with the main repo should be used rather that merge commits. ## Versioning We use [SemVer](http://semver.org/) for versioning. For the versions available, diff --git a/cloud/aws/README.md b/cloud/aws/README.md index 6d2e346fe..14afdf454 100644 --- a/cloud/aws/README.md +++ b/cloud/aws/README.md @@ -140,8 +140,7 @@ PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\S PSChildName : Windows PSDrive : HKLM PSProvider : Microsoft.PowerShell.Core\Registry -PS C:\Users\Administrator> Set-ItemProperty -path HKLM:\SYSTEM\CurrentControlSet\Control\Windows\ -Name NoInteractiveSer -vices -Value 0 +PS C:\Users\Administrator> Set-ItemProperty -path HKLM:\SYSTEM\CurrentControlSet\Control\Windows\ -Name NoInteractiveServices -Value 0 ``` ##### Registry set NoInteractiveServices ``` diff --git a/cloud/aws/cloudformation/FOQUS_SLM_instance_in_subnet.py b/cloud/aws/cloudformation/FOQUS_SLM_instance_in_subnet.py index 42e0a9b3f..3a92630fe 100644 --- a/cloud/aws/cloudformation/FOQUS_SLM_instance_in_subnet.py +++ b/cloud/aws/cloudformation/FOQUS_SLM_instance_in_subnet.py @@ -78,7 +78,7 @@ def _create_template( t.add_version("2010-09-09") t.add_description( """Template to create SLM instance and bind to - passed in Newtork Interface\ + passed in Network Interface\ """ ) diff --git a/docs/source/chapt_dev/index.rst b/docs/source/chapt_dev/index.rst index cd40a9f2f..4112c0390 100644 --- a/docs/source/chapt_dev/index.rst +++ b/docs/source/chapt_dev/index.rst @@ -3,7 +3,7 @@ Developer Documentation ======================= -Since the `source code for all of FOQUS is publically available +Since the `source code for all of FOQUS is publicly available `_, the more adventurous user may wish to look at the inner-workings of FOQUS to get a better understand how it works, contribute a fix to a bug, or add new features to the source tree. Other members of our CCSI partnership (national laboratories, diff --git a/docs/source/chapt_flowsheet/reference/settings.rst b/docs/source/chapt_flowsheet/reference/settings.rst index 0761908b4..ced8246f3 100644 --- a/docs/source/chapt_flowsheet/reference/settings.rst +++ b/docs/source/chapt_flowsheet/reference/settings.rst @@ -22,7 +22,7 @@ FOQUS** tab. Options in the **Settings, FOQUS** tab are described below. -#. **Save settings to working directoy**, when checkbox is selected the +#. **Save settings to working directory**, when checkbox is selected the settings file will be read from the specified working directory. This setting is useful for running multiple copies of FOQUS to ensure the settings do not conflict. When starting additional copies of FOQUS, diff --git a/docs/source/chapt_install/run_foqus.rst b/docs/source/chapt_install/run_foqus.rst index a8ef7ae72..d4a1bd8c7 100644 --- a/docs/source/chapt_install/run_foqus.rst +++ b/docs/source/chapt_install/run_foqus.rst @@ -58,4 +58,4 @@ e.g., for the Bash shell: If, on the contrary, a graphical interface *is* desired but the errors above occur, it is possible that the system is not yet configured to support graphical applications. In this case, try installing the :code:`libgl1-mesa-glx` and/or :code:`libxkbcommon-x11-0` packages using -the package manager appropriate for your Linux distrubution (i.e. :code:`apt-get install` on Ubuntu). +the package manager appropriate for your Linux distribution (i.e. :code:`apt-get install` on Ubuntu). diff --git a/docs/source/chapt_matlab/reference/matlab_foqus_intro.rst b/docs/source/chapt_matlab/reference/matlab_foqus_intro.rst index 14e142a69..fef8bbedf 100644 --- a/docs/source/chapt_matlab/reference/matlab_foqus_intro.rst +++ b/docs/source/chapt_matlab/reference/matlab_foqus_intro.rst @@ -54,7 +54,7 @@ If the MATLAB engine package was installed correctly, a similar message to the F .. figure:: ../figs/terminal_window_msg.png - Figure 1 - Terminal window message after installating the MATLAB engine package + Figure 1 - Terminal window message after installing the MATLAB engine package Now, to run MATLAB models within FOQUS follow the steps below: diff --git a/docs/source/chapt_odoe/tutorial-createcand.rst b/docs/source/chapt_odoe/tutorial-createcand.rst index 7d0590855..acd3c8930 100644 --- a/docs/source/chapt_odoe/tutorial-createcand.rst +++ b/docs/source/chapt_odoe/tutorial-createcand.rst @@ -111,7 +111,7 @@ In this example, the user will generate a new candidate set. Browse and load the EvaluationSet.csv file from the examples folder. Similar to the candidate set section, the user can select the evaluation set and click on the **Delete Selection** button in - case they want to delete the evaulation set. To visualize the data, just click the **View** + case they want to delete the evaluation set. To visualize the data, just click the **View** button under the **Visualize** column. .. figure:: figs/9b_ODoE_Cand&EvalSets.png diff --git a/docs/source/chapt_odoe/tutorial-loadcand.rst b/docs/source/chapt_odoe/tutorial-loadcand.rst index c8d1ca31f..9809ab7c3 100644 --- a/docs/source/chapt_odoe/tutorial-loadcand.rst +++ b/docs/source/chapt_odoe/tutorial-loadcand.rst @@ -98,7 +98,7 @@ In this example, the user will provide an existing candidate set. Browse and load the EvaluationSet.csv file from the examples folder. Similar to the candidate set section, the user can select the evaluation set and click on the **Delete Selection** button in - case they want to delete the evaulation set. To visualize the data, just click the **View** + case they want to delete the evaluation set. To visualize the data, just click the **View** button under the **Visualize** column. .. figure:: figs/9a-2_ODoE_Cand&EvalSets.png diff --git a/docs/source/chapt_opt/reference/optimization.rst b/docs/source/chapt_opt/reference/optimization.rst index 738fd77d2..7ab906cf6 100644 --- a/docs/source/chapt_opt/reference/optimization.rst +++ b/docs/source/chapt_opt/reference/optimization.rst @@ -173,7 +173,7 @@ Python expressions. #. The **Penalty Factor** contains the coefficient :math:`a` used in calculating the penalty for a constraint violation, see Equations - :eq:`eq.linear.constriant` to :eq:`eq.step.constriant`. + :eq:`eq.linear.constraint` to :eq:`eq.step.constraint`. #. The **Form** column contains a selection of different methods to calculate a constraint penalty. @@ -186,10 +186,10 @@ Python expressions. The variables are provided without the sample index. The calculations for each type of constraint penalty are given in -Equations :eq:`eq.linear.constriant` to :eq:`eq.step.constriant`. +Equations :eq:`eq.linear.constraint` to :eq:`eq.step.constraint`. .. math:: - :label: eq.linear.constriant + :label: eq.linear.constraint \text{Linear penalty form: }p_i = \begin{cases} @@ -198,7 +198,7 @@ Equations :eq:`eq.linear.constriant` to :eq:`eq.step.constriant`. \end{cases} .. math:: - :label: eq.quadratic.constriant + :label: eq.quadratic.constraint \text{Quadratic penalty form: }p_i = \begin{cases} @@ -207,7 +207,7 @@ Equations :eq:`eq.linear.constriant` to :eq:`eq.step.constriant`. \end{cases} .. math:: - :label: eq.step.constriant + :label: eq.step.constraint \text{Step penalty form: }p_i = \begin{cases} diff --git a/docs/source/chapt_sdoe/basics-runorder.rst b/docs/source/chapt_sdoe/basics-runorder.rst index 04aa9cfc7..f666556a8 100644 --- a/docs/source/chapt_sdoe/basics-runorder.rst +++ b/docs/source/chapt_sdoe/basics-runorder.rst @@ -2,7 +2,7 @@ Efficient Implementation of Experimental Run Order ================================================== Once designs have been created, it is often important to optimize the run order to efficiently reach equilibrium and -allow for the maximum number of runs to be implemented within a constrainted budget or time period. While statisticians +allow for the maximum number of runs to be implemented within a constrained budget or time period. While statisticians generally recommend using a randomized order for the experimental runs, it can sometimes mean the difference of a small randomized experiment versus a larger non-randomized experiment. diff --git a/docs/source/chapt_sinter/figs/gPROMS/25_Vectorss.png b/docs/source/chapt_sinter/figs/gPROMS/25_Vectors.png similarity index 100% rename from docs/source/chapt_sinter/figs/gPROMS/25_Vectorss.png rename to docs/source/chapt_sinter/figs/gPROMS/25_Vectors.png diff --git a/docs/source/chapt_sinter/tutorial/gproms.rst b/docs/source/chapt_sinter/tutorial/gproms.rst index 27dec495c..116948f7c 100644 --- a/docs/source/chapt_sinter/tutorial/gproms.rst +++ b/docs/source/chapt_sinter/tutorial/gproms.rst @@ -404,7 +404,7 @@ configuration can be done. Default Initialization page will display. Here the default values of the vectors may be edited. - .. figure:: ../figs/gPROMS/25_Vectorss.png + .. figure:: ../figs/gPROMS/25_Vectors.png :alt: Editing Vectors :name: fig.sinter.gproms.vectors diff --git a/docs/source/chapt_surrogates/tutorial/alamo.rst b/docs/source/chapt_surrogates/tutorial/alamo.rst index 41daec9e4..58609bb33 100644 --- a/docs/source/chapt_surrogates/tutorial/alamo.rst +++ b/docs/source/chapt_surrogates/tutorial/alamo.rst @@ -139,7 +139,7 @@ data is provided and adaptive sampling is used. Sample Distributions -19. The **Sampling schem\ e** dialog should display (Figure +19. The **Sampling scheme** dialog should display (Figure :ref:`fig.tut.sur.new.uq.sample2`). Select “Latin Hypercube” from the list. @@ -216,7 +216,7 @@ other and for the model building, selecting one output is the same as selecting more. 30. Select the **Variable\ s** tab (Figure - :ref:`fig.tut.sur.vaiables`). + :ref:`fig.tut.sur.variables`). 31. Select the checkbox for both input variables. @@ -224,7 +224,7 @@ selecting more. .. figure:: ../figs/variables.svg :alt: Variable Selection - :name: fig.tut.sur.vaiables + :name: fig.tut.sur.variables Variable Selection diff --git a/docs/source/chapt_vector_support/example2/Aspen_Model_Vectors_Handling.rst b/docs/source/chapt_vector_support/example2/Aspen_Model_Vectors_Handling.rst index c2fc98f92..8a36f8ddf 100644 --- a/docs/source/chapt_vector_support/example2/Aspen_Model_Vectors_Handling.rst +++ b/docs/source/chapt_vector_support/example2/Aspen_Model_Vectors_Handling.rst @@ -77,8 +77,8 @@ Vectorize" will be displayed as shown in Figure 3. elements required as a part of the vector. In this case, "B_TEMP" is the variable name corresponding to the - liquid phase temerature along the absorber column, and "TVAP" is the - variable name corresponding to the vapor phase temerature along the + liquid phase temperature along the absorber column, and "TVAP" is the + variable name corresponding to the vapor phase temperature along the absorber column, according to their path in SimSinter. These vector variables are indexed over the absorber stages, which is why the number of elements in each of them would be 90. @@ -104,7 +104,7 @@ steps 3 and 4 with the correct user inputs. If it is created, open the json file directly to check whether it has been modified correctly. In the json file, the dictionary corresponding to the "outputs" key must contain -180 scalar variables 90 each corrsponding to the vector variables "B_TEMP" and +180 scalar variables 90 each corresponding to the vector variables "B_TEMP" and "TVAP". Each scalar output variable corresponding to the vector must contain a "vector" field which includes the vector variable it is associated with, and an "index" field, which defines its location in the vector. The indices range from diff --git a/docs/source/conf.py b/docs/source/conf.py index 8c868e446..7c329c235 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -60,7 +60,7 @@ # 'sphinx-jsonschema' ] -# Avoid duplicating heading labels across parallely constructed documentation +# Avoid duplicating heading labels across parallelly constructed documentation autosectionlabel_prefix_document = True # Add any paths that contain templates here, relative to this directory. diff --git a/examples/test_files/Optimization/Opt_Test_01.foqus b/examples/test_files/Optimization/Opt_Test_01.foqus index 0e0c85b7a..67c332a74 100644 --- a/examples/test_files/Optimization/Opt_Test_01.foqus +++ b/examples/test_files/Optimization/Opt_Test_01.foqus @@ -1 +1 @@ -{"CCSIFileMetaData":{"ID":"52b46b12f99345beafd96f41697a08a8","CreationTime":"2014-10-03T10:45:55","ModificationTime":"2020-08-05T10:05:24","ChangeLog":{"2014-10-03T10:45:59":["00.00","6935005fc84d401192389c4f04389b50","",""],"2014-10-03T10:45:58":["00.00","b3044c3b5a5346adb1cd2a595aa01bdf","",""],"2014-10-03T10:46:50":["01.00","4365e5e7996348f2bc6b3230a802a795","Opt_Test_01","Updated example to latest version of FOQUS"],"2014-10-03T10:45:57":["00.00","424db0d2131b462ebd68cd6a55ab94f7","",""],"2014-10-03T10:45:56":["00.00","6476a698b0d149158bc52d1da525bfc4","",""],"2014-10-03T10:45:55":["00.00","c0c263dd721b450d9c5b8abd860f1e66","",""],"2014-10-03T11:19:37":["01.00","b84984f29c844c2faaa821c33a4ac260","Opt_Test_01","Reset inputs to default."],"2018-03-26T12:39:21":["01.00","ce9953dcfaf54b42b25d3fde0f3b45cd","Opt_Test_01",""],"2018-03-26T12:39:22":["01.00","6df92c8f26ca4e4693fd1ea8ac48c153","Opt_Test_01",""],"2018-03-26T12:39:23":["01.00","72c9ed619a90452e8c4d569d36f951db","Opt_Test_01",""],"2018-03-26T12:39:24":["01.00","f94c39c53ea640fa9a7eb1f910672b9f","Opt_Test_01",""],"2018-03-26T12:39:25":["01.00","658c9d60a10a459099f2fcdeffc0980d","Opt_Test_01",""],"2018-03-26T12:39:26":["01.00","0850c2dc141c4b848fed4894457b5474","Opt_Test_01",""],"2018-03-26T12:39:48":["01.00","00d966b719d64bbc9b8ee79ecad2d5ef","Opt_Test_01",""],"2018-03-26T12:39:49":["01.00","7373b0ffb1694121be8febbf5471c33a","Opt_Test_01",""],"2018-03-26T12:39:50":["01.00","288e852a2c7c488e86ca6f2aa0ecf34c","Opt_Test_01",""],"2018-03-26T12:39:51":["01.00","9c68e6197ac145c58545650e0fd5f3b7","Opt_Test_01",""],"2018-03-26T12:39:52":["01.00","ae17ae48759743b5b119bcd0fb6ea844","Opt_Test_01",""],"2018-03-26T12:39:53":["01.00","67728517477e4075b50d4239973bda1d","Opt_Test_01",""],"2018-03-26T12:40:19":["01.00","1869e845940348768ad746ac097d8502","Opt_Test_01",""],"2018-03-26T12:40:47":["01.00","9fb21490924c4e4a8355543e55e0e9dc","Opt_Test_01",""],"2018-03-26T12:41:02":["01.00","8167f346414b43d884f76794c48fa34c","Opt_Test_01",""],"2018-03-26T12:41:03":["01.00","27fccd59428946798cba2d165f71eede","Opt_Test_01",""],"2018-03-26T12:41:04":["01.00","3252b3be473044699d973f00f3577aa2","Opt_Test_01",""],"2018-03-26T12:41:05":["01.00","0d8a43e124ac4498a18e6b0aa98a1d00","Opt_Test_01",""],"2018-03-26T12:41:06":["01.00","1725e189715947c19ab449bea5070108","Opt_Test_01",""],"2018-03-26T12:41:25":["01.00","08de8c963ce64b65a64e08677bc6e28e","Opt_Test_01",""],"2018-03-26T12:42:30":["01.00","5fe1d00c31a147a0ba4dd158738d7677","Opt_Test_01",""],"2018-03-26T12:42:41":["01.00","81b48f63d95e4c0f99c661336730ab79","Opt_Test_01",""],"2018-03-26T12:43:32":["01.00","c2fe44d2281e45cf809eecc7b5832bb6","Opt_Test_01",""],"2020-08-05T10:05:24":["01.00","52b46b12f99345beafd96f41697a08a8","Opt_Test_01",""]},"DisplayName":"Opt_Test_01","OriginalFilename":".json","Application":"foqus","Description":"\n\n

Optimization Test 01

\n


\n

This example contains an optimization problem to mininize the following function:

\n


\n

f = x14 - 2x2x12 + x22 + x12 - 2x1 + 5

\n


\n

The node calculations are performed in Python, so the problem solves very quickly. This provides a simple problem for testing optimization and constraint handeling.

","MIMEType":"application/ccsi+foqus","Confidence":"experimental","Parents":[],"Role":"Input","UpdateMetadata":true,"Version":"01.00"},"Type":"FOQUS_Session","ID":"Opt_Test_01_141003104421","flowsheet":{"errorStat":0,"includeStatusOutput":true,"nodes":{"Test":{"modelType":0,"modelName":"","x":-400.0,"y":-300.0,"z":0.0,"scriptMode":"post","pythonCode":"x1 = x.x1\nx2 = x.x1\n\nf.f = x1**4 - 2*x2*x1**2 + x2**2 + x1**2 - 2*x1 + 5","calcError":0,"options":{"order":[],"options":{}},"turbApp":null,"turbSession":null,"synced":false}},"edges":[],"input":{"Test":{"x2":{"dtype":"float","value":4.0,"min":0.0,"max":10.0,"default":4.0,"unit":"None","set":"user","desc":"Input 2","scaling":"Linear","tags":[],"dist":{"type":"N","firstParamValue":null,"secondParamValue":null}},"x1":{"dtype":"float","value":4.0,"min":0.0,"max":10.0,"default":4.0,"unit":"None","set":"user","desc":"Input 1","scaling":"Linear","tags":[],"dist":{"type":"N","firstParamValue":null,"secondParamValue":null}}},"graph":{}},"output":{"Test":{"f":{"dtype":"float","value":4.000000000411633,"min":0.0,"max":0.0,"default":0.0,"unit":"None","set":"user","desc":"Output","scaling":"None","tags":[],"dist":{"type":"N","firstParamValue":null,"secondParamValue":null}}},"graph":{"error":{"dtype":"float","value":0.0,"min":0.0,"max":0.0,"default":0.0,"unit":"","set":"user","desc":"Flowsheet error code","scaling":"None","tags":[],"dist":{"type":"U","firstParamValue":null,"secondParamValue":null}}}},"tearSolver":"Wegstein","tearMaxIt":40,"tearTol":0.001,"tearTolType":"abs","tearLog":false,"tearLogStub":"tear_log","tearBound":false,"wegAccMax":9.0,"wegAccMin":-9.0,"singleCount":0,"onlySingleNode":null,"simList":{},"pre_solve_nodes":[],"post_solve_nodes":[],"no_solve_nodes":[],"turbineSim":null,"results":{"__columns":["set","result","time","solution_time","err","input.Test.x2","input.Test.x1","output.Test.f","output.graph.error","node_err.Test","turb.Test"],"__indexes":[],"__filters":{"none":{"filterTerm":null,"sortTerm":null,"no_results":false},"all":{"filterTerm":null,"sortTerm":null,"no_results":false}},"__current_filter":null,"calculated_columns":{}}},"optProblem":{"obj":[{"pycode":"f.Test.f","fail":1000,"penScale":1.0}],"g":[],"objtype":0,"custpy":"","v":["Test.x1","Test.x2"],"vs":[],"samp":{},"solver":"BFGS","solverOptions":{"BFGS":{"upper":10.0,"lower":0.0,"Set Name":"SciPy-BFGS","eps":1e-11,"Save results":true,"maxeval":1000000,"maxtime":48.0,"ftol":1e-09},"OptCMA":{"tolstagnation":null,"upper":10.0,"lower":0.0,"tolx":null,"sd0":2,"Restart modulus":1,"Results name":"CMA_Results","Restart in":"","Backup interval":10,"itmax":0,"popsize":6,"Save results":true,"tolfun":null,"seed":0,"Restart out":"","It timeout":3600,"Max time":48,"Log Objective":""}}},"surrogateProblem":{"input":[],"inputScaleFact":{},"options":{"Adaptive Sampling":false,"Include Exp":false,"Single Variable Term Powers":[1],"Input File":"alamo.alm","Two Variable Term Powers":[],"Validation Data Filter":"none","Ratio Term Powers":[],"Initial Data Filter":"all","PSUADE Driver Export File":"surrogate_ps.py","Include Cos":false,"Failure Value":-111111,"Maximum Run Time":2000,"Include Tan":false,"Three Variable Term Powers":[],"Include Sin":false,"Include Log":false,"FOQUS Model Export File":"surrogate_pg.py","Keep Temporary Files":false},"output":[],"ACOSSO":{"input":[],"output":[],"inputOptions":{},"outputOptions":{},"options":{"Data Filter":"all","Use Flowsheet Data":"Yes","Input Data File":"acosso\\xdat.csv","Output Data File":"acosso\\ydat.csv","Model File":"acosso_fit.rds","FOQUS Model (for UQ)":"acosso_surrogate_uq.py","FOQUS Model (for Flowsheet)":"acosso_surrogate_fs.py","CV":"bic","Order":2}}},"surrogateCurrent":"ACOSSO","uqSimList":[],"uqFilterResultsList":[],"sdoeSimList":[],"sdoeFilterResultsList":[]} \ No newline at end of file +{"CCSIFileMetaData":{"ID":"52b46b12f99345beafd96f41697a08a8","CreationTime":"2014-10-03T10:45:55","ModificationTime":"2020-08-05T10:05:24","ChangeLog":{"2014-10-03T10:45:59":["00.00","6935005fc84d401192389c4f04389b50","",""],"2014-10-03T10:45:58":["00.00","b3044c3b5a5346adb1cd2a595aa01bdf","",""],"2014-10-03T10:46:50":["01.00","4365e5e7996348f2bc6b3230a802a795","Opt_Test_01","Updated example to latest version of FOQUS"],"2014-10-03T10:45:57":["00.00","424db0d2131b462ebd68cd6a55ab94f7","",""],"2014-10-03T10:45:56":["00.00","6476a698b0d149158bc52d1da525bfc4","",""],"2014-10-03T10:45:55":["00.00","c0c263dd721b450d9c5b8abd860f1e66","",""],"2014-10-03T11:19:37":["01.00","b84984f29c844c2faaa821c33a4ac260","Opt_Test_01","Reset inputs to default."],"2018-03-26T12:39:21":["01.00","ce9953dcfaf54b42b25d3fde0f3b45cd","Opt_Test_01",""],"2018-03-26T12:39:22":["01.00","6df92c8f26ca4e4693fd1ea8ac48c153","Opt_Test_01",""],"2018-03-26T12:39:23":["01.00","72c9ed619a90452e8c4d569d36f951db","Opt_Test_01",""],"2018-03-26T12:39:24":["01.00","f94c39c53ea640fa9a7eb1f910672b9f","Opt_Test_01",""],"2018-03-26T12:39:25":["01.00","658c9d60a10a459099f2fcdeffc0980d","Opt_Test_01",""],"2018-03-26T12:39:26":["01.00","0850c2dc141c4b848fed4894457b5474","Opt_Test_01",""],"2018-03-26T12:39:48":["01.00","00d966b719d64bbc9b8ee79ecad2d5ef","Opt_Test_01",""],"2018-03-26T12:39:49":["01.00","7373b0ffb1694121be8febbf5471c33a","Opt_Test_01",""],"2018-03-26T12:39:50":["01.00","288e852a2c7c488e86ca6f2aa0ecf34c","Opt_Test_01",""],"2018-03-26T12:39:51":["01.00","9c68e6197ac145c58545650e0fd5f3b7","Opt_Test_01",""],"2018-03-26T12:39:52":["01.00","ae17ae48759743b5b119bcd0fb6ea844","Opt_Test_01",""],"2018-03-26T12:39:53":["01.00","67728517477e4075b50d4239973bda1d","Opt_Test_01",""],"2018-03-26T12:40:19":["01.00","1869e845940348768ad746ac097d8502","Opt_Test_01",""],"2018-03-26T12:40:47":["01.00","9fb21490924c4e4a8355543e55e0e9dc","Opt_Test_01",""],"2018-03-26T12:41:02":["01.00","8167f346414b43d884f76794c48fa34c","Opt_Test_01",""],"2018-03-26T12:41:03":["01.00","27fccd59428946798cba2d165f71eede","Opt_Test_01",""],"2018-03-26T12:41:04":["01.00","3252b3be473044699d973f00f3577aa2","Opt_Test_01",""],"2018-03-26T12:41:05":["01.00","0d8a43e124ac4498a18e6b0aa98a1d00","Opt_Test_01",""],"2018-03-26T12:41:06":["01.00","1725e189715947c19ab449bea5070108","Opt_Test_01",""],"2018-03-26T12:41:25":["01.00","08de8c963ce64b65a64e08677bc6e28e","Opt_Test_01",""],"2018-03-26T12:42:30":["01.00","5fe1d00c31a147a0ba4dd158738d7677","Opt_Test_01",""],"2018-03-26T12:42:41":["01.00","81b48f63d95e4c0f99c661336730ab79","Opt_Test_01",""],"2018-03-26T12:43:32":["01.00","c2fe44d2281e45cf809eecc7b5832bb6","Opt_Test_01",""],"2020-08-05T10:05:24":["01.00","52b46b12f99345beafd96f41697a08a8","Opt_Test_01",""]},"DisplayName":"Opt_Test_01","OriginalFilename":".json","Application":"foqus","Description":"\n\n

Optimization Test 01

\n


\n

This example contains an optimization problem to mininize the following function:

\n


\n

f = x14 - 2x2x12 + x22 + x12 - 2x1 + 5

\n


\n

The node calculations are performed in Python, so the problem solves very quickly. This provides a simple problem for testing optimization and constraint handling.

","MIMEType":"application/ccsi+foqus","Confidence":"experimental","Parents":[],"Role":"Input","UpdateMetadata":true,"Version":"01.00"},"Type":"FOQUS_Session","ID":"Opt_Test_01_141003104421","flowsheet":{"errorStat":0,"includeStatusOutput":true,"nodes":{"Test":{"modelType":0,"modelName":"","x":-400.0,"y":-300.0,"z":0.0,"scriptMode":"post","pythonCode":"x1 = x.x1\nx2 = x.x1\n\nf.f = x1**4 - 2*x2*x1**2 + x2**2 + x1**2 - 2*x1 + 5","calcError":0,"options":{"order":[],"options":{}},"turbApp":null,"turbSession":null,"synced":false}},"edges":[],"input":{"Test":{"x2":{"dtype":"float","value":4.0,"min":0.0,"max":10.0,"default":4.0,"unit":"None","set":"user","desc":"Input 2","scaling":"Linear","tags":[],"dist":{"type":"N","firstParamValue":null,"secondParamValue":null}},"x1":{"dtype":"float","value":4.0,"min":0.0,"max":10.0,"default":4.0,"unit":"None","set":"user","desc":"Input 1","scaling":"Linear","tags":[],"dist":{"type":"N","firstParamValue":null,"secondParamValue":null}}},"graph":{}},"output":{"Test":{"f":{"dtype":"float","value":4.000000000411633,"min":0.0,"max":0.0,"default":0.0,"unit":"None","set":"user","desc":"Output","scaling":"None","tags":[],"dist":{"type":"N","firstParamValue":null,"secondParamValue":null}}},"graph":{"error":{"dtype":"float","value":0.0,"min":0.0,"max":0.0,"default":0.0,"unit":"","set":"user","desc":"Flowsheet error code","scaling":"None","tags":[],"dist":{"type":"U","firstParamValue":null,"secondParamValue":null}}}},"tearSolver":"Wegstein","tearMaxIt":40,"tearTol":0.001,"tearTolType":"abs","tearLog":false,"tearLogStub":"tear_log","tearBound":false,"wegAccMax":9.0,"wegAccMin":-9.0,"singleCount":0,"onlySingleNode":null,"simList":{},"pre_solve_nodes":[],"post_solve_nodes":[],"no_solve_nodes":[],"turbineSim":null,"results":{"__columns":["set","result","time","solution_time","err","input.Test.x2","input.Test.x1","output.Test.f","output.graph.error","node_err.Test","turb.Test"],"__indexes":[],"__filters":{"none":{"filterTerm":null,"sortTerm":null,"no_results":false},"all":{"filterTerm":null,"sortTerm":null,"no_results":false}},"__current_filter":null,"calculated_columns":{}}},"optProblem":{"obj":[{"pycode":"f.Test.f","fail":1000,"penScale":1.0}],"g":[],"objtype":0,"custpy":"","v":["Test.x1","Test.x2"],"vs":[],"samp":{},"solver":"BFGS","solverOptions":{"BFGS":{"upper":10.0,"lower":0.0,"Set Name":"SciPy-BFGS","eps":1e-11,"Save results":true,"maxeval":1000000,"maxtime":48.0,"ftol":1e-09},"OptCMA":{"tolstagnation":null,"upper":10.0,"lower":0.0,"tolx":null,"sd0":2,"Restart modulus":1,"Results name":"CMA_Results","Restart in":"","Backup interval":10,"itmax":0,"popsize":6,"Save results":true,"tolfun":null,"seed":0,"Restart out":"","It timeout":3600,"Max time":48,"Log Objective":""}}},"surrogateProblem":{"input":[],"inputScaleFact":{},"options":{"Adaptive Sampling":false,"Include Exp":false,"Single Variable Term Powers":[1],"Input File":"alamo.alm","Two Variable Term Powers":[],"Validation Data Filter":"none","Ratio Term Powers":[],"Initial Data Filter":"all","PSUADE Driver Export File":"surrogate_ps.py","Include Cos":false,"Failure Value":-111111,"Maximum Run Time":2000,"Include Tan":false,"Three Variable Term Powers":[],"Include Sin":false,"Include Log":false,"FOQUS Model Export File":"surrogate_pg.py","Keep Temporary Files":false},"output":[],"ACOSSO":{"input":[],"output":[],"inputOptions":{},"outputOptions":{},"options":{"Data Filter":"all","Use Flowsheet Data":"Yes","Input Data File":"acosso\\xdat.csv","Output Data File":"acosso\\ydat.csv","Model File":"acosso_fit.rds","FOQUS Model (for UQ)":"acosso_surrogate_uq.py","FOQUS Model (for Flowsheet)":"acosso_surrogate_fs.py","CV":"bic","Order":2}}},"surrogateCurrent":"ACOSSO","uqSimList":[],"uqFilterResultsList":[],"sdoeSimList":[],"sdoeFilterResultsList":[]} \ No newline at end of file diff --git a/examples/test_files/Smoke_Tests/fs_smoke_test.py b/examples/test_files/Smoke_Tests/fs_smoke_test.py index 4ea550a39..96648009a 100644 --- a/examples/test_files/Smoke_Tests/fs_smoke_test.py +++ b/examples/test_files/Smoke_Tests/fs_smoke_test.py @@ -33,7 +33,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -700,13 +700,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test.py b/examples/test_files/Smoke_Tests/optimization_smoke_test.py index 8f2da45ae..79b4a4156 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_BFGS.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_BFGS.py index 72884c9a4..68f59e3bf 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_BFGS.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_BFGS.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_COBYLA.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_COBYLA.py index 618fb6fdf..376c856ef 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_COBYLA.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_COBYLA.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_CRS2.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_CRS2.py index d58277df3..ee1d5f7c3 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_CRS2.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_CRS2.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT-L-RAND.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT-L-RAND.py index db003bc9e..1866212d8 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT-L-RAND.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT-L-RAND.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT-L.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT-L.py index e306adfbb..36e0729d5 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT-L.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT-L.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT.py index dabe522d2..f6d2a3f2b 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_DIRECT.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_ESCH.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_ESCH.py index 3759fb3e4..f427daa8e 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_ESCH.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_ESCH.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_ISRES.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_ISRES.py index 9baca64ae..06a49f2e2 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_ISRES.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_ISRES.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_NEWUOA.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_NEWUOA.py index 37532fffe..60f8da902 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_NEWUOA.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_NEWUOA.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_Nelder-Mead.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_Nelder-Mead.py index 72b6b1fc7..519bf5098 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_Nelder-Mead.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_Nelder-Mead.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_OptCMA.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_OptCMA.py index 2a70238a5..3bc37459b 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_OptCMA.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_OptCMA.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_PE.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_PE.py index 23aa944c1..0b73ade94 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_PE.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_PE.py @@ -33,7 +33,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -174,13 +174,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_PRAXIS.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_PRAXIS.py index 4c1e5084d..4183dc884 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_PRAXIS.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_PRAXIS.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_PSUADE.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_PSUADE.py index 7ff6394e1..be00866c3 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_PSUADE.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_PSUADE.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_SLSQP.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_SLSQP.py index 1f1686b3f..5e0027972 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_SLSQP.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_SLSQP.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_Sbplx.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_Sbplx.py index 2640383fd..f007f865f 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_Sbplx.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_Sbplx.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/optimization_smoke_test_constraint.py b/examples/test_files/Smoke_Tests/optimization_smoke_test_constraint.py index dde3571b8..d399d58d0 100644 --- a/examples/test_files/Smoke_Tests/optimization_smoke_test_constraint.py +++ b/examples/test_files/Smoke_Tests/optimization_smoke_test_constraint.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -177,13 +177,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=errorFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/ouu_smoke_test.py b/examples/test_files/Smoke_Tests/ouu_smoke_test.py index b79b096df..7df5f2422 100644 --- a/examples/test_files/Smoke_Tests/ouu_smoke_test.py +++ b/examples/test_files/Smoke_Tests/ouu_smoke_test.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -169,13 +169,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_1.py b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_1.py index 265f2d209..d09c33986 100644 --- a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_1.py +++ b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_1.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -169,13 +169,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_2.py b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_2.py index 150042469..d8bd8d19a 100644 --- a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_2.py +++ b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_2.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -169,13 +169,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_3.py b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_3.py index 092d97166..ee344c725 100644 --- a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_3.py +++ b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_3.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -169,13 +169,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_4.py b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_4.py index 03f39bb4e..d29246ec2 100644 --- a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_4.py +++ b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_4.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -169,13 +169,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_5.py b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_5.py index 4f7e8a120..cdc6ac2cd 100644 --- a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_5.py +++ b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_5.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -169,13 +169,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_6.py b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_6.py index e66d87143..813f9f74d 100644 --- a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_6.py +++ b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_6.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -169,13 +169,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_7.py b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_7.py index a9475fe1b..7292068e8 100644 --- a/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_7.py +++ b/examples/test_files/Smoke_Tests/ouu_smoke_test_ex_7.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -169,13 +169,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox diff --git a/examples/test_files/Smoke_Tests/smoke_test_01 - Full.py b/examples/test_files/Smoke_Tests/smoke_test_01 - Full.py index 16e9e9304..b36a8b8df 100644 --- a/examples/test_files/Smoke_Tests/smoke_test_01 - Full.py +++ b/examples/test_files/Smoke_Tests/smoke_test_01 - Full.py @@ -33,7 +33,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -309,13 +309,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -416,7 +416,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/examples/test_files/Smoke_Tests/smoke_test_01.py b/examples/test_files/Smoke_Tests/smoke_test_01.py index ffd2762b9..2d763f6e1 100644 --- a/examples/test_files/Smoke_Tests/smoke_test_01.py +++ b/examples/test_files/Smoke_Tests/smoke_test_01.py @@ -33,7 +33,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -219,13 +219,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -322,7 +322,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break @@ -351,7 +351,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): MainWin.uqSetupFrame.simulationTable.cellWidget(0, 4).click() if not timerWait("uq_analyze_scheme"): break - # MainWin.AnalysisDialog.swithcModes.click() + # MainWin.AnalysisDialog.switchModes.click() break except Exception as e: # if there is any exception make sure the timers are stopped diff --git a/examples/test_files/Smoke_Tests/uq_smoke_test_data_analysis.py b/examples/test_files/Smoke_Tests/uq_smoke_test_data_analysis.py index 2c04c22dd..d1ec4c175 100644 --- a/examples/test_files/Smoke_Tests/uq_smoke_test_data_analysis.py +++ b/examples/test_files/Smoke_Tests/uq_smoke_test_data_analysis.py @@ -38,7 +38,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -243,13 +243,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -354,7 +354,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/examples/test_files/Smoke_Tests/uq_smoke_test_data_visualization.py b/examples/test_files/Smoke_Tests/uq_smoke_test_data_visualization.py index 13b5067ef..36a06f14f 100644 --- a/examples/test_files/Smoke_Tests/uq_smoke_test_data_visualization.py +++ b/examples/test_files/Smoke_Tests/uq_smoke_test_data_visualization.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -233,13 +233,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -344,7 +344,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/examples/test_files/Smoke_Tests/uq_smoke_test_inference.py b/examples/test_files/Smoke_Tests/uq_smoke_test_inference.py index cc39e7ba4..caa205dac 100644 --- a/examples/test_files/Smoke_Tests/uq_smoke_test_inference.py +++ b/examples/test_files/Smoke_Tests/uq_smoke_test_inference.py @@ -40,7 +40,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -381,13 +381,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -496,7 +496,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/examples/test_files/Smoke_Tests/uq_smoke_test_input_importance.py b/examples/test_files/Smoke_Tests/uq_smoke_test_input_importance.py index c9f6b2fb6..f0838961d 100644 --- a/examples/test_files/Smoke_Tests/uq_smoke_test_input_importance.py +++ b/examples/test_files/Smoke_Tests/uq_smoke_test_input_importance.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -234,13 +234,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -345,7 +345,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/examples/test_files/Smoke_Tests/uq_smoke_test_polynomial.py b/examples/test_files/Smoke_Tests/uq_smoke_test_polynomial.py index 9c5f8ce0d..2bc954cba 100644 --- a/examples/test_files/Smoke_Tests/uq_smoke_test_polynomial.py +++ b/examples/test_files/Smoke_Tests/uq_smoke_test_polynomial.py @@ -33,7 +33,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -309,13 +309,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -416,7 +416,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/examples/test_files/Smoke_Tests/uq_smoke_test_response_surface_validation.py b/examples/test_files/Smoke_Tests/uq_smoke_test_response_surface_validation.py index 0bcd82e8f..9977c8d1e 100644 --- a/examples/test_files/Smoke_Tests/uq_smoke_test_response_surface_validation.py +++ b/examples/test_files/Smoke_Tests/uq_smoke_test_response_surface_validation.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -263,13 +263,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -374,7 +374,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/examples/test_files/Smoke_Tests/uq_smoke_test_response_surface_visualization.py b/examples/test_files/Smoke_Tests/uq_smoke_test_response_surface_visualization.py index 015c1401c..b3d9f3cb9 100644 --- a/examples/test_files/Smoke_Tests/uq_smoke_test_response_surface_visualization.py +++ b/examples/test_files/Smoke_Tests/uq_smoke_test_response_surface_visualization.py @@ -36,7 +36,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -253,13 +253,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -364,7 +364,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/examples/test_files/Smoke_Tests/uq_smoke_test_response_uq_analysis.py b/examples/test_files/Smoke_Tests/uq_smoke_test_response_uq_analysis.py index 280131d7c..3f1b58f31 100644 --- a/examples/test_files/Smoke_Tests/uq_smoke_test_response_uq_analysis.py +++ b/examples/test_files/Smoke_Tests/uq_smoke_test_response_uq_analysis.py @@ -38,7 +38,7 @@ def go(sleep=0.25, MainWin=MainWin): def getButton(w, label): - """Get a buttom in window w labeled label""" + """Get a button in window w labeled label""" blist = w.buttons() for b in blist: if b.text().replace("&", "") == label: @@ -338,13 +338,13 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): return True timers[timer].stop() # Timer never did it's thing so just shut it down with open(tf, "a") as f: # file to write test results to - f.write("ERROR: timer {} didn't stop in alloted time\n".format(timer)) + f.write("ERROR: timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -447,7 +447,7 @@ def timerWait(timer, sleep=0.25, n=40, go=go, timers=timers, tf=testOutFile): break # assert abs(self.flowsheet.output["Rosenbrock"]["f"] - 126859) < 1e-8 # assert self.flowsheet.errorStat==0 - ## Try out controling UQ ensemble add + ## Try out controlling UQ ensemble add MainWin.uqSetupAction.trigger() if not go(): break diff --git a/foqus_lib/foqus.py b/foqus_lib/foqus.py index 895555e08..3dd14970a 100644 --- a/foqus_lib/foqus.py +++ b/foqus_lib/foqus.py @@ -154,7 +154,7 @@ def startGUI( showSplash: if false don't show splash screen app: if already created pyside app to show message use it showUQ: Show the UQ tab - showOpt: Show the optimzation tab + showOpt: Show the optimization tab showBasicDataTab: Show the Basic Data tab ts: A testing script to automatiacally run when GUI starts. """ @@ -208,7 +208,7 @@ def logException(etype, evalue, etrace): "unhandled exception", exc_info=(etype, evalue, etrace) ) if foqus_application: - # just incase the exception happend when + # just in case the exception happened when # cursor was set to waiting type set to normal foqus_application.restoreOverrideCursor() # Now show error in a message box @@ -231,8 +231,8 @@ def signal_handler(signal, frame): A signal handler to cause a siginal to raise a keyboardinterupt exception. Used to override a default signal like SIGINT so the FOQUS consumer process can shutdown cleanly. The FOQUS consumer catches the keyboardinterupt - exception as one (slighlty unreliable) way to shut down. Seems ctrl-c - causes keyboard interupt exception and SIGINT signal, hense need to change + exception as one (slightly unreliable) way to shut down. Seems ctrl-c + causes keyboard interrupt exception and SIGINT signal, hence need to change SIGINT handler. """ raise KeyboardInterrupt() @@ -255,7 +255,7 @@ def main(args_to_parse=None): try: turbine.commands._setup_logging.done = True except: - logging.getLogger("foqus." + __name__).exception("Cannot finde turbine module") + logging.getLogger("foqus." + __name__).exception("Cannot find turbine module") app = None # Qt application if I need to display message boxes. ## Setup the command line arguments parser = argparse.ArgumentParser() @@ -600,7 +600,7 @@ def main(args_to_parse=None): from foqus_lib.framework.sim.turbineLiteDB import keepAliveTimer load_gui = False - # Make ctrl-c do nothing but and SIGINT donothing but interupt + # Make ctrl-c do nothing but and SIGINT donothing but interrupt # the loop signal.signal(signal.SIGINT, signal_handler) # Register consumer TurbineLite DB @@ -819,7 +819,7 @@ def main(args_to_parse=None): if guid: try: db.add_message( - "consumer={0}, stopping consumer keyboard interupt".format( + "consumer={0}, stopping consumer keyboard interrupt".format( consumer_uuid ), guid, diff --git a/foqus_lib/framework/foqusException/foqusException.py b/foqus_lib/framework/foqusException/foqusException.py index 5c9e5e6c3..248e3c495 100644 --- a/foqus_lib/framework/foqusException/foqusException.py +++ b/foqus_lib/framework/foqusException/foqusException.py @@ -71,7 +71,7 @@ def setCodeStrings(self): def __str__(self): """ This is function gets called when use use the str() function - to turn the excepetion into a string. This tries to turn + to turn the exception into a string. This tries to turn the exception object into a nice helpful string message to print out. """ diff --git a/foqus_lib/framework/foqusOptions/option.py b/foqus_lib/framework/foqusOptions/option.py index 451c14954..7609fbd6c 100644 --- a/foqus_lib/framework/foqusOptions/option.py +++ b/foqus_lib/framework/foqusOptions/option.py @@ -39,7 +39,7 @@ def __init__( """ creates a new option, options are used in settings for optimization solvers, and surrogate model methods they - may be used in more plases in the future. + may be used in more places in the future. Args/attributes @@ -50,7 +50,7 @@ def __init__( desc - a string description of the option vmin - a min value optionally used to validate float and int vmax - a max value optionally used to validate float and int - dtype - a data type for otpion if None, set by default value + dtype - a data type for option if None, set by default value validValues - a list of valid values, empty list means no restriction """ diff --git a/foqus_lib/framework/foqusOptions/optionList.py b/foqus_lib/framework/foqusOptions/optionList.py index 16ae140a4..9cee2557a 100644 --- a/foqus_lib/framework/foqusOptions/optionList.py +++ b/foqus_lib/framework/foqusOptions/optionList.py @@ -26,7 +26,7 @@ class optionList(dict): def __init__(self): """ - Initalize an option list + Initialize an option list """ dict.__init__(self) self.order = [] # display order for options diff --git a/foqus_lib/framework/graph/graph.py b/foqus_lib/framework/graph/graph.py index 9bb60b67a..120bf69f6 100644 --- a/foqus_lib/framework/graph/graph.py +++ b/foqus_lib/framework/graph/graph.py @@ -296,7 +296,7 @@ def loadDict(self, sd): self.singleCount = sd.get("singleCount", self.singleCount) self.pre_solve_nodes = sd.get("pre_solve_nodes", []) self.post_solve_nodes = sd.get("post_solve_nodes", []) - self.no_solve_nodes = sd.get("no_sovle_nodes", []) + self.no_solve_nodes = sd.get("no_solve_nodes", []) self.turbineSim = sd.get("turbineSim", None) temp = sd.get("results", None) if temp: @@ -586,7 +586,7 @@ def solveListValTurbineCreateJobs(self, valueList, maxSend): def solveListValTurbineGetGenerator(self): """ - Get a results genrator from Turbine, if fail return None + Get a results generator from Turbine, if fail return None """ try: gid = self.turbConfig.retryFunction( @@ -687,7 +687,7 @@ def solveListValTurbine(self, valueList=None, maxSend=20, sid=None, jobIds=[]): if jobIds is None: return self.allSubmitted = True # Flag to say job sumbmission is done - # get results genrator + # get results generator gid = self.solveListValTurbineGetGenerator() if gid is None: return @@ -834,7 +834,7 @@ def solveListVal(self, valueList): if not self.stop.isSet(): # run solve if thread has not been stopped # it it has been stopped skip the solve and just - # report a -1 error staus on remaining runs + # report a -1 error status on remaining runs try: self.solve() with self.resLock: @@ -1176,7 +1176,7 @@ def solveSubGraphWeg( log_file = self.tearLogStub for j in range(100): # dont want to pick up too many of these files - # but if there are multiple loops want to produce seperate + # but if there are multiple loops want to produce separate # files for them if not os.path.isfile("{}{}.csv".format(log_file, j + 1)) or j == 99: log_file = "{}{}.csv".format(log_file, j + 1) @@ -1344,9 +1344,9 @@ def runGraph(self, order): order argument in a list of lists of node names. The nodes are run in the order given in the first list followed by the order given in the second list and so on. Information is - transfered between nodes for any active none tear edges + transferred between nodes for any active none tear edges after the completion of each node calculation. If there - is an error in any node this returns immediatly and sets the + is an error in any node this returns immediately and sets the graph error status to indicate error. """ for namelst in order: @@ -1448,7 +1448,7 @@ def nEdges(self, includeTear=True, includeInactive=False): for e in self.edges: if e.tear and not includeTear: ntear += 1 - if not e.acitve and not includeInactive: + if not e.active and not includeInactive: ninactive += 1 return len(self.edges) - ntear - ninactive @@ -1479,7 +1479,7 @@ def adjMatrix( are specified by providing a list of node names and/or a list of edge indexes. - Since the adjacency matrix gives the nodes indexs this + Since the adjacency matrix gives the nodes indexes this function provides a way to get the index form the name or the name from the index. The results returned are @@ -1711,7 +1711,7 @@ def stronglyConnectedSubGraphs( subGraphNodes = {None, []} if none consider all nodes, other wise a list of nodes in a subgraph subGraphEdges = {None, []} if none consider all edges attached at both ends to a node in the subgraph. Otherwise a list of edge indexes in a subgraph only edges - attached at both ends to a node in the subgraph will be inclued. + attached at both ends to a node in the subgraph will be included. Return Value: @@ -1805,7 +1805,7 @@ def selectTear(self): """ This finds optimal sets of tear edges based on two criteria. The primary objective is to minimize the maximum number of - times any cycle is broken. The seconday criteria is to + times any cycle is broken. The secondary criteria is to minimize the number of tears. This function uses a branch and bound type approach. @@ -1814,23 +1814,23 @@ def selectTear(self): are equally good there are often a very large number of equally good tear sets. - Improvemnts for the future. - I think I can imporve the efficency of this, but it is good + Improvements for the future. + I think I can improve the efficiency of this, but it is good enough for now. Here are some ideas for improvement: 1) Reduce the number of redundant solutions. It is possible to find tears sets [1,2] and [2,1]. I eliminate - redundent solutions from the results, but they can - occur and it reduces efficency + redundant solutions from the results, but they can + occur and it reduces efficiency 2) Look at strongly connected components instead of whole graph this would cut back on the size of graph we are looking at. The flowsheets are rearly one strongly - conneted componet. + connected component. 3) When you add an edge to a tear set you could reduce the size of the problem in the branch by only looking at strongly connected components with that edge removed. 4) This returns all equally good optimal tear sets. That may not really be nessicary. For very large flowsheets - There could be an extreemly large number of optimial tear + There could be an extremely large number of optimal tear edge sets. """ @@ -1932,15 +1932,15 @@ def sear(depth, prevY): if y[0][i] == 1: edges.append(i) es.append(edges) - # Log ammount of time required to find tear sets + # Log amount of time required to find tear sets _log.info("Teat steam search, elapsed time: " + str(time.time() - st)) return [es, upperBound[0], upperBound[1]] def tearUpperBound(self): """ This function quickly finds a sub-optimal set of tear - edges. This serves as an inital upperbound when looking - for an optimal tear set. Having an inital upper bound + edges. This serves as an initial upperbound when looking + for an optimal tear set. Having an initial upper bound improves efficenty. This works by constructing a search tree and just makes a @@ -2066,7 +2066,7 @@ def treeOrder(self, adj, adjR, roots=None): a tree the results are not valid. In the returned order, it is sometimes possible for more - than one node to be caclulated at once. So a list of lists + than one node to be calculated at once. So a list of lists is returned by this function. These represent a bredth first search order of the tree. Following the order all nodes that lead to a particular node will be visited diff --git a/foqus_lib/framework/graph/heatIntegration.py b/foqus_lib/framework/graph/heatIntegration.py index 713837bb7..5770f99ca 100644 --- a/foqus_lib/framework/graph/heatIntegration.py +++ b/foqus_lib/framework/graph/heatIntegration.py @@ -150,7 +150,7 @@ def heatIntegrationCalc(node): tags = vars[name].tags # get variable tags blk = blockLookup.get( name, None - ) # get the blocks that a varible is associated with + ) # get the blocks that a variable is associated with if blk != None: if ( blk in heaterSet and "heater" in tags diff --git a/foqus_lib/framework/graph/node.py b/foqus_lib/framework/graph/node.py index 1d814ee73..62b2e377f 100644 --- a/foqus_lib/framework/graph/node.py +++ b/foqus_lib/framework/graph/node.py @@ -186,7 +186,7 @@ def smt_pickle_load(*args, **kwargs): return smt_pickle_load -# attempt to load optional dependenices for node script +# attempt to load optional dependencies for node script # pickle is loaded identically twice so that sklearn and smt can load or fail # independently of each other @@ -263,7 +263,7 @@ def setCodeStrings(self): self.codeString[21] = "Error in Python node script code" self.codeString[23] = "Could not convert numpy value to list" self.codeString[27] = "Can't read variable in results (see log)" - self.codeString[50] = "Node script interupt exception" + self.codeString[50] = "Node script interrupt exception" self.codeString[61] = "Unknow type string" self.codeString[ self.ERROR_CONFIGURATION_MISSING @@ -765,7 +765,7 @@ class Node: """ This class stores information for graph nodes. It also contains function for running a calculations and simulations associated - with a node. The varaibles associated with nodes are all stored + with a node. The variables associated with nodes are all stored at the graph level, so the parent graph of a node needs to be set before running any calculations, so the node knows where to find variables, turbine config info,... @@ -912,7 +912,7 @@ def addTurbineOptions(self): default=1440.0, dtype=float, desc=( - "This is the ammount of time in seconds that FOQUS " + "This is the amount of time in seconds that FOQUS " "should wait for results to come back from Turbine." ), optSet=NodeOptionSets.TURBINE_OPTIONS, @@ -921,7 +921,7 @@ def addTurbineOptions(self): name="Maximum Run Time (s)", default=840.0, desc=( - "This is the ammount of time in seconds that FOQUS " + "This is the amount of time in seconds that FOQUS " "should wait for results to come back from Turbine " "once the simulation starts running." ), @@ -936,7 +936,7 @@ def addTurbineOptions(self): self.options.addIfNew( name="Max Status Check Interval", default=5.0, - desc=("This is the maximum ammount of time between job " "status"), + desc=("This is the maximum amount of time between job " "status"), optSet=NodeOptionSets.TURBINE_OPTIONS, ) self.options.addIfNew( @@ -945,7 +945,7 @@ def addTurbineOptions(self): desc=( "Optional, provide a path to a Trubine config to " "submit models for this node to a alternative Turbine " - "gateway. This can be used for special simualtions." + "gateway. This can be used for special simulations." ), optSet=NodeOptionSets.TURBINE_OPTIONS, ) @@ -1023,7 +1023,7 @@ def loadDict(self, sd): v.loadDict(var) def stringToType(self, s): - # only check start of string since sinter inclued dimensions + # only check start of string since sinter included dimensions # after foqus will pick up dimensions from the default value if s[:6] == "double": return float @@ -1338,19 +1338,19 @@ def runCalc(self, nanout=False): the inputs. First it does the model calculations then any Python post-processing calculations. The model and or the post-processing calculations can be omitted. If - niether are pressent the model will successfully execute + neither are present the model will successfully execute but do nothing. """ self.turbineMessages = "" self.calcError = -1 # set error code to incomplete self.calcCount += 1 self.altInput = None - # raise Exception("Test exeception") + # raise Exception("Test exception") if nanout: # Set all outputs to numpy.nan to avoid confusion about # whether the output value is valid. After successful # completion the nan values will be replaced. May want - # ouput values for initial guess though so I made this + # output values for initial guess though so I made this # optional and disabled for now. Should check node status # instead of depending on nan for vname, var in self.outVars.items(): @@ -1379,7 +1379,7 @@ def runCalc(self, nanout=False): ): self.runPython() # If you made it here and nothing threw an exception or reset - # the error code, the cacluation finished succesfully + # the error code, the calculation finished successfully if self.calcError == -1: self.calcError = 0 @@ -1475,7 +1475,7 @@ def runPython(self): idx ]["value"] except PyCodeInterupt as e: - _logger.error("Node script interupt: " + str(e)) + _logger.error("Node script interrupt: " + str(e)) if self.calcError == -1: # if no error code set go with 50 # otherwise the sim would appear to be successful @@ -1685,7 +1685,7 @@ def runTurbineCalc(self, retry=False): self.turbineMessages = "" else: self.turbineMessages = json.dumps(m) - # single quotes are bad news when trying to instert this into + # single quotes are bad news when trying to insert this into # the TurbineLite database in consumer mode so they gone self.turbineMessages = self.turbineMessages.replace("'", '"') if res and readResults and "Output" in res and res["Output"]: diff --git a/foqus_lib/framework/graph/nodeVars.py b/foqus_lib/framework/graph/nodeVars.py index 1b27153fc..badb8ca53 100644 --- a/foqus_lib/framework/graph/nodeVars.py +++ b/foqus_lib/framework/graph/nodeVars.py @@ -54,9 +54,9 @@ def setCodeStrings(self): self.codeString[0] = "Other exception" self.codeString[2] = "Node does not exist" self.codeString[3] = "Variable does not exist" - self.codeString[5] = "Node name already in use, cannont add" + self.codeString[5] = "Node name already in use, cannot add" self.codeString[6] = "graph is reserved and cannot be used" " as a node name" - self.codeString[7] = "Var name already in use, cannont add" + self.codeString[7] = "Var name already in use, cannot add" class NodeVarList(OrderedDict): @@ -278,7 +278,7 @@ def count(self): def getFlat(self, names, scaled=False): """ - Return a flat list of variable values coresponding to a given list of + Return a flat list of variable values corresponding to a given list of names Args: @@ -303,7 +303,7 @@ def unflatten(self, nameList, valueList, unScale=False): Args: nameList: a list of variable names. names are either node.var or a - two-element list or tupple (node, var) + two-element list or tuple (node, var) valueList: a list of values for the variables unScale: the values are scaled so unscale them before putting in dict """ @@ -517,7 +517,7 @@ def __init__( vmax: max value vdflt: default value unit: string description of units of measure - vst: A sring description of a group for the variable {"user", "sinter"} + vst: A string description of a group for the variable {"user", "sinter"} vdesc: A sentence or so describing the variable tags: List of string tags for the variable dtype: type of data {float, int, str, object} @@ -846,7 +846,7 @@ def __init__( vmax: max value vdflt: default value unit: string description of units of measure - vst: A sring description of a group for the variable {"user", "sinter"} + vst: A string description of a group for the variable {"user", "sinter"} vdesc: A sentence or so describing the variable tags: List of string tags for the variable dtype: type of data {float, int, str, object} diff --git a/foqus_lib/framework/optimizer/BFGS.py b/foqus_lib/framework/optimizer/BFGS.py index d4a126a47..6dacfbbec 100644 --- a/foqus_lib/framework/optimizer/BFGS.py +++ b/foqus_lib/framework/optimizer/BFGS.py @@ -15,7 +15,7 @@ """ #FOQUS_OPT_PLUGIN Optimization plugins need to have the string "#FOQUS_OPT_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the optimization class. * FOQUS optimization plugin for scipy BFGS using finite dif @@ -149,7 +149,7 @@ def f(self, x): objValues, cv, pv = self.prob.runSamples([x], self) if self.stop.isSet(): self.userInterupt = True - raise Exception("User interupt") + raise Exception("User interrupt") obj = float(objValues[0][0]) if obj < self.bestSoFar: self.bestSoFar = obj @@ -229,7 +229,7 @@ def optimize(self): # Print some final words eltime = time.time() - start self.msgQueue.put( - "{0}, Total Elasped Time {1}s, Obj: {2}".format( + "{0}, Total Elapsed Time {1}s, Obj: {2}".format( self.prob.iterationNumber, math.floor(eltime), self.bestSoFar ) ) diff --git a/foqus_lib/framework/optimizer/NLopt.py b/foqus_lib/framework/optimizer/NLopt.py index 55065cf2c..96441e0d4 100644 --- a/foqus_lib/framework/optimizer/NLopt.py +++ b/foqus_lib/framework/optimizer/NLopt.py @@ -15,7 +15,7 @@ """ #FOQUS_OPT_PLUGIN Optimization plugins need to have the string "#FOQUS_OPT_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the optimization class. * FOQUS optimization plugin for NLopt @@ -83,11 +83,11 @@ def __init__(self, dat=None): dat = foqus session object """ optimization.__init__(self, dat) # base class __init__ - self.name = "NLopt" # Plugin name is actually comming from file + self.name = "NLopt" # Plugin name is actually coming from file # name at this point so give file same name # (with a *.py). # Next is the description of the optimization - # Unfortunatly not all the HTML below works + # Unfortunately not all the HTML below works self.methodDescription = ( "\n" ".hangingindent {\n" @@ -108,7 +108,7 @@ def __init__(self, dat=None): self.available = nlopt_available # If plugin is available self.description = "NLopt" # Short description self.mp = False # Can evaluate objectives in parallel? - self.mobj = False # Can do multi-objective optimzation? + self.mobj = False # Can do multi-objective optimization? self.minVars = 2 # Minimum number of decision variables self.maxVars = 10000 # Maximum number of decision variables # @@ -143,7 +143,7 @@ def __init__(self, dat=None): dtype=int, desc=( "Initial Population size for CRS2 or ISRES other " - "methods do not use this paramter (<= 0 for default)" + "methods do not use this parameter (<= 0 for default)" ), ) self.options.add( @@ -253,7 +253,7 @@ def f(self, x, grad): This is the function for the solver to call to get function evaluations. This should run the FOQUS flowsheet also can stick in other dignostic output. Whatever you like. Since - only the DFO solvers are made avalable the grad arg can be + only the DFO solvers are made available the grad arg can be ignored. If there is an exception in here optimization terminates (NLopt behavior). """ @@ -261,10 +261,10 @@ def f(self, x, grad): # because this function can return there results of multiple # evaluations here we just want one. If FOQUS is setup right # this could do function evaluations in parallel (not with NLopt - # because NLopt doesn't suport it)) + # because NLopt doesn't support it)) objValues, cv, pv = self.prob.runSamples([x], self) - # objValues = list of lists of ojective function values - # first list is for mutiple evaluations second list + # objValues = list of lists of objective function values + # first list is for multiple evaluations second list # is for multi-objective. In this case one evaluation # one objective [[obj]]. # cv = constraint violations @@ -272,7 +272,7 @@ def f(self, x, grad): if self.stop.isSet(): # if user pushed stop button self.userInterupt = True - raise Exception("User interupt") # raise exeception to stop + raise Exception("User interrupt") # raise exception to stop obj = float(objValues[0][0]) # get objective # See is objective is better and update best solution found if # so this is used to update the flowsheet, plots, and messages @@ -284,7 +284,7 @@ def f(self, x, grad): # flowsheet display needs updated self.resQueue.put(["BEST", [self.bestSoFar], x]) # else: - # Spit out objective for objective plot coresponding to each function evaluation/iteration + # Spit out objective for objective plot corresponding to each function evaluation/iteration self.resQueue.put(["IT", self.prob.iterationNumber, obj]) # Spit out message to messages window after exery 10 evaluations if not self.prob.iterationNumber % 10: @@ -294,7 +294,7 @@ def f(self, x, grad): # Count iteration, (in this case actually evaluations) self.prob.iterationNumber += 1 # Save flowsheet at certain intervals with best solution so - # far stored. If something bad happes and optimzation stops + # far stored. If something bad happes and optimization stops # at least you will have that. Restart files are not possible # with NLopt, but can do with some solvers. if self.bkp_int > 0.03 and (time.time() - self.bkp_timer) / 3600 > self.bkp_int: @@ -338,7 +338,7 @@ def optimize(self): upper = self.options["upper"].value # These are for scaled vars lower = self.options["lower"].value # usually 0 to 10 not usually # changed but could be - # If upper and/or lower are scalar conver to array with the + # If upper and/or lower are scalar convert to array with the # number of variables. if type(upper) == float or type(upper) == int: upper = upper * numpy.ones(n) @@ -390,11 +390,11 @@ def optimize(self): # The solver is all setup and ready to go start = time.time() # get start time self.userInterupt = False # - self.bestSoFar = float("inf") # set inital best values + self.bestSoFar = float("inf") # set initial best values self.bestSoFarList = [] # List of all previous best so far values # self.bestSoFarList.append(self.bestSoFar) - # self.prob is the optimzation problem. get it ready + # self.prob is the optimization problem. get it ready self.prob.iterationNumber = 0 self.prob.initSolverParameters() # self.prob.solverStart = start @@ -407,12 +407,12 @@ def optimize(self): opt.set_min_objective(self.f) # set the solver objective function self.prob.prep(self) # get problem ready for solving self.bkp_timer = time.time() # timer for flowseet backup - # Run the optimzation + # Run the optimization x = opt.optimize(xinit) - # Print some final words now that optimzation is done. + # Print some final words now that optimization is done. eltime = time.time() - start self.msgQueue.put( - "{0}, Total Elasped Time {1}s, Obj: {2}".format( + "{0}, Total Elapsed Time {1}s, Obj: {2}".format( self.prob.iterationNumber, math.floor(eltime), self.bestSoFar ) ) diff --git a/foqus_lib/framework/optimizer/OptCMA.py b/foqus_lib/framework/optimizer/OptCMA.py index c22e3b5c1..1ce30f0a0 100644 --- a/foqus_lib/framework/optimizer/OptCMA.py +++ b/foqus_lib/framework/optimizer/OptCMA.py @@ -15,14 +15,14 @@ """ #FOQUS_OPT_PLUGIN Optimization plugins need to have the string "#FOQUS_OPT_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the optimization class. * This is an example of an optimization plugin for FOQUS, CMA optimization solver from https://www.lri.fr/~hansen/cmaes_inmatlab.html#python -* This optimiztion plugin is basically just a wrapper for the available +* This optimization plugin is basically just a wrapper for the available CMA code to make it work with FOQUS. -* CMA-ES Refrence: +* CMA-ES Reference: Hansen, N. (2006). The CMA Evolution Strategy: A Comparing Review. In J.A. Lozano, P. Larranga, I. Inza and E. Bengoetxea (eds.). @@ -137,7 +137,7 @@ def __init__(self, dat=None): name="tolstagnation", default=None, desc="stop after this number of iterations without " - "improvment (null solver default, " + "improvement (null solver default, " "100+100*N**1.5/popsize, N = number of variables)", dtype=float, ) @@ -314,7 +314,7 @@ def optimize(self): it = 0 # the iteration index bestSoFar = numpy.array(numpy.inf) # - # Put initial progress message out, jus says no samples have run + # Put initial progress message out, just says no samples have run # and on first iteration (or whatever iteration from restart) # self.resQueue.put(["PROG", 0, popsize, 0, it, 0, 0]) @@ -370,7 +370,7 @@ def optimize(self): # # Create a file that just logs the basic objective function # information, this will give you some performance info - # That can be analized later. + # That can be analyzed later. if objRecFile: with open(objRecFile, "ab") as orf: orf.write( @@ -421,7 +421,7 @@ def optimize(self): eltime = time.time() - start r = es.result # get the results from CMA-ES self.msgQueue.put( - "{0}, Total Elasped Time {1}s, Obj: {2}".format( + "{0}, Total Elapsed Time {1}s, Obj: {2}".format( it, math.floor(eltime), r[1] ) ) @@ -437,7 +437,7 @@ def optimize(self): bkp=False, ) # - # Print out final solver mesages about the results + # Print out final solver messages about the results # if it > 0: r = es.result # get the results from CMA-ES diff --git a/foqus_lib/framework/optimizer/OptSNOBFIT.py b/foqus_lib/framework/optimizer/OptSNOBFIT.py index 4f178c7df..102cd47a6 100644 --- a/foqus_lib/framework/optimizer/OptSNOBFIT.py +++ b/foqus_lib/framework/optimizer/OptSNOBFIT.py @@ -30,7 +30,7 @@ def __init__(self, graph=None): self.optionOrder = [] self.name = "SNOBFIT-NIST" self.available = snobfit_available - self.description = "Python implimentation of SNOBFIT from ..." + self.description = "Python implementation of SNOBFIT from ..." self.mp = False self.mobj = False # add options Name Default Description diff --git a/foqus_lib/framework/optimizer/PSUADE.py b/foqus_lib/framework/optimizer/PSUADE.py index 7bf5c526d..b15a874e3 100644 --- a/foqus_lib/framework/optimizer/PSUADE.py +++ b/foqus_lib/framework/optimizer/PSUADE.py @@ -15,7 +15,7 @@ """ #FOQUS_OPT_PLUGIN Optimization plugins need to have the string "#FOQUS_OPT_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the optimization class. """ @@ -79,7 +79,7 @@ def __init__(self, dat=None): "

PSUADE Optimiation Library

" ) self.available = True - self.description = "PSUADE Optimzation solvers" + self.description = "PSUADE Optimization solvers" self.mp = False # can be parallel? self.mobj = False # handles multiobjective? self.minVars = 2 # minimum number of decision variables diff --git a/foqus_lib/framework/optimizer/SLSQP.py b/foqus_lib/framework/optimizer/SLSQP.py index 200df80e7..cafad664e 100644 --- a/foqus_lib/framework/optimizer/SLSQP.py +++ b/foqus_lib/framework/optimizer/SLSQP.py @@ -15,7 +15,7 @@ """ #FOQUS_OPT_PLUGIN Optimization plugins need to have the string "#FOQUS_OPT_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the optimization class. * FOQUS optimization plugin for scipy SLSQP using finite dif @@ -146,7 +146,7 @@ def f(self, x): objValues, cv, pv = self.prob.runSamples([x], self) if self.stop.isSet(): self.userInterupt = True - raise Exception("User interupt") + raise Exception("User interrupt") obj = float(objValues[0][0]) if obj < self.bestSoFar: self.bestSoFar = obj @@ -226,7 +226,7 @@ def optimize(self): # Print some final words eltime = time.time() - start self.msgQueue.put( - "{0}, Total Elasped Time {1}s, Obj: {2}".format( + "{0}, Total Elapsed Time {1}s, Obj: {2}".format( self.prob.iterationNumber, math.floor(eltime), self.bestSoFar ) ) diff --git a/foqus_lib/framework/optimizer/SM_Optimizer.py b/foqus_lib/framework/optimizer/SM_Optimizer.py index 6f9ff5d14..89981bf4e 100644 --- a/foqus_lib/framework/optimizer/SM_Optimizer.py +++ b/foqus_lib/framework/optimizer/SM_Optimizer.py @@ -15,7 +15,7 @@ """ #FOQUS_OPT_PLUGIN Optimization plugins need to have the string "#FOQUS_OPT_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the optimization class. * FOQUS optimization plugin for Surrogate Based Optimization in Pyomo @@ -129,7 +129,7 @@ def __init__(self, dat=None): self.available = packages_available # If plugin is available self.description = "Optimization Solver" # Short description self.mp = False # Can evaluate objectives in parallel? - self.mobj = False # Can do multi-objective optimzation? + self.mobj = False # Can do multi-objective optimization? self.minVars = 1 # Minimum number of decision variables self.maxVars = 10000 # Maximum number of decision variables @@ -285,11 +285,11 @@ def f(self, x): if self.stop.isSet(): # if user pushed stop button self.userInterupt = True - raise Exception("User interupt") # raise exeception to stop + raise Exception("User interrupt") # raise exception to stop objValues, cv, pv = self.prob.runSamples([x], self) # objValues = list of lists of objective function values - # first list is for mutiple evaluations second list + # first list is for multiple evaluations second list # is for multi-objective. In this case one evaluation # one objective [[obj]]. # cv = constraint violations @@ -345,9 +345,9 @@ def optimize(self): # The solver is all setup and ready to go start = time.time() # get start time self.userInterupt = False # - self.bestSoFar = float("inf") # set inital best values + self.bestSoFar = float("inf") # set initial best values - # self.prob is the optimzation problem. get it ready + # self.prob is the optimization problem. get it ready self.prob.iterationNumber = 0 self.prob.initSolverParameters() # self.prob.solverStart = start diff --git a/foqus_lib/framework/optimizer/Sample.py b/foqus_lib/framework/optimizer/Sample.py index 3641bbbf3..bd9695f59 100644 --- a/foqus_lib/framework/optimizer/Sample.py +++ b/foqus_lib/framework/optimizer/Sample.py @@ -15,7 +15,7 @@ """ #FOQUS_OPT_PLUGIN Optimization plugins need to have the string "#FOQUS_OPT_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the optimization class. * Just evaluates the objective function for flowsheet results and picks the best @@ -60,7 +60,7 @@ def __init__(self, dat=None): self.methodDescription = ( "This plugin just runs samples evaluetes all the flowsheet " "samples and picks out the best one. If any samples have " - "not been evaluted (status -1), they will be evaluted. " + "not been evaluated (status -1), they will be evaluated. " "This works with the currently selected data filter, and " "is mostly used for testing." ) @@ -106,7 +106,7 @@ def optimize(self): bestRes = i self.msgQueue.put("Running {0} samples".format(len(rerunSamp))) err = 0 - # now rerun samples that were not alreay run + # now rerun samples that were not already run self.resQueue.put(["PROG", 0, len(rerunSamp), 0, 0, 0, 0]) timeOfBackup = time.process_time() if len(rerunSamp) > 0: @@ -140,7 +140,7 @@ def optimize(self): ] ) # back up if its time. Don't back up for intervals - # of less than 15 seconds, because that setting dosen't + # of less than 15 seconds, because that setting doesn't # make sense even 15 seconds is crazy. timeSinceBackup = time.process_time() - timeOfBackup if backupInt > 15.0 and timeSinceBackup > backupInt: diff --git a/foqus_lib/framework/optimizer/Snobfit.py b/foqus_lib/framework/optimizer/Snobfit.py index 7c4b08dfd..10584e746 100644 --- a/foqus_lib/framework/optimizer/Snobfit.py +++ b/foqus_lib/framework/optimizer/Snobfit.py @@ -15,7 +15,7 @@ """ #FOQUS_OPT_PLUGIN Optimization plugins need to have the string "#FOQUS_OPT_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the optimization class. * FOQUS optimization plugin for Snobfit @@ -87,7 +87,7 @@ def __init__(self, dat=None): dat = foqus session object """ optimization.__init__(self, dat) # base class __init__ - self.name = "Snobfit" # Plugin name is actually comming from file + self.name = "Snobfit" # Plugin name is actually coming from file # name at this point so give file same name # (with a *.py). # Next is the description of the optimization @@ -107,7 +107,7 @@ def __init__(self, dat=None): self.available = snobfit_available # If plugin is available self.description = "Optimization Solver" # Short description self.mp = False # Can evaluate objectives in parallel? - self.mobj = False # Can do multi-objective optimzation? + self.mobj = False # Can do multi-objective optimization? self.minVars = 2 # Minimum number of decision variables self.maxVars = 10000 # Maximum number of decision variables @@ -187,7 +187,7 @@ def f(self, x): This is the function for the solver to call to get function evaluations. This should run the FOQUS flowsheet also can stick in other dignostic output. Whatever you like. Since - only the DFO solvers are made avalable the grad arg can be + only the DFO solvers are made available the grad arg can be ignored. """ # run the flowsheet at point x. X is turned into a list there @@ -197,7 +197,7 @@ def f(self, x): objValues, cv, pv = self.prob.runSamples([x], self) # objValues = list of lists of objective function values - # first list is for mutiple evaluations second list + # first list is for multiple evaluations second list # is for multi-objective. In this case one evaluation # one objective [[obj]]. # cv = constraint violations @@ -205,7 +205,7 @@ def f(self, x): if self.stop.isSet(): # if user pushed stop button self.userInterupt = True - raise Exception("User interupt") # raise exeception to stop + raise Exception("User interrupt") # raise exception to stop obj = float(objValues[0][0]) # get objective @@ -228,7 +228,7 @@ def f(self, x): # Count iteration, (in this case actually evaluations) self.prob.iterationNumber += 1 # Save flowsheet at certain intervals with best solution so - # far stored. If something bad happes and optimzation stops + # far stored. If something bad happes and optimization stops # at least you will have that. # best solution of flowsheet saved @@ -253,7 +253,7 @@ def optimize(self): This is the main optimization routine. This gets called to start things up. """ - # giving the initalization to the snobfit solver + # giving the initialization to the snobfit solver xinit = numpy.array([]) # Display a little information to check that things are working @@ -287,9 +287,9 @@ def optimize(self): # The solver is all setup and ready to go start = time.time() # get start time self.userInterupt = False # - self.bestSoFar = float("inf") # set inital best values + self.bestSoFar = float("inf") # set initial best values - # self.prob is the optimzation problem. get it ready + # self.prob is the optimization problem. get it ready self.prob.iterationNumber = 0 self.prob.initSolverParameters() # self.prob.solverStart = start @@ -326,7 +326,7 @@ def optimize(self): # ********* eltime = time.time() - start self.msgQueue.put( - "{0}, Total Elasped Time {1}s, Obj: {2}, xbest: {3}".format( + "{0}, Total Elapsed Time {1}s, Obj: {2}, xbest: {3}".format( self.prob.iterationNumber, math.floor(eltime), self.bestSoFar, diff --git a/foqus_lib/framework/optimizer/problem.py b/foqus_lib/framework/optimizer/problem.py index c361dede7..53364c5f6 100644 --- a/foqus_lib/framework/optimizer/problem.py +++ b/foqus_lib/framework/optimizer/problem.py @@ -130,7 +130,7 @@ def saveDict(self): def loadDict(self, sd): """ - Load the optimization problem from a dictionary. Usualy + Load the optimization problem from a dictionary. Usually used when reading a problem back in from a json file. """ self.obj = [] @@ -231,7 +231,7 @@ def numSamples(self): def addSampleVar(self, vname): """ Adds a variable to the sample dict, not to the sample var - list (self.vs). I keep track of samples for varaibles that + list (self.vs). I keep track of samples for variables that are not sample variables just in case the user changes their mind about the set of sample variables. All the defined samples won't be lost. @@ -254,7 +254,7 @@ def runSamples(self, X, slv): """Runs the flowsheet samples for the objective calculation Args: - X: a list of flat vector of descision variable values. + X: a list of flat vector of decision variable values. The variableordering is given by the list self.v gr: is the graph (flowsheet) object that will be used to run the samples @@ -322,7 +322,7 @@ def runSamples(self, X, slv): # if it is the last time through because the thread is # no longer alive make sure to read the last of the # results, the finished counter goes up before the - # job results are retrived from turbine + # job results are retrieved from turbine finished = status["finished"] # Put out progress monitor message to queue slv.resQueue.put( @@ -521,7 +521,7 @@ def calculateObjSimpExp(self, x, f, failVec): else: vi = eval(o.pycode, locals()) if vi <= 0: - # if vi is negitive no constraint violation so set + # if vi is negative no constraint violation so set # vi to 0 for zero penalty vi = 0 # calculate penalty @@ -534,7 +534,7 @@ def calculateObjSimpExp(self, x, f, failVec): penTotal += pen const_e.append(pen) # Evaluate objective functions there may be more than one - # this is to accomidate multi-objective optimization + # this is to accommodate multi-objective optimization for o in self.obj: if fail: objfunc = o.fail @@ -618,7 +618,7 @@ def check(self, graph, minVars=2, maxVars=1000, mustScale=True): # for o in self.g: # try: # exec(o.pycode) - # violoation + 1.0 + # violation + 1.0 # except Exception, e: # return [ # 1, diff --git a/foqus_lib/framework/plugins/pluginSearch.py b/foqus_lib/framework/plugins/pluginSearch.py index ab1405020..bdf64c1cf 100644 --- a/foqus_lib/framework/plugins/pluginSearch.py +++ b/foqus_lib/framework/plugins/pluginSearch.py @@ -15,9 +15,9 @@ """ pluginSearch.py * This class looks for plugins and creates a dictionary containing. - the plugin models. Plugin objects can be instanciated elsewhere. + the plugin models. Plugin objects can be instantiated elsewhere. The plugins are identified by a certain string contained in the - first x charcters of the python file. Plugins should have a .py + first x characters of the python file. Plugins should have a .py extension. John Eslick, Carnegie Mellon University, 2014 diff --git a/foqus_lib/framework/pymodel/heat_integration.py b/foqus_lib/framework/pymodel/heat_integration.py index 507adb85c..0a200e3be 100644 --- a/foqus_lib/framework/pymodel/heat_integration.py +++ b/foqus_lib/framework/pymodel/heat_integration.py @@ -273,7 +273,7 @@ def run(self): tags = vars[name].tags # get variable tags blk = blockLookup.get( name, None - ) # get the blocks that a varible is associated with + ) # get the blocks that a variable is associated with if blk != None: if ( blk in heaterSet and "heater" in tags @@ -486,9 +486,9 @@ def run(self): numpy.power((1.0 + ROR / 100.0), lifeOpe) / lifeOpe ) # annualized factor for the capital cost - coeff_a = 10000.0 # capital cost coefficent a - coeff_b = 800.0 # capital cost coefficent b - coeff_c = 0.8 # capital cost coefficent c + coeff_a = 10000.0 # capital cost coefficient a + coeff_b = 800.0 # capital cost coefficient b + coeff_c = 0.8 # capital cost coefficient c # heat integration information for feed water heaters feedSet = set(["FH1", "FH2", "FH3", "FH4", "FH5"]) # set of feed water heaters diff --git a/foqus_lib/framework/pymodel/pymodel.py b/foqus_lib/framework/pymodel/pymodel.py index 4605a8eef..cd07ff6cf 100644 --- a/foqus_lib/framework/pymodel/pymodel.py +++ b/foqus_lib/framework/pymodel/pymodel.py @@ -21,7 +21,7 @@ class pymodel: def __init__(self): self.inputs = OrderedDict() self.outputs = OrderedDict() - self.status = -1 # Caclulation status code + self.status = -1 # Calculation status code self.description = "A Python model plugin" self.node = None diff --git a/foqus_lib/framework/pymodel/steam_cycle.py b/foqus_lib/framework/pymodel/steam_cycle.py index 8da64a76d..c5483973d 100644 --- a/foqus_lib/framework/pymodel/steam_cycle.py +++ b/foqus_lib/framework/pymodel/steam_cycle.py @@ -53,7 +53,7 @@ def __init__(self): tags=[], dtype=float, ) # if dtype is not specified the type is taken - # from the default vaule. + # from the default value. self.inputs["Net.Efficiency"] = NodeVars( value=42.06, vmin=0.0, diff --git a/foqus_lib/framework/sampleResults/results.py b/foqus_lib/framework/sampleResults/results.py index c33ce864a..53c90b3a6 100644 --- a/foqus_lib/framework/sampleResults/results.py +++ b/foqus_lib/framework/sampleResults/results.py @@ -184,7 +184,7 @@ def search_term_list(st): ) raise Exception( "Error reading sort terms. When using multiple sort" - 'terms, enclose the column names in "". See log for deatils' + 'terms, enclose the column names in "". See log for details' ) else: if st.startswith('"'): @@ -211,12 +211,12 @@ def __init__(self, *args, **kwargs): super(Results, self).__init__(*args, **kwargs) if "set" not in self.columns: self.filters = None # do this to avoid set column from attribute warn - self.filters = {} # now that atribute exists set to empty dict + self.filters = {} # now that attribute exists set to empty dict self.filters["none"] = dataFilter(no_results=True) self.filters["all"] = dataFilter() self._current_filter = None self._filter_indexes = None # avoid set column from attribute warn - self._filter_indexes = [] # now that atribute exists set to empty list + self._filter_indexes = [] # now that attribute exists set to empty list self.flatTable = None # avoid set column from attribute warn self.flatTable = True self["set"] = [] @@ -396,7 +396,7 @@ def data_sets(self): return set(self.loc[:, "set"]) def addFromSavedValues(self, setName, name, time=None, valDict=None): - """Temoprary function for compatablility + """Temoprary function for compatibility should move to add_result() """ self.add_result(valDict, set_name=setName, result_name=name, time=time) @@ -508,7 +508,7 @@ def eval_add_result(self, data, set_name="default", result_name="res", time=None self.update_filter_indexes() def exportVarsCSV(self, file, inputs, outputs, flat=True): - # flat isn't used, just there for compatablility from when there were vector vars. + # flat isn't used, just there for compatibility from when there were vector vars. df = pd.DataFrame(columns=inputs + outputs) for c in inputs: df[c] = self["input." + c] diff --git a/foqus_lib/framework/session/session.py b/foqus_lib/framework/session/session.py index 4c75677c7..85c86e076 100644 --- a/foqus_lib/framework/session/session.py +++ b/foqus_lib/framework/session/session.py @@ -16,7 +16,7 @@ * Some functions to setup FOQUS environment * Class to store FOQUS session information -* Class for genral FOQUS settings +* Class for general FOQUS settings John Eslick, Carnegie Mellon University, 2014 """ @@ -194,7 +194,7 @@ def __init__(self, useCurrentWorkingDir=False): """ self.flowsheet = None # Get to the general foqus settings through the FOQUS session, - # but the setting are stored in a seperate file not in the + # but the setting are stored in a separate file not in the # FOQUS session file. Its just here to make things easier, # since general FOQUS settings where a late addition. self.foqusSettings = generalSettings() @@ -373,10 +373,10 @@ def loadMLAIModels(self): def saveFlowsheetValues(self, filename, indent=0): """ - Save only the values of flowsheet varaibles to a json file + Save only the values of flowsheet variables to a json file This is mostly for running flowsheets from the command line, where you already loaded a session, and you don't need all - the other junk in a sesssion file. The values file is much + the other junk in a session file. The values file is much smaller. """ with open(filename, "w") as f: @@ -387,10 +387,10 @@ def saveFlowsheetValues(self, filename, indent=0): def loadFlowsheetValues(self, filename): """ - Load only the values of flowsheet varaibles to a json file + Load only the values of flowsheet variables to a json file This is mostly for running flowsheets from the command line, where you already loaded a session, and you don't need all - the other junk in a sesssion file. The values file is much + the other junk in a session file. The values file is much smaller. """ with open(filename, "r") as f: @@ -752,15 +752,15 @@ class generalSettings: 2) The settings file in the working directory overrides the main settings file. This is foqus.cfg in the working - direcotry. The option to override settings by storing a + directory. The option to override settings by storing a settings file in the working directory is mainly to allow multiple copies of FOQUS to run at the same time without - haveing conficts if the user wants to change settings. + having conflicts if the user wants to change settings. The reason the main settings file exists is for starting FOQUS from the Windows start menu. It provide the working directory to use. If you want to run more than one copy of FOQUS at a - time it is best to start addtional copies from the command line + time it is best to start additional copies from the command line specifying the working directory as a command line option. """ @@ -864,13 +864,13 @@ def checkRecentlyOpenedFiles(self): def getRecentlyOpendFiles(self): """ Just returns the list of files. This is here in case - we deside to add some validation step. + we decide to add some validation step. """ return self.recentlyOpenedFiles def settingsNormpath(self): """ - Make sure all the seperators match and go the right way for + Make sure all the separators match and go the right way for the OS """ if self.working_dir: @@ -916,7 +916,7 @@ def loadDict(self, sd, sdLocal, useCurrentWorkingDir=False, logging=True): """ Load the settings from a dictionary, and apply them some setting changes may require a FOQUS restart though and - are handeled when FOQUS starts. + are handled when FOQUS starts. """ curWdir = os.getcwd() for att in self.directCopy: # reads settings from appdata @@ -954,7 +954,7 @@ def save(self, ignoreWDirSetting=False, newWdir=False): the $HOME or %APPDATA% location regaurdless of the setting to save the options in the working directory. this allows FOQUS to create a main settings file if - it doesn't exist. Asside from that the + it doesn't exist. Aside from that the ignoreWDirSetting argument is pretty useless """ d = self.saveDict(newWdir=newWdir) diff --git a/foqus_lib/framework/sim/turbineConfiguration.py b/foqus_lib/framework/sim/turbineConfiguration.py index ad83c84a8..20d2cf740 100644 --- a/foqus_lib/framework/sim/turbineConfiguration.py +++ b/foqus_lib/framework/sim/turbineConfiguration.py @@ -132,7 +132,7 @@ def setCodeStrings(self): self.codeString[14] = "Gateway 400 bad request" self.codeString[15] = "Gateway 500 server error" self.codeString[151] = "Could not start Turbine consumer" - self.codeString[152] = "Cound not get consumer ID" + self.codeString[152] = "Could not get consumer ID" self.codeString[153] = ( "Will not start consumer for non-Lite Turbine, check local" " Turbine config file." @@ -525,7 +525,7 @@ def retryFunction(self, maxTries, waitTime, waitPow, function, *args, **kwargs): ordered and keyword arguments for the function. """ # Only retry on errors I expect could possibly resolve with time - # (could be caused by a temprary network/sever problem) + # (could be caused by a temporary network/sever problem) retryList = self.retryErrors # actually I gave up on this, there # are too many weird unexpected # errors that work on second attempt @@ -771,7 +771,7 @@ def getSessionList(self): # except Exception as e: # raise TurbineInterfaceEx( # code=0, - # msg="Error getting session staus. ", + # msg="Error getting session status. ", # e=e, # tb=traceback.format_exc(), # ) @@ -942,7 +942,7 @@ def getJobStatus(self, jobID, verbose=False, suppressLog=False): ) def simResourceList(self, sim): - """Get a list of resources for a simualtion""" + """Get a list of resources for a simulation""" kw = {} cp = self.turbineConfigParse() url, auth, params = read_configuration(cp, _tsim.SECTION, **kw) @@ -1042,13 +1042,13 @@ def monitorJob( res = None state = "submit" # initial state of the job failedStates = ["error", "expired", "cancel", "terminate"] - succesStates = ["success", "warning"] + successStates = ["success", "warning"] while True: # start status checking loop # wait checkInt seconds wait before checking first time, # probably started the job, and it won't finish instantly time.sleep(checkInt) # Check that consumer is still running, had trouble with it - # stopping for unknwn reasons, so I'll keep an eye on it. + # stopping for unknown reasons, so I'll keep an eye on it. if checkConsumer: proc = self.checkConsumer(nodeName) if proc == None: @@ -1076,7 +1076,7 @@ def monitorJob( ): state = "error" failure = state in failedStates - success = state in succesStates + success = state in successStates # Check for the run start time instead of the state just # in case job started and completed between checks if not setupStart and state == "setup": @@ -1206,7 +1206,7 @@ def getModelFileFromSinterConfigDict(self, sinterConfData): app = "foqus" modelFile = (None, app) # WHY the undefined-variable errors reported by pylint look like true positive - # this suggests that the code branches where the underfined variables are used are not run + # this suggests that the code branches where the undefined variables are used are not run else: # if no model file found it is probably not a sinter # configuration file or FOQUS is out of sync with @@ -1260,7 +1260,7 @@ def sinterConfigGetResource(self, sinterConfigPath, checkExists=True): # type and make sure it matches the resource type in the sinter # configuration file. app, resourceType = self.getAppByExtension(modelFile) - # Now get anyother extra input files + # Now get any other extra input files other = sinterConfData.get("input-files", []) return (modelFile, resourceType, app, other) diff --git a/foqus_lib/framework/sim/turbineLiteDB.py b/foqus_lib/framework/sim/turbineLiteDB.py index 4ba8eec3d..30fcd998a 100644 --- a/foqus_lib/framework/sim/turbineLiteDB.py +++ b/foqus_lib/framework/sim/turbineLiteDB.py @@ -409,7 +409,7 @@ def job_save_output(self, jobGuid, workingDir, rc=0): """ Turbine Consumer Function --- - Put job output in the databae + Put job output in the database args diff --git a/foqus_lib/framework/surrogate/ACOSSO.py b/foqus_lib/framework/surrogate/ACOSSO.py index 1ba9cbf61..d455b2ce6 100644 --- a/foqus_lib/framework/surrogate/ACOSSO.py +++ b/foqus_lib/framework/surrogate/ACOSSO.py @@ -15,11 +15,11 @@ """ #FOQUS_SURROGATE_PLUGIN Surrogate plugins need to have the string "#FOQUS_SURROGATE_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the surrogate class. * Plugin wprapper for the ACOSSO surrogate model builer. -* ACOSSO is excuted in R and a working R install with the quadprog +* ACOSSO is executed in R and a working R install with the quadprog package is required. The user must install R * ACOSSO Ref: diff --git a/foqus_lib/framework/surrogate/ALAMO.py b/foqus_lib/framework/surrogate/ALAMO.py index c444d2924..5513bfe87 100644 --- a/foqus_lib/framework/surrogate/ALAMO.py +++ b/foqus_lib/framework/surrogate/ALAMO.py @@ -15,7 +15,7 @@ """ #FOQUS_SURROGATE_PLUGIN Surrogate plugins need to have the string "#FOQUS_SURROGATE_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the surrogate class. * This is an example of a surrogate model builder plugin for FOQUS, @@ -175,7 +175,7 @@ def __init__(self, dat=None): default=0, dtype=int, desc="Number of data points to be generated by sampling before any model is built.", - hint="These points will be used for model builing along with the NDATA points specified by the user. NSAMPLE must be a nonnegative integer.", + hint="These points will be used for model building along with the NDATA points specified by the user. NSAMPLE must be a nonnegative integer.", ) self.options.add( name="MAXSIM", @@ -256,7 +256,7 @@ def __init__(self, dat=None): name="LOGFCNS", section="Model Settings", default=True, - desc="Logarithimic functions are considered as basis " + desc="Logarithmic functions are considered as basis " "functions if true; otherwise, they are not considered.", ) self.options.add( @@ -701,8 +701,8 @@ def writeAlamoInputFile( else: maxiter = self.options["MAXITER"].value # Number f input and output variables - nin = self.nInput() - nout = self.nOutput() + n_in = self.nInput() + n_out = self.nOutput() # Filter for initial data dataFilter = self.options["Initial Data Filter"].value # filter for validation data @@ -755,7 +755,7 @@ def writeAlamoInputFile( val[i] = "{0} {1}".format(ii + 1, c) customcon.extend(val) # Replace periods with underscore in variable labels for ALAMO - # period is not okay for gams so someimes casues problem in ALAMO + # period is not okay for gams so someimes causes problem in ALAMO self.xListNP = copy.copy(self.xList) self.zListNP = copy.copy(self.zList) self.xList2 = copy.copy(self.xList) # xlist, node names removed if possible @@ -811,8 +811,8 @@ def writeAlamoInputFile( af.write("simulator {}\n".format(adaptiveExe)) af.write("#simin input.txt\n") af.write("#simout output.txt\n") - af.write("ninputs {0}\n".format(nin)) - af.write("noutputs {0}\n".format(nout)) + af.write("ninputs {0}\n".format(n_in)) + af.write("noutputs {0}\n".format(n_out)) # write the min vector self.minVals = [] for x in self.input: @@ -928,9 +928,9 @@ def writeAlamoInputFile( res.set_filter(dataFilter) if res.count_rows(filtered=True) > 0: af.write("\nBEGIN_DATA\n") - # reset filter to intial data set + # reset filter to initial data set for i in res.get_indexes(filtered=True): - line = [0] * (nin + nout) + line = [0] * (n_in + n_out) p = 0 for j, vname in enumerate(self.input): line[p] = res["input.{}".format(vname)][i] @@ -949,7 +949,7 @@ def writeAlamoInputFile( # Reset data filter to validation set res.set_filter(validFilter) for i in res.get_indexes(filtered=True): - line = [0] * (nin + nout) + line = [0] * (n_in + n_out) p = 0 for j, vname in enumerate(self.input): line[p] = res["input.{}".format(vname)][i] @@ -1132,7 +1132,7 @@ def writepyomostandalonefile(self): with open(os.path.join("user_plugins", file_name3), "w") as f: f.write("# This file is meant for standalone use.\n") - f.write("# Surrogate Model based Optimizaton.\n") + f.write("# Surrogate Model based Optimization.\n") f.write("from pyomo.environ import *\n") f.write("from pyomo.opt import SolverFactory\n") f.write("from pyomo.core.kernel.component_set import ComponentSet\n") diff --git a/foqus_lib/framework/surrogate/BSS-ANOVA.py b/foqus_lib/framework/surrogate/BSS-ANOVA.py index 12d081d05..c00c0b5f5 100644 --- a/foqus_lib/framework/surrogate/BSS-ANOVA.py +++ b/foqus_lib/framework/surrogate/BSS-ANOVA.py @@ -15,11 +15,11 @@ """ #FOQUS_SURROGATE_PLUGIN Surrogate plugins need to have the string "#FOQUS_SURROGATE_PLUGIN" near the -begining of the file (see pluginSearch.plugins() for exact character count of +beginning of the file (see pluginSearch.plugins() for exact character count of text). They also need to have a .py extension and inherit the surrogate class. * Plugin wrapper for the BSS-ANOVA surrogate model builer. -* BSS-ANOVA is excuted in R and a working R install with the quadprog +* BSS-ANOVA is executed in R and a working R install with the quadprog package is required. The user must install R * BSS-ANOVA Ref: @@ -157,7 +157,7 @@ def __init__(self, dat=None): name="Burn In", default=0, dtype=int, - desc="Number of data point to ignore from begining", + desc="Number of data point to ignore from beginning", ) self.options.add( name="MCMC Iterations", diff --git a/foqus_lib/framework/surrogate/acosso/acosso_fit.R b/foqus_lib/framework/surrogate/acosso/acosso_fit.R index 48574d536..a890a0de7 100644 --- a/foqus_lib/framework/surrogate/acosso/acosso_fit.R +++ b/foqus_lib/framework/surrogate/acosso/acosso_fit.R @@ -14,7 +14,7 @@ acosso <- function(X, y, order=2, wt.pow=1, cv='bic', w, lambda.0, gcv.pen=1.01, ## wt.pow - the weights used in the adaptive penalty are ||P^j||^{-wt.pow} ## wt.pow=0 is the COSSO ## cv - the method used to select the tuning parameter M from the ACOSSO -## paper. (the tuning paramter is actually called K in this code). +## paper. (the tuning parameter is actually called K in this code). ## Options are '5cv', 'gcv', and 'bic', or a numeric value to use ## for M ## w - optional vector to use for w (only used if 'cv' is numeric) diff --git a/foqus_lib/framework/surrogate/surrogate.py b/foqus_lib/framework/surrogate/surrogate.py index 4de209f81..2b3a13945 100644 --- a/foqus_lib/framework/surrogate/surrogate.py +++ b/foqus_lib/framework/surrogate/surrogate.py @@ -112,7 +112,7 @@ def setInputVarOption(self, opt, var, val=None): """ Set input variable specific option. If option doesn't exist returns none. If variables doesn't exist set/return default - If val is set and option exists returs val. + If val is set and option exists returns val. opt: string option name var: string variable name val: value to set if none use default @@ -129,7 +129,7 @@ def setOutputVarOption(self, opt, var, val=None): """ Set output variable specific option. If option doesn't exist returns none. If variables doesn't exist set/return default - If val is set and option exists returs val. + If val is set and option exists returns val. opt: string option name var: string variable name val: value to set if none use default diff --git a/foqus_lib/framework/uq/Common.py b/foqus_lib/framework/uq/Common.py index a11ae4a16..8893c4d0f 100644 --- a/foqus_lib/framework/uq/Common.py +++ b/foqus_lib/framework/uq/Common.py @@ -68,7 +68,7 @@ def showError(self, error, out=None): @staticmethod def getPsuadePath(): ### OBSOLETE in this release - # Brenda's version of getPsuadePath(), superceded by LocalExecutionModule.getPsuadePath() + # Brenda's version of getPsuadePath(), superseded by LocalExecutionModule.getPsuadePath() fname = os.getcwd() + os.path.sep + "PSUADEPATH" if not os.path.exists(fname): error = "%s does not exist." % fname diff --git a/foqus_lib/framework/uq/ExperimentalDesign.py b/foqus_lib/framework/uq/ExperimentalDesign.py index 6c624cc0a..bcae226fe 100644 --- a/foqus_lib/framework/uq/ExperimentalDesign.py +++ b/foqus_lib/framework/uq/ExperimentalDesign.py @@ -77,7 +77,7 @@ def createPsuadeInFile(data, filename, includePDF=True): outf.write("OUTPUT\n") if data.getNumOutputs() == 0: outf.write(" dimension = 1\n") - names = ["ghostOuput"] + names = ["ghostOutput"] indices = list(range(1)) for i, name in zip(indices, names): outf.write(" variable %d %s\n" % (i + 1, name)) diff --git a/foqus_lib/framework/uq/RSAnalyzer.py b/foqus_lib/framework/uq/RSAnalyzer.py index f5f7c5f1d..9810abfe7 100644 --- a/foqus_lib/framework/uq/RSAnalyzer.py +++ b/foqus_lib/framework/uq/RSAnalyzer.py @@ -456,7 +456,7 @@ def validateRS( if platform.system() == "Windows": userRegressionFile = win32api.GetShortPathName(userRegressionFile) f.write("%s\n" % userRegressionFile) # driver file - f.write("y\n") # apply auxillary arg (output name) + f.write("y\n") # apply auxiliary arg (output name) outVarNames = data.getOutputNames() outName = outVarNames[y - 1] outName = Common.getUserRegressionOutputName( @@ -811,7 +811,7 @@ def pointEval( if platform.system() == "Windows": userRegressionFile = win32api.GetShortPathName(userRegressionFile) f.write("%s\n" % userRegressionFile) # driver file - f.write("y\n") # apply auxillary arg (output name) + f.write("y\n") # apply auxiliary arg (output name) outVarNames = data.getOutputNames() outName = outVarNames[y - 1] if data.getNamesIncludeNodes(): @@ -922,7 +922,7 @@ def performUA( if platform.system() == "Windows": userRegressionFile = win32api.GetShortPathName(userRegressionFile) f.write("%s\n" % userRegressionFile) # driver file - f.write("y\n") # apply auxillary arg (output name) + f.write("y\n") # apply auxiliary arg (output name) outVarNames = data.getOutputNames() outName = outVarNames[y - 1] outName = Common.getUserRegressionOutputName( @@ -1171,7 +1171,7 @@ def performAEUA( if platform.system() == "Windows": userRegressionFile = win32api.GetShortPathName(userRegressionFile) f.write("%s\n" % userRegressionFile) # driver file - f.write("y\n") # apply auxillary arg (output name) + f.write("y\n") # apply auxiliary arg (output name) outVarNames = data.getOutputNames() outName = outVarNames[y - 1] outName = Common.getUserRegressionOutputName( @@ -1342,7 +1342,7 @@ def performSA( if platform.system() == "Windows": userRegressionFile = win32api.GetShortPathName(userRegressionFile) f.write("%s\n" % userRegressionFile) # driver file - f.write("y\n") # apply auxillary arg (output name) + f.write("y\n") # apply auxiliary arg (output name) outName = outVarNames[y - 1] outName = Common.getUserRegressionOutputName( outName, userRegressionFile, data diff --git a/foqus_lib/framework/uq/RSInference.py b/foqus_lib/framework/uq/RSInference.py index 57b3b0f0e..e719264b3 100644 --- a/foqus_lib/framework/uq/RSInference.py +++ b/foqus_lib/framework/uq/RSInference.py @@ -498,7 +498,7 @@ def infer( if platform.system() == "Windows": driverFile = win32api.GetShortPathName(driverFile) f.write("%s\n" % driverFile) # driver file - f.write("y\n") # apply auxillary arg (output index) + f.write("y\n") # apply auxiliary arg (output index) arg = userRegressionArgs[i] if isinstance(arg, int): formatString = "%d\n" @@ -543,7 +543,7 @@ def infer( f.write("3\n") # number of MCMC chains; default = 3 f.write( "1.05\n" - ) # PSRF (convergence metric for MCMC) thershold; default = 1.05 + ) # PSRF (convergence metric for MCMC) threshold; default = 1.05 f.write("quit\n") f.seek(0) diff --git a/foqus_lib/framework/uq/SampleData.py b/foqus_lib/framework/uq/SampleData.py index 401a74c60..3e7b89de4 100644 --- a/foqus_lib/framework/uq/SampleData.py +++ b/foqus_lib/framework/uq/SampleData.py @@ -57,7 +57,7 @@ setSampleFileName(name): Set the name of the file from which to sample. - This is to accomodate the S distribution type in psuade + This is to accommodate the S distribution type in psuade getSampleFileName(): Get the name of the file that was sampled diff --git a/foqus_lib/framework/uq/Visualizer.py b/foqus_lib/framework/uq/Visualizer.py index eacc0701a..e7277ef6c 100644 --- a/foqus_lib/framework/uq/Visualizer.py +++ b/foqus_lib/framework/uq/Visualizer.py @@ -438,7 +438,7 @@ def showRS(fnameRS, y, x, rsdim, rsMethodName, **kwargs): if rsIndex == ResponseSurfaces.USER and userRegressionFile is not None: f.write("1\n") # number of basis functions f.write("%s\n" % userRegressionFile) # surrogate file - f.write("y\n") # apply auxillary arg (output index) + f.write("y\n") # apply auxiliary arg (output index) outVarNames = data.getOutputNames() outName = outVarNames[y - 1] outName = Common.getUserRegressionOutputName( diff --git a/foqus_lib/gui/flowsheet/dataFilterDialog.py b/foqus_lib/gui/flowsheet/dataFilterDialog.py index b852dc066..038326373 100644 --- a/foqus_lib/gui/flowsheet/dataFilterDialog.py +++ b/foqus_lib/gui/flowsheet/dataFilterDialog.py @@ -111,11 +111,11 @@ def __init__(self, dat, parent=None, results=None): self.doneButton.clicked.connect(self.doneClicked) self.addCalcButton.clicked.connect(self.showCalcEdit) self.prevFilter = None - # Set up column list widget for help selecting fileter and sort terms + # Set up column list widget for help selecting filter and sort terms self.updateColList() self.colList.itemDoubleClicked.connect(self.copyCol2) self.colList.setDragDropMode(QAbstractItemView.DragOnly) - # When draging into sort and filter text boxes add text to mimedata + # When dragging into sort and filter text boxes add text to mimedata self.filterTermEdit.installEventFilter(_DropHandler(self, True)) self.sortTermEdit.installEventFilter(_DropHandler(self, False)) # Initially populate the dialog diff --git a/foqus_lib/gui/flowsheet/dataFilterDialog_UI.ui b/foqus_lib/gui/flowsheet/dataFilterDialog_UI.ui index b1f3be6a5..6a28f9e49 100644 --- a/foqus_lib/gui/flowsheet/dataFilterDialog_UI.ui +++ b/foqus_lib/gui/flowsheet/dataFilterDialog_UI.ui @@ -104,7 +104,7 @@ - <html><head/><body><p>This is a json list of columns to sort by. If rows have the same value in the first column the second will be used to sort and so on. If a &quot;-&quot; is included at the begining of a column name string (inside quotes), that columns will be sorted in descending order.</p></body></html> + <html><head/><body><p>This is a json list of columns to sort by. If rows have the same value in the first column the second will be used to sort and so on. If a &quot;-&quot; is included at the beginning of a column name string (inside quotes), that columns will be sorted in descending order.</p></body></html> [] diff --git a/foqus_lib/gui/flowsheet/drawFlowsheet.py b/foqus_lib/gui/flowsheet/drawFlowsheet.py index e7fe14f66..e4608c8b7 100644 --- a/foqus_lib/gui/flowsheet/drawFlowsheet.py +++ b/foqus_lib/gui/flowsheet/drawFlowsheet.py @@ -274,7 +274,7 @@ def drawEdge(self, x1, y1, x2, y2, index, curve, tear=False): --Args-- index: the edge index curve: distance from center of straight edge to a point on - curved edge (can be positive or negitive. Used to + curved edge (can be positive or negative. Used to keep edges from overlapping. tear: if true draw in tear edge style """ @@ -314,7 +314,7 @@ def drawEdge(self, x1, y1, x2, y2, index, curve, tear=False): gi = self.addPath(path, self.tearEdgePen) else: gi = self.addPath(path, self.edgePen) - # Add data to edge so if seleted we can determine that it + # Add data to edge so if selected we can determine that it # is an edge and which edge it is. gi.setData(1, index) gi.setData(2, "edge") @@ -412,7 +412,7 @@ def mousePressEvent( itemType = None itemIndex = None # Selection Mode select nodes or edges holding shift allows - # you to select multiple nodels and edges. + # you to select multiple nodes and edges. if self.mode == self.MODE_SELECT: if mod != QtCore.Qt.SHIFT: self.selectedEdges = [] @@ -488,7 +488,7 @@ def mousePressEvent( class drawFlowsheet(QGraphicsView): """ This is the widget for viewing a flowsheet the actual drawing - and event handing is done by the fsSecne object contained in + and event handing is done by the fsScene object contained in drawFlowsheet object """ diff --git a/foqus_lib/gui/flowsheet/edgePanel.py b/foqus_lib/gui/flowsheet/edgePanel.py index db3094b39..0018e070b 100644 --- a/foqus_lib/gui/flowsheet/edgePanel.py +++ b/foqus_lib/gui/flowsheet/edgePanel.py @@ -61,7 +61,7 @@ def clickAddConnection(self): For PyQt5 buttons also send a checked argument to the callback even when they are not checkable. You can't set a callback that takes args unless you account for the checked argument. So this just drops the checked - arg and calls addConection(). + arg and calls addConnection(). """ self.addConnection() @@ -95,7 +95,7 @@ def applyChanges(self): def changeIndex(self, index): """ - Callback to update when a differnt edge is selected from the edge index + Callback to update when a different edge is selected from the edge index pulldown. Args: @@ -264,7 +264,7 @@ def updateConnections(self): def autoConnect(self): """ Add connections to the connection table that connect variables with the - same name in from node to the to node. The vaiables can be inputs or + same name in from node to the to node. The variables can be inputs or outputs in the from node, but only inputs in the to node. Args: @@ -287,7 +287,7 @@ def autoConnect(self): def addConnection(self, fv="", tv=""): """ Add a new row to the connection table, if fv and/or tv are supplied - and fv and tv are valid variable names, initally create the row with + and fv and tv are valid variable names, initially create the row with the specified connection. Args @@ -308,7 +308,7 @@ def addConnection(self, fv="", tv=""): # Fill in the pull down boxes row = self.connectTable.rowCount() - 1 gh.setTableItem(self.connectTable, row, 0, fv, pullDown=vars1out + vars1in) - # Put a seperator between output and input vars in from vars + # Put a separator between output and input vars in from vars self.connectTable.cellWidget(row, 0).insertSeparator(len(vars1out)) gh.setTableItem(self.connectTable, row, 1, tv, pullDown=vars2) gh.setTableItem( # This is the active checkbox diff --git a/foqus_lib/gui/flowsheet/edgePanel_UI.ui b/foqus_lib/gui/flowsheet/edgePanel_UI.ui index ec1d11402..e449da2bc 100644 --- a/foqus_lib/gui/flowsheet/edgePanel_UI.ui +++ b/foqus_lib/gui/flowsheet/edgePanel_UI.ui @@ -86,7 +86,7 @@ - Distance used to draw a curved edge used to prevent edges from overlapping. Can be positive or negitive. + Distance used to draw a curved edge used to prevent edges from overlapping. Can be positive or negative. diff --git a/foqus_lib/gui/flowsheet/nodePanel.py b/foqus_lib/gui/flowsheet/nodePanel.py index 6c9cddc7e..23c7a192d 100644 --- a/foqus_lib/gui/flowsheet/nodePanel.py +++ b/foqus_lib/gui/flowsheet/nodePanel.py @@ -68,8 +68,8 @@ def __init__(self, dat, parent=None): self.simNameBox.currentIndexChanged.connect(self.simSet) self.addInputButton.clicked.connect(self.addInputClicked) self.removeInputButton.clicked.connect(self.delInput) - self.valuesToDeafultsButton.clicked.connect(self.valuesToDefaults) - self.valuesToDeafultsButton.hide() + self.valuesToDefaultsButton.clicked.connect(self.valuesToDefaults) + self.valuesToDefaultsButton.hide() self.addOutputButton.clicked.connect(self.addOutputClicked) self.removeOutputButton.clicked.connect(self.delOutput) self.vexButton.clicked.connect(self.showVex) @@ -112,9 +112,9 @@ def checkSim(self): """ Check if the model assigned to the node exists. This would mostly be a problem when someone passes a flowsheet to - someone else who is using a differnt Turbine instance. They + someone else who is using a different Turbine instance. They may not have uploaded the models to Turbine, or may be using - differnt model names. + different model names. """ if self.node.modelType == nodeModelTypes.MODEL_NONE: pass @@ -587,7 +587,7 @@ def updateSettingsTable(self): def addInputClicked(self): """ - The clicked signal contains will send a checked argumnet to the callback + The clicked signal contains will send a checked argument to the callback which will go into name if I directly use addInput as the callback """ self.addInput() @@ -692,7 +692,7 @@ def delInput(self): def addOutputClicked(self): """ - The clicked signal contains will send a checked argumnet to the callback + The clicked signal contains will send a checked argument to the callback which will go into name if I directly use addInput as the callback """ self.addOutput() diff --git a/foqus_lib/gui/flowsheet/nodePanel_UI.ui b/foqus_lib/gui/flowsheet/nodePanel_UI.ui index 81a1e7f5c..12e7364c5 100644 --- a/foqus_lib/gui/flowsheet/nodePanel_UI.ui +++ b/foqus_lib/gui/flowsheet/nodePanel_UI.ui @@ -580,7 +580,7 @@ - + Values to Defaults diff --git a/foqus_lib/gui/help/helpBrowser.py b/foqus_lib/gui/help/helpBrowser.py index 8de432a6f..28cd0276f 100644 --- a/foqus_lib/gui/help/helpBrowser.py +++ b/foqus_lib/gui/help/helpBrowser.py @@ -295,7 +295,7 @@ def updateLogView(self, maxRead=1000, delay=1000): ) except ValueError as e: logging.getLogger("foqus." + __name__).info(str(e)) - self.CloudLogView.append("Cloud Notifcations: OFF") + self.CloudLogView.append("Cloud Notifications: OFF") self.CloudLogView.append( "turbine configuration section Application, key notification" ) diff --git a/foqus_lib/gui/main/Dash.py b/foqus_lib/gui/main/Dash.py index cf466220b..e7d7f0bdc 100644 --- a/foqus_lib/gui/main/Dash.py +++ b/foqus_lib/gui/main/Dash.py @@ -14,7 +14,7 @@ ################################################################################# """Dash.py * This FOQUS home screen, it doesn't do much but show the screen - and emit signals that are handeled by the main window + and emit signals that are handled by the main window John Eslick, Carnegie Mellon University, 2014 """ diff --git a/foqus_lib/gui/main/mainWindow.py b/foqus_lib/gui/main/mainWindow.py index 51e358bfb..5a0396dd6 100644 --- a/foqus_lib/gui/main/mainWindow.py +++ b/foqus_lib/gui/main/mainWindow.py @@ -259,7 +259,7 @@ def handleNodeSimulationReady(self): def clearOldMessages(self): """ - This function clears old mesages from the gui + This function clears old messages from the gui when loading or creating a new session. """ self.optSetupFrame.clearOld() @@ -437,7 +437,7 @@ def makeMainToolBar(self): self.surrogateAction.setCheckable(True) self.mainToolbarActionGroup.addAction(self.surrogateAction) self.toolbarMain.addAction(self.surrogateAction) - # Setings Action + # Settings Action self.mainSettingsAction = QAction( QIcon(self.iconPaths["settings48"]), "Settings", self ) diff --git a/foqus_lib/gui/main/settingsFrame.py b/foqus_lib/gui/main/settingsFrame.py index 053471763..c09938576 100644 --- a/foqus_lib/gui/main/settingsFrame.py +++ b/foqus_lib/gui/main/settingsFrame.py @@ -79,7 +79,7 @@ def __init__(self, dat, parent=None): self.simSinterBrowsButton.clicked.connect(self.browseSinterFile) self.alamoPathButton.clicked.connect(self.browseALAMOPath) self.rScriptPathButton.clicked.connect(self.browseRScriptPath) - # Connect okay/cancel singnals + # Connect okay/cancel signals self.revertButton.clicked.connect(self.revert) # self.startLite.clicked.connect(self.startTurbineService) @@ -100,7 +100,7 @@ def displayAvailablityWarning(self): "You are changing the Turbine server" " connection. The new server may not have the simulations or" " correct versions of simulations for your flowsheet. Please upload" - " or update simluations on Turbine as necessary.", + " or update simulations on Turbine as necessary.", ) def updateTurbineLitePort(self): @@ -235,7 +235,7 @@ def startTurbineService(self): mess = ( "Failed to start Turbine Web Service API. If the " "reason given below is not clear the likely cause is that " - "FOQUS does not have permision to start/stop the services." + "FOQUS does not have permission to start/stop the services." ) details = "Details:\n{0}\n{1}".format(out, err) QMessageBox.information(self, "Information", "\n\n".join([mess, details])) @@ -261,7 +261,7 @@ def stopTurbineService(self): mess = ( "Failed to start Turbine Web Service API. If the " "reason given below is not clear the likely cause is that" - "FOQUS does not have permision to start/stop the services." + "FOQUS does not have permission to start/stop the services." ) details = "Details:\n{0}\n{1}".format(out, err) QMessageBox.information(self, "Information", "\n\n".join([mess, details])) @@ -374,7 +374,7 @@ def browseTurbineFile(self): """ fileName, filtr = QFileDialog.getOpenFileName( self, - "Find Turbine Confguration", + "Find Turbine Configuration", "", "Config Files (*.cfg);;Text Files (*.txt);;All Files (*)", ) @@ -388,7 +388,7 @@ def browseTurbineCFile(self): """ fileName, filtr = QFileDialog.getOpenFileName( self, - "Find Turbine Cluster Confguration", + "Find Turbine Cluster Configuration", "", "Config Files (*.cfg);;Text Files (*.txt);;All Files (*)", ) diff --git a/foqus_lib/gui/main/settingsFrame_UI.ui b/foqus_lib/gui/main/settingsFrame_UI.ui index 4f62192a4..f50c8ae35 100644 --- a/foqus_lib/gui/main/settingsFrame_UI.ui +++ b/foqus_lib/gui/main/settingsFrame_UI.ui @@ -436,7 +436,7 @@ - <html><head/><body><p>Test the Turbine configuration to be sure that the configured remote instance of Turbine is responding propery. If the test fails, Turbine may not be running or the configuration may be wrong. The test result should provide addtional information on any errors encountered.</p></body></html> + <html><head/><body><p>Test the Turbine configuration to be sure that the configured remote instance of Turbine is responding propery. If the test fails, Turbine may not be running or the configuration may be wrong. The test result should provide additional information on any errors encountered.</p></body></html> Test diff --git a/foqus_lib/gui/model/dmfUploadDialog.py b/foqus_lib/gui/model/dmfUploadDialog.py index 6f8084347..879b5d3c0 100644 --- a/foqus_lib/gui/model/dmfUploadDialog.py +++ b/foqus_lib/gui/model/dmfUploadDialog.py @@ -214,9 +214,9 @@ def showSinterConfigGUI(self): """ # need to find a way to prevent clicking this button several # times after this function returns any button clicks that were - # stored up sent signals. But they happen after fnction returns + # stored up sent signals. But they happen after function returns # so can't figure out how to block them. launch process in a - # seperate thread? + # separate thread? exepath = str(self.dat.foqusSettings.simsinter_path) exepath = os.path.join(exepath, "SinterConfigGUI.exe") tmp_file = os.path.abspath("temp\\sc_out.txt") @@ -420,11 +420,11 @@ def setResRelPath(self): # if selected and drop the indexes for those rows if 0 in rows: QMessageBox.information( - self, "Warning", "Won't set releative path for configuration" + self, "Warning", "Won't set relative path for configuration" ) if 1 in rows: QMessageBox.information( - self, "Warning", "Won't set releative path for model" + self, "Warning", "Won't set relative path for model" ) rows.discard(0) rows.discard(1) diff --git a/foqus_lib/gui/model/gatewayUploadDialog.py b/foqus_lib/gui/model/gatewayUploadDialog.py index 2b75f9a77..6e8ae3a15 100644 --- a/foqus_lib/gui/model/gatewayUploadDialog.py +++ b/foqus_lib/gui/model/gatewayUploadDialog.py @@ -127,9 +127,9 @@ def showSinterConfigGUI(self): """ # need to find a way to prevent clicking this button several # times after this function returns any button clicks that were - # stored up sent signals. But they happen after fnction returns + # stored up sent signals. But they happen after function returns # so can't figure out how to block them. launch process in a - # seperate thread? + # separate thread? exepath = str(self.dat.foqusSettings.simsinter_path) exepath = os.path.join(exepath, "SinterConfigGUI.exe") tmp_file = os.path.abspath("temp\\sc_out.txt") @@ -276,7 +276,7 @@ def accept(self): return finally: self.notwaiting.emit() - # If uploaded to a Turbine gatway other that the current, + # If uploaded to a Turbine gateway other that the current, # make sure the turbine version is set back to proper value. self.turb.updateSettings() self.done(QDialog.Accepted) @@ -362,11 +362,11 @@ def setResRelPath(self): # if selected and drop the indexes for those rows if 0 in rows: QMessageBox.information( - self, "Warning", "Won't set releative path for configuration" + self, "Warning", "Won't set relative path for configuration" ) if 1 in rows: QMessageBox.information( - self, "Warning", "Won't set releative path for model" + self, "Warning", "Won't set relative path for model" ) rows.discard(0) rows.discard(1) diff --git a/foqus_lib/gui/optimization/optSetupFrame.py b/foqus_lib/gui/optimization/optSetupFrame.py index 49379233c..b4d571abf 100644 --- a/foqus_lib/gui/optimization/optSetupFrame.py +++ b/foqus_lib/gui/optimization/optSetupFrame.py @@ -80,7 +80,7 @@ def __init__(self, dat, parent=None): def clearOld(self): """ - Clear messages from old optimzation runs + Clear messages from old optimization runs """ self.optMonitorFrame.clearMessages() try: @@ -259,7 +259,7 @@ def applyChanges(self): def scaleHelper(self, ind=0): """ - If a descision variable has a none scale type set the scale + If a decision variable has a none scale type set the scale to lineae. For other variables set the scale type to none and disable the scale selection. """ diff --git a/foqus_lib/gui/pysyntax_hl/pysyntax_hl.py b/foqus_lib/gui/pysyntax_hl/pysyntax_hl.py index ca8ecd42b..b5df14c9a 100644 --- a/foqus_lib/gui/pysyntax_hl/pysyntax_hl.py +++ b/foqus_lib/gui/pysyntax_hl/pysyntax_hl.py @@ -236,7 +236,7 @@ def __init__(self, document): def highlightBlock(self, text): """Apply syntax highlighting to the given block of text.""" - # Opening braces also waht to keep track of location for + # Opening braces also what to keep track of location for # matching sets for expression, nth, format in self.obraceRules: index = expression.indexIn(text, 0) @@ -247,7 +247,7 @@ def highlightBlock(self, text): # print "{0}, {1}, {2}".format(index, length, nth) self.setFormat(index, length, format) index = expression.indexIn(text, index + length) - # Closing braces also waht to keep track of location for + # Closing braces also what to keep track of location for # matching sets for expression, nth, format in self.cbraceRules: index = expression.indexIn(text, 0) diff --git a/foqus_lib/gui/surrogate/surrogateFrame.py b/foqus_lib/gui/surrogate/surrogateFrame.py index c22905f9a..1b55e5441 100644 --- a/foqus_lib/gui/surrogate/surrogateFrame.py +++ b/foqus_lib/gui/surrogate/surrogateFrame.py @@ -312,7 +312,7 @@ def refreshContents(self): pg.updateOptions() for i, btn in enumerate(pg.inputVarButtons): - # this is because I am beeing lazy there are two + # this is because I am being lazy there are two # preexisting buttons if i == 0: self.ivGeneralButton1.setText(btn[0]) diff --git a/foqus_lib/gui/uq/AnalysisDialog.py b/foqus_lib/gui/uq/AnalysisDialog.py index 1738de332..6ef85e338 100644 --- a/foqus_lib/gui/uq/AnalysisDialog.py +++ b/foqus_lib/gui/uq/AnalysisDialog.py @@ -195,8 +195,8 @@ def __init__(self, idNum, data, parent=None): ) if self.infoTable.verticalScrollBar().isVisible(): width += self.infoTable.verticalScrollBar().width() - # scollBarWidth = QApplication.style().pixelMetric(QStyle.PM_ScrollBarExtent) - # width += scollBarWidth + # scrollBarWidth = QApplication.style().pixelMetric(QStyle.PM_ScrollBarExtent) + # width += scrollBarWidth self.infoTable.setMaximumWidth(width) self.infoGroup.setMinimumWidth(width + 22) # self.infoGroup.setMaximumWidth(width + 60) @@ -212,7 +212,7 @@ def __init__(self, idNum, data, parent=None): # print self.analysisTable.columnWidth(i) if self.analysisTable.verticalScrollBar().isVisible(): width += self.analysisTable.verticalScrollBar().width() - # width += scollBarWidth + # width += scrollBarWidth self.analysisTable.setMinimumWidth(width) self.analysisTable.setMaximumWidth(width) self.analysisTable.setRowCount(0) diff --git a/foqus_lib/gui/uq/uqSetupFrame.py b/foqus_lib/gui/uq/uqSetupFrame.py index 4f089b370..cf8f5b1aa 100644 --- a/foqus_lib/gui/uq/uqSetupFrame.py +++ b/foqus_lib/gui/uq/uqSetupFrame.py @@ -948,7 +948,7 @@ def launchSim(self): sim = self.dat.uqSimList[row] if sender.text() == "Launch": logging.getLogger("foqus." + __name__).debug( - "Lauch button pressed, launching UQ ensemble" + "Launch button pressed, launching UQ ensemble" ) sender.setText("Stop") # self.freeze() diff --git a/foqus_lib/service/flowsheet.py b/foqus_lib/service/flowsheet.py index 5fb290bcf..5f05eb15d 100644 --- a/foqus_lib/service/flowsheet.py +++ b/foqus_lib/service/flowsheet.py @@ -95,7 +95,7 @@ def getfilenames(jid): def scrub_empty_string_values_for_dynamo(db): - """DynamoDB throws expection if there is an empty string in dict + """DynamoDB throws exception if there is an empty string in dict ValidationException: ExpressionAttributeValues contains invalid value: One or more parameter values were invalid: An AttributeValue may not contain an empty string for key :o """ @@ -198,7 +198,7 @@ def _setup_foqus_user_plugin(dat, nkey, user_name, user_plugin_dir): def _setup_flowsheet_turbine_node(dat, nkey, user_name): - """From s3 download all simulation files into AspenSinterComsumer cache directory '{working_directory\test\{simulation_guid}'. If + """From s3 download all simulation files into AspenSinterConsumer cache directory '{working_directory\test\{simulation_guid}'. If Simulation does not exist create one. If Simulation does exist just s3 download all simulation files into the above cache directory. The new simulation_guid is created for all file updates to TurbineWS, so this is sidestepping that process. diff --git a/foqus_lib/service/test/flowsheet_control_test.py b/foqus_lib/service/test/flowsheet_control_test.py index fc749b11e..cbc213d97 100644 --- a/foqus_lib/service/test/flowsheet_control_test.py +++ b/foqus_lib/service/test/flowsheet_control_test.py @@ -82,7 +82,7 @@ def _url_open_side_effect(url): if len(args) == idx + 3: val = TAGS_USERDATA_BIN else: - assert len(args) == idx + 4, "unexpect url path length %s" % (url) + assert len(args) == idx + 4, "unexpected url path length %s" % (url) d = json.loads(INSTANCE_USERDATA_JSON) key = args[idx + 3] assert key in d, "Missing Key in %s, instance-data %s" % (url, str(args)) diff --git a/foqus_lib/unit_test/node_test.py b/foqus_lib/unit_test/node_test.py index c7833a115..3ceb1dec2 100644 --- a/foqus_lib/unit_test/node_test.py +++ b/foqus_lib/unit_test/node_test.py @@ -661,7 +661,7 @@ def test_power_scaling(self, example_2): pytest.importorskip("tensorflow", reason="tensorflow not installed") # For this example, the inputs values for some variables are large per # the expected_in in the no_scaling test above, and attempting to scale - # by 10^value breaks the intepreter with a math overflow error + # by 10^value breaks the interpreter with a math overflow error # To test this method, we need to arbitrarily scale down the values. # An issue like this would not break the plugin, as the user would not # be able to train the neural network with this formulation at all. @@ -773,7 +773,7 @@ def test_custom_scaling(self, example_3): assert unscaled_out[k] == pytest.approx(expected_soln[k], rel=1e-5) # ---------------------------------------------------------------------------- - # this set of tests bulids and runs the pymodel class and checks exceptions + # this set of tests builds and runs the pymodel class and checks exceptions def test_no_norm_form(self, example_2): pytest.importorskip("tensorflow", reason="tensorflow not installed") @@ -783,7 +783,7 @@ def test_no_norm_form(self, example_2): assert test_pymodel.normalized is True # flag to check norm form assert test_pymodel.model.layers[1].normalization_form == "Linear" - # delete the attrbute and check that proper exception is thrown + # delete the attribute and check that proper exception is thrown delattr(test_pymodel.model.layers[1], "normalization_form") with pytest.raises(AttributeError): @@ -817,7 +817,7 @@ def test_no_norm_function(self, example_3): == "(datavalue - dataminimum)/(datamaximum - dataminimum)" ) - # delete the attrbute and check that proper exception is thrown + # delete the attribute and check that proper exception is thrown delattr(test_pymodel.model.layers[1], "normalization_function") with pytest.raises(AttributeError): @@ -1145,7 +1145,7 @@ def test_setSim_nonemodeltype(self, node): def test_setSim_newmodel(self, node): node.setSim(newModel="newName", newType="newType") assert node.modelName == "newName" - assert node.modelType == "newType" # not actuall a valid type, just + assert node.modelType == "newType" # not actually a valid type, just # checking that the new attribute matches the passed argument above def test_setSim_modelNone(self, node): diff --git a/foqus_sinter_configure.py b/foqus_sinter_configure.py index 8a6df1a5c..140091a9f 100644 --- a/foqus_sinter_configure.py +++ b/foqus_sinter_configure.py @@ -13,7 +13,7 @@ # "https://github.com/CCSI-Toolset/FOQUS". ################################################################################# """ -Prototype SimSinter Confiuration Writer, at this point focusing on gPROMS. +Prototype SimSinter Configuration Writer, at this point focusing on gPROMS. """ import sys from PyQt5.QtWidgets import QApplication diff --git a/pytest_qt_extras.py b/pytest_qt_extras.py index 05220447a..e57143445 100644 --- a/pytest_qt_extras.py +++ b/pytest_qt_extras.py @@ -1202,7 +1202,7 @@ def is_related_by_proximity(cand: W.QWidget): tgt_left = tgt_geom.left() cand_right = cand_geom.right() horizontal_distance = tgt_left - cand_right - is_cand_preceeding_horizontally = horizontal_distance >= 0 + is_cand_preceding_horizontally = horizontal_distance >= 0 tgt_top, tgt_btm = tgt_geom.top(), tgt_geom.bottom() cand_top, cand_btm = cand_geom.top(), cand_geom.bottom() @@ -1213,7 +1213,7 @@ def is_related_by_proximity(cand: W.QWidget): is_cand_completely_above or is_cand_completely_below ) - is_match = is_cand_preceeding_horizontally and has_partial_vertical_overlap + is_match = is_cand_preceding_horizontally and has_partial_vertical_overlap return Selection.from_locals(locals()) diff --git a/setup.py b/setup.py index 6bcf42c45..3d0aa82df 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ import shutil # default_version is the version if "git describe --tags" falls through -# Addtional package info is set in foqus_lib/version/version.template. +# Additional package info is set in foqus_lib/version/version.template. # The version module, just makes it a bit easier for FOQUS to pull package info default_version = "3.20.dev0" diff --git a/test/system_test/ui_test_01.py b/test/system_test/ui_test_01.py index bfc97bc2d..fd702343e 100644 --- a/test/system_test/ui_test_01.py +++ b/test/system_test/ui_test_01.py @@ -40,7 +40,7 @@ def go(sleep=0.25, MainWin=MainWin, stopFlag=MainWin.helpDock.stop): def getButton(w, label): - """Get a buttom in window w labeled label, this could probably be better""" + """Get a button in window w labeled label, this could probably be better""" if isinstance(label, str): try: blist = w.buttons() @@ -114,7 +114,7 @@ def timerWait(timer, sleep=0.25, n=40): else: return True timers[timer].stop() # Timer never did it's thing so just shut it down - _log.error("timer {} didn't stop in alloted time\n".format(timer)) + _log.error("timer {} didn't stop in allotted time\n".format(timer)) return False # return False to stop script. Something is wrong @@ -188,7 +188,7 @@ def time_out(): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", time_out) # stop script if too long addTimer("msg_okay", msg_okay) # click OK on mgsbox addTimer("msg_no", msg_no) # click No on msgbox @@ -242,7 +242,7 @@ def time_out(): MainWin.nodeDock.inputVarTable.item(0, 6).setText("10") # max x2 MainWin.nodeDock.inputVarTable.item(1, 5).setText("-10") # min x2 MainWin.nodeDock.inputVarTable.item(1, 6).setText("10") # max x2 - MainWin.nodeDock.inputVarTable.item(0, 4).setText("5") # deafult x1 + MainWin.nodeDock.inputVarTable.item(0, 4).setText("5") # default x1 MainWin.nodeDock.inputVarTable.item(1, 4).setText("2") # default x2 MainWin.nodeDock.inputVarTable.item(0, 1).setText("5") # value x1 MainWin.nodeDock.inputVarTable.item(1, 1).setText("2") # value x2 diff --git a/test/unit_test/foqusOUUTest.py b/test/unit_test/foqusOUUTest.py index 54c8f9051..cce8ce7bc 100644 --- a/test/unit_test/foqusOUUTest.py +++ b/test/unit_test/foqusOUUTest.py @@ -51,7 +51,7 @@ def addTimer(name, cb, MainWin=MainWin, timers=timers): """ Using timers to push buttons on popups and modal dialogs and other things were I need an easy way to make things happen from - a seperate thread. Usually where something is blocking the main + a separate thread. Usually where something is blocking the main GUI loop. name: string name of timer @@ -71,7 +71,7 @@ def timersStop(timers=timers): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script for taking too long addTimer("msg_okay", MainWin.helpDock.msgBoxOK) # click okay on a pop up message box addTimer("msg_no", MainWin.helpDock.msgBoxNo) # Click no on a popup message box @@ -80,7 +80,7 @@ def timersStop(timers=timers): timers["time_out"].start(MAX_RUN_TIME) try: - # raise(Exception("Test excpetion handeling")) + # raise(Exception("Test exception handling")) while 1: ### This is the dialog I created for this type of stuff diff --git a/test/unit_test/foqusUQDensity.py b/test/unit_test/foqusUQDensity.py index f39bd1e6d..d57feee35 100644 --- a/test/unit_test/foqusUQDensity.py +++ b/test/unit_test/foqusUQDensity.py @@ -141,7 +141,7 @@ def addTimer(name, cb, MainWin=MainWin, timers=timers): """ Using timers to push buttons on popups and modal dialogs and other things were I need an easy way to make things happen from - a seperate thread. Usually where something is blocking the main + a separate thread. Usually where something is blocking the main GUI loop. name: string name of timer @@ -161,7 +161,7 @@ def timersStop(timers=timers): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script for taking too long addTimer("msg_okay", MainWin.helpDock.msgBoxOK) # click okay on a pop up message box addTimer("msg_no", MainWin.helpDock.msgBoxNo) # Click no on a popup message box @@ -172,7 +172,7 @@ def timersStop(timers=timers): timers["time_out"].start(MAX_RUN_TIME) try: - # raise(Exception("Test excpetion handeling")) + # raise(Exception("Test exception handling")) while 1: ### This is the dialog I created for this type of stuff diff --git a/test/unit_test/foqusUQPhoenix.py b/test/unit_test/foqusUQPhoenix.py index 823bba61d..90f3208fc 100644 --- a/test/unit_test/foqusUQPhoenix.py +++ b/test/unit_test/foqusUQPhoenix.py @@ -192,7 +192,7 @@ def addTimer(name, cb, MainWin=MainWin, timers=timers): """ Using timers to push buttons on popups and modal dialogs and other things were I need an easy way to make things happen from - a seperate thread. Usually where something is blocking the main + a separate thread. Usually where something is blocking the main GUI loop. name: string name of timer @@ -212,7 +212,7 @@ def timersStop(timers=timers): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script for taking too long addTimer("msg_okay", MainWin.helpDock.msgBoxOK) # click okay on a pop up message box addTimer("msg_no", MainWin.helpDock.msgBoxNo) # Click no on a popup message box @@ -222,7 +222,7 @@ def timersStop(timers=timers): timers["time_out"].start(MAX_RUN_TIME) try: - # raise(Exception("Test excpetion handeling")) + # raise(Exception("Test exception handling")) while 1: ### This is the dialog I created for this type of stuff diff --git a/test/unit_test/foqusUQST.py b/test/unit_test/foqusUQST.py index acd67b397..947a58710 100644 --- a/test/unit_test/foqusUQST.py +++ b/test/unit_test/foqusUQST.py @@ -125,7 +125,7 @@ def addTimer(name, cb, MainWin=MainWin, timers=timers): """ Using timers to push buttons on popups and modal dialogs and other things were I need an easy way to make things happen from - a seperate thread. Usually where something is blocking the main + a separate thread. Usually where something is blocking the main GUI loop. name: string name of timer @@ -145,7 +145,7 @@ def timersStop(timers=timers): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script for taking too long addTimer("msg_okay", MainWin.helpDock.msgBoxOK) # click okay on a pop up message box addTimer("msg_no", MainWin.helpDock.msgBoxNo) # Click no on a popup message box @@ -156,7 +156,7 @@ def timersStop(timers=timers): timers["time_out"].start(MAX_RUN_TIME) try: - # raise(Exception("Test excpetion handeling")) + # raise(Exception("Test exception handling")) while 1: ### This is the dialog I created for this type of stuff diff --git a/test/unit_test/foqusUQTest1.py b/test/unit_test/foqusUQTest1.py index 84abc5358..e54ba0b78 100644 --- a/test/unit_test/foqusUQTest1.py +++ b/test/unit_test/foqusUQTest1.py @@ -163,7 +163,7 @@ def addTimer(name, cb, MainWin=MainWin, timers=timers): """ Using timers to push buttons on popups and modal dialogs and other things were I need an easy way to make things happen from - a seperate thread. Usually where something is blocking the main + a separate thread. Usually where something is blocking the main GUI loop. name: string name of timer @@ -183,7 +183,7 @@ def timersStop(timers=timers): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script for taking too long addTimer("msg_okay", MainWin.helpDock.msgBoxOK) # click okay on a pop up message box addTimer("msg_no", MainWin.helpDock.msgBoxNo) # Click no on a popup message box @@ -196,7 +196,7 @@ def timersStop(timers=timers): timers["time_out"].start(MAX_RUN_TIME) try: - # raise(Exception("Test excpetion handeling")) + # raise(Exception("Test exception handling")) while 1: ### This is the dialog I created for this type of stuff diff --git a/test/unit_test/foqusUQTest2.py b/test/unit_test/foqusUQTest2.py index f4285008f..6de39e4dc 100644 --- a/test/unit_test/foqusUQTest2.py +++ b/test/unit_test/foqusUQTest2.py @@ -136,7 +136,7 @@ def addTimer(name, cb, MainWin=MainWin, timers=timers): """ Using timers to push buttons on popups and modal dialogs and other things were I need an easy way to make things happen from - a seperate thread. Usually where something is blocking the main + a separate thread. Usually where something is blocking the main GUI loop. name: string name of timer @@ -156,7 +156,7 @@ def timersStop(timers=timers): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script for taking too long addTimer("msg_okay", MainWin.helpDock.msgBoxOK) # click okay on a pop up message box addTimer("msg_no", MainWin.helpDock.msgBoxNo) # Click no on a popup message box @@ -166,7 +166,7 @@ def timersStop(timers=timers): timers["time_out"].start(MAX_RUN_TIME) try: - # raise(Exception("Test excpetion handeling")) + # raise(Exception("Test exception handling")) while 1: ### This is the dialog I created for this type of stuff diff --git a/test/unit_test/foqusUQVLE.py b/test/unit_test/foqusUQVLE.py index ed1d11d0a..baeff2094 100644 --- a/test/unit_test/foqusUQVLE.py +++ b/test/unit_test/foqusUQVLE.py @@ -143,7 +143,7 @@ def addTimer(name, cb, MainWin=MainWin, timers=timers): """ Using timers to push buttons on popups and modal dialogs and other things were I need an easy way to make things happen from - a seperate thread. Usually where something is blocking the main + a separate thread. Usually where something is blocking the main GUI loop. name: string name of timer @@ -163,7 +163,7 @@ def timersStop(timers=timers): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script for taking too long addTimer("msg_okay", MainWin.helpDock.msgBoxOK) # click okay on a pop up message box addTimer("msg_no", MainWin.helpDock.msgBoxNo) # Click no on a popup message box @@ -174,7 +174,7 @@ def timersStop(timers=timers): timers["time_out"].start(MAX_RUN_TIME) try: - # raise(Exception("Test excpetion handeling")) + # raise(Exception("Test exception handling")) while 1: ### This is the dialog I created for this type of stuff diff --git a/test/unit_test/foqusUQViscosity.py b/test/unit_test/foqusUQViscosity.py index 409b8aea9..96de7acc4 100644 --- a/test/unit_test/foqusUQViscosity.py +++ b/test/unit_test/foqusUQViscosity.py @@ -138,7 +138,7 @@ def addTimer(name, cb, MainWin=MainWin, timers=timers): """ Using timers to push buttons on popups and modal dialogs and other things were I need an easy way to make things happen from - a seperate thread. Usually where something is blocking the main + a separate thread. Usually where something is blocking the main GUI loop. name: string name of timer @@ -158,7 +158,7 @@ def timersStop(timers=timers): # make the timers that will be needed just start and stop as needed # need to make sure that when this script exits all timers are stopped -# or some crazy stuff may happen untill you exit FOQUS. +# or some crazy stuff may happen until you exit FOQUS. addTimer("time_out", MainWin.helpDock.setStopTrue) # stop script for taking too long addTimer("msg_okay", MainWin.helpDock.msgBoxOK) # click okay on a pop up message box addTimer("msg_no", MainWin.helpDock.msgBoxNo) # Click no on a popup message box @@ -169,7 +169,7 @@ def timersStop(timers=timers): timers["time_out"].start(MAX_RUN_TIME) try: - # raise(Exception("Test excpetion handeling")) + # raise(Exception("Test exception handling")) while 1: ### This is the dialog I created for this type of stuff