NEONScience / NEON-geolocation

Code package for handling NEON geolocation data. Includes functions to extract spatial data from the API based on a named location, and to calculate more precise locations for select observational data products.
GNU Affero General Public License v3.0
20 stars 5 forks source link

Weird characters prevent installation on Windows #7

Closed mbjoseph closed 5 years ago

mbjoseph commented 5 years ago

I'm working on a package that depends on geoNEON, and in trying to get CI set up on Windows through AppVeyor ran into encoding errors that prevent installation. Here's the relevant excerpt from the build log:

* preparing 'geoNEON':
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* looking to see if a 'data/datalist' file should be added
* building 'geoNEON_0.0.0.9000.tar.gz'
Installing package into 'c:/RLibrary'
(as 'lib' is unspecified)
* installing *source* package 'geoNEON' ...
** R
Error : (converted from warning) unable to re-encode 'def.calc.geo.os.R' lines 480, 482
ERROR: unable to collate and parse R files for package 'geoNEON'
* removing 'c:/RLibrary/geoNEON'
In R CMD INSTALL
Error in i.p(...) : 
  (converted from warning) installation of package 'C:/Users/appveyor/AppData/Local/Temp/1/RtmpQZP6sw/file7b827b379aa/geoNEON_0.0.0.9000.tar.gz' had non-zero exit status
Calls: <Anonymous> ... with_rprofile_user -> with_envvar -> force -> force -> i.p
Execution halted
Command exited with code 1

It looks like there are some odd characters on lines 480 and 482 of def.calc.geo.os.R that are causing the issue: https://github.com/NEONScience/NEON-geolocation/blob/master/geoNEON/R/def.calc.geo.os.R#L480-L482

These occur in comments in two places where I would expect a ti, but for me they are rendered on GitHub as boxes (using Ubuntu 18.04 in Firefox). I suspect this may be an encoding issue.

@cklunch I would be happy to submit a PR to try to fix it!

In case it's useful, here's the build environment info:

R version 3.5.2 Patched (2019-02-27 r76167)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2012 R2 x64 (build 9600)

cklunch commented 5 years ago

Sorry about that, just pushed a fix. Let me know if it still causes problems!

It would be great to chat about how you're using geoNEON in your package - unfortunately the code in geoNEON isn't particularly stable, so I wouldn't build a ton of functionality that depends on it right now. But if you have some flexibility, I'm happy to keep you up to date with changes.

mbjoseph commented 5 years ago

Awesome - thanks @cklunch! That did the trick.

I'd love to chat. Maybe we can coordinate via e-mail?

Currently geoNEON is a "suggested" dependency, as it's usehttps://twitter.com/d in a vignette, so it's not required, but it does help to illustrate a common use case.