2024-03-30 17:37:14 +11:00
|
|
|
How to contribute
|
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
IfcOpenShell is made possible by the contributions of hundreds of people.
|
|
|
|
|
Contributions range from developing code, writing documentation, creating
|
|
|
|
|
tutorials, responding to requests, reporting bugs, and marketing.
|
|
|
|
|
|
|
|
|
|
Writing documentation
|
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
|
A great way to contribute without writing code is to help writing
|
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
|
|
All documentation is written in ReStructured Text and is available in the
|
|
|
|
|
`IfcOpenShell docs directory
|
2024-06-27 11:45:05 +10:00
|
|
|
<https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.8.0/src/ifcopenshell-python/docs>`_.
|
2024-03-30 17:37:14 +11:00
|
|
|
You can press the edit button on the top right on any documentation page to
|
|
|
|
|
quickly edit their content.
|
|
|
|
|
|
|
|
|
|
Python API documentation is autogenerated from docstrings present in the source
|
|
|
|
|
code of the respective Python module.
|
|
|
|
|
|
|
|
|
|
If you want to build the documentation locally, the documentation system uses
|
2024-05-07 19:08:13 +10:00
|
|
|
`Sphinx <https://www.sphinx-doc.org/en/master/>`_. First, install Sphinx and
|
|
|
|
|
dependencies:
|
2024-03-30 17:37:14 +11:00
|
|
|
|
2024-06-21 18:28:52 +05:00
|
|
|
.. code-block:: bash
|
2024-03-30 17:37:14 +11:00
|
|
|
|
2024-06-21 18:28:52 +05:00
|
|
|
pip install sphinx
|
|
|
|
|
pip install sphinx-autoapi
|
|
|
|
|
pip install sphinx-copybutton
|
|
|
|
|
pip install furo
|
2024-03-30 17:37:14 +11:00
|
|
|
|
|
|
|
|
Now you can generate the documentation:
|
|
|
|
|
|
2024-06-21 18:28:52 +05:00
|
|
|
.. code-block:: bash
|
2024-03-30 17:37:14 +11:00
|
|
|
|
2024-06-21 18:28:52 +05:00
|
|
|
cd /path/to/ifcopenshell/src/ifcopenshell-python/docs/
|
|
|
|
|
make html
|
|
|
|
|
cd _build/html
|
|
|
|
|
python -m http.server
|
2024-03-30 17:37:14 +11:00
|
|
|
|
|
|
|
|
You will now have a local webserver running hosting the documentation.
|
|
|
|
|
|
|
|
|
|
.. tip::
|
|
|
|
|
|
|
|
|
|
It may take some time to generate the API documentation. You can edit the
|
|
|
|
|
`list of autoapi directories
|
2024-06-27 11:45:05 +10:00
|
|
|
<https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/src/ifcopenshell-python/docs/conf.py#L69>`_
|
2024-03-30 17:37:14 +11:00
|
|
|
to make this faster
|