__init__.py¶
Last source¶
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
- 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
- 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
- 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
- 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
- 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
- Date
2019-08-15 23:31:33 +0200
- Type
Renamed
- Old path
- 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