-
Notifications
You must be signed in to change notification settings - Fork 0
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
CAPParser #2
CAPParser #2
Conversation
…evaluated on the fly)
2-stage parsing technique
}) | ||
|
||
describe('Simple equation', () => { | ||
it('Evaluates the equation, maintaining order of ops', () => { |
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.
Evaluates the equation
is a bit redundant here and in the following two test cases.
I'd say just go with
it('maintains order of operations', () => {
and similarly for the other 2.
}) | ||
|
||
describe('Complex boolean operation', () => { | ||
it('evals', () => { |
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.
Just for readability:
it('evaluates correctly', () => {
}) | ||
|
||
describe('Date difference operations', () => { | ||
it('evals', () => { |
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.
Same as above, maybe just replace with 'evaluates correctly' for now.
@@ -1,12 +1,79 @@ | |||
import 'mocha'; | |||
import { expect } from 'chai'; | |||
import InstrumentLogicParser from '../../jsx/lib/InstrumentLogicParser'; | |||
const Evaluator = require('/var/www/LORIS/Loris/jsx/lib/CAPParser/js/Evaluator'); |
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.
Should be relative path. Also should use ES6 import syntax
package.json
Outdated
@@ -6,7 +6,9 @@ | |||
"doc": "docs", | |||
"test": "test" | |||
}, | |||
"dependencies": {}, | |||
"dependencies": { | |||
"moment": "^2.18.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.
Since we compile all the JS and include it in the repo I think we can consider this as a devDependency
.
} | ||
} | ||
|
||
export default InstrumentLogicParser; |
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.
Can be removed (the entire file)
…#2833 This pull request adding e.examinerID into "group by" clause. Fix the error in Mysql 5.7. [Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'loris_test.e.examinerID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by] https://redmine.cbrain.mcgill.ca/issues/12513
…#2872 This pull request adding e.examinerID into "group by" clause of the examiner module to fix the following error in MySQL 5.7: "Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'dbname.e.examinerID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"
fix candidate issue and transpile
parser