Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix559 Change reference/access of individual pack in the MultiPack from (array) index based to pack_id based (to facilitate delete, insert), with version-enabled backward compatibility #576

Merged
merged 43 commits into from
Mar 4, 2022
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
dca5605
Inital fix for bug/enhancement 559
J007X Nov 16, 2021
3c32cfc
Temp merge of version from 547 -- backward compatibility version chec…
J007X Dec 20, 2021
9a3e758
Temp merge of version from 547 -- backward compatibility version chec…
J007X Dec 20, 2021
705f36f
Version comparison method added /fixed the problematic inline compari…
J007X Dec 21, 2021
2e02944
Merge branch 'asyml:master' into fix559
J007X Dec 22, 2021
08dbd38
fixed black format issue
J007X Dec 22, 2021
84141e1
Merge remote-tracking branch 'origin/fix559' into fix559
J007X Dec 22, 2021
af6386a
fixed lint comment format issue
J007X Dec 22, 2021
9055fd8
fixed lint return issue
J007X Dec 22, 2021
59ad66d
Inital checkin for pack version enabled backward-compatible arrary in…
J007X Jan 13, 2022
cf74406
fixed multi_pack pack_id related issue and add code for handling dese…
J007X Jan 13, 2022
ac5ddec
fixed black format issue
J007X Jan 13, 2022
25daa88
fixed unused exception var issue by lint
J007X Jan 13, 2022
0385d58
#595 related (dictionary key type change after deserialization) fixin…
J007X Jan 27, 2022
e127832
#595 related (dictionary key type change after deserialization) fixin…
J007X Jan 28, 2022
e4a3151
#595 related -- fix black format issue
J007X Jan 28, 2022
89d7c30
Fixed type issue reported by pylint
J007X Feb 1, 2022
83f6fa1
fix pylint incompatible type (in line688) and also change the pylint …
J007X Feb 1, 2022
f1bf15a
fixed black format issue
J007X Feb 1, 2022
56dddfd
type conversion related changes for from_string (as type conversion l…
J007X Feb 1, 2022
845bf81
remove Unused import DEFAULT_PACK_VERSION reported by lint
J007X Feb 1, 2022
7c35381
fix comment line too long issue (689).
J007X Feb 1, 2022
e88014d
added pylint: disable=no-member for fixing of #595 for line 694 and …
J007X Feb 1, 2022
cf5f6a9
fix attribute issue (adding assert)
J007X Feb 1, 2022
cdc70d9
change previous type conversion code to be the same implementation as…
J007X Feb 2, 2022
d002375
fixed black format issue
J007X Feb 2, 2022
122dafe
pylint does not allow local import so change to the top.
J007X Feb 2, 2022
243fffa
fix location of import required by lint
J007X Feb 2, 2022
7c3d081
fix import order complaint by pylint
J007X Feb 2, 2022
1fac83b
Merge branch 'master' into fix559
J007X Feb 3, 2022
501cba5
change version to standard string format and related exception handli…
J007X Feb 16, 2022
304ff6c
Merge remote-tracking branch 'origin/fix559' into fix559
J007X Feb 16, 2022
28e553c
fix import sequence
J007X Feb 16, 2022
b33c4fa
fix import sequence by lint
J007X Feb 16, 2022
93f8473
Merge branch 'master' into fix559
hunterhector Feb 22, 2022
5563f4c
Merge branch 'master' into fix559
J007X Feb 24, 2022
ec7c96c
#559 related test case and comments changes, and backward compatible …
J007X Feb 24, 2022
0d5885d
comments are modified according to comments/requests in PR, also the …
J007X Mar 2, 2022
c9ae49a
Fix spelling issue in comments
J007X Mar 2, 2022
090452e
Update docstring of get_subentry() in multi_pack.py
mylibrar Mar 4, 2022
bcdc2bc
Update docstring of get_subentry
mylibrar Mar 4, 2022
13a8960
Merge branch 'master' into fix559
mylibrar Mar 4, 2022
11b268f
Merge branch 'master' into fix559
hunterhector Mar 4, 2022
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
7 changes: 4 additions & 3 deletions forte/data/multi_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,10 +689,11 @@ def from_string(cls, data_content: str):
# can not use explict type hint for mp as pylint does not allow type change
# from base_pack to multi_pack
mp = super().from_string(data_content)
# pylint: disable=no-member
# (fix 595) change the dictionary's key after deserialization from str back to int
mp._inverse_pack_ref = {
int(k): v for k, v in mp._inverse_pack_ref.items()
assert isinstance(mp._inverse_pack_ref, Dict)
J007X marked this conversation as resolved.
Show resolved Hide resolved
mp._inverse_pack_ref = { # pylint: disable=no-member
int(k): v
for k, v in mp._inverse_pack_ref.items() # pylint: disable=no-member
}

return mp
Expand Down