Crunch-io / rcrunch

R package for interacting with the Crunch API
https://crunch.io/r/crunch/
GNU Lesser General Public License v3.0
9 stars 15 forks source link

Script catalog print 184617409 #613

Closed gergness closed 1 year ago

gergness commented 1 year ago

This is a re-do of #612 with the right ticket number in the branch.

At some point, the scripts catalog changed from having the full script body to only an excerpt. Because the automation commands are only tested with fixtures (and these fixtures were manually created), they were updated manually.

I also added to the print method, details about the mutations and items_created, because this seems useful.

Before this PR:

library(crunch)
ds <- loadDataset("ds with scripts run")
scripts(ds)
#> Error in if (nchar(script) > body_width) { :
#> missing value where TRUE/FALSE needed

After this PR:

library(crunch)
ds <- loadDataset("ds with scripts run")
scripts(ds)
#>       Timestamp mutations items_created             scriptBody
#> 1  710 days ago      TRUE             0   RENAME weight2 TO...
#> 2  665 days ago     FALSE             1   CREATE numeric we...

Totally planned this on purpose to show you what to do if you copy the wrong pivotal ticket number into your branch name...

The answer: 1) Close PR and delete branch in github

2) Go into pivotal and remove the wrong branch and PR from the ticket with the little "x" buttons.

3) From command line

git checkout -b new-branch-with-right-ticket-number-123456`  # (I never remember how to rename branches)
git push --set-upstream origin script-catalog-print-184617409

(I don't bother updating the ticket numbers in the commit messages, but I suppose you could. I just don't think the commit-ticket relationship is tracked closely enough that a few wrong commits matters)

4) Make a new PR

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (ac5f1d0) 90.94% compared to head (a0b1ed9) 90.94%.

:exclamation: Current head a0b1ed9 differs from pull request most recent head 9d781d0. Consider uploading reports for the commit 9d781d0 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #613 +/- ## ======================================= Coverage 90.94% 90.94% ======================================= Files 128 128 Lines 8437 8438 +1 ======================================= + Hits 7673 7674 +1 Misses 764 764 ``` | [Impacted Files](https://codecov.io/gh/Crunch-io/rcrunch/pull/613?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Crunch-io) | Coverage Δ | | |---|---|---| | [R/automation.R](https://codecov.io/gh/Crunch-io/rcrunch/pull/613?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Crunch-io#diff-Ui9hdXRvbWF0aW9uLlI=) | `94.04% <ø> (-0.08%)` | :arrow_down: | | [R/show.R](https://codecov.io/gh/Crunch-io/rcrunch/pull/613?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Crunch-io#diff-Ui9zaG93LlI=) | `90.88% <100.00%> (+0.05%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Crunch-io). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Crunch-io)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.