ro-crate 0.4.11 → 0.4.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/tests.yml +5 -0
  3. data/.ruby-version +1 -1
  4. data/Gemfile.lock +7 -7
  5. data/README.md +2 -0
  6. data/lib/ro_crate/json_ld_hash.rb +5 -0
  7. data/lib/ro_crate/model/crate.rb +53 -6
  8. data/lib/ro_crate/model/data_entity.rb +20 -7
  9. data/lib/ro_crate/model/directory.rb +5 -5
  10. data/lib/ro_crate/model/entity.rb +43 -4
  11. data/lib/ro_crate/model/entry.rb +2 -2
  12. data/lib/ro_crate/model/file.rb +6 -2
  13. data/lib/ro_crate/model/remote_entry.rb +2 -13
  14. data/lib/ro_crate/reader.rb +11 -8
  15. data/lib/ro_crate/writer.rb +4 -4
  16. data/lib/ro_crate.rb +1 -1
  17. data/ro_crate.gemspec +2 -2
  18. data/test/crate_test.rb +74 -3
  19. data/test/directory_test.rb +21 -21
  20. data/test/entity_test.rb +117 -3
  21. data/test/fixtures/biobb_hpc_workflows-condapack.zip +0 -0
  22. data/test/fixtures/conflicting_data_directory/info.txt +1 -0
  23. data/test/fixtures/conflicting_data_directory/nested.txt +1 -0
  24. data/test/fixtures/misc_data_entity_crate/ro-crate-metadata.json +33 -0
  25. data/test/fixtures/ro-crate-galaxy-sortchangecase/ro-crate-metadata.json +10 -3
  26. data/test/fixtures/unlinked_entity_crate/LICENSE +176 -0
  27. data/test/fixtures/unlinked_entity_crate/README.md +2 -0
  28. data/test/fixtures/unlinked_entity_crate/ro-crate-metadata.json +150 -0
  29. data/test/fixtures/unlinked_entity_crate/sort-and-change-case.ga +118 -0
  30. data/test/fixtures/unlinked_entity_crate/test/test1/input.bed +3 -0
  31. data/test/fixtures/unlinked_entity_crate/test/test1/output_exp.bed +3 -0
  32. data/test/fixtures/unlinked_entity_crate/test/test1/sort-and-change-case-test.yml +8 -0
  33. data/test/fixtures/workflow-0.2.0/ro-crate-metadata.jsonld +5 -5
  34. data/test/fixtures/workflow-0.2.0.zip +0 -0
  35. data/test/reader_test.rb +86 -58
  36. data/test/test_helper.rb +5 -1
  37. data/test/writer_test.rb +48 -0
  38. metadata +24 -7
@@ -5,41 +5,41 @@ class DirectoryTest < Test::Unit::TestCase
5
5
  crate = ROCrate::Crate.new
6
6
  crate.add_directory(fixture_file('directory'))
7
7
 
8
- entries = crate.entries
8
+ payload = crate.payload
9
9
  base_path = ::File.dirname(fixture_file('directory'))
10
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/info.txt')), entries['directory/info.txt'].path
11
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')), entries['directory/root.txt'].path
12
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')), entries['directory/data'].path
13
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')), entries['directory/data/info.txt'].path
14
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')), entries['directory/data/nested.txt'].path
15
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')), entries['directory/data/binary.jpg'].path
10
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/info.txt')), payload['directory/info.txt'].path
11
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')), payload['directory/root.txt'].path
12
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')), payload['directory/data'].path
13
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')), payload['directory/data/info.txt'].path
14
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')), payload['directory/data/nested.txt'].path
15
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')), payload['directory/data/binary.jpg'].path
16
16
  end
17
17
 
18
18
  test 'adding directory via path' do
19
19
  crate = ROCrate::Crate.new
20
20
  crate.add_directory(fixture_file('directory').path.to_s)
21
21
 
22
- entries = crate.entries
22
+ payload = crate.payload
23
23
  base_path = ::File.dirname(fixture_file('directory'))
24
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/info.txt')), entries['directory/info.txt'].path
25
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')), entries['directory/root.txt'].path
26
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')), entries['directory/data'].path
27
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')), entries['directory/data/info.txt'].path
28
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')), entries['directory/data/nested.txt'].path
29
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')), entries['directory/data/binary.jpg'].path
24
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/info.txt')), payload['directory/info.txt'].path
25
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')), payload['directory/root.txt'].path
26
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')), payload['directory/data'].path
27
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')), payload['directory/data/info.txt'].path
28
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')), payload['directory/data/nested.txt'].path
29
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')), payload['directory/data/binary.jpg'].path
30
30
  end
31
31
 
32
32
  test 'adding to given path' do
33
33
  crate = ROCrate::Crate.new
34
34
  crate.add_directory(fixture_file('directory').path.to_s, 'fish')
35
35
 
36
- entries = crate.entries
36
+ payload = crate.payload
37
37
  base_path = ::File.dirname(fixture_file('directory'))
38
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/info.txt')), entries['fish/info.txt'].path
39
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')), entries['fish/root.txt'].path
40
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')), entries['fish/data'].path
41
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')), entries['fish/data/info.txt'].path
42
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')), entries['fish/data/nested.txt'].path
43
- assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')), entries['fish/data/binary.jpg'].path
38
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/info.txt')), payload['fish/info.txt'].path
39
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')), payload['fish/root.txt'].path
40
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')), payload['fish/data'].path
41
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')), payload['fish/data/info.txt'].path
42
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')), payload['fish/data/nested.txt'].path
43
+ assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')), payload['fish/data/binary.jpg'].path
44
44
  end
45
45
  end
data/test/entity_test.rb CHANGED
@@ -38,11 +38,11 @@ class EntityTest < Test::Unit::TestCase
38
38
  test 'fetch appropriate class for type' do
39
39
  assert_equal ROCrate::File, ROCrate::DataEntity.specialize({ '@type' => 'File' })
40
40
  assert_equal ROCrate::File, ROCrate::DataEntity.specialize({ '@type' => ['File', 'Image'] })
41
- assert_equal ROCrate::File, ROCrate::DataEntity.specialize({ '@type' => 'SoftwareSourceCode' })
42
- assert_equal ROCrate::File, ROCrate::DataEntity.specialize({ '@type' => 'anything that isnt a directory' })
41
+ assert_equal ROCrate::DataEntity, ROCrate::DataEntity.specialize({ '@type' => 'SoftwareSourceCode' })
42
+ assert_equal ROCrate::DataEntity, ROCrate::DataEntity.specialize({ '@type' => 'anything that isnt a directory' })
43
43
  assert_equal ROCrate::Directory, ROCrate::DataEntity.specialize({ '@type' => 'Dataset' })
44
44
  assert_equal ROCrate::Directory, ROCrate::DataEntity.specialize({ '@type' => ['Dataset', 'Image'] })
45
- assert_equal ROCrate::File, ROCrate::DataEntity.specialize({ '@type' => 'Person' })
45
+ assert_equal ROCrate::DataEntity, ROCrate::DataEntity.specialize({ '@type' => 'Person' })
46
46
  assert_equal ROCrate::File, ROCrate::DataEntity.specialize({ '@type' => ['File', 'Image'], '@id' => 'http://www.external.com' })
47
47
 
48
48
  assert_equal ROCrate::Person, ROCrate::ContextualEntity.specialize({ '@type' => 'Person' })
@@ -91,4 +91,118 @@ class EntityTest < Test::Unit::TestCase
91
91
  assert_equal "http://www.data.com/my%20crate/", ROCrate::Crate.format_id('http://www.data.com/my%20crate'), 'Crate ID should end with /'
92
92
  assert_equal "http://www.data.com/my%20crate/", ROCrate::Crate.format_id('http://www.data.com/my%20crate/')
93
93
  end
94
+
95
+ test 'linked entities' do
96
+ crate = ROCrate::Crate.new
97
+ file = crate.add_file(StringIO.new(''), 'file')
98
+ person = crate.add_person('#bob', { name: 'Bob' })
99
+ file.author = person
100
+
101
+ linked = file.linked_entities
102
+ assert_include linked, person
103
+ assert_equal 1, linked.length
104
+
105
+ linked = crate.linked_entities
106
+ assert_include linked, file
107
+ assert_equal 1, linked.length
108
+
109
+ linked = crate.linked_entities(deep: true)
110
+ assert_include linked, file
111
+ assert_include linked, person
112
+ assert_equal 2, linked.length
113
+ end
114
+
115
+ test 'deleting entities removes linked entities' do
116
+ crate = ROCrate::Crate.new
117
+ file = crate.add_file(StringIO.new(''), 'file')
118
+ person = crate.add_person('#bob', { name: 'Bob' })
119
+ file.author = person
120
+
121
+ assert file.delete
122
+ assert_not_include crate.entities, file
123
+ assert_not_include crate.entities, person
124
+ end
125
+
126
+ test 'deleting entities does not remove dangling entities if option set' do
127
+ crate = ROCrate::Crate.new
128
+ file = crate.add_file(StringIO.new(''), 'file')
129
+ person = crate.add_person('#bob', { name: 'Bob' })
130
+ file.author = person
131
+
132
+ assert file.delete(remove_orphaned: false)
133
+ assert_not_include crate.entities, file
134
+ assert_include crate.entities, person
135
+ end
136
+
137
+ test 'creating files in various ways' do
138
+ stub_request(:get, 'http://example.com/external_ref.txt').to_return(status: 200, body: 'file contents')
139
+
140
+ crate = ROCrate::Crate.new
141
+
142
+ f1 = nil
143
+ Dir.chdir(fixture_dir) { f1 = ROCrate::File.new(crate, 'data.csv') }
144
+ refute f1.source.remote?
145
+ refute f1.source.directory?
146
+ assert_equal 20, f1.source.read.length
147
+ t = Tempfile.new('tf1')
148
+ f1.source.write_to(t)
149
+ t.rewind
150
+ assert_equal 20, t.read.length
151
+
152
+ f2 = ROCrate::File.new(crate, fixture_file('info.txt'), { author: crate.add_person('bob', name: 'Bob').reference })
153
+ refute f2.source.remote?
154
+ refute f2.source.directory?
155
+ assert f2.source.read
156
+ assert_equal 6, f2.source.read.length
157
+ t = Tempfile.new('tf2')
158
+ f2.source.write_to(t)
159
+ t.rewind
160
+ assert_equal 6, t.read.length
161
+
162
+ f3 = ROCrate::File.new(crate, 'http://example.com/external_ref.txt')
163
+ assert f3.source.remote?
164
+ refute f3.source.directory?
165
+ assert f3.source.read
166
+ assert_equal 13, f3.source.read.length
167
+ t = Tempfile.new('tf3')
168
+ f3.source.write_to(t)
169
+ t.rewind
170
+ assert_equal 13, t.read.length
171
+
172
+ f3 = ROCrate::File.new(crate, 'http://example.com/external_ref.txt')
173
+ assert f3.source.remote?
174
+ refute f3.source.directory?
175
+ assert f3.source.read
176
+ assert_equal 13, f3.source.read.length
177
+ t = Tempfile.new('tf3')
178
+ f3.source.write_to(t)
179
+ t.rewind
180
+ assert_equal 13, t.read.length
181
+ end
182
+
183
+ test 'assigning and checking type' do
184
+ crate = ROCrate::Crate.new
185
+ file = ROCrate::File.new(crate, 'data.csv')
186
+
187
+ assert file.has_type?('File')
188
+
189
+ file.type = ['File', 'Workflow']
190
+
191
+ assert file.has_type?('Workflow')
192
+ assert file.has_type?('File')
193
+ refute file.has_type?('Banana')
194
+ end
195
+
196
+ test 'inspecting object truncates very long property list' do
197
+ crate = ROCrate::Crate.new
198
+ entity = ROCrate::ContextualEntity.new(crate, 'hello')
199
+
200
+ assert entity.inspect.start_with?("<#ROCrate::ContextualEntity arcp://uuid,")
201
+
202
+ entity['veryLong'] = ('123456789a' * 100)
203
+
204
+ ins = entity.inspect
205
+ assert ins.length < 1000
206
+ assert ins.end_with?('...>')
207
+ end
94
208
  end
@@ -0,0 +1 @@
1
+ No, I am nested!
@@ -0,0 +1,33 @@
1
+ {
2
+ "@context": [
3
+ "https://w3id.org/ro/crate/1.1/context",
4
+ {
5
+ "@vocab": "http://schema.org/"
6
+ },
7
+ {
8
+ "@base": null
9
+ }
10
+ ],
11
+ "@graph": [
12
+ {
13
+ "@id": "#collection",
14
+ "@type": "RepositoryCollection",
15
+ "name": "Test collection"
16
+ },
17
+ {
18
+ "@id": "./",
19
+ "@type": "Dataset",
20
+ "hasFile": [],
21
+ "hasPart": [{"@id": "#collection"}],
22
+ "name": "testing hasPart"
23
+ },
24
+ {
25
+ "@id": "ro-crate-metadata.json",
26
+ "@type": "CreativeWork",
27
+ "about": {
28
+ "@id": "./"
29
+ },
30
+ "identifier": "ro-crate-metadata.json"
31
+ }
32
+ ]
33
+ }
@@ -24,9 +24,10 @@
24
24
  "about": {
25
25
  "@id": "./"
26
26
  },
27
- "conformsTo": {
28
- "@id": "https://w3id.org/ro/crate/1.1"
29
- }
27
+ "conformsTo": [
28
+ { "@id": "https://w3id.org/ro/crate/1.1" },
29
+ { "@id": "https://about.workflowhub.eu/Workflow-RO-Crate/" }
30
+ ]
30
31
  },
31
32
  {
32
33
  "@id": "./",
@@ -128,6 +129,12 @@
128
129
  "@type": "SoftwareApplication",
129
130
  "name": "Planemo",
130
131
  "url": {"@id": "https://github.com/galaxyproject/planemo"}
132
+ },
133
+ {
134
+ "@id": "https://about.workflowhub.eu/Workflow-RO-Crate/",
135
+ "@type": "CreativeWork",
136
+ "name": "Workflow RO-Crate Profile",
137
+ "version": "0.2.0"
131
138
  }
132
139
  ]
133
140
  }
@@ -0,0 +1,176 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
@@ -0,0 +1,2 @@
1
+ # Unlinked Entity Crate
2
+ Contains entities that are not linked from any other!
@@ -0,0 +1,150 @@
1
+ {
2
+ "@context": [
3
+ "https://w3id.org/ro/crate/1.1/context",
4
+ {
5
+ "TestSuite": "https://w3id.org/ro/terms/test#TestSuite",
6
+ "TestInstance": "https://w3id.org/ro/terms/test#TestInstance",
7
+ "TestService": "https://w3id.org/ro/terms/test#TestService",
8
+ "TestDefinition": "https://w3id.org/ro/terms/test#TestDefinition",
9
+ "PlanemoEngine": "https://w3id.org/ro/terms/test#PlanemoEngine",
10
+ "JenkinsService": "https://w3id.org/ro/terms/test#JenkinsService",
11
+ "TravisService": "https://w3id.org/ro/terms/test#TravisService",
12
+ "GithubService": "https://w3id.org/ro/terms/test#GithubService",
13
+ "instance": "https://w3id.org/ro/terms/test#instance",
14
+ "runsOn": "https://w3id.org/ro/terms/test#runsOn",
15
+ "resource": "https://w3id.org/ro/terms/test#resource",
16
+ "definition": "https://w3id.org/ro/terms/test#definition",
17
+ "engineVersion": "https://w3id.org/ro/terms/test#engineVersion"
18
+ }
19
+ ],
20
+ "@graph": [
21
+ {
22
+ "@id": "ro-crate-metadata.json",
23
+ "@type": "CreativeWork",
24
+ "about": {
25
+ "@id": "./"
26
+ },
27
+ "conformsTo": [
28
+ { "@id": "https://w3id.org/ro/crate/1.1" },
29
+ { "@id": "https://about.workflowhub.eu/Workflow-RO-Crate/" }
30
+ ]
31
+ },
32
+ {
33
+ "@id": "./",
34
+ "@type": "Dataset",
35
+ "name": "sort-and-change-case",
36
+ "description": "sort lines and change text to upper case",
37
+ "license": "Apache-2.0",
38
+ "mainEntity": {
39
+ "@id": "sort-and-change-case.ga"
40
+ },
41
+ "hasPart": [
42
+ {
43
+ "@id": "sort-and-change-case.ga"
44
+ },
45
+ {
46
+ "@id": "LICENSE"
47
+ },
48
+ {
49
+ "@id": "README.md"
50
+ },
51
+ {
52
+ "@id": "test/test1/sort-and-change-case-test.yml"
53
+ }
54
+ ],
55
+ "mentions": [
56
+ {
57
+ "@id": "#test1"
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "@id": "sort-and-change-case.ga",
63
+ "@type": [
64
+ "File",
65
+ "SoftwareSourceCode",
66
+ "ComputationalWorkflow"
67
+ ],
68
+ "programmingLanguage": {
69
+ "@id": "#galaxy"
70
+ },
71
+ "name": "sort-and-change-case"
72
+ },
73
+ {
74
+ "@id": "LICENSE",
75
+ "@type": "File"
76
+ },
77
+ {
78
+ "@id": "README.md",
79
+ "@type": "File"
80
+ },
81
+ {
82
+ "@id": "#galaxy",
83
+ "@type": "ComputerLanguage",
84
+ "name": "Galaxy",
85
+ "identifier": {
86
+ "@id": "https://galaxyproject.org/"
87
+ },
88
+ "url": {
89
+ "@id": "https://galaxyproject.org/"
90
+ }
91
+ },
92
+ {
93
+ "@id": "#test1",
94
+ "name": "test1",
95
+ "@type": "TestSuite",
96
+ "mainEntity": {
97
+ "@id": "sort-and-change-case.ga"
98
+ },
99
+ "instance": [
100
+ {"@id": "#test1_1"}
101
+ ],
102
+ "definition": {"@id": "test/test1/sort-and-change-case-test.yml"}
103
+ },
104
+ {
105
+ "@id": "#test1_1",
106
+ "name": "test1_1",
107
+ "@type": "TestInstance",
108
+ "runsOn": {"@id": "https://w3id.org/ro/terms/test#JenkinsService"},
109
+ "url": "http://example.org/jenkins",
110
+ "resource": "job/tests/"
111
+ },
112
+ {
113
+ "@id": "test/test1/sort-and-change-case-test.yml",
114
+ "@type": [
115
+ "File",
116
+ "TestDefinition"
117
+ ],
118
+ "conformsTo": {"@id": "https://w3id.org/ro/terms/test#PlanemoEngine"},
119
+ "engineVersion": ">=0.70"
120
+ },
121
+ {
122
+ "@id": "https://w3id.org/ro/terms/test#JenkinsService",
123
+ "@type": "TestService",
124
+ "name": "Jenkins",
125
+ "url": {"@id": "https://www.jenkins.io"}
126
+ },
127
+ {
128
+ "@id": "https://w3id.org/ro/terms/test#PlanemoEngine",
129
+ "@type": "SoftwareApplication",
130
+ "name": "Planemo",
131
+ "url": {"@id": "https://github.com/galaxyproject/planemo"}
132
+ },
133
+ {
134
+ "@id": "https://about.workflowhub.eu/Workflow-RO-Crate/",
135
+ "@type": "CreativeWork",
136
+ "name": "Workflow RO-Crate Profile",
137
+ "version": "0.2.0"
138
+ },
139
+ {
140
+ "@id": "#joe",
141
+ "@type": "Person",
142
+ "name": "Joe Jones"
143
+ },
144
+ {
145
+ "@id": "#joehouse",
146
+ "@type": "Organization",
147
+ "name": "Joe's House"
148
+ }
149
+ ]
150
+ }