Skip to content

Conversation

@thoran
Copy link
Contributor

@thoran thoran commented Jun 14, 2020

No description provided.

Comment on lines 61 to 64
data = data.sort_by { |row| row[date_time_key] }
output = []
period_values = []
previous_wma = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
data = data.sort_by { |row| row[date_time_key] }
output = []
period_values = []
previous_wma = nil
data = data.sort_by { |row| row[date_time_key] }
output = []
period_values = []
previous_wma = nil

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed as per request.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I even added back the empty line after line 61 so as to be consistent with Ema.

Copy link
Contributor

@jasonl99 jasonl99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some minor style (use blank lines to separate blocks of code (do..end, etc). I think scrambling the data order of the incoming data (in the rspec test) will also ensure that it's sorting properly when it comes in.

Otherwise, looks great!

Copy link
Contributor

@alexnsolo alexnsolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @thoran!

@alexnsolo alexnsolo merged commit a9482f8 into intrinio:master Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants