__init__.py

Last source

View documentation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Package defining the :obj:`Repository` entity."""

from isshub.domain.contexts.code_repository.entities.namespace import Namespace
from isshub.domain.utils.entity import (
    BaseEntityWithIdentifier,
    required_field,
    validated,
)


@validated()
class Repository(BaseEntityWithIdentifier):
    """A repository holds code, issues, code requests...

    Attributes
    ----------
    identifier : UUID
        The unique identifier of the repository
    name : str
        The name of the repository. Unique in its namespace.
    namespace : Namespace
        Where the repository can be found.

    """

    name: str = required_field(str)
    namespace: Namespace = required_field(Namespace, relation_verbose_name="belongs to")

Changes

feat(repository): Add domain repositories

Commit
Hash

27f013e2a3722926a9bbe300a77a493604f0993c

Date

2020-10-06 17:30:45 +0200

Type

Modified

Stats

+1 -1

@@ -1,4 +1,4 @@
-"""Package defining the ``Repository`` entity."""
+"""Package defining the :obj:`Repository` entity."""

 from isshub.domain.contexts.code_repository.entities.namespace import Namespace
 from isshub.domain.utils.entity import (

fix(entity): id changed from int to uuid4, renamed to identifier

Commit
Hash

79f704bde4575a9ddeb623d67d8965a62138adc9

Date

2020-10-05 10:51:49 +0200

Type

Modified

Stats

+7 -3

@@ -1,16 +1,20 @@
 """Package defining the ``Repository`` entity."""

 from isshub.domain.contexts.code_repository.entities.namespace import Namespace
-from isshub.domain.utils.entity import BaseEntityWithId, required_field, validated
+from isshub.domain.utils.entity import (
+    BaseEntityWithIdentifier,
+    required_field,
+    validated,
+)


 @validated()
-class Repository(BaseEntityWithId):
+class Repository(BaseEntityWithIdentifier):
     """A repository holds code, issues, code requests...

     Attributes
     ----------
-    id : int
+    identifier : UUID
         The unique identifier of the repository
     name : str
         The name of the repository. Unique in its namespace.

style(entity): Change the world “model” by “entity”

Commit
Hash

c2dd0fc606636dd72c1b55d30095bbeb622b788d

Date

2020-10-04 21:07:00 +0200

Type

Modified

Stats

+2 -2

@@ -1,11 +1,11 @@
 """Package defining the ``Repository`` entity."""

 from isshub.domain.contexts.code_repository.entities.namespace import Namespace
-from isshub.domain.utils.entity import BaseModelWithId, required_field, validated
+from isshub.domain.utils.entity import BaseEntityWithId, required_field, validated


 @validated()
-class Repository(BaseModelWithId):
+class Repository(BaseEntityWithId):
     """A repository holds code, issues, code requests...

     Attributes

style(mypy): Remove most “type: ignore” pragmas

Commit
Hash

76638c3d09c47d58febbc9e2e2cc80e84c98ac33

Date

2020-10-04 20:36:50 +0200

Type

Modified

Stats

+3 -5

@@ -4,7 +4,7 @@ from isshub.domain.contexts.code_repository.entities.namespace import Namespace
 from isshub.domain.utils.entity import BaseModelWithId, required_field, validated


-@validated()  # type: ignore
+@validated()
 class Repository(BaseModelWithId):
     """A repository holds code, issues, code requests...

@@ -19,7 +19,5 @@ class Repository(BaseModelWithId):

     """

-    name: str = required_field(str)  # type: ignore
-    namespace: Namespace = required_field(  # type: ignore
-        Namespace, relation_verbose_name="belongs to"
-    )
+    name: str = required_field(str)
+    namespace: Namespace = required_field(Namespace, relation_verbose_name="belongs to")

docs(domain): Add diagram of entities for each domain context

Commit
Hash

bb5e73eb3d816d563f2a58fe65c6bd57b045dbde

Date

2020-10-04 11:50:37 +0200

Type

Modified

Stats

+3 -1

@@ -20,4 +20,6 @@ class Repository(BaseModelWithId):
     """

     name: str = required_field(str)  # type: ignore
-    namespace: Namespace = required_field(Namespace)  # type: ignore
+    namespace: Namespace = required_field(  # type: ignore
+        Namespace, relation_verbose_name="belongs to"
+    )

refactor(core): Rename core domain context to code_repository

Commit
Hash

07e279b370c0924f2b2cf32aea016b307001dfa0

Date

2019-08-15 23:31:33 +0200

Type

Renamed

Old path

isshub/domain/contexts/core/entities/repository/__init__.py

Stats

+1 -1

@@ -1,6 +1,6 @@
 """Package defining the ``Repository`` entity."""

-from isshub.domain.contexts.core.entities.namespace import Namespace
+from isshub.domain.contexts.code_repository.entities.namespace import Namespace
 from isshub.domain.utils.entity import BaseModelWithId, required_field, validated