***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fairnb
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Weise, Martin
fairnb
Commits
c38e10da
Unverified
Commit
c38e10da
authored
11 months ago
by
Mahler, Lukas
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev'
parents
4437de20
f311b6a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fairnb/api/invenio.py
+8
-0
8 additions, 0 deletions
fairnb/api/invenio.py
fairnb/entity/invenio_entity.py
+7
-3
7 additions, 3 deletions
fairnb/entity/invenio_entity.py
with
15 additions
and
3 deletions
fairnb/api/invenio.py
+
8
−
0
View file @
c38e10da
...
...
@@ -98,6 +98,14 @@ class InvenioRDMConnector:
return
response
def
create_doi
(
self
,
record_id
:
str
):
response
=
rq
.
post
(
f
"
{
self
.
host
}
/api/records/
{
record_id
}
/draft/pid/doi
"
,
headers
=
self
.
headers
,
)
return
response
def
download_file
(
self
,
record_id
:
str
,
filename
:
str
,
out_path
:
pathlib
.
Path
,
expand
:
bool
=
True
):
...
...
This diff is collapsed.
Click to expand it.
fairnb/entity/invenio_entity.py
+
7
−
3
View file @
c38e10da
...
...
@@ -78,9 +78,13 @@ class InvenioRDMEntity(Entity):
self
.
record_metadata
).
json
()
record_id
=
create_response
[
"
id
"
]
self
.
invenio_manager
.
upload_record
(
dir_path
,
regex
,
only_filename
=
False
if
self
.
location
.
is_dir
()
else
True
)
self
.
invenio_manager
.
upload_record
(
dir_path
,
regex
,
only_filename
=
False
if
self
.
location
.
is_dir
()
else
True
)
record_doi
=
self
.
invenio_manager
.
connector
.
create_doi
(
record_id
)
if
self
.
publish_record
:
publish_response
=
self
.
invenio_manager
.
publish_record
()
...
...
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