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
c933d153
Commit
c933d153
authored
6 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed publish bugs.
parent
f717e648
No related branches found
No related tags found
1 merge request
!33
Merge version 0.4.0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
nomad/client/migration.py
+2
-5
2 additions, 5 deletions
nomad/client/migration.py
nomad/coe_repo/calc.py
+7
-9
7 additions, 9 deletions
nomad/coe_repo/calc.py
nomad/coe_repo/upload.py
+1
-1
1 addition, 1 deletion
nomad/coe_repo/upload.py
ops/migration_env.sh
+9
-0
9 additions, 0 deletions
ops/migration_env.sh
with
19 additions
and
15 deletions
nomad/client/migration.py
+
2
−
5
View file @
c933d153
...
...
@@ -116,12 +116,9 @@ def upload(paths: list, create_packages, local: bool, parallel: int):
logger
.
info
(
'
migrated upload with result
'
,
upload_path
=
path
,
**
report
)
task
.
put
([
(
'
uploads: {:7d}
'
,
1
),
(
'
packages: {:7d}
'
,
report
.
packages
),
(
'
total_source_calcs: {:7d}
'
,
report
.
total_source_calcs
),
(
'
total_calcs: {:7d}
'
,
report
.
total_calcs
),
(
'
failed_calcs: {:7d}
'
,
report
.
failed_calcs
),
(
'
uploads: {:5d}
'
,
1
),
(
'
migrated_calcs: {:7d}
'
,
report
.
migrated_calcs
),
(
'
failed_calcs: {:7d}
'
,
report
.
failed_calcs
),
(
'
calcs_with_diffs: {:7d}
'
,
report
.
calcs_with_diffs
),
(
'
new_calcs: {:7d}
'
,
report
.
new_calcs
),
(
'
missing_calcs: {:7d}
'
,
report
.
missing_calcs
)])
...
...
This diff is collapsed.
Click to expand it.
nomad/coe_repo/calc.py
+
7
−
9
View file @
c933d153
...
...
@@ -262,12 +262,11 @@ class Calc(Base):
if
dataset
.
doi
is
not
None
:
self
.
_add_citation
(
coe_dataset_calc
,
dataset
.
doi
[
'
value
'
],
'
INTERNAL
'
,
context
)
# cause a flush to avoid future inconsistencies
# repo_db.flush()
# cause a flush to create the backdirection of the above established
# metadata-dataset_calc relation
repo_db
.
flush
()
self
.
parents
.
append
(
coe_dataset_calc
)
# coe_dataset_rel = CalcSet(parent_calc_id=dataset_id, children_calc_id=self.coe_calc_id)
# repo_db.add(coe_dataset_rel)
dataset
.
update
(
DataSet
(
coe_dataset_calc
).
to_popo
())
...
...
@@ -377,8 +376,7 @@ class DataSet:
return
self
.
_dataset_calc
.
calc_metadata
.
chemical_formula
def
to_popo
(
self
):
popo
=
utils
.
POPO
(
id
=
self
.
id
,
name
=
self
.
name
)
if
self
.
doi
is
not
None
:
popo
.
update
(
doi
=
self
.
doi
.
to_popo
())
return
popo
return
utils
.
POPO
(
id
=
self
.
id
,
name
=
self
.
name
,
doi
=
self
.
doi
.
to_popo
()
if
self
.
doi
is
not
None
else
None
)
This diff is collapsed.
Click to expand it.
nomad/coe_repo/upload.py
+
1
−
1
View file @
c933d153
...
...
@@ -147,7 +147,7 @@ class Upload(Base): # type: ignore
checksum
=
calc
.
calc_id
,
upload
=
coe_upload
)
repo_db
.
add
(
coe_calc
)
repo_db
.
flush
()
# to avoid missing calc parent key constraint violation
coe_calc
.
apply_calc_with_metadata
(
calc
,
context
=
context
)
logger
.
debug
(
'
added calculation, not yet committed
'
,
calc_id
=
coe_calc
.
calc_id
)
...
...
This diff is collapsed.
Click to expand it.
ops/migration_env.sh
+
9
−
0
View file @
c933d153
...
...
@@ -2,3 +2,12 @@ export NOMAD_URL=http://enc-staging-nomad.esc.rzg.mpg.de/fairdi/nomad/migration/
export
NOMAD_USER
=
admin
export
NOMAD_FILES_NOMAD_TMP_DIR
=
/nomad/mscheidg/migration_tmp
export
NOMAD_LOGSTASH_TCPPORT
=
15000
export
NOMAD_FILES_TMP_DIR
=
/scratch/nomad-fair/local/tmp
export
NOMAD_FILES_OBJECT_DIR
=
/scratch/nomad-fair/local/objects
export
NOMAD_FILES_NOMAD_TMP
=
/nomad/mscheidg/migration_tmp
export
NOMAD_ELASTIC_PORT
=
19200
export
NOMAD_ELASTIC_INDEX_NAME
=
fairdi_nomad_local
export
NOMAD_MONGO_PORT
=
37017
export
NOMAD_MONGO_DB_NAME
=
fairdi_nomad_local
export
NOMAD_COE_REPO_DB_NAME
=
fairdi_nomad_local
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