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

Apply fix for jenkins tests #4267

Merged
merged 1 commit into from
Jul 14, 2020
Merged

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Jul 14, 2020

this did the job locally thanks @sphuber, so hopefully will also parse on Jenkins 🤞

fixes #4264

@sphuber
Copy link
Contributor

sphuber commented Jul 14, 2020

Hehe, apologies for making you have to go through that RPN code 😅 although you seem to have come out on top pretty quickly, well done 👍

@sphuber sphuber self-requested a review July 14, 2020 13:25
@chrisjsewell
Copy link
Member Author

success!

although you seem to have come out on top pretty quickly

Haha, yeh its not too bad once you get your head round it. You should have presented it at the tutorial last week, that would have really blown their minds lol

@sphuber
Copy link
Contributor

sphuber commented Jul 14, 2020

Just for reference, as said in the issue, the documentation is using the ArithmeticAddParser implementation for the how-to create a code plugin: https://aiida-core.readthedocs.io/en/latest/howto/plugin_codes.html#handling-parsing-errors
Since we use a literalinclude, the changes here do not really affect the docs. It doesn't use line numbers that have to be updated. However, it does not explain explicitly why the self.out call comes before the final value check. I guess that anyway this is too much detail for this basic how-to, so maybe it is ok that we don't expound on it.

@chrisjsewell
Copy link
Member Author

it does not explain explicitly why the self.out call comes before the final value check

Well I guess its generally best practice anyway, to add outputs where possible before returning exit codes: so that it is easier to debug

@codecov
Copy link

codecov bot commented Jul 14, 2020

Codecov Report

Merging #4267 into develop will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4267      +/-   ##
===========================================
- Coverage    79.18%   79.18%   -0.00%     
===========================================
  Files          468      468              
  Lines        34476    34476              
===========================================
- Hits         27297    27295       -2     
- Misses        7179     7181       +2     
Flag Coverage Δ
#django 71.10% <100.00%> (-<0.01%) ⬇️
#sqlalchemy 71.93% <100.00%> (ø)
Impacted Files Coverage Δ
aiida/parsers/plugins/arithmetic/add.py 84.62% <100.00%> (ø)
aiida/engine/daemon/client.py 72.58% <0.00%> (-1.14%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b316ab3...589f2da. Read the comment docs.

Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chrisjsewell !

@sphuber sphuber merged commit aad2d61 into aiidateam:develop Jul 14, 2020
sphuber pushed a commit that referenced this pull request Aug 27, 2020
…ue (#4267)

For the recent documentation revamp, the `ArithmeticAddCalculation` and
`ArithmeticAddParser` were simplified significantly, by getting rid off
as much as the unnecessary code, because they are being literally
included as example for the basic how-to create a code plugin.

A part that was removed was the `settings` input node that allowed to
change the behavior of the parser and allow negative sums instead of it
returning an exit code. This, however, in turn cause the Reverse Polish
Notation tests on Jenkins to fail. Since these tests are not required to
pass, the changes were merged without a fix.

In the scope of the RPN tests, negative sums are fine, which anyway is
just a mechanism to introduce some kind of failure mode for demonstration
purposes. To fix this, without making the logic of the parser more
complex, we simply change the order of attaching the output node and
performing the final check. Since the RPN workchains only check if the
output node is there and do not care about the exit status of the
calculation, they will happily continue and the code of the parser keeps
the same complexity.
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.

Jenkins Failure: Polish Workchain Error
2 participants