Previous topic

stalker.models.schedulers.TaskJugglerScheduler

Next topic

stalker.models.shot.Shot

This Page

stalker.models.sequence.Sequence

Inheritance diagram of stalker.models.sequence.Sequence

class stalker.models.sequence.Sequence(lead=None, **kwargs)[source]

Bases: stalker.models.task.Task, stalker.models.mixins.CodeMixin

Stores data about Sequences.

Sequences are a way of grouping the Shots according to their temporal position to each other.

Initialization

A Sequence instance needs to be initialized with a Project instance.

Parameters:lead (User) – The lead of this Sequence. The default value is None.
__init__(lead=None, **kwargs)[source]

Methods

__init__([lead])
round_time(dt) Round a datetime object to any time laps in seconds.

Attributes

bid_timing The value of the initial bid of this Task. It is an integer or
bid_unit The unit of the initial bid of this Task. It is a string value.
children
code The code name of this object.
computed_duration returns the computed_duration as the difference of computed_start
computed_end
computed_start
computed_total_seconds returns the duration as seconds
created_by The User who has created this object.
created_by_id The id of the User who has created
date_created A datetime.datetime instance showing the creation date and time of this object.
date_updated A datetime.datetime instance showing the update date and time of this object.
dependent_of
depends A list of Tasks that this one is depending on.
description Description of this object.
duration Duration of the entity.
end overridden end getter
entity_id
entity_type
generic_data This attribute can hold any kind of data which exists in SOM.
id
is_complete A bool value showing if this task is completed or not.
is_container Returns True if the Task has children Tasks
is_leaf Returns True if the Task has no children Tasks
is_milestone Specifies if this Task is a milestone.
is_root Returns True if the Task has no parent
is_scheduled A predicate which returns True if this task has both a
lead The lead of this sequence.
lead_id
level Returns the level of this task.
metadata A collection of Table objects and their associated schema
name Name of this object
nice_name Nice name of this object.
notes All the Notess attached to this entity.
parent
parent_id
parents Returns all of the parents of this Task starting from the root
plural_class_name the plural name of this class
priority
project The owner Project of this task.
project_id
query ORM-level SQL construction object.
references
remaining_seconds returns the remaining amount of efforts, length or duration left
resources The list of Users assigned to this Task.
schedule_constraint
schedule_model
schedule_seconds returns the total effort, length or duration in seconds, for
schedule_timing It is the value of the schedule timing.
schedule_unit It is the unit of the schedule timing.
sequence_id
shots The Shots assigned to this Sequence.
start overridden start getter
status The current status of the object.
status_id
status_list
status_list_id
tags A list of tags attached to this object.
task_id
tasks
thumbnail
thumbnail_id
time_logs A list of TimeLog instances showing who and when spent how much effort on this task.
timing_resolution The timing_resolution of this object.
tjp_abs_id returns the calculated absolute id of this task
tjp_id returns TaskJuggler compatible id
to_tjp TaskJuggler representation of this task
total_logged_seconds The total effort spent for this Task. It is the sum of all the
total_seconds returns the duration as seconds
type The type of the object.
type_id The id of the Type of this entity.
updated_by The User who has updated this object.
updated_by_id The id of the User who has updated
versions A list of Version instances showing the files created for this task.
watchers The list of Users watching this Task.
lead

The lead of this sequence.

A User instance which is assigned as the lead of this Sequence.

shots

The Shots assigned to this Sequence.

It is a list of Shot instances.

bid_timing

The value of the initial bid of this Task. It is an integer or a float.

bid_unit

The unit of the initial bid of this Task. It is a string value. And should be one of ‘min’, ‘h’, ‘d’, ‘w’, ‘m’, ‘y’.

code

The code name of this object.

It accepts strings. Can not be None.

computed_duration

returns the computed_duration as the difference of computed_start and computed_end if there are computed_start and computed_end otherwise returns None

computed_total_seconds

returns the duration as seconds

created_by

The User who has created this object.

created_by_id

The id of the User who has created this entity.

date_created

A datetime.datetime instance showing the creation date and time of this object.

date_updated

A datetime.datetime instance showing the update date and time of this object.

depends

A list of Tasks that this one is depending on.

A CircularDependencyError will be raised when the task dependency creates a circular dependency which means it is not allowed to create a dependency for this Task which is depending on another one which in some way depends to this one again.

description

Description of this object.

duration

Duration of the entity.

It is a datetime.timedelta instance. Showing the difference of the start and the end. If edited it changes the end attribute value.

end

overridden end getter

generic_data

This attribute can hold any kind of data which exists in SOM.

is_complete

A bool value showing if this task is completed or not.

There is a good article about why not to use an attribute called percent_complete to measure how much the task is completed.

is_container

Returns True if the Task has children Tasks

is_leaf

Returns True if the Task has no children Tasks

is_milestone

Specifies if this Task is a milestone.

Milestones doesn’t need any duration, any effort and any resources. It is used to create meaningful dependencies between the critical stages of the project.

is_root

Returns True if the Task has no parent

is_scheduled

A predicate which returns True if this task has both a computed_start and computed_end values

level

Returns the level of this task. It is a temporary property and will be useless when Stalker has its own implementation of a proper Gantt Chart. Write now it is used by the jQueryGantt.

name

Name of this object

nice_name

Nice name of this object.

It has the same value with the name (contextually) but with a different format like, all the white spaces replaced by underscores (“_”), all the CamelCase form will be expanded by underscore (_) characters and it is always lower case.

notes

All the Notess attached to this entity.

It is a list of Note instances or an empty list, setting it None will raise a TypeError.

parents

Returns all of the parents of this Task starting from the root

plural_class_name

the plural name of this class

project

The owner Project of this task.

It is a read-only attribute. It is not possible to change the owner Project of a Task it is defined when the Task is created.

remaining_seconds

returns the remaining amount of efforts, length or duration left in this Task as seconds.

resources

The list of Users assigned to this Task.

round_time(dt)

Round a datetime object to any time laps in seconds.

Uses class property timing_resolution as the closest number of seconds to round to, defaults 1 hour.

Parameters:dt – datetime.datetime object, defaults now.

Based on Thierry Husson’s answer in Stackoverflow

Stackoverflow : http://stackoverflow.com/a/10854034/1431079

schedule_seconds

returns the total effort, length or duration in seconds, for completeness calculation

schedule_timing

It is the value of the schedule timing. It is a float value.

schedule_unit

It is the unit of the schedule timing. It is a string value. And should be one of ‘min’, ‘h’, ‘d’, ‘w’, ‘m’, ‘y’.

start

overridden start getter

status

The current status of the object.

It is a Status instance which is one of the Statuses stored in the status_list attribute of this object.

tags

A list of tags attached to this object.

It is a list of Tag instances which shows the tags of this object

time_logs

A list of TimeLog instances showing who and when spent how much effort on this task.

timing_resolution

The timing_resolution of this object.

Can be set to any value that is representable with datetime.timedelta. The default value is 1 hour. Whenever it is changed the start, end and duration values will be updated.

tjp_abs_id

returns the calculated absolute id of this task

tjp_id

returns TaskJuggler compatible id

to_tjp

TaskJuggler representation of this task

total_logged_seconds

The total effort spent for this Task. It is the sum of all the TimeLogs recorded for this task as seconds.

Returns int:An integer showing the total seconds spent.
total_seconds

returns the duration as seconds

type

The type of the object.

It is an instance of Type with a proper target_entity_type.

type_id

The id of the Type of this entity. Mainly used by SQLAlchemy to create a Many-to-One relates between SimpleEntities and Types.

updated_by

The User who has updated this object.

updated_by_id

The id of the User who has updated this entity.

versions

A list of Version instances showing the files created for this task.

watchers

The list of Users watching this Task.