Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Target release2.0
Epic SNAP-79 - Getting issue details... STATUS
Document statusDRAFT
Document owner

Former user (Deleted)

DesignerFormer user (Deleted)
DevelopersFormer user (Deleted), Marco Peters
QA@Olga Faber

Goals

  • Let Python programmers write GPF operators using CPython and its scientific extension libraries numpy, scipy, pandas, etc.
  • It should be transparent to users how operators are implemented, e.g. using the native Java GPF API, using the Python API or using the stand-alone tools adapter.

Background and strategic fit

Scientists prefer Python over Java.

Assumptions

  • Users have Python 2.7, 3.3 or 3.4 installed.

Requirements

#TitleUser StoryImportanceNotes
1
     

User interaction and design

A user's Python code may be loaded from the following locations:

  • <module-jar-file>   the module JAR file
  • ${user.home}/.snap/snappy/ext/*    the directories in directory snappy/ext in the SNAP user directory
  • ${snap.snappy.ext}   from the directory paths given in the special system property snap.snappy.ext

A Python extension module must contain a plain text file META-INF/snappy.def which lists all Python extensions contained in the module. In this file, a line are either empty, is a comment line starting with the '#' character, or is a line declaring a Python extension:

[<ext-rel-path>/]<ext>      ExtClassName

The type of the extension is derived from the ExtClassName. If it ends with Op it is assumed to be a GPF operator, if it ends with Action it is assumed to be an action to be placed in the menu or in a toolbar. Each Python extension must follow this schema:

[<ext-rel-path>/]

<ext>.py   contains the Python extension ExtClassName  

<ext>-info.xml   contains the operator metadata such as processing parameter definitions (for GPF operators only)

Questions

Below is a list of questions to be addressed as a result of this requirements document:

QuestionOutcome

Not Doing

  • No labels