genui.compounds.extensions.csvimports package

Subpackages

Submodules

genui.compounds.extensions.csvimports.admin module

genui.compounds.extensions.csvimports.apps module

class genui.compounds.extensions.csvimports.apps.CsvimportsConfig(app_name, app_module)[source]

Bases: AppConfig

name = 'genui.compounds.extensions.csvimports'

genui.compounds.extensions.csvimports.genuisetup module

genuisetup

Created by: Martin Sicho On: 7/16/20, 2:48 PM

genui.compounds.extensions.csvimports.genuisetup.setup(*args, **kwargs)[source]

genui.compounds.extensions.csvimports.initializer module

initializer

Created by: Martin Sicho On: 7/16/20, 1:54 PM

exception genui.compounds.extensions.csvimports.initializer.CSVParsingError(original, *args, **kwargs)[source]

Bases: GenUIException

class genui.compounds.extensions.csvimports.initializer.CSVSetInitializer(*args, **kwargs)[source]

Bases: FileInitializer

parserCallback(smile, props)[source]
populateInstance()[source]

genui.compounds.extensions.csvimports.models module

class genui.compounds.extensions.csvimports.models.CSVCompounds(id, polymorphic_ctype, name, description, created, updated, project, molset_ptr, nameCol, smilesCol, activityCol, activityTypeCol, activityUnitsCol, colSeparator, emptyValue)[source]

Bases: FileCompounds

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

activityCol

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

activityTypeCol

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

activityUnitsCol

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

colSeparator

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

emptyValue

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

molset_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

molset_ptr_id
nameCol

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

polymorphic_primary_key_name = 'id'
polymorphic_super_sub_accessors_replaced = False
smilesCol

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

tasks

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

class genui.compounds.extensions.csvimports.models.CSVMolecule(id, polymorphic_ctype, entity, molecule_ptr, name)[source]

Bases: Molecule

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

molecule_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

molecule_ptr_id
name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

polymorphic_primary_key_name = 'id'
polymorphic_super_sub_accessors_replaced = False

genui.compounds.extensions.csvimports.parser module

parser

Created by: Martin Sicho On: 7/16/20, 2:17 PM

class genui.compounds.extensions.csvimports.parser.CSVParser(*args, **kwargs)[source]

Bases: FileParser

parse()[source]
processRow(row)[source]

genui.compounds.extensions.csvimports.serializers module

serializers

Created by: Martin Sicho On: 7/16/20, 1:52 PM

class genui.compounds.extensions.csvimports.serializers.CSVSetSerializer(*args, **kwargs)[source]

Bases: FileSetSerializer

class Meta[source]

Bases: object

fields = ('id', 'name', 'description', 'created', 'updated', 'project', 'activities', 'files', 'file', 'nameCol', 'smilesCol', 'activityCol', 'activityTypeCol', 'activityUnitsCol', 'colSeparator', 'emptyValue')
file_extension = '.csv'
model

alias of CSVCompounds

read_only_fields = ('created', 'updated', 'activities', 'files')
class genui.compounds.extensions.csvimports.serializers.CSVSetUpdateSerializer(*args, **kwargs)[source]

Bases: FileSetUpdateSerializer

class Meta[source]

Bases: object

fields = ('id', 'name', 'description', 'created', 'updated', 'project', 'activities', 'files', 'updateData')
model

alias of CSVCompounds

read_only_fields = ('created', 'updated', 'activities', 'files')

genui.compounds.extensions.csvimports.tests module

class genui.compounds.extensions.csvimports.tests.CSVMolSetTestCase(methodName='runTest')[source]

Bases: ProjectMixIn, APITestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_csv_create()[source]

genui.compounds.extensions.csvimports.urls module

urls

Created by: Martin Sicho On: 7/15/20, 4:36 PM

genui.compounds.extensions.csvimports.views module

class genui.compounds.extensions.csvimports.views.CSVSetViewSet(**kwargs)[source]

Bases: BaseMolSetViewSet

basename = None
description = None
detail = None
get_initializer_additional_arguments(validated_data)[source]

This needs to return a JSON-parsable object.

Parameters

validated_data

Returns

get_serializer_class()[source]

Return the class to use for the serializer. Defaults to using self.serializer_class.

You may want to override this if you need to provide different serializations depending on the incoming request.

(Eg. admins get full serialization, others get basic serialization)

initializer_class

alias of CSVSetInitializer

name = None
parser_classes = (<class 'rest_framework.parsers.MultiPartParser'>, <class 'rest_framework.parsers.JSONParser'>)
queryset
serializer_class

alias of CSVSetSerializer

suffix = None

Module contents