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

Remove new_qenv #222

Merged
merged 5 commits into from
Nov 4, 2024
Merged

Remove new_qenv #222

merged 5 commits into from
Nov 4, 2024

Conversation

llrs-roche
Copy link
Contributor

@llrs-roche llrs-roche commented Nov 4, 2024

Pull Request

As commented on #215, it was hard to see a pattern on what to do when deprecating functions.
As new_qenv() was important, I decided to keep the code/help page and remove it later on.

I considered where to document the function; I think having a separate help page will be easier if other methods are deprecated.
Removing all the arguments from the deprecated function was an idea I had because they won't be used, but this created problems with generic not matching actual method, so I left it as is.

I'm having some issues with pre-commit and it didn't pass the checks, but I think this PR is minimal and won't be any issues

Error messages running pre-commit
[INFO] Installing environment for https://github.com/lorenzwalthert/precommit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('C:/PROGRA~1/R/R-44~1.1\\bin\\Rscript.exe', '--vanilla', 'C:\\Users\\<user>\\AppData\\Local\\Temp\\tmpgu57p6xf\\script.R')
return code: 1
stdout:
    # Bootstrapping renv 1.0.7 ---------------------------------------------------
    - Downloading renv ... FAILED
stderr:
    Warning: unable to access index for repository https://packagemanager.posit.co/cran/2024-09-12/bin/windows/contrib/4.4:
      cannot open URL 'https://packagemanager.posit.co/cran/2024-09-12/bin/windows/contrib/4.4/PACKAGES'
    Warning: unable to access index for repository https://packagemanager.posit.co/cran/2024-09-12/src/contrib:
      cannot open URL 'https://packagemanager.posit.co/cran/2024-09-12/src/contrib/PACKAGES'
    Error in h(simpleError(msg, call)) : failed to download:
    All download methods failed
    Calls: source ... bootstrap -> withCallingHandlers -> renv_bootstrap_download
    Execution halted
Check the log at C:\Users\<user>\.cache\pre-commit\pre-commit.log

Fixes #215

Copy link
Contributor

github-actions bot commented Nov 4, 2024

✅ All contributors have signed the CLA
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

github-actions bot commented Nov 4, 2024

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  ---------
R/qenv-concat.R                     10       0  100.00%
R/qenv-constructor.R                 3       0  100.00%
R/qenv-eval_code.R                  52       2  96.15%   100, 109
R/qenv-get_code.R                   28       0  100.00%
R/qenv-get_env.R                     3       3  0.00%    23-31
R/qenv-get_var.R                    19       0  100.00%
R/qenv-get_warnings.R               24       0  100.00%
R/qenv-join.R                       46       0  100.00%
R/qenv-show.R                        1       1  0.00%    19
R/qenv-within.R                      8       0  100.00%
R/utils-get_code_dependency.R      191       1  99.48%   283
R/utils.R                           10       0  100.00%
TOTAL                              395       7  98.23%

Diff against main

Filename                Stmts    Miss  Cover
--------------------  -------  ------  -------
R/qenv-constructor.R      -13     -13  +81.25%
TOTAL                     -13     -13  +3.13%

Results for commit: c0d6817

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Nov 4, 2024

Unit Tests Summary

  1 files    9 suites   1s ⏱️
109 tests 107 ✅ 2 💤 0 ❌
198 runs  196 ✅ 2 💤 0 ❌

Results for commit c0d6817.

♻️ This comment has been updated with latest results.

@llrs-roche
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@m7pr m7pr self-assigned this Nov 4, 2024
@llrs-roche llrs-roche added the core label Nov 4, 2024
@m7pr
Copy link
Contributor

m7pr commented Nov 4, 2024

@llrs-roche new_qenv() was important but no longer is. We want to simplify the package and support only the new API.
Please also remove new_qenv() and let's just keep qenv() as the constructor.

After the upcoming release we might not have another release for a very long time. We had last release on CRAN in January 2024. I don't want to wait another year to get this function removed. I think 1 year is enough : )

R/qenv-constructor.R Outdated Show resolved Hide resolved
R/qenv-constructor.R Outdated Show resolved Hide resolved
Copy link
Contributor

@m7pr m7pr left a comment

Choose a reason for hiding this comment

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

Few changes requested

@m7pr
Copy link
Contributor

m7pr commented Nov 4, 2024

@llrs-roche one of the CI checks is failing. Can you check what's going on :) ? and what changes you need to provide to push this through the finish line?

@llrs-roche
Copy link
Contributor Author

Fixed the issue with the failing test on pkgdown. This check is the one I have as a hook on pre-push on my projects 😄

For finalizing the PR, I should make sure of teal.gallery work well with the new changes (and other code/packages), and probably also check that it meets the Acceptance Criteria.

@m7pr
Copy link
Contributor

m7pr commented Nov 4, 2024

@llrs-roche yes please check tlg-catalog and teal.gallery so that they do not use new_qenv. Thanks

@m7pr m7pr changed the title Deprecate but keep the function and documentation. Remove new_qenv Nov 4, 2024
@m7pr
Copy link
Contributor

m7pr commented Nov 4, 2024

@m7pr m7pr self-requested a review November 4, 2024 13:34
Copy link
Contributor

@m7pr m7pr left a comment

Choose a reason for hiding this comment

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

Hey @llrs-roche - last comment in here #222 (comment)

Otherwise this is good to go

@llrs-roche llrs-roche merged commit 622cb09 into main Nov 4, 2024
30 checks passed
@llrs-roche llrs-roche deleted the 215_new_qenv@main branch November 4, 2024 13:58
@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review Deprecated Functions
2 participants