-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Submission: circle #356
Comments
Thanks Maelle. {circle} and {travis} are both deps of {tic} to some degree but also kind of independent. Let's finish {tic} first then to not confuse things. |
{tic} is done - ready when you are :) |
Editor checks:
Editor commentsThanks for your submission, @pat-s! My initial attempt to test this package failed (see below). Based on Also, to preempt another issue, your README is somewhat sparse and both it and the vignette lack an introduction to what the package is for and, importantly in this case, what it is not for. Remember our principle of multiple points of entry*: any piece of documentation may be the first encounter the user has with the package and/or the tool/data it wraps. It will be helpful to start these out with an introduction that explains that the package is for managing a CI service and its relationship to tic and other tools.
Reviewers: |
Hi Noam, thanks for taking this on!
Tests are running on a test repo which is cloned during testing. Also for some tests I need a GITHUB_TOKEN with extended permissions (to delete a private GH user key of mine automatically which will be created by I've added this piece of information to
I've added more information to the README. In addition, I also optimized the Getting Started vignette. (You might want to wait a bit until the vignette is deployed because it seems there are some SSL certificate issues with pkgdown today). Let me know if there are still points to address before the review can start. |
Hi @pat-s, I don't think this is a great solution, because this means that a contributor or reviewer can't test the package, and if they do only pushing and having the PR run for you then you need to expose your extended-permission GITHUB_TOKEN (very insecure!) to all. I get that you will need to skip these on CRAN, but I'd much prefer that there be a full developer workflow. This should hopefully save you effort in the long run, as contributors will be able to test prior to submitting PRs. It's fine if this takes some setting up by the contributor. A solution could be that the user provides an env var |
I don't see why anything should be exposed. The token is stored as a secure env var in the build and nothing will be exposed when a PR is run.
I see the advantage of being able to run the tests locally. Even when setting their personal API key, reviewers would need to
Because testing an API client package is not trivial, I created the dummy repo to have a dedicated repo for testing API functionality. If I would be a reviewer of such a package, I would certainly dislike having to do all of this effort just to run tests locally whereas they just run fine on the CI. I'd argue that a API client package is special when it comes to testing, especially when it comes to CI client packages for which it is not sufficient to just replace the API key. From my perspective, it is important that the functions of this package work if users apply them to a repo of themselves (after having set the API key) rather than requiring them to adjust the whole test suite. I am not sure if there was a previous case like this one - maybe a general decision how such packages are handled by {ropensci} is needed here. Happy to make adjustments if I get a pointer how to do so. |
A very large number of our packages are actually API clients; circle's case is only a little different from several others. At a minimum we need a functioning test suite so that tests can pass locally and then later with rOpenSci's automatic checks. But there are a number of ways to accomplish this.
In any case I'll leave it to reviewers to look at the completeness of the test suite. Regarding this:
If you allow PRs to use your variables, all one needs to do is slip a |
Thank Noam, lots of good resources and pointers in there.
I see the point even though it means a lot of work. Knowing this before might have scared me away even but now I'm in it ;)
Happy to wait for reviews until I implemented a more proper testing suite. |
To clarify, @pat-s, we do need a test suite that passes locally in order to assign to reviewers, though they may have feedback on completeness or setup. |
In the interest of reducing load on reviewers and editors as we manage the COVID-19 crisis, rOpenSci is temporarily pausing new submissions for software peer review for 30 days (and possibly longer). Please check back here again after 17 April for updates. In this period new submissions will not be handled, nor new reviewers assigned. Reviews and responses to reviews will be handled on a 'best effort' basis, but no follow-up reminders will be sent. Other rOpenSci community activities continue. We express our continued great appreciation for the work of our authors and reviewers. Stay healthy and take care of one other. The rOpenSci Editorial Board |
In this period new submissions will not be handled, nor new reviewers assigned.
Reviews and responses to reviews will be handled on a 'best effort' basis, but
no follow-up reminders will be sent. Please check back here again after 25 May when we will be announcing plans to slowly start back up. We express our continued great appreciation for the work of our authors and reviewers. Stay healthy and take care of one other. The rOpenSci Editorial Board |
Hello @pat-s, we're starting up review activities so I wanted to check in with you on the status of this package. Last time we checked in you were developing a test suite in response to my editor's check. Any developments? I hope you're well and thank you for your patience! |
Hi Noam, it's still on the list, the focus was on implementing an update mechanism in {tic} lately. This is not an easy case here and I first have to review which mocking approach would be suited best for CI API calls. This would the also apply to {travis}. I cannot give any ETA though. |
No problem, thanks for the update! |
Just wanted to inform you that I've started to incorporate {vcr} for http testing. |
@noamross 👋 I've completely revamped the test suite:
In addition, the following enhancements were made:
Also I've bumped the version to 0.6.0 (maybe this needs to be updated in the first post). |
Thanks, @pat-s! I have run local tests and |
Thanks @sharlagelfand and @mbjoseph for agreeing to review! Max is returning from leave, so the deadline will be extended a little longer until 2020-12-7. |
Package ReviewPlease check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
DocumentationThe package includes all the following forms of documentation:
Functionality
Estimated hours spent reviewing: 4
Review CommentsI am very excited by the potential for this package! I have primarily used Travis and Github Actions in the past but have one project where I need to use Circle CI, and when I set it up wished there was a package to automate things the way that the {travis} and {ghactions} packages do. I believe that with improved documentation, this package will be very helpful for people wanting to automate their Circle CI setup and usage. I have not checked off the majority of the "Documentation" section, with thoughts described in the sections below, but "Functionality" wise all looks good to me. Beyond what is mentioned below re: examples failing, I did not have trouble using the main functionality (getting jobs, starting builds, etc) and the test suite passed for me (I see above lots of discussion on getting it going - so thank you for that!). Overall documentationMuch of the functionality in this package seems solid, but I think it is lacking in the documentation side of things, as Noam mentioned earlier. Neither the README nor the Get Started vignette provide much background into what Circle is or what Continuous Integration is for - you actually have great introductory documentation on this in On a related note, I would also love to see this page pop up when you do It would be really great to see a few different vignettes for this package: one for existing users of Circle CI on how to automate their builds, etc, and one for newer users (or existing users who want to set up new repositories) on how to set up the entire thing, including how to use {circle} and {tic} in combination. The documentation states that the {tic} package should be used for setting up the YAML file, but does not give any more details or example of how this should be done. This content already has some start in the Quickstart section of the {tic} README but I believe it would be helpful to see it in both places. There is similarly great info on getting started in the Details section of I also think the Authentication section in "Get started" would benefit from more details (or even a screen shot, like in the Deployment section below) on how to get the API key. I found it difficult to struggle through the different authentication pieces, and a more detailed walk through would be great! I found the functions very clear to use, with nicely written code and clear individual documentation! I really like how the arguments show what type they are (e.g. stating when an argument is a character versus a list) - this isn't something I've seen before. ExamplesSeveral examples from exported functions failed, listed below. browse_circle_token
library(circle)
browse_github_token()
# Error in browse_github_token() :
# could not find function "browse_github_token"
edit_circle_config()
# ● Modify '/Users/sharla/.circleci/cli.yml' buildsBoth library(circle)
pipelines <- get_pipelines()
workflows <- get_workflows()
# Error in get_workflows() : could not find function "get_workflows"
jobs <- get_jobs()
# Error in get_jobs() : could not find function "get_jobs" checkout_keyNo library(circle)
delete_checkout_key()
# Error in delete_checkout_key() :
# Please provide the fingerprint of the key which should be deleted. get_build_artifactsErrors, same as in the builds documentation, because library(circle)
job_id <- get_jobs()[[1]]$id
# Error in get_jobs() : could not find function "get_jobs"
get_build_artifacts(job_id)
# Error in get_build_artifacts(job_id) : object 'job_id' not found Function usageI love how chatty and responsive some of the functions are, like library(circle)
new_build()
# $content
# $content$number
# [1] 53
#
# $content$state
# [1] "pending"
#
# $content$id
# [1] [REDACTED]
#
# $content$created_at
# [1] "2020-12-03T20:27:00.596Z"
#
#
# $path
# [1] "/project/gh/data-mermaid/mermaidr/pipeline"
#
# $response
# Response [https://circleci.com/api/v2/project/gh/data-mermaid/mermaidr/pipeline?circle-token=[REDACTED]]
# Date: 2020-12-03 20:27
# Status: 201
# Content-Type: application/json;charset=utf-8
# Size: 115 B
#
#
# attr(,"class")
# [1] "circle_api" I also noticed that I hope this is helpful - please let me know if you'd like me to clarify any points! |
Package ReviewPlease check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
DocumentationThe package includes all the following forms of documentation:
Functionality
Estimated hours spent reviewing:
Review CommentsOverall this package seems super useful for experienced Circle CI users, and there are a few small things that could be done to broaden the user base and make it easier for folks to get started. I'll echo the suggestions above about expanding the docs to include a bit more background on why this package is useful. Specific suggestions are provided below. At a high level, I like that the package provides good support for common operations with relatively high level abstractions, while also providing users access to the API via the general purpose Specific suggestions
|
Thanks @sharlagelfand and @mbjoseph for your reviews! @pat-s, please take a look and let us know what time frame you expect to be able to follow up with revisions. |
Thanks @sharlagelfand and @mbjoseph for your reviews. Since a lot of detail was provided, it will take me some time to reply and share my thoughts with you. Due to some redudandancy I'll submit a combined reply to both of your replies. I cannot really give a realistic timeframe sicne the end of the year is usually quite busy in many regards - but I'll gradually come back here and work on my reply :) |
@sharlagelfand Thanks for your review!
The package is a client package - so I'd argue that users arriving here should know what they want to do with it. As a comparable example: a client package wrapping
Many packages name their workhorse function like the package name.
I agree that this would be benefitial.
Yes, documentation for the {tic} integration could be improved.
I will have a look how to bridge the gap between not repeating the help pages and not being to sparse in the vignettes.
While I see that this might be helpful in rare instances, I am not sure if I want to go down the "screenshot-explain-everthing" route. I do not see that much value in screenshot-explaining how to copy/create an API-key/Access token from a service.
Thanks. Some packages have this but it always comes down to the maintainers. Definitive not a standard in R.
Thanks, I'll have a look.
This is on purpose and that is why it is wrapped in
Which important behaviour?
Thanks, might be an oversight. |
Hey @pat-s, thanks for your response and for creating the linked issues! I don't think that you necessarily need to explain what Continuous Integration is, but it would be helpful for the entry README and Get Started vignette to at least contain the phrase "Continuous Integration" - I like level of detail in {usethis} Re: vignettes and re-explaining things, I'll refer to the rOpenSci Packages book's section on documentation, namely (paraphrasing is mine):
Re: integration with {tic} - that's fine with me if you don't want to bundle them. Would you be able to, instead, include or link an example of a YAML template so that users can get set up?
My understanding of the example section is that it contains things a user would actually be able to run - it should illustrate actual usage and not only include a function that you expect to fail. Being wrapped in If an item needs to first be created, could the example instead be:
Would that work? Related, I realized I don't even know what a "checkout key" is in Circle CI - the only thing that comes up on google is the {circle} package itself. Could you link to the relevant documentation?
Sorry, was too vague here - important behaviour meaning it triggers a build. As a user, I would be more receptive to and better understand a function that returns e.g. "✓ New build started" rather than API call information. I imagine that you and other folks will also be taking some time off for the holidays - I will be mostly offline until December 29, so will respond to anything new after that 😊 Happy holidays! |
@mbjoseph Thanks for taking the time to review!
Thanks. I'll echo my thoughts from the previous reply to Sharla that I am not movitated to re-explain CI (even though you did not mention this explicitly) - see my reasonings in the previous reply.
Thanks.
From my view {circle} serves the primary use case of interacting with the API while also providing some sugar functions to make tedious task easier (such as adding keys). The sugar functions and everything else should be descriptive by their names so that users can easily get some data if they want to.
Thanks, noted!
Thanks, already fixed in ropensci/circle#17.
Thanks, noted! |
Hey @pat-s - apologies for the delay here, but thanks for responding to my review! Changes look good to me, and where you haven't made suggested changes I can see your perspective (especially in light of what tic does). 👍 Nice work. |
Apologies for the delay on my end as well @pat-s! Agreed, changes look good to me. I really like the intro material in the README, and the {tic} vignette - especially walking through the YAML file and explaining what each section is doing, what a good idea :) All looks good to me, will update my checklist ^^^ way above. |
Thanks @mbjoseph and @sharlagelfand! I still got some replies in draft mode - just did not find the time yet to finish them. I'll try to wrap them up in the next days. Apologies for the delay also on my side, this project is apparently not prio no.1 right now :) |
Thanks. As you've already seen there is a new vignette about tic & circle.
I see your point here and were arguably a bit lazy with including meaningful examples.
Interesting. I'll add some more info to the function help page.
Ok thanks, I see. |
I've wrapped up all review-related changes in v0.7.0. Thanks to @sharlagelfand and @mbjoseph again 👏 @noamross Looks like we can proceed here. |
Hi @noamross Just checking base for what might be the next steps from your side - the plan is to release to CRAN after this review is finished. |
Sorry I let this fall through the cracks - I was out for the period where these last parts wrapped up. |
@ropensci-review-bot approve |
Approved! Thanks @pat-s for submitting and @sharlagelfand, @mbjoseph for your reviews! 😁 To-dos:
Should you want to acknowledge your reviewers in your package DESCRIPTION, you can do so by making them Welcome aboard! We'd love to host a post about your package - either a short introduction to it with an example for a technical audience or a longer post with some narrative about its development or something you learned, and an example of its use for a broader readership. If you are interested, consult the blog guide, and tag @stefaniebutland in your reply. She will get in touch about timing and can answer any questions. We've put together an online book with our best practice and tips, this chapter starts the 3d section that's about guidance for after onboarding. Please tell us what could be improved, the corresponding repo is here. |
@sharlagelfand @mbjoseph Are you ok being acknowledged as a reviewer in the package? Please thumbs up if so. Thanks again for reviewing! 🙇 |
Submitting Author: Patrick Schratz (@pat-s)
Due date for @sharlagelfand: 2020-12-07Repository: https://github.com/ropenscilabs/circle
Version submitted: v0.5.0.9001
Editor: @noamross
Reviewers: @sharlagelfand, @mbjoseph
Due date for @mbjoseph: 2020-12-07
Archive: TBD
Version accepted: TBD
Scope
Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
It helps to automate CI workflows and goes in line with the {tic} and {travis} package.
Users who prefer to interact with the command line to query information about CI build statuses.
No scientific applications.
Besides a discontinued package which is 4 years old, there is no similar package.
Technical checks
Confirm each of the following by checking the box. This package:
Publication options
JOSS Options
paper.md
matching JOSS's requirements with a high-level description in the package root or ininst/
.MEE Options
Code of conduct
The text was updated successfully, but these errors were encountered: