Skip to content

evol: add an option to check arguments passed by user#41

Open
nbc wants to merge 2 commits into
ddotta:mainfrom
nbc:feature/check_args
Open

evol: add an option to check arguments passed by user#41
nbc wants to merge 2 commits into
ddotta:mainfrom
nbc:feature/check_args

Conversation

@nbc

@nbc nbc commented May 8, 2023

Copy link
Copy Markdown
Collaborator

Hi @ddotta,

A first implementation to allow arguments checking.

We can do the same thing to check the returned dataset. It will be even simpler, the function will just take the dataset object.

Regards

@ddotta

ddotta commented May 9, 2023

Copy link
Copy Markdown
Owner

I ❤️ the idea @nbc!
The same logic with package withr could be used to disallow missing values in partitioning variables in returned dataset?

@nbc

nbc commented May 9, 2023

Copy link
Copy Markdown
Collaborator Author

I heart the idea @nbc! The same logic with package withr could be used to disallow missing values in partitioning variables in returned dataset?

There's two way to do it :

check the returned dataset object

We use the same method to check the returned object and warn/fail if it's not ok for us.

This way is more flexible as we can check if there's NA and the number of partition files for example.

really check the values of partioning columns for NA

We use something like this :

if (any(is.na(data[partitioning])))) cli_abort("bla bla bla")

I prefer the first way but we should perhaps wait for the talk to choose no ?

I will implement the first way anyway as soon as I've time.

@codecov

codecov Bot commented May 10, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 96.66% and project coverage change: -0.25 ⚠️

Comparison is base (84d4d57) 99.71% compared to head (dd8eef2) 99.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
- Coverage   99.71%   99.47%   -0.25%     
==========================================
  Files          16       17       +1     
  Lines         352      379      +27     
==========================================
+ Hits          351      377      +26     
- Misses          1        2       +1     
Impacted Files Coverage Δ
R/options.R 83.33% <83.33%> (ø)
R/dbi_to_parquet.R 100.00% <100.00%> (ø)
R/write_parquet_at_once.R 100.00% <100.00%> (ø)
R/write_parquet_by_chunk.R 100.00% <100.00%> (ø)

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

@nbc
nbc force-pushed the feature/check_args branch from 12db2e2 to dd8eef2 Compare May 10, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants