Skip to content

Commit 7ba0df4

Browse files
committed
Merge branch 'develop' for release 1.11.0
2 parents a418720 + b4e624a commit 7ba0df4

File tree

162 files changed

+7103
-1486
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+7103
-1486
lines changed

.github/dependabot.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
target-branch: develop
9+
ignore:
10+
- dependency-name: boto3
11+
- dependency-name: black
12+
versions:
13+
- 21.4b0
14+
- dependency-name: pylint
15+
versions:
16+
- 2.7.0
17+
- 2.7.1
18+
- 2.7.3
19+
- 2.7.4
20+
- 2.8.1
21+
- dependency-name: urllib3
22+
versions:
23+
- 1.26.4
24+
- dependency-name: pytest
25+
versions:
26+
- 6.2.3
27+
- dependency-name: colorlog
28+
versions:
29+
- 4.8.0
30+
- dependency-name: flake8
31+
versions:
32+
- 3.9.0
33+
- dependency-name: ping3
34+
versions:
35+
- 2.7.0
36+
- dependency-name: arrow
37+
versions:
38+
- 1.0.3

.github/workflows/linting.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ['3.6', '3.7', '3.8']
11+
python-version: ['3.6', '3.7', '3.8', '3.9']
1212
name: Python ${{ matrix.python-version }}
1313

1414
steps:
@@ -22,14 +22,19 @@ jobs:
2222
run: pip --version
2323
- name: Update pip
2424
run: pip install --upgrade pip
25-
- name: Install pipenv
26-
run: pip install pipenv
27-
- name: pipenv install
28-
run: pipenv --bare install --dev
25+
- name: Install poetry
26+
run: pip install poetry
27+
- name: poetry install
28+
run: poetry install
2929
- name: check code style with black
3030
run: make black
31+
if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' }} # broken in 3.6 currently
3132
- name: flake8 tests
3233
run: make flake8
33-
if: ${{ matrix.python-version == '3.8' }}
34+
if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' }}
3435
- name: bandit
3536
run: make bandit
37+
if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' }}
38+
- name: mypy
39+
run: make mypy
40+
if: ${{ matrix.python-version == '3.8' || matrix.python-version == '3.9' }}

.github/workflows/main.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ['3.6', '3.7', '3.8']
11+
python-version: ['3.6', '3.7', '3.8', '3.9']
1212
name: Python ${{ matrix.python-version }}
1313

1414
steps:
@@ -24,18 +24,20 @@ jobs:
2424
run: pip --version
2525
- name: Update pip
2626
run: pip install --upgrade pip
27-
- name: Install pipenv
28-
run: pip install pipenv
29-
- name: pipenv install
30-
run: pipenv --bare install --dev
27+
- name: Install poetry
28+
run: pip install poetry==1.1.4
29+
- name: poetry install
30+
run: poetry install
3131
- name: Integration tests
3232
run: make integration-tests
33+
- name: Integration tests (threaded)
34+
run: make integration-tests-threaded
3335
- name: Config environment variables tests
3436
run: make env-test
3537
- name: Unit tests
3638
run: make unit-test
3739
- name: Network logger tests
3840
run: make network-test
39-
- name: Upload to codecov
40-
run: pipenv run codecov --token="${{ secrets.CODECOV_TOKEN }}"
41+
- name: Output coverage report
42+
run: poetry run coverage xml -i
4143
- uses: codecov/codecov-action@v1

.github/workflows/windows.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: windows-latest
99
strategy:
1010
matrix:
11-
python-version: ['3.6', '3.7', '3.8']
11+
python-version: ['3.6', '3.7', '3.8', '3.9']
1212
name: Python ${{ matrix.python-version }} (Windows)
1313

1414
steps:
@@ -22,14 +22,16 @@ jobs:
2222
run: pip --version
2323
- name: Update pip
2424
run: pip install --user --upgrade pip
25-
- name: Install pipenv
26-
run: pip install pipenv
27-
- name: pipenv install
28-
run: pipenv --bare install --dev
25+
- name: Install poetry
26+
run: pip install poetry==1.1.4
27+
- name: poetry install
28+
run: poetry install
2929
- name: create HTML output folder
3030
run: mkdir html
3131
- name: Integration tests
3232
run: make integration-tests
33+
- name: Integration tests (threaded)
34+
run: make integration-tests-threaded
3335
- name: Unit tests
3436
run: make unit-test
3537
- uses: codecov/codecov-action@v1

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,12 @@ network.log
3535
.coverage.*
3636
.ring_token.cache
3737
simplemonitor.code-workspace
38+
client.log
39+
master.log
40+
coverage.xml
41+
_build
42+
old_docs
43+
docs/_build
44+
*.log
45+
.tox
46+
pyrightconfig.json

.pre-commit-config.yaml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.3.0
4-
hooks:
5-
- id: check-yaml
6-
- id: end-of-file-fixer
7-
- id: trailing-whitespace
8-
exclude: tests/test_alerter.py
9-
- id: flake8
10-
- repo: https://github.com/psf/black
11-
rev: 19.10b0
12-
hooks:
13-
- id: black
14-
- repo: https://github.com/asottile/seed-isort-config
15-
rev: v1.9.3
16-
hooks:
17-
- id: seed-isort-config
18-
- repo: https://github.com/pre-commit/mirrors-isort
19-
rev: v4.3.21 # pick the isort version you'd like to use from https://github.com/pre-commit/mirrors-isort/releases
20-
hooks:
21-
- id: isort
22-
- repo: https://github.com/pre-commit/mirrors-mypy
23-
rev: v0.761
24-
hooks:
25-
- id: mypy
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
exclude: tests/test_alerter.py
9+
- id: flake8
10+
- repo: https://github.com/psf/black
11+
rev: 20.8b1
12+
hooks:
13+
- id: black
14+
- repo: https://github.com/asottile/seed-isort-config
15+
rev: v1.9.3
16+
hooks:
17+
- id: seed-isort-config
18+
- repo: https://github.com/pre-commit/mirrors-isort
19+
rev: v4.3.21 # pick the isort version you'd like to use from https://github.com/pre-commit/mirrors-isort/releases
20+
hooks:
21+
- id: isort
22+
- repo: https://github.com/pre-commit/mirrors-mypy
23+
rev: v0.782
24+
hooks:
25+
- id: mypy

CHANGELOG

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
1.11:
2+
* Run monitors multithreaded
3+
* Add TLS certificate expiry monitor
4+
* Add unifi failover/watchdog monitors
5+
* Add sms77 alerter
6+
* Add twilio SMS alerter
7+
* Add fileloggerng logger with rotation support
8+
* Add seq logger
9+
* Improve timezone support for alerters
10+
* Add option to only listen on IPv4 for remote instances
11+
* Make group filtering work on remote monitors
12+
* Add "_all" group
13+
* Add enabled option for monitors
14+
* Improve HASS logger
15+
* Add new remote logging protocol
16+
* Remove pickle support for remote instances
17+
* Add client_name option for remote logging
18+
* Add descriptions to alerters and loggers
19+
* Add support for cc field in SMTP logger
20+
* Use jinja2 template for HTML logger rendering
21+
* Add map output option for HTML logger
22+
* Add gps property to monitors, currently only used for map output
23+
* Rewrite documentation, now built with Sphinx and hosted at RTD
24+
* Use poetry for project/dependency management
25+
* Assorted code refactoring and bugfixes
26+
127
1.10:
228
* REQUIRE PYTHON >= 3.6.2
329
* New style HTML page for HTML logger

CONTRIBUTORS

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ Ed
66
Erwin
77
Fred
88
FvDxxx
9+
G
910
Herman
1011
James
12+
Jamie
1113
Joe
14+
John
1215
MattK
1316
Michał
1417
Paolo
@@ -22,12 +25,14 @@ User
2225
Valentin
2326
Wayward
2427
WoJ
28+
andrew
2529
andronkyr
2630
dan
27-
dependabot-preview[bot]
28-
dependabot[bot]
31+
danieldh206
2932
error454
33+
graham
3034
nvnwater
35+
pheuzoune
3136
r4r3
3237
rarosalion
3338
shakreiner

Makefile

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,58 @@
11
.PHONY: flake8 dist twine twine-test integration-tests env-test network-test black mypy linting mypy-strict bandit bandit-strict
22

33
ifeq ($(OS),Windows_NT)
4-
ENVPATH := $(shell python -c "import os.path; import sys; print(os.path.join(sys.exec_prefix, 'Scripts'))")\\
54
MOCKSPATH := tests\mocks;
65
INTEGRATION_CONFIG := tests/monitor-windows.ini
76
else
8-
ENVPATH := $(shell pipenv --venv)/bin/
97
MOCKSPATH := $(PWD)/tests/mocks:
108
INTEGRATION_CONFIG := tests/monitor.ini
119
endif
12-
PIPENV := $(shell which pipenv)
10+
PIPENV := $(shell which poetry)
1311

1412
flake8:
15-
pipenv run flake8 *.py simplemonitor/
13+
poetry run flake8 *.py simplemonitor/
1614

1715
integration-tests:
16+
PATH="$(MOCKSPATH)$(PATH)" $(PIPENV) run coverage run monitor.py -1 -v -d -f $(INTEGRATION_CONFIG) -j 1
17+
18+
integration-tests-threaded:
1819
PATH="$(MOCKSPATH)$(PATH)" $(PIPENV) run coverage run monitor.py -1 -v -d -f $(INTEGRATION_CONFIG)
1920

2021
env-test:
21-
env TEST_VALUE=myenv pipenv run coverage run --append monitor.py -t -f tests/monitor-env.ini
22+
env TEST_VALUE=myenv poetry run coverage run --append monitor.py -t -f tests/monitor-env.ini
2223

2324
unit-test:
24-
pipenv run coverage run --append -m unittest discover -s tests
25+
poetry run pytest --cov-append --cov=simplemonitor tests
2526

2627
network-test:
27-
pipenv run tests/test-network.sh
28+
rm -f master.log
29+
rm -f client.log
30+
poetry run tests/test-network.sh
2831

2932
dist:
3033
rm -f dist/simplemonitor-*
31-
pipenv run python setup.py sdist bdist_wheel
34+
poetry run python setup.py sdist bdist_wheel
3235

3336
twine-test:
34-
pipenv run python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
37+
poetry run python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
3538

3639
twine:
37-
pipenv run python -m twine upload dist/*
40+
poetry run python -m twine upload dist/*
3841

3942
black:
40-
pipenv run black --check --diff *.py simplemonitor/
43+
poetry run black --check --diff *.py simplemonitor/
4144

4245
mypy:
43-
pipenv run mypy *.py simplemonitor/
46+
poetry run mypy *.py simplemonitor/
4447

4548
mypy-strict:
46-
pipenv run mypy --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs --disallow-untyped-decorators *.py simplemonitor/
49+
poetry run mypy --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs --disallow-untyped-decorators *.py simplemonitor/
4750

4851
bandit:
49-
pipenv run bandit -r -ll *.py simplemonitor/
52+
poetry run bandit -r -ll *.py simplemonitor/
5053

5154
bandit-strict:
52-
pipenv run bandit -r -l *.py simplemonitor/
55+
poetry run bandit -r -l *.py simplemonitor/
5356

5457
linting: black flake8 mypy bandit
5558

Pipfile

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

0 commit comments

Comments
 (0)