From b8aa19175085cd07f9febfe70b42970ca2e8ffec Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Fri, 29 Apr 2022 17:01:19 -0600 Subject: [PATCH] Add Rookout debugging --- jarvis/__init__.py | 6 ++- poetry.lock | 129 ++++++++++++++++++++++++++++++++++++++++++--- pyproject.toml | 1 + 3 files changed, 129 insertions(+), 7 deletions(-) diff --git a/jarvis/__init__.py b/jarvis/__init__.py index 009750e..2d90f15 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -1,6 +1,7 @@ """Main JARVIS package.""" import logging +import rook from dis_snek import Intents from jarvis_core.db import connect from jarvis_core.log import get_logger @@ -20,9 +21,12 @@ file_handler.setFormatter( ) logger.addHandler(file_handler) -intents = Intents.DEFAULT | Intents.MESSAGES | Intents.GUILD_MEMBERS | Intents.GUILD_MESSAGES +intents = Intents.DEFAULT | Intents.MESSAGES | Intents.GUILD_MEMBERS | Intents.GUILD_MESSAGE_CONTENT restart_ctx = None +if jconfig.rook: + rook.start(token=jconfig.rook_token, labels={"env": "dev"}) + jarvis = Jarvis( intents=intents, sync_interactions=jconfig.sync, diff --git a/poetry.lock b/poetry.lock index 1c6fd9b..932d4ad 100644 --- a/poetry.lock +++ b/poetry.lock @@ -225,6 +225,14 @@ python-versions = ">=3.7" [package.dependencies] typing_extensions = ">=4,<5" +[[package]] +name = "distro" +version = "1.7.0" +description = "Distro - an OS platform information API" +category = "main" +optional = false +python-versions = ">=3.6" + [[package]] name = "frozenlist" version = "1.3.0" @@ -233,6 +241,14 @@ category = "main" optional = false python-versions = ">=3.7" +[[package]] +name = "funcsigs" +version = "1.0.2" +description = "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+" +category = "main" +optional = false +python-versions = "*" + [[package]] name = "gitdb" version = "4.0.9" @@ -265,7 +281,7 @@ python-versions = ">=3.5" [[package]] name = "jarvis-core" -version = "0.8.1" +version = "0.8.2" description = "JARVIS core" category = "main" optional = false @@ -284,7 +300,7 @@ umongo = "^3.1.0" type = "git" url = "https://git.zevaryx.com/stark-industries/jarvis/jarvis-core.git" reference = "main" -resolved_reference = "ee002f6e7f59b059ab38b0d421812ea4b6860835" +resolved_reference = "0184d89d38660cd063c779b35f3e9ccc4ba86598" [[package]] name = "marshmallow" @@ -415,11 +431,11 @@ python-versions = ">=3.10" aiohttp = {version = "3.8.1", markers = "python_version >= \"3.6\""} aiosignal = {version = "1.2.0", markers = "python_version >= \"3.6\""} async-timeout = {version = "4.0.2", markers = "python_version >= \"3.6\""} -attrs = {version = "21.4.0", markers = "python_version >= \"3.6\" and python_full_version < \"3.0.0\" or python_full_version >= \"3.5.0\" and python_version >= \"3.6\""} +attrs = {version = "21.4.0", markers = "python_version >= \"3.6\""} certifi = {version = "2021.10.8", markers = "python_version >= \"2.7\" and python_full_version < \"3.0.0\" or python_full_version >= \"3.6.0\""} -charset-normalizer = {version = "2.0.12", markers = "python_full_version >= \"3.6.0\" and python_version >= \"3.6\""} +charset-normalizer = {version = "2.0.12", markers = "python_full_version >= \"3.6.0\""} frozenlist = {version = "1.3.0", markers = "python_version >= \"3.7\""} -idna = {version = "3.3", markers = "python_version >= \"3.6\" and python_full_version < \"3.0.0\" or python_full_version >= \"3.6.0\" and python_version >= \"3.6\""} +idna = {version = "3.3", markers = "python_full_version >= \"3.6.0\""} multidict = {version = "6.0.2", markers = "python_version >= \"3.7\""} pycryptodome = {version = "3.14.1", markers = "python_version >= \"2.7\" and python_full_version < \"3.0.0\" or python_full_version >= \"3.5.0\""} requests = {version = "2.27.1", markers = "python_version >= \"2.7\" and python_full_version < \"3.0.0\" or python_full_version >= \"3.6.0\""} @@ -438,6 +454,14 @@ python-versions = ">=3.7" docs = ["olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-issues (>=3.0.1)", "sphinx-removed-in", "sphinx-rtd-theme (>=1.0)", "sphinxext-opengraph"] tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] +[[package]] +name = "protobuf" +version = "3.20.1" +description = "Protocol Buffers" +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "psutil" version = "5.9.0" @@ -592,6 +616,26 @@ python-versions = "*" [package.dependencies] requests = ">=2.0.1,<3.0.0" +[[package]] +name = "rook" +version = "0.1.170" +description = "Rook is a Python package for on the fly debugging and data extraction for application in production" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +certifi = "*" +distro = "*" +funcsigs = "*" +protobuf = {version = ">=3.7.1,<=4.0.0", markers = "python_version > \"3.0\""} +psutil = ">=5.8.0" +six = ">=1.13" +websocket-client = ">=0.56,<0.58 || >0.58,<0.59 || >0.59,<1.0 || >1.0,<1.1 || >1.1" + +[package.extras] +ssl_backport = ["backports.ssl", "backports.ssl-match-hostname", "pyopenssl"] + [[package]] name = "six" version = "1.16.0" @@ -721,6 +765,19 @@ brotli = ["brotlipy (>=0.6.0)"] secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +[[package]] +name = "websocket-client" +version = "1.3.2" +description = "WebSocket client for Python with low level API options" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["Sphinx (>=3.4)", "sphinx-rtd-theme (>=0.5)"] +optional = ["python-socks", "wsaccel"] +test = ["websockets"] + [[package]] name = "yarl" version = "1.7.2" @@ -736,7 +793,7 @@ multidict = ">=4.0" [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "181616e94a288cc8599183e8922431a23170ca91d0a1426307f969d3439b4e73" +content-hash = "8c6262c8ba1f4645117a59c789d092a6211c434b178744a9f637993914f4e48a" [metadata.files] aiofile = [ @@ -890,6 +947,10 @@ discord-typings = [ {file = "discord-typings-0.4.0.tar.gz", hash = "sha256:66bce666194e8f006914f788f940265c009cce9b63f9a8ce2bc7931d3d3ef11c"}, {file = "discord_typings-0.4.0-py3-none-any.whl", hash = "sha256:a390b614cbcbd82af083660c12e46536b4b790ac026f8d43bdd11c8953837ca0"}, ] +distro = [ + {file = "distro-1.7.0-py3-none-any.whl", hash = "sha256:d596311d707e692c2160c37807f83e3820c5d539d5a83e87cfb6babd8ba3a06b"}, + {file = "distro-1.7.0.tar.gz", hash = "sha256:151aeccf60c216402932b52e40ee477a939f8d58898927378a02abbe852c1c39"}, +] frozenlist = [ {file = "frozenlist-1.3.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d2257aaba9660f78c7b1d8fea963b68f3feffb1a9d5d05a18401ca9eb3e8d0a3"}, {file = "frozenlist-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4a44ebbf601d7bac77976d429e9bdb5a4614f9f4027777f9e54fd765196e9d3b"}, @@ -951,6 +1012,10 @@ frozenlist = [ {file = "frozenlist-1.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:772965f773757a6026dea111a15e6e2678fbd6216180f82a48a40b27de1ee2ab"}, {file = "frozenlist-1.3.0.tar.gz", hash = "sha256:ce6f2ba0edb7b0c1d8976565298ad2deba6f8064d2bebb6ffce2ca896eb35b0b"}, ] +funcsigs = [ + {file = "funcsigs-1.0.2-py2.py3-none-any.whl", hash = "sha256:330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca"}, + {file = "funcsigs-1.0.2.tar.gz", hash = "sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50"}, +] gitdb = [ {file = "gitdb-4.0.9-py3-none-any.whl", hash = "sha256:8033ad4e853066ba6ca92050b9df2f89301b8fc8bf7e9324d412a63f8bf1a8fd"}, {file = "gitdb-4.0.9.tar.gz", hash = "sha256:bac2fd45c0a1c9cf619e63a90d62bdc63892ef92387424b855792a6cabe789aa"}, @@ -1158,6 +1223,32 @@ pillow = [ {file = "Pillow-9.1.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:8d79c6f468215d1a8415aa53d9868a6b40c4682165b8cb62a221b1baa47db458"}, {file = "Pillow-9.1.0.tar.gz", hash = "sha256:f401ed2bbb155e1ade150ccc63db1a4f6c1909d3d378f7d1235a44e90d75fb97"}, ] +protobuf = [ + {file = "protobuf-3.20.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:3cc797c9d15d7689ed507b165cd05913acb992d78b379f6014e013f9ecb20996"}, + {file = "protobuf-3.20.1-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:ff8d8fa42675249bb456f5db06c00de6c2f4c27a065955917b28c4f15978b9c3"}, + {file = "protobuf-3.20.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cd68be2559e2a3b84f517fb029ee611546f7812b1fdd0aa2ecc9bc6ec0e4fdde"}, + {file = "protobuf-3.20.1-cp310-cp310-win32.whl", hash = "sha256:9016d01c91e8e625141d24ec1b20fed584703e527d28512aa8c8707f105a683c"}, + {file = "protobuf-3.20.1-cp310-cp310-win_amd64.whl", hash = "sha256:32ca378605b41fd180dfe4e14d3226386d8d1b002ab31c969c366549e66a2bb7"}, + {file = "protobuf-3.20.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:9be73ad47579abc26c12024239d3540e6b765182a91dbc88e23658ab71767153"}, + {file = "protobuf-3.20.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:097c5d8a9808302fb0da7e20edf0b8d4703274d140fd25c5edabddcde43e081f"}, + {file = "protobuf-3.20.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e250a42f15bf9d5b09fe1b293bdba2801cd520a9f5ea2d7fb7536d4441811d20"}, + {file = "protobuf-3.20.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cdee09140e1cd184ba9324ec1df410e7147242b94b5f8b0c64fc89e38a8ba531"}, + {file = "protobuf-3.20.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:af0ebadc74e281a517141daad9d0f2c5d93ab78e9d455113719a45a49da9db4e"}, + {file = "protobuf-3.20.1-cp37-cp37m-win32.whl", hash = "sha256:755f3aee41354ae395e104d62119cb223339a8f3276a0cd009ffabfcdd46bb0c"}, + {file = "protobuf-3.20.1-cp37-cp37m-win_amd64.whl", hash = "sha256:62f1b5c4cd6c5402b4e2d63804ba49a327e0c386c99b1675c8a0fefda23b2067"}, + {file = "protobuf-3.20.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:06059eb6953ff01e56a25cd02cca1a9649a75a7e65397b5b9b4e929ed71d10cf"}, + {file = "protobuf-3.20.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:cb29edb9eab15742d791e1025dd7b6a8f6fcb53802ad2f6e3adcb102051063ab"}, + {file = "protobuf-3.20.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:69ccfdf3657ba59569c64295b7d51325f91af586f8d5793b734260dfe2e94e2c"}, + {file = "protobuf-3.20.1-cp38-cp38-win32.whl", hash = "sha256:dd5789b2948ca702c17027c84c2accb552fc30f4622a98ab5c51fcfe8c50d3e7"}, + {file = "protobuf-3.20.1-cp38-cp38-win_amd64.whl", hash = "sha256:77053d28427a29987ca9caf7b72ccafee011257561259faba8dd308fda9a8739"}, + {file = "protobuf-3.20.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6f50601512a3d23625d8a85b1638d914a0970f17920ff39cec63aaef80a93fb7"}, + {file = "protobuf-3.20.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:284f86a6207c897542d7e956eb243a36bb8f9564c1742b253462386e96c6b78f"}, + {file = "protobuf-3.20.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:7403941f6d0992d40161aa8bb23e12575637008a5a02283a930addc0508982f9"}, + {file = "protobuf-3.20.1-cp39-cp39-win32.whl", hash = "sha256:db977c4ca738dd9ce508557d4fce0f5aebd105e158c725beec86feb1f6bc20d8"}, + {file = "protobuf-3.20.1-cp39-cp39-win_amd64.whl", hash = "sha256:7e371f10abe57cee5021797126c93479f59fccc9693dafd6bd5633ab67808a91"}, + {file = "protobuf-3.20.1-py2.py3-none-any.whl", hash = "sha256:adfc6cf69c7f8c50fd24c793964eef18f0ac321315439d94945820612849c388"}, + {file = "protobuf-3.20.1.tar.gz", hash = "sha256:adc31566d027f45efe3f44eeb5b1f329da43891634d61c75a5944e9be6dd42c9"}, +] psutil = [ {file = "psutil-5.9.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:55ce319452e3d139e25d6c3f85a1acf12d1607ddedea5e35fb47a552c051161b"}, {file = "psutil-5.9.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:7336292a13a80eb93c21f36bde4328aa748a04b68c13d01dfddd67fc13fd0618"}, @@ -1476,6 +1567,28 @@ requests-toolbelt = [ {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, ] +rook = [ + {file = "rook-0.1.170-cp27-cp27m-macosx_10_11_x86_64.whl", hash = "sha256:e2f90a44265606512ae434c44abe56b178dd5a5771016e3512b4f98598089576"}, + {file = "rook-0.1.170-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:f4976bef70ec82f537668cb100d5510e9557e7edeba4aec46d9b354822e76cf1"}, + {file = "rook-0.1.170-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:9228c7dc5cdd4235f258d33b5b55e1ddd2c1ac367f5326809698dc610242b88d"}, + {file = "rook-0.1.170-cp310-cp310-macosx_10_11_x86_64.whl", hash = "sha256:5977c819add5b648e5a0605337813d7add130a400d7eff41722c0c06ad27173e"}, + {file = "rook-0.1.170-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b0c81a76dfa98079e246ef54bdeb3d0bbbddef12c4a6b47a89e24386f6796589"}, + {file = "rook-0.1.170-cp35-cp35m-macosx_10_11_x86_64.whl", hash = "sha256:ce97a8784a988f2dc9b9cc996574596587f374e1af77b7b6c8cc50d17f63c4d3"}, + {file = "rook-0.1.170-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:fa9a98871280168dbdfd3e1c4b6acf720932e7e449a8387314c49337008edbcc"}, + {file = "rook-0.1.170-cp36-cp36m-macosx_10_11_x86_64.whl", hash = "sha256:a7ccdaeb4963786981770223117f918ea107f8d9e2b77324f7f9936afe0d1af5"}, + {file = "rook-0.1.170-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:152392d0243571620847e3267b11e7e50bea4f99e83ba94fef9ab0a828a418fb"}, + {file = "rook-0.1.170-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:048a0848c38de53dae6c06cb44c9a09b644716de6ecc28a3c96f462aefd976f8"}, + {file = "rook-0.1.170-cp37-cp37m-macosx_10_11_x86_64.whl", hash = "sha256:58de02b2859458767963fc1641875a57003880d58f9eda0840ec96907541f70e"}, + {file = "rook-0.1.170-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:79f139e3397d5da35f951802a9fc800907df4c2fd82796a89c2841f6808aae14"}, + {file = "rook-0.1.170-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:93628041f9f3b7a56af8eef8d42ca573095a988080d68f90637ee241e711d055"}, + {file = "rook-0.1.170-cp38-cp38-macosx_10_11_x86_64.whl", hash = "sha256:aabcff3f14bcb9674cb0fb23dd216dd64da532968142ae2bfc7c20a87be5540a"}, + {file = "rook-0.1.170-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:465151f1db95dea7004d47472c9a2ff751ba428cf634a2dd4846d0577979e837"}, + {file = "rook-0.1.170-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:259685e03ba8d2e60238ec3f45acffc45141989bb1c1de7f40ba791516e5d5d1"}, + {file = "rook-0.1.170-cp39-cp39-macosx_10_11_x86_64.whl", hash = "sha256:dfd180c89a1eee8525c10ffe658b20ff09cc9cd9a190889ffe735efe82d7c7e7"}, + {file = "rook-0.1.170-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5dc123849965a11420324e89ccef26b015b7003f33cab5e5e6ce00450f7946fd"}, + {file = "rook-0.1.170-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:3952e0ad674eaa26ab80db503b9890fc48f96e97a4ec64cd6a9cd3c04cd1e693"}, + {file = "rook-0.1.170.tar.gz", hash = "sha256:eeb9d98651822a47ccb9f9ec1a5cbce92d38970d24c8e5ce2f34908d73aa9f2a"}, +] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -1520,6 +1633,10 @@ urllib3 = [ {file = "urllib3-1.26.8-py2.py3-none-any.whl", hash = "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed"}, {file = "urllib3-1.26.8.tar.gz", hash = "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c"}, ] +websocket-client = [ + {file = "websocket-client-1.3.2.tar.gz", hash = "sha256:50b21db0058f7a953d67cc0445be4b948d7fc196ecbeb8083d68d94628e4abf6"}, + {file = "websocket_client-1.3.2-py3-none-any.whl", hash = "sha256:722b171be00f2b90e1d4fb2f2b53146a536ca38db1da8ff49c972a4e1365d0ef"}, +] yarl = [ {file = "yarl-1.7.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2a8508f7350512434e41065684076f640ecce176d262a7d54f0da41d99c5a95"}, {file = "yarl-1.7.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:da6df107b9ccfe52d3a48165e48d72db0eca3e3029b5b8cb4fe6ee3cb870ba8b"}, diff --git a/pyproject.toml b/pyproject.toml index ae18795..0a8bd96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ dateparser = "^1.1.1" aiofile = "^3.7.4" molter = "^0.11.0" asyncpraw = "^7.5.0" +rook = "^0.1.170" [build-system] requires = ["poetry-core>=1.0.0"]