Giter VIP home page Giter VIP logo

Comments (14)

jarioksa avatar jarioksa commented on August 17, 2024 4

Closing this is OK. It answers this one question: can drat be used to build a repository that can be given as Additional_repositories in package DESCRIPTION. The answer is "NO".

from drat.

jangorecki avatar jangorecki commented on August 17, 2024 2

How did you documented to install the package from your drat?
Did it make difference if user uses https or http?
I recall that install.packages(method="curl") sometimes helped on such error.
I used drat, tools::write_PACKAGES, and Additional_repository field and never had problem that I couldn't fix, so forgetting drat (or tools::write_PACKAGES essentially) shouldn't be necessary.

from drat.

jangorecki avatar jangorecki commented on August 17, 2024 2

@jarioksa the answer is yes, try

Additional_repositories: https://jarioksa.github.io/drat

from drat.

eddelbuettel avatar eddelbuettel commented on August 17, 2024 1

curl should be baked into more recent R versions.

from drat.

eddelbuettel avatar eddelbuettel commented on August 17, 2024

Windows definitely works. I have setup a number of drat repos for different projects and have at times clearly provided Windows binaries that way.

I guess you "just" have to debug exactly what the structure is that Windows expects. drat itself has no opinion in the matter -- it just helps you. It calls the underlying base R function write_PACKAGES() for you and helps with a few other things.

One thing to check is that basic drat operations are for source *.tar.gz packages, Windows expects binaries in *zip format unless told to look at sources. You need to take care of those details and e.g. have appropriate binaries built. Or tell users to use sources.

from drat.

jarioksa avatar jarioksa commented on August 17, 2024

I did not document that install by any means, except

  • People install another package with devtools::install_github
  • and that another package has Additional_repositories directive in DESCRIPTION pointing to drat.

The failure comes from that Additional_repositories because it emerged even when people did not need to use that drat repository.

I had hoped that this was invisible magic for users. It was, but visible & black magic.

from drat.

eddelbuettel avatar eddelbuettel commented on August 17, 2024

I think you fundamentally misunderstand something.

Let's get back to the Alice and Bob example.

Alice is a package author. She writes packages. Some on CRAN, some elsewhere. She hosts some packages on GitHub, and may be a drat user to make maintaining that R-compatible repo trivially easy.

Bob uses some of Alice's packages. He may never have heard of drat nor used it. But he uses R, and download.packages(), however invoked, may get him packages that are hosted somewhere with the help of drat.

Hope this helps. You users do not need to know drat.

As I see no actionable item here, shall we close this?

from drat.

eddelbuettel avatar eddelbuettel commented on August 17, 2024

Come on @jarioksa there is an entire paper on the topic for the special case of a data package repository (but that is still a package repository) -- maybe you could read that?

https://journal.r-project.org/archive/2017/RJ-2017-026/index.html

from drat.

jangorecki avatar jangorecki commented on August 17, 2024

Another working example: https://github.com/jangorecki/big.data.table/blob/master/DESCRIPTION
Lookup .gitlab-ci.yml for usage when installing. Although I haven't used with devtools::install_github but utils::install.packages.

from drat.

eddelbuettel avatar eddelbuettel commented on August 17, 2024

install_github() is fundamentally different as it takes a source repo -- I have argued for years that that is potentially bad idea, however common the use is -- whereas the approach heres supports R packages. drat allows you to extend operations you would otherwise do with officials repos like CRAN or BioC in a self-controlled repo, and Additional_repositories: is the hook R allows for automagically pull it packages from a Suggests:.

from drat.

jangorecki avatar jangorecki commented on August 17, 2024

Note that Additional_repositories is currently used only for package check (see WRE). If you want to use that information for automatic dependency resolution you have to code that. I submit proposal to base R to provide such information to user https://github.com/wch/r-source/compare/tools4pkgs#diff-c610281df0839138574292846834cbc5R447-R461
but it wasn't merged.

from drat.

jarioksa avatar jarioksa commented on August 17, 2024

Thanks for these. I try to follow these guidelines. I cannot test them myself because everything worked for me all the time: it were the users that ran into trouble and reported their failures. I'll wait for their reports of success (I hope).

from drat.

eddelbuettel avatar eddelbuettel commented on August 17, 2024

@jarioksa Sounds good. All this can indeed be a little tricky -- it helps to step back. Deep down what we do here uses base R unaltered so everything replies on plain R operations with repos. We "just" plug into the one or two interfaces we can play with:

  • explicitly listing repositories (as CRAN alternatives, say, or local repos, or ...)
  • allow CRAN packages to have external Suggests: via Additional_repositories:.

No more, no less. You can maybe work out what it is that you want to do, what is missing currently and if and how drat can help (as it has for dozens and dozens of projects). Good luck.

from drat.

jarioksa avatar jarioksa commented on August 17, 2024

@eddelbuettel I was not shouting "BUG!", and my intention was not suggest there was something wrong in drat. I assumed all the time that either I was missing something or that there are some strange interactions or assumptions buried in devtools or Windows 10, but I wished somebody would know and lead me to the light. Thanks.

from drat.

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.