Skip to content

Commit 1c694b3

Browse files
committed
Upgrading stack and environment
Getting ready for release.
1 parent 2b71bd5 commit 1c694b3

16 files changed

Lines changed: 334 additions & 437 deletions

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
max_line_length = 120
10+
insert_final_newline = true
11+
12+
[*.py]
13+
indent_size = 4
14+
trim_trailing_whitespace = true
15+
16+
17+
[*.rst]
18+
trim_trailing_whitespace = false
19+
20+
[Makefile]
21+
indent_style = tab

.github/workflows/main.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the master branch
6+
push:
7+
branches: [ master ]
8+
pull_request:
9+
branches: [ master ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
jobs:
15+
code-quality:
16+
runs-on: ubuntu-latest
17+
18+
name: "Linting"
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: setup python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.13'
28+
29+
- name: Install dependencies
30+
run: make install
31+
32+
- name: Linting
33+
run: make lint
34+
35+
test:
36+
# The type of runner that the job will run on
37+
runs-on: ubuntu-latest
38+
strategy:
39+
matrix:
40+
python-version: ["3.11", "3.12", "3.13", "3.14"]
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
name: "Python ${{ matrix.python-version }}"
44+
45+
steps:
46+
- name: Check out code
47+
uses: actions/checkout@v4
48+
49+
- name: Set up Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v5
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
54+
- name: Install dependencies
55+
run: make install
56+
57+
- name: Run tests
58+
run: make coverage
59+
60+
- name: Upload coverage to Codecov
61+
uses: codecov/codecov-action@v5
62+
with:
63+
flags: unittests-${{ matrix.python-version }}
64+
fail_ci_if_error: true # default = false
65+
verbose: true # default = false

.github/workflows/pypi.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
release:
9+
name: Release
10+
environment:
11+
name: pypi
12+
url: https://pypi.org/project/stop-words
13+
permissions:
14+
id-token: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.13'
23+
24+
- name: Build
25+
run: |
26+
git submodule update --remote --rebase
27+
python -m pip install build
28+
python -m build
29+
30+
- name: Publish package distributions to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
verbose: true
34+
print-hash: true

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ dist/
1212
*.egg-info/
1313
logs/
1414
src/
15-
.c9/
1615
bin/
1716
develop-eggs/
1817
eggs/
18+
coverage.xml
19+
.coverage
20+
build
21+
stop_words/_version.py

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.PHONY: install test build release clean
2+
3+
install:
4+
pip install '.[dev]'
5+
pip install build
6+
7+
update_stop_words:
8+
git submodule update --remote --rebase
9+
10+
test:
11+
python -m unittest discover
12+
13+
coverage:
14+
coverage run -m unittest discover
15+
coverage report
16+
coverage xml
17+
18+
build:
19+
python -m build
20+
21+
clean:
22+
rm -rf dist *.egg-info coverage.xml build .coverage
23+
24+
lint:
25+
black stop_words/
26+
flake8 stop_words/ --config flake8.ini
27+
mypy stop_words/ --install-types --non-interactive

README.rst

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,43 @@ Overview
99

1010
Get list of common stop words in various languages in Python.
1111

12-
.. image:: https://secure.travis-ci.org/Alir3z4/python-stop-words.png
13-
:alt: Build Status
14-
:target: http://travis-ci.org/Alir3z4/python-stop-words
15-
16-
.. image:: https://coveralls.io/repos/Alir3z4/python-stop-words/badge.png
17-
:alt: Coverage Status
18-
:target: https://coveralls.io/r/Alir3z4/python-stop-words
19-
20-
.. image:: http://badge.kloud51.com/pypi/v/stop-words.svg
21-
:target: https://pypi.python.org/pypi/stop-words
22-
:alt: PyPI Version
23-
24-
.. image:: http://badge.kloud51.com/pypi/s/stop-words.svg
25-
:target: https://pypi.python.org/pypi/stop-words
26-
:alt: PyPI Status
27-
28-
.. image:: http://badge.kloud51.com/pypi/l/stop-words.svg
29-
:target: https://github.com/Alir3z4/python-stop-words/blob/master/LICENSE
30-
:alt: License
31-
32-
.. image:: http://badge.kloud51.com/pypi/p/stop-words.svg
33-
:target: https://pypi.python.org/pypi/stop-words
34-
:alt: PyPI Py_versions
35-
3612

3713
Available languages
3814
-------------------
3915

4016
* Arabic
4117
* Bulgarian
4218
* Catalan
19+
* Chinese
4320
* Czech
4421
* Danish
4522
* Dutch
4623
* English
4724
* Finnish
4825
* French
4926
* German
27+
* Greek
28+
* Gujarati
29+
* Hindi
30+
* Hebrew
5031
* Hungarian
5132
* Indonesian
33+
* Malaysian
5234
* Italian
35+
* Japanese
36+
* Korean
5337
* Norwegian
5438
* Polish
5539
* Portuguese
5640
* Romanian
5741
* Russian
42+
* Slovak
5843
* Spanish
5944
* Swedish
6045
* Turkish
6146
* Ukrainian
47+
* Vietnamese
48+
* Persian/Farsi
6249

6350

6451
Installation
@@ -94,14 +81,3 @@ Basic usage
9481
from stop_words import safe_get_stop_words
9582
9683
stop_words = safe_get_stop_words('unsupported language')
97-
98-
Python compatibility
99-
--------------------
100-
101-
Python Stop Words is compatible with:
102-
103-
* Python 2.7
104-
* Python 3.4
105-
* Python 3.5
106-
* Python 3.6
107-
* Python 3.7

0 commit comments

Comments
 (0)