Example #1
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`barcode`.
     if not self.barcode is None:
         slug = slug_from_string(self.barcode)
     else:
         slug = None
     return slug
Example #2
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`barcode`.
     if not self.barcode is None:
         slug = slug_from_string(self.barcode)
     else:
         slug = None
     return slug
Example #3
0
 def test_init(self, request, iso_fac_name):
     iso_fac = request.getfuncargvalue(iso_fac_name)
     iso = iso_fac()
     check_attributes(iso, iso_fac.init_kw)
     assert len(iso.iso_stock_racks) == 0
     assert len(iso.iso_sector_stock_racks) == 0
     assert len(iso.iso_preparation_plates) == 0
     assert len(iso.iso_aliquot_plates) == 0
     if iso_fac_name == 'stock_sample_creation_iso_fac':
         assert len(iso.iso_sector_preparation_plates) == 0
     else:
         assert len(iso.final_plates) == 0
     assert iso.slug == slug_from_string(iso.label)
Example #4
0
 def test_init(self, request, iso_fac_name):
     iso_fac = request.getfuncargvalue(iso_fac_name)
     iso = iso_fac()
     check_attributes(iso, iso_fac.init_kw)
     assert len(iso.iso_stock_racks) == 0
     assert len(iso.iso_sector_stock_racks) == 0
     assert len(iso.iso_preparation_plates) == 0
     assert len(iso.iso_aliquot_plates) == 0
     if iso_fac_name == 'stock_sample_creation_iso_fac':
         assert len(iso.iso_sector_preparation_plates) == 0
     else:
         assert len(iso.final_plates) == 0
     assert iso.slug == slug_from_string(iso.label)
Example #5
0
 def test_init(self, species_fac):
     spec = species_fac()
     check_attributes(spec, species_fac.init_kw)
     assert spec.slug == slug_from_string(spec.common_name)
Example #6
0
 def slug(self):
     """
     The slug is derived from the :attr:`hash_value`.
     """
     return slug_from_string(self._hash_value)
Example #7
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`common_name`.
     return slug_from_string(self.common_name)
Example #8
0
 def test_init(self, reservoir_specs_fac):
     rs = reservoir_specs_fac()
     check_attributes(rs, reservoir_specs_fac.init_kw)
     assert rs.slug == slug_from_string(rs.name)
Example #9
0
 def slug(self):
     #: The slug for instances of this class is derived from the
     #: :attr:`name`.
     return slug_from_string(self.name)
Example #10
0
 def slug(self):
     """
     The slug of a reservoir spec is its :class:`name`.
     """
     return slug_from_string(self._name)
Example #11
0
 def test_init(self, user_fac):
     user = user_fac()
     check_attributes(user, user_fac.init_kw)
     assert user.slug == slug_from_string(user.directory_user_id)
Example #12
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`common_name`.
     return slug_from_string(self.common_name)
Example #13
0
 def slug(self):
     #: For instance of this class the slug is composed as follows:
     #: [:attr:`domain` \: :attr:`predicate` \= :attr:`value`\]
     #: (without white space around the special characters).
     return slug_from_string("%s:%s=%s" %
                             (self.domain, self.predicate, self.value))
Example #14
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`username`.
     return slug_from_string(self.user.username + '_' + self.app_name)
Example #15
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`username`.
     return slug_from_string(self.directory_user_id)
Example #16
0
 def test_init(self, reservoir_specs_fac):
     rs = reservoir_specs_fac()
     check_attributes(rs, reservoir_specs_fac.init_kw)
     assert rs.slug == slug_from_string(rs.name)
Example #17
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`accession`.
     return slug_from_string(self.accession)
Example #18
0
 def slug(self):
     """
     The slug for molecule design libraries is derived from the
     :attr:`label`.
     """
     return slug_from_string(self.label)
Example #19
0
 def test_basic(self):
     str_input = "spaces with_underscore AND CAPS"
     str_as_slug = "spaces-with-underscore-and-caps"
     slug = slug_from_string(str_input)
     self.assert_equal(slug, str_as_slug)
Example #20
0
def reservoir_specs_std96():
    agg = get_root_aggregate(IReservoirSpecs)
    return agg.get_by_slug(slug_from_string(RESERVOIR_SPECS_NAMES.STANDARD_96))
Example #21
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`username`.
     return slug_from_string(self.directory_user_id)
Example #22
0
def reservoir_specs_std96():
    agg = get_root_aggregate(IReservoirSpecs)
    return agg.get_by_slug(
                    slug_from_string(RESERVOIR_SPECS_NAMES.STANDARD_96))
Example #23
0
 def slug(self):
     """
     The slug of a planned transfer is its :attr:`name`.
     """
     return slug_from_string(self._name)
 def test_get_slug_from_string(self):
     self.assert_equal(slug_from_string('a b_C'), 'a-b-c')
Example #25
0
 def test_init(self, gene_fac):
     gene = gene_fac()
     assert gene.slug == slug_from_string(gene.accession)
     check_attributes(gene, gene_fac.init_kw)
Example #26
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`hash_value`.
     return slug_from_string(self._hash_value)
Example #27
0
 def test_get_slug_from_string(self):
     self.assert_equal(slug_from_string('a b_C'), 'a-b-c')
Example #28
0
 def slug(self):
     return slug_from_string("%s-%s" % (self.last_name, self.first_name))
Example #29
0
 def slug(self):
     """
     The slug of a reservoir spec is its :class:`name`.
     """
     return slug_from_string(self._name)
Example #30
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`hash_value`.
     return slug_from_string(self._hash_value)
Example #31
0
 def slug(self):
     """
     The slug of a planned transfer is its :attr:`name`.
     """
     return slug_from_string(self._name)
Example #32
0
 def test_init(self, organization_fac):
     org = organization_fac()
     check_attributes(org, organization_fac.init_kw)
     assert org.slug == slug_from_string(org.name)
Example #33
0
 def test_init(self, molecule_type_fac):
     mt = molecule_type_fac()
     check_attributes(mt, molecule_type_fac.init_kw)
     assert mt.slug == slug_from_string(mt.name)
Example #34
0
 def slug(self):
     return slug_from_string(self.name)
Example #35
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`label`.
     return slug_from_string(self.label)
Example #36
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`accession`.
     return slug_from_string(self.accession)
Example #37
0
 def __get_structure_type(self):
     agg = get_root_aggregate(IChemicalStructureType)
     return agg.get_by_slug(slug_from_string(self.structure_type_id))
Example #38
0
 def test_init(self, barcoded_location_fac):
     bl = barcoded_location_fac()
     check_attributes(bl, barcoded_location_fac.init_kw)
     assert bl.rack is None
     assert bl.slug == slug_from_string(bl.name)
Example #39
0
 def test_init(self, user_preferences_fac):
     up = user_preferences_fac()
     check_attributes(up, user_preferences_fac.init_kw)
     assert up.slug == slug_from_string("%s_%s"
                                        % (up.user.username, up.app_name))
Example #40
0
 def slug(self):
     """
     The slug for molecule design libraries is derived from the
     :attr:`label`.
     """
     return slug_from_string(self.label)
Example #41
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`label`.
     return slug_from_string(self.label)
Example #42
0
 def test_init(self, barcoded_location_fac):
     bl = barcoded_location_fac()
     check_attributes(bl, barcoded_location_fac.init_kw)
     assert bl.rack is None
     assert bl.slug == slug_from_string(bl.name)
Example #43
0
 def slug(self):
     #: For instances of this class, the slug is derived from the
     #: :attr:`username`.
     return slug_from_string(self.user.username + '_' + self.app_name)
Example #44
0
 def slug(self):
     return slug_from_string(
                 "%s-%s-%s-%s"
                 % (self.genus_name, self.species_name,
                    '' if self.cultivar is None else self.cultivar,
                    '' if self.author is None else self.author))
Example #45
0
 def slug(self):
     """
     The slug is derived from the :attr:`hash_value`.
     """
     return slug_from_string(self._hash_value)
Example #46
0
 def test_init(self, organization_fac):
     org = organization_fac()
     check_attributes(org, organization_fac.init_kw)
     assert org.slug == slug_from_string(org.name)
Example #47
0
 def test_init(self, item_status_fac):
     its = item_status_fac()
     check_attributes(its, item_status_fac.init_kw)
     assert its.slug == slug_from_string(its.name)
Example #48
0
 def slug(self):
     return slug_from_string("%s-%s" %
                             (self.last_name, self.first_name))
Example #49
0
 def test_init(self, project_fac):
     proj = project_fac()
     check_attributes(proj, project_fac.init_kw)
     assert proj.slug == slug_from_string(proj.label)
Example #50
0
 def test_init(self, user_preferences_fac):
     up = user_preferences_fac()
     check_attributes(up, user_preferences_fac.init_kw)
     assert up.slug == slug_from_string("%s_%s" %
                                        (up.user.username, up.app_name))
Example #51
0
 def test_init(self, user_fac):
     user = user_fac()
     check_attributes(user, user_fac.init_kw)
     assert user.slug == slug_from_string(user.directory_user_id)
Example #52
0
 def test_init(self, tag_fac):
     tag = tag_fac()
     check_attributes(tag, tag_fac.init_kw)
     assert tag.slug == \
         slug_from_string("%s:%s=%s" %
                          (tag.domain, tag.predicate, tag.value))