Skip to content

Commit 4170b15

Browse files
videos: migration required transform rules
1 parent c3b4dcb commit 4170b15

File tree

23 files changed

+824
-163
lines changed

23 files changed

+824
-163
lines changed

README.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
cds-migrator-kit
88
==================
99

10+
11+
TODO change here:
12+
13+
14+
Default Installation (without RDM or Videos)
15+
pip install .
16+
17+
Install for RDM
18+
19+
pip install .[rdm]
20+
21+
Install for Videos
22+
23+
pip install .[videos]
24+
1025
To run the interface:
1126
```
1227
gunicorn -b :8080 --timeout 120 --graceful-timeout 60 cds_migrator_kit.app:app

cds_migrator_kit/videos/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
#
33
# This file is part of Invenio.
4-
# Copyright (C) 2024 CERN.
4+
# Copyright (C) 2025 CERN.
55
#
66
# cds-migrator-kit is free software; you can redistribute it and/or modify it
77
# under the terms of the MIT License; see LICENSE file for more details.

cds_migrator_kit/videos/weblecture_migration/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright (C) 2024 CERN.
3+
# Copyright (C) 2025 CERN.
44
#
55
# CDS-Videos is free software; you can redistribute it and/or modify it under
66
# the terms of the MIT License; see LICENSE file for more details.

cds_migrator_kit/videos/weblecture_migration/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright (C) 2022 CERN.
3+
# Copyright (C) 2025 CERN.
44
#
55
# CDS-Videos is free software; you can redistribute it and/or modify it under
66
# the terms of the MIT License; see LICENSE file for more details.
@@ -44,5 +44,6 @@ def run(dry_run=False):
4444
stream_definitions=[RecordStreamDefinition],
4545
config_filepath=Path(stream_config).absolute(),
4646
dry_run=dry_run,
47+
collection="weblectures",
4748
)
4849
runner.run()

cds_migrator_kit/videos/weblecture_migration/load/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright (C) 2024 CERN.
3+
# Copyright (C) 2025 CERN.
44
#
55
# CDS-Videos is free software; you can redistribute it and/or modify it under
66
# the terms of the MIT License; see LICENSE file for more details.

cds_migrator_kit/videos/weblecture_migration/load/load.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,10 @@ def __init__(
1717
db_uri,
1818
data_dir,
1919
tmp_dir,
20-
existing_data=False,
2120
entries=None,
2221
dry_run=False,
2322
):
2423
"""Constructor."""
25-
self.db_uri = db_uri
26-
27-
self.data_dir = data_dir
28-
self.tmp_dir = tmp_dir
29-
self.existing_data = existing_data
30-
self.entries = entries
3124
self.dry_run = dry_run
3225

3326
def _prepare(self, entry):

cds_migrator_kit/videos/weblecture_migration/streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright (C) 2022 CERN.
3+
# Copyright (C) 2025 CERN.
44
#
55
# CDS-Videos is free software; you can redistribute it and/or modify it under
66
# the terms of the MIT License; see LICENSE file for more details.
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
data_dir: cds_migrator_kit/videos/weblecture_migration/data/
2-
tmp_dir: cds_migrator_kit/videos/weblecture_migration/tmp
3-
state_dir: cds_migrator_kit/videos/weblecture_migration/cache
4-
log_dir: cds_migrator_kit/videos/weblecture_migration/log
5-
db_uri: postgresql://cds-rdm:cds-rdm@localhost:5432/cds-rdm # TODO CHANGE
6-
old_secret_key: CHANGE_ME # TODO CHANGE
7-
new_secret_key: CHANGE_ME # TODO CHANGE
1+
db_uri: postgresql://cds-videos:cds-videos@localhost:5432/cds-videos
82
records:
9-
extract:
10-
dirpath: cds_migrator_kit/videos/weblecture_migration/data/weblectures/dump/
11-
transform:
12-
files_dump_dir: cds_migrator_kit/videos/weblecture_migration/data/weblectures/files/
3+
weblectures:
4+
data_dir: cds_migrator_kit/videos/weblecture_migration/data/
5+
tmp_dir: cds_migrator_kit/videos/weblecture_migration/tmp
6+
log_dir: cds_migrator_kit/videos/weblecture_migration/log
7+
extract:
8+
dirpath: cds_migrator_kit/videos/weblecture_migration/data/weblectures/dump/
9+
transform:
10+
files_dump_dir: cds_migrator_kit/videos/weblecture_migration/data/weblectures/files/

cds_migrator_kit/videos/weblecture_migration/transform/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright (C) 2022 CERN.
3+
# Copyright (C) 2025 CERN.
44
#
55
# CDS-Videos is free software; you can redistribute it and/or modify it under
66
# the terms of the MIT License; see LICENSE file for more details.

cds_migrator_kit/videos/weblecture_migration/transform/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright (C) 2022 CERN.
3+
# Copyright (C) 2025 CERN.
44
#
55
# CDS-Videos is free software; you can redistribute it and/or modify it under
66
# the terms of the MIT License; see LICENSE file for more details.

0 commit comments

Comments
 (0)