-
Notifications
You must be signed in to change notification settings - Fork 2
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
Settings schema #48
Settings schema #48
Conversation
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.
Minor tweaks likely needed after changes to #47.
@@ -20,10 +20,11 @@ | |||
], | |||
"dependencies": { | |||
"d3": "^3", | |||
"webcharts": "^1.9" | |||
"webcharts": "^1" |
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.
👍 good catch
scripts/configuration.md
Outdated
controls initial display of unscheduled visits | ||
|
||
**default:** none | ||
|
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.
default = false, no?
scripts/configuration.md
Outdated
|
||
# settings.unscheduled_visit_pattern | ||
`string` | ||
|
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.
is this a string? or a regular expression? (maybe json schema only supports strings?)
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.
nevermind - i see the logic below dealing with this.
|
||
**default:** `"/unscheduled|early termination/i"` | ||
|
||
|
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.
update based on comments from #47
); | ||
settings.unscheduled_visit_regex = new RegExp(pattern, flags); | ||
} | ||
|
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.
This looks good - should also make it easier to support config.unscheduled_visit_list
as suggested in #47 code review
…ve records rather than measures
…s precedence over unscheduled_visit_pattern
Ready for you @jwildfire |
const defaultSettings = { | ||
//Custom settings for this template | ||
import merge from './util/merge'; | ||
|
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.
Not sure I totally see the point of splitting the settings here, but I guess it doesn't hurt anything ... so 🤷♂️
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 needed to pull in the webcharts settings for the configuration wiki and this was the hacky route I chose.
src/onInit/cleanData.js
Outdated
//Warn user of non-numeric endpoints. | ||
if (catMeasures.length) | ||
//Warn user of removed records. | ||
if (nRemoved > 0) | ||
console.warn( |
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.
As mentioned elsewhere, we should move this to a footnote. Created #50
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.
Feature testing passes
Issues
Closes #45