ottemplate is a (non official) module for OpenTURNS. It serves as a template or example to build python modules designed to interact within the openturns platform.
One should update the template to its needs. For the moment there is no customize command for that purpose but this will be available soon. User can perform manually some changes:
- Rename ottemplate folder into the name of the module
- Update setup.py (replace ottemplate with the new module)
- Rename also python files in the subfolder
- Replace ottemplate in doc/conf.py by the name of the (new) module. Also the theme folder contains a layout that should be updated. Same operations are to be done in all doc (user_manual, index, developer_guide, examples)
- Finally perform also changes in test and continuous-integration folders
Get source:
$ git clone https://www.github.com/sofianehaddad/ottemplatepython.git
The install procedure is performed as follows:
$ pip install .
If you need to install the module in the user folder:
$ pip install . --user
To run the tests:
$ pytest
Finally to build the documentation, you should invoke the build_sphinx option:
$ python setup.py build_sphinx
This builds the documentation in the build folder. Another option is to launch the make command:
$ make html -C doc
Here are some links to help on how to build a python module
https://www.sphinx-doc.org/en/master/usage/quickstart.html
https://python-packaging.readthedocs.io/en/latest/minimal.html