diff --git a/swh/web/api/views/directory.py b/swh/web/api/views/directory.py
--- a/swh/web/api/views/directory.py
+++ b/swh/web/api/views/directory.py
@@ -29,7 +29,7 @@
Get information about directory objects.
Directories are identified by **sha1** checksums, compatible with Git
directory identifiers.
- See :func:`swh.model.identifiers.directory_identifier` in our data model
+ See :func:`swh.model.git_objects.directory_git_object` in our data model
module for details about how they are computed.
When given only a directory identifier, this endpoint returns information
diff --git a/swh/web/api/views/graph.py b/swh/web/api/views/graph.py
--- a/swh/web/api/views/graph.py
+++ b/swh/web/api/views/graph.py
@@ -15,8 +15,8 @@
from rest_framework.response import Response
from swh.model.hashutil import hash_to_hex
-from swh.model.identifiers import ExtendedObjectType, ExtendedSWHID
from swh.model.model import Sha1Git
+from swh.model.swhids import ExtendedObjectType, ExtendedSWHID
from swh.web.api.apidoc import api_doc
from swh.web.api.apiurls import api_route
from swh.web.api.renderers import PlainTextRenderer
diff --git a/swh/web/api/views/release.py b/swh/web/api/views/release.py
--- a/swh/web/api/views/release.py
+++ b/swh/web/api/views/release.py
@@ -21,7 +21,7 @@
Get information about a release in the archive. Releases are identified
by **sha1** checksums, compatible with Git tag identifiers. See
- :func:`swh.model.identifiers.release_identifier` in our data model
+ :func:`swh.model.git_objects.release_git_object` in our data model
module for details about how they are computed.
:param string sha1_git: hexadecimal representation of the release
diff --git a/swh/web/api/views/snapshot.py b/swh/web/api/views/snapshot.py
--- a/swh/web/api/views/snapshot.py
+++ b/swh/web/api/views/snapshot.py
@@ -35,7 +35,7 @@
target is unknown.
A snapshot identifier is a salted sha1. See
- :func:`swh.model.identifiers.snapshot_identifier` in our data model
+ :func:`swh.model.git_objects.snapshot_git_object` in our data model
module for details about how they are computed.
:param sha1 snapshot_id: a snapshot identifier
diff --git a/swh/web/api/views/vault.py b/swh/web/api/views/vault.py
--- a/swh/web/api/views/vault.py
+++ b/swh/web/api/views/vault.py
@@ -9,7 +9,7 @@
from django.shortcuts import redirect
from swh.model.hashutil import hash_to_hex
-from swh.model.identifiers import CoreSWHID, ObjectType
+from swh.model.swhids import CoreSWHID, ObjectType
from swh.web.api.apidoc import api_doc, format_docstring
from swh.web.api.apiurls import api_route
from swh.web.api.views.utils import api_lookup
diff --git a/swh/web/browse/snapshot_context.py b/swh/web/browse/snapshot_context.py
--- a/swh/web/browse/snapshot_context.py
+++ b/swh/web/browse/snapshot_context.py
@@ -13,8 +13,8 @@
from django.utils.html import escape
from swh.model.hashutil import hash_to_bytes
-from swh.model.identifiers import CoreSWHID, ObjectType
from swh.model.model import Snapshot
+from swh.model.swhids import CoreSWHID, ObjectType
from swh.web.browse.utils import (
content_display_max_size,
format_log_entries,
diff --git a/swh/web/browse/views/content.py b/swh/web/browse/views/content.py
--- a/swh/web/browse/views/content.py
+++ b/swh/web/browse/views/content.py
@@ -12,7 +12,7 @@
from django.shortcuts import render
from swh.model.hashutil import hash_to_hex
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
from swh.web.browse.browseurls import browse_route
from swh.web.browse.snapshot_context import get_snapshot_context
from swh.web.browse.utils import (
diff --git a/swh/web/browse/views/directory.py b/swh/web/browse/views/directory.py
--- a/swh/web/browse/views/directory.py
+++ b/swh/web/browse/views/directory.py
@@ -10,7 +10,7 @@
from django.http import HttpResponse
from django.shortcuts import redirect, render
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
from swh.web.browse.browseurls import browse_route
from swh.web.browse.snapshot_context import get_snapshot_context
from swh.web.browse.utils import gen_link, get_directory_entries, get_readme_to_display
diff --git a/swh/web/browse/views/release.py b/swh/web/browse/views/release.py
--- a/swh/web/browse/views/release.py
+++ b/swh/web/browse/views/release.py
@@ -7,7 +7,7 @@
from django.shortcuts import render
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
from swh.web.browse.browseurls import browse_route
from swh.web.browse.snapshot_context import get_snapshot_context
from swh.web.browse.utils import (
diff --git a/swh/web/browse/views/revision.py b/swh/web/browse/views/revision.py
--- a/swh/web/browse/views/revision.py
+++ b/swh/web/browse/views/revision.py
@@ -12,7 +12,7 @@
from django.utils.safestring import mark_safe
from swh.model.hashutil import hash_to_bytes
-from swh.model.identifiers import CoreSWHID, ObjectType
+from swh.model.swhids import CoreSWHID, ObjectType
from swh.web.browse.browseurls import browse_route
from swh.web.browse.snapshot_context import get_snapshot_context
from swh.web.browse.utils import (
diff --git a/swh/web/common/archive.py b/swh/web/common/archive.py
--- a/swh/web/common/archive.py
+++ b/swh/web/common/archive.py
@@ -11,8 +11,8 @@
from urllib.parse import urlparse
from swh.model import hashutil
-from swh.model.identifiers import CoreSWHID, ObjectType
from swh.model.model import OriginVisit, Revision
+from swh.model.swhids import CoreSWHID, ObjectType
from swh.storage.algos import diff, revisions_walker
from swh.storage.algos.origin import origin_get_latest_visit_status
from swh.storage.algos.snapshot import snapshot_get_latest, snapshot_resolve_alias
diff --git a/swh/web/common/converters.py b/swh/web/common/converters.py
--- a/swh/web/common/converters.py
+++ b/swh/web/common/converters.py
@@ -11,8 +11,8 @@
from swh.core.utils import decode_with_escape
from swh.model import hashutil
-from swh.model.identifiers import ObjectType
from swh.model.model import RawExtrinsicMetadata, Release, Revision
+from swh.model.swhids import ObjectType
from swh.storage.interface import PartialBranches
from swh.web.common.typing import OriginInfo, OriginVisitInfo
diff --git a/swh/web/common/identifiers.py b/swh/web/common/identifiers.py
--- a/swh/web/common/identifiers.py
+++ b/swh/web/common/identifiers.py
@@ -12,7 +12,7 @@
from swh.model.exceptions import ValidationError
from swh.model.hashutil import hash_to_bytes, hash_to_hex
-from swh.model.identifiers import ObjectType, QualifiedSWHID
+from swh.model.swhids import ObjectType, QualifiedSWHID
from swh.web.common import archive
from swh.web.common.exc import BadInputExc
from swh.web.common.typing import (
diff --git a/swh/web/common/typing.py b/swh/web/common/typing.py
--- a/swh/web/common/typing.py
+++ b/swh/web/common/typing.py
@@ -10,7 +10,7 @@
from django.http import QueryDict
from swh.core.api.classes import PagedResult as CorePagedResult
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
QueryParameters = Union[Dict[str, Any], QueryDict]
diff --git a/swh/web/misc/badges.py b/swh/web/misc/badges.py
--- a/swh/web/misc/badges.py
+++ b/swh/web/misc/badges.py
@@ -14,7 +14,7 @@
from swh.model.exceptions import ValidationError
from swh.model.hashutil import hash_to_bytes, hash_to_hex
-from swh.model.identifiers import CoreSWHID, ObjectType, QualifiedSWHID
+from swh.model.swhids import CoreSWHID, ObjectType, QualifiedSWHID
from swh.web.common import archive
from swh.web.common.exc import BadInputExc, NotFoundExc
from swh.web.common.identifiers import parse_object_type, resolve_swhid
diff --git a/swh/web/misc/iframe.py b/swh/web/misc/iframe.py
--- a/swh/web/misc/iframe.py
+++ b/swh/web/misc/iframe.py
@@ -10,7 +10,7 @@
from django.views.decorators.clickjacking import xframe_options_exempt
from swh.model.hashutil import hash_to_bytes
-from swh.model.identifiers import ObjectType, QualifiedSWHID
+from swh.model.swhids import ObjectType, QualifiedSWHID
from swh.web.browse.snapshot_context import get_snapshot_context
from swh.web.browse.utils import (
content_display_max_size,
diff --git a/swh/web/templates/browse/help.html b/swh/web/templates/browse/help.html
--- a/swh/web/templates/browse/help.html
+++ b/swh/web/templates/browse/help.html
@@ -69,7 +69,7 @@
{% url 'browse-directory' '977fc4b98c0e85816348cebd3b12026407c368b6' %}
(see the
- documentation to get more details about how it is computed)
+ documentation to get more details about how it is computed)
Display information about a
@@ -80,7 +80,7 @@
{% url 'browse-revision' 'f1b94134a4b879bc55c3dacdb496690c8ebdc03f' %}
(see the
- documentation to get more details about how it is computed)
+ documentation to get more details about how it is computed)
Display information about a
@@ -91,7 +91,7 @@
{% url 'browse-snapshot' 'baebc2109e4a2ec22a1129a3859647e191d04df4' %}
(see the
- documentation to get more details about how it is computed)
+ documentation to get more details about how it is computed)
diff --git a/swh/web/tests/api/test_apidoc.py b/swh/web/tests/api/test_apidoc.py
--- a/swh/web/tests/api/test_apidoc.py
+++ b/swh/web/tests/api/test_apidoc.py
@@ -22,7 +22,7 @@
Get information about a revision in the archive.
Revisions are identified by **sha1** checksums, compatible with Git commit
identifiers.
- See :func:`swh.model.identifiers.revision_identifier` in our data model
+ See :func:`swh.model.git_objects.revision_git_object` in our data model
module for details about how they are computed.
:param string sha1_git: hexadecimal representation of the revision
@@ -201,7 +201,7 @@
"Get information about a revision in the archive. "
"Revisions are identified by **sha1** checksums, "
"compatible with Git commit identifiers. See "
- "**swh.model.identifiers.revision_identifier** in "
+ "**swh.model.git_objects.revision_git_object** in "
"our data model module for details about how they "
"are computed."
)
diff --git a/swh/web/tests/api/test_apiresponse.py b/swh/web/tests/api/test_apiresponse.py
--- a/swh/web/tests/api/test_apiresponse.py
+++ b/swh/web/tests/api/test_apiresponse.py
@@ -12,7 +12,7 @@
)
from hypothesis import given
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
from swh.web.api.apiresponse import (
compute_link_header,
filter_by_fields,
diff --git a/swh/web/tests/api/views/test_graph.py b/swh/web/tests/api/views/test_graph.py
--- a/swh/web/tests/api/views/test_graph.py
+++ b/swh/web/tests/api/views/test_graph.py
@@ -12,7 +12,7 @@
from django.http.response import StreamingHttpResponse
from swh.model.hashutil import hash_to_bytes
-from swh.model.identifiers import ExtendedObjectType, ExtendedSWHID
+from swh.model.swhids import ExtendedObjectType, ExtendedSWHID
from swh.web.api.views.graph import API_GRAPH_PERM
from swh.web.common.utils import reverse
from swh.web.config import SWH_WEB_INTERNAL_SERVER_NAME, get_config
diff --git a/swh/web/tests/api/views/test_identifiers.py b/swh/web/tests/api/views/test_identifiers.py
--- a/swh/web/tests/api/views/test_identifiers.py
+++ b/swh/web/tests/api/views/test_identifiers.py
@@ -5,7 +5,7 @@
from hypothesis import given
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
from swh.web.common.identifiers import gen_swhid
from swh.web.common.utils import reverse
from swh.web.tests.data import random_sha1
diff --git a/swh/web/tests/api/views/test_metadata.py b/swh/web/tests/api/views/test_metadata.py
--- a/swh/web/tests/api/views/test_metadata.py
+++ b/swh/web/tests/api/views/test_metadata.py
@@ -12,7 +12,7 @@
raw_extrinsic_metadata as raw_extrinsic_metadata_orig,
)
from swh.model.hypothesis_strategies import sha1_git
-from swh.model.identifiers import ExtendedObjectType, ExtendedSWHID, ObjectType
+from swh.model.swhids import ExtendedObjectType, ExtendedSWHID, ObjectType
from swh.web.common.utils import reverse
from swh.web.tests.api.views.utils import scroll_results
from swh.web.tests.utils import check_api_get_responses, check_http_get_response
diff --git a/swh/web/tests/api/views/test_vault.py b/swh/web/tests/api/views/test_vault.py
--- a/swh/web/tests/api/views/test_vault.py
+++ b/swh/web/tests/api/views/test_vault.py
@@ -8,7 +8,7 @@
from hypothesis import given
import pytest
-from swh.model.identifiers import CoreSWHID
+from swh.model.swhids import CoreSWHID
from swh.vault.exc import NotFoundExc
from swh.web.common.utils import reverse
from swh.web.tests.strategies import (
diff --git a/swh/web/tests/browse/test_snapshot_context.py b/swh/web/tests/browse/test_snapshot_context.py
--- a/swh/web/tests/browse/test_snapshot_context.py
+++ b/swh/web/tests/browse/test_snapshot_context.py
@@ -7,7 +7,7 @@
from hypothesis import given
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
from swh.web.browse.snapshot_context import (
_get_release,
get_origin_visit_snapshot,
diff --git a/swh/web/tests/browse/views/test_content.py b/swh/web/tests/browse/views/test_content.py
--- a/swh/web/tests/browse/views/test_content.py
+++ b/swh/web/tests/browse/views/test_content.py
@@ -9,7 +9,7 @@
from django.utils.html import escape
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
from swh.web.browse.snapshot_context import process_snapshot_branches
from swh.web.browse.utils import (
_re_encode_content,
diff --git a/swh/web/tests/browse/views/test_directory.py b/swh/web/tests/browse/views/test_directory.py
--- a/swh/web/tests/browse/views/test_directory.py
+++ b/swh/web/tests/browse/views/test_directory.py
@@ -11,7 +11,6 @@
from swh.model.from_disk import DentryPerms
from swh.model.hashutil import hash_to_bytes, hash_to_hex
-from swh.model.identifiers import ObjectType
from swh.model.model import (
Directory,
DirectoryEntry,
@@ -25,6 +24,7 @@
TargetType,
TimestampWithTimezone,
)
+from swh.model.swhids import ObjectType
from swh.storage.utils import now
from swh.web.browse.snapshot_context import process_snapshot_branches
from swh.web.common.identifiers import gen_swhid
diff --git a/swh/web/tests/browse/views/test_identifiers.py b/swh/web/tests/browse/views/test_identifiers.py
--- a/swh/web/tests/browse/views/test_identifiers.py
+++ b/swh/web/tests/browse/views/test_identifiers.py
@@ -8,8 +8,8 @@
from hypothesis import given
-from swh.model.identifiers import ObjectType
from swh.model.model import Origin
+from swh.model.swhids import ObjectType
from swh.web.common.identifiers import gen_swhid
from swh.web.common.utils import reverse
from swh.web.tests.django_asserts import assert_contains
diff --git a/swh/web/tests/browse/views/test_origin.py b/swh/web/tests/browse/views/test_origin.py
--- a/swh/web/tests/browse/views/test_origin.py
+++ b/swh/web/tests/browse/views/test_origin.py
@@ -13,7 +13,6 @@
from django.utils.html import escape
from swh.model.hashutil import hash_to_bytes
-from swh.model.identifiers import ObjectType
from swh.model.model import (
OriginVisit,
OriginVisitStatus,
@@ -21,6 +20,7 @@
SnapshotBranch,
TargetType,
)
+from swh.model.swhids import ObjectType
from swh.storage.utils import now
from swh.web.browse.snapshot_context import process_snapshot_branches
from swh.web.common.exc import NotFoundExc
diff --git a/swh/web/tests/browse/views/test_release.py b/swh/web/tests/browse/views/test_release.py
--- a/swh/web/tests/browse/views/test_release.py
+++ b/swh/web/tests/browse/views/test_release.py
@@ -9,7 +9,7 @@
from django.utils.html import escape
-from swh.model.identifiers import ObjectType
+from swh.model.swhids import ObjectType
from swh.web.common.identifiers import gen_swhid
from swh.web.common.utils import format_utc_iso_date, reverse
from swh.web.tests.django_asserts import assert_contains
diff --git a/swh/web/tests/browse/views/test_revision.py b/swh/web/tests/browse/views/test_revision.py
--- a/swh/web/tests/browse/views/test_revision.py
+++ b/swh/web/tests/browse/views/test_revision.py
@@ -11,8 +11,8 @@
from django.utils.html import escape
from swh.model.hashutil import hash_to_bytes, hash_to_hex
-from swh.model.identifiers import ObjectType
from swh.model.model import Revision, RevisionType, TimestampWithTimezone
+from swh.model.swhids import ObjectType
from swh.web.common.identifiers import gen_swhid
from swh.web.common.utils import format_utc_iso_date, parse_iso8601_date_to_utc, reverse
from swh.web.tests.django_asserts import assert_contains, assert_not_contains
diff --git a/swh/web/tests/common/test_archive.py b/swh/web/tests/common/test_archive.py
--- a/swh/web/tests/common/test_archive.py
+++ b/swh/web/tests/common/test_archive.py
@@ -13,7 +13,6 @@
from swh.model.from_disk import DentryPerms
from swh.model.hashutil import hash_to_bytes, hash_to_hex
-from swh.model.identifiers import ObjectType
from swh.model.model import (
Directory,
DirectoryEntry,
@@ -24,6 +23,7 @@
SnapshotBranch,
TargetType,
)
+from swh.model.swhids import ObjectType
from swh.web.common import archive
from swh.web.common.exc import BadInputExc, NotFoundExc
from swh.web.common.typing import OriginInfo, PagedResult
diff --git a/swh/web/tests/common/test_identifiers.py b/swh/web/tests/common/test_identifiers.py
--- a/swh/web/tests/common/test_identifiers.py
+++ b/swh/web/tests/common/test_identifiers.py
@@ -10,8 +10,8 @@
import pytest
from swh.model.hashutil import hash_to_bytes
-from swh.model.identifiers import ObjectType, QualifiedSWHID
from swh.model.model import Origin
+from swh.model.swhids import ObjectType, QualifiedSWHID
from swh.web.browse.snapshot_context import get_snapshot_context
from swh.web.common.exc import BadInputExc
from swh.web.common.identifiers import (
diff --git a/swh/web/tests/data.py b/swh/web/tests/data.py
--- a/swh/web/tests/data.py
+++ b/swh/web/tests/data.py
@@ -20,7 +20,6 @@
from swh.indexer.storage.model import OriginIntrinsicMetadataRow
from swh.loader.git.from_disk import GitLoaderFromArchive
from swh.model.hashutil import DEFAULT_ALGORITHMS, hash_to_hex
-from swh.model.identifiers import CoreSWHID, ObjectType, QualifiedSWHID
from swh.model.model import (
Content,
Directory,
@@ -29,6 +28,7 @@
OriginVisitStatus,
Snapshot,
)
+from swh.model.swhids import CoreSWHID, ObjectType, QualifiedSWHID
from swh.search import get_search
from swh.storage import get_storage
from swh.storage.algos.dir_iterators import dir_iterator
diff --git a/swh/web/tests/misc/test_badges.py b/swh/web/tests/misc/test_badges.py
--- a/swh/web/tests/misc/test_badges.py
+++ b/swh/web/tests/misc/test_badges.py
@@ -7,7 +7,7 @@
from hypothesis import given
from swh.model.hashutil import hash_to_bytes
-from swh.model.identifiers import ObjectType, QualifiedSWHID
+from swh.model.swhids import ObjectType, QualifiedSWHID
from swh.web.common import archive
from swh.web.common.identifiers import resolve_swhid
from swh.web.common.utils import reverse
diff --git a/swh/web/tests/misc/test_iframe.py b/swh/web/tests/misc/test_iframe.py
--- a/swh/web/tests/misc/test_iframe.py
+++ b/swh/web/tests/misc/test_iframe.py
@@ -6,7 +6,7 @@
from hypothesis import given
from swh.model.hashutil import hash_to_bytes
-from swh.model.identifiers import CoreSWHID, ObjectType
+from swh.model.swhids import CoreSWHID, ObjectType
from swh.web.common.utils import reverse
from swh.web.tests.strategies import (
content_swhid,
diff --git a/swh/web/tests/strategies.py b/swh/web/tests/strategies.py
--- a/swh/web/tests/strategies.py
+++ b/swh/web/tests/strategies.py
@@ -23,7 +23,6 @@
from swh.model.hashutil import DEFAULT_ALGORITHMS, hash_to_bytes, hash_to_hex
from swh.model.hypothesis_strategies import origins as new_origin_strategy
from swh.model.hypothesis_strategies import snapshots as new_snapshot
-from swh.model.identifiers import ObjectType
from swh.model.model import (
Content,
Directory,
@@ -32,6 +31,7 @@
RevisionType,
TimestampWithTimezone,
)
+from swh.model.swhids import ObjectType
from swh.storage.algos.revisions_walker import get_revisions_walker
from swh.storage.algos.snapshot import snapshot_get_latest
from swh.web.common.utils import browsers_supported_image_mimes