Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ux: Provide helpful link to documentation when error due to missing API token#1364

Merged
LennartPurucker merged 7 commits intodevelopopenml/openml-python:developfrom
feat-better-error-message-for-no-api-keyopenml/openml-python:feat-better-error-message-for-no-api-keyCopy head branch name to clipboard
Oct 17, 2024
Merged

ux: Provide helpful link to documentation when error due to missing API token#1364
LennartPurucker merged 7 commits intodevelopopenml/openml-python:developfrom
feat-better-error-message-for-no-api-keyopenml/openml-python:feat-better-error-message-for-no-api-keyCopy head branch name to clipboard

Conversation

@eddiebergman
Copy link
Collaborator

@eddiebergman eddiebergman commented Oct 15, 2024

Simply provides a direct link to the following whenever there is an error with a specific code (search "provide API key") when requesting to an endpoint.

Link given: https://openml.github.io/openml-python/main/examples/20_basic/introduction_tutorial.html#authentication


EDIT: Also found out that some autouse fixtures were not being triggered if pytest was only being called on a particular file. I moved these autouse fixtures into tests/conftest.py which means they will now be triggered.

Also I required temporarily disabling the "apikey" in the config, hence there was a small context manager added to enable this behaviour.

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.34%. Comparing base (26ae499) to head (a845535).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1364      +/-   ##
===========================================
+ Coverage    84.19%   84.34%   +0.14%     
===========================================
  Files           38       38              
  Lines         5303     5315      +12     
===========================================
+ Hits          4465     4483      +18     
+ Misses         838      832       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eddiebergman eddiebergman force-pushed the feat-better-error-message-for-no-api-key branch from 1a1049d to 2a66b51 Compare October 15, 2024 09:40
Copy link
Collaborator

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

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

minor change to text 📖

openml/_api_calls.py Outdated Show resolved Hide resolved
Copy link
Contributor

@LennartPurucker LennartPurucker left a comment

Choose a reason for hiding this comment

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

If test pass, LGTM!

Copy link
Collaborator

@PGijsbers PGijsbers left a comment

Choose a reason for hiding this comment

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

🐍

@eddiebergman eddiebergman force-pushed the feat-better-error-message-for-no-api-key branch from 502ce27 to 0bbd67d Compare October 16, 2024 12:15
Copy link
Contributor

@LennartPurucker LennartPurucker left a comment

Choose a reason for hiding this comment

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

Print statements, huh?

openml/evaluations/functions.py Outdated Show resolved Hide resolved
openml/evaluations/functions.py Outdated Show resolved Hide resolved
@eddiebergman
Copy link
Collaborator Author

Was debugging with it xx, it's not ready yet, still some errors it seems

@eddiebergman eddiebergman force-pushed the feat-better-error-message-for-no-api-key branch from bfd485d to a845535 Compare October 17, 2024 15:09
@LennartPurucker LennartPurucker self-requested a review October 17, 2024 16:08
Copy link
Contributor

@LennartPurucker LennartPurucker left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@LennartPurucker LennartPurucker left a comment

Choose a reason for hiding this comment

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

LGTM

@LennartPurucker LennartPurucker merged commit c5a3c9e into develop Oct 17, 2024
@LennartPurucker LennartPurucker deleted the feat-better-error-message-for-no-api-key branch October 17, 2024 16:08
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.

Improve error message when API key is not provided

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.