Giter VIP home page Giter VIP logo

Comments (39)

jefferis avatar jefferis commented on August 28, 2024

OK, I found the following relevant exchange on StackOverflow

http://stackoverflow.com/questions/14874909/is-there-a-persistent-location-that-is-always-writable-which-can-be-used-as-data

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.

krlmlr avatar krlmlr commented on August 28, 2024

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.

jefferis avatar jefferis commented on August 28, 2024

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.

jefferis avatar jefferis commented on August 28, 2024

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.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

My changes were essentially mirroring the changes from the Python appdirs package.

from rappdirs.

jefferis avatar jefferis commented on August 28, 2024

Thanks @gaborcsardi! Summarising

https://github.com/gaborcsardi/rappdirs/compare/hadley:master...master

The main things that are not included on my master are

  1. Only use version if appname is not NULL …
  2. 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.

jefferis avatar jefferis commented on August 28, 2024

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.

jefferis avatar jefferis commented on August 28, 2024

OK, I've made a pull request #3

from rappdirs.

jefferis avatar jefferis commented on August 28, 2024

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:

  1. retest on a couple more win/linux platforms (@krlmlr?)
  2. test on Solaris (see above; @ajdm do you think you could do this tomorrow?)
  3. bump version / add NEWS
  4. figure out if @hadley is OK to continue as maintainer and do CRAN submission

from rappdirs.

jdmanton avatar jdmanton commented on August 28, 2024

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.

hadley avatar hadley commented on August 28, 2024

@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.

jefferis avatar jefferis commented on August 28, 2024

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.

krlmlr avatar krlmlr commented on August 28, 2024

I'll test Linux and Windows soon.

from rappdirs.

krlmlr avatar krlmlr commented on August 28, 2024

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.

ncarchedi avatar ncarchedi commented on August 28, 2024

+1 on a CRAN release. Thanks for everyone's work on this project!

from rappdirs.

jefferis avatar jefferis commented on August 28, 2024

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.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

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.

jefferis avatar jefferis commented on August 28, 2024

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.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

@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.

jefferis avatar jefferis commented on August 28, 2024

@gaborcsardi Something like: jefferis#5?

from rappdirs.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

Yes, something like this. Thanks.

from rappdirs.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

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.

hadley avatar hadley commented on August 28, 2024

@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.

jefferis avatar jefferis commented on August 28, 2024

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 by rappdirs::user_data_dir() or similar.
  • or even download_extra_data(persistent=TRUE) (where the default is persistent=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.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

OK, that's better, thanks.

from rappdirs.

jefferis avatar jefferis commented on August 28, 2024

Hi @hadley, anything stopping a CRAN release at this point? Best, Greg.

from rappdirs.

hadley avatar hadley commented on August 28, 2024

Nope, I'll submit this afternoon.

from rappdirs.

jefferis avatar jefferis commented on August 28, 2024

Great! I will prepare a burnt offering (hopefully none of us) for the CRAN maintainers.

from rappdirs.

jefferis avatar jefferis commented on August 28, 2024

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.

hadley avatar hadley commented on August 28, 2024

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).

http://had.co.nz/

from rappdirs.

jefferis avatar jefferis commented on August 28, 2024

OK, thanks. Enjoy the meeting!

from rappdirs.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

@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.

jefferis avatar jefferis commented on August 28, 2024

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.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

Great, thanks! It looks good to me, but what do I know about licenses and copyrights? :)

from rappdirs.

jefferis avatar jefferis commented on August 28, 2024

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.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

\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.

richfitz avatar richfitz commented on August 28, 2024

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.

gaborcsardi avatar gaborcsardi commented on August 28, 2024

AFAIR rappdirs does not write to disk, actually. Packages that use it probably do, however.

from rappdirs.

hadley avatar hadley commented on August 28, 2024

The goal of rappdirs is to help people write to disk in the "correct" place

from rappdirs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.