Skip to content

Conversation

@Neeratyoy
Copy link
Contributor

What does this PR implement/fix? Explain your changes.

Adds a logger.info which can be used to track what is happening during wait times for a long api call.

@Neeratyoy Neeratyoy requested a review from mfeurer October 15, 2019 18:55

url = url.replace('=', '%3d')

logging.info('[%s] %s' % (request_method, url))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hm, I think it would make a lot of sense if you also add a logging.info for when the call is done, which then also states how much time was spent in that function.


url = url.replace('=', '%3d')

logging.info('[%s] %s' % (request_method, url))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't use % for string interpolation in logging, but pass the formatting arguments as regular arguments to the function as logging.info('[%s] %s', request_method, url). Then, they're only interpolated if the logging level requires the program to do so.

@Neeratyoy Neeratyoy requested a review from mfeurer October 16, 2019 08:03
@codecov-io
Copy link

codecov-io commented Oct 16, 2019

Codecov Report

❗ No coverage uploaded for pull request base (develop@35dd7d3). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop     #833   +/-   ##
==========================================
  Coverage           ?   90.41%           
==========================================
  Files              ?       37           
  Lines              ?     5977           
  Branches           ?        0           
==========================================
  Hits               ?     5404           
  Misses             ?      573           
  Partials           ?        0
Impacted Files Coverage Δ
openml/_api_calls.py 88.97% <100%> (ø)

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 35dd7d3...f98aaf4. Read the comment docs.

@mfeurer mfeurer merged commit a1cfd6e into develop Nov 11, 2019
@mfeurer mfeurer deleted the git_api_call_logging branch November 11, 2019 13:47
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.

4 participants