diff --git a/poetry.lock b/poetry.lock index ea20943c4..861c40662 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,25 @@ -# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. + +[[package]] +name = "application-properties" +version = "0.8.1" +description = "A simple, easy to use, unified manner of accessing program properties." +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "application_properties-0.8.1-py3-none-any.whl", hash = "sha256:f442e403ab7c8f97b048cf0ab92845057d595989653f65ced48579ad7cf35607"}, + {file = "application_properties-0.8.1.tar.gz", hash = "sha256:101667125383940651e72a2a9b3aa32225f359050c3be45b4ef4b51009930bb4"}, +] + +[package.dependencies] +pyyaml = ">=6.0" +tomli = ">=2.0.1" +typing-extensions = ">=4.5.0" [[package]] name = "astroid" version = "2.15.6" description = "An abstract syntax tree for Python with inference support." -category = "dev" optional = false python-versions = ">=3.7.2" files = [ @@ -24,7 +39,6 @@ wrapt = [ name = "atomicwrites" version = "1.4.1" description = "Atomic file writes." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -35,7 +49,6 @@ files = [ name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -54,7 +67,6 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "black" version = "23.7.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -101,7 +113,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -113,7 +124,6 @@ files = [ name = "chardet" version = "3.0.4" description = "Universal encoding detector for Python 2 and 3" -category = "main" optional = false python-versions = "*" files = [ @@ -125,7 +135,6 @@ files = [ name = "charset-normalizer" version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = true python-versions = ">=3.7.0" files = [ @@ -210,7 +219,6 @@ files = [ name = "click" version = "8.1.6" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -225,7 +233,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -233,11 +240,25 @@ files = [ {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +[[package]] +name = "columnar" +version = "1.4.1" +description = "A tool for printing data in a columnar format." +optional = false +python-versions = "*" +files = [ + {file = "Columnar-1.4.1-py3-none-any.whl", hash = "sha256:8efb692a7e6ca07dcc8f4ea889960421331a5dffa8e5af81f0a67ad8ea1fc798"}, + {file = "Columnar-1.4.1.tar.gz", hash = "sha256:c3cb57273333b2ff9cfaafc86f09307419330c97faa88dcfe23df05e6fbb9c72"}, +] + +[package.dependencies] +toolz = "*" +wcwidth = "*" + [[package]] name = "coverage" version = "7.2.7" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -313,7 +334,6 @@ toml = ["tomli"] name = "dill" version = "0.3.7" description = "serialize all of Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -328,7 +348,6 @@ graph = ["objgraph (>=1.7.2)"] name = "embit" version = "0.5.0" description = "yet another bitcoin library" -category = "main" optional = false python-versions = "*" files = [] @@ -342,7 +361,6 @@ url = "vendor/embit" name = "ghp-import" version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." -category = "main" optional = true python-versions = "*" files = [ @@ -360,7 +378,6 @@ dev = ["flake8", "markdown", "twine", "wheel"] name = "googletrans" version = "4.0.0rc1" description = "Free Google Translate API for Python. Translates totally free of charge." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -374,7 +391,6 @@ httpx = "0.13.3" name = "h11" version = "0.9.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = "*" files = [ @@ -386,7 +402,6 @@ files = [ name = "h2" version = "3.2.0" description = "HTTP/2 State-Machine based protocol implementation" -category = "main" optional = false python-versions = "*" files = [ @@ -402,7 +417,6 @@ hyperframe = ">=5.2.0,<6" name = "hpack" version = "3.0.0" description = "Pure-Python HPACK header compression" -category = "main" optional = false python-versions = "*" files = [ @@ -414,7 +428,6 @@ files = [ name = "hstspreload" version = "2023.1.1" description = "Chromium HSTS Preload list as a Python package" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -426,7 +439,6 @@ files = [ name = "httpcore" version = "0.9.1" description = "A minimal low-level HTTP client." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -436,14 +448,13 @@ files = [ [package.dependencies] h11 = ">=0.8,<0.10" -h2 = ">=3.0.0,<4.0.0" -sniffio = ">=1.0.0,<2.0.0" +h2 = "==3.*" +sniffio = "==1.*" [[package]] name = "httpx" version = "0.13.3" description = "The next generation HTTP client." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -453,10 +464,10 @@ files = [ [package.dependencies] certifi = "*" -chardet = ">=3.0.0,<4.0.0" +chardet = "==3.*" hstspreload = "*" -httpcore = ">=0.9.0,<0.10.0" -idna = ">=2.0.0,<3.0.0" +httpcore = "==0.9.*" +idna = "==2.*" rfc3986 = ">=1.3,<2" sniffio = "*" @@ -464,7 +475,6 @@ sniffio = "*" name = "hyperframe" version = "5.2.0" description = "HTTP/2 framing layer for Python" -category = "main" optional = false python-versions = "*" files = [ @@ -476,7 +486,6 @@ files = [ name = "idna" version = "2.10" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -488,7 +497,6 @@ files = [ name = "importlib-metadata" version = "6.8.0" description = "Read metadata from Python packages" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -508,7 +516,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -520,7 +527,6 @@ files = [ name = "isort" version = "5.12.0" description = "A Python utility / library to sort Python imports." -category = "dev" optional = false python-versions = ">=3.8.0" files = [ @@ -538,7 +544,6 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -556,7 +561,6 @@ i18n = ["Babel (>=2.7)"] name = "lazy-object-proxy" version = "1.9.0" description = "A fast and thorough lazy object proxy." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -602,7 +606,6 @@ files = [ name = "markdown" version = "3.4.4" description = "Python implementation of John Gruber's Markdown." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -621,7 +624,6 @@ testing = ["coverage", "pyyaml"] name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -645,6 +647,16 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -681,7 +693,6 @@ files = [ name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -693,7 +704,6 @@ files = [ name = "mergedeep" version = "1.3.4" description = "A deep merge function for 🐍." -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -705,7 +715,6 @@ files = [ name = "mkdocs" version = "1.5.2" description = "Project documentation with Markdown." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -737,7 +746,6 @@ min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-imp name = "mkdocs-material" version = "8.5.11" description = "Documentation that simply works" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -758,7 +766,6 @@ requests = ">=2.26" name = "mkdocs-material-extensions" version = "1.1.1" description = "Extension pack for Python Markdown and MkDocs Material." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -770,7 +777,6 @@ files = [ name = "mkdocs-static-i18n" version = "0.46" description = "MkDocs i18n plugin using static translation markdown files" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -784,7 +790,6 @@ mkdocs = ">=1.2.3" name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -796,7 +801,6 @@ files = [ name = "numpy" version = "1.25.2" description = "Fundamental package for array computing in Python" -category = "main" optional = true python-versions = ">=3.9" files = [ @@ -831,7 +835,6 @@ files = [ name = "opencv-python" version = "4.8.0.74" description = "Wrapper package for OpenCV python bindings." -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -846,12 +849,10 @@ files = [ [package.dependencies] numpy = [ - {version = ">=1.21.0", markers = "python_version <= \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\""}, - {version = ">=1.21.2", markers = "python_version >= \"3.10\""}, - {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\""}, - {version = ">=1.19.3", markers = "python_version >= \"3.6\" and platform_system == \"Linux\" and platform_machine == \"aarch64\" or python_version >= \"3.9\""}, - {version = ">=1.17.0", markers = "python_version >= \"3.7\""}, - {version = ">=1.17.3", markers = "python_version >= \"3.8\""}, + {version = ">=1.21.0", markers = "python_version == \"3.9\" and platform_system == \"Darwin\" and platform_machine == \"arm64\""}, + {version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""}, + {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, + {version = ">=1.19.3", markers = "platform_system == \"Linux\" and platform_machine == \"aarch64\" and python_version >= \"3.8\" and python_version < \"3.10\" or python_version > \"3.9\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_system != \"Darwin\" and python_version < \"3.10\" or python_version >= \"3.9\" and platform_machine != \"arm64\" and python_version < \"3.10\""}, {version = ">=1.23.5", markers = "python_version >= \"3.11\""}, ] @@ -859,7 +860,6 @@ numpy = [ name = "packaging" version = "23.1" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -867,11 +867,21 @@ files = [ {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, ] +[[package]] +name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] + [[package]] name = "pathspec" version = "0.11.2" description = "Utility library for gitignore style pattern matching of file paths." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -883,7 +893,6 @@ files = [ name = "pillow" version = "9.5.0" description = "Python Imaging Library (Fork)" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -963,7 +972,6 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa name = "platformdirs" version = "3.10.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -979,7 +987,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co name = "pluggy" version = "1.2.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -991,11 +998,28 @@ files = [ dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] +[[package]] +name = "poethepoet" +version = "0.24.4" +description = "A task runner that works well with poetry." +optional = false +python-versions = ">=3.8" +files = [ + {file = "poethepoet-0.24.4-py3-none-any.whl", hash = "sha256:fb4ea35d7f40fe2081ea917d2e4102e2310fda2cde78974050ca83896e229075"}, + {file = "poethepoet-0.24.4.tar.gz", hash = "sha256:ff4220843a87c888cbcb5312c8905214701d0af60ac7271795baa8369b428fef"}, +] + +[package.dependencies] +pastel = ">=0.2.1,<0.3.0" +tomli = ">=1.2.2" + +[package.extras] +poetry-plugin = ["poetry (>=1.0,<2.0)"] + [[package]] name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1007,7 +1031,6 @@ files = [ name = "pycryptodome" version = "3.18.0" description = "Cryptographic library for Python" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1049,7 +1072,6 @@ files = [ name = "pygame" version = "2.5.0" description = "Python Game Development" -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -1114,7 +1136,6 @@ files = [ name = "pygments" version = "2.16.1" description = "Pygments is a syntax highlighting package written in Python." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1129,7 +1150,6 @@ plugins = ["importlib-metadata"] name = "pylint" version = "2.17.5" description = "python code static checker" -category = "dev" optional = false python-versions = ">=3.7.2" files = [ @@ -1155,11 +1175,26 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" spelling = ["pyenchant (>=3.2,<4.0)"] testutils = ["gitpython (>3)"] +[[package]] +name = "pymarkdownlnt" +version = "0.9.15" +description = "A GitHub Flavored Markdown compliant Markdown linter." +optional = false +python-versions = ">=3.8.0" +files = [ + {file = "pymarkdownlnt-0.9.15-py3-none-any.whl", hash = "sha256:a6e432efc0070ac173a597abf07d99df0f33efcd8cc7a89d190d3cd46380b8b2"}, + {file = "pymarkdownlnt-0.9.15.tar.gz", hash = "sha256:ab109d43cd2e6e7ff723217574f2ed72785c1582d0501630d7a3c2f568d92924"}, +] + +[package.dependencies] +application-properties = ">=0.8.1" +columnar = ">=1.4.0" +typing-extensions = ">=4.7.0" + [[package]] name = "pymdown-extensions" version = "9.11" description = "Extension pack for Python Markdown." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1175,7 +1210,6 @@ pyyaml = "*" name = "pyqrcode" version = "1.2.1" description = "A QR code generator written purely in Python with SVG, EPS, PNG and terminal output." -category = "dev" optional = false python-versions = "*" files = [ @@ -1190,7 +1224,6 @@ png = ["pypng (>=0.0.13)"] name = "pytest" version = "6.2.5" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1215,7 +1248,6 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm name = "pytest-cov" version = "3.0.0" description = "Pytest plugin for measuring coverage." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1234,7 +1266,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale name = "pytest-mock" version = "3.11.1" description = "Thin-wrapper around the mock package for easier use with pytest" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1252,7 +1283,6 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = true python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1267,8 +1297,7 @@ six = ">=1.5" name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" -category = "main" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, @@ -1276,6 +1305,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -1283,8 +1313,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -1301,6 +1338,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -1308,6 +1346,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -1317,7 +1356,6 @@ files = [ name = "pyyaml-env-tag" version = "0.1" description = "A custom YAML tag for referencing environment variables in YAML files. " -category = "main" optional = true python-versions = ">=3.6" files = [ @@ -1332,7 +1370,6 @@ pyyaml = "*" name = "pyzbar" version = "0.1.9" description = "Read one-dimensional barcodes and QR codes from Python 2 and 3." -category = "main" optional = true python-versions = "*" files = [ @@ -1348,7 +1385,6 @@ scripts = ["Pillow (>=3.2.0)"] name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1370,7 +1406,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rfc3986" version = "1.5.0" description = "Validating URI References per RFC 3986" -category = "main" optional = false python-versions = "*" files = [ @@ -1385,7 +1420,6 @@ idna2008 = ["idna"] name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1397,7 +1431,6 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1409,7 +1442,6 @@ files = [ name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1421,7 +1453,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1433,7 +1464,6 @@ files = [ name = "tomlkit" version = "0.12.1" description = "Style preserving TOML library" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1441,11 +1471,21 @@ files = [ {file = "tomlkit-0.12.1.tar.gz", hash = "sha256:38e1ff8edb991273ec9f6181244a6a391ac30e9f5098e7535640ea6be97a7c86"}, ] +[[package]] +name = "toolz" +version = "0.12.0" +description = "List processing tools and functional utilities" +optional = false +python-versions = ">=3.5" +files = [ + {file = "toolz-0.12.0-py3-none-any.whl", hash = "sha256:2059bd4148deb1884bb0eb770a3cde70e7f954cfbbdc2285f1f2de01fd21eb6f"}, + {file = "toolz-0.12.0.tar.gz", hash = "sha256:88c570861c440ee3f2f6037c4654613228ff40c93a6c25e0eba70d17282c6194"}, +] + [[package]] name = "typing-extensions" version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1457,7 +1497,6 @@ files = [ name = "ur" version = "0.1.0" description = "UR Implementation in Python -- ported from the C++ Reference Implementation by Blockchain Commons" -category = "main" optional = false python-versions = "*" files = [] @@ -1471,7 +1510,6 @@ url = "vendor/foundation-ur-py" name = "urllib3" version = "2.0.4" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1489,7 +1527,6 @@ zstd = ["zstandard (>=0.18.0)"] name = "urtypes" version = "0.1.0" description = "Python implementation of the Blockchain Commons UR Types specification" -category = "main" optional = false python-versions = "^3.9.1" files = [] @@ -1503,7 +1540,6 @@ url = "vendor/urtypes" name = "watchdog" version = "3.0.0" description = "Filesystem events monitoring" -category = "main" optional = true python-versions = ">=3.7" files = [ @@ -1539,11 +1575,21 @@ files = [ [package.extras] watchmedo = ["PyYAML (>=3.10)"] +[[package]] +name = "wcwidth" +version = "0.2.12" +description = "Measures the displayed width of unicode strings in a terminal" +optional = false +python-versions = "*" +files = [ + {file = "wcwidth-0.2.12-py2.py3-none-any.whl", hash = "sha256:f26ec43d96c8cbfed76a5075dac87680124fa84e0855195a6184da9c187f133c"}, + {file = "wcwidth-0.2.12.tar.gz", hash = "sha256:f01c104efdf57971bcb756f054dd58ddec5204dd15fa31d6503ea57947d97c02"}, +] + [[package]] name = "wrapt" version = "1.15.0" description = "Module for decorators, wrappers and monkey patching." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ @@ -1628,7 +1674,6 @@ files = [ name = "zipp" version = "3.16.2" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = true python-versions = ">=3.8" files = [ @@ -1647,4 +1692,4 @@ simulator = ["Pillow", "numpy", "opencv-python", "pygame", "pyzbar"] [metadata] lock-version = "2.0" python-versions = "^3.9.1" -content-hash = "61aec9aaffffc7193a66fbf8d873f82bd9c062accf5a1099e02fea82a84c1d39" +content-hash = "9be16a7e07da04be2862f8a4d88d95a92804b8fc935728b3b5263b524b28404e" diff --git a/pyproject.toml b/pyproject.toml index e0cf73730..49c9d4f2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,64 @@ pytest-cov = "^3.0.0" pytest-mock = "^3.6.1" PyQRCode = "^1.2.1" pycryptodome = "^3.17.0" +poethepoet = "^0.24.4" +pymarkdownlnt = "^0.9.15" [tool.poetry.extras] docs = ["mkdocs", "mkdocs-material", "mkdocs-static-i18n", "pymdown-extensions"] simulator = ["numpy", "opencv-python", "Pillow", "pygame", "pyzbar"] + +[tool.poe.tasks] +# tasks for update repository +# all tasks that start with `_` are'nt callable +_update-pull = "git pull origin main" +_update-submodules = "git submodule update --init --recursive" +update-repo = ["_update-pull", "_update-submodules"] + +# tasks for format code with black +# all tasks that start with `_` are'nt callable +_format-firmware-font = "black ./firmware/font" +_format-firmware-scripts = "black ./firmware/scripts" +_format-firmware = ["_format-firmware-font", "_format-firmware-scripts"] +_format-i18n = "black ./i18n/i18n.py" +_format-simulator = "black ./simulator/simulator.py" +_format-src = "black ./src" +_format-tests = "black ./tests" +format = ["_format-firmware", "_format-i18n", "_format-simulator", "_format-src", "_format-tests"] + +# tasks for lint code with pylint +# all tasks that start with `_` are'nt callable +_lint-firmware-font = "pylint ./firmware/font" +_lint-firmware-scripts = "pylint ./firmware/scripts" +_lint-firmware = ["_lint-firmware-font", "_lint-firmware-scripts"] +_lint-i18n = "pylint ./i18n/i18n.py" +_lint-simulator = "pylint ./simulator/simulator.py" +_lint-src = "pylint ./src" +_lint-tests = "pylint ./tests" +lint = ["_lint-i18n", "_lint-simulator", "_lint-src", "_lint-tests"] + +# tasks for lint markdown texts code with pymarkdownlnt +# all tasks that start with `_` are'nt callable +_lint-md-readme = "pymarkdown scan README.md" +_lint-md-changelog = "pymarkdown scan CHANGELOG.md" +_lint-md-docs = "pymarkdown scan docs" +lint-markdown = ["_lint-md-readme","_lint-md-changelog", "_lint-md-docs"] + +# tasks for test code +test = "poetry run pytest --cache-clear --cov src/krux --cov-report html ./tests" +test-verbose = "poetry run pytest --cache-clear --cov src/krux --cov-report html --show-capture all --capture tee-sys -r A ./tests" +test-specific = "poetry run pytest --cache-clear" # Need extra arguments + +# tasks for simulation +# put --sd if you want to simulate sd +sim-m5stickv = "python simulator/simulator.py --device maixpy_m5stickv" +sim-amigo-tft = "python simulator/simulator.py --device maixpy_amigo_tft" +sim-amigo-ips = "python simulator/simulator.py --device maixpy_amigo_ips" +sim-dock = "python simulator/simulator.py --device maixpy_dock" + +# tasks for live debug +live-debug = "screen /dev/tty.usbserial-device-name 115200" + +# tasks for build docs +docs-serve = "mkdocs serve" +docs-build = "mkdocs build --output" # Need an extra argument diff --git a/simulator/kruxsim/devices.py b/simulator/kruxsim/devices.py index 6df384c20..7ed1af44e 100644 --- a/simulator/kruxsim/devices.py +++ b/simulator/kruxsim/devices.py @@ -51,9 +51,10 @@ def load_image(device): if device == DOCK: return None if device not in images: - images[device] = pg.image.load( - os.path.join("assets", "%s.png" % device) - ).convert_alpha() + # Get absolute path of asset + dirname = os.path.dirname(os.path.abspath(__file__)) + asset_path = os.path.abspath(f"{dirname}/../assets/{device}.png") + images[device] = pg.image.load(asset_path).convert_alpha() return images[device] @@ -63,18 +64,20 @@ def load_image(device): def load_font(device): device = with_prefix(device) if device not in fonts: + # Get the current dir of current file + # to dynamically get the absolute path of bdf font + dirname = os.path.dirname(os.path.abspath(__file__)) + + # now get the bdf font if device == M5STICKV: - fonts[device] = pg.freetype.Font( - os.path.join("..", "firmware", "font", "ter-u14n.bdf") - ) + ter_u14n_path = os.path.abspath(f"{dirname}/../../firmware/font/ter-u14n.bdf") + fonts[device] = pg.freetype.Font(ter_u14n_path) elif device == DOCK: - fonts[device] = pg.freetype.Font( - os.path.join("..", "firmware", "font", "ter-u16n.bdf") - ) + ter_u16n_path = os.path.abspath(f"{dirname}/../../firmware/font/ter-u16n.bdf") + fonts[device] = pg.freetype.Font(ter_u16n_path) else: - fonts[device] = pg.freetype.Font( - os.path.join("..", "firmware", "font", "ter-u24b.bdf") - ) + ter_u24b_path = os.path.abspath(f"{dirname}/../../firmware/font/ter-u24b.bdf") + fonts[device] = pg.freetype.Font(ter_u24b_path) return fonts[device] diff --git a/simulator/kruxsim/mocks/board.py b/simulator/kruxsim/mocks/board.py index 0666ca3e2..f6e5874b4 100644 --- a/simulator/kruxsim/mocks/board.py +++ b/simulator/kruxsim/mocks/board.py @@ -19,6 +19,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +import os import sys from importlib import util from unittest import mock @@ -44,9 +45,14 @@ def register_device(device): global BUTTON_B global BUTTON_C project = devices.AMIGO_TFT if device == devices.PC else device - BOARD_CONFIG = load_file_as_module( - "board", "../firmware/MaixPy/projects/%s/builtin_py/board.py" % project - ).config + + # Absolute path of board file + dirname = os.path.dirname(os.path.abspath(__file__)) + board_path = os.path.abspath(f"{dirname}/../../../firmware/MaixPy/projects/{project}/builtin_py/board.py") + + # Dynamic board configuration + BOARD_CONFIG = load_file_as_module("board", board_path).config + if "LED_W" in BOARD_CONFIG["krux"]["pins"]: del BOARD_CONFIG["krux"]["pins"]["LED_W"] if device == devices.PC: diff --git a/simulator/simulator.py b/simulator/simulator.py index 547ea30f3..557e92edf 100644 --- a/simulator/simulator.py +++ b/simulator/simulator.py @@ -70,6 +70,7 @@ args = parser.parse_args() +# pylint: disable=no-member pg.init() pg.freetype.init() @@ -78,33 +79,51 @@ board.register_device(args.device) if args.sd: + # pylint: disable=unused-import from kruxsim.mocks import uopen + + # pylint: disable=unused-import from kruxsim.mocks import uos +# pylint: disable=unused-import from kruxsim.mocks import uos_functions +# pylint: disable=unused-import from kruxsim.mocks import usys + +# pylint: disable=unused-import from kruxsim.mocks import utime + +# pylint: disable=unused-import from kruxsim.mocks import fpioa_manager from kruxsim.mocks import Maix + +# pylint: disable=unused-import from kruxsim.mocks import flash from kruxsim.mocks import lcd from kruxsim.mocks import machine + +# pylint: disable=unused-import from kruxsim.mocks import image from kruxsim.mocks import pmu if args.printer: machine.simulate_printer() +# pylint: disable=unused-import from kruxsim.mocks import secp256k1 + +# pylint: disable=unused-import from kruxsim.mocks import qrcode from kruxsim.mocks import sensor from kruxsim.mocks import ft6x36 from kruxsim.sequence import SequenceExecutor +# pylint: disable=unused-import from kruxsim.mocks import rotary +# pylint: disable=invalid-name sequence_executor = None if args.sequence: sequence_executor = SequenceExecutor(args.sequence) @@ -116,12 +135,18 @@ def run_krux(): - with open("../src/boot.py") as boot_file: + """ + Runs krux firmware from src/boot.py + to simulate a properly krux device + """ + boot_path = os.path.abspath("src/boot.py") + with open(boot_path) as boot_file: exec(boot_file.read()) # mock for SD if args.sd: + # pylint: disable=unused-import from kruxsim.mocks import sd_card t = threading.Thread(target=run_krux) @@ -140,37 +165,49 @@ def run_krux(): M5STICKV_SIZE = (125, 247) device_screenshot_size = AMIGO_SIZE -if (args.device == devices.M5STICKV): +if args.device == devices.M5STICKV: device_screenshot_size = M5STICKV_SIZE -# Handle screenshots alpha bg -mask_img = pg.image.load( - os.path.join("assets", "maixpy_amigo_mask.png") - ).convert_alpha() -if (args.device == devices.M5STICKV): - mask_img = pg.image.load( - os.path.join("assets", "maixpy_m5stickv_mask.png") - ).convert_alpha() - +############################### +# Handle screenshots alpha bg # +############################### +# - get current absolute path +dirname = os.path.dirname(os.path.abspath(__file__)) +maixpy_amigo_mask_path = os.path.abspath(f"{dirname}/assets/maixpy_amigo_mask.png") +mask_img = pg.image.load(maixpy_amigo_mask_path).convert_alpha() + + +if args.device == devices.M5STICKV: + maixpy_m5stickv_mask_path = os.path.abspath( + f"{dirname}/assets/maixpy_m5stickv_mask.png" + ) + mask_img = pg.image.load(maixpy_m5stickv_mask_path).convert_alpha() + # Handle screenshots filename suffix from krux.krux_settings import Settings + +# pylint: disable=invalid-name screenshot_suffix = "" -if (args.screenshot_scale): +if args.screenshot_scale: screenshot_suffix = "." + Settings().i18n.locale.split("-")[0] - if (args.device == devices.AMIGO_IPS or args.device == devices.AMIGO_TFT): + if args.device in (devices.AMIGO_IPS, devices.AMIGO_TFT): screenshot_suffix = "-150" + screenshot_suffix - elif (args.device == devices.M5STICKV): + elif args.device == devices.M5STICKV: screenshot_suffix = "-125" + screenshot_suffix -if(args.device == devices.PC): +if args.device == devices.PC: from kruxsim.mocks.board import BOARD_CONFIG + BOARD_CONFIG["type"] = "amigo_type" t.start() def shutdown(): + """ + Shutdown device simulator + """ if t.is_alive(): t.alive = False @@ -193,12 +230,20 @@ def shutdown(): shutdown() elif event.type >= pg.USEREVENT: if event.type == events.SCREENSHOT_EVENT: - sub = screen.subsurface(devices.screenshot_rect(args.device)).convert_alpha() + sub = screen.subsurface( + devices.screenshot_rect(args.device) + ).convert_alpha() sub.blit(mask_img, sub.get_rect(), None, pg.BLEND_RGBA_SUB) - if (args.screenshot_scale): + if args.screenshot_scale: sub = pg.transform.smoothscale(sub, device_screenshot_size) pg.image.save( - sub, os.path.join("screenshots", event.dict["filename"].replace(".png", screenshot_suffix + ".png")) + sub, + os.path.join( + "screenshots", + event.dict["filename"].replace( + ".png", screenshot_suffix + ".png" + ), + ), ) else: event.dict["f"]()