Cookiecutter template for a Qiita plugin.
This template sets up the skeleton code to create a Qiita plugin.
To create your own Qiita plugin, first install Cookiecutter:
$ pip install -U cookiecutter
Then, generate the skeleton of the plugin by running cookiecutter (it will create the skeleton in the current directory):
$ cookiecutter https://github.com/qiita-spots/qp-template-cookiecutter
You'll be prompted to introduce values so cookiecutter can set up the skeleton correctly. You can introduce new values or just hit enter to use the default values. Any of these values can be manually changed through the code:
project_name
: This is the name of your project. It will be added on the projectREADME.rst
file and thesetup.py
file.Qiita Plugin
is appended to the project name. We highly recommend to not use the default value.repo_name
: The github repository name. The default value is generated by lowercasing theproject_name
value and changing spaces by-
.organization_name
: The github organization name in which the repository will live.module_name
: The name of the module. The default value is generated by replacing the-
characters in therepo_name
value by_
.author
: The name of the plugin authoremail
: The email to contact the plugin authorURL
: The URL of the project. The default value is generated using theorganization_name
andrepo_name
values.license
: The license of the project. Choose between BSD 3-clause, MIT or Apache. Default is BSD 3-clause.
Example:
$ cookiecutter /Users/jose/qiime_software/qp-template-cookiecutter/
project_name [New Plugin]: Target Gene
repo_name [qp-target-gene]:
organization_name [qiita-spots]:
module_name [qp_target_gene]:
author [Qiita development team]:
email [[email protected]]:
URL [https://github.com/qiita-spots/qp-target-gene]:
Select license:
1 - BSD 3-clause License
2 - MIT License
3 - Apache Software License 2.0
Choose from 1, 2, 3 [1]:
Cookiecutter will create a directory using the repo_name
value in the
current directory. The generated skeleton takes care of most of the initial
plugin setup and Qiita communication, as well as common repository set up,
including travis and coverage. As a plugin developer, you need to enable
travis and coverage to be correctly reported. Under the repo_name
you can
add as many submodules as you need to implement your functionality.
Additionally, you will need to complete the TODO marked sections in the code.
Follow the instructions within the comments. The following list contains a
general overview of what's required in those TODO sections:
- File
README.rst
: Add a description of the commands added by the plugin - File
module_name/__init__.py
: Create the QiitaCommands and register them to the plugin. - Create your own module files with the functions executing the actual commands and the tests for those functions.
Once all the TODO's are completed, your can upload your code to github and see the tests run (if travis and coveralls are enabled).