-
Notifications
You must be signed in to change notification settings - Fork 6
Do not call dssecrets unless it is installed #23
Conversation
I like this change and I like that it is explicit with the user via messages! As I mentioned earlier, in some cases, particularly when the session created with |
Good call! We can maybe explore writing a little something to automate this - i.e. cache user-entered credentials locally and just re-enter them as needed. But I agree that that could be separated out from this work. |
The warnings about The warning about SB authentication being required isn't coming from my code, but it seems satisfactory! So I removed the lines in my code that were meant to provide such a warning. Would you mind testing again, please? Hopefully the pipeline should fail in a more legible way now, i.e. just give the message about how you're not logged in. |
OK, cool! I think this is actually close to something that we could merge. I'd love to have someone test it with Note that while I was in here, I also added a diagnostic line to |
I just tested and it works for me. I also added in the |
I'm not too practiced with templates. That looks like a template which is generated from this template, right? Does it need to be regenerated from this template, or would the same changes be applied to it separately? |
copying changes from USGS-R/slim-data-release-template#23
I'm not sure if there's a way to do that...I think we are just managing them as separate codebases at this point. I just opened a PR and tagged you as a reviewer: USGS-R/hierarchical-data-release-template#11 I think both can be merged at your discretion @jesse-ross |
Motivation
We would like to minimize the use of
dssecrets
, because it is so brittle, and to that end we have updated the data release docs to encourage people not to depend on it. However, whendssecrets
is not installed, the scipiper pipeline gives a rather inscrutable error if the user is not logged in to ScienceBase.Changes
This simply checks to see whether
dssecrets
is installed before calling it.dssecrets
is installed, then it attempts to log in using it. It also adds a message saying it is doing so.dssecrets
is not installed, then the pipeline will stop, and tell the user they need to authenticate and try again.