Conversation
|
Recently, one of the issues in the limitations section has been resolved and I have to edit some of the docs. Will submit the updates subsequently to this PR. So, it should be held off as a draft. |
|
OK let me know once OK ; I've reviewed most of it |
OK. It's ready except for the issue mkdocstrings/griffe#355 I think it might have do to with cython behaviour than mkdocstrings. I followed the hints that the author left in the conversation but I can't seem to get it working with |
|
Regarding the docstrings not showing properly, I forgot to update the version number of the dependencies after I submitted a PR for Aside from the issue with cython, everything works fine and it's very much complete. If it's ready for merging, I can squash the commits then. |
rgaudin
left a comment
There was a problem hiding this comment.
Thank you ; that looks quite nice!
I have one last suggestion now.
With your current docstrings, those attributes for which we cant get return types directly appear like this:
If we dont put the type in the leading part of the dosctring but in a Returns section, it looks like this:
There sure is duplication of that return value description but I think it looks more practical. What do you think?
Here's the diff for that example.
diff --git i/libzim/libzim.pyx w/libzim/libzim.pyx
index b5960ea..71ef204 100644
--- i/libzim/libzim.pyx
+++ w/libzim/libzim.pyx
@@ -1149,10 +1149,13 @@ cdef class Archive:
@property
def entry_count(self) -> pyint:
- """int: Number of user entries in Archive.
+ """Number of user entries in Archive.
If Archive doesn't support “user entries”
then this returns `all_entry_count`.
+
+ Returns:
+ (int): Number of user entries in Archive.
"""
return self.c_archive.getEntryCount()Whether you switch to it or not, you can rebase or squash then and we'll merge.
a6e4e5a to
1cec98c
Compare
|
I have duplicated the docstring in the Returns section. Seems like the authors of mkdocstrings forgot to inspect the annotation of the |
|
It's failing only on aarch64 for Python3.13. Opened #216 |
1cec98c to
8215fd9
Compare

Rationale
Make API documentation online via readthedocs.com. This resolves #186
Changes
force_inspectionflag being set totrue.zim.Entryinstead ofzim::Entryto refer to C++ objects because of formatting issues with docstring style.Limitations
Given the docstrings are defined in
libzim.pyxfiles and not in the.pyifiles, documentation was built by setting theforce_inspectionflag ofgriffetotrue. This forcesgriffe(internal tool used by mkdocs) to inspect the compiled module. We merely used the.pyifiles to generate the names of the reference pages. As a consequence, there are a few limitations to be aware of:@propertydecorator. (feature: include proper labels when inspecting compiled module mkdocstrings/griffe#354)__init__level docstrings of base classes and derived ones are omitted (bug: cyclic aliases detected when inspecting compiled modules mkdocstrings/griffe#355). The current hack is to omit the docstrings and to setmerge_init_into_classtofalse