Skip to content

Commit

Permalink
0.2.24.2
Browse files Browse the repository at this point in the history
========

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.
  • Loading branch information
eoyilmaz committed Jan 2, 2020
1 parent 1207e2c commit a715a97
Show file tree
Hide file tree
Showing 21 changed files with 96 additions and 85 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -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
========

Expand Down
2 changes: 1 addition & 1 deletion stalker/__init__.py
Expand Up @@ -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'
Expand Down
12 changes: 6 additions & 6 deletions stalker/db/__init__.py
Expand Up @@ -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
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions stalker/models/asset.py
Expand Up @@ -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"),
Expand Down
20 changes: 10 additions & 10 deletions stalker/models/auth.py
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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"""
)

Expand All @@ -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(
Expand Down Expand Up @@ -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.
"""
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions stalker/models/budget.py
Expand Up @@ -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`.
.. ::
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions stalker/models/client.py
Expand Up @@ -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`.
.. ::
Expand All @@ -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
"""

Expand Down
8 changes: 4 additions & 4 deletions stalker/models/entity.py
Expand Up @@ -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)
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion stalker/models/format.py
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion stalker/models/message.py
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions stalker/models/project.py
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions stalker/models/review.py
Expand Up @@ -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`.
"""
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions stalker/models/scene.py
Expand Up @@ -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.
Expand All @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion stalker/models/sequence.py
Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion stalker/models/shot.py
Expand Up @@ -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`
Expand Down

0 comments on commit a715a97

Please sign in to comment.