Skip to content

Commit

Permalink
Add test to check all the recipes can be created
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopasra committed Apr 25, 2018
1 parent d618c34 commit 07ac428
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
6 changes: 0 additions & 6 deletions megaradrp/drp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ modes:
description: Slit Flat
key: MegaraSlitFlat
tagger: megaradrp.taggers.tagger_base_image
- name: Weights
summary: Weights
description: Weights
key: MegaraWeights
tagger: megaradrp.taggers.tagger_base_image
- name: ModelMap
summary: Computes a ModelMap
description: Computes a ModelMap from FlatImages
Expand Down Expand Up @@ -183,7 +178,6 @@ pipelines:
MegaraArcCalibration: megaradrp.recipes.calibration.arc.ArcCalibrationRecipe
MegaraSlitFlat: megaradrp.recipes.calibration.slitflat.SlitFlatRecipe
MegaraTraceMap: megaradrp.recipes.calibration.trace.TraceMapRecipe
MegaraWeights: megaradrp.recipes.calibration.weights.WeightsRecipe
MegaraModelMap: megaradrp.recipes.calibration.modelmap.ModelMapRecipe
MegaraFiberFlatImage: megaradrp.recipes.calibration.flat.FiberFlatRecipe
MegaraTwilightFlatImage: megaradrp.recipes.calibration.twilight.TwilightFiberFlatRecipe
Expand Down
2 changes: 1 addition & 1 deletion megaradrp/recipes/calibration/arc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from numina.array.wavecalib.solutionarc import CrLinear
from numina.array.wavecalib.solutionarc import SolutionArcCalibration
from numina.core.validator import range_validator
from numina.flow import SerialFlow
from numina.util.flow import SerialFlow
from numina.array import combine

from megaradrp.types import ProcessedFrame, ProcessedRSS
Expand Down
2 changes: 1 addition & 1 deletion megaradrp/recipes/calibration/twilight.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from numina.core import Product, Parameter
from numina.core.requirements import ObservationResultRequirement
from numina.flow import SerialFlow
from numina.util.flow import SerialFlow
from numina.exceptions import ValidationError

import megaradrp.requirements as reqs
Expand Down
2 changes: 1 addition & 1 deletion megaradrp/recipes/scientific/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from numina.core import Parameter
from numina.core.requirements import ObservationResultRequirement
from numina.flow import SerialFlow
from numina.util.flow import SerialFlow
from numina.array import combine
from numina.frame.utils import copy_img

Expand Down
17 changes: 17 additions & 0 deletions megaradrp/tests/test_drp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


from numina.core import BaseRecipe

from ..loader import load_drp


def test_recipes_are_defined():

current_drp = load_drp()

assert 'default' in current_drp.pipelines

for pipeval in current_drp.pipelines.values():
for key, val in pipeval.recipes.items():
recipe = pipeval.get_recipe_object(key)
assert isinstance(recipe, BaseRecipe)

0 comments on commit 07ac428

Please sign in to comment.