Skip to content

Commit ec4eead

Browse files
committed
vs 3.3.0 Deprecate PY 2.7, PY <3.7
Upgrading to be more current in PY3, fixing a few nits and bugs.
1 parent a02e607 commit ec4eead

21 files changed

+573
-92
lines changed

.gitignore

+37
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,40 @@ docs/_build
5252

5353
# Mac OS
5454
.DS_Store
55+
56+
### Python.VirtualEnv Stack ###
57+
# Virtualenv
58+
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
59+
[Bb]in
60+
[Ii]nclude
61+
[Ll]ib
62+
[Ll]ib64
63+
[Ll]ocal
64+
[Ss]cripts
65+
pyvenv.cfg
66+
pip-selfcheck.json
67+
68+
# Pip
69+
# Pipfile
70+
# Pipfile.lock
71+
pypi_package.iml
72+
# pyproject.toml
73+
74+
# Distribution / packaging
75+
.Python
76+
build/
77+
develop-eggs/
78+
dist/
79+
downloads/
80+
eggs/
81+
.eggs/
82+
lib/
83+
lib64/
84+
parts/
85+
sdist/
86+
var/
87+
wheels/
88+
*.egg-info/
89+
.installed.cfg
90+
*.egg
91+
MANIFEST

.travis.yml

+7-21
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,17 @@
33
language: python
44

55
python:
6+
- "3.9"
7+
- "3.8"
68
- "3.7"
7-
- "3.6"
8-
- "3.5"
9-
- "2.7"
109

1110
env:
12-
- DEPS="pytest gensim smart_open==2.0.0" PY35_DEPS="pytest gensim" PY27_DEPS="pytest gensim==3.4.0 pytz"
11+
- DEPS="pytest gensim smart_open==2.0.0"
1312

1413
before_install:
1514
# conda instructions from http://conda.pydata.org/docs/travis.html
1615
- sudo apt-get update
17-
# We do this conditionally because it saves us some downloading if the
18-
# version is the same.
19-
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
20-
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
21-
else
22-
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
23-
fi
16+
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
2417
- bash miniconda.sh -b -p $HOME/miniconda
2518
- source "$HOME/miniconda/etc/profile.d/conda.sh"
2619
- hash -r
@@ -33,17 +26,10 @@ install:
3326
# download JSON data from github since travis does not have git-lfs rolled out yet
3427
- (cd tests/data; curl -L -O https://github.com/bmabey/pyLDAvis/raw/master/tests/data/movie_reviews_input.json && curl -L -O https://github.com/bmabey/pyLDAvis/raw/master/tests/data/movie_reviews_output.json)
3528
- ls -la tests/data/
36-
# Python 2.7 needs a pinned version of gensim and a few other things with Conda
37-
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
38-
conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION $PY27_DEPS;
39-
elif [[ "$TRAVIS_PYTHON_VERSION" == "3.5" ]]; then
40-
conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION $PY35_DEPS;
41-
else
42-
conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION $DEPS;
43-
fi
29+
- conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION $DEPS
4430
- conda activate testenv
4531
- pip install .
4632

47-
# command to run tests, e.g. python setup.py test
33+
# command to run tests, e.g. pytest
4834
script:
49-
- pytest
35+
- pytest

CONTRIBUTING.rst

+28-1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,33 @@ Before you submit a pull request, check that it meets these guidelines:
9999
2. If the pull request adds functionality, the docs should be updated. Put
100100
your new functionality into a function with a docstring, and add the
101101
feature to the list in README.rst.
102-
3. The pull request should work for Python 2.7, 3.5, 3.6, 3.7, 3.8, 3.9, and for PyPy. Check
102+
3. The pull request should work for Python 3.7, 3.8, 3.9, and for PyPI. Check
103103
https://travis-ci.org/bmabey/pyLDAvis/pull_requests
104104
and make sure that the tests pass for all supported Python versions.
105+
106+
Maintainers
107+
------------
108+
109+
Ready to publish a new version to PyPi? Here's how the workflow to follow.
110+
111+
1. Ensure you are in the pyLDAvis directory
112+
2. Pipenv workflow::
113+
114+
$ pipenv install -e .
115+
$ pipenv install --dev
116+
$ pipenv shell
117+
(pyLDAvis) $ flake8 pyLDAvis tests
118+
(pyLDAvis) $ pytest
119+
(pyLDAvis) $ tox
120+
121+
-- TestPyPi
122+
(pyLDAvis) $ python setup.py sdist
123+
(pyLDAvis) $ twine check dist/*
124+
(pyLDAvis) $ twine upload --repository testpypi dist/*
125+
126+
-- Publish
127+
(pyLDAvis) $ twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
128+
129+
Note: MacOS Big Sur is both 10.16 and 11.0 – it’s official (https://eclecticlight.co/2020/07/21/big-sur-is-both-10-16-and-11-0-its-official/) ::
130+
131+
$ export SYSTEM_VERSION_COMPAT=1

HISTORY.rst

+9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
History
44
-------
55

6+
3.3.0 (2021-03-16)
7+
--------------------
8+
9+
* Python 3.7, 3.8, 3.9: dropped 2.7, 3.5, 3.6 support.
10+
* RuntimeWarning: divide by zero encountered in log #174
11+
* Deprecation warning due to invalid escape sequences #166
12+
* `python setup.py test` is deprecated
13+
* FutureWarning: pandas.util.testing is deprecated
14+
615
3.2.2 (2021-02-19)
716
--------------------
817

Pipfile

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
pyLDAvis = {editable = true, path = "."}
8+
numpy = ">=1.20.1"
9+
scipy = "*"
10+
pandas = "*"
11+
joblib = "*"
12+
numexpr = "*"
13+
future = "*"
14+
funcy = "*"
15+
sklearn = "*"
16+
scikit-learn = "*"
17+
gensim = "*"
18+
Jinja2 = "*"
19+
20+
[dev-packages]
21+
pytest = ">=3.7"
22+
23+
[requires]
24+
python_version = "3.9"

0 commit comments

Comments
 (0)