Skip to content

Commit bbab686

Browse files
authored
Merge pull request #139 from stephenhky/readthedocs
pin requirements for ReadTheDocs
2 parents a3af85b + f587e91 commit bbab686

File tree

17 files changed

+28425
-18376
lines changed

17 files changed

+28425
-18376
lines changed

.circleci/config.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ shared: &shared
2828
2929
3030
jobs:
31-
py37:
32-
<<: *shared
33-
docker:
34-
- image: cimg/python:3.7
35-
3631
py38:
3732
<<: *shared
3833
docker:
@@ -58,7 +53,6 @@ workflows:
5853
version: 2
5954
build:
6055
jobs:
61-
- py37
6256
- py38
6357
- py39
6458
- py310

.readthedocs.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ version: 2
99
sphinx:
1010
configuration: docs/conf.py
1111

12+
build:
13+
os: ubuntu-22.04
14+
tools:
15+
python: "3.8"
16+
1217
# Build documentation with MkDocs
1318
#mkdocs:
1419
# configuration: mkdocs.yml
@@ -18,11 +23,8 @@ formats: all
1823

1924
# Optionally set the version of Python and requirements required to build your docs
2025
python:
21-
version: 3.7
2226
install:
23-
- requirements: requirements.txt
24-
- method: pip
25-
path: .
27+
- requirements: docs/requirements.txt
2628

2729
# conda environment
2830
#conda:

README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,7 @@ representation of the texts and documents are needed before they are put into
1818
any classification algorithm. In this package, it facilitates various types
1919
of these representations, including topic modeling and word-embedding algorithms.
2020

21-
Since release 1.5.2, it runs on Python 3.9.
22-
Since release 1.5.0, support for Python 3.6 was decommissioned.
23-
Since release 1.2.4, it runs on Python 3.8.
24-
Since release 1.2.3, support for Python 3.5 was decommissioned.
25-
Since release 1.1.7, support for Python 2.7 was decommissioned.
26-
Since release 1.0.8, it runs on Python 3.7 with 'TensorFlow' being the backend for `keras`.
27-
Since release 1.0.7, it runs on Python 3.7 as well, but the backend for `keras` cannot be `TensorFlow`.
28-
Since release 1.0.0, `shorttext` runs on Python 2.7, 3.5, and 3.6.
29-
21+
The package `shorttext` runs on Python 3.8, 3.9, 3.10, and 3.11.
3022
Characteristics:
3123

3224
- example data provided (including subject keywords and NIH RePORT);
@@ -92,6 +84,7 @@ If you would like to contribute, feel free to submit the pull requests. You can
9284

9385
## News
9486

87+
* 08/26/2023: `shorttext` 1.6.0 released.
9588
* 06/19/2023: `shorttext` 1.5.9 released.
9689
* 09/23/2022: `shorttext` 1.5.8 released.
9790
* 09/22/2022: `shorttext` 1.5.7 released.

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
# built documents.
5757
#
5858
# The short X.Y version.
59-
version = u'1.5'
59+
version = u'1.6'
6060
# The full version, including alpha/beta/rc tags.
61-
release = u'1.5.9'
61+
release = u'1.6.0'
6262

6363
# The language for content autogenerated by Sphinx. Refer to documentation
6464
# for a list of supported languages.

docs/intro.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ representation of the texts and documents are needed before they are put into
88
any classification algorithm. In this package, it facilitates various types
99
of these representations, including topic modeling and word-embedding algorithms.
1010

11-
The package `shorttext` runs on Python 3.7, 3.8, and 3.9.
12-
13-
Since release 1.0.0, `shorttext` runs on Python 2.7, 3.5, and 3.6. Since release 1.0.7,
14-
it runs also in Python 3.7. Since release 1.1.7, the support for Python 2.7 was decommissioned.
15-
Since release 1.2.3, the support for Python 3.5 is decommissioned.
16-
Since release 1.5.0, the support for Python 3.6 is decommissioned.
11+
The package `shorttext` runs on Python 3.8, 3.9, 3.10, and 3.11.
1712

1813
Characteristics:
1914

@@ -35,7 +30,7 @@ Before release 0.7.2, part of the package was implemented using C, and it is int
3530
Python using SWIG_ (Simplified Wrapper and Interface Generator). Since 1.0.0, these implementations
3631
were replaced with Cython_.
3732

38-
Author: Kwan-Yuet Ho (LinkedIn_, ResearchGate_, Twitter_)
33+
Author: Kwan Yuet Stephen Ho (LinkedIn_, ResearchGate_, Twitter_)
3934

4035
Home: :doc:`index`
4136

docs/news.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
News
22
====
33

4+
* 08/26/2023: `shorttext` 1.6.0 released.
45
* 06/19/2023: `shorttext` 1.5.9 released.
56
* 09/23/2022: `shorttext` 1.5.8 released.
67
* 09/22/2022: `shorttext` 1.5.7 released.
@@ -78,6 +79,14 @@ News
7879
What's New
7980
----------
8081

82+
Released 1.6.0 (August 26, 2023)
83+
--------------------------------
84+
85+
* Pinned requirements for ReadTheDocs documentation;
86+
* Fixed bugs in word-embedding model mean pooling classifiers;
87+
* Updated package requirements.
88+
89+
8190
Release 1.5.9 (June 19, 2023)
8291
-----------------------------
8392

docs/requirements.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Cython==3.0.0
2+
numpy==1.23.3
3+
scipy==1.10.1
4+
joblib==1.3.0
5+
scikit-learn==1.2.0
6+
tensorflow==2.13.0
7+
keras==2.13.1
8+
gensim==4.0.0
9+
pandas==1.2.4
10+
snowballstemmer==2.1.0
11+
transformers==4.32.0
12+
torch==2.0.1
13+
python-Levenshtein==0.21.1
14+
numba==0.57.1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "Cython>=0.29", "numpy >= 1.16"]
2+
requires = ["setuptools", "wheel", "Cython>=3.0.0", "numpy >= 1.23.3"]

requirements.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
Cython>=0.29.0
2-
numpy>=1.16.0
3-
scipy>=1.6.0
4-
joblib>=0.14
5-
scikit-learn>=0.22.0
6-
tensorflow>=2.5.0
7-
keras>=2.4.0
1+
Cython>=3.0.0
2+
numpy>=1.23.3
3+
scipy>=1.10.0
4+
joblib>=1.3.0
5+
scikit-learn>=1.2.0
6+
tensorflow>=2.13.0
7+
keras>=2.13.0
88
gensim>=4.0.0
9-
pandas>=1.0.0
10-
Flask>=2.0.0
9+
pandas>=1.2.0
1110
snowballstemmer>=2.0.0
12-
transformers>=4.1.0
13-
torch>=1.5.0
14-
python-Levenshtein>=0.12.0
15-
numba>=0.52.0
11+
transformers>=4.32.0
12+
torch>=2.0.0
13+
python-Levenshtein>=0.21.0
14+
numba>=0.57.0

setup.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11

22
from setuptools import setup
33
import numpy as np
4-
from Cython.Build import cythonize
54

6-
7-
ext_modules = cythonize(['shorttext/metrics/dynprog/dldist.pyx',
8-
'shorttext/metrics/dynprog/lcp.pyx'])
5+
try:
6+
from Cython.Build import cythonize
7+
ext_modules = cythonize(['shorttext/metrics/dynprog/dldist.pyx',
8+
'shorttext/metrics/dynprog/lcp.pyx'])
9+
except ImportError:
10+
from setuptools import Extension
11+
ext_modules = [
12+
Extension('shorttext.metrics.dynprog.dldist', ['shorttext/metrics/dynprog/dldist.c']),
13+
Extension('shorttext.metrics.dynprog.lcp', ['shorttext/metrics/dynprog/lcp.c'])
14+
]
915

1016

1117
def package_description():
@@ -28,7 +34,7 @@ def test_requirements():
2834

2935

3036
setup(name='shorttext',
31-
version='1.5.9',
37+
version='1.6.0',
3238
description="Short Text Mining",
3339
long_description=package_description(),
3440
long_description_content_type='text/markdown',
@@ -37,10 +43,10 @@ def test_requirements():
3743
"Topic :: Scientific/Engineering :: Mathematics",
3844
"Topic :: Text Processing :: Linguistic",
3945
"Topic :: Software Development :: Libraries :: Python Modules",
40-
"Programming Language :: Python :: 3.7",
4146
"Programming Language :: Python :: 3.8",
4247
"Programming Language :: Python :: 3.9",
4348
"Programming Language :: Python :: 3.10",
49+
"Programming Language :: Python :: 3.11",
4450
"Programming Language :: Cython",
4551
"Programming Language :: C",
4652
"Natural Language :: English",
@@ -52,7 +58,7 @@ def test_requirements():
5258
],
5359
keywords="shorttext natural language processing text mining",
5460
url="https://github.com/stephenhky/PyShortTextCategorization",
55-
author="Kwan-Yuet Ho",
61+
author="Kwan Yuet Stephen Ho",
5662
author_email="[email protected]",
5763
license='MIT',
5864
ext_modules=ext_modules,

0 commit comments

Comments
 (0)