Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
nomad-lab
nomad-FAIR
Commits
2d2e4166
Commit
2d2e4166
authored
6 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed/ignored minor mypy errors.
parent
b29fed17
No related branches found
No related tags found
1 merge request
!33
Merge version 0.4.0
Pipeline
#43873
passed
6 years ago
Stage: build
Stage: test
Stage: release
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
nomad/migration.py
+4
-4
4 additions, 4 deletions
nomad/migration.py
with
4 additions
and
4 deletions
nomad/migration.py
+
4
−
4
View file @
2d2e4166
...
...
@@ -20,7 +20,7 @@ other/older nomad@FAIRDI instances to mass upload it to a new nomad@FAIRDI insta
.. autoclass:: SourceCalc
"""
from
typing
import
Generator
,
Tuple
,
List
,
Iterable
from
typing
import
Generator
,
Tuple
,
List
,
Iterable
,
Any
import
os.path
import
zipstream
import
zipfile
...
...
@@ -331,7 +331,7 @@ class NomadCOEMigration:
os
.
path
.
join
(
root
[
path_prefix
:],
file
),
zipfile
.
ZIP_DEFLATED
)
zip_file
.
write
(
upload_path
)
upload_archive_f
=
IterIO
(
zip_file
)
upload_archive_f
=
IterIO
(
zip_file
)
# type: ignore
upload_name
=
'
%s.zip
'
%
source_upload_id
# upload and process the upload file
...
...
@@ -343,7 +343,7 @@ class NomadCOEMigration:
source_upload_id
=
source_upload_id
,
upload_id
=
upload
.
upload_id
)
# grab source metadata
upload_metadata_calcs
=
list
()
upload_metadata_calcs
:
List
[
Any
]
=
list
()
metadata_dict
=
dict
()
upload_metadata
=
dict
(
calculations
=
upload_metadata_calcs
)
for
source_calc
in
SourceCalc
.
objects
(
upload
=
source_upload_id
):
...
...
@@ -351,7 +351,7 @@ class NomadCOEMigration:
source_metadata
.
upload_id
=
upload
.
upload_id
source_metadata
.
mainfile
=
source_calc
.
mainfile
source_metadata
.
pid
=
source_calc
.
pid
source_metadata
.
__migrated
=
False
source_metadata
.
__migrated
=
False
# type: ignore
upload_metadata_calcs
.
append
(
source_metadata
)
metadata_dict
[
source_calc
.
mainfile
]
=
source_metadata
...
...
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