def setUpClass(cls): # silence usually unhelpful CORS log logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL) cls.numReferenceSets = 5 cls.numReferencesPerReferenceSet = 3 cls.numAlignmentsPerReadGroup = 2 config = { "DATA_SOURCE": "__SIMULATED__", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 0, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 10, "SIMULATED_BACKEND_NUM_REFERENCE_SETS": cls.numReferenceSets, "SIMULATED_BACKEND_NUM_REFERENCES_PER_REFERENCE_SET": cls.numReferencesPerReferenceSet, "SIMULATED_BACKEND_NUM_ALIGNMENTS_PER_READ_GROUP": cls.numAlignmentsPerReadGroup, } frontend.reset() frontend.configure(baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client()
def setUpClass(cls): config = { "DATA_SOURCE": "simulated://", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 1, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1, # "DEBUG" : True } frontend.reset() frontend.configure(baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client() # silence usually unhelpful CORS log logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL) # example test values cls.backend = frontend.app.backend cls.referenceSet = cls.backend.getReferenceSets()[0] cls.referenceSetId = cls.referenceSet.getId() cls.reference = cls.referenceSet.getReferences()[0] cls.referenceId = cls.reference.getId() cls.dataset = cls.backend.getDatasets()[0] cls.datasetId = cls.dataset.getId() cls.variantSet = cls.dataset.getVariantSets()[0] cls.variantSetId = cls.variantSet.getId() gaVariant = cls.variantSet.getVariants("1", 0, 2**32).next() cls.variantId = gaVariant.id cls.callSet = cls.variantSet.getCallSets()[0] cls.callSetId = cls.callSet.getId() cls.readGroupSet = cls.dataset.getReadGroupSets()[0] cls.readGroupSetId = cls.readGroupSet.getId() cls.readGroup = cls.readGroupSet.getReadGroups()[0] cls.readGroupId = cls.readGroup.getId() cls.readAlignment = cls.readGroup.getReadAlignments().next() cls.readAlignmentId = cls.readAlignment.id
def setUpClass(cls): config = { "DATA_SOURCE": paths.testDataRepo, "DEBUG": False } frontend.reset() frontend.configure( baseConfig="DevelopmentConfig", extraConfig=config) cls.app = frontend.app.test_client()
def setUpClass(cls): config = { "DATA_SOURCE": "simulated://", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 1, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1, "LANDING_MESSAGE_HTML": paths.landingMessageHtml # "DEBUG" : True } frontend.reset() frontend.configure( baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client() # silence usually unhelpful CORS log logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL) # example test values cls.backend = frontend.app.backend cls.dataRepo = cls.backend.getDataRepository() cls.referenceSet = cls.dataRepo.getReferenceSets()[0] cls.referenceSetId = cls.referenceSet.getId() cls.reference = cls.referenceSet.getReferences()[0] cls.referenceId = cls.reference.getId() cls.dataset = cls.backend.getDataRepository().getDatasets()[0] cls.datasetId = cls.dataset.getId() cls.variantSet = cls.dataset.getVariantSets()[0] cls.variantSetId = cls.variantSet.getId() gaVariant = cls.variantSet.getVariants("1", 0, 2**32).next() cls.variantId = gaVariant.id cls.callSet = cls.variantSet.getCallSets()[0] cls.callSetId = cls.callSet.getId() cls.readGroupSet = cls.dataset.getReadGroupSets()[0] cls.readGroupSetId = cls.readGroupSet.getId() cls.readGroup = cls.readGroupSet.getReadGroups()[0] cls.readGroupId = cls.readGroup.getId() cls.readAlignment = cls.readGroup.getReadAlignments().next() cls.readAlignmentId = cls.readAlignment.id cls.phenotypeAssociationSet = \ cls.dataset.getPhenotypeAssociationSets()[0] cls.phenotypeAssociationSetId = cls.phenotypeAssociationSet.getId() cls.association = cls.phenotypeAssociationSet.getAssociations()[0] cls.phenotype = cls.association.phenotype cls.phenotypeId = cls.phenotype.id cls.featureSets = cls.dataset.getFeatureSets() cls.genotypePhenotype = cls.phenotypeAssociationSet.getAssociations( request=None, featureSets=cls.featureSets)[0] cls.genotypePhenotypeId = cls.genotypePhenotype.id cls.rnaQuantificationSet = cls.dataset.getRnaQuantificationSets()[0] cls.rnaQuantificationSetId = cls.rnaQuantificationSet.getId() cls.rnaQuantification = cls.rnaQuantificationSet.getRnaQuantifications( )[0] cls.rnaQuantificationId = cls.rnaQuantification.getId() cls.expressionLevel = cls.rnaQuantification.getExpressionLevels( 1, 2)[0] cls.expressionLevelId = cls.expressionLevel.getId()
def setUpClass(cls): config = { "DATA_SOURCE": paths.testDataRepo, "DEBUG": False } logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL) frontend.reset() frontend.configure( baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client()
def setUpClass(cls): config = { "DATA_SOURCE": "simulated://", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 1, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1, "LANDING_MESSAGE_HTML": paths.landingMessageHtml # "DEBUG" : True } frontend.reset() frontend.configure(baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client() # silence usually unhelpful CORS log logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL) # example test values cls.backend = frontend.app.backend cls.dataRepo = cls.backend.getDataRepository() cls.referenceSet = cls.dataRepo.getReferenceSets()[0] cls.referenceSetId = cls.referenceSet.getId() cls.reference = cls.referenceSet.getReferences()[0] cls.referenceId = cls.reference.getId() cls.dataset = cls.backend.getDataRepository().getDatasets()[0] cls.datasetId = cls.dataset.getId() cls.variantSet = cls.dataset.getVariantSets()[0] cls.variantSetId = cls.variantSet.getId() gaVariant = cls.variantSet.getVariants("1", 0, 2**32).next() cls.variantId = gaVariant.id cls.callSet = cls.variantSet.getCallSets()[0] cls.callSetId = cls.callSet.getId() cls.readGroupSet = cls.dataset.getReadGroupSets()[0] cls.readGroupSetId = cls.readGroupSet.getId() cls.readGroup = cls.readGroupSet.getReadGroups()[0] cls.readGroupId = cls.readGroup.getId() cls.readAlignment = cls.readGroup.getReadAlignments().next() cls.readAlignmentId = cls.readAlignment.id cls.phenotypeAssociationSet = \ cls.dataset.getPhenotypeAssociationSets()[0] cls.phenotypeAssociationSetId = cls.phenotypeAssociationSet.getId() cls.association = cls.phenotypeAssociationSet.getAssociations()[0] cls.phenotype = cls.association.phenotype cls.phenotypeId = cls.phenotype.id cls.featureSets = cls.dataset.getFeatureSets() cls.genotypePhenotype = cls.phenotypeAssociationSet.getAssociations( request=None, featureSets=cls.featureSets)[0] cls.genotypePhenotypeId = cls.genotypePhenotype.id cls.rnaQuantificationSet = cls.dataset.getRnaQuantificationSets()[0] cls.rnaQuantificationSetId = cls.rnaQuantificationSet.getId() cls.rnaQuantification = cls.rnaQuantificationSet.getRnaQuantifications( )[0] cls.rnaQuantificationId = cls.rnaQuantification.getId() cls.expressionLevel = cls.rnaQuantification.getExpressionLevels(1, 2)[0] cls.expressionLevelId = cls.expressionLevel.getId()
def setUpClass(cls): config = { "DATA_SOURCE": "__SIMULATED__", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 1, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1, # "DEBUG" : True } frontend.reset() frontend.configure(baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client() # silence usually unhelpful CORS log logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL)
def setUpClass(cls): config = { "DATA_SOURCE": "__SIMULATED__", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 1, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1, "OIDC_CLIENT_ID": "123", "OIDC_CLIENT_SECRET": RANDSTR, "OIDC_PROVIDER": "http://auth.com" # "DEBUG" : True } frontend.reset() frontend.configure(baseConfig="TestOidcConfig", extraConfig=config, port=8001) cls.app = frontend.app.test_client()
def setUpClass(cls): config = { "DATA_SOURCE": "__SIMULATED__", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 1, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1, "OIDC_CLIENT_ID": "123", "OIDC_CLIENT_SECRET": RANDSTR, "OIDC_PROVIDER": "http://auth.com" # "DEBUG" : True } frontend.reset() frontend.configure( baseConfig="TestOidcConfig", extraConfig=config, port=8001) cls.app = frontend.app.test_client()
def setUpClass(cls): # silence usually unhelpful CORS log logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL) # Set the random seed to make tests reproducible. random.seed(1) config = { "DATA_SOURCE": "simulated://", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 5, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 4, "SIMULATED_BACKEND_NUM_REFERENCE_SETS": 3, "SIMULATED_BACKEND_NUM_REFERENCES_PER_REFERENCE_SET": 4, "SIMULATED_BACKEND_NUM_ALIGNMENTS_PER_READ_GROUP": 5 } frontend.reset() frontend.configure(baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client()
def setUpClass(cls): # silence usually unhelpful CORS log logging.getLogger("ga4gh.frontend.cors").setLevel(logging.CRITICAL) # Set the random seed to make tests reproducible. random.seed(1) config = { "DATA_SOURCE": "__SIMULATED__", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 5, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 4, "SIMULATED_BACKEND_NUM_REFERENCE_SETS": 3, "SIMULATED_BACKEND_NUM_REFERENCES_PER_REFERENCE_SET": 4, "SIMULATED_BACKEND_NUM_ALIGNMENTS_PER_READ_GROUP": 5, } frontend.reset() frontend.configure(baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client()
def setUpClass(cls): config = { "DATA_SOURCE": "__SIMULATED__", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 1, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1, # "DEBUG" : True } frontend.reset() frontend.configure( baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client() # silence usually unhelpful CORS log logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL) # example test values cls.backend = frontend.app.backend
def setUpClass(cls): config = { "DATA_SOURCE": "simulated://", "SIMULATED_BACKEND_RANDOM_SEED": 1111, "SIMULATED_BACKEND_NUM_CALLS": 1, "SIMULATED_BACKEND_VARIANT_DENSITY": 1.0, "SIMULATED_BACKEND_NUM_VARIANT_SETS": 1, # "DEBUG" : True } frontend.reset() frontend.configure( baseConfig="TestConfig", extraConfig=config) cls.app = frontend.app.test_client() # silence usually unhelpful CORS log logging.getLogger('ga4gh.frontend.cors').setLevel(logging.CRITICAL) # example test values cls.backend = frontend.app.backend cls.dataRepo = cls.backend.getDataRepository() cls.referenceSet = cls.dataRepo.getReferenceSets()[0] cls.referenceSetId = cls.referenceSet.getId() cls.reference = cls.referenceSet.getReferences()[0] cls.referenceId = cls.reference.getId() cls.dataset = cls.backend.getDataRepository().getDatasets()[0] cls.datasetId = cls.dataset.getId() cls.variantSet = cls.dataset.getVariantSets()[0] cls.variantSetId = cls.variantSet.getId() gaVariant = cls.variantSet.getVariants("1", 0, 2**32).next() cls.variantId = gaVariant.id cls.callSet = cls.variantSet.getCallSets()[0] cls.callSetId = cls.callSet.getId() cls.readGroupSet = cls.dataset.getReadGroupSets()[0] cls.readGroupSetId = cls.readGroupSet.getId() cls.readGroup = cls.readGroupSet.getReadGroups()[0] cls.readGroupId = cls.readGroup.getId() cls.readAlignment = cls.readGroup.getReadAlignments().next() cls.readAlignmentId = cls.readAlignment.id
def setUpClass(cls): config = {"DATA_SOURCE": paths.testDataRepo, "DEBUG": False} frontend.reset() frontend.configure(baseConfig="DevelopmentConfig", extraConfig=config) cls.app = frontend.app.test_client()
def setUpClass(cls): frontend.reset() frontend.configure(baseConfig="TestConfig") frontend.app.log_exception = mock.Mock()
def setUpClass(cls): frontend.reset() frontend.configure(baseConfig="TestConfig")
def setUpClass(cls): frontend.reset() frontend.configure(baseConfig="TestConfig") cls.app = frontend.app.test_client()