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

CWL-related fixes for python 2.7 tests #12

Merged
merged 5 commits into from
Jun 3, 2020
Merged

Conversation

rtobar
Copy link
Contributor

@rtobar rtobar commented Jun 3, 2020

This a series of commits that fix the python 2.7 test failures. As mentioned in an earlier email I first took out the test-only dependencies into a new test-requirements.txt file, and also included there the necessary bits to ensure the test indirect dependencies are correctly installed.

After fixing the initial dependency conflict problem I found another one, which I also fixed. Once those were fixed yet another problem surfaced, related to how cwlgen handles unicode objects (it doesn't). I therefore added a fix for that problem as well.

After all these changes the Travis builds are back to green.

This removes these test-only dependencies from the daliuge-translator
package, which otherwise doesn't needs these.

There was also a conflict with the ruamel.yaml dependency as needed by
cwlgen (used by daliuge-translator) and cwltool (used by the tests),
where the version constraints on ruamel.yaml stated by each package are
not fully exclusive, but are different enough that pip will install a
version of ruamel.yaml that satisfies only one of the packages. By
specifying a specific version of this package we ensure both our
packages get what they need.

There was a second similar issue with Travis' pip not automatically
upgrading the "typing" package: version 3.6.6 comes pre-installed in the
virtual environment created by Travis, and the first package to require
it (cwltool) requires >= 3.5.3, and therefore the version installed is
deemed as safe. A later package (typing_extensions, required by cwltool
too) requires >= 3.7.4, however pip doesn't automatically upgrade the
installed version. This issues an "ERROR" message by pip, which still
exits with a 0 return code, and therefore the unit tests still run (and
fail).

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
This is different to common.b2s (always turns bytes into a str instance)
and six.b (always turns a str instance into bytes): this one turns a
text object (str in py3, unicode in 2.7) into a str object. One does not
usually need this, but we have now a use case.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
cwlgen doesn't know how to serialize unicode objects in python 2.7,
making our tests fail. This commit fixes that by turning unicode objects
into str instances before giving them to cwlgen.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 70.156% when pulling 39e91b3 on cwl-27-fixes into a5177e6 on feature/export-cwl.

@james-strauss-uwa
Copy link
Collaborator

Looks great, thanks for following up the subsequent issues @rtobar 👍

@rtobar rtobar merged commit 39e91b3 into feature/export-cwl Jun 3, 2020
@rtobar rtobar deleted the cwl-27-fixes branch June 3, 2020 08:39
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.

None yet

3 participants