Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion misc/gist/qt_and_tornado.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
10 changes: 5 additions & 5 deletions packages/vaex-core/vaex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-core/vaex/docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-core/vaex/file/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions packages/vaex-core/vaex/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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))
Expand Down
10 changes: 5 additions & 5 deletions packages/vaex-core/vaex/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_'
Expand Down Expand Up @@ -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_'

Expand Down
18 changes: 9 additions & 9 deletions packages/vaex-core/vaex/test/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-hdf5/vaex/hdf5/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-ui/vaex/ui/completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-ui/vaex/ui/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-ui/vaex/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 --<task> we don't plot but do sth else
Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-ui/vaex/ui/plot_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-ui/vaex/ui/qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions packages/vaex-ui/vaex/ui/ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion tests/category_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tests/compute_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/groupby_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.*'):
Expand Down