-
Notifications
You must be signed in to change notification settings - Fork 13
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
Test suite, more package names #12
Conversation
Renames characteristic -> dielectric. Renames size -> package_size. Only uses reasonable units (1F -> 1uF). Uncomments tests that fail because of tolerance position.
js/lib/electro_grammar_listener.js
Outdated
const _ = require('underscore'); | ||
|
||
function handle_option(ctx, options) { | ||
const key = _.find(Object.keys(options), (key) => { |
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.
Do you need underscore? You can do Object.keys(options).find(key => {...
It was easier to just merge these? It does make it harder to check if previously reviewed stuff has been changed. If you wanted commits from other branches you could have cherry-picked or merged those and left the PRs open. 121038b should not be included in this, I am sure it broke everything. Also, you left behind 3 commits I made to your testing branch that enabled CI testing and added formatting scripts. |
Ok, running the code formatters should make Travis happy and then it can be merged. |
test/test_units.js
Outdated
|
||
describe('temperature', () => { | ||
const cases = { | ||
1: ['1°C', '1C'] |
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.
Wouldn't this be a problem if we include batteries in the grammar? 1C could be a charge/discharge rating.
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.
Yes, you're right. I suggest we revisit this then dough.
I'll be working on key (=|>=|<=|<|>) value
next, but I'm taking a break to hack on qeda/netlistsvg and migrating the pycircuit component library to qeda. I think the work on qeda/netlistsvg will benefit replicad and electrogrammar too.
FYI: I want to make the strict parser more strict when it comes to units. 1V is a voltage, 1v, 1volt, 1Volt should not be voltages in strict mode.
python3/**/ElectroGrammar* | ||
db/*.json |
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 is another minor thing but could you configure your editor to add new lines at the end of files? It just causes diff noise especially if we have different settings.
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 do have it configured like that. I think I may have used echo 'db/*.json'>>.gitignore
No description provided.