Skip to content

Commit 213ab7a

Browse files
chayimDvirDukhan
andauthored
Fixing linters, killing off circle (#102)
Co-authored-by: DvirDukhan <dvir@redis.com>
1 parent 6a394f5 commit 213ab7a

File tree

7 files changed

+89
-145
lines changed

7 files changed

+89
-145
lines changed

.circleci/circle_requirements.txt

-3
This file was deleted.

.circleci/config.yml

-131
This file was deleted.

.github/workflows/check-pypi.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: Check if required secrets are set to publish to Pypi
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'main'
8+
- '[0-9].[0-9]'
49

510
jobs:
611
checksecret:

.github/workflows/integration.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
3+
on:
4+
push:
5+
6+
schedule:
7+
- cron: "5 1 * * Sun-Thu"
8+
9+
name: tests
10+
11+
jobs:
12+
build-and-test:
13+
14+
services:
15+
redisai:
16+
image: redislabs/redisai:edge-cpu-bionic
17+
ports:
18+
- 6379:6379
19+
runs-on: ubuntu-latest
20+
21+
strategy:
22+
max-parallel: 10
23+
matrix:
24+
python-version: ["3.8", "3.9", "3.10", "3.11"]
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{matrix.python-version}}
30+
31+
# penidng: https://github.com/tkukushkin/tox-poetry/pull/16
32+
- name: install base dependencies
33+
run: |
34+
pip install -q tox==3.27.0 poetry tox-poetry
35+
- name: cache
36+
uses: actions/cache@v3
37+
with:
38+
path: |
39+
.tox
40+
key: redisai-${{matrix.python_version}}
41+
- name: build the package
42+
run: |
43+
poetry build
44+
- name: test
45+
run: |
46+
tox -e tests

.github/workflows/linters.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'redisai/**'
7+
- 'pyproject.toml'
8+
9+
name: lint
10+
11+
env:
12+
python_version: 3.9
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{env.python_version}}
22+
- name: lint
23+
run: |
24+
pip install -q tox poetry
25+
tox -e linters

pyproject.toml

+6-8
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,28 @@ classifiers = [
1414
'Topic :: Database',
1515
'Programming Language :: Python',
1616
'Intended Audience :: Developers',
17-
'Programming Language :: Python :: 3.6',
18-
'Programming Language :: Python :: 3.7',
1917
'Programming Language :: Python :: 3.8',
2018
'Programming Language :: Python :: 3.9',
2119
'Programming Language :: Python :: 3.10',
20+
'Programming Language :: Python :: 3.11',
2221
'License :: OSI Approved :: BSD License',
2322
'Development Status :: 5 - Production/Stable'
2423
]
2524

2625
[tool.poetry.dependencies]
27-
python = ">=3.6,<3.10"
26+
python = ">=3.8,<=4.0.0"
2827
redis = "^4.1.4"
2928
hiredis = ">=0.20"
3029
numpy = ">=1.19.5"
3130
six = ">=1.10.0"
3231
Deprecated = "^1.2.12"
32+
pytest = "^7.2.1"
3333

3434
[tool.poetry.dev-dependencies]
3535
codecov = "^2.1.11"
36-
flake8 = "^3.9.2"
37-
rmtest = "^0.7.0"
38-
nose = "^1.3.7"
36+
flake8 = "<6.0.0"
3937
ml2rt = "^0.2.0"
40-
tox = ">=3.23.1"
38+
tox = ">=3.23.1,<=4.0.0"
4139
tox-poetry = "^0.3.0"
4240
Sphinx = "^4.1.2"
4341
sphinx-rtd-theme = "^0.5.2"
@@ -47,7 +45,7 @@ toml = "^0.10.2"
4745
bandit = "^1.7.0"
4846
pylint = "^2.8.2"
4947
vulture = "^2.3"
50-
scikit-image = "==0.16.2"
48+
scikit-image = "^0.19.3"
5149

5250
[tool.poetry.urls]
5351
"Project URL" = "https://redisai.io"

tox.ini

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,21 @@ envlist = linters,tests
66
max-complexity = 10
77
ignore = E501,C901
88
srcdir = ./redisai
9-
exclude =.git,.tox,dist,doc,*/__pycache__/*,venv
9+
exclude =.git,.tox,dist,doc,*/__pycache__/*,venv,.venv
1010

1111
[testenv:tests]
1212
whitelist_externals = find
1313
commands_pre =
1414
pip install --upgrade pip
1515
commands =
16-
nosetests -vsx test
16+
poetry install --no-root --only dev
17+
pytest test/test.py
1718

1819
[testenv:linters]
20+
allowlist_externals =
21+
poetry
1922
commands =
23+
poetry install --no-root --only dev
2024
flake8 --show-source
2125
vulture redisai --min-confidence 80
2226
bandit redisai/**

0 commit comments

Comments
 (0)