Skip to content

Editing Checklist for writing Orange scripting modules

Aleš Erjavec edited this page Feb 18, 2015 · 1 revision

This page has been moved from Biolab wiki and is at least partially obsolete.

This is checklist for a fully-implemented orange module (orngXXX):

Module scipts

  • Uses naming conventions according to PEP-0008.
  • Uses docstrings according to PEP-0257.
  • Does not include any testing in the for of if name == 'main', all testing is implemented through test strings.
  • The script does not include any reference to the files that would not be included in the Orange installation.
  • All comments in the module are written in English.

Documentation

  • Is spell checked.
  • Includes all methods/functions that are important for the user of the module.
  • Includes examples of how the code is used.
  • If the code can produce any graph, an example is included in the documentation with an example of the graph (png) included. The example graph is nice and informative.
  • Once submitted, check that it is properly included on the Orange web site.

Regression testing

  • There are at least three regression scripts written to test the module. Ideally, every function of the implemented module should be tested.
  • Regression test do not use any external data files (available on the local disk of the developer), and do not use any resources that would not be available on normal installation.
  • Regression tests are fast, none takes more than 10 s of run time.
  • Regression tests do not output (print) any information that would be dependent on the machine, on which they are executed. They also do not output any information that would change in time (e.g., with version of the software, or with version of the Orange server file).
  • Regression tests are run, results checked and committed to the SVN.
  • Regression tests are successfully run on some other machine (that is, not on the one where the code was developed).

Modules that use a file repository on the server (orngServerFiles)

  • Use CamelCase for module names. No underscores. If the name is some abbreviation, use capital letters accordingly ("KEGG" and not "kegg" or "Kegg").
  • A server files updater is written and included in serverUpdateScripts (trunk/install-scripts/orngServer).
  • Server files updater can run from scratch: if the module it updates does not exists, it creates it along with the files within it. Server files updater in no way depends on the state of server file repository.
  • At least one test script is written that tests the behavior of the updater (e.g., removes the local files, updates a local data base and tests if the information from it can be accessed).
  • Server files updater should include information on how often should it run.
  • Make sure that the server updater correctly uses the information from orngTaxonomy and includes only the files related to common organisms in orngTaxonomy. The later can change, so some files have to be removed or added on the server.
  • Make sure the tag "essential" appears only in the files related to essential organisms in orngTaxonomy. The later can change, so the tag may have to be reassigned.
  • All files on the server are tagged.
  • There is short, meaningful and spell-checked description for every file you add on the server.
  • Tags are spell checked. Check tags of other similar files to include same shared tags.