Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Spell Checker #1168

Merged
merged 29 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
044d520
first attempt at spellchecker, listing all file types and excluding s…
bpaul4 Sep 21, 2023
8078a55
Move file to repo root
lbianchi-lbl Sep 29, 2023
0079b50
Exclude JSON and R files as we are less sure if they can be corrected
lbianchi-lbl Sep 29, 2023
091f5c7
Add common abbreviations to avoid false positives
lbianchi-lbl Sep 29, 2023
2473e97
Fix "releative"
lbianchi-lbl Sep 29, 2023
8d18958
Fix "permision"
lbianchi-lbl Sep 29, 2023
a9aa6ea
Fix "Setings"
lbianchi-lbl Sep 29, 2023
7057f69
Fix "untill"
lbianchi-lbl Sep 29, 2023
9389a42
Fix "buttom"
lbianchi-lbl Sep 29, 2023
4fca345
Fix "alloted"
lbianchi-lbl Sep 29, 2023
4a64548
Fix "controling"
lbianchi-lbl Sep 29, 2023
7d55f74
Fix "auxiliary"
lbianchi-lbl Sep 29, 2023
b556400
Fix "constriant"
lbianchi-lbl Sep 29, 2023
5106672
Fix most typos in non-code files
lbianchi-lbl Sep 29, 2023
3c2e3cf
Change config file path in GHA workflow
lbianchi-lbl Sep 29, 2023
af0c88c
Merge branch 'master' into spell-checking
ksbeattie Nov 14, 2023
75b87c7
Fix "seperate"
lbianchi-lbl Nov 21, 2023
e88c2f4
Fix "excpetion"
lbianchi-lbl Nov 21, 2023
34943bd
Fix "handeling"
lbianchi-lbl Nov 21, 2023
7817f72
Fix "deafult(s)"
lbianchi-lbl Nov 21, 2023
3177860
Fix typos in code comments or strings
lbianchi-lbl Nov 21, 2023
0df9bb1
Add exclusions for typos for identifiers in non-internal scopes
lbianchi-lbl Nov 21, 2023
2ec51b3
Fix typos in code
lbianchi-lbl Nov 21, 2023
c331464
Fix typo in figure name
lbianchi-lbl Nov 21, 2023
9dcb428
Fix "thershold"
lbianchi-lbl Nov 21, 2023
25092b3
Format code
lbianchi-lbl Nov 21, 2023
2e16c1e
Fix "NoInteractiveSer"
lbianchi-lbl Nov 21, 2023
368382c
Fix "ghostOuput"
lbianchi-lbl Nov 22, 2023
143fec1
Uncommit and ignore Pipfile
lbianchi-lbl Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ eggs/
*.lib
*.suo
*.zip
Pipfile

# OSX
*.DS_Store
Expand Down
43 changes: 43 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions cloud/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
2 changes: 1 addition & 1 deletion cloud/aws/cloudformation/FOQUS_SLM_instance_in_subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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\
"""
)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/chapt_dev/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://github.com/CCSI-Toolset/FOQUS>`_, 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,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/chapt_flowsheet/reference/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/chapt_install/run_foqus.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion docs/source/chapt_matlab/reference/matlab_foqus_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/chapt_odoe/tutorial-createcand.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/chapt_odoe/tutorial-loadcand.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions docs/source/chapt_opt/reference/optimization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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}
Expand All @@ -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}
Expand All @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion docs/source/chapt_sdoe/basics-runorder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/chapt_sinter/tutorial/gproms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions docs/source/chapt_surrogates/tutorial/alamo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -216,15 +216,15 @@ 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.

32. Select the checkbox for both output variables.

.. figure:: ../figs/variables.svg
:alt: Variable Selection
:name: fig.tut.sur.vaiables
:name: fig.tut.sur.variables

Variable Selection

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/test_files/Optimization/Opt_Test_01.foqus

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/test_files/Smoke_Tests/fs_smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/test_files/Smoke_Tests/optimization_smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading