tardis.tardis_portal.models package¶
Submodules¶
tardis.tardis_portal.models.access_control module¶
-
class
tardis.tardis_portal.models.access_control.
GroupAdmin
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
GroupAdmin links the Django User and Group tables for group administrators
Attribute user: a forign key to the django.contrib.auth.models.User
Attribute group: a forign key to the django.contrib.auth.models.Group
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
group
¶ 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 aForwardManyToOneDescriptor
instance.
-
group_id
¶ 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.
-
objects
= <django.db.models.manager.Manager object>¶
-
user
¶ 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 aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.access_control.
ObjectACL
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
The ObjectACL (formerly ExperimentACL) table is the core of the Tardis Authorisation framework
Attribute pluginId: the the name of the auth plugin being used Attribute entityId: a foreign key to auth plugins Attribute object_type: a foreign key to ContentType Attribute object_id: the primary key/id of the object_type Attribute canRead: gives the user read access Attribute canWrite: gives the user write access Attribute canDelete: gives the user delete permission Attribute isOwner: the experiment owner flag. Attribute effectiveDate: the date when access takes into effect Attribute expiryDate: the date when access ceases Attribute aclOwnershipType: system-owned or user-owned. System-owned ACLs will prevent users from removing or editing ACL entries to a particular experiment they own. User-owned ACLs will allow experiment owners to remove/add/edit ACL entries to the experiments they own.
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
OWNER_OWNED
= 1¶
-
SYSTEM_OWNED
= 2¶
-
aclOwnershipType
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
canDelete
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
canRead
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
canWrite
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
content_object
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
content_type
¶ 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 aForwardManyToOneDescriptor
instance.
-
content_type_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
effectiveDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
entityId
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
expiryDate
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_aclOwnershipType_display
(**morekwargs)¶
-
classmethod
get_effective_query
()¶
If possible, resolve the pluginId/entityId combination to a user or group object.
If possible, resolve the pluginId/entityId combination to a user or group object.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
isOwner
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
object_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>¶
-
openidaclmigration_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
pluginId
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.access_control.
UserAuthentication
(id, userProfile, username, authenticationMethod, approved)¶ Bases:
django.db.models.base.Model
-
CHOICES
= ()¶
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
approved
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
authenticationMethod
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
getAuthMethodDescription
()¶
-
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>¶
-
save
(*args, **kwargs)¶
-
userProfile
¶ 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 aForwardManyToOneDescriptor
instance.
-
userProfile_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
username
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
tardis.tardis_portal.models.access_control.
UserProfile
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
UserProfile class is an extension to the Django standard user model.
Attribute isDjangoAccount: is the user a local DB user Attribute user: a foreign key to the django.contrib.auth.models.User
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
ext_groups
¶
-
getUserAuthentications
()¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
isDjangoAccount
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
isValidPublicContact
()¶ Checks if there’s enough information on the user for it to be used as a public contact.
Note: Last name can’t be required, because people don’t necessarilly have a last (or family) name.
-
objects
= <django.db.models.manager.Manager object>¶
-
rapidConnectEduPersonTargetedID
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ 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 aForwardOneToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
userauthentication_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
tardis.tardis_portal.models.access_control.
create_user_api_key
(sender, **kwargs)¶ Auto-create ApiKey objects using Tastypie’s create_api_key
-
tardis.tardis_portal.models.access_control.
create_user_profile
(sender, instance, created, **kwargs)¶
tardis.tardis_portal.models.datafile module¶
-
class
tardis.tardis_portal.models.datafile.
DataFile
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
A
DataFile
is a record of a file which includes its filename, its size in bytes, its relative directory, and various other meta-data. EachDataFile
belongs to aDataset
which usually represents the files from one folder on an instrument PC.The physical copy (or copies) of a file are described by distinct
DataFileObject
records.Attribute dataset: The foreign key to the tardis.tardis_portal.models.Dataset
the file belongs to.Attribute filename: The name of the file, excluding the path. Attribute size: The size of the file. Attribute created_time: Should be populated with the file’s creation time from the instrument PC. Attribute modification_time: Should be populated with the file’s last modification time from the instrument PC. Attribute mimetype: For example ‘application/pdf’ Attribute md5sum: Digest of length 32, containing only hexadecimal digits Attribute sha512sum: Digest of length 128, containing only hexadecimal digits -
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
cache_file
()¶
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
datafileparameterset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
dataset
¶ 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 aForwardManyToOneDescriptor
instance.
-
dataset_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deleted
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deleted_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
directory
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
file_object
¶
-
file_objects
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
filename
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
getParameterSets
(schemaType=None)¶ Return datafile parametersets associated with this datafile.
-
get_absolute_filepath
()¶
-
get_as_temporary_file
(**kwds)¶ Returns a traditional file-system-based file object that is a copy of the original data. The file is deleted when the context is destroyed.
Parameters: directory (basestring) – the directory in which to create the temp file Returns: the temporary file object Return type: NamedTemporaryFile
-
get_default_storage_box
()¶ try to guess appropriate box from files, dataset or experiment
-
get_download_url
()¶
-
get_file
(verified_only=True)¶ Returns the file as a readable file-like object from the best avaiable storage box.
If verified_only=False, the return of files without a verified checksum is allowed, otherwise None is returned for unverified files.
Parameters: verified_only (bool) – if False return files without verified checksums Returns: Python file object Return type: Python File object
-
get_image_data
()¶
-
get_mimetype
()¶
-
get_preferred_dfo
(verified_only=True)¶
-
get_receiving_storage_box
()¶
-
get_size
()¶
-
get_view_url
()¶
-
has_image
()¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_image
()¶ returns True if it’s an image and not an x-icon and not an img the image/img mimetype is made up though and may need revisiting if there is an official img mimetype that does not refer to diffraction images
-
is_local
()¶
-
is_online
¶ return False if a file is on tape. At this stage it checks it returns true for no file objects, because those files are offline through other checks
-
is_public
()¶
-
md5sum
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
mimetype
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
modification_time
¶ 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>¶
-
save
(*args, **kwargs)¶
-
sha512sum
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
size
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
status
¶ returns information about the status of the file. States are defined in StorageBox
-
classmethod
sum_sizes
(datafiles)¶ Takes a query set of datafiles and returns their total size.
-
update_mimetype
(mimetype=None, force=False, save=True)¶
-
verified
¶
-
verify
(reverify=False)¶
-
version
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.datafile.
DataFileObject
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
The physical copy (or copies) of a
DataFile
are described by distinctDataFileObject
records.Attribute datafile: The DataFile
record which thisDataFileObject
is storing a copy of.Attribute storage_box: The StorageBox
containing this copy of the file. TheStorageBox
could represent a directory on a mounted filesystem, or a bucket in an Object Store.Attribute uri: The relative path of the file location within the the StorageBox
, e.g.dataset1-12345/file1.txt
for a copy of aDataFile
with filenamefile1.txt
which belongs to aDataset
with a description ofdataset1
and an ID of12345
.-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
cache_file
()¶
-
copy_file
(dest_box=None, verify=True)¶ copies verified file to new storage box checks for existing copy triggers async verification if not disabled :param StorageBox dest_box: StorageBox instance :param bool verify: :returns: DataFileObject of copy :rtype: DataFileObject
-
create_set_uri
(force=False, save=False)¶ sets the uri as well as building it :param bool force: :param book save: :return: :rtype: basestring
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
datafile
¶ 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 aForwardManyToOneDescriptor
instance.
-
datafile_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
delete_data
()¶
-
file_object
¶ A set of accessor functions that convert the file information to a standard Python file object for reading and copy the contents of an existing file_object into the storage backend.
Returns: a file object Return type: Python File object
-
get_full_path
()¶
-
get_next_by_created_time
(**morekwargs)¶
-
get_previous_by_created_time
(**morekwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
last_verified_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
modified_time
¶
-
move_file
(dest_box=None)¶ moves a file copies first, then synchronously verifies deletes file if copy is true copy and has been verified
Parameters: dest_box (StorageBox) – StorageBox instance Returns: moved file dfo Return type: DataFileObject
-
objects
= <django.db.models.manager.Manager object>¶
-
priority
¶ Default priority for tasks which take this DFO as an argument
-
save
(*args, **kwargs)¶
-
storage_box
¶ 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 aForwardManyToOneDescriptor
instance.
-
storage_box_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
storage_type
¶ Returns: storage_box type Return type: StorageBox type constant
-
uri
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
verified
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
verify
(add_checksums=True, add_size=True)¶
-
exception
-
tardis.tardis_portal.models.datafile.
compute_checksums
(file_object, compute_md5=True, compute_sha512=True, close_file=True)¶ Computes checksums for a python file object
Parameters: Returns: the checksums as {‘md5sum’: result, ‘sha512sum’: result}
Return type:
-
tardis.tardis_portal.models.datafile.
delete_dfo
(sender, instance, **kwargs)¶ Deletes the actual file / object, before deleting the database record
tardis.tardis_portal.models.dataset module¶
-
class
tardis.tardis_portal.models.dataset.
Dataset
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
A dataset represents a collection files usually associated with a folder on an instrument PC. Each file within the dataset is represented by a
tardis.tardis_portal.models.DataFile
record. A dataset can appear in one or moreExperiment
records. Access controls are configured at theExperiment
level by creatingObjectACL
records. Each dataset can be associated with anInstrument
record, but it is possible to create a dataset without specifying an instrument.Attribute experiment: A foreign key to the one ore more Experiment
records which contain this datasetAttribute instrument: The foreign key to the instrument that generated this data Attribute description: Description of this dataset, which usually corresponds to the folder name on the instrument PC Attribute immutable: Whether this dataset is read-only -
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
datafile_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
datasetparameterset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
directory
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
equipment_set
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
experiments
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
getParameterSets
(schemaType=None)¶ Return the dataset parametersets associated with this experiment.
-
get_absolute_url
(**kwargs)¶ Return the absolute url to the current
Dataset
-
get_all_storage_boxes_used
()¶
-
get_datafiles
()¶
-
get_download_urls
()¶
-
get_edit_url
(**kwargs)¶ Return the absolute url to the edit view of the current
Dataset
-
get_first_experiment
()¶
-
get_images
()¶
-
get_path
()¶
-
get_size
()¶
-
get_thumbnail_url
()¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
image
¶
-
immutable
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instrument
¶ 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 aForwardManyToOneDescriptor
instance.
-
instrument_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_online
¶
-
modified_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <tardis.tardis_portal.managers.OracleSafeManager object>¶
-
save
(force_insert=False, force_update=False, using=None, update_fields=None)¶
-
exception
tardis.tardis_portal.models.experiment module¶
-
class
tardis.tardis_portal.models.experiment.
Experiment
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
An
Experiment
is a collection ofDataset
records. ADataset
record can appear in multipleExperiment
records. Access controls are configured at theExperiment
level by creatingObjectACL
records.Attribute url: An optional URL associated with the data collection Attribute approved: An optional field indicating whether the collection is approved Attribute title: The title of the experiment. Attribute description: The description of the experiment. Attribute institution_name: The name of the institution who created the experiment. Attribute start_time: Undocumented Attribute end_time: Undocumented Attribute created_time: Undocumented Attribute handle: Undocumented Attribute public: Whether the experiment is publicly accessible Attribute objects: Default model manager Attribute safe: ACL aware model manager -
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
PUBLICATION_DETAILS_SCHEMA
= 'http://www.tardis.edu.au/schemas/publication/details/'¶
-
PUBLICATION_DRAFT_SCHEMA
= 'http://www.tardis.edu.au/schemas/publication/draft/'¶
-
PUBLICATION_SCHEMA_ROOT
= 'http://www.tardis.edu.au/schemas/publication/'¶
-
PUBLIC_ACCESS_CHOICES
= ((1, 'No public access (hidden)'), (25, 'Ready to be released pending embargo expiry'), (50, 'Public Metadata only (no data file access)'), (100, 'Public'))¶
-
PUBLIC_ACCESS_EMBARGO
= 25¶
-
PUBLIC_ACCESS_FULL
= 100¶
-
PUBLIC_ACCESS_METADATA
= 50¶
-
PUBLIC_ACCESS_NONE
= 1¶
-
approved
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_by
¶ 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 aForwardManyToOneDescriptor
instance.
-
created_by_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
datasets
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
end_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
experimentparameterset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
getParameterSets
(schemaType=None)¶ Return the experiment parametersets associated with this experiment.
-
get_absolute_url
(**kwargs)¶ Return the absolute url to the current
Experiment
-
get_create_token_url
(**kwargs)¶ Return the absolute url to the create token view of the current
Experiment
-
get_ct
()¶
-
get_datafiles
()¶
-
get_download_urls
()¶
-
get_edit_url
(**kwargs)¶ Return the absolute url to the edit view of the current
Experiment
-
get_groups
()¶
-
get_images
()¶
-
get_next_by_created_time
(**morekwargs)¶
-
get_next_by_update_time
(**morekwargs)¶
-
get_or_create_directory
()¶
-
get_owners
()¶
-
get_previous_by_created_time
(**morekwargs)¶
-
get_previous_by_update_time
(**morekwargs)¶
-
get_public_access_display
(**morekwargs)¶
-
get_size
()¶
-
handle
¶ 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.
-
institution_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_publication
()¶
-
is_publication_draft
()¶
-
license
¶ 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 aForwardManyToOneDescriptor
instance.
-
license_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
locked
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objectacls
¶ 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.
-
objects
= <tardis.tardis_portal.managers.OracleSafeManager object>¶
-
public_access
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
classmethod
public_access_implies_distribution
(public_access_level)¶ Determines if a level of public access implies that distribution should be allowed, or alternately if it should not be allowed. Used to prevent free-distribution licences for essentially private data, and overly-restrictive licences for public data.
-
public_download_allowed
()¶ instance method version of ‘public_access_implies_distribution’
-
safe
= <tardis.tardis_portal.managers.ExperimentManager object>¶
-
save
(*args, **kwargs)¶
-
start_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
token_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
update_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
url
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.experiment.
ExperimentAuthor
(id, experiment, author, institution, email, order, url)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
email
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
experiment
¶ 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 aForwardManyToOneDescriptor
instance.
-
experiment_id
¶ 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.
-
institution
¶ 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>¶
-
order
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
save
(*args, **kwargs)¶
-
url
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
tardis.tardis_portal.models.facility module¶
-
class
tardis.tardis_portal.models.facility.
Facility
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Represents a facility that produces data.
Each
Instrument
record must belong to exactly one facility. ManyInstrument
records can be associated with the same facility.Attribute name: The name of the facility, e.g. “Test Facility” Attribute manager_group: The group of users who can access the Facility Overview for this facility. -
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
created_time
¶ 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.
-
instrument_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
manager_group
¶ 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 aForwardManyToOneDescriptor
instance.
-
manager_group_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
modified_time
¶ 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
= <django.db.models.manager.Manager object>¶
-
save
()¶
-
exception
-
tardis.tardis_portal.models.facility.
facilities_managed_by
(user)¶ Returns a list of facilities managed by a user
-
tardis.tardis_portal.models.facility.
is_facility_manager
(user)¶ Returns true if the user manages one or more facilities
tardis.tardis_portal.models.hooks module¶
-
tardis.tardis_portal.models.hooks.
post_save_experiment
(sender, **kwargs)¶
-
tardis.tardis_portal.models.hooks.
post_save_experiment_parameter
(sender, **kwargs)¶
-
tardis.tardis_portal.models.hooks.
publish_public_expt_rifcs
(experiment)¶
tardis.tardis_portal.models.instrument module¶
-
class
tardis.tardis_portal.models.instrument.
Instrument
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Represents an instrument belonging to a facility that produces data
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
dataset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
facility
¶ 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 aForwardManyToOneDescriptor
instance.
-
facility_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
getParameterSets
(schemaType=None)¶ Return the instrument parametersets associated with this instrument.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instrumentparameterset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
modified_time
¶ 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
= <django.db.models.manager.Manager object>¶
-
save
()¶
-
exception
tardis.tardis_portal.models.jti module¶
-
class
tardis.tardis_portal.models.jti.
JTI
(id, jti, created_time)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
created_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created_time
(**morekwargs)¶
-
get_previous_by_created_time
(**morekwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
jti
¶ 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>¶
-
exception
tardis.tardis_portal.models.license module¶
-
class
tardis.tardis_portal.models.license.
License
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Represents a licence for experiment content.
Instances should provide enough detail for both researchers to select the licence, and for the users of their data to divine correct usage of experiment content.
(Non-US developers: We’re using US spelling in the code.)
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
allows_distribution
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
experiment_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
classmethod
get_none_option_license
()¶
-
classmethod
get_suitable_licenses
(public_access_method=None)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
image_url
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
internal_description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_active
¶ 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
= <django.db.models.manager.Manager object>¶
-
url
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
tardis.tardis_portal.models.parameters module¶
-
class
tardis.tardis_portal.models.parameters.
DatafileParameter
(id, name, string_value, numerical_value, datetime_value, link_id, link_ct, parameterset)¶ Bases:
tardis.tardis_portal.models.parameters.Parameter
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
link_ct
¶ 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 aForwardManyToOneDescriptor
instance.
-
link_gfk
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
name
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameter_type
= 'Datafile'¶
-
parameterset
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameterset_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.parameters.
DatafileParameterSet
(id, schema, datafile)¶ Bases:
tardis.tardis_portal.models.parameters.ParameterSet
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
datafile
¶ 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 aForwardManyToOneDescriptor
instance.
-
datafile_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
datafileparameter_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 aReverseManyToOneDescriptor
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>¶
-
parameter_class
¶ alias of
DatafileParameter
-
schema
¶ 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 aForwardManyToOneDescriptor
instance.
-
storage_box
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
tardis.tardis_portal.models.parameters.
DatasetParameter
(id, name, string_value, numerical_value, datetime_value, link_id, link_ct, parameterset)¶ Bases:
tardis.tardis_portal.models.parameters.Parameter
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
link_ct
¶ 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 aForwardManyToOneDescriptor
instance.
-
link_gfk
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
name
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameter_type
= 'Dataset'¶
-
parameterset
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameterset_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.parameters.
DatasetParameterSet
(id, schema, dataset)¶ Bases:
tardis.tardis_portal.models.parameters.ParameterSet
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
dataset
¶ 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 aForwardManyToOneDescriptor
instance.
-
dataset_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
datasetparameter_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 aReverseManyToOneDescriptor
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>¶
-
parameter_class
¶ alias of
DatasetParameter
-
schema
¶ 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 aForwardManyToOneDescriptor
instance.
-
storage_box
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
tardis.tardis_portal.models.parameters.
ExperimentParameter
(id, name, string_value, numerical_value, datetime_value, link_id, link_ct, parameterset)¶ Bases:
tardis.tardis_portal.models.parameters.Parameter
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
link_ct
¶ 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 aForwardManyToOneDescriptor
instance.
-
link_gfk
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
name
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameter_type
= 'Experiment'¶
-
parameterset
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameterset_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
save
(*args, **kwargs)¶
-
exception
-
class
tardis.tardis_portal.models.parameters.
ExperimentParameterSet
(id, schema, experiment)¶ Bases:
tardis.tardis_portal.models.parameters.ParameterSet
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
experiment
¶ 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 aForwardManyToOneDescriptor
instance.
-
experiment_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
experimentparameter_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 aReverseManyToOneDescriptor
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>¶
-
parameter_class
¶ alias of
ExperimentParameter
-
schema
¶ 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 aForwardManyToOneDescriptor
instance.
-
storage_box
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
tardis.tardis_portal.models.parameters.
FreeTextSearchField
(id, parameter_name)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
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>¶
-
parameter_name
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameter_name_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.parameters.
InstrumentParameter
(id, name, string_value, numerical_value, datetime_value, link_id, link_ct, parameterset)¶ Bases:
tardis.tardis_portal.models.parameters.Parameter
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
link_ct
¶ 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 aForwardManyToOneDescriptor
instance.
-
link_gfk
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
name
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameter_type
= 'Instrument'¶
-
parameterset
¶ 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 aForwardManyToOneDescriptor
instance.
-
parameterset_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.parameters.
InstrumentParameterSet
(id, schema, instrument)¶ Bases:
tardis.tardis_portal.models.parameters.ParameterSet
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instrument
¶ 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 aForwardManyToOneDescriptor
instance.
-
instrument_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instrumentparameter_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 aReverseManyToOneDescriptor
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>¶
-
parameter_class
¶ alias of
InstrumentParameter
-
schema
¶ 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 aForwardManyToOneDescriptor
instance.
-
storage_box
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
tardis.tardis_portal.models.parameters.
Parameter
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
-
datetime_value
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get
()¶
-
link_ct
¶ 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 aForwardManyToOneDescriptor
instance.
-
link_ct_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
link_gfk
¶ Provide a generic many-to-one relation through the
content_type
andobject_id
fields.This class also doubles as an accessor to the related object (similar to ForwardManyToOneDescriptor) by adding itself as a model attribute.
-
link_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
link_url
¶
-
name
¶ 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 aForwardManyToOneDescriptor
instance.
-
name_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
numerical_value
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
¶
-
parameter_type
= 'Abstract'¶
-
set_value
(value)¶ Sets the parameter value, converting into the appropriate data type. Deals with date/time strings that are timezone naive or aware, based on the USE_TZ setting.
Parameters: value (basestring) – a string (or string-like) repr of the value Raises: SuspiciousOperation –
-
string_value
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
tardis.tardis_portal.models.parameters.
ParameterName
(id, schema, name, full_name, units, data_type, immutable, comparison_type, is_searchable, choices, order)¶ Bases:
django.db.models.base.Model
-
CONTAINS_COMPARISON
= 8¶
-
DATETIME
= 6¶
-
exception
DoesNotExist
¶
-
EXACT_VALUE_COMPARISON
= 1¶
-
FILENAME
= 5¶
-
GREATER_THAN_COMPARISON
= 4¶
-
GREATER_THAN_EQUAL_COMPARISON
= 5¶
-
JSON
= 8¶
-
LESS_THAN_COMPARISON
= 6¶
-
LESS_THAN_EQUAL_COMPARISON
= 7¶
-
LINK
= 4¶
-
LONGSTRING
= 7¶
-
exception
MultipleObjectsReturned
¶
-
NOT_EQUAL_COMPARISON
= 2¶
-
NUMERIC
= 1¶
-
RANGE_COMPARISON
= 3¶
-
STRING
= 2¶
-
URL
= 3¶
-
choices
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
comparison_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
data_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
datafileparameter_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
datasetparameter_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
experimentparameter_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
freetextsearchfield_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
full_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
getUniqueShortName
()¶
-
get_comparison_type_display
(**morekwargs)¶
-
get_data_type_display
(**morekwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
immutable
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instrumentparameter_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
isDateTime
()¶
-
isFilename
()¶
-
isLink
()¶
-
isLongString
()¶
-
isNumeric
()¶
-
isString
()¶
-
isURL
()¶
-
is_json
()¶
-
is_searchable
¶ 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.
-
natural_key
()¶
-
objects
= <tardis.tardis_portal.managers.ParameterNameManager object>¶
-
order
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
schema
¶ 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 aForwardManyToOneDescriptor
instance.
-
schema_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
units
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
tardis.tardis_portal.models.parameters.
ParameterSet
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
,tardis.tardis_portal.models.parameters.ParameterSetManagerMixin
-
parameter_class
= None¶
-
save
(*args, **kwargs)¶
-
schema
¶ 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 aForwardManyToOneDescriptor
instance.
-
schema_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
storage_box
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
-
class
tardis.tardis_portal.models.parameters.
ParameterSetManagerMixin
(parameterset=None, parentObject=None, schema=None)¶ Bases:
tardis.tardis_portal.ParameterSetManager.ParameterSetManager
for clarity’s sake and for future extension this class makes ParameterSetManager local to this file. At the moment its only function is increasing the line count
-
class
tardis.tardis_portal.models.parameters.
Schema
(id, namespace, name, type, subtype, immutable, hidden)¶ Bases:
django.db.models.base.Model
-
DATAFILE
= 3¶
-
DATASET
= 2¶
-
exception
DoesNotExist
¶
-
EXPERIMENT
= 1¶
-
INSTRUMENT
= 5¶
-
exception
MultipleObjectsReturned
¶
-
NONE
= 4¶
-
exception
UnsupportedType
(msg)¶ Bases:
exceptions.Exception
-
datafileparameterset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
datasetparameterset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
experimentparameterset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
classmethod
getNamespaces
(type_, subtype=None)¶ Return the list of namespaces for equipment, sample, and experiment schemas.
-
classmethod
getSubTypes
()¶
-
classmethod
get_schema_type_name
(schema_type, short=False)¶
-
get_type_display
(**morekwargs)¶
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.
-
immutable
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instrumentparameterset_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
namespace
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
natural_key
()¶
-
objects
= <tardis.tardis_portal.managers.SchemaManager object>¶
-
parametername_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
subtype
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
tardis.tardis_portal.models.storage module¶
-
class
tardis.tardis_portal.models.storage.
StorageBox
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
table that holds storage boxes of any type. to extend to new types, add fields if necessary
Attribute max_size: max size in bytes -
BUNDLE
= 6¶
-
CACHE
= 3¶
-
DISK
= 1¶
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
TAPE
= 2¶
-
TEMPORARY
= 4¶
-
TYPES
= {'bundle': 6, 'cache': 3, 'disk': 1, 'receiving': 4, 'tape': 2}¶
-
TYPE_UNKNOWN
= 5¶
-
attributes
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
autocache
¶ Whether to automatically copy data into faster storage
Returns: True if data should be automatically cached Return type: bool
-
cache_box
¶ Get cache box if set up
-
child_boxes
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
copy_files
(dest_box=None)¶
-
copy_to_master
()¶
-
classmethod
create_local_box
(location=None)¶
-
datafileparametersets
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
datasetparametersets
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
django_storage_class
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
experimentparametersets
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
file_objects
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
classmethod
get_default_storage
(location=None, user=None)¶ gets default storage box or get local storage box with given base location or create one if it doesn’t exist.
policies: Have a StorageBoxAttribute: key=’default’, value=True find a storage box where location is DEFAULT_STORAGE_BASE_DIR create a default storage box at DEFAULT_STORAGE_BASE_DIR lowest id storage box is default no storage box defined, use hard coded default for now TODO: consider removing this
Would be nice: get largest free space one, test for authorisation
-
get_initialised_storage_instance
()¶
-
get_options_as_dict
()¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
instrumentparametersets
¶ Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
pizza.toppings
andtopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
master_box
¶ 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 aForwardManyToOneDescriptor
instance.
-
master_box_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
max_size
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
move_files
(dest_box=None)¶
-
move_to_master
()¶
-
name
¶ 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>¶
-
offline_types
= [2]¶
-
online_types
= [3, 1, 4, 6]¶
-
options
¶ 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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
priority
¶ Default priority for tasks which take this box as an argument
-
status
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
storage_type
¶
-
type_order
= [3, 6, 1, 2, 4, 5]¶
-
-
class
tardis.tardis_portal.models.storage.
StorageBoxAttribute
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Can hold attributes/metadata about different storage locations.
Attribute key: The key used to look up the attribute (e.g. “type”). Attribute value: The value of the attribute e.g. “cache”. The “type” key has three values support by the core MyTardis code: “permanent”, “receiving” and “cache”.
Adding an attribute with key “type” and value “permanent” preserves the default behaviour of a storage box, i.e. it is equivalent to not adding the attribute.
Adding an attribute with key “type” and value “receiving” means that the storage box will be treated as a staging area which receives files intended to be transfered to a permanent storage box. If a storage box has the “type: receiving” attribute, it must link to a permanent storage box (via its master_box foreign key).
Adding an attribute with key “type” and value “cache” means that the storage box will be used to copy data from slow-access storage to fast-access storage. If a storage box has the “type: cache” attribute, it must link to a permanent storage box (via its master_box foreign key).
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
key
¶ 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>¶
-
storage_box
¶ 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 aForwardManyToOneDescriptor
instance.
-
storage_box_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
value
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
tardis.tardis_portal.models.storage.
StorageBoxOption
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
holds the options passed to the storage class defined in StorageBox. key->value store with support for typed values through pickling when value_type is set to ‘pickle’
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
PICKLE
= 'pickle'¶
-
STRING
= 'string'¶
-
TYPE_CHOICES
= (('string', 'String value'), ('pickle', 'Pickled value'))¶
-
get_value_type_display
(**morekwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
key
¶ 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>¶
-
storage_box
¶ 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 aForwardManyToOneDescriptor
instance.
-
storage_box_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
unpickled_value
¶
-
value
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
value_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
tardis.tardis_portal.models.token module¶
-
class
tardis.tardis_portal.models.token.
Token
(id, token, experiment, expiry_date, user)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
experiment
¶ 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 aForwardManyToOneDescriptor
instance.
-
experiment_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
expiry_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_expiry_date
(**morekwargs)¶
-
get_previous_by_expiry_date
(**morekwargs)¶
-
get_session_expiry
()¶ A token login should expire at the earlier of a) tomorrow at 4am b) the (end of) the token’s expiry date
It is the responsibility of token_auth to set the session expiry
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_expired
()¶
-
objects
= <tardis.tardis_portal.managers.OracleSafeManager object>¶
-
save_with_random_token
()¶
-
token
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
user
¶ 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 aForwardManyToOneDescriptor
instance.
-
user_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
Module contents¶
models/__init__.py