Skip to content
Merged
3 changes: 0 additions & 3 deletions .circleci/circle_requirements.txt

This file was deleted.

131 changes: 0 additions & 131 deletions .circleci/config.yml

This file was deleted.

7 changes: 6 additions & 1 deletion .github/workflows/check-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Check if required secrets are set to publish to Pypi

on: push
on:
push:
branches:
- 'master'
- 'main'
- '[0-9].[0-9]'

jobs:
checksecret:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---

on:
push:

schedule:
- cron: "5 1 * * Sun-Thu"

name: tests

jobs:
build-and-test:

services:
redisai:
image: redislabs/redisai:edge-cpu-bionic
ports:
- 6379:6379
runs-on: ubuntu-latest

strategy:
max-parallel: 10
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{matrix.python-version}}

# penidng: https://github.com/tkukushkin/tox-poetry/pull/16
- name: install base dependencies
run: |
pip install -q tox==3.27.0 poetry tox-poetry
- name: cache
uses: actions/cache@v3
with:
path: |
.tox
key: redisai-${{matrix.python_version}}
- name: build the package
run: |
poetry build
- name: test
run: |
tox -e tests
25 changes: 25 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---

on:
pull_request:
paths:
- 'redisai/**'
- 'pyproject.toml'

name: lint

env:
python_version: 3.9

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{env.python_version}}
- name: lint
run: |
pip install -q tox poetry
tox -e linters
14 changes: 6 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,28 @@ classifiers = [
'Topic :: Database',
'Programming Language :: Python',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'License :: OSI Approved :: BSD License',
'Development Status :: 5 - Production/Stable'
]

[tool.poetry.dependencies]
python = ">=3.6,<3.10"
python = ">=3.8,<=4.0.0"
redis = "^4.1.4"
hiredis = ">=0.20"
numpy = ">=1.19.5"
six = ">=1.10.0"
Deprecated = "^1.2.12"
pytest = "^7.2.1"

[tool.poetry.dev-dependencies]
codecov = "^2.1.11"
flake8 = "^3.9.2"
rmtest = "^0.7.0"
nose = "^1.3.7"
flake8 = "<6.0.0"
ml2rt = "^0.2.0"
tox = ">=3.23.1"
tox = ">=3.23.1,<=4.0.0"
tox-poetry = "^0.3.0"
Sphinx = "^4.1.2"
sphinx-rtd-theme = "^0.5.2"
Expand All @@ -47,7 +45,7 @@ toml = "^0.10.2"
bandit = "^1.7.0"
pylint = "^2.8.2"
vulture = "^2.3"
scikit-image = "==0.16.2"
scikit-image = "^0.19.3"

[tool.poetry.urls]
"Project URL" = "https://redisai.io"
Expand Down
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ envlist = linters,tests
max-complexity = 10
ignore = E501,C901
srcdir = ./redisai
exclude =.git,.tox,dist,doc,*/__pycache__/*,venv
exclude =.git,.tox,dist,doc,*/__pycache__/*,venv,.venv

[testenv:tests]
whitelist_externals = find
commands_pre =
pip install --upgrade pip
commands =
nosetests -vsx test
poetry install --no-root --only dev
pytest test/test.py

[testenv:linters]
allowlist_externals =
poetry
commands =
poetry install --no-root --only dev
flake8 --show-source
vulture redisai --min-confidence 80
bandit redisai/**
Expand Down