Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDevelop Archivr into a package and add auto documentation. #13
Conversation
This comment has been minimized.
This comment has been minimized.
Oh, forgot Windows instructions:
|
Jan 28, 2019
This was referenced
This comment has been minimized.
This comment has been minimized.
Tested install with devtools
Install works great. Some issues:
and
Some/all of this might be related to the installation method, but devtools should be the standard way to install before the package is on Cran, so it needs to work |
This comment has been minimized.
This comment has been minimized.
The latest commit just exports all the functions (also fixes some documentation details. Let's see if this works instead! |
This comment has been minimized.
This comment has been minimized.
Latest commit appears to work for me. The issue was the export - I was treating the @export similar to private and public functions in a class. Turns out you need to export everything, unless it does not work (archiv_batch currently does not work, but may be useful in future). |
This comment has been minimized.
This comment has been minimized.
I double-checked and all seems to work fine now. Sorry for the inconvenience. Cool that we can use devtools for this anytime we want. I'm going to add this to CRAN now - let's see what they say. The only potential issue I see is whether the internet calls fail gracefully. I'll check that in a new issue. |
This comment has been minimized.
This comment has been minimized.
Found a new error - the package would not accept the api errors as globals, so I need to create an environment. Will have this in a few minutes. |
greebie
added some commits
Jan 29, 2019
This comment has been minimized.
This comment has been minimized.
Currently getting this output on installing (though note that I'm on an airport connection, so heaven knows what it does to https connections from non-browser apps; I'll try this again from home). Not sure if the Rtools error is relevant, but I don't think it should be (I got the same error with the previous almost successful install).
|
This comment has been minimized.
This comment has been minimized.
Thanks Sebastian. I encountered a problem with global variables (ie. I could not use perma.cc) and went down a rabbit hole instead of doing the proper research. I will have this fixed by tonight or tomorrow morning. |
This comment has been minimized.
This comment has been minimized.
thanks! Very excited to soon have this in a state where we can start to promote it. Let me know once I can go ahead & test |
greebie
added some commits
Jan 30, 2019
This comment has been minimized.
This comment has been minimized.
Hi Sebastian, I haven't tested everything, but it seems to be working as expected now. Sorry for the delay, R packaging is a bit weird. I also added two new functions R packages do not like global vars (that's a good thing, really), so I had to create an environment. You can access the api key also by typing |
This comment has been minimized.
This comment has been minimized.
Not quite ready yet:
works smoothly. Documentation via Alas, main functionality does not.
and
(file does exist and has URLs that previously extracted)
Does produce a variable |
greebie
added some commits
Jan 31, 2019
This comment has been minimized.
This comment has been minimized.
It looks like in my enthusiasm with complying with CRAN, I broke things. Took a while to figure that out. Apologies! Your things should work correctly now. |
This comment has been minimized.
This comment has been minimized.
(hoping I did not mess things up on rebasing). |
This comment has been minimized.
This comment has been minimized.
sorry...
|
This comment has been minimized.
This comment has been minimized.
sigh Git can be annoying sometimes. Should be fixed now. |
This comment has been minimized.
This comment has been minimized.
you did say Almost there. Most functions seem to be working, but saving to perma_cc doesn't:
(so those last two calls are broken; saving to Wayback works as do other perma_cc functions like |
This comment has been minimized.
This comment has been minimized.
Sorry for all the review work here, Sebastian. I've fixed the above mentioned problem (and fixed a potential bug when people use an integer instead of string for set_folder_id() |
This comment has been minimized.
This comment has been minimized.
Great. We're essentially there. If I try saving to perma.cc without setting a folder I get this
I think I'd actually prefer it to fail gracefully to picking a default folder, but either would be OK -- the error message here, while nice classic R -- isn't very helpful. |
This comment has been minimized.
This comment has been minimized.
Thanks, not quite there yet, though: before setting a folder id:
Similar issue on getting folder ids before setting an API key:
Should instead throw the same error as other functions, i.e. edit: listing these in reverse order. The 2nd one does work once an API key is set. The first one does work once a folder ID is also set. |
This comment has been minimized.
This comment has been minimized.
I printed out the api results for the api key and it returns ("Perma.cc cannot presently make additional Perma Links on your behalf. Visit your subscription settings page for more information.") when I run it. I'm guessing that there's an issue with sending links to (Personal Links) on the QDR account, which is what gets selected when I set the default (it works fine on my own account). |
This comment has been minimized.
This comment has been minimized.
OK, we can leave that alone then. Not sure why that throws an error for Persona. Fixing the |
This comment has been minimized.
This comment has been minimized.
Yeah - I'm willing to explore further down the road if your clients are being driven crazy by it. Messaging on get_folder_ids() is now fixed. |
This comment has been minimized.
This comment has been minimized.
I'll merge this though I'm still not seeing the error messages for missing API keys, I think because
since an empty string isn't null because... R, but I think I can take it from here. If you could give me a couple of pointers, though, so I can at least help maintain:
|
greebie commentedJan 28, 2019
This should work.
What you need to do:
clone the repo.
DO NOT enter the folder.
On a MAC:
R CMD build archivr
This will create a tarball
then
R CMD INSTALL archivr_0.0.1.tar.gz
and this should load this into your packages.
From there you should be able to use library(archivr) in r studio or whatnot and away you go!
Once this is clear, I am finished. I am going to try to submit this to CRAN for my vanity. :)