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

Make cyclocomp_linter() optional #2555

Merged
merged 26 commits into from
May 8, 2024
Merged

Conversation

IndrajeetPatil
Copy link
Collaborator

@IndrajeetPatil IndrajeetPatil commented Apr 13, 2024

Closes #2554

Creating a draft PR. Not sure in which release we would like to include this change.

TODO:

  • update NEWS

@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.15%. Comparing base (d22e6ae) to head (1a07a08).
Report is 16 commits behind head on main.

❗ Current head 1a07a08 differs from pull request most recent head 2d672da. Consider uploading reports for the commit 2d672da to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2555      +/-   ##
==========================================
- Coverage   98.18%   98.15%   -0.03%     
==========================================
  Files         125      125              
  Lines        5715     5737      +22     
==========================================
+ Hits         5611     5631      +20     
- Misses        104      106       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

R/cyclocomp_linter.R Outdated Show resolved Hide resolved
@IndrajeetPatil IndrajeetPatil marked this pull request as ready for review April 20, 2024 08:20
@IndrajeetPatil IndrajeetPatil requested a review from AshesITR April 20, 2024 08:27
@IndrajeetPatil IndrajeetPatil added the breaking change ☠️ API change likely to affect existing code label Apr 23, 2024
NEWS.md Outdated Show resolved Hide resolved
MichaelChirico
MichaelChirico previously approved these changes May 4, 2024
Copy link
Collaborator

@MichaelChirico MichaelChirico left a comment

Choose a reason for hiding this comment

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

LGTM, I'm assuming this is ready to merge?

Co-authored-by: Michael Chirico <[email protected]>
@IndrajeetPatil
Copy link
Collaborator Author

LGTM, I'm assuming this is ready to merge?

Yes!

@MichaelChirico
Copy link
Collaborator

R CMD check throws a NOTE:

* checking Rd cross-references ... NOTE
Package unavailable to check Rd xrefs: ‘cyclocomp’

Should we change that link (it won't cause any CRAN issue since {cyclocomp} will be available)? I lean towards "not an issue".

@IndrajeetPatil
Copy link
Collaborator Author

The note in rcmdcheck should be fixed.

But the failing test continues to befuddle me. Can have a look tomorrow.

@MichaelChirico
Copy link
Collaborator

The note in rcmdcheck should be fixed.

I'm really not sure -- wanted to flag for vis. I especially have in mind that base R itself throws the same "missing cross-reference" NOTEs a fair amount, e.g. in ?cor.test:

https://github.com/r-devel/r-svn/blob/b5582bb6dc31e988de5c33ebb28932901c2206ae/src/library/stats/man/cor.test.Rd#L131-L140

We also link to Suggests packages elsewhere, e.g.:

\description{
\code{\link[testthat:comparison-expectations]{testthat::expect_gt()}}, \code{\link[testthat:comparison-expectations]{testthat::expect_gte()}}, \code{\link[testthat:comparison-expectations]{testthat::expect_lt()}},
\code{\link[testthat:comparison-expectations]{testthat::expect_lte()}}, and \code{\link[testthat:equality-expectations]{testthat::expect_equal()}} exist specifically
for testing comparisons between two objects. \code{\link[testthat:logical-expectations]{testthat::expect_true()}} can
also be used for such tests, but it is better to use the tailored function
instead.
}

Do you have a proposed workaround in mind? Maybe there's a good alternative I haven't hit on yet.

@MichaelChirico
Copy link
Collaborator

MichaelChirico commented May 6, 2024

Should we make this function simpler & remove the cyclocomp reference?

Ditto here:

@IndrajeetPatil
Copy link
Collaborator Author

We also link to Suggests packages elsewhere, e.g.:

This is because we are cheating a bit. We don't treat all suggested dependencies equally while running R CMD check in "no Suggests" mode:

any::rcmdcheck
any::testthat
any::knitr
any::rmarkdown
any::patrick
any::withr

If we were to also add {cyclocomp} here, we can get rid of that NOTE, but then our CI will never treat this dependency as truly a suggested dependency.

@IndrajeetPatil
Copy link
Collaborator Author

Should we make this function simpler & remove the cyclocomp reference?

Yes, we should remove those references.

I don't have a good sense of how much work making that function simpler will be, but I can have a look in the evening, after work, unless you get to it before me.

@MichaelChirico MichaelChirico merged commit cbd0619 into main May 8, 2024
20 checks passed
@MichaelChirico MichaelChirico deleted the f2554-cyclocomp-optional branch May 8, 2024 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ☠️ API change likely to affect existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make cyclocomp_linter() optional
4 participants