LSSTDESC / tables_io

A small package to provide tools to read / write and convert tabular data for DESC
MIT License
1 stars 1 forks source link

Preserve user-specified file extensions when loading and saving #69

Open hdante opened 1 year ago

hdante commented 1 year ago

Fixes issue #61.

This patch changes the behavior of the read() and write() functions to allow passing file names with different suffixes.

As a consequence, the patch also fixes the FileNotFoundError exception when loading files with the ".parq" and ".parquet" suffixes.

Overall, the new behavior of the functions is the following:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 90.47% and project coverage change: -0.33 :warning:

Comparison is base (b0b6268) 100.00% compared to head (5a0815c) 99.67%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #69 +/- ## =========================================== - Coverage 100.00% 99.67% -0.33% =========================================== Files 8 8 Lines 618 623 +5 =========================================== + Hits 618 621 +3 - Misses 0 2 +2 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `99.67% <90.47%> (-0.33%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LSSTDESC#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/LSSTDESC/tables_io/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LSSTDESC) | Coverage Δ | | |---|---|---| | [src/tables\_io/ioUtils.py](https://app.codecov.io/gh/LSSTDESC/tables_io/pull/69?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=LSSTDESC#diff-c3JjL3RhYmxlc19pby9pb1V0aWxzLnB5) | `99.28% <90.47%> (-0.72%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.