ro-crate 0.4.9 → 0.4.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +13 -13
- data/README.md +39 -0
- data/lib/ro_crate/model/crate.rb +48 -6
- data/lib/ro_crate/model/data_entity.rb +5 -4
- data/lib/ro_crate/model/directory.rb +2 -4
- data/lib/ro_crate/model/entity.rb +41 -4
- data/lib/ro_crate/model/entry.rb +2 -2
- data/lib/ro_crate/model/file.rb +2 -4
- data/lib/ro_crate/model/metadata.rb +9 -1
- data/lib/ro_crate/model/organization.rb +1 -1
- data/lib/ro_crate/model/preview.rb +3 -15
- data/lib/ro_crate/model/preview_generator.rb +40 -0
- data/lib/ro_crate/model/remote_entry.rb +1 -12
- data/lib/ro_crate/reader.rb +76 -19
- data/lib/ro_crate/writer.rb +4 -4
- data/lib/ro_crate.rb +2 -1
- data/ro_crate.gemspec +3 -3
- data/test/crate_test.rb +58 -3
- data/test/directory_test.rb +21 -21
- data/test/entity_test.rb +114 -0
- data/test/fixtures/biobb_hpc_workflows-condapack.zip +0 -0
- data/test/fixtures/conflicting_data_directory/info.txt +1 -0
- data/test/fixtures/conflicting_data_directory/nested.txt +1 -0
- data/test/fixtures/nested_directory.zip +0 -0
- data/test/fixtures/ro-crate-galaxy-sortchangecase/LICENSE +176 -0
- data/test/fixtures/ro-crate-galaxy-sortchangecase/README.md +6 -0
- data/test/fixtures/ro-crate-galaxy-sortchangecase/ro-crate-metadata.json +133 -0
- data/test/fixtures/ro-crate-galaxy-sortchangecase/sort-and-change-case.ga +118 -0
- data/test/fixtures/ro-crate-galaxy-sortchangecase/test/test1/input.bed +3 -0
- data/test/fixtures/ro-crate-galaxy-sortchangecase/test/test1/output_exp.bed +3 -0
- data/test/fixtures/ro-crate-galaxy-sortchangecase/test/test1/sort-and-change-case-test.yml +8 -0
- data/test/fixtures/sparse_directory_crate/ro-crate-preview.html +60 -59
- data/test/reader_test.rb +83 -40
- data/test/test_helper.rb +5 -1
- data/test/writer_test.rb +59 -2
- metadata +26 -8
data/lib/ro_crate/writer.rb
CHANGED
@@ -16,14 +16,14 @@ module ROCrate
|
|
16
16
|
# @param overwrite [Boolean] Whether or not to overwrite existing files.
|
17
17
|
def write(dir, overwrite: true)
|
18
18
|
FileUtils.mkdir_p(dir) # Make any parent directories
|
19
|
-
@crate.
|
19
|
+
@crate.payload.each do |path, entry|
|
20
20
|
fullpath = ::File.join(dir, path)
|
21
21
|
next if !overwrite && ::File.exist?(fullpath)
|
22
22
|
next if entry.directory?
|
23
23
|
FileUtils.mkdir_p(::File.dirname(fullpath))
|
24
24
|
temp = Tempfile.new('ro-crate-temp')
|
25
25
|
begin
|
26
|
-
entry.
|
26
|
+
entry.write_to(temp)
|
27
27
|
temp.close
|
28
28
|
FileUtils.mv(temp, fullpath)
|
29
29
|
ensure
|
@@ -38,9 +38,9 @@ module ROCrate
|
|
38
38
|
# @param destination [String, ::File] The destination where to write the RO-Crate zip.
|
39
39
|
def write_zip(destination)
|
40
40
|
Zip::File.open(destination, Zip::File::CREATE) do |zip|
|
41
|
-
@crate.
|
41
|
+
@crate.payload.each do |path, entry|
|
42
42
|
next if entry.directory?
|
43
|
-
zip.get_output_stream(path) { |s| entry.
|
43
|
+
zip.get_output_stream(path) { |s| entry.write_to(s) }
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
data/lib/ro_crate.rb
CHANGED
@@ -10,10 +10,11 @@ require 'ro_crate/json_ld_hash'
|
|
10
10
|
require 'ro_crate/model/entity'
|
11
11
|
require 'ro_crate/model/data_entity'
|
12
12
|
require 'ro_crate/model/file'
|
13
|
-
require 'ro_crate/model/remote_entry'
|
14
13
|
require 'ro_crate/model/entry'
|
14
|
+
require 'ro_crate/model/remote_entry'
|
15
15
|
require 'ro_crate/model/directory'
|
16
16
|
require 'ro_crate/model/metadata'
|
17
|
+
require 'ro_crate/model/preview_generator'
|
17
18
|
require 'ro_crate/model/preview'
|
18
19
|
require 'ro_crate/model/crate'
|
19
20
|
require 'ro_crate/model/contextual_entity'
|
data/ro_crate.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'ro-crate'
|
3
|
-
s.version = '0.4.
|
3
|
+
s.version = '0.4.13'
|
4
4
|
s.summary = 'Create, manipulate, read RO-Crates.'
|
5
5
|
s.authors = ['Finn Bacall']
|
6
6
|
s.email = 'finn.bacall@manchester.ac.uk'
|
@@ -8,11 +8,11 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.homepage = 'https://github.com/ResearchObject/ro-crate-ruby'
|
9
9
|
s.require_paths = ['lib']
|
10
10
|
s.licenses = ['MIT']
|
11
|
-
s.add_runtime_dependency 'addressable', '
|
11
|
+
s.add_runtime_dependency 'addressable', '>= 2.7', '< 2.9'
|
12
12
|
s.add_runtime_dependency 'rubyzip', '~> 2.0.0'
|
13
13
|
s.add_development_dependency 'rake', '~> 13.0.0'
|
14
14
|
s.add_development_dependency 'test-unit', '~> 3.2.3'
|
15
|
-
s.add_development_dependency 'simplecov', '~> 0.
|
15
|
+
s.add_development_dependency 'simplecov', '~> 0.21.2'
|
16
16
|
s.add_development_dependency 'yard', '~> 0.9.25'
|
17
17
|
s.add_development_dependency 'webmock', '~> 3.8.3'
|
18
18
|
end
|
data/test/crate_test.rb
CHANGED
@@ -164,6 +164,18 @@ class CrateTest < Test::Unit::TestCase
|
|
164
164
|
assert_equal 2, crate1.contextual_entities.first.properties['cats']
|
165
165
|
end
|
166
166
|
|
167
|
+
test 'sharing entities' do
|
168
|
+
crate = ROCrate::Crate.new
|
169
|
+
info = crate.add_file(fixture_file('info.txt'),'the_info.txt')
|
170
|
+
bob = crate.add_person('bob', name: 'Bob Jones')
|
171
|
+
crate.author = bob
|
172
|
+
info.author = bob
|
173
|
+
|
174
|
+
assert_equal [bob], crate.contextual_entities
|
175
|
+
assert_equal bob, info.author
|
176
|
+
assert_equal bob, crate.author
|
177
|
+
end
|
178
|
+
|
167
179
|
test 'external files' do
|
168
180
|
crate = ROCrate::Crate.new
|
169
181
|
local = crate.add_file(fixture_file('info.txt'))
|
@@ -203,7 +215,7 @@ class CrateTest < Test::Unit::TestCase
|
|
203
215
|
crate = ROCrate::Crate.new
|
204
216
|
entities = crate.add_all(fixture_file('directory').path, include_hidden: true)
|
205
217
|
|
206
|
-
paths = crate.
|
218
|
+
paths = crate.payload.keys
|
207
219
|
assert_equal 11, paths.length
|
208
220
|
assert_includes paths, 'data'
|
209
221
|
assert_includes paths, 'root.txt'
|
@@ -238,7 +250,7 @@ class CrateTest < Test::Unit::TestCase
|
|
238
250
|
|
239
251
|
assert_empty entities
|
240
252
|
|
241
|
-
paths = crate.
|
253
|
+
paths = crate.payload.keys
|
242
254
|
assert_equal 11, paths.length
|
243
255
|
assert_includes paths, 'data'
|
244
256
|
assert_includes paths, 'root.txt'
|
@@ -266,7 +278,7 @@ class CrateTest < Test::Unit::TestCase
|
|
266
278
|
crate = ROCrate::Crate.new
|
267
279
|
entities = crate.add_all(fixture_file('directory').path)
|
268
280
|
|
269
|
-
paths = crate.
|
281
|
+
paths = crate.payload.keys
|
270
282
|
assert_equal 8, paths.length
|
271
283
|
assert_includes paths, 'data'
|
272
284
|
assert_includes paths, 'root.txt'
|
@@ -293,4 +305,47 @@ class CrateTest < Test::Unit::TestCase
|
|
293
305
|
|
294
306
|
assert_equal "5678\n", crate.dereference('data/info.txt').source.read
|
295
307
|
end
|
308
|
+
|
309
|
+
test 'can delete entities' do
|
310
|
+
crate = ROCrate::Crate.new
|
311
|
+
file = crate.add_file(StringIO.new(''), 'file')
|
312
|
+
person = crate.add_person('#bob', { name: 'Bob' })
|
313
|
+
file.author = person
|
314
|
+
|
315
|
+
assert crate.delete(file)
|
316
|
+
assert_not_include crate.entities, file
|
317
|
+
assert_not_include crate.entities, person
|
318
|
+
end
|
319
|
+
|
320
|
+
test 'can delete entities by id' do
|
321
|
+
crate = ROCrate::Crate.new
|
322
|
+
file = crate.add_file(StringIO.new(''), 'file')
|
323
|
+
person = crate.add_person('#bob', { name: 'Bob' })
|
324
|
+
file.author = person
|
325
|
+
|
326
|
+
assert crate.delete('file')
|
327
|
+
assert_not_include crate.entities, file
|
328
|
+
assert_not_include crate.entities, person
|
329
|
+
end
|
330
|
+
|
331
|
+
test 'legacy entries method still returns same result as payload' do
|
332
|
+
crate = ROCrate::Crate.new
|
333
|
+
crate.add_all(fixture_file('directory').path)
|
334
|
+
|
335
|
+
paths = crate.entries.keys
|
336
|
+
assert_equal 8, paths.length
|
337
|
+
assert_includes paths, 'data'
|
338
|
+
assert_includes paths, 'root.txt'
|
339
|
+
assert_includes paths, 'info.txt'
|
340
|
+
assert_includes paths, 'data/binary.jpg'
|
341
|
+
assert_includes paths, 'data/info.txt'
|
342
|
+
assert_includes paths, 'data/nested.txt'
|
343
|
+
assert_not_includes paths, '.dotfile'
|
344
|
+
assert_not_includes paths, '.dir'
|
345
|
+
assert_not_includes paths, '.dir/test.txt'
|
346
|
+
assert_includes paths, 'ro-crate-metadata.json'
|
347
|
+
assert_includes paths, 'ro-crate-preview.html'
|
348
|
+
|
349
|
+
assert_equal crate.payload.keys, crate.entries.keys
|
350
|
+
end
|
296
351
|
end
|
data/test/directory_test.rb
CHANGED
@@ -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
|
-
|
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')),
|
11
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')),
|
12
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')),
|
13
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')),
|
14
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')),
|
15
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')),
|
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
|
-
|
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')),
|
25
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')),
|
26
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')),
|
27
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')),
|
28
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')),
|
29
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')),
|
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
|
-
|
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')),
|
39
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/root.txt')),
|
40
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data')),
|
41
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/info.txt')),
|
42
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/nested.txt')),
|
43
|
-
assert_equal ::File.expand_path(::File.join(base_path, 'directory/data/binary.jpg')),
|
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
@@ -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
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
abcd
|
@@ -0,0 +1 @@
|
|
1
|
+
No, I am nested!
|
Binary file
|
@@ -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,6 @@
|
|
1
|
+
# Galaxy mini workflow
|
2
|
+
|
3
|
+
A tiny Galaxy workflow that sorts tabular lines according to the first column
|
4
|
+
and changes the text to upper case.
|
5
|
+
|
6
|
+
This RO-Crate is based on an [example from the Life Monitor repository](https://github.com/crs4/life_monitor/tree/8437be177822d0e2b3fed30db094b91c2fc14391/interaction_experiments/data/crates/ro-crate-galaxy-sortchangecase).
|