updated/fixed tests for stalker.ext.validatedList.ValidatedList
updated a couple of tests to increase tests coverage
stalker.core.models.status.Status class instances now can be compared to string or unicode values
A stalker.core.models.status.Status object in a stalker.core.models.status.StatusList can now be accessed by its name as the index in stalker.core.models.status.StatusList only while getting the item.
Added stalker.core.models.mixin.ScheduleMixin which introduces date variables like, start_date, due_date and duration to the mixed in class.
Removed some parts of the stalker.core.models.project.Project class which are now satisfied by the stalker.core.models.mixin.ScheduleMixin
Improved the implementation of the stalker.db.auth module
removed the stalker.db.__setup__ module which were helping to reference the variables in stalker.db module but it is not needed any more
It is now possible to initialise a stalker.core.models.project.Project object without a stalker.core.models.repository.Repository, stalker.core.models.structure.Structure or an stalker.core.models.imageFormat.ImageFormat or a stalker.core.models.types.ProjectType
Updated the Tutorial
From now on, in a stalker.core.models.entity.SimpleEntity, setting the code attribute to None or empty string will not raise any ValueErrors but will re-initialise the code value from the nice_name attribute.
Implemented stalker.core.models.sequence.Sequence class along with its tests
added stalker.core.models.sequence.Sequence equality tests
improved stalker.core.models.project.Project equality tests
Implemented stalker.core.models.assetBase.AssetBase class along with its tests
The index.rst of the documentation now references the README from the project root.
added the basic implementation of stalker.core.models.task.Task and stalker.core.models.shot.Shot and mapped them very basically to be able to test the dependent classes like stalker.core.models.assetBase.AssetBase and stalker.core.models.sequence.Sequence
Added mappers and tables for stalker.core.models.assetBase.AssetBase
Now all the mixin classes have proper __init__() methods, and in a mixed class, the mixin classes’ __init__() method can be called directly by giving the current object instance (self) like shown below:
class ANewEntity(entity.SimpleEntity, mixin.StatusMixin): def __init__(self, **kwargs): super(ANewEntity, self).__init__(**kwargs) mixin.StatusMixin.__init__(self, **kwargs)and it can be repeated for any number of mixins in class inheritance path
Added the CHANGELOG to the documentation, and updated all formating of the mentioned references inside the file.
removed the stalker.core.models.entity.StatusedEntity and its tests, with the introduction of stalker.core.models.mixin.StatusMixin, it is not necessary any more
added camera_lens.py to the examples, which shows how to extend SOM in its very basic form, also added tests testing this example
changed the database uri for the DatabaseTester, it now uses an in memory SQLite database instead a file based one.
Updated the version numbers in the roadmap
Added last_login attribute to stalker.core.models.user.User class tables and mapped it
because it was taking too much space in the diffs the VUE file which shows the design sketches has been removed from the trunk
added the stalker.ext.validatedList.ValidatedList class which is a list derivative that accepts only one type of object.
these SOM classes listed below uses stalker.ext.validatedList.ValidatedList in their list attributes requiring specific types of objects to be assigned:
added tests of the stalker.core.models.project.Project class
completed the first implementation of the stalker.core.models.project.Project class
to be able to use assertIsInstance method of mocker.MockerTestCase all the unittest.TestCase test classes are converted to mocker.MockerTestCase
changed the design of the stalker.db.mixins.ReferenceMixin.setup and stalker.db.mixins.StatusMixin.setup to organise the mixin classes’ database setup helper functions, now they are converted to classes with a classmethod called stalker.db.mixin.ReferenceMixinDB.setup() doing all the functionality of the previous setup function and placed them under the stalker.db.mixin module.
added persistence tests for stalker.core.models.project.Project
fixed secondary table generation for stalker.core.models.mixin.ReferenceMixin, the table is now created only if it doesn’t exists already, and it is retrieved from stalker.db.metadata if it exists
- changed the arguments of the stalker.db.mixins.ReferenceMixin.setup() function, to allow carrying the data from one to the next mixin (this part still needs a lot of attention)
- removed the unnecessary statusedEntity_statuses secondary table, because one stalker.core.models.entity.StatusedEntity owns just one stalker.core.models.status.StatusList its a many2one relation, so no need to have a secondary table
- introduced the stalker.core.models.mixin.StatusMixin (will replace StatusedEntity soon)
- Added a new example for the usage of stalker.core.models.mixin.StatusMixin
- Updated the stalker.db.mixins.ReferenceMixin.setup() function, now it takes three arguments, the class, the table and the mapper_options dictionary.
Removed the included tests from the egg build
- Added/fixed equality and inequality operators for classes:
- stalker.core.models.department.Department
- stalker.core.models.entity.StatusedEntity
stalker.core.models.entity.SimpleEntity now has a **kwargs in the __init__() so it doesn’t give TypeError for extra keywords
added stalker.core.models.entity.EntityMeta metaclass which adds entity_type attribute and sets its value to the unicode version of the name of the class
the stalker.core.models.entity.SimpleEntity uses the stalker.core.models.entity.EntityMeta metaclass to automatically add all the entity_type attribute to all the derived classes
all the mappers now uses the ClassName.entity_type class attribute as the polymorphic discriminator (polymorphic identity)
instead of LBYL moving toward EAFP idiom for all the models in the stalker.core
stalker.core.models.status.StatusList now supports indexing
stalker.core.models.status.StatusList now has an target_entity_type attribute which accepts strings with the class name and shows the compatible class of this stalker.core.models.status.StatusList
stakler.core.models.status.StatusList.__eq__() now checks for the target_entity_type also
stalker.core.models.status.StatusedEntity now checks for the given stalker.core.models.StatusList.target_entity_type for compability with the current class
All the validation methods in the stalker.core.models now has the validate word in their name instead of check
- Little fixes:
the mapper of stalker.core.models.types.TypeTemplate was trying to setup a synonym to a parameter with the same name (file_code)
- stalker.core.models.user.User classes _sequence_lead
attribute renamed to _sequences_lead
Added persistence tests for stalker.core.models.entity.StatusedEntity
Added stalker.utils.path_to_exec() which converts the given module full paths to an executable python code which imports the given python object to the current namespace
Added entity_types table to hold the possible entity types in Stalker. The content of the table comes from the stalker.conf.defaults.CORE_MODEL_CLASSES list. And possibly going to be extended by the users.
Added stalker.db.__setup__.__fill_entity_types_table__() which fills the entity_types table with default values.
stalker.core.models.user.User class now has initials attribute, which is automatically calculated from the first and last name if there is no one given.
Atarted developing the stalker.core.models.message.Message class
Added the stalker.core.models.mixin module which holds the common mixins
Added the stalker.core.models.mixin.ReferenceMixin class which gives reference abilities to mixed in classes
Added the database part of the stalker.core.models.mixin.ReferenceMixin. Now it is possible to create a new type of entity and mix it with ReferenceMixin and also persist it in the database. But it needs a lot of effort before to have something usable.
Added examples module, which holds usage examples and recipes
Added an example about how to create a new mixed in entity type for SOM.
Updated the Tutorial
Added code attribute to stalker.core.models.entity.SimpleEntity
Updated the stalker.core.models.user.User class for the new code attribute, and also updated the tests to add tests for code attribute (simply copied the test code from SimpleEntityTester, bad code repetition, need to change it later, by may be inheriting the test case from the other one)
Updated the database tables and mappers for the new code attribute
Removed the clashing code attribute from stalker.core.models.pipelineStep.PipelineStep class and the tables and mappers.
Added stalker.core.models.note.Note class
Added notes table and a mapper for stalker.core.models.note.Note class
Added note attribute to stalker.core.models.entity.Entity class
Fixed EntityTester in tests
Added __repr__ to entity classes
Added tests for persistence of stalker.core.models.note.Note` class
- Added equality (__eq__) and inequality (__ne__) operators for classes:
- stalker.core.models.user.User
- stalker.core.models.tag.Tag
- stalker.core.models.status.Status
- stalker.core.models.status.StatusList
- stalker.core.models.imageFormat.ImageFormat
- stalker.core.models.repository.Repository
- stalker.core.models.pipelineStep.PipelineStep
- stalker.core.models.structure.Structure
- stalker.core.models.types.AssetType
- stalker.core.models.types.LinkType
- stalker.core.models.entity.TypeEntity
- stalker.core.models.types.ProjectType
stalker.core.models.Status classes’ short_name attribute has been removed, from now on the code attribute will be used, also updated the database tables and mappers
The stalker.core.models.user.User.login_name is now superior to the stalker.core.models.user.User.name attribute, giving both of them as arguments will lead the login_name to be used as both the login_name and the name
- Fixed a couple of documentation errors like:
- Inheritance Diagram had references to modules
- A couple of docstring documentation errors in stalker.core.models.structure.Structure, stalker.core.models.user.User and stalker.core.models.types.TypeTemplate classes
Updated Installation
Added Tutorial page to the documentation
All the classes, functions from SQLAlchemy are now imported to the sqlalchemy namespace, this will let the Sphinx to correctly include classes, functions from Stalker only
Removed the db.meta module, now all the functionalities supplied by stalker.db.meta are supplied by db itself (db.meta.session –> db.session etc.)
Added query variable to stalker.db module so instead of db.session.query now db.query can be used
Updated stalker.db.auth.login_required() decorator function, it now accepts a view function
Added stalker.db.auth.permission_required() decorator function
name attribute of stalker.core.models.entity.SimpleEntity is not any more forced to start with an upper case letter
From now on login_name is now a synonym for name in stalker.core.models.user.User class and just the name attribute is going to be stored in the database
To make things simple all the properties with name type_ is now using the name type even though it is a Python keyword, Python is clever enough to understand what is meant
- Changed the versioning scheme a little bit to follow the setuptools guide
- Persistence tests for Link is now fixed
- Now every table correctly has a primary_key
Added Installation to the documentation
Updated README file for PyPI
Added the package to PyPI
Fixed StatusedEntityTester test suit, now it properly creates mock satlker.coer.models.status.StatusList object for the __eq__ and __ne__ tests
Updated tables and mappers for stalker.core.models.typeEntity.TypeTemplate
Updated mappers for stalker.core.models.typeEntity.AssetType
stalker.core.models.entity.TypeEntity class is moved to entity.py, right beside the other entity classes
typeEntity.py renamed to types.py
Updated simpleEntities table, now the name by itself is not a unique constraint, but added an explicit UniqueConstraint on name and entity_type columns to allow entities with different types to have the same name, also added test for that.
Fixed all the errors in test_db.py, there are only failures left.
Added tests for stalker.core.models.link.Link, all the test are green for stalker.core.models.link.Link except the persistence tests.
- Template class is renamed to TypeTemplate and moved inside stalker.core.models.typeEntity to prevent the name clashing with Jinja2 Template class
- added __eq__ to stalker.core.models.entity.SimpleEntity and still trying to add it to the derived classes
- organised the project structure to conform setup tools for PyPI
- updating the db tests
- stalker.core.models.user.User class is now allowed to have its department to be set None
- organised the existent tests
- added nice_name property to the stalker.core.models.entity.SimpleEntity class
- added tests for stalker.core.models.structure.Structure class
- implemented the stalker.core.models.structure.Structure class
- added last_login attribute to the stalker.core.models.user.User class and added all the tests
- re-introduced the link.Link, which has a general meaning than reference.Reference (I bet it will be reference again tomorrow)
- stalker.models moved to stalker.core.models
- renamed tests/z_db to tests/db, because the sqlalchemy/mocker problem is solved by moving the models to core/models
- improved the stalker.models.template.Template class documentation, and added an example showing the usage of it.
- removed the link.Link and introduced reference.Reference and typeEntity.ReferenceType classes, which I think are more organised then the previous design.
- reorganised the AssetType and ReferenceType objects by introducing the new TypeEntity class and deriving the AssetType and ReferenceType from this class
- added ProjectType class to hold different project types (like Commercial, Film, Still etc., it is different than having a Commercial Structure object)
- removed AssetTemplate and ReferenceTemplate concepts and generalised the Template class by adding a type parameter to it, which accepts TypeEntity and classes derived from TypeEntity.
- added login_required decorator to the stalker.db.auth module, but the implementation is not done yet
- user.User._password is now scrambled, but the password property uses the raw password
- added stalker.db.auth for authentication, removed the db.login function.
- added the error.LoginError exception for login errors
- started to add tests for db.login function
- moved the login function to the db.__init__ to let it used just after setting up the database without importing any new module
- updated the example in the docstring of the template.AssetTemplate
- generalised the Template class. Now every Entity can be assigned to a template, it is not limited with Assets or References.
- entity.SimpleEntity.name now can have white spaces, but not at the beginning or end, just in the middle
- done mapping template.Template class
- trying to create a session system with Beaker, to hold user login information
- done mapping assetType.AssetType class
- done mapping pipelineStep class
- added repositories table and mapper for the repository.Repository class
- added imageFormats table and mapper for the imageFormat.ImageFormat class
- renamed extensions module to ext
- added roadmap to docs
- created the block of database tests
- added stalker.db.meta.__mappers__ list to hold the mappers and use it to check if anything is already mapped
- added tests for db initialisation
- removed the whole stalker.models.unit module from SOM, only TimeUnit was usable in some cases, but in fact it is also not important, the only object using TimeUnit was the Project class and it can go well without it. Don’t need to make things more complex than it needs to be.
- increased the version number to 0.1.0 to follow the stalker roadmap
- the test_db is converted to a proper unittest which is testing all the models one by one
- test/db renamed to test/z_db to let nose run it latest to solve the problem about mocker and sqlalchemy fighting each other.
- Mapping syntax is changed a little bit, now to do the mapping, the <mapper>.setup() function needs to be called to be able to do the mapping any time
- started adding tests for every class in SOM
- in user.User the last_name attribute could be an empty string
- removed SimpleEntity, TaggedEntity and introduced StatusedEntity to make the inheritance clear and let users to find somebody to blame by moving all the audit information to the the SimpleEntity class in which everything is inherited from. Now even a Tag has audit information.
- entity.AuditEntity.created_by can now be None (for now)
- user.User.last_name can now be None, to let users like admin have no last name
- creating tables for catch the general inheritance of the entity classes
- entitiy.SimpleEntity.name’s first letter is not capitalised any more
- department.Department class now accepts Null for lead attribute (for now again)
- started playing with the SQLAlchemy side of the system
- updating the documentation
- AuditEntity now accepts None for updated_by attribute when it an object is created, but sets it to the same value with created_by attribute
started to implement: * a database entry point * a customisable object model and database tables * an automatic mapper to map the objects and tables together according to
user settings
things can change a lot in this phase, I’m just trying to figure out the best possible way to do it.
added a new entity type called TaggedEntity which derives from SimpleEntity, and moved all the tag related attributes of SimpleEntity to TaggedEntity, and all the child classes deriving from SimpleEntity now derives from TaggedEntity, also moved the tests related with tag in SimpleEntity to TaggedEntity.
tag.Tag now derives from the SimpleEntity and doesn’t add any other attribute to its super.
updated tests for tag.Tag
updated docs for TaggedEntity
finished implementing the Department object and its tests
removed the notes attribute from the Entity class
- added the inheritance diagram as an rst page to reference it anywhere needed
- added the empty classes for: * Asset * AssetBase * Booking * Shot * Structure * Template * Version
- added the Department class
- added inheritance diagrams to the autosummary pages of the classes