Skip to content

Add debug logging on GET #1096

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

Merged
merged 1 commit into from
Apr 19, 2023
Merged

Add debug logging on GET #1096

merged 1 commit into from
Apr 19, 2023

Conversation

jsignell
Copy link
Member

@jsignell jsignell commented Apr 17, 2023

Description:

I was running through the examples on pystac-client and came across some where you turn on logging and get to see all the requests that are being made. This seems like a nice way to increase visibility into what pystac is doing:

from pystac import Catalog

# set pystac_client logger to DEBUG to see API calls
import logging
logging.basicConfig()
logger = logging.getLogger('pystac')
logger.setLevel(logging.DEBUG)

Catalog.from_file('https://planetarycomputer.microsoft.com/api/stac/v1')

image

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@jsignell
Copy link
Member Author

If this seems desirable I can add docs.

@codecov-commenter
Copy link

codecov-commenter commented Apr 17, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ac95270) 90.33% compared to head (e167233) 90.33%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1096   +/-   ##
=======================================
  Coverage   90.33%   90.33%           
=======================================
  Files          48       48           
  Lines        6322     6325    +3     
  Branches      942      942           
=======================================
+ Hits         5711     5714    +3     
  Misses        429      429           
  Partials      182      182           
Impacted Files Coverage Δ
pystac/stac_io.py 80.41% <100.00%> (+0.41%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jsignell jsignell self-assigned this Apr 17, 2023
@gadomski gadomski self-requested a review April 17, 2023 19:05
@gadomski gadomski added this to the 1.8 milestone Apr 17, 2023
Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

Seems fine to me! Yeah, if you can add a note in the docs, that'd be great. Also, needs CHANGELOG.

@jsignell jsignell requested a review from gadomski April 17, 2023 20:37
@gadomski gadomski enabled auto-merge April 19, 2023 11:45
@gadomski gadomski added this pull request to the merge queue Apr 19, 2023
Merged via the queue into stac-utils:main with commit 424e748 Apr 19, 2023
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