Skip to content

Commit 4141faa

Browse files
authored
Merge pull request #254 from chillenzer/fix-version-handling-in-init-mode
Fix: Pass through `version` in `init=True` case
2 parents 3b16c4a + e5a1e4b commit 4141faa

44 files changed

Lines changed: 76 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CITATION.cff

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ authors:
3131
- family-names: Kinoshita
3232
given-names: Bruno
3333
orcid: https://orcid.org/0000-0001-8250-4074
34+
- family-names: Lenz
35+
given-names: Julian
36+
orcid: https://orcid.org/0000-0001-5250-0005
3437
- family-names: Leo
3538
given-names: Simone
3639
orcid: https://orcid.org/0000-0001-8271-5429

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ Options:
628628
* Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
629629
* Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
630630
* Copyright 2026 Spanish National Research Council (CSIC), ES
631+
* Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
631632

632633
Licensed under the
633634
Apache License, version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>,

examples/fastapi/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
99
# Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
1010
# Copyright 2026 Spanish National Research Council (CSIC), ES
11+
# Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
1112
#
1213
# Licensed under the Apache License, Version 2.0 (the "License");
1314
# you may not use this file except in compliance with the License.

examples/read_test_metadata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
99
# Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
1010
# Copyright 2026 Spanish National Research Council (CSIC), ES
11+
# Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
1112
#
1213
# Licensed under the Apache License, Version 2.0 (the "License");
1314
# you may not use this file except in compliance with the License.

rocrate/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
1111
# Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
1212
# Copyright 2026 Spanish National Research Council (CSIC), ES
13+
# Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
1314
#
1415
# Licensed under the Apache License, Version 2.0 (the "License");
1516
# you may not use this file except in compliance with the License.
@@ -42,6 +43,7 @@
4243
'Matthias Hörtenhuber',
4344
'Sebastiaan Huber',
4445
'Bruno Kinoshita',
46+
'Julian Lenz',
4547
'Simone Leo',
4648
'Pablo Orviz',
4749
'Luca Pireddu',
@@ -61,6 +63,7 @@
6163
Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
6264
Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
6365
Copyright 2026 Spanish National Research Council (CSIC), ES
66+
Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
6467
"""
6568
__license__ = ("Apache License, version 2.0 "
6669
"<https://www.apache.org/licenses/LICENSE-2.0>")

rocrate/cli.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
99
# Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
1010
# Copyright 2026 Spanish National Research Council (CSIC), ES
11+
# Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
1112
#
1213
# Licensed under the Apache License, Version 2.0 (the "License");
1314
# you may not use this file except in compliance with the License.
@@ -93,9 +94,15 @@ def cli():
9394
metavar="NAME",
9495
help="Exclude files or directories from the metadata file. NAME may be a single name or a comma-separated list of names.",
9596
)
97+
@click.option(
98+
"--crate-version",
99+
default="1.2",
100+
type=str,
101+
help="Version of the RO-Crate standard to initialize the crate with.",
102+
)
96103
@OPTION_CRATE_PATH
97-
def init(crate_dir, gen_preview, exclude):
98-
crate = ROCrate(crate_dir, init=True, gen_preview=gen_preview, exclude=exclude)
104+
def init(crate_dir, gen_preview, exclude, crate_version):
105+
crate = ROCrate(crate_dir, init=True, gen_preview=gen_preview, exclude=exclude, version=crate_version)
99106
crate.metadata.write(crate_dir)
100107
if crate.preview:
101108
crate.preview.write(crate_dir)

rocrate/memory_buffer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
99
# Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
1010
# Copyright 2026 Spanish National Research Council (CSIC), ES
11+
# Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
1112
#
1213
# Licensed under the Apache License, Version 2.0 (the "License");
1314
# you may not use this file except in compliance with the License.

rocrate/metadata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
99
# Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
1010
# Copyright 2026 Spanish National Research Council (CSIC), ES
11+
# Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
1112
#
1213
# Licensed under the Apache License, Version 2.0 (the "License");
1314
# you may not use this file except in compliance with the License.

rocrate/model/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
# Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
99
# Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
1010
# Copyright 2026 Spanish National Research Council (CSIC), ES
11+
# Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
1112
#
1213
# Licensed under the Apache License, Version 2.0 (the "License");
1314
# you may not use this file except in compliance with the License.

rocrate/model/computationalworkflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Copyright 2025-2026 Senckenberg Society for Nature Research (SGN), DE
1111
# Copyright 2025-2026 European Molecular Biology Laboratory (EMBL), Heidelberg, DE
1212
# Copyright 2026 Spanish National Research Council (CSIC), ES
13+
# Copyright 2026 Helmholtz-Zentrum Dresden-Rossendorf (HZDR), DE
1314
#
1415
# Licensed under the Apache License, Version 2.0 (the "License");
1516
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)