Skip to content

Commit 9eb749a

Browse files
author
James (ODSC)
authored
Merge pull request #462 from OpenDataServices/pr-459
Pr 459
2 parents 62247ad + c7de0e7 commit 9eb749a

File tree

13 files changed

+21
-17
lines changed

13 files changed

+21
-17
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88

99
### Fixed
1010

11+
- Some typos in docs, comments and examples
12+
- Put back some translations that were removed
13+
- Minor python tidyups
1114
- Avoid deprecation warning from the ijson package. https://github.com/OpenDataServices/flatten-tool/pull/458
1215

1316
### Removed

examples/bods/schema/components.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
},
5050
"assertedBy": {
5151
"title": "Asserted by",
52-
"description": "Who is making this statement? This may be the name of the person or organisation making a self-declaration (in which case, please make sure the name field matches the organisation or person name field), or the name or description of some other party. If this statment has been verified, this may also include the name of the organisation providing verification.",
52+
"description": "Who is making this statement? This may be the name of the person or organisation making a self-declaration (in which case, please make sure the name field matches the organisation or person name field), or the name or description of some other party. If this statement has been verified, this may also include the name of the organisation providing verification.",
5353
"type": "array",
5454
"items": {
5555
"$ref": "#/definitions/Agent"
@@ -375,7 +375,7 @@
375375
},
376376
"description": {
377377
"title": "Description",
378-
"description": "A free-text description to annotate this statment or field.",
378+
"description": "A free-text description to annotate this statement or field.",
379379
"type": "string"
380380
},
381381
"transformedContent": {
@@ -489,4 +489,4 @@
489489
}
490490
}
491491
}
492-
}
492+
}

examples/bods/schema/entity-statement.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
},
8686
"dissolutionDate": {
8787
"title": "Dissolution date",
88-
"description": "If this entity is no longer active, provide the date on which it was disolved or ceased. Please provide as precise a date as possible in ISO 8601 format. When only the year or year and month is known, these can be given as YYYY or YYYY-MM.",
88+
"description": "If this entity is no longer active, provide the date on which it was dissolved or ceased. Please provide as precise a date as possible in ISO 8601 format. When only the year or year and month is known, these can be given as YYYY or YYYY-MM.",
8989
"type": "string",
9090
"pattern": "^([\\+-]?\\d{4}(?!\\d{2}\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$",
9191
"propertyOrder": 35
@@ -131,4 +131,4 @@
131131
"statementType",
132132
"entityType"
133133
]
134-
}
134+
}

examples/bods/schema/person-statement.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "person-statment.json",
2+
"id": "person-statement.json",
33
"$schema": "http://json-schema.org/draft-04/schema#",
44
"version": "0.1",
55
"type": "object",
@@ -141,4 +141,4 @@
141141
"missingPersonType"
142142
]
143143
}
144-
}
144+
}

flattentool/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def main():
364364
try:
365365
# Note: Ensures that empty arguments are not passed to the create_template function
366366
create_template(**kwargs_from_parsed_args(args))
367-
except (OSError, IOError) as e:
367+
except OSError as e:
368368
print(str(e))
369369
return
370370
elif args.subparser_name == "flatten":

flattentool/input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ def read_sheets(self):
731731
for sheet in self.exclude_sheets or []:
732732
self.sheet_names_map.pop(sheet, None)
733733

734-
sheet_names = list(sheet for sheet in self.sheet_names_map.keys())
734+
sheet_names = list(self.sheet_names_map.keys())
735735
self.sub_sheet_names = sheet_names
736736
self.configure_sheets()
737737

flattentool/json_input.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def parse(self):
333333
continue
334334

335335
self.parse_json_dict(json_dict, sheet=self.main_sheet)
336-
# only persist every 2000 objects. peristing more often slows down storing.
336+
# only persist every 2000 objects. persisting more often slows down storing.
337337
# 2000 top level objects normally not too much to store in memory.
338338
if num % 2000 == 0 and num != 0:
339339
transaction.commit()

flattentool/locale/en/LC_MESSAGES/flatten-tool.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ msgid ""
143143
msgstr ""
144144

145145
#: flattentool/json_input.py:193
146-
msgid "Etiher json_filename or root_json_dict must be supplied"
146+
msgid "Either json_filename or root_json_dict must be supplied"
147147
msgstr ""
148148

149149
#: flattentool/json_input.py:198
@@ -216,7 +216,7 @@ msgstr ""
216216

217217
#: flattentool/schema.py:390
218218
msgid ""
219-
"Unknown type_set: {}, did you forget to explicity set the \"type\" key on"
219+
"Unknown type_set: {}, did you forget to explicitly set the \"type\" key on"
220220
" \"items\"?"
221221
msgstr ""
222222

flattentool/locale/es/LC_MESSAGES/flatten-tool.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ msgstr ""
174174
"como una lista en un archivo o mediante un esquema)"
175175

176176
#: flattentool/json_input.py:193
177-
msgid "Etiher json_filename or root_json_dict must be supplied"
177+
msgid "Either json_filename or root_json_dict must be supplied"
178178
msgstr "Se debe proporcionar el r json_filename o root_json_dict"
179179

180180
#: flattentool/json_input.py:198
@@ -261,7 +261,7 @@ msgstr ""
261261

262262
#: flattentool/schema.py:390
263263
msgid ""
264-
"Unknown type_set: {}, did you forget to explicity set the \"type\" key on "
264+
"Unknown type_set: {}, did you forget to explicitly set the \"type\" key on "
265265
"\"items\"?"
266266
msgstr ""
267267
"Type_set desconocido: {}, ¿olvidó establecer explícitamente la clave "

flattentool/sort_xml.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def get_schema_element(self, tag_name, name_attribute):
6666
Return the specified element from the schema.
6767
6868
tag_name -- the name of the tag in the schema, e.g. 'complexType'
69+
6970
name_attribute -- the value of the 'name' attribute in the schema, ie.
7071
the name of the element/type etc. being described,
7172
e.g. iati-activities

0 commit comments

Comments
 (0)