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

fix indentation in property mixins #13514

Merged

Conversation

mosc9575
Copy link
Contributor

@mosc9575 mosc9575 commented Nov 5, 2023

This pull requests is part of my list of changes for the docs.

This time the focus is on the property mixins page.

old version suggested version
grafik porperty_mixins_new

I added dedent from textwrap because the generated rst-parte by the BokehPropDirective looked like below.

.. attribute:: fill_alpha docs/reference/core/property_mixins
    :module: bokeh.core.property_mixins
    :annotation: = 1.0

    :Type: :class:`~bokeh.core.properties.AlphaSpec`\ 
    
    
    An alpha value to use to fill paths with.

        Acceptable values are floating-point numbers between 0 and 1 (0 being
        transparent and 1 being opaque).

This indentation created a quote block.

I also changed

  1. A wrong indentation in HoverTools
    HoverTool
  2. A not working Example code block in CustomJSHover
    CustomJSHover
  3. And a missing word in the property_mixins.py

Copy link

codecov bot commented Nov 5, 2023

Codecov Report

Merging #13514 (e1ca494) into branch-3.4 (8265814) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@              Coverage Diff               @@
##           branch-3.4   #13514      +/-   ##
==============================================
- Coverage       92.63%   92.63%   -0.01%     
==============================================
  Files             321      321              
  Lines           20397    20395       -2     
==============================================
- Hits            18894    18892       -2     
  Misses           1503     1503              

@bryevdv
Copy link
Member

bryevdv commented Nov 5, 2023

@mattpap is Bokeh-CI / unit-test (ubuntu-latest, 3.9) a real failure? I think I have seen that failing on every recent PR.

@mattpap
Copy link
Contributor

mattpap commented Nov 5, 2023

I just submitted an issue for that. Yes, it started failing on multiple PRs and is persistent.

Acceptable values are floating-point numbers between 0 and 1 (0 being
transparent and 1 being opaque).
"""
""")
Copy link
Member

@bryevdv bryevdv Nov 5, 2023

Choose a reason for hiding this comment

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

TBH I think just dedenting the actual text inside the triple quoted string all the way would be fine, rather than actually calling the dedent function. It's just not a habit I'd want to get into in general (these things do contribute to import time), so I'd rather head it off from the start.

Alternatively, I'd probably myself just define ALPHA_DEFAULT_HELP outside the class and then assign that to default_help

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I decided to go for the variable ALPHA_DEFAULT_HELP and COLOR_DEFAULT_HELP and get rid of some duplicated documentation, too. Hope it is fine now.

Acceptable values are floating-point numbers between 0 and 1 (0 being
transparent and 1 being opaque).
"""
""")
Copy link
Member

Choose a reason for hiding this comment

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

same comment re: dedent

@bryevdv
Copy link
Member

bryevdv commented Nov 5, 2023

Thanks @mosc9575 just one minor comment about avoiding the dedent calls.

@mosc9575
Copy link
Contributor Author

mosc9575 commented Nov 5, 2023

@bryevdv After opening the PR I updated by conda environment and with the latest version I am not able to build the docs. I was trying to build the complete docs with the latest changes and updates like Spinhx > 7.0 and I am getting an error ValueError: Missing SRI hash for version 2.2.2. Is this related to #13488. As far as I can tell there is not 2.2.2.json or any 2.2.x.json. Is there something missing or how can I solve this issue?

@bryevdv
Copy link
Member

bryevdv commented Nov 7, 2023

Thank @mosc9575 !

@bryevdv bryevdv merged commit fc7d189 into bokeh:branch-3.4 Nov 7, 2023
28 of 30 checks passed
@mosc9575 mosc9575 deleted the 13276_fix_indentation_in_property_mixins branch November 12, 2023 08:30
@bryevdv bryevdv mentioned this pull request Nov 28, 2023
4 tasks
@mosc9575 mosc9575 mentioned this pull request Jan 5, 2024
22 tasks
mattpap pushed a commit that referenced this pull request Jan 7, 2024
* fix indentation of default strings with dedent from textwrap

* add missing words in property_mixins.py

* fix indentation in tools.py

* remove dedent block and introduce ALPHA_DEFAULT_HELP and COLOR_DEFAULT_HELP

* change order of imports
mattpap pushed a commit that referenced this pull request Jan 8, 2024
* fix indentation of default strings with dedent from textwrap

* add missing words in property_mixins.py

* fix indentation in tools.py

* remove dedent block and introduce ALPHA_DEFAULT_HELP and COLOR_DEFAULT_HELP

* change order of imports
mattpap added a commit that referenced this pull request Jan 8, 2024
* Add a regression test for issue #8890 (#13572)

* Don't register keyup twice in `AutocompleteInput` (#13577)

* Don't register keyup twice in AutocompleteInput

* Pin pytest-asyncio to version 0.21.1

* Link sub-coordinate and context dependent ranges in RangesUpdate (#13603)

* Fix support for global/local imported stylesheets (#13559)

* Compatibility with Chromium 110

* Robustify unit tests involving browser output (#13602)

* Multiple density estimate plot (#13527)

* added sample data

* created density plot

* added gallery images and json

* sorted import order

* clarified plot description

* refactored plotting file

* changed tick formatting style

* deleted unused import

* deleted whitespace

* additional file refactoring

* pyramid example plot (#13596)

* added sample data

* created plot and added plot  description

* added gallery image

* minor edits

* modified plot title

* added bar labels to plot

* removed whitespace

* post-review

* changed color palette

* added plot image

* added extra tick markers

* Remove unnecessary arcTo calls in round_rect (#13627)

* Update license and copyright statements to 2024 (#13630)

* Use `ruff` to ban `typing_extensions` at the top-level (#13633)

* Upgrade to ruff 0.1.11

* Enable TID rules and disable TID252 for now

* Ban `typing_extensions` module at the top-level

* Remove test_no_typing_extensions_common

* Import `typing_extensions` under `TYPE_CHECKING` in `*.pyi`

* Correctly handle transforms in SVG arcTo (#13640)

* ban PIL and other imports with ruff (#13639)

* fix indentation in sphinx extentions (#13549)

* fix indentation in property mixins (#13514)

* fix indentation of default strings with dedent from textwrap

* add missing words in property_mixins.py

* fix indentation in tools.py

* remove dedent block and introduce ALPHA_DEFAULT_HELP and COLOR_DEFAULT_HELP

* change order of imports

* Restored broken API links (#13528)

* restored broken API links

* modified broken API path

* Allow newer tornado and pandas in test-minimal-deps (#13635)

* Add release notes

* Update switcher.json

* avoid_Sphinx ThemeError and set Sphinx to a minimum of 7.1.0 (#13560)

* fix some sphinx warnings (#13609)

* fix some sphinx warnings

* don't make the first line bold

* fix warnings caused by sampledata (#13613)

* add forensic glass and emissions to sampledata.rst (#13615)

---------

Co-authored-by: Azaya <99359668+Azaya89@users.noreply.github.com>
Co-authored-by: Ian Thomas <ianthomas23@gmail.com>
Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>
Co-authored-by: Moritz Schreiber <68053396+mosc9575@users.noreply.github.com>
@mattpap mattpap removed this from the 3.4 milestone Jan 8, 2024
@mattpap mattpap added this to the 3.3.3 milestone Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants