Skip to content

Commit 83a4ef2

Browse files
authored
Merge pull request #365 from OpenDataServices/spellcheck
fix some spelling errors
2 parents c67c918 + ed85acf commit 83a4ef2

13 files changed

+30
-30
lines changed

examples/help/unflatten/expected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ optional arguments:
6767
--xml-schema [XML_SCHEMA [XML_SCHEMA ...]]
6868
Path to one or more XML schemas (used for sorting)
6969
--default-configuration DEFAULT_CONFIGURATION
70-
Comma seperated list of default parsing commands for
70+
Comma separated list of default parsing commands for
7171
all sheets. Only for XLSX not CSV
7272
--root-is-list The root element is a list. --root-list-path and meta
7373
data will be ignored.

flattentool/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def create_template(
2929
"""
3030
Creates template file(s) from given inputs
3131
This function is built to deal with commandline input and arguments
32-
but to also be called from elswhere in future
32+
but to also be called from elsewhere in future
3333
3434
"""
3535

flattentool/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def create_parser():
269269
)
270270
parser_unflatten.add_argument(
271271
"--default-configuration",
272-
help="Comma seperated list of default parsing commands for all sheets. Only for XLSX not CSV",
272+
help="Comma separated list of default parsing commands for all sheets. Only for XLSX not CSV",
273273
)
274274
parser_unflatten.add_argument(
275275
"--root-is-list",

flattentool/input.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def fancy_unflatten(self, with_cell_source_map, with_heading_source_map):
471471
if not key in row_source_map:
472472
row_source_map[key] = []
473473
if with_heading_source_map:
474-
# Prepeare header_source_map key
474+
# Prepare header_source_map key
475475
header_path_parts = []
476476
for x in path:
477477
try:
@@ -859,7 +859,7 @@ def get_sheet_lines(self, sheet_name):
859859
for row in worksheet[configuration_line:]
860860
if len(row) > skip_rows
861861
]
862-
longest_horizonal_row = max(
862+
longest_horizontal_row = max(
863863
len(row) for row in worksheet[configuration_line:]
864864
)
865865
remaining_rows = [
@@ -868,7 +868,7 @@ def get_sheet_lines(self, sheet_name):
868868
for row in worksheet[configuration_line:]
869869
if row
870870
]
871-
for i in range(1, longest_horizonal_row)
871+
for i in range(1, longest_horizontal_row)
872872
]
873873
else:
874874
header_row = worksheet[skip_rows + configuration_line]
@@ -948,7 +948,7 @@ def unflatten_main_with_parser(parser, line, timezone, xml, id_name):
948948
except IndexError:
949949
next_path_item = ""
950950

951-
# Quick solution to avoid casting of date as datetinme in spreadsheet > xml
951+
# Quick solution to avoid casting of date as datetime in spreadsheet > xml
952952
if xml:
953953
if type(cell.cell_value) == datetime.datetime and not next_path_item:
954954
if "datetime" not in str(path):
@@ -1147,7 +1147,7 @@ def to_list(self):
11471147

11481148

11491149
def temporarydicts_to_lists(nested_dict):
1150-
""" Recrusively transforms TemporaryDicts to lists inplace. """
1150+
""" Recursively transforms TemporaryDicts to lists inplace. """
11511151
for key, value in nested_dict.items():
11521152
if isinstance(value, Cell):
11531153
continue

flattentool/json_input.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
3-
This file contains code that takes an instace of a JSON file as input (not a
3+
This file contains code that takes an instance of a JSON file as input (not a
44
JSON schema, for that see schema.py).
55
66
"""
@@ -94,7 +94,7 @@ def list_dict_consistency(xml_dict):
9494

9595
class JSONParser(object):
9696
# Named for consistency with schema.SchemaParser, but not sure it's the most appropriate name.
97-
# Similarily with methods like parse_json_dict
97+
# Similarly with methods like parse_json_dict
9898

9999
def __init__(
100100
self,
@@ -186,7 +186,7 @@ def __init__(
186186

187187
if json_filename is None and root_json_dict is None:
188188
raise ValueError(
189-
_("Etiher json_filename or root_json_dict must be supplied")
189+
_("Either json_filename or root_json_dict must be supplied")
190190
)
191191

192192
if json_filename is not None and root_json_dict is not None:
@@ -250,7 +250,7 @@ def parse(self):
250250
for json_dict in root_json_list:
251251
if json_dict is None:
252252
# This is particularly useful for IATI XML, in order to not
253-
# fallover on empty activity, e.g. <iati-activity/>
253+
# fall over on empty activity, e.g. <iati-activity/>
254254
continue
255255
self.parse_json_dict(json_dict, sheet=self.main_sheet)
256256

@@ -361,7 +361,7 @@ def parse_json_dict(
361361
if all(type(x) in BASIC_TYPES for x in value):
362362
# Check for an array of BASIC types
363363
# TODO Make this check the schema
364-
# TODO Error if the any of the values contain the seperator
364+
# TODO Error if the any of the values contain the separator
365365
# TODO Support doubly nested arrays
366366
flattened_dict[sheet_key(sheet, parent_name + key)] = ";".join(
367367
map(str, value)

flattentool/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def parse_schema_dict(
398398
else:
399399
raise ValueError(
400400
_(
401-
'Unknown type_set: {}, did you forget to explicity set the "type" key on "items"?'
401+
'Unknown type_set: {}, did you forget to explicitly set the "type" key on "items"?'
402402
).format(type_set)
403403
)
404404
elif "string" in property_type_set or not property_type_set:

flattentool/tests/test_end_to_end.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
understanding of the expected behaviour of flattentool.
44
55
These tests aren't concerned with the loading and saving of the data or schema,
6-
they are concenred with what flattentool does with those data and schema.
6+
they are concerned with what flattentool does with those data and schema.
77
88
It is worth being aware that the syntax for specifying column headings is
99
modelled closely on the `path` that is returned in any errors from the Python
@@ -21,15 +21,15 @@
2121
Throughout these tests there are a few things we do to make sure we're testing
2222
properly:
2323
24-
* The titles are named differently from the propery names (by adding " Title"
24+
* The titles are named differently from the property names (by adding " Title"
2525
to the name)
2626
2727
* We put differing spacing and capitalisation in the headings from what is used
28-
in titles to make sure that it is the headings that come trhough into the
28+
in titles to make sure that it is the headings that come through into the
2929
source maps, and not the schema titles
3030
3131
* When addresses are used as lists, the array type in the schema must have a
32-
title ("Address Title"), the title of the individual adresses ("Address Item
32+
title ("Address Title"), the title of the individual addresses ("Address Item
3333
Item") doesn't matter
3434
3535
To resolve the $ref entries in the schema, the whole schema is passed through

flattentool/tests/test_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_unflatten(tmpdir):
6666
Perform a full CSV unflattening, and check the output is what we expect.
6767
6868
Notable things we are checking for:
69-
Ordering is preseved - both the order of columns and rows
69+
Ordering is preserved - both the order of columns and rows
7070
"""
7171
input_dir = tmpdir.ensure("release_input", dir=True)
7272
input_dir.join("main.csv").write(

flattentool/tests/test_input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_path_search():
3232
)
3333
is goal_dict
3434
)
35-
# Top is always assumed to be an arary
35+
# Top is always assumed to be an array
3636
assert (
3737
path_search(
3838
{"a1": {"b1": {"c1": goal_dict}}},

flattentool/tests/test_input_SpreadsheetInput.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
Tests of SpreadsheetInput class from input.py, and its chidlren.
3+
Tests of SpreadsheetInput class from input.py, and its children.
44
Tests of unflatten method are in test_input_SpreadsheetInput_unflatten.py
55
"""
66
from __future__ import unicode_literals
@@ -253,7 +253,7 @@ def test_ods_input_integer2(self):
253253
assert list(odsinput.sub_sheet_names) == ["Sheet1"]
254254

255255
def test_xlsx_input_formula(self):
256-
""" When a forumla is present, we should use the value, rather than the
256+
""" When a formula is present, we should use the value, rather than the
257257
formula itself. """
258258

259259
xlsxinput = XLSXInput(input_name="flattentool/tests/fixtures/xlsx/formula.xlsx")
@@ -287,7 +287,7 @@ def test_bad_xlsx(self):
287287
assert False, "No Exception Raised"
288288

289289
def test_ods_input_formula(self):
290-
""" When a forumla is present, we should use the value, rather than the
290+
""" When a formula is present, we should use the value, rather than the
291291
formula itself. """
292292

293293
odsinput = ODSInput(input_name="flattentool/tests/fixtures/ods/formula.ods")
@@ -378,7 +378,7 @@ def test_convert_type(recwarn):
378378
# If not type is specified, ints are kept as ints...
379379
assert convert_type("", 3) == 3
380380

381-
# ... but all other ojbects are converted to strings
381+
# ... but all other objects are converted to strings
382382
class NotAString(object):
383383
def __str__(self):
384384
return "string representation"

0 commit comments

Comments
 (0)