-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add documentation and unit tests for Markdown code blocks #221
Add documentation and unit tests for Markdown code blocks #221
Conversation
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.
Thanks!
I never run this on Markdown so I have a newbie question, why "pycon" and not "python"? I associate "pycon" with the conference, not the language. 😸
I won't merge yet in case @bsipocz wants to review.
'python' is syntax highlighting for Python code, whereas 'pycon' is for transcripts of Python interpreter sessions --- it highlights the prompts and output appropriately. pytest-doctestplus doesn't care about the highlighting language; it would work just the same with either. |
@pllim think "Python Console" and it's easier to remember. |
Thank you @lpsinger! |
FWIW at least on GitHub, I still find "python" nicer than "pycon" even with the console stuff. Am I using it wrong? python>>> import numpy as np
>>> from astropy.table import QTable
>>> c = QTable.Column(np.array([1,2,3]), unit=u.mas / u.yr, name='c')
>>> d = QTable.Column(np.array([4,5,6]), unit=u.mas, name='d')
>>> c / d
<Column name='c' dtype='float64' unit='mas / yr' length=3>
0.25
0.4
0.5
>>> c.data / d.data
array([0.25, 0.4 , 0.5 ])
>>> c.unit / d.unit
Unit("1 / yr") pycon>>> import numpy as np
>>> from astropy.table import QTable
>>> c = QTable.Column(np.array([1,2,3]), unit=u.mas / u.yr, name='c')
>>> d = QTable.Column(np.array([4,5,6]), unit=u.mas, name='d')
>>> c / d
<Column name='c' dtype='float64' unit='mas / yr' length=3>
0.25
0.4
0.5
>>> c.data / d.data
array([0.25, 0.4 , 0.5 ])
>>> c.unit / d.unit
Unit("1 / yr") |
You do you, @pllim :-) I think it's rendering the |
Fixes #220.