-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from cgahr/v7
Version 0.7.0
- Loading branch information
Showing
8 changed files
with
63 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Change Log | ||
|
||
## Version 0.7.0 | ||
|
||
### Highlights | ||
|
||
This release exports all functions in `matplotlib.pyplot` to `latexplotlib`. This means you can use `lpl` as a drop-in replacement for `plt`and you don't have to import `matplotlib.pyplot` if you import latexplotlib. Also there is finally a changelog 🎉 | ||
|
||
### Code | ||
- export `plt` functions in latexplotlib | ||
- test new behavior and test that no functions beside `plt.subplots` are overridden | ||
|
||
### Readme | ||
- update to reflect `plt->lpl` changes | ||
- add changelog | ||
- updated example code to reflect new changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.6.1" | ||
__version__ = "0.7.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import latexplotlib as lpl | ||
import matplotlib.pyplot as plt | ||
import pytest | ||
|
||
|
||
def test_plt_functions_available(): | ||
assert lpl.style == plt.style | ||
|
||
|
||
@pytest.mark.parametrize("function", lpl._latexplotlib.__all__) | ||
def test_lpl_functions_available(function: str): | ||
assert getattr(lpl, function) == getattr(lpl._latexplotlib, function) | ||
|
||
|
||
@pytest.mark.parametrize("function", lpl._latexplotlib.__all__) | ||
def test_lpl_doesnt_overwrite_existing_in_plt(function): | ||
if function == "subplots": | ||
assert True | ||
else: | ||
assert function not in dir(plt) | ||
|
||
|
||
def test_non_existent_raises(): | ||
with pytest.raises(AttributeError, match="matplotlib.pyplot"): | ||
lpl.doesnt_exist # noqa: B018 |