Skip to content

Commit

Permalink
Merge pull request #60 from RegioHelden/new-release
Browse files Browse the repository at this point in the history
New 4.0.0 Release
  • Loading branch information
lociii authored Jan 22, 2024
2 parents 42127ba + acafbd0 commit ac2e847
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Changelog
Unreleased
------------------


4.0.0 (2024-01-22)
------------------

- BREAKING CHANGE! added the ability to assign multiple users and groups instead of just one. Check migrating section in the README for more information

3.6.0 (2023-06-12)
------------------

Expand Down
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,38 @@ Datawatch supported setting a specific queue in release < 0.4.0

With the switch to celery 4, you should use task routing to define the queue for your tasks, see http://docs.celeryproject.org/en/latest/userguide/routing.html

## Migrating from 3.x to 4.x

In `4.x`, the base check class supports two new methods (`get_assigned_users` and `get_assigned_groups`). This is a breaking change as the old `get_assigned_user` and `get_assigned_group` methods have been removed.

This change allows checks to assign multiple users and groups to a check. If you have implemented custom checks, you need to update your code to return a list of users and groups instead of a single user and group. e.g.

From

```python
from django_datawatch.base import BaseCheck

class CustomCheck(BaseCheck):
...
def get_assigned_user(self, payload, result) -> Optional[AbstractUser]:
return None # or a user
def get_assigned_group(self, payload, result) -> Optional[Group]:
return None # or a group
```

To

```python
from django_datawatch.base import BaseCheck

class CustomCheck(BaseCheck):
...
def get_assigned_users(self, payload, result) -> Optional[List[AbstractUser]]:
return None # or a list of users
def get_assigned_groups(self, payload, result) -> Optional[List[Group]]:
return None # or a list of groups
```

# CONTRIBUTE

## Dev environment
Expand Down
2 changes: 1 addition & 1 deletion django_datawatch/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.6.0"
__version__ = "4.0.0"
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 3.6.0
current_version = 4.0.0
commit = True
tag = True

Expand Down

0 comments on commit ac2e847

Please sign in to comment.