genui.compounds.extensions.generated package

Subpackages

Submodules

genui.compounds.extensions.generated.admin module

class genui.compounds.extensions.generated.admin.ChEMBLCompoundsAdmin(model, admin_site)[source]

Bases: MolSetAdmin

property media

genui.compounds.extensions.generated.apps module

class genui.compounds.extensions.generated.apps.GeneratedConfig(app_name, app_module)[source]

Bases: AppConfig

name = 'genui.compounds.extensions.generated'

genui.compounds.extensions.generated.genuisetup module

genuisetup

Created by: Martin Sicho On: 5/12/20, 9:37 AM

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

genui.compounds.extensions.generated.initializers module

generated

Created by: Martin Sicho On: 07-02-20, 14:55

class genui.compounds.extensions.generated.initializers.GeneratedSetInitializer(instance: GeneratedMolSet, progress=None, n_samples=100)[source]

Bases: MolSetInitializer

populateInstance()[source]
updateInstance()[source]

genui.compounds.extensions.generated.models module

class genui.compounds.extensions.generated.models.GeneratedMolSet(id, polymorphic_ctype, name, description, created, updated, project, molset_ptr, source)[source]

Bases: MolSet

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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
polymorphic_primary_key_name = 'id'
polymorphic_super_sub_accessors_replaced = False
source

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

source_id
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.

genui.compounds.extensions.generated.serializers module

serializers

Created by: Martin Sicho On: 5/12/20, 9:42 AM

class genui.compounds.extensions.generated.serializers.GeneratedSetInitSerializer(*args, **kwargs)[source]

Bases: GeneratedSetSerializer

class Meta[source]

Bases: object

fields = ['id', 'name', 'description', 'created', 'updated', 'project', 'activities', 'className', 'extraArgs', 'source', 'nSamples', 'taskID']
model

alias of GeneratedMolSet

read_only_fields = ['created', 'updated', 'extraArgs', 'activities', 'taskID']
create(validated_data)[source]

We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:

return ExampleModel.objects.create(**validated_data)

If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:

example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance

The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.

class genui.compounds.extensions.generated.serializers.GeneratedSetSerializer(*args, **kwargs)[source]

Bases: GenericMolSetSerializer

class Meta[source]

Bases: object

fields = ['id', 'name', 'description', 'created', 'updated', 'project', 'activities', 'className', 'extraArgs', 'source']
model

alias of GeneratedMolSet

read_only_fields = ['created', 'updated', 'extraArgs', 'activities']
class genui.compounds.extensions.generated.serializers.GeneratedSetUpdateSerializer(*args, **kwargs)[source]

Bases: MolSetUpdateSerializer

class Meta[source]

Bases: object

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

alias of GeneratedMolSet

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

genui.compounds.extensions.generated.tests module

genui.compounds.extensions.generated.urls module

urls

Created by: Martin Sicho On: 5/12/20, 9:52 AM

genui.compounds.extensions.generated.views module

class genui.compounds.extensions.generated.views.GeneratedSetViewSet(**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)

gpu_support = True
initializer_class

alias of GeneratedSetInitializer

name = None
queryset
serializer_class

alias of GeneratedSetSerializer

suffix = None

Module contents