Comments (39)
OK, I found the following relevant exchange on StackOverflow
and I doubt that you are any less busy than you were in Feb (2014). @krlmlr were you also interested in releasing this to CRAN in the end?
from rappdirs.
Sure, I could make sure it passes R CMD check
, and test on (a subset of) Ubuntu, Debian headless, OS X and Windows Server.
from rappdirs.
Thanks. I see @gaborcsardi also has a fork with a few extra commits
https://github.com/gaborcsardi/rappdirs
I'll see if we can check Windows and Solaris. Solaris build failures are a good way to waste some of BDR's time (and we know how much he likes that ...)
from rappdirs.
OK, after taking a look at @gaborcsardi fork, it seems that there are a few substantive changes that might require input from Hadley. I have therefore forked from Hadley, included one of Gabor's fixes and then brought the package up to date with current roxygen2 and testthat.
My master:
https://github.com/jefferis/rappdirs
now passes check on macosx. I have also added a travis config (in a separate branch for the moment) and that also passes check.
https://github.com/jefferis/rappdirs/tree/feature/travisci
Finally I have sent the package to winbuilder – unfortunately most of the tests fail on Windows because they use file.path and do not manipulate the path separator according to the platform that is being simulated.
from rappdirs.
My changes were essentially mirroring the changes from the Python appdirs package.
from rappdirs.
Thanks @gaborcsardi! Summarising
https://github.com/gaborcsardi/rappdirs/compare/hadley:master...master
The main things that are not included on my master are
- Only use version if appname is not NULL …
- Docs:
<appname>
-><AppName>
to avoid confusion …
These both make sense to me, but might need to be a separate patch for Hadley to consider unless one of us wants to be the maintainer on CRAN. But right now the main problem is that the tests are a complete mess on Windows as I noted above.
from rappdirs.
Hmm looks like the Windows test failures are actually an interaction with testthat::test_check after I moved the tests to tests/testthat
from rappdirs.
OK, I've made a pull request #3
from rappdirs.
So it looks like all is nicely in shape. travis and winbuilder are happy with master.
http://win-builder.r-project.org/Z2Re190Oyd03/
Four things left on todo that I can think of:
- retest on a couple more win/linux platforms (@krlmlr?)
- test on Solaris (see above; @ajdm do you think you could do this tomorrow?)
- bump version / add NEWS
- figure out if @hadley is OK to continue as maintainer and do CRAN submission
from rappdirs.
test on Solaris (see above; @ajdm do you think you could do this tomorrow?)
Oracle seem to no longer have problems with their users database (ironic...?) and so I've been able to register and login, and am now downloading Solaris to a lab machine for a VM install, so we should (modulo R CMD check on Solaris) be good to go tomorrow.
from rappdirs.
@jefferis I'd be happy to let take over as maintainer if you wanted. I can add you as a admin to the repo, and you can change the maintainer in the description. I'd appreciate it if you'd still keep me in the loop, and make any big changes through a pull request.
from rappdirs.
Thanks @hadley! I was assuming that you would stay as maintainer unless this is too low down your long TODO list to submit to CRAN soon (e.g. the next week or so). How about I try to get everything as clean as possible in the next day or two. Then you can decide whether to do the new submission yourself or make me an admin/maintainer as you describe above. Thanks again, Greg.
from rappdirs.
I'll test Linux and Windows soon.
from rappdirs.
I've tested on Ubuntu and Debian, everything looks good. I'm just wondering how much could be tested automatically -- can we assume that the parent directory exists (and is writable) if we ask for app dirs without providing author and version? Then most of the testing could be done in a testthat
test...
from rappdirs.
+1 on a CRAN release. Thanks for everyone's work on this project!
from rappdirs.
Thanks @ncarchedi, I'm also very keen to get this out soon. Unfortunately I've noticed what seems to me a blocker that will need some surgery (see #8).
from rappdirs.
I was wondering if you want to say anything about race conditions in the docs, now that potentially multiple R processes will read from/write to the same set of files in the application directories. I don't think it's the job of the rappdirs
package to solve this, but maybe it could be mentioned somewhere. Just a thought.
from rappdirs.
I was wondering if you want to say anything about race conditions in the docs, now that potentially multiple R processes will read from/write to the same set of files in the application directories.
@gaborcsardi I guess this is something that you are thinking would go in the package help?
from rappdirs.
@jefferis Exactly. Just briefly.
I am not sure what a good solution is, actually. In my package, I used temporary files and then file.rename()
, I guess this is safer, then just writing to the file. Probably only an issue if you have larger files and many processes, but that's what I happened to have.
from rappdirs.
@gaborcsardi Something like: jefferis#5?
from rappdirs.
Yes, something like this. Thanks.
from rappdirs.
Btw. I forgot that the CRAN policy disallows writing to the disk. Does that mean that I cannot use rappdirs
in my R package if I want to submit it to CRAN? That's a pity.....
from rappdirs.
@gaborcsardi I don't think it disallows it - you just need to check with the user first. I think you could also make the claim that rappdirs is ok because it for storing settings in the correct place on disk (i.e. where the user should expect it)
from rappdirs.
I think that you can use it, so long as you get some kind of confirmation. I guess the exact details are up to the CRAN maintainers, but I could think of:
- having a function like
download_extra_data()
which is documented to store data in a location defined byrappdirs::user_data_dir()
or similar. - or even
download_extra_data(persistent=TRUE)
(where the default ispersistent=FALSE
) - or checking some package option like:
getOption("mypackage.use.rappdirs")
It will be interesting to see what the CRAN maintainers will take. But having the rappdirs
package itself on CRAN means that installing another package on github will now be much easier for most users (since they won't need to compile the rappdirs dependency for themselves).
from rappdirs.
OK, that's better, thanks.
from rappdirs.
Hi @hadley, anything stopping a CRAN release at this point? Best, Greg.
from rappdirs.
Nope, I'll submit this afternoon.
from rappdirs.
Great! I will prepare a burnt offering (hopefully none of us) for the CRAN maintainers.
from rappdirs.
Hi @hadley, I saw that the rappdirs submission is "saved" on cran incoming. Was there an issue flagged up? Anything I can help with?
from rappdirs.
Yes, licensing problem. I can fix but I'm at jsm this week.
On Monday, August 4, 2014, Gregory Jefferis [email protected]
wrote:
Hi @hadley https://github.com/hadley, I saw that the rappdirs
submission is "saved" on cran incoming. Was there an issue flagged up?
Anything I can help with?—
Reply to this email directly or view it on GitHub
#2 (comment).
from rappdirs.
OK, thanks. Enjoy the meeting!
from rappdirs.
@hadley Just a friendly ping to see if I/we can help with anything? E.g. looking up copyright owners? If that is the issue....
from rappdirs.
Hi @gaborcsardi, There was a license issue spotted by BDR. @hadley wrote me that he would look at this again next week but invited a patch. The issue was this:
It's a straightforward port from python to R. The copyright holders
of the python code are Trent Mick and Sridhar Ratnakumar as listed in
Authors@R. Or do you want something in the license too?https://github.com/ActiveState/appdirs/blob/master/LICENSE.txt says otherwise:
Copyright (c) 2010 ActiveState Software Inc.
and that's what came up when I googled for it. If that is correct it
needs to be in DESCRIPTION and in LICENSE.
I am not sure exactly how one handles attributing the port + new code. I have made an attempt in PR #17. Advice/fixes welcome!
Best, Greg.
from rappdirs.
Great, thanks! It looks good to me, but what do I know about licenses and copyrights? :)
from rappdirs.
Hooray on CRAN now:
http://cran.r-project.org/web/packages/rappdirs/
Thanks all, including Hadley for dealing with at least 3 license fixes!
from rappdirs.
\o/
Btw. so now that we have this, how about a package called pkg_config
that stores arbitrary persistent package configuration and/or cache and/or data? :)
from rappdirs.
Anyone know if the "writing to disk" issue has a solution, or was an issue? Does this need raising with CRAN on submission of packages that depend on rappdirs?
from rappdirs.
AFAIR rappdirs
does not write to disk, actually. Packages that use it probably do, however.
from rappdirs.
The goal of rappdirs is to help people write to disk in the "correct" place
from rappdirs.
Related Issues (20)
- Windows: appname double in user_config_dir HOT 1
- user_data_dir under Mac HOT 3
- CRAN complains about `user_cache_dir()` HOT 8
- Review windows C code HOT 4
- Release rappdirs 0.3.2 HOT 2
- rappdirs 0.3.2: 'version' argument is now vectorized, e.g. in user_cache_dir() HOT 1
- Fixing failing LTO check
- Option to change default path for `user_cache_dir`? HOT 3
- Release rappdirs 0.3.3
- HTTP status was '404 Not Found' HOT 1
- user_data_dir: Consistency of ~ vs expanded version HOT 2
- Path separator consistency on Windows HOT 1
- Move `master` branch to `main` HOT 1
- Using unallowed path? HOT 15
- Upkeep for rappdirs
- Is there a way to make (force?) rappdirs::user_data_dir()to point to a local directory when app is deployed on Posit Connect? HOT 5
- Upkeep for rappdirs (2023)
- Use cli errors or file an issue if you don't have time to do it now
- `usethis::use_standalone("r-lib/rlang", "types-check")` instead of home grown argument checkers;
- Add alt-text to pictures, plots, etc; see https://posit.co/blog/knitr-fig-alt/ for examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rappdirs.