diff --git a/misc/gist/qt_and_tornado.py b/misc/gist/qt_and_tornado.py index 4bc1a24359..afab507004 100644 --- a/misc/gist/qt_and_tornado.py +++ b/misc/gist/qt_and_tornado.py @@ -86,7 +86,7 @@ def do_gui_stuff(self, response): self.setStyleSheet("background-color: orange;") -# run the tornado loop in a seperate thread +# run the tornado loop in a separate thread thread = threading.Thread(target=lambda : tornado.ioloop.IOLoop.current().start()) thread.setDaemon(True) thread.start() diff --git a/packages/vaex-core/vaex/__init__.py b/packages/vaex-core/vaex/__init__.py index 5724d9b938..0e38fd49a8 100644 --- a/packages/vaex-core/vaex/__init__.py +++ b/packages/vaex-core/vaex/__init__.py @@ -457,15 +457,15 @@ def add(name, column): return from_dict(columns) -def from_ascii(path, seperator=None, names=True, skip_lines=0, skip_after=0, **kwargs): +def from_ascii(path, separator=None, names=True, skip_lines=0, skip_after=0, **kwargs): """ - Create an in memory DataFrame from an ascii file (whitespace seperated by default). + Create an in memory DataFrame from an ascii file (whitespace separated by default). >>> ds = vx.from_ascii("table.asc") - >>> ds = vx.from_ascii("table.csv", seperator=",", names=["x", "y", "z"]) + >>> ds = vx.from_ascii("table.csv", separator=",", names=["x", "y", "z"]) :param path: file path - :param seperator: value seperator, by default whitespace, use "," for comma seperated values. + :param separator: value separator, by default whitespace, use "," for comma separated values. :param names: If True, the first line is used for the column names, otherwise provide a list of strings with names :param skip_lines: skip lines at the start of the file :param skip_after: skip lines at the end of the file @@ -480,7 +480,7 @@ def from_ascii(path, seperator=None, names=True, skip_lines=0, skip_after=0, **k names = False else: namelist = None - data = rc.readcol(path, fsep=seperator, asdict=namelist is None, names=names, skipline=skip_lines, skipafter=skip_after, **kwargs) + data = rc.readcol(path, fsep=separator, asdict=namelist is None, names=names, skipline=skip_lines, skipafter=skip_after, **kwargs) if namelist: for name, array in zip(namelist, data.T): ds.add_column(name, array) diff --git a/packages/vaex-core/vaex/docstrings.py b/packages/vaex-core/vaex/docstrings.py index f786c0397c..279ddfbd6f 100644 --- a/packages/vaex-core/vaex/docstrings.py +++ b/packages/vaex-core/vaex/docstrings.py @@ -15,7 +15,7 @@ def docsubst(f): _doc_snippets["percentile_shape"] = """shape for the array where the cumulative histogram is calculated on, integer type""" _doc_snippets["selection"] = """Name of selection to use (or True for the 'default'), or all the data (when selection is None or False), or a list of selections""" _doc_snippets["selection1"] = """Name of selection to use (or True for the 'default'), or all the data (when selection is None or False)""" -_doc_snippets["delay"] = """Do not return the result, but a proxy for asychronous calculations (currently only for internal use)""" +_doc_snippets["delay"] = """Do not return the result, but a proxy for asynchronous calculations (currently only for internal use)""" _doc_snippets["progress"] = """True to display a progress bar, or a callable that takes one argument (a floating point value between 0 and 1) indicating the progress, calculations are cancelled when this callable returns False""" _doc_snippets["expression_limits"] = _doc_snippets["expression"] _doc_snippets["grid"] = """If grid is given, instead if compuation a statistic given by what, use this Nd-numpy array instead, this is often useful when a custom computation/statistic is calculated, but you still want to use the plotting machinery.""" diff --git a/packages/vaex-core/vaex/file/asyncio.py b/packages/vaex-core/vaex/file/asyncio.py index 6928788a11..6044daae99 100644 --- a/packages/vaex-core/vaex/file/asyncio.py +++ b/packages/vaex-core/vaex/file/asyncio.py @@ -107,7 +107,7 @@ def chunks(self): logger.debug('stop yielding, file closed') break # if isinstance(item, BaseException): - # logger.debug('stop yielding, exception occured') + # logger.debug('stop yielding, exception occurred') # raise item yield item if self.exception: diff --git a/packages/vaex-core/vaex/legacy.py b/packages/vaex-core/vaex/legacy.py index 36fb1ec42d..98c257c3da 100644 --- a/packages/vaex-core/vaex/legacy.py +++ b/packages/vaex-core/vaex/legacy.py @@ -292,8 +292,8 @@ def __init__(self, subspaces): def __len__(self): return len(self.subspaces) - def names(self, seperator=" "): - return [seperator.join(subspace.expressions) for subspace in self.subspaces] + def names(self, separator=" "): + return [separator.join(subspace.expressions) for subspace in self.subspaces] def expressions_list(self): return [subspace.expressions for subspace in self.subspaces] @@ -550,7 +550,7 @@ def image_rgba(self, grid=None, size=256, limits=None, square=False, center=None grid = self.bin_mean(weight, limits=limits, size=size, group_limits=group_limits, group_by=group_by) else: grid = self.histogram(limits=limits, size=size, weight=weight, group_limits=group_limits, group_by=group_by) - if grid is None: # cancel occured + if grid is None: # cancel occurred return import matplotlib.cm background_color = np.array(matplotlib.colors.colorConverter.to_rgb(background_color)) diff --git a/packages/vaex-core/vaex/settings.py b/packages/vaex-core/vaex/settings.py index 069388c660..4d03d04c87 100644 --- a/packages/vaex-core/vaex/settings.py +++ b/packages/vaex-core/vaex/settings.py @@ -66,7 +66,7 @@ class Config: class TaskTracker(BaseSettings): """task tracking/protection when using vaex in a service""" - type: str = Field('', title="Comma seperated string of trackers to run while executing tasks", env="VAEX_TASK_TRACKER") + type: str = Field('', title="Comma separated string of trackers to run while executing tasks", env="VAEX_TASK_TRACKER") class Config: use_enum_values = True env_prefix = 'vaex_task_tracker_' @@ -146,10 +146,10 @@ class Logging(BaseSettings): """ setup : bool = Field(True, title='Setup logging for Vaex at import time.') rich : bool = Field(True, title='Use rich logger (colored fancy output).') - debug : str = Field('', title="Comma seperated list of loggers to set to the debug level (e.g. 'vaex.settings,vaex.cache'), or a '1' to set the root logger ('vaex')") - info : str = Field('', title="Comma seperated list of loggers to set to the info level (e.g. 'vaex.settings,vaex.cache'), or a '1' to set the root logger ('vaex')") - warning : str = Field('vaex', title="Comma seperated list of loggers to set to the warning level (e.g. 'vaex.settings,vaex.cache'), or a '1' to set the root logger ('vaex')") - error : str = Field('', title="Comma seperated list of loggers to set to the error level (e.g. 'vaex.settings,vaex.cache'), or a '1' to set the root logger ('vaex')") + debug : str = Field('', title="Comma separated list of loggers to set to the debug level (e.g. 'vaex.settings,vaex.cache'), or a '1' to set the root logger ('vaex')") + info : str = Field('', title="Comma separated list of loggers to set to the info level (e.g. 'vaex.settings,vaex.cache'), or a '1' to set the root logger ('vaex')") + warning : str = Field('vaex', title="Comma separated list of loggers to set to the warning level (e.g. 'vaex.settings,vaex.cache'), or a '1' to set the root logger ('vaex')") + error : str = Field('', title="Comma separated list of loggers to set to the error level (e.g. 'vaex.settings,vaex.cache'), or a '1' to set the root logger ('vaex')") class Config(ConfigDefault): env_prefix = 'vaex_logging_' diff --git a/packages/vaex-core/vaex/test/dataset.py b/packages/vaex-core/vaex/test/dataset.py index 3d7146e240..59d525a121 100644 --- a/packages/vaex-core/vaex/test/dataset.py +++ b/packages/vaex-core/vaex/test/dataset.py @@ -395,13 +395,13 @@ def test_csv(self): self.assertEqual(changes[1], ['index'], "mssing columns") def test_ascii(self): - for seperator in " \t,": + for separator in " \t,": for use_header in [True, False]: - #print(">>>", repr(seperator), use_header) + #print(">>>", repr(separator), use_header) fn = tempfile.mktemp("asc") with open(fn, "w") as f: if use_header: - print(seperator.join(["x", "y"]), file=f) + print(separator.join(["x", "y"]), file=f) # Scalar representation changed in numpy to to np.float64(0.0) for instance to # avoid ambiguities @@ -411,21 +411,21 @@ def test_ascii(self): _repr = repr for x, y, name in zip(self.x, self.y, self.dataset.data.name): - print(seperator.join(map(_repr, [x, y])), file=f) + print(separator.join(map(_repr, [x, y])), file=f) #with open(fn) as f: # print(f.read()) - sep = seperator - if seperator == " ": + sep = separator + if separator == " ": sep = None if use_header: - ds = vx.from_ascii(fn, seperator=sep) + ds = vx.from_ascii(fn, separator=sep) else: - ds = vx.from_ascii(fn, seperator=seperator, names="x y".split()) + ds = vx.from_ascii(fn, separator=separator, names="x y".split()) np.testing.assert_array_almost_equal(ds.data.x, self.x) np.testing.assert_array_almost_equal(ds.data.y, self.y) #np.testing.assert_array_equal(ds.data.names, self.dataset.data.name) - #if seperator == ",": + #if separator == ",": # df = pd.read_csv(fn) # ds = vx.from_pandas(df) # np.testing.assert_array_almost_equal(ds.data.x, self.x) diff --git a/packages/vaex-hdf5/vaex/hdf5/dataset.py b/packages/vaex-hdf5/vaex/hdf5/dataset.py index 950429aff0..4b5ab2c09b 100644 --- a/packages/vaex-hdf5/vaex/hdf5/dataset.py +++ b/packages/vaex-hdf5/vaex/hdf5/dataset.py @@ -99,7 +99,7 @@ def __setstate__(self, state): self._freeze() def write_meta(self): - """ucds, descriptions and units are written as attributes in the hdf5 file, instead of a seperate file as + """ucds, descriptions and units are written as attributes in the hdf5 file, instead of a separate file as the default :func:`Dataset.write_meta`. """ with h5py.File(self.path, "r+") as h5file_output: diff --git a/packages/vaex-ui/vaex/ui/completer.py b/packages/vaex-ui/vaex/ui/completer.py index 40ade64c9c..1bd40fe25a 100644 --- a/packages/vaex-ui/vaex/ui/completer.py +++ b/packages/vaex-ui/vaex/ui/completer.py @@ -131,7 +131,7 @@ def case(word): class UCDCompleter(Completer): """ UCDs have primary words (that come first), and secondary, that come after the second - UCD words are seperated by a ; char + UCD words are separated by a ; char """ def __init__(self, line_edit): diff --git a/packages/vaex-ui/vaex/ui/layers.py b/packages/vaex-ui/vaex/ui/layers.py index 738da4850b..c00a1ca25a 100644 --- a/packages/vaex-ui/vaex/ui/layers.py +++ b/packages/vaex-ui/vaex/ui/layers.py @@ -1076,7 +1076,7 @@ def message(self, *args, **kwargs): pass def on_error(self, exception): - logger.exception("unhandled error occured: %r", exception) + logger.exception("unhandled error occurred: %r", exception) self.finished_tasks() traceback.print_exc() raise exception diff --git a/packages/vaex-ui/vaex/ui/main.py b/packages/vaex-ui/vaex/ui/main.py index 83716cf023..6bc45c6a36 100644 --- a/packages/vaex-ui/vaex/ui/main.py +++ b/packages/vaex-ui/vaex/ui/main.py @@ -1360,7 +1360,7 @@ def error(msg): index += 1 self.dataset_selector.add(dataset) - # for this dataset, keep opening plots (seperated by -) or add layers (seperated by +) + # for this dataset, keep opening plots (separated by -) or add layers (separated by +) plot = plot if hold_plot else None options = {} # if we find -- we don't plot but do sth else diff --git a/packages/vaex-ui/vaex/ui/plot_windows.py b/packages/vaex-ui/vaex/ui/plot_windows.py index e60e447cee..fa3ed49272 100644 --- a/packages/vaex-ui/vaex/ui/plot_windows.py +++ b/packages/vaex-ui/vaex/ui/plot_windows.py @@ -1210,7 +1210,7 @@ def update_direct(self, layer=None): logger.debug("waiting for promises %r to finish", promises) def on_error_or_cancel(self, error): - logger.exception("error occured: %r", error, exc_info=error) + logger.exception("error occurred: %r", error, exc_info=error) traceback.print_exc() # raise exception raise error diff --git a/packages/vaex-ui/vaex/ui/qt.py b/packages/vaex-ui/vaex/ui/qt.py index a2803afb7e..d77a40b8c0 100644 --- a/packages/vaex-ui/vaex/ui/qt.py +++ b/packages/vaex-ui/vaex/ui/qt.py @@ -990,7 +990,7 @@ def qt_exception(parent, exctype, value, traceback): # , platform.architecture(), platform.dist(), platform.linux_distribution(), report = info + "\n" + trace - text = """An unexpected error occured, you may press ok and continue, but the program might be unstable. + text = """An unexpected error occurred, you may press ok and continue, but the program might be unstable. """ + report diff --git a/packages/vaex-ui/vaex/ui/ranking.py b/packages/vaex-ui/vaex/ui/ranking.py index 6c2d667b53..ffb5773f04 100644 --- a/packages/vaex-ui/vaex/ui/ranking.py +++ b/packages/vaex-ui/vaex/ui/ranking.py @@ -608,7 +608,7 @@ def onclick(dim=2): self.tab1d_button_layout.addWidget(self.button_actions) self.filter_line_edit = QtGui.QLineEdit(self) - self.filter_line_edit.setPlaceholderText("Enter space seperated search terms") + self.filter_line_edit.setPlaceholderText("Enter space separated search terms") self.filter_line_edit.textEdited.connect(functools.partial(self.onFilter, table=self.table1d)) self.tab1dlayout.addWidget(self.filter_line_edit) @@ -751,7 +751,7 @@ def func(index, previous, name=""): self.selectionModel.currentChanged.connect(functools.partial(func, name="currentChanged")) self.filter_Nd_line_edit = QtGui.QLineEdit(self) - self.filter_Nd_line_edit.setPlaceholderText("Enter space seperated search terms") + self.filter_Nd_line_edit.setPlaceholderText("Enter space separated search terms") self.filter_Nd_line_edit.textEdited.connect(functools.partial(self.onFilter, table=self.tableNd)) self.tabNdlayout.addWidget(self.filter_Nd_line_edit) diff --git a/tests/category_test.py b/tests/category_test.py index 3f2effdd64..b6dd86eeef 100644 --- a/tests/category_test.py +++ b/tests/category_test.py @@ -73,7 +73,7 @@ def test_cat_missing_values(lazy): ds = ds0.ordinal_encode('colors', ['red', 'green', 'blue'], lazy=lazy) assert ds.count(binby=ds.colors, edges=True).tolist() == [1, 2, 1, 1, 0] - # if we want missing values and non-categorized values to be reported seperately + # if we want missing values and non-categorized values to be reported separately # the following is expected # ds = ds0.ordinal_encode('colors', ['red', 'green']) # assert ds.count(binby=ds.colors, edges=True).tolist() == [1, 0, 1, 2, 0, 1] diff --git a/tests/compute_test.py b/tests/compute_test.py index 5f70c17898..20fe42fcb7 100644 --- a/tests/compute_test.py +++ b/tests/compute_test.py @@ -55,7 +55,7 @@ def test_stay_same_type(x): def test_mix_string_and_numeric(x, s): df = vaex.from_arrays(x=x, s=s) - # TODO: Note that this is a seperate bug, it ignored the missing value + # TODO: Note that this is a separate bug, it ignored the missing value assert (df.s == 'a').tolist() == [True, False, False, False] assert (df.x == 1).tolist() == [False, True, False, None] assert ((df.s == 'a') | (df.x == 1)).tolist()[0] is True diff --git a/tests/groupby_test.py b/tests/groupby_test.py index cbe943a286..b363e0e830 100644 --- a/tests/groupby_test.py +++ b/tests/groupby_test.py @@ -739,7 +739,7 @@ def take(ar, indices): def test_row_limit_sparse(): x = np.arange(100) % 10 y = np.arange(100) % 11 - # > 11 combinations, but not x and y seperately + # > 11 combinations, but not x and y separately # we should force a 'compress' phase to detect the row_limit df = vaex.from_arrays(x=x, y=y) with pytest.raises(vaex.RowLimitException, match='.* would have >= 11 unique combinations.*'):