Skip to content

Commit c0815b3

Browse files
committed
Add verbose option to sync_zenodo
1 parent 3e48274 commit c0815b3

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

docs/changelog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ and this project adheres to [Effort-based Versioning](https://jacobtomlinson.dev
1010

1111
## [Unreleased][]
1212

13-
(no changes yet)
13+
(no summary yet)
14+
15+
### Added
16+
17+
- Verbose option for [`sync_zenodo()`][stepup.reprep.api.sync_zenodo]
1418

1519
## [3.1.3][] - 2025-09-28 {: v3.1.3 }
1620

stepup/reprep/api.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,13 +1227,15 @@ def sanitize_bibtex(
12271227
return step(" ".join(args), inp=paths_inp, out=paths_out, optional=optional, block=block)
12281228

12291229

1230-
def sync_zenodo(path_config: str, *, block: bool = False) -> StepInfo:
1230+
def sync_zenodo(path_config: str, *, verbose: bool = False, block: bool = False) -> StepInfo:
12311231
"""Synchronize data with an draft dataset on Zenodo.
12321232
12331233
Parameters
12341234
----------
12351235
path_config
12361236
The YAML configuration file for the Zenodo upload.
1237+
verbose
1238+
Set to True to print Zenodo API requests and responses to the standard output.
12371239
block
12381240
If `True`, the step will always remain pending.
12391241
@@ -1242,7 +1244,10 @@ def sync_zenodo(path_config: str, *, block: bool = False) -> StepInfo:
12421244
step_info
12431245
Holds relevant information of the step, useful for defining follow-up steps.
12441246
"""
1245-
return step("sync-zenodo ${inp}", inp=path_config, block=block)
1247+
command = "sync-zenodo ${inp}"
1248+
if verbose:
1249+
command += " --verbose"
1250+
return step(command, inp=path_config, block=block)
12461251

12471252

12481253
def unplot(

0 commit comments

Comments
 (0)