enram / vptstools

Python library to transfer and convert vertical profile time series data
https://enram.github.io/vptstools/
MIT License
3 stars 1 forks source link

Adds missing unit tests, end to end testing of the daily/monthly CLI and some code cleanups #36

Closed stijnvanhoey closed 1 year ago

stijnvanhoey commented 1 year ago

@peterdesmet to support the 'all' option, one can use the 0 option (to keep it an integer)

❯ vph5_to_vpts --help
Usage: vph5_to_vpts [OPTIONS]

  Convert and aggregate h5 vp files to daily/monthly vpts files on s3 bucket

  Check the latest modified h5 files on the s3 bucket using an s3 inventory,
  convert all ODIM hdf5 profiles files for the days with modified files to the
  vpts-csv standard and upload the vpts-csv daily/monthly files to s3.

Options:
  --modified-days-ago INTEGER  All bucket files with a modified date between
                               now and N modified_days_ago will be taken into
                               account for the recreation of daily/monthly
                               files. If 0,all nucket files will be taken into
                               account for the recreation.
  --aws-profile TEXT           Optionally, define the AWS profile used to run
                               the command for interaction with the AWS s3
                               bucket.
  --help                       Show this message and exit.

With This PR, the targeted set of functionalities is provided. I marked as draft as I do have to fix an issue with the sphinx documentation building. I'll do that asap.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4561907488


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/vptstools/bin/vph5_to_vpts.py 16 17 94.12%
<!-- Total: 58 59 98.31% -->
Files with Coverage Reduction New Missed Lines %
src/vptstools/vpts_csv.py 7 76.99%
<!-- Total: 7 -->
Totals Coverage Status
Change from base Build 4409840957: 36.7%
Covered Lines: 392
Relevant Lines: 412

💛 - Coveralls
peterdesmet commented 1 year ago

Sounds good, nice coverage!

please correct typos to:

All bucket files with a modified date between now and N modified-days-ago will be taken into account for the recreation of daily/monthly files. If 0, all bucket files will be taken into account for the recreation.