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

33 adapt write dwc for use by opencpu #34

Merged
merged 13 commits into from
Jun 12, 2023

Conversation

PietrH
Copy link
Member

@PietrH PietrH commented Jun 12, 2023

Closes #33
Resolves #35

This function does not mimic the behaviour of etn's write_dwc() one to one, instead will only return a list of dataframes. The handling of writing to a local file, including creating a directory if necessary will need to handled by the client.


Motivation of changes + outlook on future

This function actually has two steps,

  1. fetch project info
  2. query (including mapping to dwc)

With a progress message in the middle. Because the API will handle this in a single request, the progress message doesn't make much sense and was removed.

We could retain this message if we have the client handle the first call to get_animal_projects() and change the inputs to etnservice's write_dwc() to the parsed output of get_animal_projects(). However this would result in a mismatch between the arguments that write_dwc() accepts between etn and etnservice, and thus break a future possible generic sql helper or the option of inheriting documentation between the packages. (see comments in #33)

This doesn't seem worth it to me. Alternatively we could create a new function just for etnservice, eg. get_dwc() with input arguments based on get_animal_projects, and retain a write_dwc() in etnservice that isn't actually used by the client but does allow for inheritance of documentation or use by a (possible future) generic sql helper. For discussion on this last helper, see inbo/etn#280

TODO

  • add postman test
  • pass R CMD Check
  • fix broken examples

@PietrH PietrH linked an issue Jun 12, 2023 that may be closed by this pull request
9 tasks
@PietrH PietrH self-assigned this Jun 12, 2023
@PietrH PietrH added enhancement New feature or request dev Improvements to development workflow client-side labels Jun 12, 2023
@PietrH PietrH marked this pull request as ready for review June 12, 2023 13:27
@PietrH PietrH marked this pull request as draft June 12, 2023 13:49
@PietrH PietrH marked this pull request as ready for review June 12, 2023 14:38
@PietrH PietrH merged commit 02ada1b into live-test Jun 12, 2023
@PietrH PietrH deleted the 33-adapt-write_dwc-for-use-by-opencpu branch June 12, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-side dev Improvements to development workflow enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix broken examples Adapt write_dwc() for use by OpenCPU
2 participants