Skip to content

Commit

Permalink
hxltmcli: discovered (not fully solved) corner case: if using --sheet…
Browse files Browse the repository at this point in the history
… (not csv or remote gsheet) index of columns is of by one
  • Loading branch information
fititnt committed Mar 20, 2022
1 parent 7315e1b commit 23c6e13
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 24 additions & 1 deletion bin/hxltmcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,10 @@ def execute_cli(self, pyargs,

hxlated_input = pyargs.outfile

# with open(hxlated_input) as _file:
# print(_file.read())
# print(hxlated_input)

# _[eng-Latn]
# This step will do raw analysis of the hxlated_input on a
# temporary on the disk.
Expand Down Expand Up @@ -2986,7 +2990,14 @@ def _initialle(
# if columnam_collectionem is not None and item_num in
if columnam_collectionem is not None:
col_meta = columnam_collectionem[item_num]
# print('acerto')

# Corner case: checking before if index exist.
# # Need with XLSX source. Need more testing
# if item_num in columnam_collectionem:
# col_meta = columnam_collectionem[item_num]
# else:
# continue

else:
# print('erro')
col_meta = None
Expand Down Expand Up @@ -3277,6 +3288,13 @@ def reducendum_de_datum(
(rem_num <= limitem_quantitatem):
resultatum.append(datum[rem_num][columnam])

# # Corner case: checking before if index exist.
# # Need with XLSX source. Need more testing
# if columnam in datum[rem_num]:
# resultatum.append(datum[rem_num][columnam])
# else:
# continue

return resultatum

def v(self, _verbosum: bool = False): # pylint: disable=invalid-name
Expand Down Expand Up @@ -3537,6 +3555,11 @@ def reducendum_grupum_indicem_de_datum(
for conceptum_indicem in cci:
# print(conceptum_indicem)

# # Corner case: checking before if index exist.
# # Need with XLSX source. Need more testing
# if conceptum_indicem not in lineam:
# continue

# in: conceptum (columnam de lineam)
if lineam[conceptum_indicem]:
# print(conceptum_indicem)
Expand Down
2 changes: 1 addition & 1 deletion ontologia/cor.hxltm.215.yml
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ normam:
<fileDesc>
<titleStmt>
<title>{{- ____.glossarium_titulum -}}</title>
<note>Lorem ipsum dolor semet</note>
<note>{{- ____.glossarium_annotationem -}}</note>
</titleStmt>
<sourceDesc>
<p>{{ ____.glossarium_fontem }}</p>
Expand Down

0 comments on commit 23c6e13

Please sign in to comment.