# How to compile the documentation for the API?

**URL:** <https://discourse.pymc.io/t/how-to-compile-the-documentation-for-the-api/2988>\
**Category:** Questions\
**Tags:** doc\
**Created:** [March 25, 2019, 7:22pm UTC](https://discourse.pymc.io/t/how-to-compile-the-documentation-for-the-api/2988 "2019-03-25T19:22:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmloyola](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/jmloyola/32/1530_2.png) [@jmloyola](https://discourse.pymc.io/u/jmloyola)\
**Post date:** [March 25, 2019, 7:22pm UTC](https://discourse.pymc.io/t/how-to-compile-the-documentation-for-the-api/2988/1 "2019-03-25T19:22:41Z")

</div>

Recently I added the class `Data` to PyMC3, which included a [docstring](https://github.com/pymc-devs/pymc3/blob/6b25adf2bec6fd7edf22be17b778a4c2e37ae59b/pymc3/data.py#L391-L432) explaining its usage. After this pull request got merge I though **Travis CI** (or maybe another tool) was going to automatically compile the [API documentation](https://docs.pymc.io/api/data.html). But it wasn’t the case.

What do I have to do to compile the documentation from the docstring in the source code so it does appear [here](https://docs.pymc.io/api.html)?  
I didn’t find anything about this in the documentation nor in the github repo. This would be something nice to have in the [CONTRIBUTING](https://github.com/pymc-devs/pymc3/blob/master/CONTRIBUTING.md) file.

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [March 25, 2019, 7:59pm UTC](https://discourse.pymc.io/t/how-to-compile-the-documentation-for-the-api/2988/2 "2019-03-25T19:59:49Z")

</div>

It used to be the case that docs are push at each merge, but the doc was ahead of our release which makes many user confused.  
We change it to manually push the doc at each release now, so the new API will appear at the next release (hopefully soon™)

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [March 25, 2019, 8:19pm UTC](https://discourse.pymc.io/t/how-to-compile-the-documentation-for-the-api/2988/3 "2019-03-25T20:19:52Z")

</div>

Also, FYI the build doc file is here: [https://github.com/pymc-devs/pymc3/blob/master/build\_and\_deploy\_docs.sh](https://github.com/pymc-devs/pymc3/blob/master/build_and_deploy_docs.sh)

---

<div class="post-metadata">

**Author:** ![jmloyola](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/jmloyola/32/1530_2.png) [@jmloyola](https://discourse.pymc.io/u/jmloyola)\
**Post date:** [March 25, 2019, 8:29pm UTC](https://discourse.pymc.io/t/how-to-compile-the-documentation-for-the-api/2988/4 "2019-03-25T20:29:05Z")

</div>

Thank you @junpenglao! 😄

I think it would be nice to have online documentation similar to that of [TensorFlow](https://www.tensorflow.org/versions/r2.0/api_docs/python/tf) or [Python](https://docs.python.org/3/), where you can select the API version you want to read. But I don’t know how easy to implement that is. 🤔

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [March 25, 2019, 8:37pm UTC](https://discourse.pymc.io/t/how-to-compile-the-documentation-for-the-api/2988/5 "2019-03-25T20:37:28Z")

</div>

We tried and failed before… but I agree it would be great to have versioning
