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

Appveyor: Problem with dependencies #1425

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Techievena
Copy link
Member

XMLBear is skipped on Appveyor Windows builds
due to dependency issues. Fixes all dependency
issues.

Fixes #1354

For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!

Checklist

  • I read the commit guidelines and I've followed
    them.
  • I ran coala over my code locally. (All commits have to pass
    individually.
    It is not sufficient to have "fixup commits" on your PR,
    our bot will still report the issues for the previous commit.) You will
    likely receive a lot of bot comments and build failures if coala does not
    pass on every single commit!

After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.

Please consider helping us by reviewing other peoples pull requests as well:

The more you review, the more your score will grow at coala.io and we will
review your PRs faster!

@AsnelChristian
Copy link
Member

Your commit message isn't clear, would you improve on that ?

@AsnelChristian
Copy link
Member

i am not sure why, your tests failed both on CI and travis ....

@AsnelChristian
Copy link
Member

oooh, it seems XMLBearTest are still being skipped on appveyor

@Techievena
Copy link
Member Author

Techievena commented Feb 10, 2017

@AsnelChristian Referred this website https://atom.io/packages/linter-xmllint and @jayvdb asked to install packages using nuget. Did I miss anything?

@@ -56,6 +56,15 @@ install:
- "npm config set loglevel warn"
- "npm install"

- curl -fsSL ftp://ftp.zlatkovic.com/libxml/iconv-1.9.2.win32.zip -o iconv.zip
Copy link
Member

Choose a reason for hiding this comment

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

Does Windows even have curl and 7z installed by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

@adtac It is installing the packages correctly, curl and 7z must be installed by default I guess

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Appveyor has lots of non-standard Windows software installed, especially msys & cygwin. See https://www.appveyor.com/docs/installed-software/

Copy link
Member

Choose a reason for hiding this comment

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

Though it is probably quicker to use wget "ftp://ftp.zlatkovic.com/libxml/*.win32.zip" to batch download the files, and 7z may also have a batch unzip mode.

Copy link
Member

@Mixih Mixih Mar 21, 2017

Choose a reason for hiding this comment

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

Please don't user curl. It caused problems in another place: coala/coala#3962. Use the builtin DownloadFile

Copy link
Member

Choose a reason for hiding this comment

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

Disregard above comment^.

@jayvdb
Copy link
Member

jayvdb commented Feb 15, 2017

Circle has been fixed with #1434 ; please rebase.

Copy link
Member

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

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

Why is this "review pending"?
On both 32bit and 64bit Appveyor builds, all xml tests are skipped.

.ci/appveyor.yml Outdated
@@ -29,7 +29,7 @@ install:
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "SET PATH=C:\\tools\\xmllint\\bin;%PYTHON%;%PYTHON%\\Scripts;%PATH%"
Copy link
Member

Choose a reason for hiding this comment

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

This addition should be on the next line.
The reason is that this line is identical to https://github.com/ogrisel/python-appveyor-demo/blob/f54ec35/appveyor.yml#L103

@@ -56,6 +56,15 @@ install:
- "npm config set loglevel warn"
- "npm install"

- curl -fsSL ftp://ftp.zlatkovic.com/libxml/iconv-1.9.2.win32.zip -o iconv.zip
Copy link
Member

Choose a reason for hiding this comment

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

Though it is probably quicker to use wget "ftp://ftp.zlatkovic.com/libxml/*.win32.zip" to batch download the files, and 7z may also have a batch unzip mode.

@Techievena
Copy link
Member Author

Techievena commented Feb 17, 2017

@jayvdb I added the same dependencies for xmllint as mentioned in https://atom.io/packages/linter-xmllint . I really can't figure out why the added dependencies are not sufficient. I'd do the fixes you suggested but I don't think it'll be of any need because you said earlier to install the dependencies via NuGet. I did in this manner just to ensure that the dependencies I am using are correct for xmllint. But the tests are still getting skipped. Don't know what is missing here? 😟

@Techievena
Copy link
Member Author

@jayvdb wget is not available in Appveyor. We have to download it. Should I go for it?

@Techievena Techievena force-pushed the appveyor branch 2 times, most recently from 5e13e51 to 99e908a Compare April 19, 2017 07:47

schema_file = os.path.join(os.path.dirname(__file__),
'test_files',
'note.xsd')
'note.xsd').replace('\\','\\\\')
Copy link
Collaborator

Choose a reason for hiding this comment

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

E231 missing whitespace after ',''

PycodestyleBear (E231), severity NORMAL, section autopep8.

@@ -38,11 +38,11 @@ def load_testdata(filename):

dtd_file = os.path.join(os.path.dirname(__file__),
'test_files',
'note.dtd')
'note.dtd').replace('\\','\\\\')
Copy link
Collaborator

Choose a reason for hiding this comment

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

E231 missing whitespace after ',''

PycodestyleBear (E231), severity NORMAL, section autopep8.


schema_file = os.path.join(os.path.dirname(__file__),
'test_files',
'note.xsd')
'note.xsd').replace('\\','\\\\')
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/xml2/XMLBearTest.py
+++ b/tests/xml2/XMLBearTest.py
@@ -42,7 +42,7 @@
 
 schema_file = os.path.join(os.path.dirname(__file__),
                            'test_files',
-                           'note.xsd').replace('\\','\\\\')
+                           'note.xsd').replace('\\', '\\\\')
 
 valid_xml_path = load_testdata('note.xml')
 valid_xml_url = load_testdata('concept-valid.xml')

@@ -38,11 +38,11 @@ def load_testdata(filename):

dtd_file = os.path.join(os.path.dirname(__file__),
'test_files',
'note.dtd')
'note.dtd').replace('\\','\\\\')
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code does not comply to PEP8.

PEP8Bear, severity NORMAL, section autopep8.

The issue can be fixed by applying the following patch:

--- a/tests/xml2/XMLBearTest.py
+++ b/tests/xml2/XMLBearTest.py
@@ -38,7 +38,7 @@
 
 dtd_file = os.path.join(os.path.dirname(__file__),
                         'test_files',
-                        'note.dtd').replace('\\','\\\\')
+                        'note.dtd').replace('\\', '\\\\')
 
 schema_file = os.path.join(os.path.dirname(__file__),
                            'test_files',

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

XMLBear is skipped on Appveyor Windows builds
due to dependency issues. Fixes all dependency
issues.

Closes coala#1354
@jayvdb
Copy link
Member

jayvdb commented May 4, 2017

Please remove the escape, so that the problem can be seen in the build logs.

You can add a comment to describe your workaround, which is quite a neat trick I must say.
But somehow, we need to find the real cause, and plug it, otherwise we do not support Windows properly.

The call chain (ignoring the test framework) is

  • XMLBear.create_arguments defines arguments xml_schema as Setting.path, and xml_dtd as path_or_url (and that calls Settings.path).
  • Settings.__path__ calls str(self), and boom ... unescaping occurs.

I believe coala/coala#4171 will fix the problem, but I am way out of my depth there, so I have asked @adtac to review.

There is also a chance that somewhere in the test framework, the Setting is being created incorrectly.

@jayvdb
Copy link
Member

jayvdb commented May 5, 2017

Another update at coala/coala#4171 (comment)

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

10 similar comments
@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

@gitmate-bot
Copy link
Collaborator

Hey! This pull request hasn't been updated for a while :/ It would be nice if we could get this going again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Test XMLBear on Appveyor
7 participants