Opened 8 years ago

Last modified 8 years ago

#33 new enhancement

ECC filters should be enumerated dynamically

Reported by: flip Owned by:
Priority: minor Milestone:
Component: processing Version:
Keywords: Cc:


As of this writing, ECC filters all live in analysis/src/ecc_filters. They are imported by which contains a simple list of import statements at the top, one for each ECC filter. This is the only place where ECC filters are enumerated.

Ideally, we'd like to make it easy for users to add their own ECC filters which is one of the reasons we moved all of them into their own directory. (Organization was another reason.) We hope that a would-be ECC filter author can just copy one of our files, change the names and the algorithm code and have a working ECC filter.

There's one problem with this idea, though, which is that the list of filters to be imported is hardcoded in The user's new filter won't be recognized unless she adds it to the list of imports.

We can either (a) tell her to edit or (b) change to scan the ecc_filters directory and load ECC filters dynamically.

Obviously (a) is a lot easier for us. (b) might not be so hard since we've written this code once already. See the code in this version of

I think the most prudent course of action is to consider (b) once we have some people writing ECC filters. There's no guarantee there will be enough interest, so there's no point in writing a bunch of tricky import code to implement a feature that might not get used.

Change History (2)

comment:1 Changed 8 years ago by bsoher

ECC and water filters are very good examples of what a user contribution "might look like", however all things considered, I don't think that there will be a lot more of either added to the program. I could be wrong but both have a good assortment of standard fare, so ...

Thus, I'd not vote to put auto-harvesting of files etc into the mix. What about creating a standalone 'constants' file in the ecc folder that the user could add the name and class of their module to? That would help them to focus on what needs doing, maybe?

comment:2 Changed 8 years ago by flip

That would probably help. My mind leaps to a text file or XML file, but non-Python files have to explicitly named when building the Vespa install bundle whereas .py files get grabbed automatically. So if/when we implement the enumerated list of filters in the ecc_filters directory, it should probably live in a .py file.

Note: See TracTickets for help on using tickets.