Skip to main content

chama_django package

Subpackages

Submodules

chama_django.admin module

chama_django.asgi module

ASGI config for chama_django project.

It exposes the ASGI callable as a module-level variable named application.

For more information on this file, see https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/

chama_django.constants module

Constant declarations for the chama_django-django application.

chama_django.models module

Definition of models.

class chama_django.models.ChamaResultsSummary(id, solved, objective, sensors, fraction_detected, total_sensor_cost, assessment, raw_json, runtime_seconds)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

assessment

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

fraction_detected

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

id

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.

id_id

objective

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

objects = django.db.models.manager.Manager object

raw_json

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

runtime_seconds

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

sensors

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

solved

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

total_sensor_cost

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

class chama_django.models.ChamaRun(id, input_signal_id, output_dir, chama_scenarios_csv, potential_sensors_csv, time_step, start_step, end_step, detector_threshold, sensor_budget, status, computer_description, opt_approach, chama_formulation)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chama_formulation

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

chama_scenarios_csv

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

chamaresultssummary

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.

computer_description

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

detectiontime_set

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.

detectiontimestats_set

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.

detector_threshold

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

end_step

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

get_chama_formulation_display(*, field=django.db.models.fields.TextField: chama_formulation)

get_opt_approach_display(*, field=django.db.models.fields.TextField: opt_approach)

get_status_display(*, field=django.db.models.fields.TextField: status)

id

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

input_signal_id

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.

input_signal_id_id

mindettime_set

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.

objects = django.db.models.manager.Manager object

opt_approach

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

output_dir

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

potential_sensors_csv

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

sensor_budget

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

start_step

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

status

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

time_step

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

class chama_django.models.DetectionTime(id, chama_run, index, scenario, sensor, detection_times)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chama_run

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.

chama_run_id

detection_times

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

id

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

index

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

objects = django.db.models.manager.Manager object

scenario

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

sensor

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

class chama_django.models.DetectionTimeStats(id, chama_run, index, scenario, sensor, min, mean, median, max, count)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chama_run

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.

chama_run_id

count

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

id

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

index

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

max

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

mean

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

median

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

min

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

objects = django.db.models.manager.Manager object

scenario

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

sensor

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

class chama_django.models.InputSignals(id, signal_csv_path, signal_ids)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chamarun_set

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.

id

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

objects = django.db.models.manager.Manager object

signal_csv_path

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

signal_ids

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

class chama_django.models.MediaFileSystemStorage(*args, **kwargs)

Bases: FileSystemStorage

[summary]

  • Parameters:FileSystemStorage ([type]) – [description]

get_available_name(name, max_length=None)

Return a filename that’s free on the target storage system and available for new content to be written to.

class chama_django.models.MinDetTime(id, chama_run, index, scenario, sensor, min)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

chama_run

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.

chama_run_id

id

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

index

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

min

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

objects = django.db.models.manager.Manager object

scenario

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

sensor

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

class chama_django.models.Signal(id, signal_csv_path, inp_file_path, reporting_ts, sim_ts_window, pot_sens_loc_csv_path, pollutant)

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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

inp_file_path

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

objects = django.db.models.manager.Manager object

pollutant

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

pot_sens_loc_csv_path

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

reporting_ts

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

signal_csv_path

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

sim_ts_window

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

chama_django.production module

chama_django.settings module

Django settings for chama_django project.

Generated by ‘django-admin startproject’ using Django 4.1.3.

For more information on this file, see https://docs.djangoproject.com/en/4.1/topics/settings/

For the full list of settings and their values, see https://docs.djangoproject.com/en/4.1/ref/settings/

chama_django.urls module

chama_django URL Configuration

The urlpatterns list routes URLs to views. For more information please see: : https://docs.djangoproject.com/en/4.1/topics/http/urls/

Examples

Function views: : 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path(‘’, views.home, name=’home’)

Class-based views: : 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path(‘’, Home.as_view(), name=’home’)

Including another URLconf: : 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path(‘blog/’, include(‘blog.urls’))

chama_django.utils module

Definition of utility methods.

chama_django.utils.get_upload_storage_path(instance, filename)

[summary] : Build the attachment storage path using date and filename.

  • Parameters:
    • instance ([type]) – [description]
    • filename ([type]) – [description]
  • Returns:[description]
  • Return type:[type]

chama_django.wsgi module

WSGI config for chama_django project.

It exposes the WSGI callable as a module-level variable named application.

For more information on this file, see https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/

Module contents