Repository navigation
Support for detached crates #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
9b4fa8f
815542b
fc025ec
c2dc3f3
f72e7f5
3e3a079
26a2071
8fff3ab
8e36253
6f0cb47
60be6d5
190186c
137e106
779762d
4d5f6bd
567f169
37a53d8
5ca8aef
8382d29
0955c89
312a2a5
4e46b2c
dbd5e33
8c16c88
ff6a267
deda277
9d52960
5eeccdc
35cb0b8
6b84395
5975361
fc61747
ba531a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,8 @@ def _copy_file(self, path, out_file_path): | |
| self._jsonld['contentSize'] = str(out_file_path.stat().st_size) | ||
|
|
||
| def write(self, base_path): | ||
| out_file_path = Path(base_path) / unquote(self.id) | ||
| local_path = self.get("localPath") | ||
| out_file_path = Path(base_path) / unquote(local_path or self.id) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If It'd be good to error/warn here if Alternatively, could implement some default behavior where if
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Though checking the Converting from Detached to Attached RO-Crate Package section in the spec made me think about how it does get a bit more complex when nested Datasets/Files are involved - need to consider the case where a Dataset has
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done in 8c16c88
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done in commits deda277 to fc61747, which also include fixes for the way remote Datasets are handled in general. |
||
| if isinstance(self.source, (BytesIO, StringIO)) or is_url(str(self.source)): | ||
| self._write_from_stream(out_file_path) | ||
| elif self.source is None: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.