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

improve ux when trying to open sqlite without protocol #800

Merged

Conversation

turbotimon
Copy link
Contributor

@turbotimon turbotimon commented Feb 8, 2024

Contributor License Agreement

This repository (optuna-dashboard) and Goptuna share common code.
This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.

  • I agree this patch may be ported to Goptuna by other Goptuna contributors.

Reference Issues/PRs

Fixes/Improves UX for #799

What does this implement/fix? Explain your changes.

  • Improves UX by guessing file using file header to open a sqlite db without protocol, e.g.:
$ optuna-dashboard example.db
  • flake8 and mypy are happy with my changes
  • i tried to add tests, but was not able because pytest python_test/ fails on main with import errors

Copy link

codecov bot commented Feb 8, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (5a4070c) 68.96% compared to head (d425b2f) 69.78%.
Report is 78 commits behind head on main.

Files Patch % Lines
optuna_dashboard/_app.py 78.57% 3 Missing ⚠️
optuna_dashboard/_storage_url.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #800      +/-   ##
==========================================
+ Coverage   68.96%   69.78%   +0.81%     
==========================================
  Files          35       35              
  Lines        2388     2373      -15     
==========================================
+ Hits         1647     1656       +9     
+ Misses        741      717      -24     

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

c-bata
c-bata previously requested changes Feb 8, 2024
optuna_dashboard/_storage_url.py Outdated Show resolved Hide resolved
@c-bata c-bata dismissed their stale review February 13, 2024 03:00

Since the PR was updated.

@c-bata
Copy link
Member

c-bata commented Feb 14, 2024

Let me assign @keisuke-umezawa as a reviewer.

@turbotimon Could you fix a flake8 error?

@turbotimon
Copy link
Contributor Author

Let me assign @keisuke-umezawa as a reviewer.

@turbotimon Could you fix a flake8 error?

Done!

Copy link
Member

@keisuke-umezawa keisuke-umezawa left a comment

Choose a reason for hiding this comment

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

LGTM! It also works in my env.

@keisuke-umezawa keisuke-umezawa merged commit faeb3d1 into optuna:main Feb 25, 2024
15 checks passed
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