Skip to content
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

Merged
merged 16 commits into from
Jan 29, 2018
Merged

Test suite, more package names #12

merged 16 commits into from
Jan 29, 2018

Conversation

dvc94ch
Copy link
Collaborator

@dvc94ch dvc94ch commented Jan 26, 2018

No description provided.

dvc94ch and others added 5 commits January 23, 2018 20:00
Renames characteristic -> dielectric.
Renames size -> package_size.
Only uses reasonable units (1F -> 1uF).
Uncomments tests that fail because of tolerance position.
@kasbah kasbah changed the title Package Recognize more package names Jan 26, 2018
const _ = require('underscore');

function handle_option(ctx, options) {
const key = _.find(Object.keys(options), (key) => {
Copy link
Member

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 => {...

@dvc94ch dvc94ch changed the title Recognize more package names Test suite, more package names, WIP lax parser Jan 28, 2018
@kasbah
Copy link
Member

kasbah commented Jan 28, 2018

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.

@kasbah kasbah changed the title Test suite, more package names, WIP lax parser Test suite, more package names Jan 28, 2018
@kasbah
Copy link
Member

kasbah commented Jan 28, 2018

Ok, running the code formatters should make Travis happy and then it can be merged.


describe('temperature', () => {
const cases = {
1: ['1°C', '1C']
Copy link
Member

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.

Copy link
Collaborator Author

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
Copy link
Member

@kasbah kasbah Jan 28, 2018

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.

Copy link
Collaborator Author

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

@kasbah kasbah merged commit f95e301 into kitspace:antlr Jan 29, 2018
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.

2 participants