Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
python-version: '3.9'

- name: Build
run: |
Expand Down
94 changes: 36 additions & 58 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,94 +11,72 @@ on:

jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8]
os: [macos-13]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install invoke .[dev]
- name: invoke lint
pip install --upgrade "pip<=24.1" setuptools wheel
python -m pip install invoke .[dev]
- name: Run lint checks
run: invoke lint


# docs:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# python-version: ['3.8', '3.9', '3.10', '3.11']
# os: [ubuntu-20.04]
# steps:
# - uses: actions/checkout@v1
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install package
# run: pip install .[dev]
# - name: make docs
# run: make docs
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
- name: Build docs
run: make docs


unit:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-13, windows-latest]
python-version: ['3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package and dependencies
run: |
python -m pip install --upgrade pip
python -m pip install invoke .[test]
- name: invoke unit
- name: Run unit tests
run: invoke unit


# minimum:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# python-version: ['3.8', '3.9', '3.10', '3.11']
# os: [ubuntu-20.04, macos-latest]
# python-version: ['3.9']
# os: [ubuntu-latest, macos-latest, windows-latest]
# steps:
# - uses: actions/checkout@v1
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install package and dependencies
# run: pip install invoke .[test]
# - name: invoke minimum
# run: |
# python -m pip install --upgrade pip
# python -m pip install invoke .[test]
# - name: Run unit tests on minimum
# run: invoke minimum


# tutorials:
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# python-version: ['3.8', '3.9', '3.10', '3.11']
# os: [ubuntu-20.04, macos-latest, windows-latest]
# steps:
# - uses: actions/checkout@v1
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install package and dependencies
# run: pip install invoke jupyter matplotlib .
# - name: invoke tutorials
# run: invoke tutorials
13 changes: 0 additions & 13 deletions MANIFEST.in

This file was deleted.

35 changes: 16 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ install-test: clean-build clean-pyc ## install the package and test dependencies
install-develop: clean-build clean-pyc ## install the package in editable mode and dependencies for development
pip install -e .[dev]

MINIMUM := $(shell sed -n '/install_requires = \[/,/]/p' setup.py | grep -v -e '[][]' | sed 's/ *\(.*\),$?$$/\1/g' | tr '>' '=')

.PHONY: install-minimum
install-minimum: ## install the minimum supported versions of the package dependencies
pip install $(MINIMUM)
install-minimum: clean-build clean-pyc ## install the package with depencencies in minimum versions
invoke install-minimum

.PHONY: check-dependencies
check-dependencies: ## test if there are any broken dependencies
Expand All @@ -63,14 +61,17 @@ lint: ## check style with flake8 and isort

.PHONY: lint-sigllm
lint-sigllm: ## check style with flake8 and isort
flake8 sigllm tests
isort -c --recursive sigllm tests
ruff check sigllm/
ruff format --check --diff sigllm/

.PHONY: lint-tests
lint-tests: ## check style with flake8 and isort
ruff check tests/
ruff format --check --diff tests/

.PHONY: fix-lint
fix-lint: ## fix lint issues using autoflake, autopep8, and isort
find sigllm tests -name '*.py' | xargs autoflake --in-place --remove-all-unused-imports --remove-unused-variables
autopep8 --in-place --recursive --aggressive sigllm tests
isort --apply --atomic --recursive sigllm tests
invoke fix-lint


# TEST TARGETS
Expand All @@ -93,10 +94,6 @@ test: test-unit test-readme test-tutorials ## test everything that needs test de
.PHONY: test-minimum
test-minimum: install-minimum check-dependencies test ## run tests using the minimum supported dependencies

.PHONY: test-sigllm
test: ## run tests quickly with the default Python
python -m pytest --basetemp=${ENVTMPDIR} --cov=sigllm --cov-report xml

.PHONY: test-all
test-all: ## run tests on every Python version with tox
tox -r -p auto
Expand Down Expand Up @@ -152,34 +149,34 @@ publish: dist publish-confirm ## package and upload a release
bumpversion-release: ## Merge master to stable and bumpversion release
git checkout stable || git checkout -b stable
git merge --no-ff master -m"make release-tag: Merge branch 'master' into stable"
bumpversion release
bump-my-version bump release
git push --tags origin stable

.PHONY: bumpversion-release-test
bumpversion-release-test: ## Merge master to stable and bumpversion release
git checkout stable || git checkout -b stable
git merge --no-ff master -m"make release-tag: Merge branch 'master' into stable"
bumpversion release --no-tag
bump-my-version bump release --no-tag
@echo git push --tags origin stable

.PHONY: bumpversion-patch
bumpversion-patch: ## Merge stable to master and bumpversion patch
git checkout master
git merge stable
bumpversion --no-tag patch
bump-my-version bump --no-tag patch
git push

.PHONY: bumpversion-minor
bumpversion-minor: ## Bump the version the next minor skipping the release
bumpversion --no-tag minor
bump-my-version bump --no-tag minor

.PHONY: bumpversion-major
bumpversion-major: ## Bump the version the next major skipping the release
bumpversion --no-tag major
bump-my-version bump --no-tag major

.PHONY: bumpversion-candidate
bumpversion-candidate: ## Bump the version to the next candidate
bumpversion candidate --no-tag
bump-my-version bump candidate --no-tag

.PHONY: bumpversion-revert
bumpversion-revert: ## Undo a previous bumpversion-release
Expand Down
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
'sphinx.ext.githubpages',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'IPython.sphinxext.ipython_console_highlighting',
'IPython.sphinxext.ipython_directive',
]

ipython_execlines = [
Expand Down Expand Up @@ -77,7 +79,7 @@
title = project + ' Documentation',
copyright = '2023, MIT Data To AI Lab'
author = 'MIT Data To AI Lab'
description = 'Signals plus LLMs'
description = 'LLMs for unsupervised time series anomaly detection.'
user = 'sintel-dev'

# The version info for the project you're documenting, acts as replacement
Expand Down
Loading
Loading