diff --git a/.flake8 b/.flake8 new file mode 100644 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length=160 +ignore=W503 diff --git a/.style.yapf b/.style.yapf new file mode 100644 --- /dev/null +++ b/.style.yapf @@ -0,0 +1,4 @@ +# overwritten by /home/drewp/bin/setup_home_venv +[style] +based_on_style = google +column_limit = 160 diff --git a/bin/ascoltami2 b/bin/ascoltami2 --- a/bin/ascoltami2 +++ b/bin/ascoltami2 @@ -41,7 +41,6 @@ class App(object): if __name__ == "__main__": - GObject.threads_init() Gst.init(None) parser = optparse.OptionParser() diff --git a/bin/collector b/bin/collector --- a/bin/collector +++ b/bin/collector @@ -1,5 +1,5 @@ #!/bin/sh -pnpx vite -c light9/web/homepage/vite.config.ts & +pnpx vite -c light9/collector/web/vite.config.ts & pdm run uvicorn light9.collector.service:app --host 0.0.0.0 --port 8202 wait diff --git a/light9/ascoltami/player.py b/light9/ascoltami/player.py --- a/light9/ascoltami/player.py +++ b/light9/ascoltami/player.py @@ -12,7 +12,7 @@ log = logging.getLogger() stats = scales.collection( '/player', - scales.RecentFpsStat('currentTimeFps'), + # scales.RecentFpsStat('currentTimeFps'), ) @@ -142,7 +142,7 @@ class Player(object): log.error("couldn't preload %s, %r", songPath, e) raise - @stats.currentTimeFps.rate() + # @stats.currentTimeFps.rate() def currentTime(self): success, cur = self.playbin.query_position(Gst.Format.TIME) if not success: diff --git a/light9/ascoltami/webapp.py b/light9/ascoltami/webapp.py --- a/light9/ascoltami/webapp.py +++ b/light9/ascoltami/webapp.py @@ -3,7 +3,7 @@ import json, socket, subprocess, os, log from cyclone import template from rdflib import URIRef import cyclone.web, cyclone.websocket -from greplin.scales.cyclonehandler import StatsHandler +# from greplin.scales.cyclonehandler import StatsHandler from cycloneerr import PrettyErrorHandler from light9.namespaces import L9 @@ -205,8 +205,8 @@ def makeWebApp(app): (r"/seekPlayOrPause", seekPlayOrPause), (r"/output", output), (r"/go", goButton), - (r'/stats/(.*)', StatsHandler, { - 'serverName': 'ascoltami' - }), + # (r'/stats/(.*)', StatsHandler, { + # 'serverName': 'ascoltami' + # }), ], app=app) diff --git a/light9/web/stats_test.html b/light9/web/stats_test.html deleted file mode 100644 --- a/light9/web/stats_test.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - -

stats_test page

- - - - - diff --git a/makefile b/makefile --- a/makefile +++ b/makefile @@ -1,46 +1,60 @@ ### setup ### packages: - sudo aptitude install coffeescript normalize-audio audacity python3-pygame libffi-dev tix libzmq3-dev python3-dev libssl-dev python3-opencv python3-cairo npm git virtualenv python3-virtualenv nginx-full python3-tk zlib1g-dev libjpeg8-dev curl - -# also pip3 install -U invoke (don't use ubuntu's version) + sudo aptitude install -y \ + audacity \ + coffeescript \ + curl \ + git \ + libffi-dev \ + libjpeg8-dev \ + libssl-dev \ + libzmq3-dev \ + nginx-core \ + nginx-full \ + normalize-audio \ + npm \ + python3-cairo \ + python3-dev \ + python3-opencv \ + python3-pygame \ + python3-tk \ + tix \ + zlib1g-dev gst_packages: - sudo aptitude install python3-gi gir1.2-gst-plugins-base-1.0 libgirepository-1.0-1 gir1.2-gstreamer-1.0 gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-pulseaudio python3-gst-1.0 gir1.2-goocanvas-2.0 + sudo aptitude install -y \ + gir1.2-goocanvas-2.0 \ + gir1.2-gst-plugins-base-1.0 \ + gir1.2-gstreamer-1.0 \ + gstreamer1.0-plugins-good \ + gstreamer1.0-pulseaudio \ + gstreamer1.0-tools \ + libgirepository-1.0-1 \ + libgirepository1.0-dev \ + python3-gi \ + python3-gst-1.0 -node_modules/bower/bin/bower: - pnpm install - +pnpm: + # holding pnpm back because we don't have the latest nodejs: https://pnpm.io/installation#compatibility + sudo npm install -g pnpm@6.32.12 + bin/node: ln -sf `which nodejs` bin/node -bower: node_modules/bower/bin/bower bin/node - cd light9/web/lib; nodejs ../../../node_modules/bower/bin/bower install - -npm_install: - pnpm install +js: pnpm + pnpm install --reporter append-only -node_modules/n3/n3-browser.js: - (cd node_modules/n3; pnpx browserify --standalone N3 --require n3 -o n3-browser.js) - -light9/web/lib/debug/debug-build.js: - pnpx browserify light9/web/lib/debug/src/browser.js -o light9/web/lib/debug/debug-build.js --standalone debug +py: + pdm sync -light9/web/lib/debug/debug-build-es6.js: - pnpx browserify light9/web/lib/debug/src/browser.js -o light9/web/lib/debug/debug-build-es6.js --standalone debug - echo "\nexport default window.debug;" >> light9/web/lib/debug/debug-build-es6.js +refresh: packages gst_packages js py -lit_fix: - perl -pi -e "s,'lit-html,'/node_modules/lit-html,; s,lit-html',lit-html/lit-html.js'," node_modules/lit-element/lit-element.js + -round_fix: - perl -pi -e 's/module.exports = rounding/export { rounding }/' node_modules/significant-rounding/index.js + -light9/web/lib/underscore/underscore-min-es6.js: - cp light9/web/lib/underscore/underscore-min.js light9/web/lib/underscore/underscore-min-es6.js - perl -pi -e 's/call\(this\);/call(window); export default window._;/' light9/web/lib/underscore/underscore-min-es6.js -npm: npm_install node_modules/n3/n3-browser.js light9/web/lib/debug/debug-build.js light9/web/lib/debug/debug-build-es6.js lit_fix round_fix light9/web/lib/underscore/underscore-min-es6.js bin/ascoltami2: gst_packages link_to_sys_packages diff --git a/package.json b/package.json --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "parse-prometheus-text-format": "^1.1.1", "pixi.js": "^4.7.3", "significant-rounding": "^2.0.0", - "tinycolor2": "^1.4.1", "vite": "^2.9.1" }, "devDependencies": { diff --git a/pdm.lock b/pdm.lock --- a/pdm.lock +++ b/pdm.lock @@ -546,6 +546,12 @@ dependencies = [ ] [[package]] +name = "pycairo" +version = "1.21.0" +requires_python = ">=3.7" +summary = "Python interface for cairo" + +[[package]] name = "pycodestyle" version = "2.8.0" requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -580,6 +586,15 @@ requires_python = ">=3.5" summary = "Pygments is a syntax highlighting package written in Python." [[package]] +name = "pygobject" +version = "3.42.1" +requires_python = ">=3.6, <4" +summary = "Python bindings for GObject Introspection" +dependencies = [ + "pycairo>=1.16.0", +] + +[[package]] name = "pyhamcrest" version = "2.0.3" requires_python = ">=3.5" @@ -1005,7 +1020,7 @@ dependencies = [ [metadata] lock_version = "3.1" -content_hash = "sha256:6f3675b6f2fd3a785447ebcdba3d06525aaf1b087518801257dd2a63d3ec9e64" +content_hash = "sha256:cf4d983fdeb6aa86b91406cc99a3987f77340f9e0b544d0fbce0c213e25ca8c4" [metadata.files] "anyio 3.5.0" = [ @@ -1542,6 +1557,17 @@ content_hash = "sha256:6f3675b6f2fd3a785 {file = "pyasn1_modules-0.2.8-py2.py3-none-any.whl", hash = "sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74"}, {file = "pyasn1-modules-0.2.8.tar.gz", hash = "sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e"}, ] +"pycairo 1.21.0" = [ + {file = "pycairo-1.21.0-cp310-cp310-win32.whl", hash = "sha256:44a2ecf34968de07b3b9dfdcdbccbd25aa3cab267200f234f84e81481a73bbf6"}, + {file = "pycairo-1.21.0-cp310-cp310-win_amd64.whl", hash = "sha256:f63c153a9ea3d21aff85e2caeee4b0c5d566b2368b4ed64826020d12953d76a4"}, + {file = "pycairo-1.21.0-cp37-cp37m-win32.whl", hash = "sha256:70936b19f967fa3cb3cd200c2608911227fa5d09dae21c166f64bc15e714ee41"}, + {file = "pycairo-1.21.0-cp37-cp37m-win_amd64.whl", hash = "sha256:31e1c4850db03201d33929cbe1905ce1b33202683ebda7bb0d4dba489115066b"}, + {file = "pycairo-1.21.0-cp38-cp38-win32.whl", hash = "sha256:dace6b356c476de27f8e1522428ac21a799c225703f746e2957d441f885dcb6c"}, + {file = "pycairo-1.21.0-cp38-cp38-win_amd64.whl", hash = "sha256:4357f20a6b1de8f1e8072a74ff68ab4c9a0ae698cd9f5c0f2b2cdd9b28b635f6"}, + {file = "pycairo-1.21.0-cp39-cp39-win32.whl", hash = "sha256:6d37375aab9f2bb6136f076c19815d72108383baae89fbc0d6cb8e5092217d02"}, + {file = "pycairo-1.21.0-cp39-cp39-win_amd64.whl", hash = "sha256:26b72b813c6f9d495f71057eab89c13e70a21c92360e9265abc049e0a931fa39"}, + {file = "pycairo-1.21.0.tar.gz", hash = "sha256:251907f18a552df938aa3386657ff4b5a4937dde70e11aa042bc297957f4b74b"}, +] "pycodestyle 2.8.0" = [ {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, @@ -1562,6 +1588,9 @@ content_hash = "sha256:6f3675b6f2fd3a785 {file = "Pygments-2.11.2-py3-none-any.whl", hash = "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65"}, {file = "Pygments-2.11.2.tar.gz", hash = "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a"}, ] +"pygobject 3.42.1" = [ + {file = "PyGObject-3.42.1.tar.gz", hash = "sha256:80d6a3ad1630e9d1edf31b9e9fad9a894c57e18545a3c95ef0044ac4042b8620"}, +] "pyhamcrest 2.0.3" = [ {file = "PyHamcrest-2.0.3-py3-none-any.whl", hash = "sha256:c29dc977154c49e17c30d1ed49a0a6e31cb0dc7bcf733ac4aa9cb58519c2b00c"}, {file = "PyHamcrest-2.0.3.tar.gz", hash = "sha256:dfb19cf6d71743e086fbb761ed7faea5aacbc8ec10c17a08b93ecde39192a3db"}, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,6 @@ specifiers: parse-prometheus-text-format: ^1.1.1 pixi.js: ^4.7.3 significant-rounding: ^2.0.0 - tinycolor2: ^1.4.1 vite: ^2.9.1 dependencies: @@ -41,7 +40,6 @@ dependencies: parse-prometheus-text-format: 1.1.1 pixi.js: 4.8.9 significant-rounding: 2.0.0 - tinycolor2: 1.4.2 vite: 2.9.1 packages: @@ -344,6 +342,8 @@ packages: resolution: {integrity: sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg==} engines: {node: '>=6.0.0'} hasBin: true + dependencies: + '@babel/types': 7.17.0 dev: false /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/7.16.7_@babel+core@7.17.9: @@ -1535,6 +1535,8 @@ packages: to-fast-properties: 1.0.3 trim-right: 1.0.1 try-resolve: 1.0.1 + transitivePeerDependencies: + - supports-color dev: false /babel-core/6.26.3: @@ -1559,6 +1561,8 @@ packages: private: 0.1.8 slash: 1.0.0 source-map: 0.5.7 + transitivePeerDependencies: + - supports-color dev: false /babel-core/7.0.0-bridge.0_@babel+core@7.17.9: @@ -1588,6 +1592,8 @@ packages: babel-runtime: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-helper-builder-binary-assignment-operator-visitor/6.24.1: @@ -1596,6 +1602,8 @@ packages: babel-helper-explode-assignable-expression: 6.24.1 babel-runtime: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-helper-call-delegate/6.24.1: @@ -1605,6 +1613,8 @@ packages: babel-runtime: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-helper-define-map/6.26.0: @@ -1614,6 +1624,8 @@ packages: babel-runtime: 6.26.0 babel-types: 6.26.0 lodash: 4.17.21 + transitivePeerDependencies: + - supports-color dev: false /babel-helper-explode-assignable-expression/6.24.1: @@ -1622,6 +1634,8 @@ packages: babel-runtime: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-helper-explode-class/6.24.1: @@ -1631,6 +1645,8 @@ packages: babel-runtime: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-helper-function-name/6.24.1: @@ -1641,6 +1657,8 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-helper-get-function-arity/6.24.1: @@ -1680,6 +1698,8 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-helper-replace-supers/6.24.1: @@ -1691,6 +1711,8 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-helpers/6.24.1: @@ -1698,6 +1720,8 @@ packages: dependencies: babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-messages/6.23.0: @@ -1734,6 +1758,8 @@ packages: resolution: {integrity: sha512-dc843CwrFivjO8AVgxcHvxl0cb7J7Ed8ZGFP8+PjH3X1CnyzYtAU1WL1349m9Wc/+oqk4ETx2+cIEO2jlp3XyQ==} dependencies: babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-inline-environment-variables/1.0.1: @@ -1864,6 +1890,8 @@ packages: babel-helper-remap-async-to-generator: 6.24.1 babel-plugin-syntax-async-generators: 6.13.0 babel-runtime: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-async-to-generator/6.24.1: @@ -1872,6 +1900,8 @@ packages: babel-helper-remap-async-to-generator: 6.24.1 babel-plugin-syntax-async-functions: 6.13.0 babel-runtime: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-class-constructor-call/6.24.1: @@ -1880,6 +1910,8 @@ packages: babel-plugin-syntax-class-constructor-call: 6.18.0 babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-class-properties/6.24.1: @@ -1889,6 +1921,8 @@ packages: babel-plugin-syntax-class-properties: 6.13.0 babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-decorators/6.24.1: @@ -1899,6 +1933,8 @@ packages: babel-runtime: 6.26.0 babel-template: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-arrow-functions/6.22.0: @@ -1921,6 +1957,8 @@ packages: babel-traverse: 6.26.0 babel-types: 6.26.0 lodash: 4.17.21 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-classes/6.24.1: @@ -1935,6 +1973,8 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-computed-properties/6.24.1: @@ -1942,6 +1982,8 @@ packages: dependencies: babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-destructuring/6.23.0: @@ -1969,6 +2011,8 @@ packages: babel-helper-function-name: 6.24.1 babel-runtime: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-literals/6.22.0: @@ -1983,6 +2027,8 @@ packages: babel-plugin-transform-es2015-modules-commonjs: 6.26.2 babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-modules-commonjs/6.26.2: @@ -1992,6 +2038,8 @@ packages: babel-runtime: 6.26.0 babel-template: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-modules-systemjs/6.24.1: @@ -2000,6 +2048,8 @@ packages: babel-helper-hoist-variables: 6.24.1 babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-modules-umd/6.24.1: @@ -2008,6 +2058,8 @@ packages: babel-plugin-transform-es2015-modules-amd: 6.24.1 babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-object-super/6.24.1: @@ -2015,6 +2067,8 @@ packages: dependencies: babel-helper-replace-supers: 6.24.1 babel-runtime: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-parameters/6.24.1: @@ -2026,6 +2080,8 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-es2015-shorthand-properties/6.24.1: @@ -2075,6 +2131,8 @@ packages: babel-helper-builder-binary-assignment-operator-visitor: 6.24.1 babel-plugin-syntax-exponentiation-operator: 6.13.0 babel-runtime: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-plugin-transform-export-extensions/6.22.0: @@ -2149,6 +2207,8 @@ packages: babel-plugin-transform-es2015-typeof-symbol: 6.23.0 babel-plugin-transform-es2015-unicode-regex: 6.24.1 babel-plugin-transform-regenerator: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-preset-stage-1/6.24.1: @@ -2157,6 +2217,8 @@ packages: babel-plugin-transform-class-constructor-call: 6.24.1 babel-plugin-transform-export-extensions: 6.22.0 babel-preset-stage-2: 6.24.1 + transitivePeerDependencies: + - supports-color dev: false /babel-preset-stage-2/6.24.1: @@ -2166,6 +2228,8 @@ packages: babel-plugin-transform-class-properties: 6.24.1 babel-plugin-transform-decorators: 6.24.1 babel-preset-stage-3: 6.24.1 + transitivePeerDependencies: + - supports-color dev: false /babel-preset-stage-3/6.24.1: @@ -2176,6 +2240,8 @@ packages: babel-plugin-transform-async-to-generator: 6.24.1 babel-plugin-transform-exponentiation-operator: 6.24.1 babel-plugin-transform-object-rest-spread: 6.26.0 + transitivePeerDependencies: + - supports-color dev: false /babel-register/6.26.0: @@ -2188,6 +2254,8 @@ packages: lodash: 4.17.21 mkdirp: 0.5.6 source-map-support: 0.4.18 + transitivePeerDependencies: + - supports-color dev: false /babel-runtime/6.26.0: @@ -2205,6 +2273,8 @@ packages: babel-types: 6.26.0 babylon: 6.18.0 lodash: 4.17.21 + transitivePeerDependencies: + - supports-color dev: false /babel-traverse/6.26.0: @@ -2219,6 +2289,8 @@ packages: globals: 9.18.0 invariant: 2.2.4 lodash: 4.17.21 + transitivePeerDependencies: + - supports-color dev: false /babel-types/6.26.0: @@ -2312,6 +2384,8 @@ packages: snapdragon-node: 2.1.1 split-string: 3.1.0 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: false /breakable/1.0.0: @@ -3060,14 +3134,25 @@ packages: resolution: {integrity: sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==} dev: false - /debug/2.2.0: + /debug/2.2.0_supports-color@1.2.0: resolution: {integrity: sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 0.7.1 + supports-color: 1.2.0 dev: false /debug/2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 2.0.0 dev: false @@ -3551,6 +3636,8 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: false /expand-range/1.8.2: @@ -3594,6 +3681,8 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: false /fast-safe-stringify/2.1.1: @@ -4184,6 +4273,8 @@ packages: recast: 0.12.9 temp: 0.8.4 write-file-atomic: 1.3.4 + transitivePeerDependencies: + - supports-color dev: false /jscodeshift/0.6.4: @@ -4454,6 +4545,8 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: false /miller-rabin/4.0.1: @@ -4547,7 +4640,7 @@ packages: hasBin: true dependencies: commander: 2.3.0 - debug: 2.2.0 + debug: 2.2.0_supports-color@1.2.0 diff: 1.4.0 escape-string-regexp: 1.0.2 glob: 3.2.11 @@ -4621,6 +4714,8 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color dev: false /neo-async/2.6.2: @@ -5438,6 +5533,8 @@ packages: source-map: 0.5.7 source-map-resolve: 0.5.3 use: 3.1.1 + transitivePeerDependencies: + - supports-color dev: false /source-map-js/1.0.2: @@ -5652,10 +5749,6 @@ packages: process: 0.11.10 dev: false - /tinycolor2/1.4.2: - resolution: {integrity: sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==} - dev: false - /to-fast-properties/1.0.3: resolution: {integrity: sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=} engines: {node: '>=0.10.0'} diff --git a/pyproject.toml b/pyproject.toml --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ dependencies = [ "starlette[standard]>=0.19.0", "prometheus-client>=0.14.1", "starlette-exporter>=0.12.0", + "PyGObject>=3.42.1", ] requires-python = ">=3.9" diff --git a/tasks.py b/tasks.py deleted file mode 100644 --- a/tasks.py +++ /dev/null @@ -1,61 +0,0 @@ -from invoke import task -import glob - -bin_sources = [ - 'bin/ascoltami2', - 'bin/captureDevice', - 'bin/collector', - 'bin/collector_loadtest.py', - 'bin/effecteval', - 'bin/effectsequencer', - 'bin/homepageConfig', - 'bin/inputdemo', - 'bin/inputquneo', - 'bin/keyboardcomposer', - 'bin/listsongs', - 'bin/musicPad', - 'bin/musictime', - 'bin/paintserver', - 'bin/picamserve', - 'bin/rdfdb', - 'bin/run_local.py', - 'bin/subcomposer', - 'bin/subserver', - 'bin/vidref', - 'bin/vidrefsetup', - 'bin/wavecurve', - ] -def pkg_sources(): - return glob.glob('light9/**/*.py', recursive=True) - -@task -def mypy(ctx): - print('\n\n') - def run(sources): - ss = ' '.join(sources) - ctx.run(f'MYPYPATH=stubs:/my/proj/rdfdb env/bin/mypy --check-untyped-defs {ss}', - pty=True, warn=True) - - sources = ' '.join(bin_sources + pkg_sources()) - ctx.run(f'env/bin/flake8 --ignore=E115,E123,E124,E126,E225,E231,E261,E262,E265,E301,E302,E303,E305,E306,E401,E402,E501,E701,E731,W291,W293,W391,W504,E131,E125 {sources}', warn=True) - - sources = ' '.join(pkg_sources()) - run(['bin/collector']) - run(['bin/rdfdb']) - run(['bin/keyboardcomposer']) - run(['bin/effectsequencer']) - run(['bin/ascoltami2']) - run(['bin/vidref']) - #for src in bin_sources: - # print(f"mypy {src}") - # run([src])# + pkg_sources()) -@task -def reformat(ctx): - ctx.run("env/bin/yapf --verbose --parallel --in-place --style google light9/*.py light9/*/*.py `file --no-pad bin/* | grep 'Python script' | perl -lpe 's/:.*//'`") - -@task -def test(ctx): - ctx.run('docker build -f Dockerfile.build -t light9_build:latest .') - ctx.run('docker run --rm -it -v `pwd`:/opt light9_build:latest' - ' nose2 -v light9.currentstategraphapi_test light9.graphfile_test', - pty=True)