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

Now support step format in date sliders #4152

Conversation

Axeldnahcram
Copy link
Contributor

@Axeldnahcram Axeldnahcram commented Nov 24, 2022

Original issues are 2731 and 2894.

I have not really added tests since the formatting is done in the JS of the bokeh object and I feel like testing must be done on their side rather than ours then. And I kinda do not really like simply testing that if I call slider=Slider(format=5) then slider.format=5 but if needed I can add it.

If needed I can also add some BFSoup checker somewhere to test both steps and format, of course if you have an original example of pr that had to deal with that I will be happy to comply to any specific test format.

On a side note, it looks like the .controls() function is oftentimes not displaying the full controls. I would be happy to investigate.

Also if you have a tool that strips the notebooks of the cell metadata updates so that my commits on notebooks are clean I would be very happy.

It is my first ever PR on this project, let me know if there are any specifics to consider when contributing.

Have a good day

@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Merging #4152 (e6304fd) into master (cd15358) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4152   +/-   ##
=======================================
  Coverage   83.58%   83.58%           
=======================================
  Files         224      224           
  Lines       33394    33397    +3     
=======================================
+ Hits        27912    27916    +4     
+ Misses       5482     5481    -1     
Flag Coverage Δ
ui-tests 37.64% <100.00%> (+<0.01%) ⬆️
unitexamples-tests 74.56% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
panel/widgets/slider.py 95.17% <100.00%> (+0.02%) ⬆️
panel/io/state.py 70.21% <0.00%> (+0.18%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@philippjfr philippjfr self-requested a review November 29, 2022 13:53
Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

This looks good, thanks! In general unless the model is implemented in Panel itself (i.e. not just wrapping something in Bokeh) we add UI tests but since that's not the case here this is fine. You could add a test that checks that the bokeh model returned by obj.get_root() correctly sets the format and is updated when the format parameter is changed but it's not critical. I'll merge and look at why the tests are being flakey.

@philippjfr philippjfr merged commit 8a8b723 into holoviz:master Nov 29, 2022
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.

None yet

2 participants