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

Update key and URLs in README.md #48

Merged
merged 5 commits into from
Aug 9, 2024
Merged

Conversation

bobleesj
Copy link
Contributor

@bobleesj bobleesj commented Aug 8, 2024

Problem

The README.md was not updated.

plt.style.use(all_styles["bg-style"]) results in the following key error:

plt.style.use(all_styles["bg-style"])
E   KeyError: 'bg-style'

Solution

Use (all_styles["bg_style"]) instead.

Proof:

Screenshot 2024-08-08 at 6 28 47 PM

Reference

https://github.com/Billingegroup/bg-mpl-stylesheets/blob/4d2ffc384b7becf7a1929fd9f3f592c85a916408/src/bg_mpl_stylesheets/tests/test_bg_mpl_stylesheet.py#L6C2-L9C12

Copy link
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

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

Thanks for this PR. Please can you check that this does not appear anywhere else in the docs for example and write a news and then I can merge

README.rst Outdated
@@ -88,7 +88,7 @@ To use the stylesheet, near the beginning your python script type ::
for example ::

from bg_mpl_stylesheets.styles import all_styles
plt.style.use(all_styles["bg-style"])
plt.style.use(all_styles["bg_style"])
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 searched "bg-style" globally and this was the only place found.

@@ -8,8 +8,8 @@ bg-mpl-stylesheets
.. |Black| image:: https://img.shields.io/badge/code_style-black-black
:target: https://github.com/psf/black

.. |Codecov| image:: https://codecov.io/gh/bg-mpl-stylesheets/bg-mpl-stylesheets/branch/main/graph/badge.svg
:target: https://codecov.io/gh/bg-mpl-stylesheets/bg-mpl-stylesheets
.. |Codecov| image:: https://codecov.io/gh/Billingegroup/bg-mpl-stylesheets/branch/main/graph/badge.svg
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Many URLs didn't work as the organization was moved from bg-mpl-stylesheets to Billingegroup.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for catching and fixing that.

@bobleesj bobleesj changed the title Update key in README.md Update key and URLs in README.md Aug 9, 2024
@bobleesj
Copy link
Contributor Author

bobleesj commented Aug 9, 2024

@sbillinge Please review! News added.

@@ -102,7 +102,7 @@ def update_style_with_latex(style):
return style


all_styles = {"bg_style": bg_style}
all_styles = {"bg-style": bg_style}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This only place that remains as bg_style is the variable name since we are not able to use -.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, this is correct.

@bobleesj
Copy link
Contributor Author

bobleesj commented Aug 9, 2024

@bobleesj actually, I think I prefere bg-style here so let's leave the readme as it is, but change this in the code? It will break wherever it is being used, but we can go and fix that.

@sbillinge Please review. bg-style is used instead of bg_style globally. CI passes.

@@ -102,7 +102,7 @@ def update_style_with_latex(style):
return style


all_styles = {"bg_style": bg_style}
all_styles = {"bg-style": bg_style}
Copy link
Contributor

Choose a reason for hiding this comment

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

yes, this is correct.

@sbillinge sbillinge merged commit 8f6b1e5 into Billingegroup:main Aug 9, 2024
3 checks passed
@bobleesj bobleesj deleted the tutorial branch August 9, 2024 16:27
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.

2 participants