-
Notifications
You must be signed in to change notification settings - Fork 289
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
add windows and mac builds to ci #873
add windows and mac builds to ci #873
Conversation
a8d8261
to
29686e3
Compare
- seemed like contains didn't do what I expected, but I suspect the environment variable wasn't being read
Codecov Report
@@ Coverage Diff @@
## master #873 +/- ##
==========================================
- Coverage 86.63% 86.12% -0.52%
==========================================
Files 183 183
Lines 17874 17707 -167
Branches 1971 1973 +2
==========================================
- Hits 15486 15250 -236
- Misses 1904 1959 +55
- Partials 484 498 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
One of the major issues with the tests on windows has to do with the use of |
- windows is stricter about using file handles that are already open, so switching to a pattern where TemporaryDirectory is used to create things should be safer. Its also cleaner than the mkdtemp/try/except pattern that had been used in the tests before.
- by swapping all the paths out the logic that was isolating certain manifests was skipping _all_ the manifests
@@ -1,4 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<?xml version="1.0" encoding="UTF-8"?> |
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.
it's a shame the BOM doesn't show in the diff
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.
yeah! oddly enough git diff
from the command line did show it to me
Xes tests are supposed to only work on linux though it was where they were developed. Where can I see the errors so I can try and properly fix? |
The error was:
|
@thiblahute would you object to me checking in this PR as is? If you'd like to follow up with a fix for windows support in a further PR, that might be easier for you to iterate with. |
I think this is only a problem with python 2, since it is related to mixing the In the if type(position) is not int:
# TODO: remove below once python2 has ended
# currently in python2, can receive either an int or
# a long
if isinstance(position, numbers.Integral):
position = int(position)
# may still be an int if the position is too big
if type(position) is not int:
_wrong_type_for_arg(position, "int", "position") I was trying to stick to one type between both versions of python, I thought a fix for the current problem with test But it seems that test On my platform (64bit linux), under python 2.7.18, the following is the behaviour I get:
So the conversion would have worked fine. It would be weird if this was different under windows, but if it is 32bit, it may be because In any case, this is only a problem under python 2. So the tests should be ok to run on any platform with python 3. If you are going to drop python 2 support anyway since it is deprecated, then this won't need a fix. |
If you are maintaining python2 support, you could change https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/master/contrib/opentimelineio_contrib/adapters/xges.py#L3506 to something like
And do the same here on these two lines:
|
We won't be dropping Python 2 support until we're able to drop VFX platform 2020 support (I think thats the version), which will likely be another couple of years. I'll see if I have time to back port the fixes, thanks. |
I guess a follow up question is that if Xges itself requires python3, maybe it makes sense to mute the tests for this adapter under python 2 as well. |
After thinking about it some more, I think what makes sense is to limit the XGES tests to run only on python3/linux. That seems to match with the intended platform, and unblocks this PR, without completely disabling those tests. Furthermore, longer term we're going to be moving the larger contrib adapters out into their own repositories and use the |
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.
All looks reasonable to me. I did wonder after reading what our pathsep story is deeper within OTIO.
This is just being mangled for testing purposes. If you generate it manually you'll OS-correct absolute paths. And there are very few places where OTIO actually deals with paths, AFAIK those go through the right abstractions. but its a good question. |
Enables GitHub actions CI build/tests for windows and MacOS.
tempfile.TemporaryDirectory
(native on python3, frombackports.tempfile
on python2).backports.tempfile
as a dependency on python2 buildspremiere_generators.xml
had a "BOM" (Byte Order Mark: https://en.wikipedia.org/wiki/Byte_order_mark) that was tripping up on windows/3.7 runs. This was removed from the file. I'm not really clear on whether this is supposed to be supported or not, but since it was an outlier, I stripped it out for now.