Skip to content

Commit

Permalink
rm py3.5, add py3.8, rm/update older explicit pins/installs
Browse files Browse the repository at this point in the history
  • Loading branch information
gojomo committed Dec 28, 2019
1 parent 36ae46f commit 6122956
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 43 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ matrix:
- python: '3.6'
env: TOXENV="flake8,flake8-docs"

- python: '3.5'
env: TOXENV="py35-linux"

- python: '3.6'
env: TOXENV="py36-linux"

Expand All @@ -29,9 +26,14 @@ matrix:
- BOTO_CONFIG="/dev/null"
dist: xenial
sudo: true

- python: '3.8'
env:
- TOXENV="py38-linux"
dist: bionic


install:
- pip install tox
- python ci/install_wheels.py

script: tox -vv
22 changes: 10 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ environment:
TOX_PARALLEL_NO_SPINNER: 1

matrix:
- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.2"
- PYTHON: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.1"
PYTHON_ARCH: "64"
TOXENV: "py35-win"

- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.0"
PYTHON_ARCH: "64"
TOXENV: "py36-win"

TOXENV: "py38-win"

- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.0"
PYTHON_VERSION: "3.7.6"
PYTHON_ARCH: "64"
TOXENV: "py37-win"

- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.10"
PYTHON_ARCH: "64"
TOXENV: "py36-win"

init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
Expand Down Expand Up @@ -56,8 +56,6 @@ install:
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""

- "python ci/install_wheels.py"

build: false

test_script:
Expand Down
18 changes: 0 additions & 18 deletions continuous_integration/appveyor/requirements.txt

This file was deleted.

6 changes: 3 additions & 3 deletions gensim/corpora/sharded_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,12 @@ def init_shards(self, output_prefix, corpus, shardsize=4096, dtype=_default_dtyp
self.dim = proposed_dim
self.offsets = [0]

start_time = time.clock()
start_time = time.perf_counter()

logger.info('Running init from corpus.')

for n, doc_chunk in enumerate(gensim.utils.grouper(corpus, chunksize=shardsize)):
logger.info('Chunk no. %d at %f s', n, time.clock() - start_time)
logger.info('Chunk no. %d at %f s', n, time.perf_counter() - start_time)

current_shard = numpy.zeros((len(doc_chunk), self.dim), dtype=dtype)
logger.debug('Current chunk dimension: %d x %d', len(doc_chunk), self.dim)
Expand All @@ -300,7 +300,7 @@ def init_shards(self, output_prefix, corpus, shardsize=4096, dtype=_default_dtyp

self.save_shard(current_shard)

end_time = time.clock()
end_time = time.perf_counter()
logger.info('Built %d shards in %f s.', self.n_shards, end_time - start_time)

def init_by_clone(self):
Expand Down
4 changes: 2 additions & 2 deletions gensim/models/hdpmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def update(self, corpus):
"""
save_freq = max(1, int(10000 / self.chunksize)) # save every 10k docs, roughly
chunks_processed = 0
start_time = time.clock()
start_time = time.perf_counter()

while True:
for chunk in utils.grouper(corpus, self.chunksize):
Expand Down Expand Up @@ -513,7 +513,7 @@ def update_finished(self, start_time, chunks_processed, docs_processed):
(self.max_chunks and chunks_processed == self.max_chunks)

# time limit reached
or (self.max_time and time.clock() - start_time > self.max_time)
or (self.max_time and time.perf_counter() - start_time > self.max_time)

# no limits and whole corpus has been processed once
or (not self.max_chunks and not self.max_time and docs_processed >= self.m_D))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def run(self):
# to build with any sane version of Cython, so we should update this pin
# periodically.
#
CYTHON_STR = 'Cython==0.29.3'
CYTHON_STR = 'Cython==0.29.14'

install_requires = [
NUMPY_STR,
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = {py35,py36,py37}-{win,linux}, flake8, docs, docs-upload, download-wheels, upload-wheels, test-pypi
envlist = {py36,py37,py38}-{win,linux}, flake8, docs, docs-upload, download-wheels, upload-wheels, test-pypi
skipsdist = True
platform = linux: linux
win: win64
Expand Down Expand Up @@ -43,7 +43,6 @@ setenv =
commands =
python --version
pip --version
python ci/install_wheels.py
python setup.py build_ext --inplace
pytest {posargs:gensim/test}

Expand All @@ -65,7 +64,7 @@ commands = flake8-rst gensim/ docs/ {posargs}
basepython = python3
recreate = True

deps = numpy==1.14.5
deps = numpy
commands = python setup.py build_ext --inplace


Expand Down

0 comments on commit 6122956

Please sign in to comment.