Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-lister
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine R. Dumont
swh-lister
Commits
bf826618
Verified
Commit
bf826618
authored
1 year ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
nixguix/lister: Rename checksums_computation to checksum_layout
Refs.
swh/meta#4979
parent
4f57e844
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/lister/nixguix/lister.py
+9
-9
9 additions, 9 deletions
swh/lister/nixguix/lister.py
with
9 additions
and
9 deletions
swh/lister/nixguix/lister.py
+
9
−
9
View file @
bf826618
# Copyright (C) 2020-202
2
The Software Heritage developers
# Copyright (C) 2020-202
3
The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
...
...
@@ -75,7 +75,7 @@ class ArtifactWithoutExtension(ValueError):
pass
class
Checksum
sComputation
(
Enum
):
class
Checksum
Layout
(
Enum
):
"""
The possible artifact types listed out of the manifest.
"""
STANDARD
=
"
standard
"
...
...
@@ -85,9 +85,9 @@ class ChecksumsComputation(Enum):
directory.)
"""
MAPPING_CHECKSUM
S_COMPUTATION
=
{
"
flat
"
:
Checksum
sComputation
.
STANDARD
,
"
recursive
"
:
Checksum
sComputation
.
NAR
,
MAPPING_CHECKSUM
_LAYOUT
=
{
"
flat
"
:
Checksum
Layout
.
STANDARD
,
"
recursive
"
:
Checksum
Layout
.
NAR
,
}
"""
Mapping between the outputHashMode from the manifest and how to compute checksums.
"""
...
...
@@ -104,8 +104,8 @@ class Artifact:
"""
List of urls to retrieve tarball artifact if canonical url no longer works.
"""
checksums
:
Dict
[
str
,
str
]
"""
Integrity hash converted into a checksum dict.
"""
checksum
s_computation
:
ChecksumsComputation
"""
Checksum
s computation
mode to provide to loaders (e.g. nar, standard, ...)
"""
checksum
_layout
:
ChecksumLayout
"""
Checksum
layout
mode to provide to loaders (e.g. nar, standard, ...)
"""
@dataclass
...
...
@@ -529,7 +529,7 @@ class NixGuixLister(StatelessLister[PageResult]):
origin
=
origin
,
fallback_urls
=
fallback_urls
,
checksums
=
checksums
,
checksum
s_computation
=
MAPPING_CHECKSUM
S_COMPUTATION
[
outputHashMode
],
checksum
_layout
=
MAPPING_CHECKSUM
_LAYOUT
[
outputHashMode
],
visit_type
=
"
directory
"
if
is_tar
else
"
content
"
,
)
else
:
...
...
@@ -558,7 +558,7 @@ class NixGuixLister(StatelessLister[PageResult]):
visit_type
=
artifact
.
visit_type
,
extra_loader_arguments
=
{
"
checksums
"
:
artifact
.
checksums
,
"
checksum
s_computation
"
:
artifact
.
checksum
s_computation
.
value
,
"
checksum
_layout
"
:
artifact
.
checksum
_layout
.
value
,
"
fallback_urls
"
:
artifact
.
fallback_urls
,
},
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment