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

Let get function take range annotation #769

Merged
merged 17 commits into from
May 25, 2022
Merged

Let get function take range annotation #769

merged 17 commits into from
May 25, 2022

Conversation

wanglec
Copy link
Collaborator

@wanglec wanglec commented May 3, 2022

This PR fixes #694 and #744.

Description of changes

Change the get function so that it accepts range annotation, use co-iterator for annotation like, and fix order for non-annotation like subtypes. A helper function that finds the length of entry lists, get_length(self, type_name: str), is also included.

Possible influences of this PR.

Describe what are the possible side-effects of the code change.

Test Conducted

Tests are added in data_store_test.py.

@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #769 (975e16b) into master (a954abf) will increase coverage by 0.04%.
The diff coverage is 94.36%.

@@            Coverage Diff             @@
##           master     #769      +/-   ##
==========================================
+ Coverage   81.08%   81.13%   +0.04%     
==========================================
  Files         249      249              
  Lines       18765    18824      +59     
==========================================
+ Hits        15216    15272      +56     
- Misses       3549     3552       +3     
Impacted Files Coverage Δ
forte/data/data_store.py 90.27% <91.66%> (+0.37%) ⬆️
forte/common/constants.py 100.00% <100.00%> (ø)
forte/data/base_store.py 70.45% <100.00%> (ø)
tests/forte/data/data_store_test.py 94.26% <100.00%> (+0.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a954abf...975e16b. Read the comment docs.

@wanglec wanglec requested a review from hunterhector May 19, 2022 00:31
@hunterhector hunterhector changed the title Issue694 Let get function take range annotation May 19, 2022
forte/data/data_store.py Outdated Show resolved Hide resolved
forte/data/data_store.py Outdated Show resolved Hide resolved
forte/data/data_store.py Outdated Show resolved Hide resolved
@mylibrar mylibrar added this to the 0.3 alpha milestone May 20, 2022
@mylibrar mylibrar linked an issue May 24, 2022 that may be closed by this pull request
3 tasks
forte/data/data_store.py Outdated Show resolved Hide resolved
forte/data/data_store.py Outdated Show resolved Hide resolved
@hunterhector hunterhector merged commit e2ce0a4 into master May 25, 2022
@wanglec wanglec deleted the issue694 branch May 27, 2022 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix get function in data_store.py Implement get_data_with_range in data_store.py
4 participants