Skip to content
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

Doc custom style guide #846

Merged
merged 5 commits into from
Oct 10, 2021

Conversation

lorenzwalthert
Copy link
Collaborator

Closes #721.

@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2021

Codecov Report

Merging #846 (174d358) into master (7c46e20) will not change coverage.
The diff coverage is n/a.

❗ Current head 174d358 differs from pull request most recent head 10c32ff. Consider uploading reports for the commit 10c32ff to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master     #846   +/-   ##
=======================================
  Coverage   90.02%   90.02%           
=======================================
  Files          47       47           
  Lines        2486     2486           
=======================================
  Hits         2238     2238           
  Misses        248      248           
Impacted Files Coverage Δ
R/utils-cache.R 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c46e20...10c32ff. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2021

This is how benchmark results would change (along with a 95% confidence interval in relative change) if e01c33f is merged into master:

  •   :ballot_box_with_check:cache_applying: 24.6ms -> 24.5ms [-2.26%, +1.57%]
  •   :ballot_box_with_check:cache_recording: 1.02s -> 1.02s [-1.38%, +2.02%]
  •   :ballot_box_with_check:without_cache: 2.63s -> 2.65s [-1.14%, +2.23%]

Further explanation regarding interpretation and methodology can be found in the documentation.

Copy link
Contributor

@maelle maelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some comments as a thank you for answering my issue especially as the answer was in the vignette I was reading 😁 !

R/utils-cache.R Outdated Show resolved Hide resolved
@@ -0,0 +1,73 @@
---
title: "distribute_custom_style_guide"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Placeholder title which you might already know :-)

There are two packages that implement a third-party style guide:

* [lorenzwalthert/oneliner](https://github.com/lorenzwalthert/oneliner)
* [mlr-org/styler.mlr](https://github.com/mlr-org/styler.mlr)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken link

This implies that they won't make it to CRAN because packages calling private
methods from other packages don't pass CRAN checks. The only way around this
would be to export some styler internals, e.g. via a {styler.infra} package,
but that would be a lot of work on our side. Another alternative for
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add that it's work you don't plan for now?

tidyverse style guide, use `styler::style_pkg()`, if you want to use a
third-party style guide, use the other namespace, e.g. `styler.mlr::style_pkg()`
* depend on {styler} and use styler internals via `:::`.
This implies that they won't make it to CRAN because packages calling private
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and that they're "fragile"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. if you do that, you should probably follow styler's development closely?

Co-authored-by: Maëlle Salmon <maelle.salmon@yahoo.se>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2021

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 9869a14 is merged into master:

  •   :ballot_box_with_check:cache_applying: 24.3ms -> 24.8ms [-0.26%, +4.21%]
  •   :ballot_box_with_check:cache_recording: 1s -> 1.02s [-0.61%, +2.9%]
  •   :ballot_box_with_check:without_cache: 2.67s -> 2.68s [-1.53%, +1.85%]

Further explanation regarding interpretation and methodology can be found in the documentation.

@lorenzwalthert lorenzwalthert merged commit 2ab0e65 into r-lib:master Oct 10, 2021
@lorenzwalthert lorenzwalthert deleted the doc-custom-style-guide branch October 10, 2021 16:06
@github-actions
Copy link
Contributor

This is how benchmark results would change (along with a 95% confidence interval in relative change) if 1a8906f is merged into master:

  •   :ballot_box_with_check:cache_applying: 25.2ms -> 25ms [-3.15%, +1.42%]
  •   :ballot_box_with_check:cache_recording: 1.07s -> 1.07s [-1.38%, +2.35%]
  •   :ballot_box_with_check:without_cache: 2.67s -> 2.66s [-2.76%, +1.7%]

Further explanation regarding interpretation and methodology can be found in the documentation.

@lorenzwalthert lorenzwalthert mentioned this pull request Mar 12, 2022
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document how to create custom style guides and distribute them in a vignette
3 participants