nasa / eo-metadata-tools

eo-metadata-tools is a set of repositories for working with Earth Observation metadata. At its core are common libraries and demonstration scripts for accessing the Common Metadata Repository, to be accompanied by more specific modules and scripts to do dataset-specific queries, metadata validation, etc...
Apache License 2.0
25 stars 11 forks source link

CMR-7405 - Bearer Token #37

Closed jceaser closed 3 years ago

jceaser commented 3 years ago

Adding logging and Bearer token handling code, updated examples and documentation

A reference to a related issue ticket number

Adding functions to get the token from a file and store it in a config dictionary as a Bearer token. Added logging code to give internal details about tokens.

To test, try the code in the readme file or the token notebook.

codecov-commenter commented 3 years ago

Codecov Report

Merging #37 (a430f5b) into master (fa1b108) will increase coverage by 2.04%. The diff coverage is 97.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #37      +/-   ##
==========================================
+ Coverage   82.95%   85.00%   +2.04%     
==========================================
  Files           7        7              
  Lines         522      560      +38     
==========================================
+ Hits          433      476      +43     
+ Misses         89       84       -5     
Impacted Files Coverage Δ
CMR/python/cmr/util/network.py 83.01% <0.00%> (ø)
CMR/python/cmr/auth/token.py 96.25% <100.00%> (+2.01%) :arrow_up:
CMR/python/cmr/search/common.py 72.08% <100.00%> (+1.24%) :arrow_up:
CMR/python/cmr/util/common.py 100.00% <100.00%> (+4.16%) :arrow_up:
CMR/python/cmr/search/collection.py 97.77% <0.00%> (+2.22%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fa1b108...a430f5b. Read the comment docs.