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

Set up CI with Azure Pipelines #2

Closed
wants to merge 15 commits into from
77 changes: 0 additions & 77 deletions appveyor.yml

This file was deleted.

38 changes: 38 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

trigger:
- master


pool:
vmImage: 'vs2017-win2016'

strategy:
matrix:
py36:
python.version: '3.6'
TOXENV: "py36-win"
py37:
python.version: '3.7'
TOXENV: "py37-win"
py38:
python.version: '3.8'
TOXENV: "py38-win"

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'

- script: |
python -m pip install --upgrade pip
python -m pip install tox
displayName: 'Install tox'

- script: |
tox -vv gensim/test/test_corpora.py gensim/test/test_varembed_wrapper.py
displayName: 'Testing'
9 changes: 7 additions & 2 deletions gensim/corpora/_mmreader.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ cdef class MmReader(object):
for line in lines:

if (sscanf(line, "%lld %lld %lg", &docid, &termid, &val) != 3):
raise ValueError("unable to parse line: {}".format(line))
# raise ValueError("unable to parse line: {}".format(line))
logger.warning("unable to parse line: %s, skip them", line)
continue

if not self.transposed:
termid, docid = docid, termid
Expand Down Expand Up @@ -196,7 +198,10 @@ cdef class MmReader(object):
previd, document = -1, []
for line in fin:
if (sscanf(line, "%lld %lld %lg", &docid, &termid, &val) != 3):
raise ValueError("unable to parse line: {}".format(line))
# raise ValueError("unable to parse line: {}".format(line))
logger.warning("unable to parse line: %s, skip them", line)
continue


if not self.transposed:
termid, docid = docid, termid
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ def run(self):
'testfixtures',
'Morfessor==2.0.2a4',
'python-Levenshtein >= 0.10.2',
'visdom >= 0.1.8, != 0.1.8.7',
'scikit-learn',
# The following packages are commented out because they don't install on Windows. So skip the
# related tests in AppVeyor. We still test them in Linux via Travis, see linux_testenv below.
Expand Down Expand Up @@ -308,7 +307,8 @@ def run(self):

# Add additional requirements for testing on Linux. We skip some tests on Windows,
# because the libraries below are too tricky to install there.
linux_testenv = win_testenv[:]
# Visdom doesn't works well on Azure Pipelines + Windows (exceptions from tornado)
linux_testenv = win_testenv[:] + ['visdom >= 0.1.8, != 0.1.8.7']
if sys.version_info >= (3, 7):
# HACK: Installing tensorflow causes a segfault in Travis on py3.6. Other Pythons work – a mystery.
# See https://github.com/RaRe-Technologies/gensim/pull/2814#issuecomment-621477948
Expand Down