# Cleaning up Python docs

**URL:** https://discourse.paraview.org/t/cleaning-up-python-docs/639
**Category:** Development
**Tags:** documentation, python
**Created:** [September 26, 2018, 2:19pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639 "2018-09-26T14:19:03Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [September 26, 2018, 2:19pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/1 "2018-09-26T14:19:03Z")

</div>

I am looking into cleaning up various docs and documentation generation process. One of the things that’s quite unwieldy with our Python documentation generation stage is the fact that we generate documentation for all proxies. e.g. [Sphere](https://kitware.github.io/paraview-docs/latest/python/paraview.simple.Sphere.html?highlight=sphere). It requires that ParaView is fully built before documentation is generated – which is crazy! Also causes the documentation generation time to bloat!

So the question is, if we remove these proxy docs would anyone miss them? Does anyone use them? Essentially, I am talking of getting rid of [this](https://kitware.github.io/paraview-docs/latest/python/paraview.servermanager_proxies.html) and all proxies listed there.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [September 26, 2018, 2:25pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/2 "2018-09-26T14:25:58Z")

</div>

Are docstrings set properly for the Python objects? If so, that’s at least one place that the information would still be accessible.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [September 26, 2018, 2:28pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/3 "2018-09-26T14:28:52Z")

</div>

> [@ben.boeckel](#):
>
> Are docstrings set properly for the Python objects? If so, that’s at least one place that the information would still be accessible.

Yes. Indeed. `help(sphere)` would still continue to work.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 26, 2018, 2:43pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/4 "2018-09-26T14:43:50Z")

</div>

I personally do not usually refer to the Python proxy documentation, but I am familiar with many of the properties on my most-used sources and filters, and know how to use `help` within Python to find out about properties and available methods. It seems like a nice thing to have, but the current documentation is broken in some places (see the docs for [AMRFragmentIntegration](https://kitware.github.io/paraview-docs/latest/python/paraview.simple.AMRFragmentIntegration.html#), for example). So for now I would be okay with that documentation not being generated.

By the way, running `help(Sphere)` gives some weird combination of documentation for `module.paraview.simple.CreateObject` and the XML description of the Sphere source. It is not until you instantiate a `Sphere` object and call help on the instance that you can get full documentation from `paraview.simple.Sphere`:

```auto
s = Sphere()
help(s)

```

It would be good to see if we could get the full documentation for `help(Sphere)`.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [September 26, 2018, 4:51pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/5 "2018-09-26T16:51:28Z")

</div>

> [@cory.quammen](#):
>
> It would be good to see if we could get the full documentation for `help(Sphere)` .

I’ve reported that [here](https://gitlab.kitware.com/paraview/paraview/issues/18494).

---

<div class="post-metadata">

### Author: ![DennisConklin](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/d/b19c9b/32.png) [@DennisConklin](https://discourse.paraview.org/u/DennisConklin)
#### Post date: [September 26, 2018, 5:22pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/6 "2018-09-26T17:22:18Z")

</div>

I use those docs and also refer my users to them, but maybe I should consider alternate docs.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [September 26, 2018, 5:48pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/7 "2018-09-26T17:48:49Z")

</div>

@DennisConklin, ah okay. In that case, I think I’ll leave this as is for now. We need a better way of documenting all available proxies in the application, both of Python scripting and for the UI. I am going to investigate some more how we can do that more elegantly.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [September 27, 2018, 1:27pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/8 "2018-09-27T13:27:20Z")

</div>

> [@utkarsh.ayachit](#):
>
> It requires that ParaView is fully built before documentation is generated – which is crazy!

What tool extracts the documentation? Is it just from the `.xml` files or is it extracted from the generated Python bindings? Getting the dependencies of that step down would be nice. It would also allow for the nightly documentation to cover all proxies and not just those that are being built right now (which should remain the default).

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [September 27, 2018, 1:34pm UTC](https://discourse.paraview.org/t/cleaning-up-python-docs/639/9 "2018-09-27T13:34:26Z")

</div>

it is extracted from Python bindings. I am indeed thinking along the lines of extracting from XML but it has its own issues.
