miga-base 1.3.20.7 → 1.3.20.8
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/doctor/distances.rb +9 -7
- data/lib/miga/version.rb +1 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 884fa2f8a10738f2de273cb19a10388f96c06bf60c0c1561a450c9a33baf92d8
         | 
| 4 | 
            +
              data.tar.gz: 93b494c3000517ff796380c3de3606066d6a853c170bbbbc7cb55a9dc1ed6e5a
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 366f03ddf1672c236d3378d9da097b363d608729f28eb30c1f4770702994b88959444f7a9ff058fda3999de1cd9df7d90320fd2314d42eac7dbbc1c5b2b9162f
         | 
| 7 | 
            +
              data.tar.gz: 58189a89c46f22c757b62e5d427f6b0fe89d80c692fda3a566aadc743a9e1ca991cfbe5d667af9ee1c05aebe3c6cc28f13ba71300609ad7a19f661b3a5d26e93
         | 
| @@ -92,13 +92,15 @@ module MiGA::Cli::Action::Doctor::Distances | |
| 92 92 |  | 
| 93 93 | 
             
                # Check first if a previous run is complete (and recover it)
         | 
| 94 94 | 
             
                tmp = File.join(project.path, 'doctor-bidirectional.tmp')
         | 
| 95 | 
            -
                 | 
| 96 | 
            -
                 | 
| 97 | 
            -
             | 
| 98 | 
            -
                   | 
| 95 | 
            +
                tmp_chunks = File.join(tmp, 'chunks.txt')
         | 
| 96 | 
            +
                tmp_chunks_val = [chunks, 0]
         | 
| 97 | 
            +
                if File.size?(tmp_chunks)
         | 
| 98 | 
            +
                  tmp_chunks_val = File.readlines(tmp_chunks).map(&:chomp).map(&:to_i)
         | 
| 99 99 | 
             
                end
         | 
| 100 | 
            +
                chunks = tmp_chunks_val[0]
         | 
| 101 | 
            +
                FileUtils.rm_rf(tmp) unless tmp_chunks_val[1] == n
         | 
| 100 102 |  | 
| 101 | 
            -
                # Read data  | 
| 103 | 
            +
                # Read data (threaded)
         | 
| 102 104 | 
             
                FileUtils.mkdir_p(tmp)
         | 
| 103 105 | 
             
                chunks_e = 0 .. chunks - 1
         | 
| 104 106 | 
             
                MiGA::Parallel.distribute(chunks_e, cli[:threads]) do |chunk, k, thr|
         | 
| @@ -121,7 +123,7 @@ module MiGA::Cli::Action::Doctor::Distances | |
| 121 123 | 
             
                cli.say
         | 
| 122 124 |  | 
| 123 125 | 
             
                # Save information to indicate that the run is complete and return
         | 
| 124 | 
            -
                File.open( | 
| 126 | 
            +
                File.open(tmp_chunks, 'w') { |fh| fh.puts(chunks, n) }
         | 
| 125 127 | 
             
                return tmp
         | 
| 126 128 | 
             
              end
         | 
| 127 129 |  | 
| @@ -130,7 +132,7 @@ module MiGA::Cli::Action::Doctor::Distances | |
| 130 132 | 
             
              # fill databases with missing values. Returns the names of the datasets fixed
         | 
| 131 133 | 
             
              # as a Set.
         | 
| 132 134 | 
             
              def merge_bidir_tmp(tmp)
         | 
| 133 | 
            -
                tmp_done = File.join(tmp, ' | 
| 135 | 
            +
                tmp_done = File.join(tmp, 'chunks.txt')
         | 
| 134 136 | 
             
                chunks = File.readlines(tmp_done)[0].chomp.to_i
         | 
| 135 137 |  | 
| 136 138 | 
             
                lower_triangle = []
         | 
    
        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.3, 20,  | 
| 15 | 
            +
              VERSION = [1.3, 20, 8].freeze
         | 
| 16 16 |  | 
| 17 17 | 
             
              ##
         | 
| 18 18 | 
             
              # Nickname for the current major.minor version.
         |