tardis.tardis_portal.models package
Submodules
tardis.tardis_portal.models.access_control module
- class tardis.tardis_portal.models.access_control.GroupAdmin(*args, **kwargs)
Bases:
ModelGroupAdmin 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.parentis aForwardManyToOneDescriptorinstance.
- group_id
- 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.parentis aForwardManyToOneDescriptorinstance.
- user_id
- class tardis.tardis_portal.models.access_control.ObjectACL(*args, **kwargs)
Bases:
ModelThe 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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_typeandobject_idfields.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.parentis aForwardManyToOneDescriptorinstance.
- content_type_id
- 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(*, field=<django.db.models.fields.IntegerField: aclOwnershipType>)
- 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.childrenis aReverseManyToOneDescriptorinstance.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.
- class tardis.tardis_portal.models.access_control.UserAuthentication(id, userProfile, username, authenticationMethod, approved)
Bases:
Model- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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()
- get_authenticationMethod_display(*, field=<django.db.models.fields.CharField: authenticationMethod>)
- 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)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- 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.parentis aForwardManyToOneDescriptorinstance.
- userProfile_id
- 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:
ModelUserProfile 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- property 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.placeis aForwardOneToOneDescriptorinstance.
- user_id
- 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- 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.access_control.get_auth_method_choices()
tardis.tardis_portal.models.datafile module
- class tardis.tardis_portal.models.datafile.DataFile(*args, **kwargs)
Bases:
ModelA
DataFileis a record of a file which includes its filename, its size in bytes, its relative directory, and various other meta-data. EachDataFilebelongs to aDatasetwhich usually represents the files from one folder on an instrument PC.The physical copy (or copies) of a file are described by distinct
DataFileObjectrecords.- Attribute dataset:
The foreign key to the
tardis.tardis_portal.models.Datasetthe 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- dataset_id
- 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.
- download_url
- property 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.childrenis aReverseManyToOneDescriptorinstance.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()
Return datafile parametersets associated with this datafile.
- get_absolute_filepath()
- get_as_temporary_file(directory=None)
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 dataset or use global default
- 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()
- 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>
- progress_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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- recall_url
Get a URL to request a recall from tape
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- 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.
- property 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)
- property verified
Return True if at least one DataFileObject is 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.
- view_url
- class tardis.tardis_portal.models.datafile.DataFileObject(*args, **kwargs)
Bases:
ModelThe physical copy (or copies) of a
DataFileare described by distinctDataFileObjectrecords.- Attribute datafile:
The
DataFilerecord which thisDataFileObjectis storing a copy of.- Attribute storage_box:
The
StorageBoxcontaining this copy of the file. TheStorageBoxcould 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.txtfor a copy of aDataFilewith filenamefile1.txtwhich belongs to aDatasetwith a description ofdataset1and an ID of12345.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- apply_filters()
- cache_file()
- calculate_checksums(compute_md5=True, compute_sha512=False)
Calculates checksums for a DataFileObject instance
- 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.parentis aForwardManyToOneDescriptorinstance.
- datafile_id
- delete_data()
- property 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(*, field=<django.db.models.fields.DateTimeField: created_time>, is_next=True, **kwargs)
- get_previous_by_created_time(*, field=<django.db.models.fields.DateTimeField: created_time>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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.
- property 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:
- objects = <django.db.models.manager.Manager object>
- property priority
Default priority for tasks which take this DFO as an argument
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- 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.parentis aForwardManyToOneDescriptorinstance.
- storage_box_id
- property 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)
- tardis.tardis_portal.models.datafile.compute_checksums(file_object, compute_md5=True, compute_sha512=False, 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:
ModelA 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.DataFilerecord. A dataset can appear in one or moreExperimentrecords. Access controls are configured at theExperimentlevel by creatingObjectACLrecords. Each dataset can be associated with anInstrumentrecord, but it is possible to create a dataset without specifying an instrument.- Attribute experiment:
A foreign key to the one ore more
Experimentrecords which contain this dataset- Attribute 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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()
Return the absolute url to the current
Dataset
- get_all_storage_boxes_used()
- get_datafiles()
- get_dir_nodes(dir_tuples)
Return child node’s subdirectories in format required for tree view
Given a list of (‘subdir’, ‘path/to/subdir’) tuples for a dataset directory node, return a list of {‘name’: ‘subdir’, ‘children’: []} dictionaries required for the tree view.
Like the get_dir_tuples method, the get_dir_nodes method only lists files and directories immediately within the supplied basedir, so any subdirectories will have an empty children array.
Continuing the example from the _dirs property method:
test files/subdir1/ test files/subdir2/ test files/subdir3/ test files/subdir3/subdir4/
List directories in the dataset’s top level directory: >>> dir_tuples = ds.get_dir_tuples(“”) >>> ds.get_dir_nodes(dir_tuples) [
- {
‘name’: ‘test files’, ‘path’: ‘’, ‘children’: []
}
]
List directories within the dataset’s “test files” directory: >>> dir_tuples = ds.get_dir_tuples(“test files”) >>> ds.get_dir_nodes(dir_tuples) [
- {
‘name’: ‘subdir1’, ‘path’: ‘test files/subdir1’, ‘children’: []
}, {
‘name’: ‘subdir2’, ‘path’: ‘test files/subdir2’, ‘children’: []
}, {
‘name’: ‘subdir3’, ‘path’: ‘test files/subdir3’, ‘children’: []
},
]
Request directories within a non-existent directory: >>> dir_tuples = ds.get_dir_tuples(“test file”) >>> ds.get_dir_nodes(dir_tuples) []
List directories within the dataset’s “test files/subdir3” directory: >>> dir_tuples = ds.get_dir_tuples(“test files3/subdir3”) >>> ds.get_dir_nodes(dir_tuples) [
‘name’: ‘subdir4’, ‘path’: ‘test files/subdir3/subdir4’, ‘children’: []
]
- get_dir_tuples(basedir='')
List the directories immediately inside basedir.
If basedir is empty (the default), list directories with no separator, e.g. “subdir1”
If basedir is a string without a separator (e.g. “subdir1”), look for directory paths with one separator e.g. “subdir1/subdir2” and include a “..” for navigating back to the dataset’s top-level directory.
Continuing the example from the _dirs property method:
test files/subdir1/ test files/subdir2/ test files/subdir3/ test files/subdir3/subdir4/
List directories in the dataset’s top level directory: >>> ds.get_dir_tuples(“”) [(‘test files’)]
List directories within the dataset’s “test files” directory: >>> ds.get_dir_tuples(“test files”) [(‘..’, ‘test files’), (‘subdir1’, ‘test /filessubdir1’),
(‘subdir2’, ‘test files/subdir2’), (‘subdir3’, ‘test files/subdir3’)]
Request directories within a non-existent directory: >>> ds.get_dir_tuples(“test file”) []
List directories within the dataset’s “test files/subdir3” directory: >>> ds.get_dir_tuples(“test files/subdir3”) [(‘..’, ‘test files/subdir3’), (‘subdir4’, ‘test files/subdir3/subdir4’)]
List directories within the dataset’s “test files/subdir3/subdir4” directory: >>> ds.get_dir_tuples(“test files/subdir3/subdir4”) [(‘..’, ‘test files/subdir3/subdir4’)]
- get_download_urls()
- get_edit_url()
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.
- property 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.parentis aForwardManyToOneDescriptorinstance.
- instrument_id
- property 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>
- property online_files_count
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
tardis.tardis_portal.models.experiment module
- class tardis.tardis_portal.models.experiment.Experiment(*args, **kwargs)
Bases:
ModelAn
Experimentis a collection ofDatasetrecords. ADatasetrecord can appear in multipleExperimentrecords. Access controls are configured at theExperimentlevel by creatingObjectACLrecords.- 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- PUBLICATION_DETAILS_SCHEMA = 'http://www.mytardis.org/schemas/publication/details/'
- PUBLICATION_DRAFT_SCHEMA = 'http://www.mytardis.org/schemas/publication/draft/'
- PUBLICATION_RETRACTED_SCHEMA = 'http://www.mytardis.org/schemas/publication/retracted/'
- PUBLICATION_SCHEMA_ROOT = 'http://www.mytardis.org/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.parentis aForwardManyToOneDescriptorinstance.
- created_by_id
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.
- experimentauthor_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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- getParameterSets()
Return the experiment parametersets associated with this experiment.
- get_absolute_url()
Return the absolute url to the current
Experiment
- get_create_token_url()
Return the absolute url to the create token view of the current
Experiment
- get_ct()
- get_datafiles()
- get_download_urls()
- get_edit_url()
Return the absolute url to the edit view of the current
Experiment
- get_groups()
- get_images()
- get_next_by_created_time(*, field=<django.db.models.fields.DateTimeField: created_time>, is_next=True, **kwargs)
- get_next_by_update_time(*, field=<django.db.models.fields.DateTimeField: update_time>, is_next=True, **kwargs)
- get_or_create_directory()
- get_owners()
- get_previous_by_created_time(*, field=<django.db.models.fields.DateTimeField: created_time>, is_next=False, **kwargs)
- get_previous_by_update_time(*, field=<django.db.models.fields.DateTimeField: update_time>, is_next=False, **kwargs)
- get_public_access_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: public_access>)
- 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()
- is_retracted_publication()
- 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.parentis aForwardManyToOneDescriptorinstance.
- license_id
- 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.commentsis 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)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- 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.childrenis aReverseManyToOneDescriptorinstance.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.
- class tardis.tardis_portal.models.experiment.ExperimentAuthor(id, experiment, author, institution, email, order, url)
Bases:
Model- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- author
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.parentis aForwardManyToOneDescriptorinstance.
- experiment_id
- 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)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- url
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.facility module
- class tardis.tardis_portal.models.facility.Facility(*args, **kwargs)
Bases:
ModelRepresents a facility that produces data.
Each
Instrumentrecord must belong to exactly one facility. ManyInstrumentrecords 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- manager_group_id
- 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(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- 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.post_save_experimentauthor(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:
ModelRepresents an instrument belonging to a facility that produces data
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- facility_id
- getParameterSets()
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.childrenis aReverseManyToOneDescriptorinstance.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(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
tardis.tardis_portal.models.jti module
- class tardis.tardis_portal.models.jti.JTI(id, jti, created_time)
Bases:
Model- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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(*, field=<django.db.models.fields.DateTimeField: created_time>, is_next=True, **kwargs)
- get_previous_by_created_time(*, field=<django.db.models.fields.DateTimeField: created_time>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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>
tardis.tardis_portal.models.license module
- class tardis.tardis_portal.models.license.License(*args, **kwargs)
Bases:
ModelRepresents 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.childrenis aReverseManyToOneDescriptorinstance.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.
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:
Parameter- 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.
- 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.parentis aForwardManyToOneDescriptorinstance.
- link_gfk
Provide a generic many-to-one relation through the
content_typeandobject_idfields.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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- parameterset_id
- class tardis.tardis_portal.models.parameters.DatafileParameterSet(id, schema, datafile)
Bases:
ParameterSet- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.parentis aForwardManyToOneDescriptorinstance.
- datafile_id
- 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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.DatasetParameter(id, name, string_value, numerical_value, datetime_value, link_id, link_ct, parameterset)
Bases:
Parameter- 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.
- 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.parentis aForwardManyToOneDescriptorinstance.
- link_gfk
Provide a generic many-to-one relation through the
content_typeandobject_idfields.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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- parameterset_id
- class tardis.tardis_portal.models.parameters.DatasetParameterSet(id, schema, dataset)
Bases:
ParameterSet- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.parentis aForwardManyToOneDescriptorinstance.
- dataset_id
- 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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.ExperimentParameter(id, name, string_value, numerical_value, datetime_value, link_id, link_ct, parameterset)
Bases:
Parameter- 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.
- 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.parentis aForwardManyToOneDescriptorinstance.
- link_gfk
Provide a generic many-to-one relation through the
content_typeandobject_idfields.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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- parameterset_id
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- class tardis.tardis_portal.models.parameters.ExperimentParameterSet(id, schema, experiment)
Bases:
ParameterSet- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.parentis aForwardManyToOneDescriptorinstance.
- experiment_id
- 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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.FreeTextSearchField(id, parameter_name)
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.
- 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.parentis aForwardManyToOneDescriptorinstance.
- parameter_name_id
- class tardis.tardis_portal.models.parameters.InstrumentParameter(id, name, string_value, numerical_value, datetime_value, link_id, link_ct, parameterset)
Bases:
Parameter- 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.
- 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.parentis aForwardManyToOneDescriptorinstance.
- link_gfk
Provide a generic many-to-one relation through the
content_typeandobject_idfields.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.parentis aForwardManyToOneDescriptorinstance.
- 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.parentis aForwardManyToOneDescriptorinstance.
- parameterset_id
- class tardis.tardis_portal.models.parameters.InstrumentParameterSet(id, schema, instrument)
Bases:
ParameterSet- 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.
- 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.parentis aForwardManyToOneDescriptorinstance.
- instrument_id
- 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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.Parameter(*args, **kwargs)
Bases:
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.parentis aForwardManyToOneDescriptorinstance.
- link_ct_id
- link_gfk
Provide a generic many-to-one relation through the
content_typeandobject_idfields.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.
- property 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.parentis aForwardManyToOneDescriptorinstance.
- name_id
- 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:
Model- CONTAINS_COMPARISON = 8
- DATETIME = 6
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- 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
Bases:
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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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(*, field=<django.db.models.fields.IntegerField: comparison_type>)
- get_data_type_display(*, field=<django.db.models.fields.IntegerField: data_type>)
- 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.childrenis aReverseManyToOneDescriptorinstance.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.parentis aForwardManyToOneDescriptorinstance.
- schema_id
- 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:
Model,ParameterSetManagerMixin- parameter_class = None
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- 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.parentis aForwardManyToOneDescriptorinstance.
- schema_id
- 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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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:
ParameterSetManagerfor 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:
Model- DATAFILE = 3
- DATASET = 2
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- EXPERIMENT = 1
- INSTRUMENT = 5
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- NONE = 4
- 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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- get_type_display(*, field=<django.db.models.fields.IntegerField: type>)
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.childrenis aReverseManyToOneDescriptorinstance.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.childrenis aReverseManyToOneDescriptorinstance.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:
Modeltable 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- property autocache
Whether to automatically copy data into faster storage
- Returns:
True if data should be automatically cached
- Return type:
- property 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.childrenis aReverseManyToOneDescriptorinstance.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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.childrenis aReverseManyToOneDescriptorinstance.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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.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.parentis aForwardManyToOneDescriptorinstance.
- master_box_id
- 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- property 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.
- property storage_type
- type_order = [3, 6, 1, 2, 4, 5]
- class tardis.tardis_portal.models.storage.StorageBoxAttribute(*args, **kwargs)
Bases:
ModelCan 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
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.
- 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.parentis aForwardManyToOneDescriptorinstance.
- storage_box_id
- 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.storage.StorageBoxOption(*args, **kwargs)
Bases:
Modelholds 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
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- PICKLE = 'pickle'
- STRING = 'string'
- TYPE_CHOICES = (('string', 'String value'), ('pickle', 'Pickled value'))
- get_value_type_display(*, field=<django.db.models.fields.CharField: value_type>)
- 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.parentis aForwardManyToOneDescriptorinstance.
- storage_box_id
- property 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.
tardis.tardis_portal.models.token module
- class tardis.tardis_portal.models.token.Token(id, token, experiment, expiry_date, user)
Bases:
Model- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
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.parentis aForwardManyToOneDescriptorinstance.
- experiment_id
- 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(*, field=<django.db.models.fields.DateField: expiry_date>, is_next=True, **kwargs)
- get_previous_by_expiry_date(*, field=<django.db.models.fields.DateField: expiry_date>, is_next=False, **kwargs)
- 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.parentis aForwardManyToOneDescriptorinstance.
- user_id
Module contents
models/__init__.py