-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata #1642
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1642 +/- ##
==========================================
+ Coverage 77.83% 77.87% +0.03%
==========================================
Files 232 234 +2
Lines 18209 18156 -53
==========================================
- Hits 14173 14139 -34
+ Misses 4036 4017 -19
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also are there script methods for metadata that need to be updated?
@@ -79,7 +79,7 @@ def search | |||
start, stop = parse_time_input(x_start: params[:start], x_stop: params[:stop]) | |||
q = params[:q] | |||
raise NarrativeInputError "Must include q value" if q.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still Narrative
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I haven't made it up the chain yet to the controller and frontend
@@ -79,7 +79,7 @@ def search | |||
start, stop = parse_time_input(x_start: params[:start], x_stop: params[:stop]) | |||
q = params[:q] | |||
raise NarrativeInputError "Must include q value" if q.nil? | |||
model_array = @model_class.get(scope: params[:scope], start: start, stop: stop) | |||
model_array = @model_class.range(scope: params[:scope], start: start, stop: stop) | |||
model_array.find { |model| model.description.include? q } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is q?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment says "The string to contain in the narrative description". Worst variable name ever though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -18,26 +18,25 @@ | |||
# copyright holder | |||
|
|||
require 'cosmos/models/metadata_model' | |||
require 'time' | |||
|
|||
class MetadataController < ApplicationController | |||
def initialize | |||
@model_class = Cosmos::MetadataModel | |||
end | |||
|
|||
def parse_time_input(x_start:, x_stop:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this? Why does it default to +/- 7 days?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know but I didn't change it. It doesn't match the comment either which says start is minus 12 hrs and end is plus 2 days. I'm honestly not sure when the search feature is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
No description provided.