genui.generators package

Subpackages

Submodules

genui.generators.admin module

class genui.generators.admin.DrugExAgentAdmin(model, admin_site)[source]

Bases: ModelAdmin

property media
class genui.generators.admin.DrugExNetAdmin(model, admin_site)[source]

Bases: ModelAdmin

property media
class genui.generators.admin.GeneratorAdmin(model, admin_site)[source]

Bases: ModelAdmin

property media

genui.generators.apps module

class genui.generators.apps.GeneratorsConfig(app_name, app_module)[source]

Bases: AppConfig

name = 'genui.generators'
ready(force_inspect=False)[source]

Override this method in subclasses to run code when Django starts.

genui.generators.genuisetup module

genuisetup

Created by: Martin Sicho On: 4/28/20, 4:50 PM

genui.generators.genuisetup.setup(*args, **kwargs)[source]

genui.generators.models module

class genui.generators.models.Generator(id, polymorphic_ctype, name, description, created, updated, project)[source]

Bases: TaskShortcutsMixIn, TaskMixin, DataSet

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

compounds

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

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

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

created

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

description

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

drugex

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

In the example:

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

Place.restaurant is a ReverseOneToOneDescriptor instance.

get(n_samples) [<class 'str'>][source]

All generators should override this. This should return a list of SMILES strings of size N.

Returns

list of SMILES strings

get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
id

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

name

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

objects = <genui.utils.extensions.tasks.models.PolymorphicTaskManager object>
polymorphic_ctype

The model field that stores the ContentType reference to the actual class.

polymorphic_ctype_id
polymorphic_primary_key_name = 'id'
polymorphic_super_sub_accessors_replaced = False
project

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.

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

updated

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

genui.generators.serializers module

serializers

Created by: Martin Sicho On: 27-01-20, 17:00

class genui.generators.serializers.GeneratorSerializer(*args, **kwargs)[source]

Bases: GenericModelSerializerMixIn, HyperlinkedModelSerializer

class Meta[source]

Bases: object

fields = ('id', 'name', 'description', 'project', 'compounds', 'className', 'extraArgs')
model

alias of Generator

genui.generators.signals module

signals

Created by: Martin Sicho On: 29-01-20, 13:12

genui.generators.urls module

urls

Created by: Martin Sicho On: 02-12-19, 17:18

genui.generators.views module

class genui.generators.views.GeneratorAlgorithmViewSet(**kwargs)[source]

Bases: AlgorithmViewSet

basename = None
description = None
detail = None
get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

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

(Eg. return a list of items that is specific to the user)

name = None
suffix = None
class genui.generators.views.GeneratorMetricsViewSet(**kwargs)[source]

Bases: MetricsViewSet

basename = None
description = None
detail = None
get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

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

(Eg. return a list of items that is specific to the user)

name = None
suffix = None
class genui.generators.views.GeneratorViewSet(**kwargs)[source]

Bases: FilterToProjectMixIn, FilterToUserMixIn, ListModelMixin, DestroyModelMixin, GenericViewSet

basename = None
description = None
detail = None
list(request, *args, **kwargs)[source]
name = None
owner_relation = 'project__owner'
project_id_param = {'description': 'Return generators related to just the project with this ID.', 'in': 'query', 'name': 'project_id', 'type': 'number'}
queryset
serializer_class

alias of GeneratorSerializer

suffix = None

Module contents