Comments (16)
(by mwhudson)
I agree. In general, the stuff that gets documented from @fields is not handled the same way as other things, and it should be.
from pydoctor.
Is this done to some reasonable satisfaction? @glyph
from pydoctor.
In the public website documentation, yeah, but in Dash (i.e.: without JavaScript) you still see private methods by default. They're also grouped according to their presence in the hierarchy, rather than private-ness, so you see private methods before you see other kinds of public methods. So I think there's still more to do here.
from pydoctor.
@glyph that seems like a Dash problem to me -- or maybe something we can fix in doc2dash (cc @hynek ). Is there such a thing as 'hidden' in dash, do you know?
from pydoctor.
I guess @Kapeli would be the right person to ask…
from pydoctor.
There's no such thing as hidden in Dash. However as far as I understand from @glyph's comment this is a JavaScript issue? I can definitely enable JavaScript for the Twisted docset if that's the case.
Can you give me an example of a page that contains private methods that should be hidden? This page looks the same in Dash as online: http://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.TCP4ClientEndpoint.html.
from pydoctor.
@Kapeli here's one: http://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.HostnameEndpoint.html
from pydoctor.
(also there's module-level stuff, e.g. http://twistedmatrix.com/documents/current/api/twisted.internet.endpoints.html )
from pydoctor.
I can't make stuff in Dash hide/unhide, so I'm thinking of doing this:
- Only public stuff gets added to the Dash docset search index. This means you won't be able to search for any of the private stuff
- I enable JavaScript support so you'll be able to toggle public/private as you can in your browser, but the private stuff won't appear in Dash's table of contents at the bottom left, only public will
Would that be ok?
from pydoctor.
@Kapeli That would definitely be an improvement. Maybe these should be command-line options in doc2dash so that maintainers could have a separate, self-generated twisted-private
docset?
from pydoctor.
@hynek Could you add a command line option that would make doc2dash ignore private stuff?
from pydoctor.
I add command line options all the time. I’d need to know what exactly it would have to do to answer that. :)
from pydoctor.
The HTML looks like this:
<tr class="instancevariable private">
<td>Instance Variable</td>
<td><a href="twisted.internet.endpoints.HostnameEndpoint.html#_getaddrinfo" data-type="Instance Variable" class="code">_getaddrinfo</a></td>
<td>A hook used for testing name resolution.</td>
</tr>
So I think in https://github.com/hynek/doc2dash/blob/master/src/doc2dash/parsers/pydoctor.py#L65 you should ignore tags for which their parent parent element contains the class "private".
Sorry for not making a pull request, but my Python knowledge is a bit non-existent.
from pydoctor.
The best way forward is to open an issue on doc2dash explaining briefly what the problem is and what the solution should be.
from pydoctor.
I think this issue has been resolved in pydoctor. If not, feel free to re-open, but please include an example of where the pydoctor output isn't as desired.
from pydoctor.
✨
from pydoctor.
Related Issues (20)
- Failure to process classifiers as part of consolidation fields in a reStructuredText docstring HOT 2
- Upgrade all annotations to use python 3.10 style HOT 1
- RFE: please provide update for `urllib3` 2.2.x HOT 5
- Fix compatibility with docutils 0.21.x
- Transform deprecated typing annotation into python 3.10 style HOT 1
- Codecov is failing HOT 7
- Docutils is slow for constructor links HOT 1
- doc(FAQ): How to lint? HOT 1
- Release automation is broken HOT 3
- Move away from appdirs package
- 24.3.3: pytest fails in `pydoctor/test/test_cyclic_imports_base_classes.py::test_cyclic_imports_base_classes` unit HOT 1
- Add support for the new doc micro syntax (PEP727)
- Do a real distinction in between the code model and the view model
- Add support for doc comments HOT 2
- HTML: Break function signature elements into multiple spans HOT 2
- Drop python 3.7
- Source code files are always assumed to be uft-8
- Syntax error reports don't contain information about the error HOT 2
- Minimize the docstring line numbers offset introduced by napoleon
- pydoctor crashes on Windows when trying to symlink to a nonexistent file: 'index.html' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydoctor.