hercules
hercules copied to clipboard
[BUG] Problem with time series for repository with a short lifetime ( <64 day)
Hi! I found that time_series cannot be created for repositories with lifetime lower than 64 days.
It is caused by this constant
https://github.com/src-d/hercules/blob/master/python/labours/modes/devs.py#L51
window = slepian(size // resolution, 0.5)
windows can be blank(if size
< resolution
) that will cause this error:
Traceback (most recent call last):
File "/usr/local/bin/labours", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/labours/cli.py", line 449, in main
modes[mode]()
File "/usr/local/lib/python3.7/site-packages/labours/cli.py", line 349, in devs
max_people=args.max_people,
File "/usr/local/lib/python3.7/site-packages/labours/modes/devs.py", line 66, in show_devs
final[route_map[i]] = convolve(full_history, window, "same")
File "/usr/local/lib/python3.7/site-packages/scipy/signal/signaltools.py", line 811, in convolve
method = choose_conv_method(volume, kernel, mode=mode)
File "/usr/local/lib/python3.7/site-packages/scipy/signal/signaltools.py", line 698, in choose_conv_method
if _fftconv_faster(volume, kernel, mode):
File "/usr/local/lib/python3.7/site-packages/scipy/signal/signaltools.py", line 512, in _fftconv_faster
tuple(out_shape)))
File "/usr/local/lib/python3.7/site-packages/scipy/signal/signaltools.py", line 511, in <genexpr>
fft_time = sum(n * math.log(n) for n in (x.shape + h.shape +
ValueError: math domain error
Why resolution
is set to 64 ? Maybe this value must be calculated based on size
and should always be lower then size
? #
Can reproduce this. Also not working for me.