Skip to content

Commit 0f8aa39

Browse files
authored
Improved required packages management (#9)
* words_n_fun (update): many packages update + added some ranges in the setup.py * words_n_fun (fix): added environment markers to handle numpy and python < 3.8 * words_n_fun (fix): fixed action trigger * words_n_fun (fix): fixed numpy version in setup.py * words_n_fun (fix): specific pandas version for python 3.7 * words_n_fun (fix): fix setup * words_n_fun (update): specify python version >=3.7 * words_n_fun (update): added email information
1 parent 9b43a23 commit 0f8aa39

File tree

3 files changed

+28
-22
lines changed

3 files changed

+28
-22
lines changed

.github/workflows/wnf_build_tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- 'LICENSE'
1212
- 'Makefile'
1313
pull_request:
14-
types: [opened, reopened, edit]
14+
types: [opened, reopened, edit, synchronize]
1515
branches:
1616
- 'main'
1717
- 'release/v*'

requirements.txt

+14-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
# Data manipulation
2-
numpy==1.19.5
3-
pandas==1.3.5
2+
numpy==1.21.6; python_version < "3.8"
3+
numpy==1.23.2; python_version >= "3.8"
4+
pandas==1.3.5; python_version < "3.8"
5+
pandas==1.4.4; python_version >= "3.8"
46

57
# NLP
6-
nltk==3.4.5
7-
ftfy==5.8
8+
nltk==3.7
9+
ftfy==6.1.1
810

911
# Others
10-
simplejson==3.17.2
11-
tqdm==4.62.2
12-
requests==2.23.0
12+
tqdm==4.64.1
13+
simplejson==3.17.6
14+
requests==2.28.1
1315

1416
# Optionnals - code quality & cie
15-
flake8==3.7.9
16-
black==19.10b0
17-
isort==4.3.21
17+
flake8==5.0.4
18+
black==22.8.0
19+
isort==5.10.1
1820
nose==1.3.7
1921
nose-exclude==0.5.0
20-
coverage==5.3
22+
coverage==6.4.4
2123

2224
# Has to be installed last / optionnal to use spacy lemmatizer
2325
markupsafe==2.0.1 # BUG FIX -> https://github.com/aws/aws-sam-cli/issues/3661
2426
Cython==0.29.24
2527
spacy==3.3.1
26-
# The following line downloads a spacy model. It can be commented if you don't have an internet access to download it, but lemmatizer features won't work.
28+
# The following line downloads a frnech spacy model. It can be commented if you don't have an internet access to download it, but lemmatizer features won't work.
2729
https://github.com/explosion/spacy-models/releases/download/fr_core_news_sm-3.3.0/fr_core_news_sm-3.3.0-py3-none-any.whl

setup.py

+13-9
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Get package directory
2020
package_directory = os.path.dirname(os.path.abspath(__file__))
2121

22-
# Get package version (env variable or verion file + -local)
22+
# Get package version (env variable or version file + -local)
2323
version_path = os.path.join(package_directory, 'version.txt')
2424
with open(version_path, 'r') as version_file:
2525
version = version_file.read().strip()
@@ -38,22 +38,26 @@
3838
license='AGPL-3.0',
3939
long_description=long_description,
4040
long_description_content_type='text/markdown',
41-
author='Agence Data Services PE Nantes',
41+
author="Agence Data Services PE Nantes",
42+
author_email="[email protected]",
4243
description="Semantic library of the Data Services agency",
4344
url="https://github.com/OSS-Pole-Emploi/words_n_fun",
4445
platforms=['windows', 'linux'],
46+
python_requires='>=3.7',
4547
package_data={
4648
'words_n_fun': ['configs/*.json', 'nltk_data/corpora/stopwords/french']
4749
},
4850
include_package_data=True,
4951
install_requires=[
50-
'pandas==1.3.5',
51-
'numpy==1.19.5',
52-
'nltk>=3.4.5,<3.6',
53-
'tqdm==4.62.2', # https://github.com/tqdm/tqdm/issues/780
54-
'simplejson>=3.17.0,<3.17.3',
55-
'requests>=2.23.0,<2.25.1',
56-
'ftfy>=5.8,<6.0',
52+
'pandas>=1.3,<1.4; python_version < "3.8"',
53+
'pandas>=1.3,<1.5; python_version >= "3.8"',
54+
'numpy>=1.19,<1.22; python_version < "3.8"',
55+
'numpy>=1.19,<1.24; python_version >= "3.8"',
56+
'nltk>=3.4,<3.8',
57+
'ftfy>=5.8,<6.2',
58+
'tqdm>=4.40,<4.65',
59+
'simplejson>=3.17,<3.18',
60+
'requests>=2.23,<2.29',
5761
],
5862
extras_require={
5963
"lemmatizer": ["spacy==3.3.1", "markupsafe==2.0.1", "Cython==0.29.24", "fr-core-news-sm==3.3.0"]

0 commit comments

Comments
 (0)