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

Mini queryset replacement #330

Closed
wants to merge 2 commits into from
Closed

Mini queryset replacement #330

wants to merge 2 commits into from

Conversation

tony
Copy link
Member

@tony tony commented Apr 16, 2022

We need a way to return a list of objects. Should be:

  • Simplicity over performance
  • Not meant for speed. ~100 objects.
  • Iterable as a list through a for loop
  • Iterable as a dictionary (pk, obj) via .items()
  • Support direct lookups via a pk (e.g. git remote name)
  • Support any (fixed) type of list item
  • Type annotated

Nice to have:

  • Should be comparable to other queryset objects

    Including inner data, if possible

  • One file

  • Simple

@codecov
Copy link

codecov bot commented Apr 17, 2022

Codecov Report

Merging #330 (9a3ef73) into master (c97aa0d) will increase coverage by 0.79%.
The diff coverage is 84.74%.

❗ Current head 9a3ef73 differs from pull request most recent head c1649fe. Consider uploading reports for the commit c1649fe to get more accurate results

@@            Coverage Diff             @@
##           master     #330      +/-   ##
==========================================
+ Coverage   72.51%   73.31%   +0.79%     
==========================================
  Files          21       23       +2     
  Lines        1703     1821     +118     
==========================================
+ Hits         1235     1335     +100     
- Misses        468      486      +18     
Impacted Files Coverage Δ
libvcs/utils/list_query.py 83.17% <83.17%> (ø)
tests/utils/test_list_query.py 100.00% <100.00%> (ø)

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 c97aa0d...c1649fe. Read the comment docs.

@tony tony force-pushed the mini-queryset branch 16 times, most recently from 4616e94 to 7c1508a Compare April 21, 2022 20:47
@tony tony force-pushed the mini-queryset branch 3 times, most recently from a71cd97 to f19688d Compare April 22, 2022 23:36
@tony
Copy link
Member Author

tony commented Apr 22, 2022

#334

@tony tony closed this Apr 22, 2022
@tony tony deleted the mini-queryset branch April 22, 2022 23:47
@tony tony added this to the v0.12 milestone May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant