ipums / ipumspy

Mozilla Public License 2.0
8 stars 6 forks source link

Extract to dict #65

Closed renae-r closed 2 years ago

renae-r commented 2 years ago

Added a method that is essentially the inverse of the extract_from_dict method to easily export an extract object to a dict. This with the idea that it will be easier for users to share submission-ready extract definitions this way. Accompanying doc updates.

codecov[bot] commented 2 years ago

Codecov Report

Merging #65 (cd83282) into master (f42fd77) will increase coverage by 0.57%. The diff coverage is 80.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   76.31%   76.88%   +0.57%     
==========================================
  Files          12       12              
  Lines         591      610      +19     
==========================================
+ Hits          451      469      +18     
- Misses        140      141       +1     
Impacted Files Coverage Δ
src/ipumspy/api/extract.py 87.34% <78.94%> (+1.85%) :arrow_up:
src/ipumspy/api/core.py 66.04% <100.00%> (+0.21%) :arrow_up:
src/ipumspy/api/exceptions.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 f42fd77...cd83282. Read the comment docs.

khwilson commented 2 years ago

The tests will get you every time for black. :-)

If you want, we can add some pre-commit hooks that automatically run black

khwilson commented 2 years ago

LGTM!

renae-r commented 2 years ago

Yay! Also added pre-commit hook to run black as suggested, because I am going to keep forgetting to run it myself. Leaving the pickle thing in the pile of things to improve but that aren't emergencies.

khwilson commented 2 years ago

Nice!