-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General problem uploading of package to drat repo #113
Comments
Thanks for opening it here. This is better. This maybe lead to yet another bloody vignette :) with walkthrough. It was about time to switch from the (old, trusted, working -- but more cumbersome) Using Cloning the new repo is great! I presume you clone
But if I check against one of my edd@rob:/tmp/dratTest$ wget https://RcppCore.github.io/drat/src/contrib/PACKAGES
--2021-03-29 11:45:30-- https://rcppcore.github.io/drat/src/contrib/PACKAGES
Resolving rcppcore.github.io (rcppcore.github.io)... 185.199.108.153, 185.199.109.153, 185.199.110.153, ...
Connecting to rcppcore.github.io (rcppcore.github.io)|185.199.108.153|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 746 [application/octet-stream]
Saving to: ‘PACKAGES’
PACKAGES 100%[=====================================>] 746 --.-KB/s in 0s
2021-03-29 11:45:30 (83.9 MB/s) - ‘PACKAGES’ saved [746/746]
edd@rob:/tmp/dratTest$ So "something" is not quite right. If I look at the Settings for the RcppCore repo I see Based on the failed |
Thanks for your fast reply! Yes, I also hope that you will be able to use this in your documentation, so it will be worth the effort beyond my specific use case. So if I understand correctly, the first step would be to try to get the cloned version of the original repo working. Actually, I had downloaded the repo to my local computer (using "git clone https://github.com/RomanHornung/drat.git"). I thought, I need to download (clone) the repo to my computer, prune it there, add the new package using insertPackage(), and upload the changes to GitHub. The drat repo that is currently on my GitHub page is just a result of forking the https://github.com/drat-base/drat page and then setting up the docs subfolder under Settings -> GitHub pages -> Source. Would I have to perform an additional step before the forked repo is ready? |
We are talking past east other.
How to set up GitHub pages is covered in a number of tutorials at GitHub. See if you can find one you like and follow it. I offered you a working litmus test to assert if you have it working. Until then, all work on |
Ah, I hadn't understood that GitHub pages are something different than standard GitHub repos. Using a tutorial I set up a GitHub page without any content now: https://github.com/RomanHornung/RomanHornung.github.io However, now I'm having difficulties forking the https://github.com/drat-base/drat page into the new GitHub page. When I go to https://github.com/drat-base/drat page and click "Fork" I get this https://github.com/RomanHornung/drat/. So the "Fork" does not go into the new Github page RomanHornung/RomanHornung.github.io. |
Right. Our drat intro vignettes (which I rewrote / updated a little, so far only in the source repo, not the docs website) mention that but it requires that one "gets" that GitHub Pages is in effect website hosting. Hence drat use of it. Also, error "There isn't a GitHub Pages site here." . You now have your own website at https://romanhornung.github.io/, I would put at least a one-liner "more coming soon" into index.html.
You cannot. A fork always does a complete copy of an existing repo and can hence not work with an existing repo at your end as it does add to a repo, it fully relaces. So you have to remove your existing repo drat, then fork, then turn on gh-pages for docs/ directory. (I think the last step is now and a "cost" of using docs/ rather than gh-pages so I need to document that clearly.) |
Also, and just for completeness, you do not have to start with a fork. If you have a working GitHub repository (preferably named |
Thank you! I now added text into the index.html file and it appears on https://romanhornung.github.io/. Subsequently, I successfully used "insertPackage(file="somepath1/BOLTSSIRR_0.1.0.tar.gz", repodir="somepath2/RomanHornung.github.io/.git")", because the package is now there in my local .git directory in the subdirectory "somepath2/RomanHornung.github.io/.git/src/contrib". So I suppose the last step would be to upload these changes to the repo. However, unfortunately here I'm still stuck. I read in the vignette for package authors that the last steps are to add, commit, and push the changes. I'm using GitHub Desktop now. When I open GitHub Desktop it says "0 changes". So I cannot to commit the changes and push them to the repo. How could I accomplish this? Thank you again, I think it will soon be done. Maybe an issue is that GitHub Desktop does not recognize that there are new files in the ".git/src/contrib" subdirectory. |
I don't use GitHub Desktop so you are on your own there. Most people use command-line You must commit locally. Once the updated files (incl |
I executed the script After that I changed to the I have no idea, how to continue here. Is there maybe a step I am missing between Or maybe I missed a step before, but if I'm not mistaken, I told you all steps I took so far. |
I cannot teach you There is not a lot more I can do for you here. I think we are at a point where we should consider closing the issue ticket as I don't really anything missing at Sorry that this didn't yet work our for you, |
Thank you, nevertheless, for your time! I learned definitely something. I understand that these are not issues specific to Given that the input "tar.gz file" and the output "package on drat repository" is always the same, I suppose that the process of putting an R package on a |
Absolutely not. You aim to rely on a feature R offers: Additional_repositories and Suggests. None of that requires I sometimes joke that I wrote more documentation for PS For general |
OK, I understand these points. I will try again and see if I can get the files on the repo consulting the documents you listed. If I succeed, I will definitely write down the steps I took and send that to you. If I don't get it done soon, I will put my package on GitHub for the moment, because I have to submit the paper that presents the method implemented in the paackage soon. But sooner or later I definitely want to manage to get the package on CRAN again. Thanks again a lot for your time and I will get in touch with you as soon as I managed to upload it to the drat repo. |
One thought I had was that you could also
|
Thanks for the tips! I don't think we have a local webserver. I will look into netlify as a plan B. But I will definitely try with drat again before. As I already have the files generated by drat locally, I just need to manage to upload them. |
I managed to upload the changes now... Sorry, I had made a stupid mistake before: I had written After fixing that I managed to add, commit and push the changes. They are now visible on So in a nutshell, the files are on the |
Why The one idea in drat is that for a user named 'abcde' at GitHub, if he/she forks the drat-base/drat repo creating a repo 'abcde/drat' we can then use if more directly to "autocompleting" to https://abcde.gitbub.io/drat. That does not work with the structure you self-imposed, which is why you don't see them when you look for them. You committed and pushed to the wrong repo. Please try to use the existing documentation. |
Thank you again. I hadn't pushed it to |
Sometimes it is easiest to just delete Then start over: Fork Run Run Push from your local repo to your remote repo. You should now be set. |
Thank you so much. Now the files are on https://github.com/RomanHornung/drat: I started writing down all (including minor) steps I did in consecutive order and will send this to you soon. The only thing that still slightly worries me is that it says "404 File not found" on the pages https://romanhornung.github.io/drat/ and https://romanhornung.github.io/. But I guess, I will just have to add an |
Yes, but that is "normal" or whatever GitHub Pages thinks is normal---it is a http server setting they enable to not permit "browsing" the directory content (which is the default on many sites). You can convince yourself that it is true by putting a (one-liner) index.html in either. Even a zero byte empty one is better than nothing because it gives you an empty screen rather a 404 error. Very glad to hear you have it sorted out. Persistence is a usuful trait in dealing with computers, looks like you have it. |
One useful thing to come out of all this is that you did test release 0.1.8.1 with support for |
Cool, this sounds good that it was worth something beyond my specific problem! :) I wrote down all steps I performed in detail. I don't know in how far you can publish what I've written... It probably contains many inaccuracies concerning the phrasings. Here is the text (tried to upload it as an attachment, but that didn't work): This step-by-step tutorial shows how to use drat to let a (to be) CRAN R package Requirements: GitHub account, R, RStudio, git Preparing the R package for upload to the (not yet existing) new repository:
a) Build -> Build Source Package This will generate two files "somepath2/DUCKPACKAGE_1.2.3.tar.gz" and Making the new repository:
Uploading the R package to the new repository:
git clone https://github.com/YourName/drat Now you have the content of the forked repository on your computer in the
remotes::install_github("eddelbuettel/drat")
options(dratBranch="docs") In the above "1.2.3" is a placeholder for the actual version number of the DUCKPACKAGE package.
cd drat to get into the GitHub directory for drat.
git config --global user.email "youremailaddressongithub" This will tell git your identity.
git add . This will upload the DUCKPACKAGE package to the repository on GitHub.
install.packages("DUCKPACKAGE", repos="https://yourname.github.io/drat") and verify that the package is installed successfully. Prepare the DESCRIPTION file of your R package:
Now you are ready for submission to CRAN. Optional: (17.) Note that https://yourname.github.io/drat and https://yourname.github.io/ a) Using an editor just make an empty file named "index.html" (file extension "html"). b) Copy "index.html" to the directory "somepath1/GitHubFiles/drat/docs". c) On the Terminal of RStudio using "cd" go to the folder "somepath1/GitHubFiles/drat" and d) Still on the Terminal, using "cd", go to the directory "somepath1/GitHubFiles/" and execute: e) Copy "index.html" to the now new directory "somepath1/GitHubFiles/YourName.github.io". f) Execute the following on the Terminal of RStudio: Now the websites https://yourname.github.io/drat and https://yourname.github.io/ |
Thanks. I'll put this into an editable document and ping you. Is the ibe.med.uni-mue email the best to hit you with an invite to the document? |
Yes, this email is best, thank you for that and all your help! |
Invite to a markdown document at https://hackmd.io (something I am experimenting with) sent. We can edit there. I backed it by a one-off git repo. |
One or two things came up so this is not on the front burner but I will get to it. It is a really, really solid start which I think we should be able to use. We'll see. |
Thanks, that sounds good! :) |
Please give it another read at the link I sent you, I made to rounds of edits. It is coming together. |
Looks really good!! I made minor changes (corrected typos) and added two comments. |
Awesome. Just took and a snapshot, followed up there. One open edit issue. Do you want add it? |
I just looked at it, just removed the remark about "YourName.github.io" in "Additional optional step", and changed the status of the comments to "Resolved". For me, it looks good now, but let me know if you want to change it and I can double-check it! |
Another good catch (also the one char type). Did you see the two lines I added re your previously opened issue? I think we are done at our little 'skunkworks' and I will commit this here. Really nice work, and thanks for bootstrapping it all and the nice edits! |
Do you mean the new lines about the possibility of deleting drat in the cloned repository after adding the depended-upon R package? If yes, I saw these lines and they are fine from my point of view! Thank you also very much for your help and for taking my draft into account in this! I also think that it really looks nice now. |
Is the current (final) version of the vignette still on the HackMD page? I got the notification about your message about the (likely) final version, but on GitHub I can only read the html code of the vignette. |
I made a PR so the actually-to-be-included version is in the branch the branch is based on. I did rename the file to match so it is this one now which I probably should have made more explicit (but the files changed view of a PR also helps). |
I ended up merging it now just to move on -- it should be good (enough) to go and we can always fix as needed. |
Sorry for the delay, I looked at it again now and found
I wasn't able to make these changes on GitHub, so they From my point of view, apart from that, it should be done now :) |
Thanks @RomanHornung and sorry I didn't wait for you which wasn't exactly polite (as I am trying to get 0.2.0 out of the door sooner rather than later). And thanks also for the typos. Pull requests are generally easier, but I will just add this now. Now done in 65f35d5 |
Thank you for your help so far and, of course, for developing this important package.
I'm using Windows and drat version 0.1.8.1. I try to upload the R package BOLTSSIRR to a drat repo, because the new version of my CRAN R package uses this package and I want to reference the repo in the "Additional_repositories:" field of the DESCRIPTION file.
I started by forking the https://github.com/drat-base/drat page and enabled the docs subfolder there. Then I wrote "options(dratBranch="docs")" in R. Subsequently, in the folder "myfolder" I downloaded the drat repo using "git clone https://github.com/RomanHornung/drat.git". Then I tried to prune the repo using "drat::pruneRepo(repopath="myfolder/drat")" and then tried to add BOLTSSIRR using "drat::insertPackage("myfolder/BOLTSSIRR_0.1.0.tar.gz", "myfolder/drat/.git")", but unfortunately these last two commands did not seem to have changed the files.
What could I have missed here? Thank you very much!
The text was updated successfully, but these errors were encountered: