Skip to content

Commit 5c1fbca

Browse files
refactor: addressing review comments
1 parent abe4ee5 commit 5c1fbca

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ Unreleased
1515
~~~~~~~~~~
1616
Added
1717
_____
18-
* Add tooling needed to create and trigger events in Open edX platform
18+
* Add tooling needed to create and trigger events in Open edX platform.
19+
* Add Data Attribute classes used as arguments by Open edX Events.
1920

2021

2122
[0.2.0] - 2021-07-28

openedx_events/learning/data.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class UserNonPersonalData:
2121
"""
2222

2323
id = attr.ib(type=int)
24-
is_active = attr.ib(type=bool, default=True)
24+
is_active = attr.ib(type=bool)
2525

2626

2727
@attr.s(frozen=True)
@@ -41,19 +41,18 @@ class UserPersonalData:
4141

4242

4343
@attr.s(frozen=True)
44-
class UserData:
44+
class UserData(UserNonPersonalData):
4545
"""
4646
Attributes defined for Open edX user object.
4747
48+
This class extends UserNonPersonalData to include PII data completing the
49+
user object.
50+
4851
Arguments:
49-
user_non_pii (UserNonPersonalData): user's Personal Identifiable
50-
Information.
51-
user_pii (UserPersonalData): user's Non Personal Identifiable
52-
Information.
52+
pii (UserPersonalData): user's Personal Identifiable Information.
5353
"""
5454

55-
user_non_pii = attr.ib(type=UserNonPersonalData)
56-
user_pii = attr.ib(type=UserPersonalData)
55+
pii = attr.ib(type=UserPersonalData)
5756

5857

5958
@attr.s(frozen=True)

requirements/test.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ django==2.2.24
2020
# via
2121
# -c requirements/constraints.txt
2222
# -r requirements/base.txt
23-
ddt==1.4.2
24-
# via -r requirements/test.in
2523
edx-opaque-keys[django]==2.2.2
2624
# via -r requirements/base.txt
2725
iniconfig==1.1.1

0 commit comments

Comments
 (0)