Skip to content

Commit 5332486

Browse files
committed
Release version 0.0.0.dev430
1 parent f01411d commit 5332486

4 files changed

Lines changed: 25 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespaces = true
1717
# ----------------------------------------- Project Metadata -------------------------------------
1818
#
1919
[project]
20-
version = "0.0.0.dev429"
20+
version = "0.0.0.dev430"
2121
name = "ControlMan"
2222
dependencies = [
2323
"packaging >= 23.2, < 24",

src/controlman/_data/schema/main.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,16 @@ properties:
882882
additionalProperties: false
883883
required: [ title, description, upload_type, access_right ]
884884
properties:
885+
concept:
886+
summary: Concept record data.
887+
type: object
888+
required: [doi, id]
889+
properties:
890+
doi:
891+
$ref: https://jsonschemata.repodynamics.com/id/doi
892+
id:
893+
type: integer
894+
minimum: 0
885895
title:
886896
summary: Title of the deposition.
887897
default: ${{ citation.cff.title }}$

src/controlman/data_gen/main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from controlman.cache_manager import CacheManager
1010
from controlman import exception as _exception
1111
from controlman import date
12+
import controlman
1213

1314

1415
class MainDataGenerator:
@@ -225,6 +226,18 @@ def _discussion_categories(self):
225226
category_obj["description"] = category["description"]
226227
return
227228

229+
def _vars(self):
230+
var = controlman.read_variables(repo_path=self._git.repo_path)
231+
zenodo = self._data["citation.zenodo"]
232+
if zenodo:
233+
if not zenodo.get("concept"):
234+
concept_doi = var["zenodo"]["concept"]["doi"]
235+
if concept_doi:
236+
zenodo["concept"] = {"doi": concept_doi, "id": var["zenodo"]["concept"]["id"]}
237+
return
238+
239+
240+
228241

229242
def normalize_license_filename(filename: str) -> str:
230243
"""Normalize a license filename.

src/controlman/hook_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def load_module(module_filename: str):
123123
opened=True,
124124
type=env_log_type,
125125
)
126+
126127
self.inline_hooks = load_module(module_name_inline)
127128
self._generator = load_module(module_name_staged)
128129
if self._generator:

0 commit comments

Comments
 (0)