Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: format errors #21

Merged
merged 30 commits into from
Oct 4, 2024
Merged

Conversation

timcadman
Copy link
Contributor

Implement two main changes:

  1. Added argument return_error to datashield.assign functions, giving the option either to immediately return errors or to store them to be accessible with a call to datashield.errors
  2. Added styling to the output returned by datashield.errors.

Note: tests written for datashield.assign.expr; however I was unable to create errors with either datashield.assign.table or datashield.assign.resource. If you have code which will do this tell me and I'll add tests.

Copy link
Member

@ymarcon ymarcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested yet, please fix dependencies and documentation. Also I expect the man folder to be updated. In case you do not know how to do it in Rstudio, make sure in the project options that all the boxes are checked:

image

so that documentation is generated at check time.

R/datashield.assign.R Show resolved Hide resolved
R/datashield.assign.R Outdated Show resolved Hide resolved
R/datashield.assign.R Outdated Show resolved Hide resolved
@timcadman
Copy link
Contributor Author

Not tested yet, please fix dependencies and documentation. Also I expect the man folder to be updated. In case you do not know how to do it in Rstudio, make sure in the project options that all the boxes are checked:

image

so that documentation is generated at check time.

Sorry Yannick, not sure what happened yesterday ... trying to do 17 things at once!

@timcadman
Copy link
Contributor Author

Hi Yannick, following your comments:

  • I've now tested this with an external script (tests added to package).
  • You were right to suggest this, as it highlighted an issue as currently I was returning warnings, not errors. I've tweaked further now so an error is returned and this gives the correct behaviour (throwing error when running a script).

Copy link
Member

@ymarcon ymarcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase to master, there are conflicts in the NAMESPACE.

.DS_Store Outdated Show resolved Hide resolved
R/datashield.errors.R Outdated Show resolved Hide resolved
R/datashield.errors.R Outdated Show resolved Hide resolved
@timcadman timcadman requested a review from ymarcon August 26, 2024 10:57
Copy link
Member

@ymarcon ymarcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are introducing a circular dependency by importing DSLite. You could move the tests to the DSLite package instead?

DESCRIPTION Outdated Show resolved Hide resolved
@timcadman timcadman requested a review from ymarcon October 3, 2024 15:06
DESCRIPTION Outdated Show resolved Hide resolved
DESCRIPTION Outdated Show resolved Hide resolved
@timcadman timcadman requested a review from ymarcon October 4, 2024 11:14
@ymarcon ymarcon merged commit 546b3ed into datashield:master Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants