advance 0.3.16 → 0.3.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87a372164e0d46e568166ba11fce291eefa9f5a0628fdc1992c995b210274bf6
4
- data.tar.gz: 51337fc616189864ff30bb54eb07bc63d0a1acdb3e77b61f6a84254ffccabe52
3
+ metadata.gz: 1e0ac05e79a457d37a7bf18aae36c8276ecb029493bbc19a03c6410d9774dd3e
4
+ data.tar.gz: b915a139b4d433be5c3751c3b9cb980bd6d4a0352d6f2fe7900d459dda962080
5
5
  SHA512:
6
- metadata.gz: 5410277c76fb51e33ccd5c6efd0e4f738c3bec15b400595077aa06bdea985f2bc92442ffbdbafb47edb3ea91d367c93e0bb88817bf6c3bb245b27c1b7caa8709
7
- data.tar.gz: 3671108e3f44686fc92291cde4dd62c9bbc9b2b098a9eb413396472c53dcd7f67710d50e64e534968de0fc00f5524b0762ea59a028b6f31ded9415a61285f6ca
6
+ metadata.gz: bd189c4214a299871a06704bd4424dc6b0e6ef8b41acf8bfdac5e02400af80d916909b88e80d1c3e44688292282ad549090fc8f432ab0b79cbd743e13b28f4ff
7
+ data.tar.gz: 4f8e340937f6801a90a02f9d700fbab7502e8e021dc6138b6b54fb544cc662d79fba449d82bc8eaeb7ed47c6cb2ed3c88ee486f4d345f92d3178c1288895696c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- advance (0.3.16)
4
+ advance (0.3.18)
5
5
  team_effort
6
6
 
7
7
  GEM
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ input_dir="$1"
3
+ find $input_dir -type f \! -name 'log' -exec cp -vn {} . \;
4
+
data/lib/advance.rb CHANGED
@@ -79,6 +79,11 @@ module Advance
79
79
  raise "capture_column_names_from_csv cannot be the first step"
80
80
  end
81
81
 
82
+ if File.exist?(".meta")
83
+ read_column_names_from_meta
84
+ return
85
+ end
86
+
82
87
  previous_dir_path = get_previous_dir_path
83
88
  input_file_path = previous_file_path(previous_dir_path)
84
89
  CSV.foreach(input_file_path, :headers => true) do |row|
@@ -87,6 +92,18 @@ module Advance
87
92
  end
88
93
  end
89
94
 
95
+ def read_column_names_from_meta
96
+ meta = JSON.parse(File.read(".meta"))
97
+ meta["runs"].each do |run|
98
+ run.each do |step|
99
+ if step["columns"]
100
+ $column_names = step["columns"].map(&:to_sym)
101
+ return
102
+ end
103
+ end
104
+ end
105
+ end
106
+
90
107
  def advance(processing_mode, label, command)
91
108
  $redo_mode ||= :checking
92
109
  $step ||= 0
@@ -1,3 +1,3 @@
1
1
  module Advance
2
- VERSION = "0.3.16"
2
+ VERSION = "0.3.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.16
4
+ version: 0.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - janemacfarlane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-27 00:00:00.000000000 Z
11
+ date: 2019-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: team_effort
@@ -81,6 +81,7 @@ executables:
81
81
  - csv_select.rb
82
82
  - csv_select_nh.rb
83
83
  - csv_split_on_change_nh.rb
84
+ - remove_logs_and_sub_dirs
84
85
  - setup
85
86
  - split_csv.rb
86
87
  extensions: []
@@ -100,6 +101,7 @@ files:
100
101
  - bin/csv_select.rb
101
102
  - bin/csv_select_nh.rb
102
103
  - bin/csv_split_on_change_nh.rb
104
+ - bin/remove_logs_and_sub_dirs
103
105
  - bin/setup
104
106
  - bin/split_csv.rb
105
107
  - lib/advance.rb