traitecoevo / APCalign

R package for accessing, matching and updating species names of Australian flora
https://traitecoevo.github.io/APCalign/
Other
4 stars 6 forks source link

cleaning up the namespace #223

Closed wcornwell closed 6 months ago

wcornwell commented 6 months ago

I had a mis-understanding of what "imports" in the Description did. Turns out it doesn't Import. That mis-understanding cascaded into some other issues, but I think it's now cleaned up.

We're currently importing two packages: dplyr and stringr, which means we are (somewhere) using functions without the :: .

This is because of the %>% for dplyr . Not sure why for stringr. But I think it's OK.

The importing of individual functions in the namespace was unnecessary.

dfalster commented 6 months ago

Nice work @wcornwell ! I found the reminding dplyr, strings and will remove them now.

dfalster commented 6 months ago

Hi @wcornwell

I've continued your lead here and also removed stringr and dplyr from the NAMESPACE. I also misunderstood the implications of listing functions as imports here.

Removing those packages uncovered a bunch of places where we didn't have an explicit namespace prefix, i..e mutate() instead of dplyr::mutate(), so I updated those too.

And we can drop tibble from DESCRIPTION, as you can create a nibble via dplyr

dfalster commented 6 months ago

Oh no, I brok it!

wcornwell commented 6 months ago

Probably could remove forcats too?

wcornwell commented 6 months ago

Cool!

dfalster commented 6 months ago

Probably could remove forcats too?

Yes, it is used in one place, though I wonder if that is necessary. Need to check