Stalker Changes¶
0.2.21¶
- New: Switched from
nose+unittesttopytestas the main testing framework (withpytest-xdisttests complete 4x faster). - New: Added
DBSession.save()shortcut method for convenience which does anaddoradd_all(depending to the input) followed by acommitat once. - Update: Updated the about page for a more appealing introduction to the library.
- New: Stalker now creates default
StatusListforProjectinstances on database initialization. - Update: SQLite3 support is back. In fact it was newer gone. For simplicity of first time users the default database is again SQLite3. It was dropped for the sake of adding more PostgreSQL oriented features. But then it is recognized that the system can handle both. Though a two new Variant had to be created for JSON and Datetime columns.
- Update: With the reintroduction of SQLite3, the new JSON type column in
WorkingHoursclass has been upgraded to support SQLite3. So with SQLite3 the column stores the data as TEXT but seamlessly convert them to JSON when ORM loads or commits the data. - New: Added
ConfigBaseas a base class forConfigto let it be used in other config classes. - Fix: Fixed
testing.create_db()andtesting.drop_db()to fallback tosubprocess.check_callmethod for Python 2.6. - Fix: Fixed
stalker.models.auth.User._validate_password()method to work with Python 2.6. - Update: Updated all of the tests to use
pyteststyle assertions to support Python 2.6 along with 2.7 and 3.0+. - Fix: Fixed
stalker.db.check_alembic_version()function to invalidate the connection, so it is not possible to continue with the current session, preventing users to ignore the raisedValueErrorwhen thealembic_versionof the database is not matching thealembic_versionof Stalker’s current version.
0.2.20¶
- New: Added
goodsattribute to theClientclass. To allow special pricedGoodsto be created for individual clients. - Fix: The
WorkingHoursclass is now derived fromEntitythus it is not stored in aPickleTypecolumn inStudioanymore. (issue: #44) - Update: Updated
appveyor.ymlto matchtravis.yml.
0.2.19¶
- Update: Updated the
stalker.config.Config.database_engine_settingsto point the test database. - Fix: Fixed a bug in
stalker.testing.UnitTestDBBase.setUp()where it was not considering the existence of theSTALKER_PATHenvironment variable while doing the tests. - Update: Removed debug message from
db.setup()which was revealing the database password. - Update: Updated the
UnitTestDBBase, it now creates its own test database, which allows all the tests to run in an individual database. Thus, the tests can now be run inmultiprocessmode which speeds things a lot. - Fix: Removed any module level imports of
stalker.defaultsvariable, which can be changed by a Studio (or by tests) and should always be refreshed. - Update: Removed the module level import of the
stalker.db.session.DBSessioninstalker.db, so it is not possible to usedb.DBSessionanymore. - Update: The import statements that imports
stalker.defaultsmoved to local scopes to allow runtime changes to thedefaultsto be reflected correctly. - Update: Added Python fall back mode to
stalker.shot.Shot._check_code_availability()which runs when there is no database. - Update:
stalker.models.task.TimeLog._validate_task()is now getting theStatusinstances from theStatusListthat is attached to theTaskinstance instead of doing a database query. - Update:
stalker.models.task.TimeLog._validate_resource()is now falling back to a Python implementation if there is no database connection. - Update:
stalker.models.task.Task._total_logged_seconds_getter()is now hundreds of times faster when there is a lot ofTimeLoginstances attached to theTask. - Update: In
stalker.models.task.Taskclass, methods those were doing a database query to get the requiredStatusinstances are now using the attachedStatusListinstance to get them. - Fix: A possible
auto_flushis prevented inTicketclass. - Update:
Version.latest_versionproperty is now able to fall back to a pure Python implementation when there is no database connection. - Update: The default log level has been increased from
DEBUGtoINFO. - Update: In an attempt to speed up tests, a lot of tests that doesn’t need
an active Database has been updated to use the regular
unittest.TestCaseinstead ofstalker.testing.TestBaseand as a result running all of the tests are now 2x faster. - Fix:
TimeLogsare now correctly reflected in UTC in a tj3 file. - Fix: Fixed a lot of tests which were raising Warnings and surprisingly considered as Errors in TravisCI.
- Fix:
to_tjpmethods of SOM classes that is printing a Datetime object are now printing the dates in UTC. - Fix: Fixed
stalker.models.auth.Permissionto be hashable for Python 3. - Fix: Fixed
stalker.models.auth.AuthenticationLogto be sortable for Python 3. - Fix: Fixed
stalker.models.version.Version.latest_versionproperty for Python 3. - Fix: Fixed tests of
Permissionclass to check for correct exception messages in Python 3. - Update: Replaced the
assertEqualsandassertNotEqualscalls which are deprecated in Python 3 withassertEqualandassertNotEqualscalls respectively. - Fix: Fixed tests for
UserandVersionclasses to not to cause theid column is Nonewarnings of SQLAlchemy to be emitted.
0.2.18¶
Update: Support for DB backends other than Postgresql has been dropped. This is done to greatly benefit from a code that is highly optimized only for one DB backend. With This all of the tests should be inherited from the
stalker.tests.UnitTestDBBaseclass.New: All the DateTime fields in Stalker are now TimeZone aware and Stalker stores the DateTime values in UTC. Naive datetime values are not supported anymore. You should use a library like
pytzto supply timezone information as shown below:import datetime import pytz from stalker import db, SimpleEntity new_simple_entity = SimpleEntity( name='New Simple Entity', date_created = datetime.datetime.now(tzinfo=pytz.utc) )
Fix: The default values for
date_createdanddate_updatedhas now been properly set to a partial function that returns the current time.Fix: Previously it was possible to enter two TimeLogs for the same resource in the same datetime range by committing the data from two different sessions simultaneously. Thus the database was not aware that it should prevent that. Now with the new PostgreSQL only implementation and the
ExcludeConstraintof PostgreSQL anIntegrityErroris raised by the database backend when something like that happens.Update: All the tests those are checking the system against an Exception is being raised or not are now checking also the exception message.
Update: In the
TimeLogclass, the raisedOverBookedExceptionmessage has now been made clear by adding the start and end date values of the clashing TimeLog instance.Update: Removed the unnecessary
computed_startandcomputed_endcolumns fromTaskclass, which are already defined in theDateRangeMixinwhich is a super for the Task class.
0.2.17.6¶
- Fix: Fixed a bug in
ProjectMixinwhere a proper cascade was not defined and theDeleteoperations to theProjectstable were not cascaded to the mixed-in classes properly.
0.2.17.5¶
- Fix: Fixed the
image_formatattribute implementation inShotclass. Now it will not copy the value ofProject.image_formatdirectly on__init__but instead will only store the value if theimage_formatargument in__init__orShot.image_formatattribute is set to something.
0.2.17.4¶
- Update: Updated the comment sections of all of the source files to correctly show that Stalker is LGPL v3 (not v2.1).
0.2.17.3¶
- New: Added
Shot.fpsattribute to hold the fps information per shot. - Update: Added the necessary alembic revision to reflect the changes in
the
Version_Inputstable.
0.2.17.2¶
- Fix: Fixed
Version_Inputstable to correctly take care ofDELETE``s on the ``Versionstable. So now it is possible to delete aVersioninstance without first cleaning theLinkinstances that is related to thatVersioninstance. - Update: Changed the
idattribute name frominfo_idtolog_idinAuthenticationLogclass. - Update: Started moving towards PostgreSQL only implementation. Merged the
DatabaseModelTesterclass andDatabaseModelsPostgreSQLTesterclass. - Fix: Fixed an autoflush issue in
stalker.models.review.Review.finalize_review_set().
0.2.17.1¶
- Fix: Fixed alembic revision
0.2.17¶
- New: Added
AuthenticationLogclass to hold user login/logout info. - New: Added
stalker.testingmodule to simplify testing setup.
0.2.16.4¶
- Fix: Fixed alembic revision.
0.2.16.3¶
- New:
ProjectUsernow also holds a new field calledrate. The default value is equal to theProjectUser.user.rate. It is a way to hold the rate of a user on a specific project. - New: Added the
Invoiceclass. - New: Added the
Paymentclass. - New: Added two simple mixins
AmountMixinandUnitMixin. - Update:
Goodclass is now mixed in with the newUnitMixinclass. - Update:
BudgetEntryclass is now mixed in with the newAmountMixinandUnitMixinclasses.
0.2.16.2¶
- New:
Grouppermissions can now be set on__init__()with thepermissionsargument.
0.2.16.1¶
- Fix: As usual after a new release that changes database schema, fixed the corresponding Alembic revision (92257ba439e1).
0.2.16¶
- New:
Budgetinstances are now statusable. - Update: Updated documentation to include database migration instructions with Alembic.
0.2.15.2¶
- Fix: Fixed a typo in the error message in
User._validate_email_format()method. - Fix: Fixed a query-invoked auto-flush problem in
Task.update_parent_statuses()method.
0.2.15.1¶
- Fix: Fixed alembic revision (f2005d1fbadc), it will now drop any existing constraints before re-creating them. And the downgrade function will not remove the constraints.
0.2.15¶
- New:
db.setup()now checks foralembic_versionbefore setting up a connection to the database and raises aValueErrorif the database alembic version is not matching the current implementation of Stalker. - Fix:
db.init()sets thecreated_byandupdated_byattributes toadminuser if there is one while creating entity statuses. - New: Created
create_sdist.cmdandupload_to_pypi.cmdfor Windows. - New:
ProjecttoClientrelation is now a many-to-many relation, thus it is possible to set multiple Clients for each project with each client having their own roles in a specific project. - Update:
ScheduleMixin.schedule_timingattribute is now Nullable. - Update:
ScheduleMixin.schedule_unitattribute is now Nullable.
0.2.14¶
- Fix: Fixed
Task.pathto always return a path with forward slashes. - New: Introducing
EntityGroupsthat lets one to group a bunch of
``SimpleEntity“s together, it can be used in grouping tasks even if they are in different places on the project task hierarchy or even in different projects.
- Update:
Task.percent_completeis now correctly calculated for aDurationbased task by using theTask.startandTask.endattribute values. - Fix: Fixed
stalker.models.task.update_time_log_task_parents_for_end()event to work with SQLAlchemy v1.0. - New: Added an option called
__dag_cascade__to theDAGMixinto control cascades on mixed in class. The default value is “all, delete”. Change it to “save-update, merge” if you don’t want the children also be deleted when the parent is deleted. - Fix: Fixed a bug in
Versionclass that occurs when a version instance that is a parent of other version instances is deleted, the child versions are also deleted (fixed through DAGMixin class).
0.2.13.3¶
- Fix: Fixed a bug in
Review.finalize_review_set()for tasks that are sent to review and still have some extra time were not clamped to their total logged seconds when the review set is all approved.
0.2.13.2¶
- New: Removed
msrp,costandunitarguments fromBudgetEntry.__init__()and added a newgoodargument to get all of the data from the relatedGoodinstance. But themsrp,costandunitattributes ofBudgetEntryclass are still there to store the values that may not correlate with the relatedGoodin future.
0.2.13.1¶
- Fix: Fixed a bug in
Review.finalize_review_set()which causes Task instances to not to get any status update if the revised task is a second degree dependee to that particular task.
0.2.13¶
New:
Projectinstances can now have multiple repositories. Thus therepositoryattribute is renamed torepositories. And the order of the items in therepositoriesattribute is restored correctly.New:
stalker.db.init()now automatically creates environment variables for each repository in the database.New: Added a new
after_insertwhich listensRepositoryinstance ``insert“s to automatically add environment variables for the newly inserted repositories.Update:
Repository.make_relative()now handles paths with environment variables.Fix: Fixed
TaskJugglerSchedulerto correctly generate task absolute paths for PostgreSQL DB.New:
Repository.pathis now writable and sets the correct path (linux_path,windows_path, orosx_path) according to the current system.New: Setting either of the
Repository.path,Repository.linux_path,Repository.windows_path,Repository.osx_pathattributes will update the related environment variable if the system and attribute are matching to each other, setting thelinux_pathon Linux or setting thewindows_pathon Windows or setting theosx_pathon OSX will update the environment variable.New: Added
Task.goodattribute to easily connect tasks to ``Good“s.New: Added new methods to
Repositoryto help managing paths:Repository.find_repo()to find a repo from a given path. This is a class method so it can be directly used with the Repository class.Repository.to_os_independent_path()to convert the given path to a OS independent path which uses environment variables. Again this is a class method too so it can be directly used with the Repository class.Repository.env_vara new property that returns the related environment variable name of a repo instance. This is an instance property:# with default settingsrepo = Repository(…) repo.env_var # should print something like “REPO131” which will be used
# in paths as “$REPO131”
Fix: Fixed
User.company_roleattribute which is a relationship to theClienUserto cascadeall, delete-orphanto prevent AssertionErrors when a Client instance is removed from theUser.companiescollection.
0.2.12.1¶
- Update:
Versionclass is now mixed with theDAGMixin, so all the parent/child relation is coming from the DAGMixin. - Update:
DAGMixin.walk_hierarchy()is updated to walk the hierarchy inDepth Firstmode by default (method=0) instead ofBreadth Firstmode (method=1). - Fix: Fixed
alembic_revisionon database initialization.
0.2.12¶
- Fix: Fixed importing of
ProjectUserdirectly fromstalkernamespace. - Fix: Fixed importing of
ClientUserdirectly fromstalkernamespace. - New: Added two new columns to the
BudgetEntryclass to allow more detailed info to be hold. - New: Added a new Mixin called
DAGMixinto create parent/child relation between mixed in class. - Update: The
Taskclass is now mixed with theDAGMixin, so all the parent/child relation is coming from the DAGMixin. - New: Added a new class called
Goodto hold details about the commercial items/services sold in the Studio. - New: Added a new class called
PriceListto create price lists from Goods.
0.2.11¶
- New: User instances now have a new attribute called
rateto track their cost as a resource. - New: Added two new classes called
BudgetandBudgetEntryto record Project budgets in a simple way. - New: Added a new class called Role to manage user roles in different Departments, Clients and Projects.
- New: User and Department relation is updated to include the role of the user in that department in a more flexible way by using the newly introduced Role class and some association proxy tricks.
- New: Also updated the User to Project relation to include the role of the user in that Project by using an associated Role class.
- Update: Department.members attribute is renamed to users (and removed the synonym property).
- Update: Removed
Project.leadattribute useRoleinstead. - Update: Removed
Department.leadattribute useRoleinstead. - Update: Because the
Project.leadattribute is removed, it is now possible to have tasks with no responsible. - Update: Client to User relation is updated to use an association proxy which makes it possible to set a Role for each User for each Client it is assigned to.
- Update: Renamed User.company to User.companies as the relation is now able to handle more than one Client instances for the User company.
- Update: Task Status Workflow has been updated to convert the status of a
DREV task to HREV instead of WIP when the dependent tasks has been set to
CMPL. Also the timing of the task is expanded by the value of
stalker.defaults.timing_resolutionif it doesn’t have any effort left (generally true for CMPL tasks) to allow the resource to review and decide if he/she needs more time to do any update on the task and also give a chance of setting the Task status to WIP by creating a time log. - New: It is now possible to schedule only a desired set of projects by passing a projects argument to the TaskJugglerScheduler.
- New: Task.request_review() and Review.finalize() will not cap the timing of the task until it is approved and also Review.finalize() will extend the timing of the task if the total timing of the given revisions are not fitting in to the left timing.
0.2.10.5¶
- Update: TaskJuggler output is now written to debug output once per line.
0.2.10.4¶
- New: ‘@’ character is now allowed in Entity nice name.
0.2.10.3¶
- New: ‘@’ character is now allowed in Version take names.
0.2.10.2¶
- Fix: Fixed a bug in
stalker.models.schedulers.TaskJugglerScheduler._create_tjp_file_content()caused by non-ascii task names. - Fix: Removed the residual
RootFactoryclass reference from documentation. - New: Added to new functions called
utc_to_localandlocal_to_utcfor UTC to Local time and vice versa conversion.
0.2.10.1¶
- Fix: Fixed a bug where for a WIP Task with no time logs (apparently
something went wrong) and no dependencies using
Task.update_status_with_dependent_statuses()will convert the status to RTS.
0.2.10¶
- New: It is now possible to track the Edit information per Shot using the
newly introduced
source_in,source_outandrecord_inalong with existentcut_inandcut_outattributes.
0.2.9.2¶
- Fix: Fixed MySQL initialization problem in
stalker.db.init().
0.2.9.1¶
- New: As usual, after a new release, fixed a bug in
stalker.db.create_entity_statuses()caused by the behavioral change of themapbuilt-in function in Python 3.
0.2.9¶
- New: Added a new class called
Dailywhich will help managingVersionoutputs (Link instances including Versions itself) as a group. - New: Added a new status list for
Dailyclass which contains two statuses called “Open” and “Closed”. - Update: Setting the
Version.take_nameto a value other than a string will now raise aTypeError.
0.2.8.4¶
- Fix: Fixed
SimpleEntity._validate_name()method for unicode strings.
0.2.8.3¶
- Fix: Fixed str/unicode errors due to the code written for Python3 compatibility.
- Update: Removed
Task.is_completeattribute. Use the status “CMPL” instead of this attribute.
0.2.8.2¶
- Fix: Fixed
stalker.db.create_alembic_table()again to prevent extra row insertion.
0.2.8.1.1¶
- Fix: Fixed
stalker.db.create_alembic_table()function to handle the situation where the table is already created.
0.2.8.1¶
- Fix: Fixed
stalker.db.create_alembic_table()function, it is not using thealembiclibrary anymore to create thealembic_versiontable, which was the proper way of doing it but it created a lot of problems when Stalker is installed as a package.
0.2.8¶
- Update: Stalker is now Python3 compatible.
- New: Added a new class called
Clientwhich can be used to track down information about the clients ofProjects. Also addedProject.clientandUser.companyattributes which are referencing a Client instance allowing to add clients as normal users. - New:
db.init()now createsalembic_versiontable and stamps the most recent version number to that table allowing newly initialized databases to be considered in head revision. - Fix: Fixed
Version._format_take_name()method. It is now possible to use multiple underscore characters inVersion.take_nameattribute.
0.2.7.6¶
Update: Removed
TimeLog._expand_task_schedule_timing()method which was automatically adjusting theschedule_timingandschedule_unitof a Task to total duration of the TimeLogs of that particular task, thus increasing the schedule info with the entered time logs.But it was setting the
schedule_timingto 0 in some certain cases and it was unnecessary because the main purpose of this method was to prevent TaskJuggler to raise any errors related to the inconsistencies between the schedule values and the duration of TimeLogs and TaskJuggler has never given a real error about that situation.
0.2.7.5¶
- Fix: Fixed Task parent/child relationship, previously setting the parent of a task to None was cascading a delete operation due to the “all, delete-orphan” setting of the Task parent/child relationship, this is updated to be “all, delete” and it is now safe to set the parent to None without causing the task to be deleted.
0.2.7.4¶
Fix: Fixed the following columns column type from String to Text:
- Permissions.class_name
- SimpleEntities.description
- Links.full_path
- Structures.custom_template
- FilenameTemplates.path
- FilenameTemplates.filename
- Tickets.summary
- Wiki.title
- Wiki.content
and specified a size for the following columns:
- SimpleEntities.html_class -> String(32)
- SimpleEntities.html_style -> String(32)
- FilenameTemplates.target_entity_type -> String(32)
to be compatible with MySQL.
Update: It is now possible to create TimeLog instances for a Task with PREV status.
0.2.7.3¶
- Fix: Fixed
Task.update_status_with_dependent_statuses()method for a Task where there is no dependency but the status is DREV. Now callingTask.update_status_with_dependent_statuses()will set the status to RTS if there is noTimeLogfor that task and will set the status to WIP if the task has time logs.
0.2.7.2¶
- Update:
TaskJugglerScheduleris now 466x faster when dumping all the data to TJP file. So with this new update it is taking only 1.5 seconds to dump ~20k tasks to a valid TJP file where it was around ~10 minutes in previous implementation. The speed enhancements is available only to PostgreSQL dialect for now.
0.2.7.1¶
- Fix: Fixed TimeLog output in one line per task in
Task.to_tjp(). - New: Added
TaskJugglerSchedulernow accepts a new argument calledcompute_resourceswhich when set to True will also consider Task.alternative_resources attribute and will fillTask.computed_resourcesattribute for each Task. WithTaskJugglerSchedulerwhen the total number of Task is around 15k it will take around 7 minutes to generate this data, so by default it is set to False.
0.2.7¶
- New: Added
efficiencyattribute toUserclass. See User documentation for more info.
0.2.6.14¶
- Fix: Fixed an autoflush problem in
Studio.schedule()method.
0.2.6.13¶
- New: Added
Repository.make_relative()method, which makes the given path to relative to the repository root. It considers that the path is already in the repository. So for now, be careful about not to pass a path outside of the repository.
0.2.6.12¶
- Update:
TaskJugglerScheduler.schedule()method now uses theStudio.startandStudio.endvalues for the scheduling range instead of the hardcoded dates.
0.2.6.11¶
- Update:
Task.create_time_log()method now returns the createdTimeLoginstance.
0.2.6.10¶
- Fix: Fixed an
autoflushissue inTask.update_status_with_children_statuses()method.
0.2.6.9¶
- Update:
Studio.is_schedulingandStudio.is_scheduling_byattributes will not be updated or checked at the beginning of theStudio.schedule()method. It is the duty of the user to check those attributes before callingStudio.schedule(). This is done in this way because without being able to do a db commit insideStudio.schedule()method (which is the case with transaction managers which may be used in web applications like Stalker Pyramid) it is not possible to persist and thus use those variables. So, to be able to use those attributes meaningfully the user should set them. Those variables will be set to False and None accordingly by theStudio.schedule()method after the scheduling is done.
0.2.6.8¶
- Fix: Fixed a deadlock in
TaskJugglerScheduler.schedule()method related with thePopen.stderr.readlines()blocking the TaskJuggler process without being able to read the output buffer.
0.2.6.7¶
- Update:
TaskJugglerScheduler.schedule()is now using bulk inserts and updates which is way faster than doing it with pure Python. Useparsing_method(0: SQL, 1: Python) to choose between SQL or Pure Python implementation. Also updatedStudio.schedule()to take in aparsing_methodparameter.
0.2.6.6¶
- Update: The
cut_in,cut_outandcut_durationattribute behaviour and the attribute order is updated inShotclass. So, if three of the values are given, then thecut_durationattribute value will be calculated fromcut_inandcut_outattribute values. In any casecut_outprecedescut_duration, and if none of them givencut_inandcut_durationvalues will default to 1 andcut_outwill be calculated by usingcut_inandcut_duration.
0.2.6.5¶
- New: Entity to Note relation is now Many-to-Many. So one Note can now be assigned more than one Entity.
- New: Added alembic revision for
Entity_Notestable creation and data migration fromNotestable toEntity_Notestable. So all notes are preserved. - Fix: Fixed
Shot.cut_durationattribute initialization onShotinstances restored from database. - Fix: Fixed
Studios.is_scheduling_byrelationship configuration, which was wrongly referencing theStudios.last_scheduled_by_idcolumn instead ofStudios.is_scheduled_by_idcolumn.
0.2.6.4¶
- New: Added a
Task.review_set(review_number)method to get the desired set of reviews. It will return the latest set of reviews ifreview_numberis skipped or it is None. - Update: Removed
Task.approve()it was making things complex than it should be.
0.2.6.3¶
- Fix: Added
Pagetoclass_namesindb.init(). - Fix: Fixed
TimeLogtjp representation to use bot thestartandenddate values instead of thestartandduration. This is much better because it is independent from the timing resolution settings.
0.2.6.2¶
- Fix: Fixed
stalker.models.studio.schedule()method, and prevented it to callDBSession.commit()which causes errors if there is a transaction manager. - Fix: Fixed
stalker.models._parse_csv_file()method for empty computed resources list.
0.2.6.1¶
- New:
stalker.models.task.TimeLoginstances are now checking if the dependency relation between the task that receives the time log and the tasks that the task depends to will be violated in terms of the start and end dates and raises aDependencyViolationErrorif it is the case.
0.2.6¶
- New: Added
stalker.models.wiki.Pageclass, for holding a per Project wiki.
0.2.5.5¶
- Fix:
Review.taskattribute now accepts None but this is mainly done to allow its relation to theTaskinstance can be broken when it needs to be deleted without issuing a database commit.
0.2.5.4¶
Update: The following column names are updated:
Tasks._review_numbertoTasks.review_numberTasks._schedule_secondstoTasks.schedule_secondsTasks._total_logged_secondstoTasks.total_logged_secondsReviews._review_numbertoReviews.review_numberShots._cut_intoShots.cut_inShots._cut_outtoShots.cut_out
Also updated alembic migration to create columns with those names.
Update: Updated Alembic revision
433d9caaafab(the one related with stalker 2.5 update) to also include following updates:- Create StatusLists for Tasks, Asset, Shot and Sequences and add all the Statuses in the Task Status Workflow.
- Remove
NEWfrom all of the status lists of Task, Asset, Shot and Sequence. - Update all the
PREVtasks toWIPto let them use the new Review Workflow. - Update the
Tasks.review_numberto 0 for all tasks. - Create StatusLists and Statuses (
NEW,RREV,APP) for Reviews. - Remove any other status then defined in the Task Status Workflow from Task, Asset, Shot and Sequence status list.
0.2.5.3¶
- Fix: Fixed a bug in
Taskclass where trying to remove the dependencies will raise anAttributeErrorcaused by theTask._previously_removed_dependent_tasksattribute.
0.2.5.2¶
- New: Task instances now have two new properties called
pathandabsolute_path. As in Version instances, these are the rendered version of the related FilenameTemplate object in the related Project. Thepathattribute is Repository root relative andabsolute_pathis the absolute path including the OS dependent Repository path. - Update: Updated alembic revision with revision number “433d9caaafab” to also create Statuses introduced with Stalker v0.2.5.
0.2.5.1¶
- Update:
Version.__repr__results with a more readable string. - New: Added a generalized generator called
stalker.models.walk_hierarchy()that walks and yields the entities over the given attribute in DFS or BFS fashion. - New: Added
Task.walk_hierarchy()which iterates over the hierarchy of the task. It walks in a breadth first fashion. Usemethod=0to walk in depth first. - New: Added
Task.walk_dependencies()which iterates over the dependencies of the task. It walks in a breadth first fashion. Usemethod=0to walk in depth first. - New: Added
Version.walk_hierarchy()which iterates over the hierarchy of the version. It walks in a depth first fashion. Usemethod=1to walk in breadth first. - New: Added
Version.walk_inputs()which iterates over the inputs of the version. It walks in a depth first fashion. Usemethod=1to walk in breath first. - Update:
stalker.models.check_circular_dependency()function is now usingstalker.models.walk_hierarchy()instead of recursion over itself, which makes it more robust in deep hierarchies. - Fix:
db.init()now updates the statuses of already created status lists forTask,Asset,ShotandSequenceclasses.
0.2.5¶
Update:
Revisionclass is renamed toReviewand introduced a couple of new attributes.New: Added a new workflow called “Task Review Workflow”. Please see the documentation about the new workflow.
Update:
Task.responsibleattribute is now a list which allows multiple responsible to be set for aTask.New: Because of the new “Task Review Workflow” task statuses which are normally created in Stalker Pyramid are now automatically created in Stalker database initialization. The new statuses are Waiting For Dependency (WFD), Ready To Start (RTS), Work In Progress (WIP), Pending Review (PREV), Has Revision (HREV), On Hold (OH), Stopped (STOP) and Completed (CMPL) are all used in
Task,Asset,ShotandSequencestatus lists by default.New: Because of the new “Task Review Workflow” also a status list for
Reviewclass is created by default. It contains the statuses of New (NEW), Requested Revision (RREV) and Approved (APP).Fix:
Users.logincolumn is now unique.Update: Ticket workflow in config is now using the proper status names instead of the lower case names of the statuses.
New: Added a new exception called StatusError which states the entity status is not suitable for the action it is applied to.
New:
Studioinstance now stores the scheduling state to the database to prevent two scheduling process to override each other. It also stores the last schedule message and the last schedule date and the id of the user who has done the scheduling.New: The Task Dependency relation is now using an Association Object instead of just a Secondary Table. The
Task.dependsandTask.dependent_ofattributes are now association_proxies.Also added extra parameters like
dependency_target,gap_timing,gap_unitandgap_modelto the dependency relation. So all of the dependency relations are now able to hold those extra information.Updated the
task_tjp_templateto reflect the details of the dependencies that a task has.New:
ScheduleMixinclass now has some default class attributes that will allow customizations in inherited classes. This is mainly done forTaskDependencyclass and forthe gap_timing,gap_unit,gap_modelattributes which are in fact synonyms ofschedule_timing,schedule_unitandschedule_modelattributes coming from theScheduleMixinclass. So by using the__default_schedule_attr_name__Stalker is able to display error messages complaining aboutgap_timingattribute instead ofschedule_timingetc.New: Updating a task by calling
Task.request_revision()will now set theTaskDependency.dependency_targetto ‘onstart’ for tasks those are depending to the revised task and updated to have a status of DREV, OH or STOP. Thus, TaskJuggler will be able to continue scheduling these tasks even if the tasks are now working together.Update: Updated the TaskJuggler templates to make the tjp output a little bit more readable.
New:
ScheduleMixinnow creates more localized (to the mixed in class) column and enum type names in the mixed in classes.For example, it creates the
TaskScheduleModelenum type forTaskclass and forTaskDependencyit createsTaskDependencyGapModelwith the same setup following the{{class_name}}{{attr_name}}Modeltemplate.Also it creates
schedule_modelcolumn forTask, andgap_modelforTaskDependencyclass.Update: Renamed the
TaskScheduleUnitenum type name toTimeUnitinScheduleMixin.
0.2.4¶
New: Added new class called
Revisionto hold info about Task revisions.Update: Renamed
ScheduleMixintoDateRangeMixin.New: Added a new mixin called
ScheduleMixin(replacing the old one) which adds attributes likeschedule_timing,schedule_unit,schedule_modelandschedule_constraint.New: Added
Task.ticketsandTask.open_ticketsproperties.Update: Removed unnecessary arguments (
project_lead,tasks,watching,last_login) from User class.Update: The
timing_resolutionattribute is moved from theDateRangeMixintoStudioclass. So instances of classes likeProjectorTaskwill not have their own timing resolution anymore.New: The
Studioinstance now overrides the values onstalker.defaultson creation and on load, and also thedb.setup()function lets the firstStudioinstance that it finds to update the defaults. So it is now possible to usestalker.defaultsall the time without worrying about the Studio settings.Update: The
Studio.yearly_working_daysvalue is now always an integer.New: Added a new method
ScheduleMixin.least_meaningful_time_unit()to calculate the most appropriate timing unit and the value of the given seconds which represents an interval of time.So it will convert 3600 seconds to 1 hours, and 8424000 seconds to 1 years if it represents working time (
as_working_time=True) or 2340 hours if it is representing the calendar time.New: Added a new method to
ScheduleMixincalledto_seconds(). Theto_seconds()method converts the given schedule info values (schedule_timing,schedule_unit,schedule_model) to seconds considering if the givenschedule_modelis work time based (‘effort’ or ‘length’) or calendar time based (‘duration’).New: Added a new method to
ScheduleMixincalledschedule_secondswhich you may recognise fromTaskclass. What it does is pretty much the same as in theTaskclass, it converts the given schedule info values to seconds.Update: In
DateRangeMixin, when thestart,endordurationarguments given so that the duration is smaller then thedefaults.timing_resolutionthedefaults.timing_resolutionwill be used as thedurationand theendwill be recalculated by anchoring thestartvalue.New: Adding a
TimeLogto aTaskand extending its schedule info values now will always use the least meaningful timing unit. So expanding a task from 16 hours to 18 hours will result a task with 2 days of schedule (considering thedaily_working_hours = 9).Update: Moved the
daily_working_hoursattribute fromStudioclass toWorkingHoursclass as it was much related to this one thenStudioclass. Left a property with the same name in theStudioclass, so it will still function as it was before but there will be no column in the database for that attribute anymore.
0.2.3.5¶
- Fix: Fixed a bug in
stalker.models.auth.LocalSessionwhere stalker was complaining about “copy_reg” module, it seems that it is related to this bug.
0.2.3.4¶
- Update: Fixed a little bug in Link.extension property setter.
- New: Moved the stalker.models.env.EnvironmentBase class to “Anima Tools” python module.
- Fix: Fixed a bug in stalker.models.task.Task._responsible_getter() where it was always returning the greatest parents responsible as the responsible for the child task when the responsible is set to None for the child.
- New: Added
stalker.models.version.Version.naming_parentswhich returns a list of parents starting from the closest parent Asset, Shot or Sequence. - New:
stalker.models.version.Version.nice_namenow generates a name starting from the closest Asset, Shot or Sequence parent.
0.2.3.3¶
- New:
Ticketaction methods (resolve,accept,reassign,reopen) now return the createdTicketLoginstance.
0.2.3.2¶
- Update: Added tests for negative or zero fps value in Project class.
- Fix: Minor fix to
schedule_timingargument in Task class, where IDEs where assuming that the value passed to theschedule_timingshould be integer where as it accepts floats also. - Update: Removed
bg_colorandfg_colorattributes (and columns) from Status class. Use SimpleEntity.html_class and SimpleEntity.html_style attributes instead. - New: Added
Project.open_ticketsproperty.
0.2.3.1¶
- Fix: Fixed an inconvenience in SimpleEntity.__init__() when a date_created argument with a value is later than datetime.datetime.now() is supplied and the date_updated argument is skipped or given as None, then the date_updated attribute value was generated from datetime.datetime.now() this was causing an unnecessary ValueError. This is fixed by directly copying the date_created value to date_updated value when it is skipped or None.
0.2.3¶
- New: SimpleEntity now have two new attributes called
html_styleandhtml_classwhich can be used in storing cosmetic html values.
0.2.2.3¶
- Update: Note.content attribute is now a synonym of the Note.description attribute.
0.2.2.2¶
- Update: Studio.schedule() now returns information about how much did it take to schedule the tasks.
- Update: Studio.to_tjp() now returns information about how much did it take to complete the conversion.
0.2.2.1¶
- Fix: Task.percent_complete() now calculates the percent complete correctly.
0.2.2¶
- Update: Added cascade attributes to all necessary relations for all the classes.
- Update: The Version class is not mixed with the StatusMixin anymore. So the versions are not going to be statusable anymore. Also created alembic revision (a6598cde6b) for that update.
0.2.1.2¶
- Update: TaskJugglerScheduler and the Studio classes are now returning the
stderr message out of their
schedule()methods.
0.2.1.1¶
- Fix: Disabled some deep debug messages on TaskJugglerScheduler._parse_csv_file().
- Fix: Fixed a flush issue related to the Task.parent attribute which is lazily loaded in Task._schedule_seconds_setter().
0.2.1¶
- Fix: As usual distutil thinks
0.2.0is a lower version number than0.2.0.rc5(I should have read the documentation again and used0.2.0.c5instead of0.2.0.rc5) so this is a dummy update to just to fix the version number.
0.2.0¶
- Update: Vacation tjp template now includes the time values of the start and end dates of the Vacation instance.
0.2.0.rc5¶
- Update: For a container task,
Task.total_logged_secondsandTask.schedule_secondsattributes are now using the info of the child tasks. Also these attributes are cached to database, so instead of querying the child tasks all the time, the calculated data is cached and whenever a TimeLog is created or updated for a child task (which changes thetotal_logged_secondsfor the child task) or theschedule_timingorschedule_unitattributes are updated, the cached values are updated on the parents. Allowing Stalker to display percent_complete info of a container task without loading any of its children. - New: Added
Task.percent_completeattribute, which calculates the percent of completeness of the task based on theTask.total_logged_secondsandTask.schedule_secondsattributes. - Fix: Added
TimeLog.__eq__()operator to more robustly check if the time logs are overlapping. - New: Added
Project.percent_complete,Percent.total_logged_secondsandProject.schedule_secondsattributes. - Update:
ScheduleMixin._validate_dates()does not set the date values anymore, it just return the calculated and validatedstart,endanddurationvalues. - Update:
Vacationnow can be created without aUserinstance, effectively making theVacationaStudiowide vacation, which applies to all users. - Update:
Vacation.__strictly_typed__is updated toFalse, so there is no need to create aTypeinstance to be able to create aVacation. - New:
Studio.vacationsproperty now returns theVacationinstances which has no user. - Update:
Task.startandTask.endvalues are no more read from children Tasks for a container task over and over again but calculated whenever the start and end values of a child task are changed or a new child is appended or removed. - Update:
SimpleEntity.descriptionvalidation routine doesn’t convert the input to string anymore, but checks the given description value against being a string or unicode instance. - New: Added
Ticket.summaryfield. - Fix: Fixed
Link.extension, it is now accepting unicode.
0.2.0.rc4¶
New: Added a new attribute to
Versionclass calledlatest_versionwhich holds the latest version in the version queue.New: To optimize the database connection times,
stalker.db.setup()will not try to initialize the database every time it is called anymore. This leads a ~4x speed up in database connection setup. To initialize a newly created database please use:# for a newly created database from stalker import db db.setup() # connects to database db.init() # fills some default values to be used with Stalker # for any subsequent access just use (don't need to call db.init()) db.setup()
Update: Removed all
__init_on_load()methods from all of the classes. It was causing SQLAlchemy to eagerly load relations, thus slowing down queries in certain cases (especially inTask.parent->Task.childrenrelation).Fix: Fixed
Vacationclass tj3 format.Fix:
Studio.nowattribute was not properly working when theStudioinstance has been restored from database.
0.2.0.rc3¶
- New: Added a new attribute to
Taskclass calledresponsible. - Update: Removed
Sequence.lead_iduseTask.reponsibleinstead. - Update: Updated documentation to include documentation about
Configuring Stalker with
config.py. - Update: The
durationargument inTaskclass is removed. It is somehow against the idea of havingschedule_modelandschedule_timingarguments (schedule_model='duration'is kind of the same). - Update: Updated
Taskclass documentation.
0.2.0.rc2¶
- New: Added
Version.created_withattribute to track the environment or host program name that a particularVersioninstance is created with.
0.2.0.rc1¶
- Update: Moved the Pyramid part of the system to another package called
stalker_pyramid. - Fix: Fixed
setup.pywhere importingstalkerto get the__version__variable causing problems.
0.2.0.b9¶
- New: Added
Version.latest_published_versionandVersion.is_latest_published_version(). - Fix: Fixed
Version.__eq__(), now Stalker correctly distinguishes different Version instances. - New: Added
Repository.to_linux_path(),Repository.to_windows_path(),Repository.to_osx_path()andRepository.to_native_path()to theRepositoryclass. - New: Added
Repository.is_in_repo(path)which checks if the given path is in this repo.
0.2.0.b8¶
- Update: Renamed Version.version_of attribute to Version.task.
- Fix: Fixed Version.version_number where it was not possible to have a version number bigger than 2.
- Fix: In db.setup() Ticket statuses are only created if there aren’t any.
- Fix: Added Vacation class to the registered class list in stalker.db.
0.2.0.b7¶
- Update: Task.schedule_constraint is now reflected to the tjp file correctly.
- Fix: check_circular_dependency() now checks if the entity and the other_entity are the same.
- Fix: Task.to_tjp() now correctly add the dependent tasks of a container task.
- Fix: Task.__eq__() now correctly considers the parent, depends, resources, start and end dates.
- Update: Task.priority is now reflected in tjp file if it is different than the default value (500).
- New:: Added a new class called Vacation to hold user vacations.
- Update: Removed dependencies to
pyramid.security.Allowandpyramid.security.Denyin couple of packages. - Update: Changed the way the
stalker.defaultsis created. - Fix: EnvironmentBase.get_version_from_full_path(), EnvironmentBase.get_versions_from_path(), EnvironmentBase.trim_repo_path(), EnvironmentBase.find_repo methods are now working properly.
- Update: Added Version.absolute_full_path property which renders the absolute full path which also includes the repository path.
- Update: Added Version.absolute_path property which renders the absolute path which also includes the repository path.
0.2.0.b6¶
- Fix: Fixed LocalSession._write_data(), previously it was not creating the local session folder.
- New: Added a new method called LocalSession.delete() to remove the local session file.
- Update: Link.full_path can now be set to an empty string. This is updated in this way for Version class.
- Update: Updated the formatting of SimpleEntity.nice_name, it is now possible to have uppercase letters and camel case format will be preserved.
- Update: Version.take_name formatting is enhanced.
- New: Task class is now mixed in with ReferenceMixin making it unnecessary to have Asset, Shot and Sequence classes all mixed in individually. Thus removed the ReferenceMixin from Asset, Shot and Sequence classes.
- Update: Added Task.schedule_model validation and its tests.
- New: Added ScheduleMixin.total_seconds and ScheduleMixin.computed_total_seconds.
0.2.0.b5¶
- New: Version class now has two new attributes called
parentandchildrenwhich will be used in tracking of the history of Version instances and track which Versions are derived from which Version. - New: Versions instances are now derived from Link class and not Entity.
- Update: Added new revisions to alembic to reflect the change in Versions table.
- Update: Links.path is renamed to Links.full_path and added three new attributes called path, filename and extension.
- Update: Added new revisions to alembic to reflect the change in Links table.
- New: Added a new class called LocalSession to store session data in users local filesystem. It is going to be replaced with some other system like Beaker.
- Fix: Database part of Stalker can now be imported without depending to Pyramid.
- Fix: Fixed documentation errors that Sphinx complained about.
0.2.0.b4¶
- No changes in SOM.
0.2.0.b3¶
- Update: FilenameTemplate’s are not
strictly typedanymore. - Update: Removed the FilenameTemplate type initialization, FilenameTemplates do not depend on Types anymore.
- Update: Added back the
plural_class_name(previouslyplural_name) property to the ORMClass class, so all the classes in SOM now have this new property. - Update: Added
accepts_referencesattribute to the EntityType class. - New: The Link class has a new attribute called
original_filenameto store the original file names of link files. - New: Added alembic to the project requirements.
- New: Added alembic migrations which adds the
accepts_referencescolumn toEntityTypestable andoriginal_nameto theLinkstable.
0.2.0.b2¶
- Stalker is now compatible with Python 2.6.
- Task:
- Update: Tasks now have a new attribute called
watcherswhich holds a list of User instances watching the particular Task. - Update: Users now have a new attribute called
watchingwhich is a list of Task instances that this user is watching.
- Update: Tasks now have a new attribute called
- TimeLog:
- Update: TimeLog instances will expand Task.schedule_timing value automatically if the total amount of logged time is more than the schedule_timing value.
- Update: TimeLogs are now considered while scheduling the task.
- Fix: TimeLogs raises OverBookedError when appending the same TimeLog instance to the same resource.
- Auth:
- Fix: The default ACLs for determining the permissions are now working properly.
0.2.0.b1¶
- WorkingHours.is_working_hour() is working now.
- WorkingHours class is moved from stalker.models.project to stalker.models.studio module.
daily_working_hoursattribute is moved from stalker.models.project.Project to stalker.models.studio.Studio class.- Repository path variables now ends with a forward slash even if it is not given.
- Updated Project classes validation messages to correlate with Stalker standard.
- Implementation of the Studio class is finished. The scheduling works like a charm.
- It is now possible to use any characters in SimpleEntity.name and the derived classes.
- Booking class is renamed to TimeLog.
0.2.0.a10¶
Added new attribute to WorkingHours class called
weekly_working_hours, which calculates the weekly working hours based on the working hours defined in the instance.Task class now has a new attribute called
schedule_timingwhich is replacing theeffort,lengthanddurationattributes. Together with theschedule_modelattribute it will be used in scheduling the Task.Updated the config system to the one used in oyProjectManager (based on Sphinx config system). Now to reach the defaults:
# instead of doing the following from stalker.conf import defaults # not valid anymore # use this from stalker import defaults
If the above idiom is used, the old
defaultsmodule behaviour is retained, so no code change is required other than the new lower case config variable names.
0.2.0.a9¶
- A new property called
to_tjpadded to the SimpleEntity class which needs to be implemented in the child and is going to be used in TaskJuggler integration. - A new attribute called
is_scheduledadded to Task class and it is going to be used in Gantt charts. Where it will lock the class and will not try to snap it to anywhere if it is scheduled. - Changed the
resolutionattribute name totiming_resolutionto comply with TaskJuggler. - ScheduleMixin:
- Updated ScheduleMixin class documentation.
- There are two new read-only attributes called
computed_startandcomputed_end. These attributes will be used in storing of the values calculated by TaskJuggler, and will be used in Gantt Charts if available. - Added
computed_duration.
- Task:
- Arranged the TaskJuggler workflow.
- The task will use the effort > length > duration attributes in to_tjp property.
- Changed the license of Stalker from BSD-2 to LGPL 2.1. Any version previous to 0.2.0.a9 will be still BSD-2 and any version from and including 0.2.0.a9 will be distributed under LGPL 2.1 license.
- Added new types of classes called Schedulers which are going to be used in scheduling the tasks.
- Added TaskJugglerScheduler, it uses the given project and schedules its tasks.
0.2.0.a8¶
- TagSelect now can be filled by setting its
valueattribute (Ex: TagSelect.set(‘value’, data)) - Added a new method called
is_rootto Task class. It is true for tasks where there are no parents. - Added a new attribute called
usersto the Department class which is a synonym for themembersattribute. - Task:
- Task class is now preventing one of the dependents to be set as the parent of a task.
- Task class is now preventing one of the parents to be set as the one of the dependents of a task.
- Fixed
autoflushbugs in Task class.
- Fixed admin users department initialization.
- Added
thumbnailattribute to the SimpleEntity class which is a reference to a Link instance, showing the path of the thumbnail. - Fixed Circular Dependency bug in Task class, where a parent of a newly created task is depending to another task which is set as the dependee for this newly created task (T1 -> T3 -> T2 -> T1 (parent relation) -> T3 -> T2 etc.).
0.2.0.a7¶
Changed these default setting value names to corresponding new names:
DEFAULT_TASK_DURATION->TASK_DURATIONDEFAULT_TASK_PRIORITY->TASK_PRIORITYDEFAULT_VERSION_TAKE_NAME->VERSION_TAKE_NAMEDEFAULT_TICKET_LABEL->TICKET_LABELDEFAULT_ACTIONS->ACTIONSDEFAULT_BG_COLOR->BG_COLORDEFAULT_FG_COLOR->FG_COLOR
stalker.conf.defaults:
- Added default settings for project working hours (
WORKING_HOURS,DAY_ORDER,DAILY_WORKING_HOURS) - Added a new variable for setting the task time resolution called
TIME_RESOLUTION.
- Added default settings for project working hours (
stalker.models.project.Project:
Removed Project.project_tasks attribute, use Project.tasks directly to get all the Tasks in that project. For root task you can do a quick query:
Task.query.filter(Task.project==proj_id).filter(Task.parent==None).all()
This will also return the Assets, Sequences and Shots in that project, which are also Tasks.
Users are now assigned to Projects by appending them to the Project.users list. This is done in this way to allow a reduced list of resources to be shown in the Task creation dialogs.
Added a new helper class for Project working hour management, called WorkingHours.
Added a new attribute to Project class called
working_hourswhich holds stalker.models.project.WorkingHours instances to manage the Project working hours. It will directly be passed to TaskJuggler.
stalker.models.task.Task:
- Removed the Task.task_of attribute, use Task.parent to get the owner of this Task.
- Task now has two new attributes called Task.parent and Task.children which allow more complex Task-to-Task relation.
- Secondary table name for holding Task to Task dependency relation is
renamed from
Task_TaskstoTask_Dependencies. - check_circular_dependency function is now accepting a third argument which is the name of the attribute to be investigated for circular relationship. It is done in that way to be able to use the same function in searching for circular relations both in parent/child and depender/dependee relations.
ScheduleMixin:
- Added a new attribute to ScheduleMixin for time resolution adjustment. Default value is 1 hour and can be set with stalker.conf.defaults.TIME_RESOLUTION. Any finer time than the resolution is rounded to the closest multiply of the resolution. It is possible to set it from microseconds to years. Although 1 hour is a very reasonable resolution which is also the default resolution for TaskJuggler.
- ScheduleMixin now uses datetime.datetime for the start and end attributes.
- Renamed the
start_dateattribute tostart. - Renamed the
end_dateattribute toend
Removed the TaskableEntity.
Asset, Sequence and Shot classes are now derived from Task class allowing more complex Task relation combined with the new parent/child relation of Tasks. Use Asset.children or Asset.tasks to reach the child tasks of that asset (same with Sequence and Shot classes).
stalker.models.shot.Shot:
- Removed the sequence and introduced sequences attribute in Shot class. Now one shot can be in more than one Sequence. Allowing more complex Shot/Sequence relations..
- Shots can now be created without a Sequence instance. The sequence attribute is just used to group the Shots.
- Shots now have a new attribute called
scenes, holding Scene instances. It is created to group same shots occurring in the same scenes.
In tests all the Warnings are now properly handled as Warnings.
stalker.models.ticket.Ticket:
- Ticket instances are now tied to Projects and it is now possible to create Tickets without supplying a Version. They are free now.
- It is now possible to link any SimpleEntity to a Ticket.
- The Ticket Workflow is now fully customizable. Use stalker.conf.defaults.TICKET_WORKFLOW dictionary to define the workflow and stalker.conf.defaults.TICKET_STATUS_ORDER for the order of the ticket statuses.
Added a new class called
Sceneto manage Shots with another property.Removed the
output_pathattribute in FilenameTemplate class.Grouped the templates for each entity under a directory with the entity name.
0.2.0.a6¶
- Users now can have more than one Department.
- User instances now have two new properties for getting the user tickets (User.tickets) and the open tickets (User.open_tickets).
- New shortcut Task.project returns the Task.task_of.project value.
- Shot and Asset creation dialogs now automatically updated with the given Project instance info.
- User overview page is now reflection the new design.
0.2.0.a5¶
The
codeattribute of the SimpleEntity is now introduced as a separate mixin. To let it be used by the classes it is really needed.The
querymethod is now converted to a property so it is now possible to use it like a property as in the SQLAlchemy.orm.Session as shown below:from stalker import Project Project.query.all() # instead of Project.query().all()
ScheduleMixin.due_date is renamed to ScheduleMixin.end_date.
Added a new class attribute to SimpleEntity called
__auto_name__which controls the naming of the instances and instances derived from SimpleEntity. If__auto_name__is set to True thenameattribute of the instance will be automatically generated and it will have the following format:{{ClassName}}_{{UUID4}}
Here are a couple of naming examples:
Ticket_74bb46b0-29de-4f3e-b4e6-8bcf6aed352d Version_2fa5749e-8cdb-4887-aef2-6d8cec6a4faa
Fixed an autoflush issue with SQLAlchemy in StatusList class. Now the status column is again not nullable in StatusMixin.
0.2.0.a4¶
Added a new class called EntityType to hold all the available class names and capabilities.
Version class now has a new attribute called
inputsto hold the inputs of the current Version instance. It is a list of Link instances.FilenameTemplate classes
pathandfilenameattributes are no more converted to string, so given a non string value will raise TypeError.Structure.custom_template now only accepts strings and None, setting it to anything else will raise a TypeError.
Two Type’s for FilenameTemplate’s are created by default when initializing the database, first is called “Version” and it is used to define FilenameTemplates which are used for placing Version source files. The second one is called “Reference” and it is used when injecting references to a given class. Along with the FilenameTemplate.target_entity_type this will allow one to create two different FilenameTemplates for one class:
# first get the Types vers_type = Type.query()\ .filter_by(target_entity_type="FilenameTemplate")\ .filter_by(type="Version")\ .first() ref_type = Type.query()\ .filter_by(target_entity_type="FilenameTemplate")\ .filter_by(type="Reference")\ .first() # lets create a FilenameTemplate for placing Asset Version files. f_ver = FilenameTemplate( target_entity_type="Asset", type=vers_type, path="Assets/{{asset.type.code}}/{{asset.code}}/{{task.type.code}}", filename="{{asset.code}}_{{version.take_name}}_{{task.type.code}}_v{{'%03d'|version.version_number}}{{link.extension}}" output_path="{{version.path}}/Outputs/{{version.take_name}}" ) # and now define a FilenameTemplate for placing Asset Reference files. # no need to have an output_path here... f_ref = FilenameTemplate( target_entity_type="Asset", type=ref_type, path="Assets/{{asset.type.code}}/{{asset.code}}/References", filename="{{link.type.code}}/{{link.id}}{{link.extension}}" )
stalker.db.register() now accepts only real classes instead of class names. This way it can store more information about classes.
Status.bg_color and Status.fg_color attributes are now simple integers. And the Color class is removed.
StatusMixin.status is now a ForeignKey to a the Statuses table, thus it is a real Status instance instead of an integer showing the index of the Status in the related StatusList. This way the Status of the object will not change if the content of the StatusList is changed.
Added new attribute Project.project_tasks which holds all the direct or indirect Tasks created for that project.
User.login_name is renamed to User.login.
Removed the
first_name,last_nameandinitialsattributes from User class. Now thenameandcodeattributes are going to be used, thus thenameattribute is no more the equivalent ofloginand thecodeattribute is doing what wasinitialsdoing previously.
0.2.0.a3¶
- Status class now has two new attributes
bg_colorandfg_colorto hold the UI colors of the Status instance. The colors are Color instances.
0.2.0.a2¶
SimpleEntity now has an attribute called
generic_datawhich can hold any kind ofSOMobject inside and it is a list.Changed the formatting rules for the
namein SimpleEntity class, now it can start with a number, and it is not allowed to have multiple whitespace characters following each other.The
sourceattribute in Version is renamed tosource_file.The
versionattribute in Version is renamed toversion_number.The
takeattribute in Version is renamed totake_name.The
version_numberin Version is now generated automatically if it is skipped or given as None or it is too low where there is already a version number for the same Version series (means attached to the same Task and has the sametake_name.Moved the User class to
stalker.models.auth module.Removed the
stalker.ext.authmodule because it is not necessary anymore. Thus the User now handles all the password conversions by itself.PermissionGroupis renamed back to Group again to match with the general naming of the authorization concept.Created two new classes for the Authorization system, first one is called Permission and the second one is a Mixin which is called ACLMixin which adds ACLs to the mixed in class. For now, only the User and Group classes are mixed with this mixin by default.
The declarative Base class of SQLAlchemy is now created by binding it to a ORMClass (a random name) which lets all the derived class to have a method called
querywhich will bypass the need of callingDBSession.query(class_)but instead just callclass_.query():from stalker.models.auth import User user_1 = User.query().filter_by(name='a user name').first()
0.2.0.a1¶
Changed the
db.setuparguments. It is now accepting a dictionary instead of just a string to comply with the SQLAlchemy scaffold and this dictionary should contain keys for the SQLAlchemy engine setup. There is another utility that comes with Pyramid to setup the database under the scripts folder, it is also working without any problem with stalker.db.The
sessionvariable is renamed toDBSessionand is now a scopped session, so there is no need to useDBSession.commitit will be handled by the system it self.Even though the
DBSessionis using the Zope Transaction Manager extension normally, in the database tests no extension is used because the transaction manager was swallowing all errors and it was a little weird to try to catch this errors out of thewithblock.Refactored the code, all the models are now in separate python files, but can be directly imported from the main stalker module as shown:
from stalker import User, Department, Task
By using this kind of organization, both development and usage will be eased out.
task_ofnow only accepts TaskableEntity instances.Updated the examples. It is now showing how to extend SOM correctly.
Updated the references to the SOM classes in docstrings and rst files.
Removed the
Reviewclass. And introduced the much handier Ticket class. Now reviewing a data is the process of creating Ticket’s to that data.The database is now initialized with a StatusList and a couple of Statuses appropriate for Ticket instances.
The database is now initialized with two Type instances (‘Enhancement’ and ‘Defect’) suitable for Ticket instances.
StatusMixin now stores the status attribute as an Integer showing the index of the Status in the
status_listattribute but when asked for the value ofStatusMixin.statusattribute it will return a proper Status instance and the attribute can be set with an integer or with a proper Status instance.