Developing new modules for the SiLK Analysis Portal is done by
creating a new directory under the modules/ subdirectory.  Each of
these modules is a (mostly) self-contained set of tools for new
visualizations.  You should populate the following subdirectories:

Configuration file:

    Underneath each module should be a file named module.conf which
    describes the various components of your module.  A given module
    may export more than one "panel" to the UI, and this is where
    these are defined.  A panel is defined with configuration code
    like the following:

        [<panel-name>]
        order = <integer>
        title = <text>
        href = <url>
        href_advanced = <url>
        icon_light = <url>
        icon_dark = <url>
        template_controls = <path>
        template_front = <path>
        template_summary = <path>
        allowed_groups = <list>

    Not all of these need be defined for every module.  Their meanings:

        panel-name:
            The panel-name should be unique across the portal system.
            It is simply used as a unique identifier for each panel.

        order: (optional)
            This integer defines the order in which panels should be
            displayed.  It defaults to 50.

        title:
            The panel's title as it should be displayed on the web.

        href:
            This is the URL that the system should direct the user to
            when they move to your panel from another panel.  The main
            analysis page for the panel.  This is relative to the
            module's htdocs directory.

        href_advanced: (optional)
            If the panel has an advanced mode, this URL will be used
            when the user clicks on the "Advanced..." button in the
            panel.

        icon_light: (optional)
            An icon (with transparency) to be placed over
            light-colored backgrounds.

        icon_dark: (optional)
            An icon (with transparency) to be placed over
            dark-colored backgrounds.

        template_controls:
            The path to a template file (relative to the module's
            templates directory) which produces the controls for this
            panel.

        template_summary: (optional)
            The path to an optional template file (relative to the
            module's templates directory) which produces descriptive
            summary text for the panel on the front page.

        template_front: (optional)
            The path to an optional template file (relative to the
            module's templates directory) which produces a detailed
            collection of options for the space below the panel on the
            front page.

        allowed_groups: (optional)

            A list of groups (as defined in portal.conf) which should
            be allowed access to this panel.  If a user is not in one
            of these groups, they will not be presented with this
            panel as an option when browsing the portal.  NOTE: This
            does not prevent the user from entering the portal's URL
            by hand, it only removes the option from the user's UI
            when on pages outside of your module.  You must still
            explicitly check any accesses to your module to prevent
            access to information the user should not have.

            By default, there is not restriction on who will see this
            panel.

    See the port_database module for an example that uses most of
    these options, including multiple panels in one module.  See the
    sensor_health module for a module which uses the allowed_groups
    feature (and note that sensor_health relies on RAVE limiting
    access to the actual data and does not prevent the user from
    manipulating URLs to make requests which are guaranteed to fail.)

Python:

    analyses/

        In the analyses/ directory, place any new RAVE analyses this
        module requires.  You should have an __init__.py file in this
        directory which contains the __export__ symbol in order for
        analyses to be exported by RAVE.  See the RAVE documentation
        for details, and the port_database module for an example.

        When installed, your analyses will be under
        ${portal-prefix}/analyses/<module_name>/.

        Modules should be named in such a way that their names are
        valid Python module names, or analyses won't load correctly.

    lib/python/

        If your module should require any additional support in the
        form of Python libraries for both the analysis and UI files,
        these should be placed in lib/python/ beneath your module
        directory.  These files will be installed in
        ${portal-prefix}/lib/python/ (note that the module name is not
        automatically included), which will be in the Python path for
        both analyses and web pages.

HTML/PSP:

    htdocs/

        Files in the htdocs/ directory provide the primary
        user-interface for your module.  These are the individual
        pages that display your analyses.  Files from this location
        are placed under ${htdocs-prefix}/<module_name> when
        installed, which means all files underneath this directory
        will be web-accessible.

        Note that if you wish your interface to be displayed and work
        consistently, you will have to use a number of tools from the
        portal.psp module to build them.  See the port_database module
        for examples.

        Also see the description of the module.conf file and the
        templates/ directory for details on how your module is linked
        into the other portal pages.

    templates/

        Files in the templates/ directory are not displayed directly,
        but included by other pages.  In here you should place
        templates that define the controls for your module (to be
        shown in the control panel), and summary information for the
        front page display.  See the description of the module.conf
        file for details.
