Skip to content

Commit 740aa94

Browse files
committed
fix small bug in building child link to exp and update version
1 parent d85abd1 commit 740aa94

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

CHANGES.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,8 @@
5353
committing and opening a PR to ensure branches are always up-to-date.
5454

5555
- Prevented duplicate item and self links when updating base catalogs of workflows and
56-
experiments.
56+
experiments.
57+
58+
## Changes in 0.1.7 (in development)
59+
60+
- Fixed a bug in build_child_link_to_related_experiment for the publish mode `"all"`.

deep_code/tools/publish.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,9 @@ def generate_workflow_experiment_records(
437437
themes=osc_themes,
438438
)
439439
if mode == "all":
440-
link_builder.build_child_link_to_related_experiment()
440+
link_builder.build_child_link_to_related_experiment(
441+
self.collection_id, self.workflow_title
442+
)
441443
# Convert to dictionary and cleanup
442444
workflow_dict = workflow_record.to_dict()
443445
if "jupyter_notebook_url" in workflow_dict:

deep_code/utils/ogc_api_record.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,17 @@ def build_link_to_dataset(collection_id) -> list[dict[str, str]]:
138138
}
139139
]
140140

141-
def build_child_link_to_related_experiment(self) -> list[dict[str, str]]:
141+
@staticmethod
142+
def build_child_link_to_related_experiment(
143+
collection_id, title
144+
) -> list[dict[str, str]]:
142145
"""Build a link to the related experiment record if publishing mode is 'all'."""
143146
return [
144147
{
145148
"rel": "child",
146-
"href": f"../../experiments/{self.id}/record.json",
149+
"href": f"../../experiments/{collection_id}/record.json",
147150
"type": "application/json",
148-
"title": self.title,
151+
"title": f"{title}",
149152
}
150153
]
151154

deep_code/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2020
# DEALINGS IN THE SOFTWARE.
2121

22-
version = "0.1.6"
22+
version = "0.1.7.dev0"

0 commit comments

Comments
 (0)