diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16cfd7a..cf2afe9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,24 +16,20 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - python-version: [3.7, 3.8, 3.9, "3.10"] # numba is not supported on 3.11 😟 + python-version: [3.8, "3.11"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - uses: chartboost/ruff-action@v1 # Fail fast if there are any linting errors - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip - pip install wheel flake8 pytest pytest-cov - - name: Lint with flake8 - run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + pip install wheel pytest pytest-cov + - name: Install tsod run: | pip install .[test] diff --git a/.vscode/settings.json b/.vscode/settings.json index 9d409dd..ceb9dac 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,10 +2,13 @@ "python.testing.pytestArgs": [ "tests" ], - "python.formatting.provider": "black", + "python.formatting.provider": "none", "editor.formatOnSave": true, "python.testing.unittestEnabled": false, "python.testing.nosetestsEnabled": false, "python.testing.pytestEnabled": true, - "restructuredtext.confPath": "${workspaceFolder}\\doc" + "restructuredtext.confPath": "${workspaceFolder}\\doc", + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" + } } \ No newline at end of file diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..791a459 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,3 @@ +# ignore long license for ruff +ignore = ["E501", "E741"] +exclude = ["tsod/active_learning/"] diff --git a/setup.py b/setup.py index 592bf83..59255f6 100644 --- a/setup.py +++ b/setup.py @@ -5,13 +5,14 @@ setuptools.setup( name="tsod", - version="0.1.4", + version="0.2.0", install_requires=["pandas>=1.0.0", "numba", "joblib"], extras_require={ - "dev": ["pytest>=6.2.1", - "sphinx==4.5.0", # pin version to work with sphinx-book-theme, - "sphinx-book-theme" - ], + "dev": [ + "pytest>=6.2.1", + "sphinx==4.5.0", # pin version to work with sphinx-book-theme, + "sphinx-book-theme", + ], "ml": ["pyod", "tensorflow"], "test": ["pytest>=6.2.1"], }, @@ -30,10 +31,10 @@ "Intended Audience :: Science/Research", "Programming Language :: Python", "Programming Language :: Python :: 3", - "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", "Operating System :: OS Independent", "Topic :: Scientific/Engineering", ], diff --git a/tsod/__init__.py b/tsod/__init__.py index 8c508a7..d1c3f19 100644 --- a/tsod/__init__.py +++ b/tsod/__init__.py @@ -12,4 +12,17 @@ from .base import load -__version__ = "0.1.4" +__version__ = "0.2.0" + +__all__ = [ + "RangeDetector", + "DiffDetector", + "ConstantGradientDetector", + "GradientDetector", + "ConstantValueDetector", + "CombinedDetector", + "RollingStandardDeviationDetector", + "MVRangeDetector", + "MVCorrelationDetector", + "load", +]