Skip to content

Transforms

peder2911 edited this page Jan 21, 2022 · 2 revisions

Contributing transforms

Views3 developers will want to add new transforms to the system. In views3, a transform is simply a function that must conform to a set of simple rules:

  • The first argument to the transform is a dataframe, which conforms to the UNIT-TIME indexing scheme
  • Subsequent arguments must (currently) only be positional, and can only take the basic types: str, int or float
  • A transform must not take a very long time to run (> 4 minutes)

A function that conforms to this format can be registered with views_data_transformer by just importing the function module under the "transforms" module in the views_data_transformer service.