refactor(core): Rename core domain context to code_repository¶
Description¶
Abstract¶
Rename the core domain context (isshub/domain/contexts.core) to code_repository (isshub/domain/contexts.code_repository)
Motivation¶
core was a too abstract name, and implies it is the center of the project, which may be not the case in the future, so we changed for a more meaningful name, code_repository
Rationale¶
N/A
Info¶
- Hash
07e279b370c0924f2b2cf32aea016b307001dfa0
- Date
2019-08-15 23:31:33 +0200
- Parents
chore(make): Upgrade pip in `dev-upgrade` make command [e4d137ff] — 2019-08-15 23:26:05 +0200
- Children
Merge branch ‘feature/twidi/fix-commits-in-doc’ into develop [841496f6] — 2019-08-16 00:22:32 +0200
docs(fix): Fix bad syntax in README [8079b794] — 2019-08-16 00:09:59 +0200
- Branches
- Tags
(No tags)
Changes¶
isshub/domain/contexts/code_repository/entities/namespace/__init__.py
isshub/domain/contexts/code_repository/entities/namespace/features/describe.feature
isshub/domain/contexts/code_repository/entities/namespace/tests/__init__.py
isshub/domain/contexts/code_repository/entities/namespace/tests/factories.py
isshub/domain/contexts/code_repository/entities/namespace/tests/fixtures.py
isshub/domain/contexts/code_repository/entities/namespace/tests/test_describe.py
isshub/domain/contexts/code_repository/entities/repository/__init__.py
isshub/domain/contexts/code_repository/entities/repository/features/describe.feature
isshub/domain/contexts/code_repository/entities/repository/tests/__init__.py
isshub/domain/contexts/code_repository/entities/repository/tests/factories.py
isshub/domain/contexts/code_repository/entities/repository/tests/fixtures.py
isshub/domain/contexts/code_repository/entities/repository/tests/test_describe.py
isshub/domain/contexts/core/entities/namespace/tests/__init__.py
isshub/domain/contexts/core/entities/repository/tests/__init__.py
README.rst¶
- Type
Modified
- Stats
+2 -2
@@ -468,10 +468,10 @@ The contexts hold some entities, objects that have a distinct identity.
The contexts are:
-core
+code_repository
''''
-The `core` context will hold the "core" domain, around repositories, issues, code requests...
+The `code_repository` context will hold things around repositories, issues, code requests...
Its entities are:
isshub/domain/contexts/code_repository/__init__.py¶
- Type
Added
- Stats
+11 -0
@@ -0,0 +1,11 @@
+"""Package to handle isshub domain code_repository context.
+
+The "code_repository" context defines every models that are related to code repositories (like
+Github, Gitlab...):
+
+- repositories
+- issues
+- commits
+- ...
+
+"""
isshub/domain/contexts/code_repository/entities/__init__.py¶
- Type
Renamed
- Old path
- Stats
+1 -1
@@ -1,4 +1,4 @@
-"""Package to handle isshub entities for domain core context."""
+"""Package to handle isshub entities for domain code_repository context."""
# Order is important so we disable isort for this file
# isort:skip_file
isshub/domain/contexts/code_repository/entities/namespace/__init__.py¶
- Type
Renamed
- Old path
- Stats
+0 -0
isshub/domain/contexts/code_repository/entities/namespace/features/describe.feature¶
- Type
Renamed
- Old path
isshub/domain/contexts/core/entities/namespace/features/describe.feature
- Stats
+0 -0
isshub/domain/contexts/code_repository/entities/namespace/tests/__init__.py¶
- Type
Added
- Stats
+1 -0
@@ -0,0 +1 @@
+"""Package holding the tests for the ``Namespace`` code_repository entity."""
isshub/domain/contexts/code_repository/entities/namespace/tests/factories.py¶
- Type
Renamed
- Old path
isshub/domain/contexts/core/entities/namespace/tests/factories.py
- Stats
+6 -3
@@ -1,17 +1,20 @@
-"""Module defining factories for the Namespace core entity."""
+"""Module defining factories for the Namespace code_repository entity."""
import factory
from faker_enum import EnumProvider
-from isshub.domain.contexts.core.entities.namespace import Namespace, NamespaceKind
+from isshub.domain.contexts.code_repository.entities.namespace import (
+ Namespace,
+ NamespaceKind,
+)
factory.Faker.add_provider(EnumProvider)
class NamespaceFactory(factory.Factory):
- """Factory for the ``Namespace`` core entity."""
+ """Factory for the ``Namespace`` code_repository entity."""
class Meta:
"""Factory config."""
isshub/domain/contexts/code_repository/entities/namespace/tests/fixtures.py¶
- Type
Renamed
- Old path
isshub/domain/contexts/core/entities/namespace/tests/fixtures.py
- Stats
+2 -2
@@ -1,11 +1,11 @@
-"""Module defining fixtures for the Namespace core entity."""
+"""Module defining fixtures for the Namespace code_repository entity."""
from typing import Type
from pytest import fixture
-from isshub.domain.contexts.core.entities.namespace import Namespace
+from isshub.domain.contexts.code_repository.entities.namespace import Namespace
from .factories import NamespaceFactory
isshub/domain/contexts/code_repository/entities/namespace/tests/test_describe.py¶
- Type
Renamed
- Old path
isshub/domain/contexts/core/entities/namespace/tests/test_describe.py
- Stats
+2 -2
@@ -1,10 +1,10 @@
-"""Module holding BDD tests for isshub Namespace core entity."""
+"""Module holding BDD tests for isshub Namespace code_repository entity."""
import pytest
from pytest import mark
from pytest_bdd import given, parsers, scenario, scenarios, then
-from isshub.domain.contexts.core.entities.namespace import NamespaceKind
+from isshub.domain.contexts.code_repository.entities.namespace import NamespaceKind
from isshub.domain.utils.testing.validation import (
check_field,
check_field_not_nullable,
isshub/domain/contexts/code_repository/entities/repository/__init__.py¶
- 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
isshub/domain/contexts/code_repository/entities/repository/features/describe.feature¶
- Type
Renamed
- Old path
isshub/domain/contexts/core/entities/repository/features/describe.feature
- Stats
+0 -0
isshub/domain/contexts/code_repository/entities/repository/tests/__init__.py¶
- Type
Added
- Stats
+1 -0
@@ -0,0 +1 @@
+"""Package holding the tests for the ``Repository`` code_repository entity."""
isshub/domain/contexts/code_repository/entities/repository/tests/factories.py¶
- Type
Renamed
- Old path
isshub/domain/contexts/core/entities/repository/tests/factories.py
- Stats
+3 -3
@@ -1,14 +1,14 @@
-"""Module defining factories for the Repository core entity."""
+"""Module defining factories for the Repository code_repository entity."""
import factory
-from isshub.domain.contexts.core.entities.repository import Repository
+from isshub.domain.contexts.code_repository.entities.repository import Repository
from ...namespace.tests.factories import NamespaceFactory
class RepositoryFactory(factory.Factory):
- """Factory for the ``Repository`` core entity."""
+ """Factory for the ``Repository`` code_repository entity."""
class Meta:
"""Factory config."""
isshub/domain/contexts/code_repository/entities/repository/tests/fixtures.py¶
- Type
Renamed
- Old path
isshub/domain/contexts/core/entities/repository/tests/fixtures.py
- Stats
+1 -1
@@ -1,4 +1,4 @@
-"""Module defining fixtures for the Repository core entity."""
+"""Module defining fixtures for the Repository code_repository entity."""
from pytest import fixture
isshub/domain/contexts/code_repository/entities/repository/tests/test_describe.py¶
- Type
Renamed
- Old path
isshub/domain/contexts/core/entities/repository/tests/test_describe.py
- Stats
+1 -1
@@ -1,4 +1,4 @@
-"""Module holding BDD tests for isshub Repository core entity."""
+"""Module holding BDD tests for isshub Repository code_repository entity."""
import pytest
from pytest import mark
isshub/domain/contexts/core/__init__.py¶
- Type
Deleted
- Stats
+0 -10
@@ -1,10 +0,0 @@
-"""Package to handle isshub domain core context.
-
-The "core" context defines every models that are at the core of the project:
-
-- repositories
-- issues
-- commits
-- ...
-
-"""
isshub/domain/contexts/core/entities/namespace/tests/__init__.py¶
- Type
Deleted
- Stats
+0 -1
@@ -1 +0,0 @@
-"""Package holding the tests for the ``Namespace`` core entity."""
isshub/domain/contexts/core/entities/repository/tests/__init__.py¶
- Type
Deleted
- Stats
+0 -1
@@ -1 +0,0 @@
-"""Package holding the tests for the ``Repository`` core entity."""