Skip to content

Commit 9090869

Browse files
feat(dataset): export to a local directory (#2944)
1 parent af5e5c5 commit 9090869

Some content is hidden

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

46 files changed

+681
-289
lines changed

.github/workflows/test_deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,8 @@ jobs:
924924
git config --global --add user.name "Renku Bot"
925925
git config --global --add user.email "[email protected]"
926926
- name: merge changes from master
927+
env:
928+
GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
927929
run: |
928930
git merge origin/master --message "Merge branch 'master' into develop"
929931
git push

docs/reference/core.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,6 @@ Utilities
244244
:members:
245245
:show-inheritance:
246246

247-
.. automodule:: renku.core.util.scm
248-
:members:
249-
:show-inheritance:
250-
251247
.. automodule:: renku.core.util.shacl
252248
:members:
253249
:show-inheritance:

docs/spelling_wordlist.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,17 @@ filesystem
7474
FilterFlights
7575
findable
7676
Fortran
77+
GitLab
78+
GitPython
79+
GraphQL
7780
gapped
7881
git-lfs
82+
gitattributes
7983
github
8084
gitignore
8185
gitkeep
8286
gitlab
83-
GitLab
8487
gitlabClientSecret
85-
GitPython
86-
GraphQL
8788
hexsha
8889
Homebrew
8990
hostname

renku/command/format/dataset_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ def jsonld(records, **kwargs):
122122
Args:
123123
records: Filtered collection.
124124
"""
125+
from renku.command.format.json import dumps
125126
from renku.command.schema.dataset import DatasetFileSchema
126-
from renku.domain_model.json import dumps
127127

128128
data = [DatasetFileSchema(flattened=True).dump(record) for record in records]
129129
return dumps(data, indent=2)
@@ -138,8 +138,8 @@ def json(records, **kwargs):
138138
Returns:
139139
String of records in JSON representation.
140140
"""
141+
from renku.command.format.json import dumps
141142
from renku.domain_model.dataset import DatasetFileDetailsJson
142-
from renku.domain_model.json import dumps
143143

144144
for record in records:
145145
record.creators = record.dataset.creators

renku/command/format/dataset_tags.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def tabular(tags):
3030
Returns:
3131
String of tags in tabular representation.
3232
"""
33-
from renku.domain_model.tabulate import tabulate
33+
from renku.core.util.tabulate import tabulate
3434

3535
return tabulate(
3636
tags,
@@ -58,8 +58,8 @@ def jsonld(tags):
5858
Returns:
5959
String of tags in JSON-LD representation.
6060
"""
61+
from renku.command.format.json import dumps
6162
from renku.command.schema.dataset import DatasetTagSchema
62-
from renku.domain_model.json import dumps
6363

6464
data = [DatasetTagSchema().dump(tag) for tag in tags]
6565
return dumps(data, indent=2)

renku/command/format/datasets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def jsonld(datasets, **kwargs):
5858
Returns:
5959
String of datasets in JSON-LD format.
6060
"""
61+
from renku.command.format.json import dumps
6162
from renku.command.schema.dataset import dump_dataset_as_jsonld
62-
from renku.domain_model.json import dumps
6363

6464
data = [dump_dataset_as_jsonld(dataset) for dataset in datasets]
6565
return dumps(data, indent=2)
@@ -74,8 +74,8 @@ def json(datasets, **kwargs):
7474
Returns:
7575
String of datasets as JSON data.
7676
"""
77+
from renku.command.format.json import dumps
7778
from renku.domain_model.dataset import DatasetDetailsJson
78-
from renku.domain_model.json import dumps
7979

8080
data = [DatasetDetailsJson().dump(dataset) for dataset in datasets]
8181
return dumps(data, indent=2)
File renamed without changes.

renku/command/format/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# limitations under the License.
1818
"""Serializers for sessions."""
1919

20-
from .tabulate import tabulate
20+
from renku.command.format.tabulate import tabulate
2121

2222

2323
def tabular(sessions, *, columns=None):

renku/command/format/tabulate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def tabulate(collection, columns, columns_mapping, columns_alignments=None, sort
3434
sort: Whether to sort by first column or not (Default value = True).
3535
reverse: Whether to sort in reverse (Default value = False).
3636
"""
37-
from renku.domain_model.tabulate import tabulate as tabulate_
37+
from renku.core.util.tabulate import tabulate as to_table
3838

3939
if not columns:
4040
raise errors.ParameterError("Columns cannot be empty.")
@@ -54,7 +54,7 @@ def tabulate(collection, columns, columns_mapping, columns_alignments=None, sort
5454

5555
alignments = alignments if collection else None # To avoid a tabulate bug
5656

57-
return tabulate_(collection, headers=headers, colalign=alignments, disable_numparse=True)
57+
return to_table(collection, headers=headers, colalign=alignments, disable_numparse=True)
5858

5959

6060
def _make_headers(columns, columns_mapping, columns_alignments):

renku/command/format/workflow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
import textwrap
2020
from typing import Callable, Dict
2121

22-
from renku.domain_model.json import dumps
23-
24-
from .tabulate import tabulate
22+
from renku.command.format.json import dumps
23+
from renku.command.format.tabulate import tabulate
2524

2625

2726
def tabular(workflows, *, columns=None):

0 commit comments

Comments
 (0)