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

Use the doctest module in get_example_data #308

Merged
merged 40 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7b6ec43
First pass at using the doctest module in get_example_data
asmeurer Oct 20, 2023
8e11f52
Fix matplotlib showing the plots instead of saving them in doctests
asmeurer Oct 20, 2023
3dd390b
Move the PapyriDocTestRunner class to the module level
asmeurer Nov 10, 2023
0bbbabe
Handle filename and lineno not being accessible
asmeurer Nov 11, 2023
d65f57c
Fix a spelling error
asmeurer Nov 11, 2023
471d729
Fix generation of doctest plot figures
asmeurer Nov 11, 2023
bbcb40e
Remove unused variable
asmeurer Nov 11, 2023
29c66ac
Use ELLIPSIS option flag
asmeurer Nov 11, 2023
a13f7e4
First pass at using the doctest module in get_example_data
asmeurer Oct 20, 2023
9cdb1ae
Fix matplotlib showing the plots instead of saving them in doctests
asmeurer Oct 20, 2023
0fba48d
Move the PapyriDocTestRunner class to the module level
asmeurer Nov 10, 2023
24389a4
Handle filename and lineno not being accessible
asmeurer Nov 11, 2023
d946cc6
Fix a spelling error
asmeurer Nov 11, 2023
877026f
Fix generation of doctest plot figures
asmeurer Nov 11, 2023
cbd7fc0
Remove unused variable
asmeurer Nov 11, 2023
83be405
Use ELLIPSIS option flag
asmeurer Nov 11, 2023
1a0caee
add debug print
Carreau Nov 17, 2023
98304d2
debug log
Carreau Nov 17, 2023
236c309
cleanup
Carreau Nov 20, 2023
841ac12
... to >>>
Carreau Nov 20, 2023
ef6780e
debug and execute config
Carreau Nov 27, 2023
507e37c
don't execute in pandas
Carreau Nov 27, 2023
cfbacb7
Add Section.extend
asmeurer Dec 1, 2023
3e2409d
Split example sections into blocks
asmeurer Dec 1, 2023
8f6c1da
Merge branch 'doctest' of github.com:asmeurer/papyri into doctest
asmeurer Dec 1, 2023
a2da2d8
Fix errors from running doctests on SciPy
asmeurer Dec 1, 2023
6da0c62
Merge branch 'main' into doctest
asmeurer Dec 15, 2023
9bf10fb
Fix the --no-exec flag
asmeurer Dec 15, 2023
a1c8cdb
Excluse `set_numeric_ops` which seem to be the root of crash.
Carreau Dec 16, 2023
db1dbb4
reforamt to please linters
Carreau Dec 16, 2023
7ce945e
Merge branch 'main' into doctest
asmeurer Jan 4, 2024
4d114ff
Fix the doctest runner not maintaining the namespace across different…
asmeurer Jan 4, 2024
4100b5e
Use DocTestParser to parse doctest blocks
asmeurer Jan 4, 2024
dea1888
Don't generate text blocks for empty strings
asmeurer Jan 4, 2024
708dac9
Fix duplicate code entries in example section
asmeurer Jan 4, 2024
96502c7
Fix extending figures.
Carreau Jan 10, 2024
eb498cb
Apply suggestions from code review
Carreau Jan 10, 2024
4621cba
Rename config.exec to execute_doctests.
Carreau Jan 10, 2024
45a2fa3
Rename config.exec to execute_doctests.
Carreau Jan 10, 2024
81071b9
rename exec in a few more places
Carreau Jan 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix generation of doctest plot figures
asmeurer authored and Carreau committed Nov 27, 2023
commit 877026f7447dca6d415336081c53913ff5b248c6
2 changes: 1 addition & 1 deletion papyri/gen.py
Original file line number Diff line number Diff line change
@@ -1268,7 +1268,7 @@ def dbg(*args):
print_(f"Unclosed figures in {qa}!!")
plt.close("all")

return processed_example_data(example_section_data), all_figs
return processed_example_data(example_section_data), doctest_runner.figs

def clean(self, where: Path):
"""