Top

geoDSS module

geoDSS is a simple very extendable library to create automatic testing of a subject against rules and then report on the results.

The library can be imported, or used via the interfaces scripts providing interfaces for:

  • command line
  • cgi
  • wsgi
'''
geoDSS is a simple very extendable library to create automatic testing of a subject against rules and then report on the results.

The library can be imported, or used via the interfaces scripts providing interfaces for:

- command line
- cgi
- wsgi
'''

from .base import rules_set

Sub-modules

geoDSS.base

The base module provides the rules_set class. This class is all you need to work with to run your testing.

Example

import geoDSS                                                        # be sure this is possible by installing geoDSS 
                                                 ...

geoDSS.batch

This example code shows how easy it is to run geoDSS against multiple subjects loaded from a csv file. Of course this example is functional, but might be improved on with eg. more error checking, logging and communication with the user.

eg. ./batch.py examples/rule_sets/batch_geocode_tab.yaml exam...

geoDSS.interfaces

This example code provides several interfaces to geoDSS:

  • command line
  • cgi
  • wsgi

Of course this example is functional, but might be improved on with eg. better cgi handling, more error checking, logging and communication with the user.

Enable citg (cgi)

Adapt the global var...

geoDSS.loaders

The loaders module is a provider for rule_set loaders.

The default loader is yaml_loader which loads a rule_set from a yaml file.

A rule set is a simple object with some generic properties and some rules.

Definition

definition is expected to be a dict having generic properties and ...

geoDSS.processors

Upon execution of a rule set, a subject is evaluated by each rule in order.

When the rule is based on a processor, the processor returns a modified subject. Optionally a processor reports according to the report_template given in the rule.

The report_template can be a simple string or a string ...

geoDSS.reporters

The reporters module provides reporters for the rule_set and rules.

The standard reporter is reporters.md, providing a markdown reporter. This one can output html as well.

Extending the reporters.md reporter or creating a new one can easily be done with pandoc.

Of course, you can also convert via...

geoDSS.scheduled

This example code shows how easy it is to run geoDSS in a scheduled manner. Of course this example is functional, but might be improved on with eg. more error checking, logging and communication with the user.

eg. ./scheduled.py examples/rule_sets/scheduled_request.yaml examples/subjects/google_re...

geoDSS.serve_cgi

With servi_cgi it is easy to bring up a webserver listening on port 8000 to start using geoDSS via a webinterface. Furthermore this serves as an example for how to include geoDSS in webinterfaces.

Warning

serve.cgi is not meant for production use.

**Probably you don't want to expose ...

geoDSS.tests

Upon execution of a rule set, a subject is evaluated by each rule in order.

When the rule is based on a test, this evaluation results in a decision being either True or False.

When the decision is True the test reports according to the report_template given in the rule.

The report_template can ...

geoDSS.ui_generators

The ui_generators module is a provider for UI generators.