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

Ast improvements #72

Merged
merged 22 commits into from
Jul 8, 2013
Merged

Ast improvements #72

merged 22 commits into from
Jul 8, 2013

Conversation

thesamovar
Copy link
Member

OK I think I've done all the work I wanted on this branch, written tests and documentation - it's ready to go!

@ghost ghost assigned mstimberg Jul 5, 2013
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 99d478c on ast_improvements into d3d51bd on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling c55c122 on ast_improvements into d3d51bd on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 188c583 on ast_improvements into d3d51bd on master.

@mstimberg
Copy link
Member

I fixed a bug in the handling of "not" and worked around a Python 3 issue (arguments don't have an id attribute anymore). I also switched the unit checking to use the new parse_expression_unit function and adapted it to a namespace, specifiers signature. The function support is also there, It works automatically when you use the function wrappers that are used for all the default mathematical functions. I did not implement it for the check_units decorator yet, though. The exponent handling for the power operator also needed some changes for Python 3 (apparently, -0.5 is no longer parsed as a number, but as the unary minus operator applied to 0.5) -- the good thing about this work is that I used the opportunity to support constant, scalar variable values.

I'm only waiting for the current travis run to finish, then I'll merge.

@mstimberg
Copy link
Member

That's odd, github thinks the travis build failed but on the travis page, it completed without error. Either way, merging now.

mstimberg pushed a commit that referenced this pull request Jul 8, 2013
Improvements to the AST-based parsing, now a parsing-based approach to unit checking (instead of an eval-based) is used.
@mstimberg mstimberg merged commit a2fab76 into master Jul 8, 2013
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.

3 participants