Repository navigation
6524: Mark functions that no longer work as deprecated - #7
Merged
Merged
Conversation
|
@porterhyphenborden I am getting the same errors! See below. > hs_search(text = "test")
Error in hs_search(text = "test") : Not Found (HTTP 404).
Called from: httr::stop_for_status(request)> hs_discover()
Error: Argument 'txt' must be a JSON string, URL or file.
Called from: base::stop(..., call. = FALSE)> HSClient$new()
R6-based client is deprecated.
Use package functions instead.
HSClientR - R6 Client
=======================================
Thanks for using HSClientR! ♥
This R6 client is deprecated.
Prefer package functions like hs_resource() and hs_files()
=======================================
It looks like you haven't authenticated yet...
Please call $authenticate() on this object to get
OAuth2 authentication set up with HydroShare! :)
Warning message:
HSClient is deprecated and no longer supported by this package. It may return errors. Use direct package functions such as hs_resource(), hs_files(), and hs_sysmeta() instead. |
Contributor
Author
|
@abnerbog Okay thanks for testing! I see the deprecation warning for the client but not the two function calls. It looks like the warning method I was using won't surface if unless have your local Can you try again with a clean install? You should now hopefully see this! |
|
@porterhyphenborden I now see the deprecation messages on my end! Pasting from my console below. > hs_search(text = "test")
Error:
! `hs_search()` was deprecated in HSClientR 0.3.2 and is now defunct.
ℹ The hs_search() method is no longer supported by this client and now raises a deprecation error.
Run `rlang::last_trace()` to see where the error occurred.
Called from: signal_abort(cnd)
Browse[1]> Q
> hs_discover()
Error:
! `hs_discover()` was deprecated in HSClientR 0.3.2 and is now defunct.
ℹ The hs_discover() method is no longer supported by this client and now raises a deprecation error.
Run `rlang::last_trace()` to see where the error occurred.
Called from: signal_abort(cnd)
Browse[1]> Q
> HSClient$new()
R6-based client is deprecated.
Use package functions instead.
HSClientR - R6 Client
=======================================
Thanks for using HSClientR! ♥
This R6 client is deprecated.
Prefer package functions like hs_resource() and hs_files()
=======================================
It looks like you haven't authenticated yet...
Please call $authenticate() on this object to get
OAuth2 authentication set up with HydroShare! :)
Warning message:
HSClient is deprecated and no longer supported by this package. It may return errors. Use direct package functions such as hs_resource(), hs_files(), and hs_sysmeta() instead. |
Contributor
Author
|
Ah great @abnerbog thank you for testing this out! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deprecates broken functions and updates documentation.
Some functions (search/discover) in this package are broken/calling endpoints that do not exist. The methods of the client
HSClientare almost entirely broken as well (does not correctly handle API responses) so have deprecated that entire thing.To test:
git fetch origingit checkout --track origin/6524-deprecate-broken-functionsRto start R sessioninstall.packages(c("devtools", "remotes"))remotes::install_deps(dependencies = TRUE)devtools::load_all(".")hs_search(text = "test")hs_discover()HSClient$new()Should see the deprecation warning for these 3 calls.
Note: CI checks are failing with:
I am not going to update the actions at this time since we are not planning to develop this currently.