How to use equivalents method in pandera

Best Python code snippet using pandera_python

action.py

Source:action.py Github

copy

Full Screen

1from entities.abstract_entity import ConceptualEntity2from entities.instrument import Instrument,Pipette3from entities.apparatus import Apparatus,Thermocycler,Centrifuge,Incubator4from entities.container import Well,Container5from property import protocols as pp6from property import actions as ap7from equivalent import abstract_equivalent as ae8from equivalent import protocol_equivalent as pe9from restriction import action_recipes as ar10class Action(ConceptualEntity):11 def __init__(self,properties=[],equivalents=[],restrictions=[]):12 if equivalents == []:13 e = [pe.ActionEquivalent()]14 else:15 e = equivalents16 p = [pp.Actions(Action),17 pp.UsesApparatus(Apparatus),18 pp.UsesInstrument(Instrument)] + properties19 super().__init__(properties=p,equivalents=e,20 restrictions=restrictions)21class Restriction(Action):22 def __init__(self,properties=[],equivalents=[],restrictions=[]):23 name = self.__class__.__name__24 e = equivalents + [ae.NameEquivalentClass(name)]25 p = properties + [pp.MayUseInstrument(default_value=Pipette),26 pp.MayUseApparatus(default_value=Thermocycler),27 pp.MayUseApparatus(default_value=Centrifuge),28 pp.MayUseApparatus(default_value=Incubator)]29 super().__init__(properties=p,equivalents=e,30 restrictions=restrictions)31class Purify(Action):32 def __init__(self,properties=[],equivalents=[],restrictions=[]):33 name = self.__class__.__name__34 e = equivalents + [ae.NameEquivalentClass(name)]35 p = properties + [pp.MayUseInstrument(default_value=Pipette),36 pp.MayUseApparatus(default_value=Centrifuge),37 pp.MayUseApparatus(default_value=Incubator)]38 super().__init__(properties=p,equivalents=e,39 restrictions=restrictions)40class Bind(Action):41 def __init__(self,properties=[],equivalents=[],restrictions=[]):42 name = self.__class__.__name__43 e = equivalents + [ae.NameEquivalentClass(name)]44 p = properties + [pp.MayUseInstrument(default_value=Pipette),45 pp.MayUseApparatus(default_value=Centrifuge)]46 super().__init__(properties=p,equivalents=e,47 restrictions=restrictions)48class Wash(Action):49 def __init__(self,properties=[],equivalents=[],restrictions=[]):50 name = self.__class__.__name__51 e = equivalents + [ae.NameEquivalentClass(name)]52 p = properties + [pp.MayUseInstrument(default_value=Pipette),53 pp.MayUseApparatus(default_value=Centrifuge)]54 super().__init__(properties=p,equivalents=e,55 restrictions=restrictions)56class Elution(Action):57 def __init__(self,properties=[],equivalents=[],restrictions=[]):58 name = self.__class__.__name__59 e = equivalents + [ae.NameEquivalentClass(name)]60 p = properties + [pp.MayUseInstrument(default_value=Pipette),61 pp.MayUseApparatus(default_value=Centrifuge),62 pp.MayUseApparatus(default_value=Incubator)]63 super().__init__(properties=p,equivalents=e,64 restrictions=restrictions)65class Transfer(Action):66 def __init__(self,properties=[],equivalents=[],restrictions=[]):67 name = [self.__class__.__name__.lower(),"dispense"]68 e = equivalents + [ae.NameEquivalentClass(name),69 pe.TransferEquivalent()]70 p = properties + [ap.Source(Well),71 ap.Destination(Well),72 ap.Volume(),73 pp.MayUseInstrument(default_value=Pipette)]74 r = restrictions + [ar.TransferRecipe()]75 super().__init__(properties=p,equivalents=e,76 restrictions=restrictions)77class Seal(Action):78 def __init__(self,properties=[],equivalents=[],restrictions=[]):79 name = self.__class__.__name__.lower()80 e = equivalents + [ae.NameEquivalentClass(name)]81 p = properties + [ap.Object(Container)]82 super().__init__(properties=p,equivalents=e,83 restrictions=restrictions)84class Unseal(Action):85 def __init__(self,properties=[],equivalents=[],restrictions=[]):86 name = self.__class__.__name__.lower()87 e = equivalents + [ae.NameEquivalentClass(name)]88 p = properties + [ap.Object(Container)]89 super().__init__(properties=p,equivalents=e,90 restrictions=restrictions)91class Spin(Action):92 def __init__(self,properties=[],equivalents=[],restrictions=[]):93 name = self.__class__.__name__.lower()94 e = equivalents + [ae.NameEquivalentClass(name)]95 p = properties + [ap.Object(Container),96 ap.Speed(),97 ap.Duration(),98 pp.MayUseApparatus(default_value=Centrifuge)]99 super().__init__(properties=p,equivalents=e,100 restrictions=restrictions)101class SeperateGel(Action):102 def __init__(self,properties=[],equivalents=[],restrictions=[]):103 name = [self.__class__.__name__.lower(),"gel_separate"]104 e = equivalents + [ae.NameEquivalentClass(name)]105 p = properties + [ap.Source(Well),106 ap.Duration(),107 ap.Volume()]108 super().__init__(properties=p,equivalents=e,109 restrictions=restrictions)110class ColonyPick(Action):111 def __init__(self,properties=[],equivalents=[],restrictions=[]):112 name = [self.__class__.__name__.lower(),"autopick"]113 e = equivalents + [ae.NameEquivalentClass(name)]114 p = properties + [ap.Source(Well),115 ap.Destination(Well)]116 super().__init__(properties=p,equivalents=e,117 restrictions=restrictions)118 119class Incubate(Action):120 def __init__(self,properties=[],equivalents=[],restrictions=[]):121 name = self.__class__.__name__.lower()122 e = equivalents + [ae.NameEquivalentClass(name)]123 p = properties + [ap.Object(Container),124 ap.Temperature(),125 ap.Duration(),126 pp.MayUseApparatus(default_value=Incubator)]127 super().__init__(properties=p,equivalents=e,128 restrictions=restrictions)129class Thermocycle(Action):130 def __init__(self,properties=[],equivalents=[],restrictions=[]):131 name = self.__class__.__name__.lower()132 e = equivalents + [ae.NameEquivalentClass(name)]133 p = properties + [ap.Object(Container),134 ap.Cycles(),135 ap.Temperature(),136 ap.Duration(),137 pp.MayUseApparatus(default_value=Thermocycler)]138 super().__init__(properties=p,equivalents=e,139 restrictions=restrictions)140class Extract(Action): # Source141 def __init__(self,properties=[],equivalents=[],restrictions=[]):142 if equivalents == []:143 e = [pe.ExtractEquivalent()]144 else:145 e = equivalents146 p = properties + [ap.Source(Well)]147 super().__init__(properties=p,equivalents=e,148 restrictions=restrictions)149class Dispense(Action): # Location150 def __init__(self,properties=[],equivalents=[],restrictions=[]):151 if equivalents == []:152 e = [pe.DispenseEquivalent()]153 else:154 e = equivalents155 p = properties + [ap.Destination(Well)]156 super().__init__(properties=p,equivalents=e,157 restrictions=restrictions)158class Consolidate(Action):159 def __init__(self,properties=[],equivalents=[],restrictions=[]):160 if equivalents == []:161 e = [pe.ConsolidateEquivalent()]162 else:163 e = equivalents164 super().__init__(properties=properties,equivalents=e,165 restrictions=restrictions)166class Distribute(Action):167 def __init__(self,properties=[],equivalents=[],restrictions=[]):168 if equivalents == []:169 e = [pe.DistributeEquivalent()]170 else:171 e = equivalents172 super().__init__(properties=properties,equivalents=e,...

Full Screen

Full Screen

genetic.py

Source:genetic.py Github

copy

Full Screen

1from entities.abstract_entity import PhysicalEntity2from equivalent import physcial_equivalent as pe3from property.property import HasPart,HasSequence4# -------------- DNA --------------5class DNA(PhysicalEntity):6 def __init__(self,equivalents=[],properties=[]):7 if equivalents == []:8 r = [pe.DNARoleEquivalent()]9 else:10 r = equivalents11 p = properties + [HasPart(PhysicalEntity),HasSequence()]12 super().__init__(equivalents=r,properties=p)13class Promoter(DNA):14 def __init__(self,equivalents=[]):15 if equivalents == []:16 r = [pe.PromoterRoleEquivalent()]17 else:18 r = equivalents19 super().__init__(equivalents=r)20class RBS(DNA):21 def __init__(self,equivalents=[]):22 if equivalents == []:23 r = [pe.RBSRoleEquivalent()]24 else:25 r = equivalents26 super().__init__(equivalents=r)27class CDS(DNA):28 def __init__(self,equivalents=[]):29 if equivalents == []:30 r = [pe.CDSRoleEquivalent()]31 else:32 r = equivalents33 super().__init__(equivalents=r)34class Terminator(DNA):35 def __init__(self,equivalents=[]):36 if equivalents == []:37 r = [pe.TerminatorRoleEquivalent()]38 else:39 r = equivalents40 super().__init__(equivalents=r)41class Gene(DNA):42 def __init__(self,equivalents=[]):43 if equivalents == []:44 r = [pe.GeneRoleEquivalent()]45 else:46 r = equivalents47 super().__init__(equivalents=r)48class Operator(DNA):49 def __init__(self,equivalents=[]):50 if equivalents == []:51 r = [pe.OperatorRoleEquivalent()]52 else:53 r = equivalents54 super().__init__(equivalents=r)55class EngineeredRegion(DNA):56 def __init__(self,equivalents=[]):57 if equivalents == []:58 r = [pe.EngineeredRegionRoleEquivalent()]59 else:60 r = equivalents61 super().__init__(equivalents=r)62class EngineeredTag(DNA):63 def __init__(self,equivalents=[]):64 if equivalents == []:65 r = [pe.EngineeredTagRoleEquivalent()]66 else:67 r = equivalents68 super().__init__(equivalents=r)69class StartCodon(DNA):70 def __init__(self,equivalents=[]):71 if equivalents == []:72 r = [pe.StartCodonRoleEquivalent()]73 else:74 r = equivalents75 super().__init__(equivalents=r)76class Tag(DNA):77 def __init__(self,equivalents=[]):78 if equivalents == []:79 r = [pe.TagRoleEquivalent()]80 else:81 r = equivalents82 super().__init__(equivalents=r)83class NonCovBindingSite(DNA):84 def __init__(self,equivalents=[]):85 if equivalents == []:86 r = [pe.NonCovBindingSiteRoleEquivalent()]87 else:88 r = equivalents89 super().__init__(equivalents=r)90class EngineeredGene(DNA):91 def __init__(self,equivalents=[]):92 if equivalents == []:93 r = [pe.EngineeredGeneRoleEquivalent()]94 else:95 r = equivalents96 super().__init__(equivalents=r)97# -------------- Complex --------------98class Complex(PhysicalEntity):99 def __init__(self,equivalents=[]):100 if equivalents == []:101 r = [pe.ComplexRoleEquivalent()]102 else:103 r = equivalents104 super().__init__(equivalents=r)105# -------------- RNA --------------106class RNA(PhysicalEntity):107 def __init__(self,equivalents=[]):108 if equivalents == []:109 r = [pe.RNARoleEquivalent()]110 else:111 r = equivalents112 super().__init__(equivalents=r)113class mRNA(RNA):114 def __init__(self,equivalents=[]):115 if equivalents == []:116 r = [pe.mRNARoleEquivalent()]117 else:118 r = equivalents119 super().__init__(equivalents=r)120class sgRNA(RNA):121 def __init__(self,equivalents=[]):122 if equivalents == []:123 r = [pe.sgRNARoleEquivalent()]124 else:125 r = equivalents...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run pandera automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful