Skip to content
Update "tutorial" to release 3.x.x. authored by sph's avatar sph
# Tutorial for writing plug-ins
*Note*: This documentation is still for release 2.0.0.
In the simplest case you inherit the appropriate interface class from ``owscaling/plugins.py`` and override the following properties/methods in your plug-in:
* ``name`` property,
* ``__version__`` property,
* ``__copyright__`` property,
* ``ArgumentParser`` property,
* ``arguments`` method,
* ``__init__()`` method,
* ``__str__()`` method and
* ``__call__()`` method.
......@@ -59,9 +57,10 @@ this program. If not, see <http://www.gnu.org/licenses/>.
#### Notes
1. We start the file with the magic line ``#!/usr/bin/env python3``. (Please keep it there, even if you program in Windows). This is followed by the encoding of the file (in our case UTF-8), which any respectable editor should honour.
2. Following the [Style Guide for Python Code,](https://www.python.org/dev/peps/pep-0008/) we describe what the file does in one line in the docstring and then we add a list of the plug-ins implemented in this file (often this is just one plug-in, but can be more than one).
3. At the bottom add the copyright information. This should be the copyright of the program and not the copyright of the underlying theory (we will come to that). It should include the author who coded the program (and not the author of the theory behind it).
1. We start the file with the magic line ``#!/usr/bin/env python3``. (Please keep it there, even if you program in Windows). This is followed by the encoding of the file (in our case UTF-8), which any respectable editor should honour (for a longer explanation see [Plugins](plugins/plugins#file-preamble-of-your-plug-in)).
2. Following the [Style Guide for Python Code,](https://www.python.org/dev/peps/pep-0008/) we describe what the file does in one line in the docstring and then we add a list of the plug-ins implemented in this file (often this is just one plug-in, but can be more than one). See also [Plugins](plugins/plugins#module-level).
3. At the bottom add the copyright information. This should be the copyright of the program and not the copyright of the underlying theory (we will come to that). It should include the author who coded the program (and not the author of the theory behind it). Again you can find an explanation at [Plugins](plugins/plugins#module-level).
<div align="center"><sub>[Correct for release 3.x.x.]</sub></div>
---
<div align="center">Prev: — | Up: <a href="./plugins">Plug-ins</a> | Next: <a href="./interface_classes">Interface Classes</a></div>
\ No newline at end of file