Skip to content

Commit 13d9414

Browse files
committed
fixing project testing
- TypeError: assert_frame_equal() got an unexpected keyword argument 'check_less_precise' - upgrade requirements.txt for numpy/pandas - upgrading minimum python version: py3.9+ - other misc changes
1 parent 67d13f4 commit 13d9414

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
language: python
44

55
python:
6+
- "3.11"
7+
- "3.10"
68
- "3.9"
7-
- "3.8"
8-
- "3.7"
99

1010
env:
1111
- DEPS="pytest gensim smart_open==2.0.0"

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ 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 3.8, 3.9, 3.10, 3.11, and for PyPI. Check
102+
3. The pull request should work for Python 3.9, 3.10, 3.11, 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.
105105

Pipfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name = "pypi"
55

66
[packages]
77
pyLDAvis = {editable = true, path = "."}
8-
numpy = ">=1.22.0"
8+
numpy = ">=1.24.2"
99
scipy = "*"
10-
pandas = ">=1.3.4"
10+
pandas = ">=2.0.0"
1111
joblib = ">=1.2.0"
1212
numexpr = "*"
1313
funcy = "*"
@@ -17,7 +17,7 @@ Jinja2 = "*"
1717
reproducer = {editable = true, path = "."}
1818

1919
[dev-packages]
20-
pytest = ">=3.8"
20+
pytest = ">=3.9"
2121

2222
[requires]
23-
python_version = "3.10"
23+
python_version = "3.11"

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
numpy>=1.22.0
1+
numpy>=1.24.2
22
scipy
3-
pandas>=1.3.4
3+
pandas>=2.0.0
44
joblib>=1.2.0
55
jinja2
66
numexpr

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@
2020
name='pyLDAvis',
2121
version='3.4.1',
2222
description='Interactive topic model visualization. Port of the R package.',
23+
long_description_content_type="text/x-rst",
2324
long_description=readme,
2425
author='Ben Mabey',
2526
author_email='[email protected]',
2627
url='https://github.com/bmabey/pyLDAvis',
27-
download_url='https://github.com/bmabey/pyLDAvis/tarball/3.4.0',
28+
download_url='https://github.com/bmabey/pyLDAvis/tarball/3.4.1',
2829
packages=['pyLDAvis'],
2930
package_dir={'pyLDAvis': 'pyLDAvis'},
3031
tests_require=['pytest'],
31-
python_requires=">=3.8",
32+
python_requires=">=3.9",
3233
include_package_data=True,
3334
install_requires=requirements,
3435
license='BSD-3-Clause',
@@ -41,7 +42,6 @@
4142
'License :: OSI Approved :: BSD License',
4243
'Natural Language :: English',
4344
'Programming Language :: Python :: 3',
44-
'Programming Language :: Python :: 3.8',
4545
'Programming Language :: Python :: 3.9',
4646
'Programming Language :: Python :: 3.10',
4747
'Programming Language :: Python :: 3.11',

tests/pyLDAvis/test_prepare.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def both(f):
6161

6262
join_percent = float(len(joined)) / len(etinfo)
6363
print('Topic Info join was %.0f%%' % (100 * join_percent))
64-
assert_frame_equal(ejoined, ojoined, check_less_precise=True)
64+
assert_frame_equal(ejoined, ojoined, check_exact=False, rtol=0.1)
6565
assert join_percent > 0.95
6666

6767
def abs_basis(df):
@@ -71,7 +71,7 @@ def abs_basis(df):
7171

7272
emds, omds = both(lambda r: abs_basis(pd.DataFrame(r['mdsDat'])))
7373
assert_frame_equal(emds.reindex(sorted(oddf.columns), axis=1),
74-
omds.reindex(sorted(oddf.columns), axis=1), check_less_precise=True)
74+
omds.reindex(sorted(oddf.columns), axis=1), check_exact=False, rtol=0.1)
7575

7676
def rounded_token_table(r):
7777
tt = pd.DataFrame(r['token.table'])

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py38, py39, py310, py311
2+
envlist = py39, py310, py311
33

44
[testenv]
55
install_command = pip3 install {opts} {packages}

0 commit comments

Comments
 (0)