miga-base 1.2.3.0 → 1.2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/run.rb +14 -1
- data/lib/miga/common/with_daemon_class.rb +1 -1
- data/lib/miga/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5a2b155a7dd169adddb5bc6c1470c252adb2357521e5df1cb37634a80031a123
|
|
4
|
+
data.tar.gz: dc99e9614989ea17bf173c8d1fc8c1f0dd5692030079d54197099471f8f17041
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4d1271135ba5c66a712f6ba7f19e14b351b367342d0a6f8e268ede58f7d85cc5bc2c4830040cdfa0e9bb742075ef61de4bf0cd086e075e9318ba4cd62eba4e2
|
|
7
|
+
data.tar.gz: 95d6881e9c0df6f5d2dbbef6f0ae144ac922a1e1a3b355785f78376cef1ed1e8b783ea08bf24674b6e17ca5543d90cc4555b11f11c261baa574398ddace9bb97
|
data/lib/miga/cli/action/run.rb
CHANGED
|
@@ -5,7 +5,7 @@ require 'miga/cli/action'
|
|
|
5
5
|
|
|
6
6
|
class MiGA::Cli::Action::Run < MiGA::Cli::Action
|
|
7
7
|
def parse_cli
|
|
8
|
-
cli.defaults = { try_load: false, thr: 1, env: false }
|
|
8
|
+
cli.defaults = { try_load: false, thr: 1, env: false, check_first: false }
|
|
9
9
|
cli.parse do |opt|
|
|
10
10
|
cli.opt_object(opt, [:project, :dataset_opt, :result_opt])
|
|
11
11
|
opt.on(
|
|
@@ -25,6 +25,10 @@ class MiGA::Cli::Action::Run < MiGA::Cli::Action
|
|
|
25
25
|
'-e', '--environment',
|
|
26
26
|
'Load PROJECT, DATASET, and CORES from the environment'
|
|
27
27
|
) { |v| cli[:env] = v }
|
|
28
|
+
opt.on(
|
|
29
|
+
'--check-first',
|
|
30
|
+
'Check if the result exists, and run only if it does not'
|
|
31
|
+
) { |v| cli[:check_first] = v }
|
|
28
32
|
end
|
|
29
33
|
end
|
|
30
34
|
|
|
@@ -51,6 +55,15 @@ class MiGA::Cli::Action::Run < MiGA::Cli::Action
|
|
|
51
55
|
# Load project
|
|
52
56
|
p = cli.load_project
|
|
53
57
|
|
|
58
|
+
# Check if result already exists
|
|
59
|
+
if cli[:check_first]
|
|
60
|
+
obj = cli[:dataset] ? p.dataset(cli[:dataset]) : p
|
|
61
|
+
if obj.result(cli[:result])
|
|
62
|
+
cli.say 'Result already exists'
|
|
63
|
+
return
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
54
67
|
# Prepare command
|
|
55
68
|
miga = MiGA.root_path
|
|
56
69
|
opts = {}
|
data/lib/miga/version.rb
CHANGED
|
@@ -12,7 +12,7 @@ module MiGA
|
|
|
12
12
|
# - String indicating release status:
|
|
13
13
|
# - rc* release candidate, not released as gem
|
|
14
14
|
# - [0-9]+ stable release, released as gem
|
|
15
|
-
VERSION = [1.2,
|
|
15
|
+
VERSION = [1.2, 4, 0].freeze
|
|
16
16
|
|
|
17
17
|
##
|
|
18
18
|
# Nickname for the current major.minor version.
|
|
@@ -20,7 +20,7 @@ module MiGA
|
|
|
20
20
|
|
|
21
21
|
##
|
|
22
22
|
# Date of the current gem relese.
|
|
23
|
-
VERSION_DATE = Date.new(2022, 2,
|
|
23
|
+
VERSION_DATE = Date.new(2022, 2, 25)
|
|
24
24
|
|
|
25
25
|
##
|
|
26
26
|
# References of MiGA
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: miga-base
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luis M. Rodriguez-R
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-02-
|
|
11
|
+
date: 2022-02-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: daemons
|