You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we like, we could also cover examples in the readme by doctest to ensure consistency and that they work. In that case, we would call doctest explicitly on the file (since it is not managed by sphinx make targets):
.github/workflows/tests.yml:
- name: Doc Test on readme
run: python -m doctest -v README.md
and the example:
>>> from metaspace_converter import metaspace_to_anndata, anndata_to_image_array
>>>
>>> # Download data
>>> adata2 = metaspace_to_anndata(dataset_id="2023-11-14_21h58m39s", fdr=0.1)
>>>
>>> ion_images = anndata_to_image_array(adata2)
>>>
>>> print("{} ion images of shape {}x{}".format(*ion_images.shape))
20 ion images of shape 130x143
(with empty line before closing ticks)
The disadvantage is that the IDE displays syntax error for language code python (but pycon for Python console works) and users would not be able to copy-paste the code without >>>.
The text was updated successfully, but these errors were encountered:
Idea from @aeisenbarth (Copied from PR review):
If we like, we could also cover examples in the readme by doctest to ensure consistency and that they work. In that case, we would call doctest explicitly on the file (since it is not managed by sphinx make targets):
.github/workflows/tests.yml:
and the example:
(with empty line before closing ticks)
The disadvantage is that the IDE displays syntax error for language code python (but pycon for Python console works) and users would not be able to copy-paste the code without >>>.
The text was updated successfully, but these errors were encountered: