Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
StRigaud committed Nov 13, 2024
1 parent 1387411 commit ed885f7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
36 changes: 15 additions & 21 deletions docs/source/developpers/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,38 @@ pyclesperanto is a Python API layer for the `CLIc library <https://github.com/cl
Several operation and functionality are directly inherited from the CLIc library, compiled and imported in the package as ``_clesperanto``.
Arround this C++ core, the package as several Python code to ensure proper integration with the Python ecosystem (numpy, etc.).

Therefore, it is possible to contribute to the development of py-clesperanto either on the C++ side or on the Python side depending on what you are trying to achieve.
It is possible to contribute to the development of pyclesperanto either on the C++ side (see `CLIc Documentation <>`__) and on the Python side (pyclesperanto).
Developement on pyclesperanto can target new operations, new functionalities, bug fixes, code improvement, or documentation.

Environment setup
------------------

To contribute to the development of pyclesperanto, you will need to install it from the source code.
Please follow the `installation guide <install.rst>`__ to install the package from source.
Please follow the `installation guide <install.rst>`__ to install the package from source. Additional packages maybe requiered to run tests, like ``pytest`` or ``scikit-image``.

Also for code cleaness, we strongly advise to install the pre-commit hooks to ensure code quality and style.
Contributing to the python bindings
-----------------------------------

.. code-block:: bash
pip install pre-commit
pre-commit install
While most of the implementation is done in C++, we are also very interested in improving the Python API and developing new functions exclusively in Python.
Proposed new operations can be implemented in the ``__future__`` module of the package. Once stable and tested, we will fully integrate the operation into the package or migrate it to the C++ side of the library for full deployment.
API improvements are also welcome and can be discussed in issues or pull requests.
Additionally, any bug fixes, code improvements, documentation updates, typo corrections, etc., are highly appreciated.

New python operations
New OpenCL operations (WIP)
---------------------

Algorithm implementation of the library is destined to be in C++. However, C++ development can be tedious and difficult, and its integration into CLIc can be complex.
Therefore, it is possible to implement new operations in Python, and provid it to the python package in the ``__future__`` or ``__interroperability__`` module of the package.
pyclesperanto provide two method for executing custom OpenCL code: `execute <>`_ and `native_execute <>`_.

Once stable and tested, we will be happy to fully integrate the operation to the C++ side of the library for full deployement.

New OpenCL operations
---------------------

(WIP)

Versioning
----------

pyclesperanto version folows the `CLIc <https://github.com/clEsperanto/CLIc>`__ versioning for now as both are development concurently.
Although they are not necessarily made to be identically, the versioning is kept in sync as much as possible.

In order to update the version of pyclesperanto, or the version of CLIc, modify the `_version.py` file of pyclesperanto package.
Although they are not necessarily made to be identical, the versioning is kept in sync as much as possible. This may change in the future.

`VERSION` define the versioning tag of the package `pyclesperanto`. It should be updated when a new release is made.
`CLIC_VERSION` define the `CLIc <https://github.com/clEsperanto/CLIc>`__ library version to use.
Update of version number in pyclesperanto is done in the `_version.py` file of pyclesperanto package, by updating the `VERSION` value.
The `CLIC_VERSION` variable refer to the `CLIc <https://github.com/clEsperanto/CLIc>`__ library tag to use for building the bindings.
It should not be modified unless you are directly updating code on the CLIc side.

.. note::

Expand Down
2 changes: 1 addition & 1 deletion docs/source/documentation/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Run the following commands in your terminal to install the package from source:

.. warning::

The ``-e`` flag is not supported yet. Hence, you should not import the package from the source directory as it will fail to import the dynamic library build with the package.
The ``-e`` flag is advised if you are planning to contribute to the development of the package.


pyClesperanto should now be installed as a package along with all its dependencies. You can now start using it in your Python scripts and test modifications to the source code.
Expand Down

0 comments on commit ed885f7

Please sign in to comment.