ImperialCollegeLondon / pycsvy

Python reader/writer for CSV files with YAML header information
BSD 3-Clause "New" or "Revised" License
6 stars 7 forks source link

Add `read_metadata()` function #26

Closed alexdewar closed 1 year ago

alexdewar commented 1 year ago

Closes #25.

It would be handy to be able to read just the metadata from a data file without having to load everything else. I've added a new read_metadata() function to do this.

alexdewar commented 1 year ago

It looks like #24 needs to be merged first.

codecov[bot] commented 1 year ago

Codecov Report

Merging #26 (58c09d0) into develop (9f57a54) will increase coverage by 0.11%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop      #26      +/-   ##
===========================================
+ Coverage    92.24%   92.36%   +0.11%     
===========================================
  Files            3        3              
  Lines          129      131       +2     
===========================================
+ Hits           119      121       +2     
  Misses          10       10              
Impacted Files Coverage Δ
csvy/__init__.py 100.00% <100.00%> (ø)
csvy/readers.py 91.42% <100.00%> (+0.25%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

alexdewar commented 1 year ago

I think it is useful as a convenience function, though that's obviously a bit subjective!

I've added a test now.