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

Das 2008/get edl token from launchpad token #17

Merged
merged 11 commits into from
Dec 4, 2023

Conversation

eni-awowale
Copy link
Collaborator

Description

This PR updates varinfo.cmr_search to include functionality to get a users EDL token given a LaunchPad token with get_edl_token_from_launchpad and get_edl_token_header.

Jira Issue ID

DAS-2008

Local Test Steps

# Imports
from cmr import CMR_UAT
from varinfo.generate_umm_var import generate_collection_umm_var

token_launchpad = "<i hope you have one our this won't work :-P>"
generate_collection_umm_var('C1256535511-EEDTEST', token_launchpad, CMR_UAT)

# To publish uncomment line below
# generate_collection_umm_var('C1256535511-EEDTEST', token_launchpad, CMR_UAT, publish=True)

PR Acceptance Checklist

  • Jira ticket acceptance criteria met.
  • CHANGELOG.md updated to include high level summary of PR changes.
  • VERSION updated if publishing a release.
  • Tests added/updated and passing.
  • Documentation updated (if needed).

Copy link
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

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

Hey Eni, looks pretty good. I had a few questions and suggestions for you. But I wanted to get this back to you before I tried to test it so you could work on it.

tests/unit/test_cmr_search.py Outdated Show resolved Hide resolved
tests/unit/test_cmr_search.py Outdated Show resolved Hide resolved
tests/unit/test_cmr_search.py Outdated Show resolved Hide resolved
tests/unit/test_cmr_search.py Outdated Show resolved Hide resolved
tests/unit/test_cmr_search.py Outdated Show resolved Hide resolved
tests/unit/test_cmr_search.py Outdated Show resolved Hide resolved
varinfo/cmr_search.py Outdated Show resolved Hide resolved
Copy link
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, I think this looks good! :shipit:

Copy link
Member

@owenlittlejohns owenlittlejohns left a comment

Choose a reason for hiding this comment

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

Mainly just nits. The main themes:

  • Probably want to bump the version.txt file to release this when it is merged.
  • Considering specific exception types in your try/except around the call to URS.
  • Probably not renaming auth_header just yet, as it could still be Bearer <EDL token>. (But we're pretty close to being able to deprecate that option)

Generally, though, this is great! LaunchPad tokens are a pain, but this code makes sense and I think makes it clear which tasks need one versus an EDL bearer token.

varinfo/cmr_search.py Outdated Show resolved Hide resolved
varinfo/cmr_search.py Show resolved Hide resolved
varinfo/cmr_search.py Show resolved Hide resolved
varinfo/generate_umm_var.py Outdated Show resolved Hide resolved
varinfo/generate_umm_var.py Outdated Show resolved Hide resolved
varinfo/cmr_search.py Outdated Show resolved Hide resolved
varinfo/generate_umm_var.py Show resolved Hide resolved
varinfo/generate_umm_var.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@owenlittlejohns owenlittlejohns left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for the quick updates for my minor nits.

@eni-awowale
Copy link
Collaborator Author

Thanks everyone! Ready set LaunchPad 🚀!

@eni-awowale eni-awowale merged commit 1d965d4 into main Dec 4, 2023
5 checks passed
@eni-awowale eni-awowale deleted the DAS-2008/Get-edl-token-from-launchpad-token branch December 20, 2023 19:29
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.

3 participants