Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ambianic/ambianic-edge
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.15.1
Choose a base ref
...
head repository: ambianic/ambianic-edge
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Aug 18, 2021

  1. build: fix release versioning

    ivelin committed Aug 18, 2021
    Copy the full SHA
    2421964 View commit details

Commits on Aug 19, 2021

  1. fix: release versioning

    ivelin committed Aug 19, 2021
    Copy the full SHA
    867347e View commit details
  2. Merge branch 'ambianic:master' into fork-master

    Ivelin Ivanov authored Aug 19, 2021
    Copy the full SHA
    52597ec View commit details
  3. fix: release versioning script

    ivelin committed Aug 19, 2021
    Copy the full SHA
    e7cbf06 View commit details
  4. Merge branch 'ambianic:master' into fork-master

    Ivelin Ivanov authored Aug 19, 2021
    Copy the full SHA
    d9de667 View commit details
  5. fix: release versioning script; closes 364 (#367) (PR Merge)

    * build: fix release versioning
    
    * fix: release versioning
    
    * fix: release versioning script
    Ivelin Ivanov authored Aug 19, 2021
    Copy the full SHA
    e1e15d5 View commit details
  6. chore(release): 1.15.2

    ## [1.15.2](v1.15.1...v1.15.2) (2021-08-19)
    
    ### Bug Fixes
    
    * release versioning script; closes 364 ([#367](#367)) (PR Merge) ([e1e15d5](e1e15d5))
    semantic-release-bot committed Aug 19, 2021
    Copy the full SHA
    5c59f65 View commit details
  7. fix: docker build cache issue with multi arch

    Ivelin Ivanov authored Aug 19, 2021
    Copy the full SHA
    90d5cba View commit details
  8. chore(release): 1.15.3

    ## [1.15.3](v1.15.2...v1.15.3) (2021-08-19)
    
    ### Bug Fixes
    
    * docker build cache issue with multi arch ([90d5cba](90d5cba))
    semantic-release-bot committed Aug 19, 2021
    Copy the full SHA
    b5a35c1 View commit details

Commits on Aug 20, 2021

  1. chore: fix arm32 docker sequence [skip ci]

    Ivelin Ivanov authored Aug 20, 2021
    Copy the full SHA
    131c877 View commit details
  2. fix: docker arm32 release script

    Ivelin Ivanov authored Aug 20, 2021
    Copy the full SHA
    d2dec3d View commit details
  3. chore(release): 1.15.4

    ## [1.15.4](v1.15.3...v1.15.4) (2021-08-20)
    
    ### Bug Fixes
    
    * docker arm32 release script ([d2dec3d](d2dec3d))
    semantic-release-bot committed Aug 20, 2021
    Copy the full SHA
    6395bbf View commit details
  4. fix: check docker container watchdog auto update

    Ivelin Ivanov authored Aug 20, 2021
    Copy the full SHA
    530d35f View commit details
  5. chore(release): 1.15.5

    ## [1.15.5](v1.15.4...v1.15.5) (2021-08-20)
    
    ### Bug Fixes
    
    * check docker container watchdog auto update ([530d35f](530d35f))
    semantic-release-bot committed Aug 20, 2021
    Copy the full SHA
    6763f91 View commit details

Commits on Aug 27, 2021

  1. chore: fastapi switch - commit checkpoint

    ivelin committed Aug 27, 2021
    Copy the full SHA
    f538792 View commit details
  2. build: add fastapi to requirements.txt

    ivelin committed Aug 27, 2021
    Copy the full SHA
    2e51f07 View commit details
  3. build: add fastapi to requirements.txt

    ivelin committed Aug 27, 2021
    Copy the full SHA
    6e66d0b View commit details
  4. chore: python environment settings

    ivelin committed Aug 27, 2021
    Copy the full SHA
    dcc6d88 View commit details
  5. chore: fix pip cli error

    Ivelin Ivanov authored Aug 27, 2021
    Copy the full SHA
    dd78ef6 View commit details
  6. chore: uniform pip use

    Ivelin Ivanov authored Aug 27, 2021
    Copy the full SHA
    fee5e11 View commit details
  7. chore: fix gitpod docker image

    ivelin committed Aug 27, 2021
    Copy the full SHA
    4beaff5 View commit details
  8. chore: pyenv issues

    ivelin committed Aug 27, 2021
    Copy the full SHA
    cea2c2e View commit details
  9. chore: pyenv

    ivelin committed Aug 27, 2021
    Copy the full SHA
    89f8f3b View commit details
  10. chore

    Ivelin Ivanov authored Aug 27, 2021
    Copy the full SHA
    bbdf777 View commit details
  11. chore

    Ivelin Ivanov authored Aug 27, 2021
    Copy the full SHA
    8a67809 View commit details
  12. chore: checkpoint

    ivelin committed Aug 27, 2021
    Copy the full SHA
    aeabb8b View commit details
  13. chore: clean up deps

    Ivelin Ivanov authored Aug 27, 2021
    Copy the full SHA
    dbcb7c6 View commit details
  14. chore: rebuild

    Ivelin Ivanov authored Aug 27, 2021
    Copy the full SHA
    b739586 View commit details

Commits on Aug 28, 2021

  1. chore: commit checkpoint

    ivelin committed Aug 28, 2021
    Copy the full SHA
    8cf95da View commit details
  2. chore: commit checkpoint

    ivelin committed Aug 28, 2021
    Copy the full SHA
    a7ea504 View commit details

Commits on Aug 29, 2021

  1. chore: checkpoint

    ivelin committed Aug 29, 2021
    Copy the full SHA
    839c2ed View commit details
  2. chore: checkpoint

    ivelin committed Aug 29, 2021
    Copy the full SHA
    8c9344a View commit details
  3. chore: checkpoint

    ivelin committed Aug 29, 2021
    Copy the full SHA
    0593f83 View commit details

Commits on Aug 30, 2021

  1. chore: checkpoint

    ivelin committed Aug 30, 2021
    Copy the full SHA
    ae52c98 View commit details
  2. chore: checkpoint

    ivelin committed Aug 30, 2021
    Copy the full SHA
    c8498e6 View commit details

Commits on Aug 31, 2021

  1. Copy the full SHA
    c21fd29 View commit details
  2. docs: generate openapi

    ivelin committed Aug 31, 2021
    Copy the full SHA
    0931098 View commit details

Commits on Sep 1, 2021

  1. build: arm pip install fails

    ivelin committed Sep 1, 2021
    Copy the full SHA
    a19ace6 View commit details
  2. build: arm build requires rust

    ivelin committed Sep 1, 2021
    Copy the full SHA
    0a6a9e9 View commit details
  3. build: add update for ca-certificates

    ivelin committed Sep 1, 2021
    Copy the full SHA
    404bcc9 View commit details
  4. build: add update for ca-certificates

    ivelin committed Sep 1, 2021
    Copy the full SHA
    81624ea View commit details
  5. build: add update for ca-certificates

    ivelin committed Sep 1, 2021
    Copy the full SHA
    520cfcd View commit details
  6. build: add update for ca-certificates

    ivelin committed Sep 1, 2021
    Copy the full SHA
    198db02 View commit details
  7. fix: rust install for arm

    ivelin committed Sep 1, 2021
    Copy the full SHA
    b1c8fba View commit details
  8. fix: rust install for arm

    ivelin committed Sep 1, 2021
    Copy the full SHA
    de4494c View commit details
  9. fix: rust install for arm

    ivelin committed Sep 1, 2021
    Copy the full SHA
    db7c3dc View commit details
  10. chore: fix crc32 break

    ivelin committed Sep 1, 2021
    Copy the full SHA
    d491969 View commit details
  11. chore: remove timeout

    ivelin committed Sep 1, 2021
    Copy the full SHA
    762c61d View commit details

Commits on Sep 2, 2021

  1. chore: merge from master repo

    ivelin committed Sep 2, 2021
    Copy the full SHA
    5ecb482 View commit details
  2. chore: formatting

    ivelin committed Sep 2, 2021
    Copy the full SHA
    26a941d View commit details
Showing with 5,033 additions and 4,158 deletions.
  1. +1 −0 .env
  2. +2 −2 .github/ISSUE_TEMPLATE/feature_request.md
  3. +17 −0 .github/stale.yml
  4. +23 −6 .github/workflows/main.yml
  5. +0 −25 .github/workflows/security-scan.yml
  6. +2 −2 .gitignore
  7. +10 −11 .gitpod.Dockerfile
  8. +7 −0 .gitpod.env.sh
  9. +61 −7 .gitpod.yml
  10. +4 −0 .isort.cfg
  11. +1 −1 .lgtm.yml
  12. +68 −0 .pre-commit-config.yaml
  13. +1 −1 .theia/launch.json
  14. +2 −3 .theia/settings.json
  15. +206 −0 CHANGELOG.md
  16. +3 −4 CONTRIBUTING.md
  17. +9 −75 README.md
  18. +1 −1 SECURITY.md
  19. +1 −1 ai_models/coco_labels.txt
  20. +1 −1 ai_models/imagenet_labels.txt
  21. +1 −1 ai_models/inat_bird_labels.txt
  22. +1 −1 ai_models/inat_insect_labels.txt
  23. +1 −1 ai_models/inat_plant_labels.txt
  24. +1 −1 ai_models/pet_labels.txt
  25. +0 −1 ambianic-deamon-start.sh
  26. +1 −1 ambianic-start.sh
  27. +6 −0 build/Prod.Dockerfile
  28. +29 −2 build/ambianic-docker-entrypoint.sh
  29. +0 −1 build/ci-docs-job.sh
  30. +16 −7 build/ci-prep-release-job.sh
  31. +0 −1 build/ci-test-job.sh
  32. +24 −13 build/install_requirements.sh
  33. +8 −6 build/prepare-semantic-release.sh
  34. +17 −8 build/requirements.txt
  35. +117 −0 config.defaults.yaml
  36. +0 −41 config.local.yaml
  37. +11 −98 config.yaml
  38. +10 −9 dev/dev-config.yaml
  39. +24 −0 docs/ambianic-edge-openapi.html
  40. +14 −6 docs/build-docs.sh
  41. +30 −0 docs/fastapi_spec_gen.py
  42. +24 −4 peerjs-config.yaml
  43. +0 −89 src/ambianic/__init__.py
  44. +10 −11 src/ambianic/__main__.py
  45. +142 −0 src/ambianic/configuration.py
  46. +12 −0 src/ambianic/device.py
  47. +18 −20 src/ambianic/logger.py
  48. +113 −91 src/ambianic/notification.py
  49. +16 −15 src/ambianic/pipeline/__init__.py
  50. +59 −45 src/ambianic/pipeline/ai/face_detect.py
  51. +271 −205 src/ambianic/pipeline/ai/fall_detect.py
  52. +28 −31 src/ambianic/pipeline/ai/image_boundingBox_detection.py
  53. +42 −46 src/ambianic/pipeline/ai/inference.py
  54. +29 −31 src/ambianic/pipeline/ai/object_detect.py
  55. +83 −64 src/ambianic/pipeline/ai/pose_engine.py
  56. +31 −26 src/ambianic/pipeline/ai/tf_detect.py
  57. +88 −68 src/ambianic/pipeline/avsource/av_element.py
  58. +101 −95 src/ambianic/pipeline/avsource/gst_process.py
  59. +8 −8 src/ambianic/pipeline/avsource/picam.py
  60. +113 −95 src/ambianic/pipeline/interpreter.py
  61. +25 −26 src/ambianic/pipeline/{timeline.py → pipeline_event.py}
  62. +214 −0 src/ambianic/pipeline/save_event.py
  63. +0 −207 src/ambianic/pipeline/store.py
  64. +36 −37 src/ambianic/server.py
  65. +53 −26 src/ambianic/util.py
  66. +0 −1 src/ambianic/webapp/.gitignore
  67. +304 −0 src/ambianic/webapp/fastapi_app.py
  68. +0 −322 src/ambianic/webapp/flaskr.py
  69. +26 −49 src/ambianic/webapp/server/config_sources.py
  70. +0 −253 src/ambianic/webapp/server/samples.py
  71. +125 −0 src/ambianic/webapp/server/timeline_dao.py
  72. +1 −1 src/setup.cfg
  73. +1 −0 src/setup.py
  74. +1 −1 tests/pipeline/ai/coco_labels.txt
  75. +146 −124 tests/pipeline/ai/test_face_detect.py
  76. +127 −127 tests/pipeline/ai/test_fall_detect.py
  77. +30 −33 tests/pipeline/ai/test_fall_detect_more.py
  78. +39 −40 tests/pipeline/ai/test_image_detect.py
  79. +18 −38 tests/pipeline/ai/test_inference.py
  80. +105 −96 tests/pipeline/ai/test_object_detect.py
  81. +192 −222 tests/pipeline/avsource/test_avsource.py
  82. +74 −86 tests/pipeline/avsource/test_avsource_http.py
  83. +14 −14 tests/pipeline/avsource/test_avsource_picamera.py
  84. +83 −110 tests/pipeline/avsource/test_gstreamer.py
  85. +58 −70 tests/pipeline/test_interpreter.py
  86. +39 −44 tests/pipeline/test_interpreter_more.py
  87. +156 −101 tests/pipeline/test_notify.py
  88. +2 −1 tests/pipeline/test_pipeline_healthchecker.py
  89. +17 −22 tests/pipeline/test_pipeline_server.py
  90. +539 −0 tests/pipeline/test_save_event.py
  91. +0 −423 tests/pipeline/test_store.py
  92. +2 −2 tests/run-tests.sh
  93. +1 −1 tests/secrets.yaml
  94. +4 −4 tests/test-config-secrets.yaml
  95. +96 −0 tests/test-config.yaml
  96. +96 −0 tests/test-restapi-config.yaml
  97. +1 −0 tests/test-secrets.yaml
  98. +41 −21 tests/test_config.py
  99. +0 −178 tests/test_flaskr.py
  100. +23 −40 tests/test_logger.py
  101. +271 −0 tests/test_rest_api.py
  102. +3 −4 tests/test_service.py
  103. +90 −63 tests/test_startup.py
  104. +39 −89 tests/{test_samples.py → test_timeline_dao.py}
  105. +22 −0 tests/test_util.py
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Local dev environment settings
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
title: "[FEATURE] "
labels: enhancement
assignees: ''

---
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
29 changes: 23 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -7,9 +7,23 @@ on:
# branches: [ master ]

jobs:

formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run formatting check
run: |
python3 -m pip install -U pre-commit
pre-commit install
pre-commit run --all-files
- name: Show diff on failure
if: ${{ failure() }}
run: |
git diff
test_x86:
# Skip CI if the commit message includes the string '[skip ci]'
if: "! contains(github.event.head_commit.message, '[skip ci]')"
needs: [formatting]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -25,12 +39,13 @@ jobs:
${GITHUB_WORKSPACE}/build/ci-test-job.sh
test_arm:
# Skip CI if the commit message includes the string '[skip ci]'
if: "! contains(github.event.head_commit.message, '[skip ci]')"
needs: [formatting]
runs-on: ubuntu-latest
timeout-minutes: 50
steps:
- uses: actions/checkout@v2
- name: Run test script
# timeout-minutes: 20
env:
ARCH: "linux/arm/v7"
TAG_SUFFIX: "arm32v7"
@@ -44,8 +59,10 @@ jobs:
push_release:
needs: [test_x86, test_arm]
# run this job only if its a push on the master(main) branch
# and not a PR from a fork
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
# of the upstream ambianic repo.
if: github.repository_owner == 'ambianic' &&
github.event_name == 'push' &&
github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
25 changes: 0 additions & 25 deletions .github/workflows/security-scan.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -16,13 +16,13 @@ ambianic/webapp/bower_components/paper/
_mdwriter.cson
**/timeline-event-log.yaml
.pytest_cache/
**/.peerjsrc
**/.peerjsrc*
**/ambianic_edge.egg-info/
ambianic-debug2.sh
config.yaml.local
premium.yaml
/.ropeproject
tmp*.jpg
src/Ambianic.egg-info/**
config.yaml
/docs/dist
**/*.local.yaml
21 changes: 10 additions & 11 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -12,14 +12,13 @@ FROM gitpod/workspace-full
# RUN sudo apt-get install -y curl && \
# curl -k -L -o ./install_requirements.sh https://raw.githubusercontent.com/ambianic/ambianic-edge/master/build/install_requirements.sh && \
# sudo /bin/bash ./install_requirements.sh

# Install custom tools, runtimes, etc.
# For example "bastet", a command-line tetris clone:
# RUN brew install bastet
#
# More information: https://www.gitpod.io/docs/config-docker/


# Remove pyenv, which gitpod installs by default
# but it doesn't play well with system level dependencies like gstreamer python wrappers and tflite
# comment out lines in init shell script that enable pyenv
@@ -30,18 +29,18 @@ FROM gitpod/workspace-full
# Copy dependencies install list and script
# COPY install_requirements.sh install_requirements.sh
COPY ["./build/*", "./"]
RUN arch && ls -al && sudo /bin/bash ./install_requirements.sh #
RUN arch && ls -al && sudo /bin/bash ./install_requirements.sh #

# install gtipod environment dev packages for app testing
RUN python3 -m pip install --upgrade pip && \
python3 -m pip install --upgrade --upgrade setuptools && \
sudo pip3 install -U pytest && \
sudo pip3 install -U codecov && \
sudo pip3 install -U pytest-cov && \
sudo pip3 install -U pylint && \
sudo ln -s /usr/bin/python3 /usr/bin/python
# RUN python3 -m pip install --upgrade pip && \
# python3 -m pip install --upgrade --upgrade setuptools && \
# python3 -m pip install -U pytest && \
# python3 -m pip install -U codecov && \
# python3 -m pip install -U pytest-cov && \
# python3 -m pip install -U pylint && \
# sudo ln -s /usr/bin/python3 /usr/bin/python

# && \
# echo "pyenv global system" >> ~/.bashrc.d/60-python && \
# echo "python3 -m pip install -e ~/src" >> ~/.bashrc

#
7 changes: 7 additions & 0 deletions .gitpod.env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# init environment vars for a gitpod terminal session
export PIP_USER=false
export AMBIANIC_CONFIG_FILES="/workspace/ambianic-edge/config.defaults.yaml, \
/workspace/ambianic-edge/.peerjsrc.json, \
/workspace/ambianic-edge/dev/dev-config.yaml, \
/workspace/ambianic-edge/dev/dev-config.local.yaml"
export AMBIANIC_SAVE_CONFIG_TO="/workspace/ambianic-edge/dev/dev-config.local.yaml"
68 changes: 61 additions & 7 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,71 @@

image:
file: .gitpod.Dockerfile
tasks:
- init: |
echo "Gitpod init. Setting up ambianic-edge dev environment."
pip3 install -e ./src
touch /tmp/.gitpod-init-lock
pyenv global system
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools
echo "Installing pre-commit hooks."
export PIP_USER=false
python3 -m pip install -U --user pre-commit
pre-commit install
pre-commit autoupdate
# installing and upgrading requirements.txt packages
sudo
# convoluted way to install and upgrade requirements.txt packages without failing if one errors
# ref: https://stackoverflow.com/questions/22250483/stop-pip-from-failing-on-single-package-when-installing-with-requirements-txt
cat ./build/requirements.txt | sudo xargs -n 1 python3 -m pip install --upgrade
echo "Installing local ambianic-edge package from ./src"
python3 -m pip install --user -e ./src
# set local config file list for ambianic env settings
rm /tmp/.gitpod-init-lock
command: |
source ./.gitpod.env.sh
- init: |
echo "Waiting for main init to complete"
sleep 1 && while [ -f /tmp/.gitpod-init-lock ]; do sleep 1; done
command: |
echo "Starting amgianic-edge core"
pyenv global system
echo "Started ambianic-edge development environment."
echo "Running ambianic-edge testsuite:"
python3 -m pytest --cov=ambianic --cov-report=term tests/
- command: |
source ./.gitpod.env.sh
sudo mkdir /opt/ambianic-edge/
sudo ln -s /workspace/ambianic-edge/ai_models/ /opt/ambianic-edge/ai_models
sudo ln -s /workspace/ambianic-edge/.peerjsrc /workspace/ambianic-edge/.peerjsrc.json
python3 -m ambianic
- init: |
echo "Waiting for main init to complete"
sleep 1 && while [ -f /tmp/.gitpod-init-lock ]; do sleep 1; done
command: |
echo "Starting WebRTC to HTTP proxy"
pyenv global system
echo "To run the amgianic-edge server use:"
echo "python3 -m ambianic"
source ./.gitpod.env.sh
python3 -m peerjs.ext.http_proxy
- init: |
echo "Waiting for main init to complete"
sleep 1 && while [ -f /tmp/.gitpod-init-lock ]; do sleep 1; done
command: |
echo "Starting OpenAPI server (fastapi/uvicorn)"
pyenv global system
source ./.gitpod.env.sh
python3 -m uvicorn ambianic.webapp.fastapi_app:app --reload --port 8778 --log-level debug
- init: |
echo "Waiting for main init to complete"
sleep 1 && while [ -f /tmp/.gitpod-init-lock ]; do sleep 1; done
command: |
echo "Running code linting:"
pyenv global system
pre-commit run --all-files
echo "Running ambianic-edge testsuite:"
source ./.gitpod.env.sh
sudo python3 -m pip install pytest pytest-mock pytest-cov
python3 -m pytest -v --log-cli-level=DEBUG --cov=ambianic --cov-report=term tests/
vscode:
extensions:
- ms-python.python
- github.vscode-pull-request-github
- eamodio.gitlens
#
4 changes: 4 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[settings]
known_third_party = PIL,ambianic,apprise,concurrent_log_handler,dynaconf,fastapi,gi,httpretty,importlib_metadata,numpy,pkg_resources,pydantic,pytest,requests,setuptools,test_avsource_picamera,test_fall_detect,tflite_runtime,uvicorn,watchdog,yaml
[tool.isort]
profile = "black"
2 changes: 1 addition & 1 deletion .lgtm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extraction:
javascript:
index:
exclude: "**/*"
exclude: "**/*"
68 changes: 68 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# .pre-commit-config.yaml

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude: "tests/functional/t/trailing_whitespaces.py"
- id: end-of-file-fixer
exclude: "tests/functional/m/missing/missing_final_newline.py|tests/functional/t/trailing_newlines.py"
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
exclude: &fixtures tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
args:
- --in-place
- --remove-all-unused-imports
- --expand-star-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.1
hooks:
- id: pyupgrade
args: [--py36-plus]
exclude: *fixtures
# isort
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black"]
# black
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
- id: black
args: [--safe, --line-length=88]
exclude: *fixtures
- repo: https://github.com/Pierre-Sassoulas/black-disable-checker/
rev: 1.0.1
hooks:
- id: black-disable-checker
# flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
args: # arguments to configure flake8
# making isort line length compatible with black
- "--max-line-length=88"
- "--max-complexity=18"
- "--select=B,C,E,F,W,T4,B9"

# these are errors that will be ignored by flake8
# check out their meaning here
# https://flake8.pycqa.org/en/latest/user/error-codes.html
- "--ignore=E203,E266,E501,W503,F403,F401,E402"
- repo: https://github.com/pycqa/pylint
rev: v2.12.2
hooks:
- id: pylint
args:
- "--max-line-length=88"
- "--ignore-imports=yes"
- "--errors-only"
- "--disable=import-error,unsubscriptable-object,invalid-sequence-index,relative-beyond-top-level"
2 changes: 1 addition & 1 deletion .theia/launch.json
Original file line number Diff line number Diff line change
@@ -9,4 +9,4 @@
"console": "integratedTerminal"
}
]
}
}
5 changes: 2 additions & 3 deletions .theia/settings.json
Original file line number Diff line number Diff line change
@@ -7,6 +7,5 @@
"python.testing.pytestEnabled": true,
"editor.autoSave": "on",
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.pylamaEnabled": true
}
"python.linting.pylintEnabled": true
}
Loading