diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9ea90fa..7f969cb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,25 @@ Stalker Changes =============== +0.2.24.2 +======== + +This release is mainly related to cleaning up some complains that arose while +testing the library. + +* **Fix:** Fixed two tests which are testing the ``stalker.db`` module to + check the system against the correct Alembic revision id. + +* **Update:** Removed the unnecessary ``pytest.skip`` commands in the + ``Repository`` class tests which were shipping the tests if the OS is not + Windows. But they should work fine under all OSes. + +* **Update:** Updated all class documentation and removed the cancellation + character (which was apparently not good for PEP8) + +* **Fix:** Fixed some warnings about some regular expressions. + + 0.2.24.1 ======== diff --git a/stalker/__init__.py b/stalker/__init__.py index b1f65df..9f3eba4 100644 --- a/stalker/__init__.py +++ b/stalker/__init__.py @@ -23,7 +23,7 @@ import sys -__version__ = '0.2.24.1' +__version__ = '0.2.24.2' __title__ = "stalker" __description__ = 'A Production Asset Management (ProdAM) System' diff --git a/stalker/db/__init__.py b/stalker/db/__init__.py index f0d43b1..3463d3c 100644 --- a/stalker/db/__init__.py +++ b/stalker/db/__init__.py @@ -483,8 +483,8 @@ def create_entity_statuses(entity_type='', status_names=None, def register(class_): """Registers the given class to the database. - It is mainly used to create the :class:`.Action`\ s needed for the - :class:`.User`\ s and :class:`.Group`\ s to be able to interact with the + It is mainly used to create the :class:`.Action` s needed for the + :class:`.User` s and :class:`.Group` s to be able to interact with the given class. Whatever class you have created needs to be registered. Example, lets say that you have a data class which is specific to your @@ -510,16 +510,16 @@ class MyDataClass(SimpleEntity): Now because Stalker is using Pyramid authorization mechanism it needs to be able to have an :class:`.Permission` about your new class, so you can - assign this :class;`.Permission` to your :class:`.User`\ s or - :class:`.Group`\ s. So you ned to register your new class with + assign this :class;`.Permission` to your :class:`.User` s or + :class:`.Group` s. So you ned to register your new class with :func:`stalker.db.register` like shown below:: from stalker import db db.register(MyDataClass) This will create the necessary Actions in the 'Actions' table on your - database, then you can create :class:`.Permission`\ s and assign these to - your :class:`.User`\ s and :class:`.Group`\ s so they are Allowed or Denied + database, then you can create :class:`.Permission` s and assign these to + your :class:`.User` s and :class:`.Group` s so they are Allowed or Denied to do the specified Action. :param class_: The class itself that needs to be registered. diff --git a/stalker/models/asset.py b/stalker/models/asset.py index 933b28b..a8ecdd4 100644 --- a/stalker/models/asset.py +++ b/stalker/models/asset.py @@ -30,13 +30,13 @@ class Asset(Task, CodeMixin): """The Asset class is the whole idea behind Stalker. - *Assets* are containers of :class:`.Task`\ s. And :class:`.Task`\ s are the + *Assets* are containers of :class:`.Task` s. And :class:`.Task` s are the smallest meaningful part that should be accomplished to complete the :class:`.Project`. An example could be given as follows; you can create an asset for one of the characters in your project. Than you can divide this character asset in - to :class:`.Task`\ s. These :class:`.Task`\ s can be defined by the type of + to :class:`.Task` s. These :class:`.Task` s can be defined by the type of the :class:`.Asset`, which is a :class:`.Type` object created specifically for :class:`.Asset` (ie. has its :attr:`.Type.target_entity_type` set to "Asset"), diff --git a/stalker/models/auth.py b/stalker/models/auth.py index fd0d9f6..5c5dcad 100644 --- a/stalker/models/auth.py +++ b/stalker/models/auth.py @@ -231,7 +231,7 @@ def __eq__(self, other): class Group(Entity, ACLMixin): """Creates groups for users to be used in authorization system. - A Group instance is nothing more than a list of :class:`.User`\ s created + A Group instance is nothing more than a list of :class:`.User` s created to be able to assign permissions in a group level. The Group class, as with the :class:`.User` class, is mixed with the @@ -365,7 +365,7 @@ class User(Entity, ACLMixin): should be a list of Department objects. One user can be listed in multiple departments. - :type departments: list of :class:`.Department`\ s + :type departments: list of :class:`.Department` s :param password: it is the password of the user, can contain any character. Stalker doesn't store the raw passwords of the users. To check a stored @@ -382,7 +382,7 @@ class User(Entity, ACLMixin): :param tasks: it is a list of Task objects which holds the tasks that this user has been assigned to - :type tasks: list of :class:`.Task`\ s + :type tasks: list of :class:`.Task` s :param last_login: it is a datetime.datetime object holds the last login date of the user (not implemented yet) @@ -411,7 +411,7 @@ class User(Entity, ACLMixin): back_populates='user', cascade='all, delete-orphan', primaryjoin='Users.c.id==Department_Users.c.uid', - doc="""A list of :class:`.Department`\ s that + doc="""A list of :class:`.Department` s that this user is a part of""" ) @@ -426,7 +426,7 @@ class User(Entity, ACLMixin): back_populates="user", cascade='all, delete-orphan', primaryjoin="Users.c.id==Client_Users.c.uid", - doc="""A list of :class:`.Client`\ s that this user is a part of.""" + doc="""A list of :class:`.Client` s that this user is a part of.""" ) email = Column( @@ -492,7 +492,7 @@ class User(Entity, ACLMixin): "Task", secondary="Task_Resources", back_populates="resources", - doc=""":class:`.Task`\ s assigned to this user. + doc=""":class:`.Task` s assigned to this user. It is a list of :class:`.Task` instances. """ @@ -502,7 +502,7 @@ class User(Entity, ACLMixin): 'Task', secondary='Task_Watchers', back_populates='watchers', - doc=''':class:`.Tasks`\ s that this user is + doc=''':class:`.Tasks` s that this user is assigned as a watcher. It is a list of :class:`.Task` instances. @@ -866,7 +866,7 @@ def _validate_rate(self, key, rate): @property def tickets(self): - """The list of :class:`.Ticket`\ s that this user has. + """The list of :class:`.Ticket` s that this user has. returns a list of :class:`.Ticket` instances which this user is the owner of. @@ -880,7 +880,7 @@ def tickets(self): @property def open_tickets(self): - """The list of open :class:`.Ticket`\ s that this user has. + """The list of open :class:`.Ticket` s that this user has. returns a list of :class:`.Ticket` instances which has a status of `Open` that this user is assigned as the owner. @@ -1044,7 +1044,7 @@ class Role(Entity): .. versionadded 0.2.11: Roles - When :class:`.User`\ s are assigned to a + When :class:`.User` s are assigned to a :class:`.Client`/:class:`.Department`, they also can be assigned to a role for that client/department. diff --git a/stalker/models/budget.py b/stalker/models/budget.py index 43ebdec..99e6035 100644 --- a/stalker/models/budget.py +++ b/stalker/models/budget.py @@ -34,13 +34,13 @@ class Good(Entity, UnitMixin): .. note:: .. versionadded 0.2.20: Client Specific Goods - Clients now can own a list of :class:`.Good`\ s attached to them. - So one can define a list of :class:`.Good`\ s with special prices + Clients now can own a list of :class:`.Good` s attached to them. + So one can define a list of :class:`.Good` s with special prices adjusted for a particular ``Client``, then get them back from the db by - querying the :class:`.Good`\ s those have their ``client`` attribute set + querying the :class:`.Good` s those have their ``client`` attribute set to that particular ``Client`` instance. Removing a ``Good`` from a :class:`.Client` will not delete it from the database, but deleting a - :class:`.Client` will also delete the ``Good``\ s attached to that + :class:`.Client` will also delete the ``Good`` s attached to that particular :class:`.Client`. .. :: @@ -464,7 +464,7 @@ class Invoice(Entity, AmountMixin, UnitMixin): """Holds information about invoices Invoices are part of :class:`.Budgets`. The main purpose of invoices are - to track the :class:`.Payment`\ s. It is a very primitive entity. It is + to track the :class:`.Payment` s. It is a very primitive entity. It is by no means designed to hold real financial information (at least for now). :param client: The :class:`.Client` instance that shows the payer for diff --git a/stalker/models/client.py b/stalker/models/client.py index 5868b16..7f49ca7 100644 --- a/stalker/models/client.py +++ b/stalker/models/client.py @@ -41,13 +41,13 @@ class Client(Entity): .. note:: .. versionadded 0.2.20: Client Specific Goods - Clients now can own a list of :class:`.Good`\ s attached to them. - So one can define a list of class:`.Good`\ s with special prices + Clients now can own a list of :class:`.Good` s attached to them. + So one can define a list of class:`.Good` s with special prices adjusted for a particular ``Client``, then get them back from the db by - querying the :class:`.Good`\ s those have their ``client`` attribute set + querying the :class:`.Good` s those have their ``client`` attribute set to that particular ``Client`` instance. Removing a ``Good`` from a :class:`.Client` will not delete it from the database, but deleting a - :class:`.Client` will also delete the ``Good``\ s attached to that + :class:`.Client` will also delete the ``Good`` s attached to that particular :class:`.Client`. .. :: @@ -62,13 +62,13 @@ class Client(Entity): without any user in it. But this parameter should be a list of User objects. - :type users: list of :class:`.User`\ s + :type users: list of :class:`.User` s :param projects: it can be an empty list, so one client can be created without any project in it. But this parameter should be a list of Project objects. - :type projects: :param type: list of :class:`.Project`\ s + :type projects: :param type: list of :class:`.Project` s """ diff --git a/stalker/models/entity.py b/stalker/models/entity.py index b22a1ff..b6056dc 100644 --- a/stalker/models/entity.py +++ b/stalker/models/entity.py @@ -409,11 +409,11 @@ def _format_nice_name(cls, nice_name_in): # remove multiple spaces nice_name_in = re.sub(r'[\s]+', ' ', nice_name_in) - ## replace camel case letters + # # replace camel case letters # nice_name_in = re.sub(r"(.+?[a-z]+)([A-Z])", r"\1_\2", nice_name_in) # replace white spaces and dashes with under score - nice_name_in = re.sub("([\s\-])+", r"_", nice_name_in) + nice_name_in = re.sub("([ -])+", r"_", nice_name_in) # remove multiple underscores nice_name_in = re.sub(r"([_]+)", r"_", nice_name_in) @@ -430,7 +430,7 @@ def nice_name(self): it is always lower case. """ # also set the nice_name - #if self._nice_name is None or self._nice_name == "": + # if self._nice_name is None or self._nice_name == "": self._nice_name = self._format_nice_name(self.name) return self._nice_name @@ -626,7 +626,7 @@ class Entity(SimpleEntity): "Note", secondary="Entity_Notes", backref="entities", - doc="""All the :class:`.Notes`\ s attached to this entity. + doc="""All the :class:`.Notes` s attached to this entity. It is a list of :class:`.Note` instances or an empty list, setting it to None will raise a TypeError. diff --git a/stalker/models/format.py b/stalker/models/format.py index 0cf9f3c..4b8dfed 100644 --- a/stalker/models/format.py +++ b/stalker/models/format.py @@ -29,7 +29,7 @@ class ImageFormat(Entity): - """Common image formats for the :class:`.Project`\ s. + """Common image formats for the :class:`.Project` s. :param width: The width of the format, it cannot be zero or negative, if a float number is given it will be converted to integer diff --git a/stalker/models/message.py b/stalker/models/message.py index 6171e46..e032974 100644 --- a/stalker/models/message.py +++ b/stalker/models/message.py @@ -36,7 +36,7 @@ class Message(Entity, StatusMixin): :param from: the :class:`.User` object sending the message. - :param to: the list of :class:`.User`\ s to receive this message + :param to: the list of :class:`.User` s to receive this message :param subject: the subject of the message diff --git a/stalker/models/project.py b/stalker/models/project.py index fc67021..928017f 100644 --- a/stalker/models/project.py +++ b/stalker/models/project.py @@ -151,11 +151,11 @@ class Project(Entity, ReferenceMixin, StatusMixin, DateRangeMixin, CodeMixin): **Deleting a Project** Deleting a :class:`.Project` instance will cascade the delete operation to - all the :class:`.Task`\ s related to that particular Project and it will - cascade the delete operation to :class:`.TimeLog`\ s, :class:`.Version`\ s, - :class:`.Link`\ s and :class:`.Review`\ s etc.. So one can delete a + all the :class:`.Task` s related to that particular Project and it will + cascade the delete operation to :class:`.TimeLog` s, :class:`.Version` s, + :class:`.Link` s and :class:`.Review` s etc.. So one can delete a :class:`.Project` instance without worrying about the non-project related - data like :class:`.User`\ s or :class:`.Department`\ s to be deleted. + data like :class:`.User` s or :class:`.Department` s to be deleted. :param clients: The clients which the project is affiliated with. Default value is an empty list. @@ -191,7 +191,7 @@ class Project(Entity, ReferenceMixin, StatusMixin, DateRangeMixin, CodeMixin): to be a stereo 3D project, anything given as the argument will be converted to True or False. Default value is False. - :param users: A list of :class:`.User`\ s holding the users in this + :param users: A list of :class:`.User` s holding the users in this project. This will create a reduced or grouped list of studio workers and will make it easier to define the resources for a Task related to this project. The default value is an empty list. @@ -525,7 +525,7 @@ def percent_complete(self): @property def open_tickets(self): - """The list of open :class:`.Ticket`\ s in this project. + """The list of open :class:`.Ticket` s in this project. returns a list of :class:`.Ticket` instances which has a status of `Open` and created in this project. diff --git a/stalker/models/review.py b/stalker/models/review.py index 4116cf8..7af3122 100644 --- a/stalker/models/review.py +++ b/stalker/models/review.py @@ -317,7 +317,7 @@ class Daily(Entity, StatusMixin, ProjectMixin): The main purpose of a ``Daily`` is to gather a group of :class:`.Link` instances and introduce a simple way of presenting them as a group. - :class:`.Note`\ s created during a Daily session can be directly stored + :class:`.Note` s created during a Daily session can be directly stored both in the :class:`.Link` and the :class:`.Daily` instances and a *join* will reveal which :class:`.Note` is created in which :class:`.Daily`. """ @@ -404,8 +404,8 @@ class DailyLink(Base): doc="""stalker.models.link.Link instances related to the Daily instance. - Attach the same :class:`.Link`\ s that are linked as an output to a - certain :class:`.Version`\ s instance to this attribute. + Attach the same :class:`.Link` s that are linked as an output to a + certain :class:`.Version` s instance to this attribute. This attribute is an **association_proxy** so and the real attribute that the data is related to is the :attr:`.link_relations` attribute. diff --git a/stalker/models/scene.py b/stalker/models/scene.py index 35a6477..a112ca4 100644 --- a/stalker/models/scene.py +++ b/stalker/models/scene.py @@ -36,8 +36,8 @@ class Scene(Entity, ProjectMixin, CodeMixin): shots taking place in the same set configuration can be grouped together by using Scenes. - You can not replace :class:`.Sequence`\ s with Scenes, because Scene - instances doesn't have some key features that :class:`.Sequence`\ s have. + You can not replace :class:`.Sequence` s with Scenes, because Scene + instances doesn't have some key features that :class:`.Sequence` s have. A Scene needs to be tied to a :class:`.Project` instance, so it is not possible to create a Scene without a one. @@ -52,7 +52,7 @@ class Scene(Entity, ProjectMixin, CodeMixin): "Shot", secondary='Shot_Scenes', back_populates="scenes", - doc="""The :class:`.Shot`\ s that is related with this Scene. + doc="""The :class:`.Shot` s that is related with this Scene. It is a list of :class:`.Shot` instances. """ diff --git a/stalker/models/sequence.py b/stalker/models/sequence.py index af72631..65b0dee 100644 --- a/stalker/models/sequence.py +++ b/stalker/models/sequence.py @@ -54,7 +54,7 @@ class Sequence(Task, CodeMixin): "Shot", secondary='Shot_Sequences', back_populates="sequences", - doc="""The :class:`.Shot`\ s assigned to this Sequence. + doc="""The :class:`.Shot` s assigned to this Sequence. It is a list of :class:`.Shot` instances. """ diff --git a/stalker/models/shot.py b/stalker/models/shot.py index 03a85fb..570343b 100644 --- a/stalker/models/shot.py +++ b/stalker/models/shot.py @@ -127,7 +127,7 @@ class Shot(Task, CodeMixin): :type project: :class:`.Project` - :param sequences: This is a list of :class:`.Sequence`\ s that this shot is + :param sequences: This is a list of :class:`.Sequence` s that this shot is assigned to. A Shot can be created without having a Sequence instance. :type sequences: list of :class:`.Sequence` diff --git a/stalker/models/structure.py b/stalker/models/structure.py index 9995ac2..1b1f2e1 100644 --- a/stalker/models/structure.py +++ b/stalker/models/structure.py @@ -45,11 +45,11 @@ class Structure(Entity): Every line of this rendered template will represent a folder and Stalker will create these folders on the attached :class:`.Repository`. - :param templates: A list of :class:`.FilenameTemplate`\ s which defines a + :param templates: A list of :class:`.FilenameTemplate` s which defines a specific template for the given - :attr:`.FilenameTemplate.target_entity_type`\ s. + :attr:`.FilenameTemplate.target_entity_type` s. - :type templates: list of :class:`.FilenameTemplate`\ s + :type templates: list of :class:`.FilenameTemplate` s :param str custom_template: A string containing several lines of folder names. The folders are relative to the :class:`.Project` root. It can @@ -85,20 +85,20 @@ class Structure(Entity): {{task_root}} The above example has gone far beyond deep than it is needed, where it - started to define paths for :class:`.Asset`\ s. Even it is possible to + started to define paths for :class:`.Asset` s. Even it is possible to create a :class:`.Project` structure like that, in general it is unnecessary. Because the above folders are going to be created but they are probably going to be empty for a while, because the - :class:`.Asset`\ s are not created yet (or in fact no - :class:`.Version`\ s are created for the :class:`.Task`\ s). Anyway, it + :class:`.Asset` s are not created yet (or in fact no + :class:`.Version` s are created for the :class:`.Task` s). Anyway, it is much suitable and desired to create this details by using :class:`.FilenameTemplate` objects. Which are specific to certain - :attr:`.FilenameTemplate.target_entity_type`\ s. And by using the + :attr:`.FilenameTemplate.target_entity_type` s. And by using the :attr:`.Structure.custom_template` attribute, Stalker can not place any source or output file of a :class:`.Version` in the :class:`.Repository` - where as it can by using :class:`.FilenameTemplate`\ s. + where as it can by using :class:`.FilenameTemplate` s. - But for certain types of :class:`.Task`\ s it is may be good to + But for certain types of :class:`.Task` s it is may be good to previously create the folder structure just because in certain environments (programs) it is not possible to run a Python code that will place the file in to the Repository like in Photoshop. @@ -110,7 +110,7 @@ class Structure(Entity): (__strictly_typed__ = True). By giving a ``type`` to the :class:`.Structure`, you can create one structure for **Commercials** and another project structure for **Movies** and another one for **Print** - projects etc. and can reuse them with new :class:`.Project`\ s. + projects etc. and can reuse them with new :class:`.Project` s. """ #__strictly_typed__ = True diff --git a/stalker/models/task.py b/stalker/models/task.py index cba4c69..4db1483 100644 --- a/stalker/models/task.py +++ b/stalker/models/task.py @@ -354,7 +354,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D Stalker uses TaskJuggler for task scheduling. After defining all the tasks, Stalker will convert them to a single tjp file along with the recorded - :class:`.TimeLog`\ s :class:`.Vacation`\ s etc. and let TaskJuggler to + :class:`.TimeLog` s :class:`.Vacation` s etc. and let TaskJuggler to solve the scheduling problem. During the auto scheduling (with TaskJuggler), the calculation of task @@ -723,7 +723,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D :class:`.Sequences` or anything that is derived from Task class) in the :class:`.Project` that this task belongs to. This property has been added to make it easier to write custom template codes for - Project :class:`.Structure`\ s. + Project :class:`.Structure` s. The :attr:`.path` attribute is a repository relative path, where as the :attr:`.absolute_path` is the full path and includs the OS @@ -739,7 +739,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D :class:`.BugdetEntry` instances from the tasks that are related to the same :class:`.Good` and because the Goods are defining the cost and MSRP of different things, it is possible to create BudgetEntries and thus - :class;`.Budget`\ s with this information. + :class;`.Budget` s with this information. **Arguments** @@ -762,14 +762,14 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D :type parent: :class:`.Task` - :param depends: A list of :class:`.Task`\ s that this :class:`.Task` is + :param depends: A list of :class:`.Task` s that this :class:`.Task` is depending on. A Task can not depend to itself or any other Task which are already depending to this one in anyway or a CircularDependency error will be raised. :type depends: [:class:`.Task`] - :param resources: The :class:`.User`\ s assigned to this :class:`.Task`. A + :param resources: The :class:`.User` s assigned to this :class:`.Task`. A :class:`.Task` without any resource can not be scheduled. :type resources: [:class:`.User`] @@ -913,7 +913,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D back_populates='task', cascade="all, delete-orphan", primaryjoin='Tasks.c.id==Task_Dependencies.c.task_id', - doc="""A list of :class:`.Task`\ s that this one is depending on. + doc="""A list of :class:`.Task` s 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 @@ -926,7 +926,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D back_populates='depends_to', cascade="all, delete-orphan", primaryjoin='Tasks.c.id==Task_Dependencies.c.depends_to_id', - doc="""A list of :class:`.Task`\ s that this one is being depended by. + doc="""A list of :class:`.Task` s that this one is being depended by. A CircularDependencyError will be raised when the task dependency creates a circular dependency which means it is not allowed to create @@ -941,7 +941,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D primaryjoin="Tasks.c.id==Task_Resources.c.task_id", secondaryjoin="Task_Resources.c.resource_id==Users.c.id", back_populates="tasks", - doc="The list of :class:`.User`\ s assigned to this Task." + doc="The list of :class:`.User` s assigned to this Task." ) alternative_resources = relationship( @@ -950,7 +950,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D primaryjoin="Tasks.c.id==Task_Alternative_Resources.c.task_id", secondaryjoin="Task_Alternative_Resources.c.resource_id==Users.c.id", backref="alternative_resource_in_tasks", - doc="The list of :class:`.User`\ s assigned to this Task as an " + doc="The list of :class:`.User` s assigned to this Task as an " "alternative resource." ) @@ -975,7 +975,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D primaryjoin='Tasks.c.id==Task_Watchers.c.task_id', secondaryjoin='Task_Watchers.c.watcher_id==Users.c.id', back_populates='watching', - doc="The list of :class:`.User`\ s watching this Task." + doc="The list of :class:`.User` s watching this Task." ) _responsible = relationship( @@ -984,7 +984,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D primaryjoin='Tasks.c.id==Task_Responsible.c.task_id', secondaryjoin='Task_Responsible.c.responsible_id==Users.c.id', back_populates='responsible_of', - doc="The list of :class:`.User`\ s responsible from this Task." + doc="The list of :class:`.User` s responsible from this Task." ) priority = Column( @@ -1018,7 +1018,7 @@ class Task(Entity, StatusMixin, DateRangeMixin, ReferenceMixin, ScheduleMixin, D primaryjoin="Tasks.c.id==Task_Computed_Resources.c.task_id", secondaryjoin="Task_Computed_Resources.c.resource_id==Users.c.id", backref="computed_resource_in_tasks", - doc="A list of :class:`.User`\ s computed by TaskJuggler. It is the " + doc="A list of :class:`.User` s computed by TaskJuggler. It is the " "result of scheduling." ) diff --git a/stalker/models/type.py b/stalker/models/type.py index 8be66c7..51aa16e 100644 --- a/stalker/models/type.py +++ b/stalker/models/type.py @@ -60,10 +60,10 @@ class Type(Entity, TargetEntityTypeMixin, CodeMixin): Type(name="Commercial", target_entity_type=Project) Type(name="Image", target_entity_type=Link) - By using :class:`.Type`\ s, one can able to sort and group same type of + By using :class:`.Type` s, one can able to sort and group same type of entities. - :class:`.Type`\ s are generally used in :class:`.Structure`\ s. + :class:`.Type` s are generally used in :class:`.Structure` s. :param string target_entity_type: The string defining the target type of this :class:`.Type`. diff --git a/stalker/models/version.py b/stalker/models/version.py index 2844b6c..2279518 100644 --- a/stalker/models/version.py +++ b/stalker/models/version.py @@ -56,7 +56,7 @@ class Version(Link, DAGMixin): For projects those are created prior to Stalker version 0.2.13 and that has a :class:`.Structure` with :class:`.FilenameTemplate` that doesn't include the repository info, it is suggested to update the related - ``FilenameTemplate``\ s to include a the repository info manually. + ``FilenameTemplate`` s to include a the repository info manually. Example: pre 0.2.13 setup: diff --git a/tests/db/test_db.py b/tests/db/test_db.py index b2e8c12..7ca68a7 100644 --- a/tests/db/test_db.py +++ b/tests/db/test_db.py @@ -816,7 +816,7 @@ def test_initialization_of_alembic_version_table(self): sql_query = 'select version_num from "alembic_version"' version_num = \ DBSession.connection().execute(sql_query).fetchone()[0] - assert 'ed0167fff399' == version_num + assert 'bf67e6a234b4' == version_num def test_initialization_of_alembic_version_table_multiple_times(self): """testing if the db.create_alembic_table() will handle initializing @@ -827,7 +827,7 @@ def test_initialization_of_alembic_version_table_multiple_times(self): sql_query = 'select version_num from "alembic_version"' version_num = \ DBSession.connection().execute(sql_query).fetchone()[0] - assert 'ed0167fff399' == version_num + assert 'bf67e6a234b4' == version_num DBSession.remove() db.init() diff --git a/tests/models/test_repository.py b/tests/models/test_repository.py index 897fd1c..ca4db0d 100644 --- a/tests/models/test_repository.py +++ b/tests/models/test_repository.py @@ -827,10 +827,6 @@ def test_is_in_repo_returns_True_if_the_given_windows_reverse_path_is_in_this_re def test_is_in_repo_is_case_insensitive_under_windows(self): """testing if is_in_repo is case-insensitive under windows """ - import platform - if platform.system() != "Windows": - pytest.skip("Test this only under Windows!") - self.test_repo.windows_path = 'T:/Stalker_Projects' test_windows_path_reverse = 't:\\stalKer_ProjectS\\sErO\\task1\\' \ 'Task2\\Some_file.ma' @@ -1041,10 +1037,6 @@ def test_find_repo_is_case_insensitive_under_windows(self): """testing if the find_repo class method is case-insensitive under windows """ - import platform - if platform.system() != "Windows": - pytest.skip("Test this only under Windows!") - from stalker.db.session import DBSession DBSession.add(self.test_repo) DBSession.commit()