Skip to content

Commit

Permalink
vs 3.3.0 Deprecate PY 2.7, PY <3.7
Browse files Browse the repository at this point in the history
Upgrading to be more current in PY3, fixing a few nits and bugs.
  • Loading branch information
msusol committed Mar 22, 2021
1 parent a02e607 commit ec4eead
Show file tree
Hide file tree
Showing 21 changed files with 573 additions and 92 deletions.
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,40 @@ docs/_build

# Mac OS
.DS_Store

### Python.VirtualEnv Stack ###
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
[Ss]cripts
pyvenv.cfg
pip-selfcheck.json

# Pip
# Pipfile
# Pipfile.lock
pypi_package.iml
# pyproject.toml

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
28 changes: 7 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,17 @@
language: python

python:
- "3.9"
- "3.8"
- "3.7"
- "3.6"
- "3.5"
- "2.7"

env:
- DEPS="pytest gensim smart_open==2.0.0" PY35_DEPS="pytest gensim" PY27_DEPS="pytest gensim==3.4.0 pytz"
- DEPS="pytest gensim smart_open==2.0.0"

before_install:
# conda instructions from http://conda.pydata.org/docs/travis.html
- sudo apt-get update
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
Expand All @@ -33,17 +26,10 @@ install:
# download JSON data from github since travis does not have git-lfs rolled out yet
- (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)
- ls -la tests/data/
# Python 2.7 needs a pinned version of gensim and a few other things with Conda
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION $PY27_DEPS;
elif [[ "$TRAVIS_PYTHON_VERSION" == "3.5" ]]; then
conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION $PY35_DEPS;
else
conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION $DEPS;
fi
- conda create -n testenv --yes python=$TRAVIS_PYTHON_VERSION $DEPS
- conda activate testenv
- pip install .

# command to run tests, e.g. python setup.py test
# command to run tests, e.g. pytest
script:
- pytest
- pytest
29 changes: 28 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,33 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.7, 3.5, 3.6, 3.7, 3.8, 3.9, and for PyPy. Check
3. The pull request should work for Python 3.7, 3.8, 3.9, and for PyPI. Check
https://travis-ci.org/bmabey/pyLDAvis/pull_requests
and make sure that the tests pass for all supported Python versions.

Maintainers
------------

Ready to publish a new version to PyPi? Here's how the workflow to follow.

1. Ensure you are in the pyLDAvis directory
2. Pipenv workflow::

$ pipenv install -e .
$ pipenv install --dev
$ pipenv shell
(pyLDAvis) $ flake8 pyLDAvis tests
(pyLDAvis) $ pytest
(pyLDAvis) $ tox

-- TestPyPi
(pyLDAvis) $ python setup.py sdist
(pyLDAvis) $ twine check dist/*
(pyLDAvis) $ twine upload --repository testpypi dist/*

-- Publish
(pyLDAvis) $ twine upload --repository-url https://upload.pypi.org/legacy/ dist/*

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/) ::

$ export SYSTEM_VERSION_COMPAT=1
9 changes: 9 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
History
-------

3.3.0 (2021-03-16)
--------------------

* Python 3.7, 3.8, 3.9: dropped 2.7, 3.5, 3.6 support.
* RuntimeWarning: divide by zero encountered in log #174
* Deprecation warning due to invalid escape sequences #166
* `python setup.py test` is deprecated
* FutureWarning: pandas.util.testing is deprecated

3.2.2 (2021-02-19)
--------------------

Expand Down
24 changes: 24 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pyLDAvis = {editable = true, path = "."}
numpy = ">=1.20.1"
scipy = "*"
pandas = "*"
joblib = "*"
numexpr = "*"
future = "*"
funcy = "*"
sklearn = "*"
scikit-learn = "*"
gensim = "*"
Jinja2 = "*"

[dev-packages]
pytest = ">=3.7"

[requires]
python_version = "3.9"
Loading

0 comments on commit ec4eead

Please sign in to comment.