-
Notifications
You must be signed in to change notification settings - Fork 20
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: Boostrap -> Bootstrap in code/docs #44
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
@chrisjsewell I'm not sure what to do here re: deprecation cycle. I'll go with whatever you prefer. Lemme know if you want me to add a deprecation note to this 👍 |
OK I went ahead and added a Sphinx warning if |
c55c24b
to
4a22da9
Compare
sphinx_panels/__init__.py
Outdated
LOGGER.warning( | ||
"`add_boostrap_css` will be deprecated. Please use `add_bootstrap_css`." | ||
) | ||
app.config.add_bootstrap_css = app.config.panels.add_boostrap_css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
want happens here though if someone sets panels_add_bootstrap_css=False
?
won't this override that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah that's a good point, I forgot it defaults to True
. I'm not sure how to check for whether a configuration value has been provided by a user or not :-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps add_boostrap_css
and panels_add_bootstrap_css
should be set to None
initially, to check if someone actually sets a value on them.
Then:
- warn if
add_boostrap_css
is not None - fail if both are not None
- If one is not None, take that value (check it is a bool)
- default to
True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I guess if they both default to True
, then can't we assume that if either of them is False
, then they should both be False
? So the check would become:
if not app.config.panels_add_boostrap_css:
LOGGER.warning(
"`panels_add_boostrap_css` will be deprecated. Please use `panels_add_bootstrap_css`."
)
app.config.panels_add_bootstrap_css = app.config.panels_add_boostrap_css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well my way is more rigorous, you decide 🤷
4a22da9
to
916c46b
Compare
crazy I/we didn't notice this before 🤦 |
I know - I only noticed it after several weeks of having it called |
916c46b
to
68e34c5
Compare
OK crying baby was not crying for long 😅 new default is |
while I was at it I updated the documentation to make the config key a separate code block so it's easier to find. |
After merging, you should try running https://github.com/executablebooks/sphinx-panels/blob/master/git_rebase_theme_branches.sh This cycles through all the theme branches and rebases them on to master (i.e. incorporating the latest commit(s)), which then triggers the RTD build for each. Line 68 in 30a28b7
This step should actually be added to the dev instructions |
Happy to give that a shot. Alternatively if you wanna add a section to the dev-docs with those instructions / what they do / etc, I am happy to follow those steps on my own to make sure that they work and give feedback in the devdocs PR? |
Nah just give it a go and I'll do the instructions after: the instruction is literally just open a terminal and run sphinx-panels recipe has also just been merged into conda, so once that builds I can add the badge for that at the same time |
I noticed in the docs that there seemed to be a typo for the bootstrap config, it was called
boostrap
instead ofbootstrap
.But then when I looked at the code, I saw that the config was also
boostrap
and the docs were technically correct.So this PR changes
boostrap
tobootstrap
in the config and docs, assuming that this was a typo. Is that right @chrisjsewell ?NOTE: when this changes we'll also need to do the same thing in Jupyter Book...I dunno how we missed this one.
This makes me think we may actually need to run a deprecation cycle so that users aren't jarred by the change. @chrisjsewell what do you think?