EPATADA icon indicating copy to clipboard operation
EPATADA copied to clipboard

Update package to use |> instead of %>%

Open cristinamullin opened this issue 4 months ago • 6 comments

Is your feature request related to a problem? Please describe:

The package has too many dependencies. The package uses both the base and magrittr pipe.

Describe the solution you'd like:

Suggest to use the native pipe and remove dependance on magrittr: https://www.tidyverse.org/blog/2023/04/base-vs-magrittr-pipe/

cristinamullin avatar Aug 22 '25 17:08 cristinamullin

Current approach to this was to:

  1. Find-replace all (~22 files)
  2. Go through and revert to get tests passing (~4 files)

Some will only require simple updates, but decided it was better to go through and do those one-by-one. Likely over reverted to get to passing faster.

jbousquin avatar Oct 03 '25 15:10 jbousquin

These should be quick for someone with a better grasp of piping and placeholders:

  • ResultFlagsDependent.R - One update needs to be made ~ line 911
  • DataDiscoveryRetrieval.R - Two updates (but they're the same) ~ line 402 & 385

jbousquin avatar Oct 03 '25 16:10 jbousquin

The other files are now:

  • R/GeospatialFunctions.R

  • R/ATTAINSCrosswalks.R

  • R/ContinuousDataFunctions.R

  • R/CriteriaMethods.R

  • R/MaintenanceScheduled.R (new)

  • R/Utilities.R (1 instance)

jbousquin avatar Oct 14 '25 21:10 jbousquin

@cristinamullin @jbousquin I just pushed to #681 with updates from develop but I haven't finished going through GeospatialFuntions.R and reconciling / fixing everything. Also wondering about beginning of Utilities.R with description of magrittr (modify or delete)?

mhweber avatar Nov 26 '25 00:11 mhweber

@cristinamullin @jbousquin I just pushed to #681 with updates from develop but I haven't finished going through GeospatialFuntions.R and reconciling / fixing everything. Also wondering about beginning of Utilities.R with description of magrittr (modify or delete)?

I believe we can delete the description of magrittr and also remove it as a dependency in the description file.

cristinamullin avatar Nov 26 '25 21:11 cristinamullin

@cristinamullin @jbousquin I just pushed to #681 with updates from develop but I haven't finished going through GeospatialFuntions.R and reconciling / fixing everything. Also wondering about beginning of Utilities.R with description of magrittr (modify or delete)?

I believe we can delete the description of magrittr and also remove it as a dependency in the description file.

Just pushed branch with that removed from Utilities.R - still work to do but didn't have a chance to get back to today

mhweber avatar Nov 26 '25 21:11 mhweber