diff --git a/poetry.lock b/poetry.lock index dcb106a..fa0ab38 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,9 +1,10 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. [[package]] name = "attrs" version = "23.1.0" description = "Classes Without Boilerplate" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -22,6 +23,7 @@ tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pyte name = "autopep8" version = "2.0.2" description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -37,6 +39,7 @@ tomli = {version = "*", markers = "python_version < \"3.11\""} name = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -48,6 +51,7 @@ files = [ name = "charset-normalizer" version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "dev" optional = false python-versions = ">=3.7.0" files = [ @@ -130,22 +134,42 @@ files = [ [[package]] name = "click" -version = "8.1.6" +version = "8.1.7" description = "Composable command line interface toolkit" +category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "click-8.1.6-py3-none-any.whl", hash = "sha256:fa244bb30b3b5ee2cae3da8f55c9e5e0c0e86093306301fb418eb9dc40fbded5"}, - {file = "click-8.1.6.tar.gz", hash = "sha256:48ee849951919527a045bfe3bf7baa8a959c423134e1a5b98c05c20ba75a1cbd"}, + {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, + {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, ] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} +[[package]] +name = "click-default-group" +version = "1.2.4" +description = "click_default_group" +category = "dev" +optional = false +python-versions = ">=2.7" +files = [ + {file = "click_default_group-1.2.4-py2.py3-none-any.whl", hash = "sha256:9b60486923720e7fc61731bdb32b617039aba820e22e1c88766b1125592eaa5f"}, + {file = "click_default_group-1.2.4.tar.gz", hash = "sha256:eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e"}, +] + +[package.dependencies] +click = "*" + +[package.extras] +test = ["pytest"] + [[package]] name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -157,6 +181,7 @@ files = [ name = "coverage" version = "7.3.0" description = "Code coverage measurement for Python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -221,6 +246,7 @@ toml = ["tomli"] name = "exceptiongroup" version = "1.1.3" description = "Backport of PEP 654 (exception groups)" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -235,6 +261,7 @@ test = ["pytest (>=6)"] name = "flake8" version = "6.1.0" description = "the modular source code checker: pep8 pyflakes and co" +category = "dev" optional = false python-versions = ">=3.8.1" files = [ @@ -247,10 +274,33 @@ mccabe = ">=0.7.0,<0.8.0" pycodestyle = ">=2.11.0,<2.12.0" pyflakes = ">=3.1.0,<3.2.0" +[[package]] +name = "flapi" +version = "0.4.1" +description = "Remotely control FL Studio using the MIDI Controller Scripting API" +category = "dev" +optional = false +python-versions = ">=3.9,<4.0" +files = [ + {file = "flapi-0.4.1-py3-none-any.whl", hash = "sha256:979a96e008c95d44068faa6e691f724377ec6469407b8cc7b6eaaf24324ba4c3"}, + {file = "flapi-0.4.1.tar.gz", hash = "sha256:f2a24de95c341a0cbe0ca35963e9f69f9636b5931c7b94ffef9e6504716d9c3a"}, +] + +[package.dependencies] +click = ">=8.1.7,<9.0.0" +click-default-group = ">=1.2.4,<2.0.0" +fl-studio-api-stubs = ">=28.2.2" +mido = {version = ">=1.3.2,<2.0.0", extras = ["ports-rtmidi"]} +typing-extensions = ">=4.9.0,<5.0.0" + +[package.extras] +ipython = ["ipython (>=8.18.1,<9.0.0)"] + [[package]] name = "ghp-import" version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." +category = "dev" optional = false python-versions = "*" files = [ @@ -268,6 +318,7 @@ dev = ["flake8", "markdown", "twine", "wheel"] name = "griffe" version = "0.32.3" description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -282,6 +333,7 @@ colorama = ">=0.4" name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" +category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -293,6 +345,7 @@ files = [ name = "importlib-metadata" version = "6.8.0" description = "Read metadata from Python packages" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -312,6 +365,7 @@ 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 = [ @@ -319,10 +373,26 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] +[[package]] +name = "jestspectation" +version = "1.3.0" +description = "Pattern matching tools to test complex data structures" +category = "dev" +optional = false +python-versions = ">=3.9,<4.0" +files = [ + {file = "jestspectation-1.3.0-py3-none-any.whl", hash = "sha256:8245f4c0d76b9a3c5aa077003453ef40be33358cad17a1dde2707930b62d5083"}, + {file = "jestspectation-1.3.0.tar.gz", hash = "sha256:0113a67ffc9c855bac87d447f858e83a957397043a2adda06871e105e4a2acd3"}, +] + +[package.dependencies] +typing-extensions = ">=4.5.0,<5.0.0" + [[package]] name = "jinja2" version = "3.1.3" description = "A very fast and expressive template engine." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -340,6 +410,7 @@ i18n = ["Babel (>=2.7)"] name = "jsonschema" version = "4.19.0" description = "An implementation of JSON Schema validation for Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -361,6 +432,7 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- name = "jsonschema-specifications" version = "2023.7.1" description = "The JSON Schema meta-schemas and vocabularies, exposed as a Registry" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -375,6 +447,7 @@ referencing = ">=0.28.0" name = "markdown" version = "3.4.4" description = "Python implementation of John Gruber's Markdown." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -393,6 +466,7 @@ testing = ["coverage", "pyyaml"] name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -462,6 +536,7 @@ files = [ name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -473,6 +548,7 @@ files = [ name = "mergedeep" version = "1.3.4" description = "A deep merge function for 🐍." +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -480,10 +556,40 @@ files = [ {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] +[[package]] +name = "mido" +version = "1.3.2" +description = "MIDI Objects for Python" +category = "dev" +optional = false +python-versions = "~=3.7" +files = [ + {file = "mido-1.3.2-py3-none-any.whl", hash = "sha256:9f5668d2eae78e43d54f4c651f8bf41a614eb23f98ce5179d3ddd984bf19eb58"}, + {file = "mido-1.3.2.tar.gz", hash = "sha256:3aea28b6ed730f737d5b12da3578debe9dc50058fa370fe9ceded9189b67c348"}, +] + +[package.dependencies] +packaging = ">=23.1,<24.0" +python-rtmidi = {version = ">=1.5.4,<1.6.0", optional = true, markers = "extra == \"ports-rtmidi\""} + +[package.extras] +build-docs = ["sphinx (>=4.3.2,<4.4.0)", "sphinx-rtd-theme (>=1.2.2,<1.3.0)"] +check-manifest = ["check-manifest (>=0.49)"] +dev = ["mido[build-docs]", "mido[check-manifest]", "mido[lint-code]", "mido[lint-reuse]", "mido[release]", "mido[test-code]"] +lint-code = ["ruff (>=0.1.6,<0.2.0)"] +lint-reuse = ["reuse (>=1.1.2,<1.2.0)"] +ports-all = ["mido[ports-pygame]", "mido[ports-rtmidi-python]", "mido[ports-rtmidi]"] +ports-pygame = ["PyGame (>=2.5,<3.0)"] +ports-rtmidi = ["python-rtmidi (>=1.5.4,<1.6.0)"] +ports-rtmidi-python = ["rtmidi-python (>=0.2.2,<0.3.0)"] +release = ["twine (>=4.0.2,<4.1.0)"] +test-code = ["pytest (>=7.4.0,<7.5.0)"] + [[package]] name = "mkdocs" version = "1.5.2" description = "Project documentation with Markdown." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -515,6 +621,7 @@ min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-imp name = "mkdocs-autorefs" version = "0.5.0" description = "Automatically link across pages in MkDocs." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -530,6 +637,7 @@ mkdocs = ">=1.1" name = "mkdocs-gen-files" version = "0.4.0" description = "MkDocs plugin to programmatically generate documentation pages during the build" +category = "dev" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -544,6 +652,7 @@ mkdocs = ">=1.0.3,<2.0.0" name = "mkdocs-material" version = "8.5.11" description = "Documentation that simply works" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -564,6 +673,7 @@ requests = ">=2.26" name = "mkdocs-material-extensions" version = "1.1.1" description = "Extension pack for Python Markdown and MkDocs Material." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -575,6 +685,7 @@ files = [ name = "mkdocstrings" version = "0.20.0" description = "Automatic documentation from sources, for MkDocs." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -600,6 +711,7 @@ python-legacy = ["mkdocstrings-python-legacy (>=0.2.1)"] name = "mkdocstrings-python" version = "1.3.0" description = "A Python handler for mkdocstrings." +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -615,6 +727,7 @@ mkdocstrings = ">=0.20" name = "mypy" version = "1.5.0" description = "Optional static typing for Python" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -656,6 +769,7 @@ reports = ["lxml"] 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 = [ @@ -667,6 +781,7 @@ files = [ name = "packaging" version = "23.1" description = "Core utilities for Python packages" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -678,6 +793,7 @@ files = [ name = "pathspec" version = "0.11.2" description = "Utility library for gitignore style pattern matching of file paths." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -689,6 +805,7 @@ files = [ name = "platformdirs" version = "3.10.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -704,6 +821,7 @@ 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 = [ @@ -719,6 +837,7 @@ testing = ["pytest", "pytest-benchmark"] name = "pycodestyle" version = "2.11.0" description = "Python style guide checker" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -730,6 +849,7 @@ files = [ name = "pyflakes" version = "3.1.0" description = "passive checker of Python programs" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -741,6 +861,7 @@ files = [ name = "pygments" version = "2.16.1" description = "Pygments is a syntax highlighting package written in Python." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -755,6 +876,7 @@ plugins = ["importlib-metadata"] name = "pymdown-extensions" version = "10.1" description = "Extension pack for Python Markdown." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -770,6 +892,7 @@ pyyaml = "*" name = "pytest" version = "7.4.0" description = "pytest: simple powerful testing with Python" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -792,6 +915,7 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -802,10 +926,47 @@ files = [ [package.dependencies] six = ">=1.5" +[[package]] +name = "python-rtmidi" +version = "1.5.8" +description = "A Python binding for the RtMidi C++ library implemented using Cython." +category = "dev" +optional = false +python-versions = ">=3.8" +files = [ + {file = "python_rtmidi-1.5.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:efc07413b30b0039c0d35abe25a81d740c7405124eb58eed141a8f24388e6fe0"}, + {file = "python_rtmidi-1.5.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:844bd12840c9d4e03dfc89b2cd57c55dcbf5ed7246504d69c6c661732249b19c"}, + {file = "python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:8bbaf7c7164471712a93ac60c8f9ed146b336a294a5103223bbaf8f10709a0bf"}, + {file = "python_rtmidi-1.5.8-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:878ce085dfb65c0974810a7e919f73708cbb4c0430c7924b78f25aea1dd4ebee"}, + {file = "python_rtmidi-1.5.8-cp310-cp310-win_amd64.whl", hash = "sha256:f2138005c6bd3d8b9af05df383679f6d0827d16056e68a941110732310dcb7dd"}, + {file = "python_rtmidi-1.5.8-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:30d117193dcad8af67c600c405f53eb096e4ff84849760be14c97270af334922"}, + {file = "python_rtmidi-1.5.8-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4e234dca7f9d783dd3f1e9c9c5c2f295f02b7af3085301d6eed3b428cf49d327"}, + {file = "python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:271d625c489fffb39b3edc5aba67f7c8e29a04a0a0f056ce19e5a888a08b4c59"}, + {file = "python_rtmidi-1.5.8-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:46bbf32c8a4bf6c8f0df1c02a68689d0757f13cb7a69f27ccbbed3d7b2365918"}, + {file = "python_rtmidi-1.5.8-cp311-cp311-win_amd64.whl", hash = "sha256:cfea32c91752fa7aecfe3d6827535c190ba0e646a9accd6604f4fc70cf4b780f"}, + {file = "python_rtmidi-1.5.8-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:5443634597eb340cdec0734f76267a827c2d366f00a6f9195141c78828016ac2"}, + {file = "python_rtmidi-1.5.8-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:29d9c9d9f82ce679fecad7bb4cb79f3a24574ea84600e377194b4cc1baacec0e"}, + {file = "python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:25f5a5db7be98911c41ca5bebb262fcf9a7c89600b88fd3c207ceafd3101e721"}, + {file = "python_rtmidi-1.5.8-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:cec30924e305f55284594ccf35a71dee7216fd308dfa2dec1b3ed03e6f243803"}, + {file = "python_rtmidi-1.5.8-cp312-cp312-win_amd64.whl", hash = "sha256:052c89933cae4fca354012d8ca7248f4f9e1e3f062471409d48415a7f7d7e59e"}, + {file = "python_rtmidi-1.5.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7bce7f17c71a71d8ef0bfeae3cb8a7652dd02f0d5067de882e1ee44eb38518db"}, + {file = "python_rtmidi-1.5.8-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1d5da765184150fb946043d59be4039b36a8060ede025f109ef20492dbf99075"}, + {file = "python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:a5582983ad57ea7f0a7797ddc3e258efb00f8326113b6ddfa85b5165a4151806"}, + {file = "python_rtmidi-1.5.8-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:c60dd180e5130fb87571e71aea30e2ef0512131aab45865a7d67063ed8e52ca4"}, + {file = "python_rtmidi-1.5.8-cp38-cp38-win_amd64.whl", hash = "sha256:26149186367341bf5b0a3ac17b495f6a25950bd3da6b4f13d25ac0a9ce8208dd"}, + {file = "python_rtmidi-1.5.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:82e61bc1b51aa91d9e615827056e80f78dbe364248eecd61698b233f7af903f6"}, + {file = "python_rtmidi-1.5.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a706e9850e22acc57fa840c60fdc4541baafe462a05ff7631a6d9eb91c65e171"}, + {file = "python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:5966172ed28add6ff2b76d389702931bfc7ff3cc741c0e4b0d1aaae269ab7a8e"}, + {file = "python_rtmidi-1.5.8-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:29661939f9b7bd1a4e29835f50f4790e741dacd21a5cb143297aefb51deefdec"}, + {file = "python_rtmidi-1.5.8-cp39-cp39-win_amd64.whl", hash = "sha256:dd2bcbea822488fca6b8d9fc7e78a91da12914f3b88dc086f051cb65a643449f"}, + {file = "python_rtmidi-1.5.8.tar.gz", hash = "sha256:7f9ade68b068ae09000ecb562ae9521da3a234361ad5449e83fc734544d004fa"}, +] + [[package]] name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -827,6 +988,7 @@ files = [ {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_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {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"}, @@ -865,6 +1027,7 @@ files = [ name = "pyyaml-env-tag" version = "0.1" description = "A custom YAML tag for referencing environment variables in YAML files. " +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -879,6 +1042,7 @@ pyyaml = "*" name = "referencing" version = "0.30.2" description = "JSON Referencing + Python" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -894,6 +1058,7 @@ rpds-py = ">=0.7.0" name = "requests" version = "2.31.0" description = "Python HTTP for Humans." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -915,6 +1080,7 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rpds-py" version = "0.9.2" description = "Python bindings to Rust's persistent data structures (rpds)" +category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1021,6 +1187,7 @@ files = [ name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1032,6 +1199,7 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1043,6 +1211,7 @@ files = [ name = "types-jsonschema" version = "4.17.0.10" description = "Typing stubs for jsonschema" +category = "dev" optional = false python-versions = "*" files = [ @@ -1052,19 +1221,21 @@ files = [ [[package]] name = "typing-extensions" -version = "4.7.1" -description = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.9.0" +description = "Backported and Experimental Type Hints for Python 3.8+" +category = "dev" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, - {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, ] [[package]] name = "urllib3" version = "2.0.7" description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1082,6 +1253,7 @@ zstd = ["zstandard (>=0.18.0)"] name = "watchdog" version = "3.0.0" description = "Filesystem events monitoring" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1121,6 +1293,7 @@ watchmedo = ["PyYAML (>=3.10)"] name = "zipp" version = "3.16.2" description = "Backport of pathlib-compatible object wrapper for zip files" +category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1134,5 +1307,5 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" -python-versions = "^3.9.1" -content-hash = "1dbb69747407bda796cf91b48641015944b1350471651d9c4fe285a5de1b161a" +python-versions = "^3.9" +content-hash = "52aeaabdec1d072142619241feb1fc552102f728c521f525ac9ba25a188a9564" diff --git a/pyproject.toml b/pyproject.toml index 1b8bd04..0de41ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,6 +81,10 @@ mkdocs-material = "^8.5.11" mkdocstrings = {version = "^0.20.0", extras = ["python"]} autopep8 = "^2.0.2" +[tool.poetry.group.dev.dependencies] +flapi = "^0.4.0" +jestspectation = "^1.3.0" + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/scripts/__init__.py b/scripts/__init__.py index e69de29..66e3ddf 100644 --- a/scripts/__init__.py +++ b/scripts/__init__.py @@ -0,0 +1,5 @@ +""" +# Scripts + +Scripts helpful for testing the library +""" diff --git a/scripts/check_stubs_against_fl_studio.py b/scripts/check_stubs_against_fl_studio.py new file mode 100644 index 0000000..ccfea18 --- /dev/null +++ b/scripts/check_stubs_against_fl_studio.py @@ -0,0 +1,101 @@ +""" +# Scripts / Check stubs against FL Studio + +Check to ensure that the stub code completely covers all functions in FL +Studio's library. +""" +import importlib +import inspect +from typing import Optional +import flapi +from jestspectation import Equals + + +MODULES = [ + "arrangement", + "channels", + "device", + "general", + "launchMapPages", + # "midi", + "mixer", + "patterns", + "playlist", + "plugins", + "screen", + "transport", + "ui", + # "utils", +] + + +LibraryItems = dict[str, list[str]] + + +def filter_module_items(items: list[str]) -> list[str]: + """ + Filter items such that we only include the relevant ones + """ + return list(filter( + lambda name: not name.startswith('_'), + items, + )) + + +def generate_from_stubs(modules: list[str]) -> 'LibraryItems': + """ + Generate collection of all items in the stub code + """ + items = {} + for mod in modules: + items[mod] = filter_module_items(dir(importlib.import_module(mod))) + + return items + + +def generate_from_fl_studio(modules: list[str]) -> LibraryItems: + """ + Generate collection of all items in FL Studio + """ + + # Connect to FL Studio + if not flapi.enable(): + if not flapi.init(): + print("Couldn't connect to FL Studio") + exit(1) + + flapi.fl_exec("import importlib") + flapi.fl_exec(inspect.getsource(filter_module_items)) + flapi.fl_exec(inspect.getsource(generate_from_stubs)) + + return flapi.fl_eval(f"generate_from_stubs({modules})") + + items = {} + for mod in modules: + # flapi.fl_exec(f"import {mod}") + items[mod] = filter_module_items(flapi.fl_eval(f"dir({mod})")) + + return items + + +def diff(stubs: LibraryItems, fl: LibraryItems) -> Optional[str]: + eq = Equals(fl) + if eq == stubs: + return None + else: + return "\n".join(eq.get_diff(stubs, False)) + + +def main(): + stubs = generate_from_stubs(MODULES) + fl = generate_from_fl_studio(MODULES) + if (difference := diff(stubs, fl)) is not None: + print("Stub code not same as FL Studio libraries") + print(difference) + exit(1) + else: + print("Stub code matches FL Studio libraries") + + +if __name__ == '__main__': + main()