-
Notifications
You must be signed in to change notification settings - Fork 42
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
Updated CI #25
Merged
Merged
Updated CI #25
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
18a52d4
Update .travis.yml
ewu63 2b6e5bc
Update .travis.yml
ewu63 e8e90cf
Removed py2
ewu63 f198d39
Removed pip cache
ewu63 aa15119
Update .travis.yml
ewu63 a43fbe6
Added back the example builds as tests
ewu63 f467663
added tests for building the examples
ewu63 e1e45a5
Merge branch 'master' into travis-test
ewu63 565dce7
Update .travis.yml
ewu63 47fd876
Update .travis.yml
ewu63 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think this should only be asserted, if pdflatex is installed, otherwise it will fail.
Like here: https://github.com/onodip/OpenMDAO-XDSM/blob/master/omxdsm/tests/test_xdsm_viewer.py#L167
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.
Really good point, will borrow your approach from the XDSM plugin, thanks for pointing this out.
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.
Hmm should the logic be changed to:
self.assertTrue(not pdflatex or (pdflatex and os.path.isfile(f + '.pdf')))
?The way it's done in the referenced repo would mean that if pdflatex is installed, then it doesn't actually check
isfile
right?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 equivalent. Either
not pdflatex
is True, in this case the statement after theor
is not even evaluated (since the PDF cannot be possibly created, it is not an error, if the file does not exist, so this is okay). Ifnot pdflatex
is False - sopdflatex
is installed, then it checks the file. In your line the or is only reached, ifpdflatex
is True, so it does not have to be checked again, thatpdflatex
is True.I added below a snippet, which shows, that the two approaches give the same result in all combinations.
s3
is there to clarify the precedence.a=pdflatex
,b=os.path.isfile(f + '.pdf')
Note: I found another minor logical error in the code. If pdflatex is not installed, and the file is there, the assertion is okay. This could be suspicious (maybe the file was there before the test, and therefore the test would always pass), but since a temporarily directory is used for the tests, that cannot be the case. The totally correct way would be
(a and b) or ((not a) and (not b))
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.
Right that makes sense, thanks for that. Cheers!