Skip to content

Commit

Permalink
Fix spelling mistakes (#195)
Browse files Browse the repository at this point in the history
* Fix spelling mistakes

This commit fixes a bunch of spelling mistakes, found and fixed by codespell v2.2.1. All fixes are checked by hand to be actually a fix for an actually misspelled word.

* spelling fix: tarbal --> tarball

* ema_ipyparallel: Bug/spelling fix: deamon --> daemon

* Fix spelling mistakes in Jupyter notebooks
  • Loading branch information
EwoutH committed Oct 28, 2022
1 parent 3106b33 commit f040e03
Show file tree
Hide file tree
Showing 43 changed files with 58 additions and 60 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Highlights
With the 2.2 release, the EMAworkbench can now connect to [Vadere](https://www.vadere.org/) models on pedestrian dynamics. When inspecting a Prim Box peeling trajectory, multiple points on the peeling trajectory can be inspected simultaneously by inputting a list of integers into [`PrimBox.inspect()`](https://emaworkbench.readthedocs.io/en/latest/ema_documentation/analysis/prim.html#ema_workbench.analysis.prim.PrimBox.inspect).

When running experiments with multiprocessing using the [`MultiprocessingEvaluator`](https://emaworkbench.readthedocs.io/en/latest/ema_documentation/em_framework/evaluators.html#ema_workbench.em_framework.evaluators.MultiprocessingEvaluator), the number of processes can now be controlled using a negative integer as input for `n_processes` (for example, `-2` on a 12-thread CPU results in 10 threads used). Also, it will now default to max. 61 processes on windows machines due to limitations inherent in Windows in dealing with higher processer counts. Code quality, CI, and error reporting also have been improved. And finally, generating these release notes is now automated.
When running experiments with multiprocessing using the [`MultiprocessingEvaluator`](https://emaworkbench.readthedocs.io/en/latest/ema_documentation/em_framework/evaluators.html#ema_workbench.em_framework.evaluators.MultiprocessingEvaluator), the number of processes can now be controlled using a negative integer as input for `n_processes` (for example, `-2` on a 12-thread CPU results in 10 threads used). Also, it will now default to max. 61 processes on windows machines due to limitations inherent in Windows in dealing with higher processor counts. Code quality, CI, and error reporting also have been improved. And finally, generating these release notes is now automated.

### What's Changed
#### 🎉 New features added
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributions to the EMAworkbench are very welcome! In this document you will fi
### Issues
Reporting issues, such as bugs or unclairties in the documentation can be done (as usual) via the [Issues](https://github.com/quaquel/EMAworkbench/issues) section. You can also request new features that you would like to see in the EMAworkbench. Please first search if your bug or request already exists.

In case of a bug, please give us as much useful information possible to work with, including your coding environment, code snippets and if nessesary a model. Important are the exact steps to reproduce and what you already found out yourself.
In case of a bug, please give us as much useful information possible to work with, including your coding environment, code snippets and if necessary a model. Important are the exact steps to reproduce and what you already found out yourself.

### PRs
[Pull requests](https://github.com/quaquel/EMAworkbench/pulls) are very welcome, both to the code itself and the documentation. If you make a code change, make sure to document it well. This can be done inline, which will be picked up by Readthedocs, and in case of a larger feature, also in a tutorial and/or example.
Expand All @@ -25,7 +25,7 @@ For a simple single-file code or docs change, you can also just edit any file in


## Maintainers
_This section is targetted at the maintainers_
_This section is targeted at the maintainers_

### Merging Pull Requests
Pull requests should be merged in a way that only [atomic commits](https://en.wikipedia.org/wiki/Atomic_commit) make it in the main branch. This keeps the git commit history clean and tidy, and therefore useful. This means every commit only pertains one fix or feature, and can't be breaked into multiple commits without breaking things. It also means no merge commits are allowed. For more about atomic commits, see [one](https://www.pauline-vos.nl/atomic-commits/) and [two](https://www.aleksandrhovhannisyan.com/blog/atomic-git-commits/).
Expand Down
4 changes: 2 additions & 2 deletions docs/source/basic_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ saved results in various analysis scripts. ::

The above code snippet shows how we can use :func:`~util.save_results` for
saving the results of our experiments. :func:`~util.save_results` stores the as
csv files in a tarbal.
csv files in a tarball.

^^^^^^^^^^^^^^^^^^^^^
Mexican Flu: policies
Expand Down Expand Up @@ -330,7 +330,7 @@ comparison of results
Using the following script, we reproduce figures similar to the 3D figures
in `Pruyt & Hamarat (2010) <http://www.systemdynamics.org/conferences/2010/proceed/papers/P1389.pdf>`_.
But using :func:`pairs_scatter`. It shows for the three different policies
their behavior on the total number of deaths, the height of the heigest peak
their behavior on the total number of deaths, the height of the highest peak
of the pandemic, and the point in time at which this peak was reached.

.. literalinclude:: ../../ema_workbench/examples/flu_pairsplot.py
Expand Down
4 changes: 2 additions & 2 deletions docs/source/indepth_tutorial/directed-search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"pip install platypus-opt\n",
"```\n",
"\n",
"One note of caution: don't install platypus, but platypus-opt. There exists a python package on pip called platypus, but that is quite a different kind of libary. \n",
"One note of caution: don't install platypus, but platypus-opt. There exists a python package on pip called platypus, but that is quite a different kind of library. \n",
"\n",
"There are three ways in which we can use optimization in the workbench:\n",
"1. Search over the decision levers, conditional on a reference scenario\n",
Expand Down Expand Up @@ -686,7 +686,7 @@
"source": [
"### Changing the reference scenario \n",
"\n",
"The workbench offers control over the reference scenario or policy under which you are performing the optimization. This makes it easy to aply multi-scenario MORDM ([Watson & Kasprzyk, 2017](https://www.sciencedirect.com/science/article/pii/S1364815216310593);[Eker & Kwakkel, 2018](https://doi.org/10.1016/j.envsoft.2018.03.029);[Bartholomew & Kwakkel, 2020](https://doi.org/10.1016/j.envsoft.2020.104699)). Alternatively, you can also use it to change the policy for which you are applying worst case scenario discovery (see below). \n",
"The workbench offers control over the reference scenario or policy under which you are performing the optimization. This makes it easy to apply multi-scenario MORDM ([Watson & Kasprzyk, 2017](https://www.sciencedirect.com/science/article/pii/S1364815216310593);[Eker & Kwakkel, 2018](https://doi.org/10.1016/j.envsoft.2018.03.029);[Bartholomew & Kwakkel, 2020](https://doi.org/10.1016/j.envsoft.2020.104699)). Alternatively, you can also use it to change the policy for which you are applying worst case scenario discovery (see below). \n",
"\n",
"\n",
"```python\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/indepth_tutorial/dps_lake_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_antropogenic_release(xt, c1, c2, r1, r2, w1):
Parameters
----------
xt : float
polution in lake at time t
pollution in lake at time t
c1 : float
center rbf 1
c2 : float
Expand Down
2 changes: 1 addition & 1 deletion docs/source/indepth_tutorial/general-introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
" Parameters\n",
" ----------\n",
" xt : float\n",
" polution in lake at time t\n",
" pollution in lake at time t\n",
" c1 : float\n",
" center rbf 1\n",
" c2 : float\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/indepth_tutorial/open-exploration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"metadata": {},
"source": [
"# Open exploration\n",
"In this second tuturial, I will showcase how to use the ema_workbench for performing open exploration. This tuturial will continue with the same example as used in the previos tuturial.\n",
"In this second tuturial, I will showcase how to use the ema_workbench for performing open exploration. This tuturial will continue with the same example as used in the previous tuturial.\n",
"\n",
"## some background\n",
"In exploratory modeling, we are interested in understanding how regions in the uncertainty space and/or the decision space map to the whole outcome space, or partitions thereof. There are two general approaches for investigating this mapping. The first one is through systematic sampling of the uncertainty or decision space. This is sometimes also known as open exploration. The second one is to search through the space in a directed manner using some type of optimization approach. This is sometimes also known as directed search. \n",
Expand Down
4 changes: 2 additions & 2 deletions ema_workbench/analysis/b_and_w_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def set_legend_to_bw(leg, style, colormap, line_style="continuous"):
"""
Takes the figure legend and converts it to black and white. Note that
it currently only converts lines to black and white, other artist
intances are currently not being supported, and might cause errors or
instances are currently not being supported, and might cause errors or
other unexpected behavior.
Parameters
Expand Down Expand Up @@ -313,7 +313,7 @@ def set_fig_to_bw(fig, style=HATCHING, line_style="continuous"):
scale, or simple black
Take each axes in the figure and transform its content to black and white.
Lines are tranformed based on different line styles. Fills such as can
Lines are transformed based on different line styles. Fills such as can
be used in `meth`:envelopes are gray-scaled. Heathmaps are also gray-scaled.
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/analysis/feature_scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_ex_feature_scores(
# min_samples_leaf
# 1000 - >
# then proportional based on sqrt of N
# dus sqrt(N) / Sqrt(1000) met 1 als minimumd
# dus sqrt(N) / Sqrt(1000) met 1 also minimumd
if max_features is None:
max_features = int(round(x.shape[1] / 3))
if min_samples_leaf is None:
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/analysis/pairs_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def pairs_density(
hexbin makes hexagonal binning plot of x versus y, where x, y are 1-D
sequences of the same length, N. If C is None (the default), this is a
histogram of the number of occurences of the observations at (x[i],y[i]).
histogram of the number of occurrences of the observations at (x[i],y[i]).
For further detail see `matplotlib on hexbin <https://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.hexbin>`_
Parameters
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/analysis/parcoords.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def legend(self):
plt.subplots_adjust(wspace=0)

def _plot(self, data, **kwargs):
"""Plot the data onto the paralel axis
"""Plot the data onto the parallel axis
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/analysis/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def single_envelope(outcomes, outcome_to_plot, time, density, ax, ax_d, fill, lo
Parameters
----------
outcomes : OutcomesDict
a dictonary containing the various outcomes to plot
a dictionary containing the various outcomes to plot
outcome_to_plot : str
the specific outcome to plot
time : str
Expand Down
6 changes: 3 additions & 3 deletions ema_workbench/analysis/plotting_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def group_density(ax_d, density, outcomes, outcome_to_plot, group_labels, log=Fa
Raises
------
EMAError
if density is unkown
if density is unknown
"""
values = [outcomes[key][outcome_to_plot][:, index] for key in group_labels]
Expand Down Expand Up @@ -415,7 +415,7 @@ def make_legend(categories, ax, ncol=3, legend_type=LegendEnum.LINE, alpha=1):
# edgecolors = 'k',
# offsets = (0,0)
# )
# TODO work arround, should be a proper proxyartist for scatter
# TODO work around, should be a proper proxyartist for scatter
# legends
artist = mpl.lines.Line2D([0], [0], linestyle="none", c=color, marker="o")

Expand Down Expand Up @@ -865,7 +865,7 @@ def make_grid(outcomes_to_show, density=False):

def get_color(index):
"""helper function for cycling over color list if the number of items
is higher than the legnth of the color list
is higher than the length of the color list
"""
corrected_index = index % len(COLOR_LIST)
return COLOR_LIST[corrected_index]
4 changes: 2 additions & 2 deletions ema_workbench/analysis/prim.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def inspect_tradeoff(self):
items = df[dim].values[0]
for j, item in enumerate(items):
# we need to have tick labeling to be dynamic?
# adding it to the dict wont work, creates horrible figure
# adding it to the dict won't work, creates horrible figure
# unless we can force a selection?
name = f"{dim}, {qp.loc[qp.index[0], dim]: .2g}"
entry = dict(
Expand Down Expand Up @@ -1652,7 +1652,7 @@ def _assert_mode(self, y, mode, update_function):

def _assert_dtypes(self, keys, dtypes):
"""
helper fucntion that checks whether none of the provided keys
helper function that checks whether none of the provided keys
has a dtype object as value.
"""

Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/analysis/prim_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def rotate_subset(experiments, y):
"""
mean = np.mean(experiments, axis=0)
std = np.std(experiments, axis=0)
std[std == 0] = 1 # in order to avoid a devision by zero
std[std == 0] = 1 # in order to avoid a division by zero
experiments = (experiments - mean) / std

# normalize the data
Expand Down
4 changes: 2 additions & 2 deletions ema_workbench/analysis/scenario_discovery_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def _determine_restricted_dims(box_limits, box_init):
def _determine_nr_restricted_dims(box_lims, box_init):
"""
determine the number of restriced dimensions of a box given
compared to the inital box that contains all the data
determine the number of restricted dimensions of a box given
compared to the initial box that contains all the data
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/connectors/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class BaseExcelModel(FileModel):
model neat with legible names, while not demanding that workbook
cells be named. Each (key, value) pair in pointers maps a key that
gives the (concise) name of an input or output for the model to an
identfier for that input or output in the Excel workbook, in
identifier for that input or output in the Excel workbook, in
'sheetName!A1' or 'sheetName!NamedCell' notation (the sheet name
is optional if the cell or range exists in the default sheet).
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/connectors/pysd_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def run_experiment(self, experiment):

def reset_model(self):
"""
Method for reseting the model to its initial state. The default
Method for resetting the model to its initial state. The default
implementation only sets the outputs to an empty dict.
"""
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/connectors/vensim.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def get_data(filename, varname, step=1):
varname : str
the name of the variable to retrieve data on
step : int (optional)
steps used in slicing. Defaults to 1, meaning the full recored time
steps used in slicing. Defaults to 1, meaning the full recorded time
series is returned.
Returns
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/em_framework/ema_ipyparallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def starter():
pass

logwatcher_thread = threading.Thread(target=starter)
logwatcher_thread.deamon = True
logwatcher_thread.daemon = True
logwatcher_thread.start()

return logwatcher, logwatcher_thread
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/em_framework/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def retrieve_output(self):

@method_logger(__name__)
def reset_model(self):
"""Method for reseting the model to its initial state. The default
"""Method for resetting the model to its initial state. The default
implementation only sets the outputs to an empty dict.
"""
Expand Down
2 changes: 0 additions & 2 deletions ema_workbench/em_framework/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,6 @@ class ArchiveLogger(AbstractConvergenceMetric):
decision_varnames : list of str
outcome_varnames : list of str
base_filename : str, optional
"""

def __init__(
Expand Down
6 changes: 3 additions & 3 deletions ema_workbench/em_framework/outcomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class AbstractOutcome(Variable):
----------
name : str
Name of the outcome.
kind : {INFO, MINIMZE, MAXIMIZE}, optional
kind : {INFO, MINIMIZE, MAXIMIZE}, optional
variable_name : str, optional
if the name of the outcome in the underlying model
is different from the name of the outcome, you can
Expand Down Expand Up @@ -258,7 +258,7 @@ class ScalarOutcome(AbstractOutcome):
----------
name : str
Name of the outcome.
kind : {INFO, MINIMZE, MAXIMIZE}, optional
kind : {INFO, MINIMIZE, MAXIMIZE}, optional
variable_name : str, optional
if the name of the outcome in the underlying model
is different from the name of the outcome, you can
Expand Down Expand Up @@ -567,7 +567,7 @@ def create_outcomes(outcomes, **kwargs):
Parameters
----------
outcomes : DataFrame, or something convertable to a DataFrame
outcomes : DataFrame, or something convertible to a DataFrame
in case of string, the string will be passed
Returns
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/em_framework/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class CategoricalParameter(IntegerParameter):
multivalue : boolean
if categories have a set of values, for each variable_name
a different one.
# TODO: should multivalue not be a seperate class?
# TODO: should multivalue not be a separate class?
# TODO: multivalue as label is also horrible
"""
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/em_framework/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def experiment_generator(scenarios, model_structures, policies, combine="factori

# TODO combine_ functions can be made more generic
# basically combine any collection
# wrap around to yield specifc type of class (e.g. point
# wrap around to yield specific type of class (e.g. point

if combine == "sample":
jobs = zip_cycle(model_structures, policies, scenarios)
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/examples/eijgenraam_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def find_height(t):
] # @UndefinedVariable

# having a list like parameter were values are automagically wrappen
# into a list can be quite usefull.....
# into a list can be quite useful.....
model.levers = [RealParameter(f"X{i}", 0, 500) for i in range(1, 7)] + [
RealParameter(f"T{i}", 0, 300) for i in range(1, 7)
]
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/examples/flu_timeseries_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
experiments, outcomes = load_results("./data/1000 flu cases no policy.tar.gz")
data = outcomes["infected fraction R1"]

# calcuate distances
# calculate distances
distances = clusterer.calculate_cid(data)

# plot dedrog
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/examples/lake_model_dps.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_antropogenic_release(xt, c1, c2, r1, r2, w1):
Parameters
----------
xt : float
polution in lake at time t
pollution in lake at time t
c1 : float
center rbf 1
c2 : float
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/examples/lake_model_dps_robust.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_antropogenic_release(xt, c1, c2, r1, r2, w1):
Parameters
----------
xt : float
polution in lake at time t
pollution in lake at time t
c1 : float
center rbf 1
c2 : float
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/examples/lake_model_sample_jointly.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_antropogenic_release(xt, c1, c2, r1, r2, w1):
Parameters
----------
xt : float
polution in lake at time t
pollution in lake at time t
c1 : float
center rbf 1
c2 : float
Expand Down
2 changes: 1 addition & 1 deletion ema_workbench/examples/lookup_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Created on Oct 1, 2012
This is a simple example of the lookup uncertainty provided for
use in conjuction with vensim models. This example is largely based on
use in conjunction with vensim models. This example is largely based on
`Eker et al. (2014) <https://onlinelibrary.wiley.com/doi/10.1002/sdr.1518/suppinfo>`_
@author: sibeleker
Expand Down
Loading

0 comments on commit f040e03

Please sign in to comment.