Skip to content

Add FastxRecord to the docs#1245

Merged
jmarshall merged 2 commits into
pysam-developers:masterfrom
nh13:patch-4
Jul 14, 2026
Merged

Add FastxRecord to the docs#1245
jmarshall merged 2 commits into
pysam-developers:masterfrom
nh13:patch-4

Conversation

@nh13

@nh13 nh13 commented Nov 25, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@jmarshall

Copy link
Copy Markdown
Member

When we add a previously omitted class to api.rst, we suddenly find out whether its docstrings render well as reStructuredText or provide useful information at all. In this case, some of it's not great:

name
    unicode
        Type: name

These appear to be the default rendering for cdef public str from the .pxd file. (These are the only public str items in pysam.) “Unicode” is irrelevant as we're Python 3 only, and “Type” is just wrong.

Perhaps we can add some docstrings to the .pyx file to override this rendering and provide some meaningful information for these properties…

@nh13

nh13 commented Dec 15, 2025

Copy link
Copy Markdown
Contributor Author

@jmarshall bump

@jmarshall

Copy link
Copy Markdown
Member

Thanks for the reminder on this one. (All of @TimD1's documentation PRs are very much on the short-list already BTW.)

Add FastxRecord to API documentation and improve its docstring with
proper Sphinx-style documentation including attributes, parameters,
and usage examples.
where Cython will use it to populate these attributes' docstrings.

Remove embedsignature=True as it caused these to get bad type information.
This unembedding removes the `self` parameter from the documentation of
seven existing methods in libcfaidx.pyx, but this arguably improves them.

Add/improve the documentation of the other Python-visible FastxRecord
methods. Add a __repr__() method for ease of observation.
@jmarshall
jmarshall merged commit ef84ed2 into pysam-developers:master Jul 14, 2026
20 checks passed
@nh13
nh13 deleted the patch-4 branch July 14, 2026 13:09
@nh13

nh13 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @jmarshall!

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