Opened 5 years ago

Closed 5 years ago

#1954 closed defect (fixed)

Custom recipe not found

Reported by: Dimitar Misev Owned by: Dimitar Misev
Priority: major Milestone: 9.8
Component: wcst_import Version: development
Keywords: Cc: Bang Pham Huu
Complexity: Medium

Description

I created a sentinel2 recipe, the get_name() method returns "sentinel2".

It's installed, but when running an ingredients with this recipe I get this error:

Validation error: Recipe 'sentinel2' not found; if it's a custom recipe, please put it in the '$RMANHOME/share/rasdaman/wcst_import/recipes_custom' folder.

but

$ ls $RMANHOME/share/rasdaman/wcst_import/recipes_custom
__init__.py  __init__.pyc  sentinel2  test_custom_recipe

$ ls $RMANHOME/share/rasdaman/wcst_import/recipes_custom/sentinel2/
__init__.py  __init__.pyc  recipe.py  recipe.pyc

Change History (2)

comment:1 by Dimitar Misev, 5 years ago

The problem is that the RecipeRegistry only registers direct subclasses of BaseRecipe, but my custom recipe is a subclass of the general coverage recipe:

        for recipe in BaseRecipe.__subclasses__():
            self.registry[recipe.get_name()] = recipe

comment:2 by Dimitar Misev, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.