pyodide-mkdocs-theme 5.6.8__tar.gz → 5.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/PKG-INFO +1 -1
- pyodide_mkdocs_theme-5.7.0/pyodide_mkdocs_theme/PMT_tools/MocodoPmt/__init__.py +178 -0
- pyodide_mkdocs_theme-5.7.0/pyodide_mkdocs_theme/PMT_tools/MocodoPmt/cdns.json +7 -0
- pyodide_mkdocs_theme-5.7.0/pyodide_mkdocs_theme/PMT_tools/PyodidePlotPmt/__init__.py +156 -0
- pyodide_mkdocs_theme-5.7.0/pyodide_mkdocs_theme/PMT_tools/PyodidePlotPmt/cdns.json +4 -0
- pyodide_mkdocs_theme-5.7.0/pyodide_mkdocs_theme/PMT_tools/foliumPmt/__init__.py +10 -0
- pyodide_mkdocs_theme-5.7.0/pyodide_mkdocs_theme/__version__.py +1 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functools.js +22 -8
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/0-generic-python-snippets-pyodide.js +1 -166
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/1-packagesInstaller-install-pyodide.js +72 -48
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyproject.toml +3 -1
- pyodide_mkdocs_theme-5.6.8/pyodide_mkdocs_theme/__version__.py +0 -1
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/LICENSE +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/README.md +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/p5/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/p5/cdns.txt +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/p5v2/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/p5v2/cdns.txt +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/vis/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/vis/cdns.txt +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/vis_network/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/vis_network/cdns.txt +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/__main__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/basthon_p5_to_pmt.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/exceptions.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/_inclusions_tools.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base0_extractors.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base1_contents_extractor.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base2_inclusions.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base3_generic_extractors.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/concrete_extractors.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_builder/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_builder/_html_builder.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps_class.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/indent_parser.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/figure.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_ide.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_manager.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_playground.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_py_btn.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_run_macro.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_term_ide.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_terminal.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_tester.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/py_script.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/qcm.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/runners_macros.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/classes.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/de_lang.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/en_lang.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/fr_lang.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/proxy.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/parsing.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/paths_utils.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/config.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_base.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_contracts.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_files.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_indent.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_macros.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_meta.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_templates.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/pyodide_macros_plugin.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/_string_tools_and_constants.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/common_tree_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/config_option_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/docs_dirs_config.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/macros_configs.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/plugin_config.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/sub_configs.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/dumpers.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/lang_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/macro_config_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/plugin_config_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/sub_config_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/ide_tests.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/macros_data.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/maestro_tools.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/options_alterations.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/pages_and_macros_py_configs.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/test_cases.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/pyodide_logger.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/tools_and_constants.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/de/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/de/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/de/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/en/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/en/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/en/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/fr/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/fr/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/fr/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/.gitignore +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/main.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/pyodide_plot.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/requirements.txt +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/toolbox.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/README.md +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/.qcm-circle.svg +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-check-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-download-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-pause-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-play-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-restart-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-save-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-step-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-stop-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-upload-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-zip-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/base_pmt.html +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/0-config.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/0-legacy-subscriber.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functoolsStorage.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functoolsTxt.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functoolsUi.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functoolsUiBuilder.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/jsLogger.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/mathjax-libs.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/process_and_gui.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/1-error_logs-pyodide.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/1-runtimeManager-runtime-pyodide.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/2-0-runnersManager-runners.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/2-pyodideSectionsRunner-runner-pyodide.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/3-btnRunner-py_btn.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/3-terminalRunner-term.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/4-0-idesManager-ide.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideLogistic-ide.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideRunner-ide.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/5-2-virtualizer-ides_test.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/5-3-avl-ides_test.mjs +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/5-ideTester-ides_test.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/6-idePlayground-playground.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/qcms-qcm.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/start-pyodide.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-scripts/overlord.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-scripts/subscriptions.js +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/main.html +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/mkdocs_theme.yml +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/content.html +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/copyright.html +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/footer.html +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/header.html +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/social.html +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/0-generic.css +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/btns-header.css +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/history.css +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/hourglass.css +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/ide.css +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/qcm.css +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/terminal.css +0 -0
- {pyodide_mkdocs_theme-5.6.8 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/testing.css +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pyodide-mkdocs-theme
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.7.0
|
|
4
4
|
Summary: Package embedding the necessary tools to host pyodide, ACE editors, jQuery terminals in mkdocs documentations
|
|
5
5
|
License: GPL-3.0-or-later
|
|
6
6
|
Keywords: mkdocs,mkdocs-plugin,pyodide,IDE,terminal
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
|
|
2
|
+
import js # type: ignore
|
|
3
|
+
import io, sys, bs4, markdown, shutil, os
|
|
4
|
+
from contextlib import redirect_stderr, redirect_stdout
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from itertools import chain
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
from typing import ClassVar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# Hack IPython so that mocodo.magic can be used:
|
|
12
|
+
import IPython as IP # type: ignore
|
|
13
|
+
from IPython.terminal.ipapp import TerminalIPythonApp # type: ignore
|
|
14
|
+
|
|
15
|
+
def start(self):
|
|
16
|
+
if self.subapp is not None:
|
|
17
|
+
return self.subapp.start()
|
|
18
|
+
self.shell.restore_term_title()
|
|
19
|
+
# self.shell.display = lambda *a, **kw: None # NOT ENOUGH
|
|
20
|
+
if not self.shell.last_execution_succeeded:
|
|
21
|
+
sys.exit(1)
|
|
22
|
+
TerminalIPythonApp.start = start
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# Dedicated PMT Mocodo tooling:
|
|
26
|
+
@as_builtin # type: ignore
|
|
27
|
+
@dataclass
|
|
28
|
+
class Mocodo:
|
|
29
|
+
"""
|
|
30
|
+
Classe permettant de :
|
|
31
|
+
|
|
32
|
+
1. Cibler une figure html dans la page.
|
|
33
|
+
2. Générer des fichiers de représentations de modèles SQL avec mocodo.api ou mocodo.magic.
|
|
34
|
+
3. Specifier quel type de fichiers insérer dans la page.
|
|
35
|
+
4. Nettoyer automatiquement l'environnement, en supprimant les fichiers générés.
|
|
36
|
+
|
|
37
|
+
Exemple: Ce code cible la figure d'id html `"figure1"`, génère les fichiers correspondant
|
|
38
|
+
à la magic commande `magic(...)`, et insère le fichier svg généré dans la cible.
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from mocodo import Mocodo
|
|
42
|
+
|
|
43
|
+
Mocodo("figure1").magic('''
|
|
44
|
+
%%mocodo
|
|
45
|
+
CLIENT: Réf. client, Nom, Prénom, Adresse
|
|
46
|
+
PASSER, 0N CLIENT, 11 COMMANDE
|
|
47
|
+
COMMANDE: Num. commande, Date, Montant
|
|
48
|
+
INCLURE, 1N COMMANDE, 0N PRODUIT: Quantité
|
|
49
|
+
PRODUIT: Réf. produit, Libellé, Prix unitaire
|
|
50
|
+
''').show('svg')
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Les fichiers text ou markdown sont systématiquement insérés dans des balises `<pre><code>`,
|
|
54
|
+
avec une coloration syntaxique pour SQL.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
_html_id: str = None
|
|
58
|
+
cwd: str = "mocodo_notebook"
|
|
59
|
+
|
|
60
|
+
_has_sql: bool = False
|
|
61
|
+
_first_only: bool = False
|
|
62
|
+
|
|
63
|
+
_id_count: ClassVar[int] = 0
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def html_id(self):
|
|
67
|
+
return self._html_id or js.config().argsFigureDivId
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def mocodo_id(self):
|
|
71
|
+
return f"sql-mocodo-{ self._id_count }"
|
|
72
|
+
|
|
73
|
+
def target(self, html_id:str, cwd:str=None):
|
|
74
|
+
"""
|
|
75
|
+
Permet de changer la figure cible avec @html_id, ou de changer le répertoire utilisés
|
|
76
|
+
pour créer les figures (à ne pas utiliser avec `mocodo.magic`).
|
|
77
|
+
"""
|
|
78
|
+
self._html_id = html_id
|
|
79
|
+
self.cwd = cwd or self.cwd
|
|
80
|
+
return self
|
|
81
|
+
|
|
82
|
+
def api(self, *cmds:str):
|
|
83
|
+
""" Utilise mocodo.api.mocodo pour construire les fichiers """
|
|
84
|
+
from mocodo.api import mocodo
|
|
85
|
+
return self._run(mocodo, *cmds)
|
|
86
|
+
|
|
87
|
+
def magic(self, cmd:str):
|
|
88
|
+
"""
|
|
89
|
+
Utilise mocodo.magic.mocodo pour construire les fichiers avec les syntaxes normalement
|
|
90
|
+
utilisées dans les notebooks.
|
|
91
|
+
"""
|
|
92
|
+
from mocodo.magic import mocodo # doesn't work if imported differently...
|
|
93
|
+
return self._run(mocodo, cmd)
|
|
94
|
+
|
|
95
|
+
def _run(self, func, *cmds:str):
|
|
96
|
+
p = Path(self.cwd)
|
|
97
|
+
if not p.exists():
|
|
98
|
+
p.mkdir()
|
|
99
|
+
os.chdir(p)
|
|
100
|
+
try:
|
|
101
|
+
with redirect_stderr(io.StringIO()) as buffer, redirect_stdout(io.StringIO()):
|
|
102
|
+
func(*cmds)
|
|
103
|
+
msg = buffer.getvalue()
|
|
104
|
+
if msg:
|
|
105
|
+
raise ValueError(msg)
|
|
106
|
+
finally:
|
|
107
|
+
os.chdir('..')
|
|
108
|
+
return self
|
|
109
|
+
|
|
110
|
+
def show(self, *extensions:str, cwd:str=None, clear=True, first_only=True, list_files=False):
|
|
111
|
+
"""
|
|
112
|
+
Extrait automatiquement parmi les fichiers générés ceux dont l'extension correspond à une
|
|
113
|
+
de celles passées en argument.
|
|
114
|
+
|
|
115
|
+
@*extensions: les types de fichiers à extraire (sans "point"), dans l'ordre dans lequel
|
|
116
|
+
ils doivent être traités.
|
|
117
|
+
|
|
118
|
+
@cwd:str=None: permet de modifier le répertoire utilisé pour gérer les fichiers (ne pas
|
|
119
|
+
modifier pour les commandes `magic`).
|
|
120
|
+
|
|
121
|
+
@clear=True: par défaut, les fichiers et le dossier de travail est supprimé une fois la
|
|
122
|
+
méthode exécutée. On peut passer cet argument à `False` si on souhaite insérer des fichiers
|
|
123
|
+
dans différentes figures (voir la méthode `target`).
|
|
124
|
+
|
|
125
|
+
@first_only=True: Par défaut, seul le premier fichier d'un type donné est extrait. En effet,
|
|
126
|
+
certains modes d'utilisation de mocodo peuvent générer plusieurs fichiers du même type.
|
|
127
|
+
|
|
128
|
+
@list_files=False: Passer à True pour afficher dans la console le contenu du dossier de travail.
|
|
129
|
+
"""
|
|
130
|
+
self.cwd = cwd or self.cwd
|
|
131
|
+
self._has_sql = False
|
|
132
|
+
self._first_only = first_only
|
|
133
|
+
|
|
134
|
+
if list_files:
|
|
135
|
+
print(
|
|
136
|
+
"--------------------------",
|
|
137
|
+
"Files generated by mocodo:",
|
|
138
|
+
*Path(self.cwd).rglob('*'),
|
|
139
|
+
sep='\n'
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
content = '<br>'.join(chain.from_iterable(map(self._extract, extensions)))
|
|
143
|
+
soup = bs4.BeautifulSoup(content, "html.parser")
|
|
144
|
+
for script in soup.find_all("script"):
|
|
145
|
+
script.decompose()
|
|
146
|
+
no_scripts = str(soup)
|
|
147
|
+
js.document.getElementById(self.html_id).innerHTML = no_scripts
|
|
148
|
+
|
|
149
|
+
if self._has_sql:
|
|
150
|
+
js.highlightElement(self.mocodo_id) # delayed further in time
|
|
151
|
+
Mocodo._id_count += 1
|
|
152
|
+
if clear:
|
|
153
|
+
shutil.rmtree(self.cwd)
|
|
154
|
+
|
|
155
|
+
return self
|
|
156
|
+
|
|
157
|
+
def _extract(self, extension:str):
|
|
158
|
+
extension = extension.strip('.')
|
|
159
|
+
for file in Path(self.cwd).glob(f'*.{ extension }'):
|
|
160
|
+
content = file.read_text(encoding='utf-8')
|
|
161
|
+
formatted = getattr(self, f'_format_{ extension }', lambda s:s)(content)
|
|
162
|
+
yield formatted
|
|
163
|
+
if self._first_only:
|
|
164
|
+
return
|
|
165
|
+
|
|
166
|
+
def _format_md(self, txt:str):
|
|
167
|
+
return f'<div style="text-align:left">{ markdown.markdown(txt) }</div>'
|
|
168
|
+
|
|
169
|
+
def _format_mcd(self, txt:str):
|
|
170
|
+
self._has_sql = True
|
|
171
|
+
return f'<pre style="text-align:left"><code id="{ self.mocodo_id }" class="language-sql">{ txt }</code></pre>'
|
|
172
|
+
|
|
173
|
+
_format_txt = _format_mcd
|
|
174
|
+
_format_sql = _format_mcd
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
import mocodo
|
|
178
|
+
mocodo.Mocodo = Mocodo
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
[{
|
|
2
|
+
"src": "https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/highlight.min.js",
|
|
3
|
+
"integrity": "sha384-wjfDDhOPPdjtva8vWBhWeVprSpmxisEu5aYT3q1JyACqXpdKpo3PWZTMVq24MBix"
|
|
4
|
+
},{
|
|
5
|
+
"href": "https://cdn.jsdelivr.net/npm/@highlightjs/cdn-assets@11.12.0/styles/default.min.css",
|
|
6
|
+
"integrity": "sha384-4Y0nObtF3CbKnh+lpzmAVdAMtQXl+ganWiiv73RcGVdRdfVIya8Cao1C8ZsVRRDz"
|
|
7
|
+
}]
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
|
|
2
|
+
import matplotlib
|
|
3
|
+
import matplotlib.pyplot as plt
|
|
4
|
+
from typing import Callable, Sequence
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PyodidePlot:
|
|
9
|
+
"""
|
|
10
|
+
Helper class, to draw figures from pyodide runtime, into a specified html element.
|
|
11
|
+
If no argument is provided, the default `div_id` is used (arguments configuration of
|
|
12
|
+
the plugin).
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
import matplotlib.pyplot as plt
|
|
16
|
+
plt.PyodidePlot().target()
|
|
17
|
+
|
|
18
|
+
plt.plot(xs, ys, ...)
|
|
19
|
+
plt.title("...")
|
|
20
|
+
plt.show()
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
In case you want to target more than one figure in the same page, pass the html id of the
|
|
26
|
+
div tag to target to the `PyodidePlot` constructor:
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
fig1 = plt.PyodidePlot("figure_id1")
|
|
30
|
+
fig2 = plt.PyodidePlot("figure_id2")
|
|
31
|
+
|
|
32
|
+
fig1.target() # Draw in "figure_id1"
|
|
33
|
+
plt.plot(...)
|
|
34
|
+
|
|
35
|
+
fig2.target() # Draw now in "figure_id2"
|
|
36
|
+
plt.plot(...)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def __init__(self, div_id:str=''):
|
|
43
|
+
self.div_id = div_id or js.config().argsFigureDivId
|
|
44
|
+
|
|
45
|
+
def __getattr__(self, prop:str):
|
|
46
|
+
return getattr(plt, prop)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def target(self, keep_fig=False):
|
|
50
|
+
"""
|
|
51
|
+
Close any previously created figure, then setup the current run to draw in
|
|
52
|
+
the div tag targeted by the current instance.
|
|
53
|
+
If keep_fig is set to True, the automatic `Figure N` will be kept, above the
|
|
54
|
+
next drawn figure.
|
|
55
|
+
"""
|
|
56
|
+
for _ in plt.get_fignums():
|
|
57
|
+
plt.close()
|
|
58
|
+
div = js.document.getElementById(self.div_id)
|
|
59
|
+
if not div:
|
|
60
|
+
raise ValueError("Couldn't find the target object: #"+self.div_id)
|
|
61
|
+
js.document.pyodideMplTarget = div
|
|
62
|
+
div.textContent = ""
|
|
63
|
+
if not keep_fig:
|
|
64
|
+
self.clear_current_figure_title()
|
|
65
|
+
return plt
|
|
66
|
+
|
|
67
|
+
refresh = target # backward compatibility
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def plot_func(
|
|
72
|
+
self,
|
|
73
|
+
func:Callable,
|
|
74
|
+
rng:Sequence,
|
|
75
|
+
fmt:str=None,
|
|
76
|
+
title:str=None,
|
|
77
|
+
*,
|
|
78
|
+
show:bool=True,
|
|
79
|
+
keep_figure_num: bool = False,
|
|
80
|
+
**kw
|
|
81
|
+
):
|
|
82
|
+
"""
|
|
83
|
+
Draw an automatic graph for the given function on the given range, then "show"
|
|
84
|
+
automatically the resulting graph in the correct figure element in the page.
|
|
85
|
+
|
|
86
|
+
Arguments:
|
|
87
|
+
func: Callable, func(x) -> y
|
|
88
|
+
rng: Sequence of xs
|
|
89
|
+
fmt: Curve formatting (just like `pyplot.plot`)
|
|
90
|
+
title: If given, will be added as title of the graph.
|
|
91
|
+
show: Call `pyplot.show()` only if `True`. This allows to customize the graph
|
|
92
|
+
before applying show manually.
|
|
93
|
+
keep_figure_num: if False (by default), the `Figure N` above the drawing is
|
|
94
|
+
automatically removed.
|
|
95
|
+
|
|
96
|
+
"""
|
|
97
|
+
self.target(keep_figure_num)
|
|
98
|
+
|
|
99
|
+
xs = list(rng)
|
|
100
|
+
ys = [*map(func, rng)]
|
|
101
|
+
args = (xs,ys) if fmt is None else (xs,ys,fmt)
|
|
102
|
+
out = plt.plot(*args, **kw)
|
|
103
|
+
|
|
104
|
+
if title:
|
|
105
|
+
plt.title(title)
|
|
106
|
+
if show:
|
|
107
|
+
plt.show()
|
|
108
|
+
return out
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def plot(self, *args, keep_figure_num:bool=False, **kw):
|
|
113
|
+
"""
|
|
114
|
+
Generic interface, strictly equivalent to `pyplot.plot`, except the `PyodidePlot`
|
|
115
|
+
instance will automatically apply the drawing to the desired html element it is
|
|
116
|
+
related to.
|
|
117
|
+
|
|
118
|
+
_Use specifically this method to "plot"_ ! You then can rely on `pyplot` to finalize
|
|
119
|
+
the figure as you prefer.
|
|
120
|
+
"""
|
|
121
|
+
self.target(keep_figure_num)
|
|
122
|
+
out = plt.plot(*args, **kw)
|
|
123
|
+
return out
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
@classmethod
|
|
127
|
+
def clear_current_figure_title(cls):
|
|
128
|
+
""" Remove the automatic title added through matplotlib.pyplot. """
|
|
129
|
+
plt.gcf().canvas.manager.set_window_title('')
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
@classmethod
|
|
133
|
+
def interactive_backend(cls):
|
|
134
|
+
""" Use interactive html5 backend to draw figures """
|
|
135
|
+
matplotlib.use("module://matplotlib_pyodide.html5_canvas_backend")
|
|
136
|
+
|
|
137
|
+
@classmethod
|
|
138
|
+
def wasm_backend(cls):
|
|
139
|
+
""" Use wasm backend rendering to draw static figures """
|
|
140
|
+
matplotlib.use("module://matplotlib_pyodide.wasm_backend")
|
|
141
|
+
|
|
142
|
+
@classmethod
|
|
143
|
+
def matplotlib_backend(cls):
|
|
144
|
+
""" Use interactive html5 backend to draw figures """
|
|
145
|
+
cls.interactive_backend()
|
|
146
|
+
|
|
147
|
+
@classmethod
|
|
148
|
+
def sympy_backend(cls):
|
|
149
|
+
""" Use wasm backend rendering to draw static figures """
|
|
150
|
+
cls.wasm_backend()
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
import js
|
|
154
|
+
PyodidePlot.matplotlib_backend()
|
|
155
|
+
plt.PyodidePlot = matplotlib.PyodidePlot = PyodidePlot
|
|
156
|
+
as_builtin(PyodidePlot)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import folium
|
|
3
|
+
import js
|
|
4
|
+
|
|
5
|
+
def show(carte, cible:str=None):
|
|
6
|
+
"""Affiche la carte Folium dans la figure dont l'identifiant est `cible`."""
|
|
7
|
+
cible = cible or js.config().argsFigureDivId
|
|
8
|
+
js.document.getElementById(cible).innerHTML = carte._repr_html_()
|
|
9
|
+
|
|
10
|
+
folium.show = show
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "5.7.0"
|
|
@@ -84,8 +84,8 @@ export const withPyodideAsyncLock = (()=>{
|
|
|
84
84
|
*
|
|
85
85
|
* @runnerManager=null: if given, this is the RUNNERS_MANAGER instance. See @runner argument.
|
|
86
86
|
*
|
|
87
|
-
* @runner=null: if @runnerManager is given, this is the runner
|
|
88
|
-
* permission" to run. The RUNNERS_MANAGER
|
|
87
|
+
* @runner=null: if @runnerManager is given, this is the runner object currently "asking for
|
|
88
|
+
* permission" to run. The RUNNERS_MANAGER will authorize the execution or not, depending on
|
|
89
89
|
* AUTO_RUNs being completed or not (and if AUTO_RUNs are going on, authorize the current
|
|
90
90
|
* runner).
|
|
91
91
|
* */
|
|
@@ -353,14 +353,27 @@ export const cdnLoader = _ressourceLoaderFactory('script', 'src', 'script')
|
|
|
353
353
|
export const cssLoader = _ressourceLoaderFactory('link', 'href', 'css', {rel:'stylesheet'})
|
|
354
354
|
|
|
355
355
|
|
|
356
|
+
/**@ressourcesArr: Array of json objects, with href or src alongside other values (integrity, ...).
|
|
357
|
+
* If an element is a simple string, assume it's a `src` value.
|
|
358
|
+
* */
|
|
356
359
|
export const externalRessourcesLoaderFor = (name, ressourcesArr)=>{
|
|
357
360
|
if(name) console.log(`Loading ${ name } utilities...`)
|
|
358
|
-
const done = Promise.all(ressourcesArr.map(
|
|
361
|
+
const done = Promise.all( ressourcesArr.map(
|
|
362
|
+
o => typeof(o)!='string' && ('href' in o) ? cssLoader(o) : cdnLoader(o)
|
|
363
|
+
))
|
|
359
364
|
if(name) console.log(name, 'ready')
|
|
360
365
|
return done
|
|
361
366
|
}
|
|
362
367
|
|
|
363
368
|
|
|
369
|
+
/**Used only with mocodo + mcd/sql display */
|
|
370
|
+
export const highlightElement=(htmlId)=>{
|
|
371
|
+
setTimeout(()=>{
|
|
372
|
+
hljs.highlightElement(document.getElementById(htmlId))
|
|
373
|
+
})
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
|
|
364
377
|
export class RessourcesLoader {
|
|
365
378
|
|
|
366
379
|
static RESSOURCES = []
|
|
@@ -710,9 +723,10 @@ globalThis.subscribeWhenReady = subscribeWhenReady
|
|
|
710
723
|
LOGGER_CONFIG.ACTIVATE && console.log("async subscriber updated")
|
|
711
724
|
|
|
712
725
|
// Access from pyodide + IdeZipManager logistic + backward compatibility:
|
|
713
|
-
globalThis.config
|
|
714
|
-
globalThis.isDark
|
|
715
|
-
globalThis.downloader
|
|
716
|
-
globalThis.uploader
|
|
717
|
-
globalThis.uploaderAsync
|
|
726
|
+
globalThis.config = config
|
|
727
|
+
globalThis.isDark = isDark
|
|
728
|
+
globalThis.downloader = downloader
|
|
729
|
+
globalThis.uploader = uploader
|
|
730
|
+
globalThis.uploaderAsync = uploaderAsync
|
|
731
|
+
globalThis.highlightElement = highlightElement
|
|
718
732
|
// globalThis.fileContentToDom = fileContentToDom
|
|
@@ -418,7 +418,7 @@ def _hack_io_stuff():
|
|
|
418
418
|
print(re.sub(r"\x08.", "", doc))
|
|
419
419
|
|
|
420
420
|
|
|
421
|
-
PMT_TOOLS = ['p5', 'p5v2', 'vis', 'vis_network'] # GENERATED
|
|
421
|
+
PMT_TOOLS = ['MocodoPmt', 'PyodidePlotPmt', 'foliumPmt', 'p5', 'p5v2', 'vis', 'vis_network'] # GENERATED
|
|
422
422
|
|
|
423
423
|
|
|
424
424
|
@wraps_builtin
|
|
@@ -691,171 +691,6 @@ def _hack_uploader_downloader():
|
|
|
691
691
|
`,
|
|
692
692
|
|
|
693
693
|
|
|
694
|
-
// GENERATED (modify the root project file instead and/or ./python_devops/_js_codes_updates.py)
|
|
695
|
-
pyodidePlot: `
|
|
696
|
-
@auto_run
|
|
697
|
-
def _hack_plot():
|
|
698
|
-
# THIS IS A PLOT TOKEN
|
|
699
|
-
|
|
700
|
-
import matplotlib
|
|
701
|
-
import matplotlib.pyplot as plt
|
|
702
|
-
from typing import Callable, Sequence
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
class PyodidePlot:
|
|
707
|
-
"""
|
|
708
|
-
Helper class, to draw figures from pyodide runtime, into a specified html element.
|
|
709
|
-
If no argument is provided, the default \`div_id\` is used (arguments configuration of
|
|
710
|
-
the plugin).
|
|
711
|
-
|
|
712
|
-
\`\`\`python
|
|
713
|
-
import matplotlib.pyplot as plt
|
|
714
|
-
PyodidePlot().target()
|
|
715
|
-
|
|
716
|
-
plt.plot(xs, ys, ...)
|
|
717
|
-
plt.title("...")
|
|
718
|
-
plt.show()
|
|
719
|
-
\`\`\`
|
|
720
|
-
|
|
721
|
-
---
|
|
722
|
-
|
|
723
|
-
In case you want to target more than one figure in the same page, pass the html id of the
|
|
724
|
-
div tag to target to the \`PyodidePlot\` constructor:
|
|
725
|
-
|
|
726
|
-
\`\`\`python
|
|
727
|
-
fig1 = PyodidePlot("figure_id1")
|
|
728
|
-
fig2 = PyodidePlot("figure_id2")
|
|
729
|
-
|
|
730
|
-
fig1.target() # Draw in "figure_id1"
|
|
731
|
-
plt.plot(...)
|
|
732
|
-
|
|
733
|
-
fig2.target() # Draw in "figure_id2"
|
|
734
|
-
plt.plot(...)
|
|
735
|
-
\`\`\`
|
|
736
|
-
|
|
737
|
-
---
|
|
738
|
-
"""
|
|
739
|
-
|
|
740
|
-
def __init__(self, div_id:str=''):
|
|
741
|
-
self.div_id = div_id or js.config().argsFigureDivId
|
|
742
|
-
|
|
743
|
-
def __getattr__(self, prop:str):
|
|
744
|
-
return getattr(plt, prop)
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
def target(self, keep_fig=False):
|
|
748
|
-
"""
|
|
749
|
-
Close any previously created figure, then setup the current run to draw in
|
|
750
|
-
the div tag targeted by the current instance.
|
|
751
|
-
If keep_fig is set to True, the automatic \`Figure N\` will be kept, above the
|
|
752
|
-
next drawn figure.
|
|
753
|
-
"""
|
|
754
|
-
for _ in plt.get_fignums():
|
|
755
|
-
plt.close()
|
|
756
|
-
div = js.document.getElementById(self.div_id)
|
|
757
|
-
if not div:
|
|
758
|
-
raise ValueError("Couldn't find the target object: #"+self.div_id)
|
|
759
|
-
js.document.pyodideMplTarget = div
|
|
760
|
-
div.textContent = ""
|
|
761
|
-
if not keep_fig:
|
|
762
|
-
self.clear_current_figure_title()
|
|
763
|
-
return plt
|
|
764
|
-
|
|
765
|
-
refresh = target # backward compatibility
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
def plot_func(
|
|
770
|
-
self,
|
|
771
|
-
func:Callable,
|
|
772
|
-
rng:Sequence,
|
|
773
|
-
fmt:str=None,
|
|
774
|
-
title:str=None,
|
|
775
|
-
*,
|
|
776
|
-
show:bool=True,
|
|
777
|
-
keep_figure_num: bool = False,
|
|
778
|
-
**kw
|
|
779
|
-
):
|
|
780
|
-
"""
|
|
781
|
-
Draw an automatic graph for the given function on the given range, then "show"
|
|
782
|
-
automatically the resulting graph in the correct figure element in the page.
|
|
783
|
-
|
|
784
|
-
Arguments:
|
|
785
|
-
func: Callable, func(x) -> y
|
|
786
|
-
rng: Sequence of xs
|
|
787
|
-
fmt: Curve formatting (just like \`pyplot.plot\`)
|
|
788
|
-
title: If given, will be added as title of the graph.
|
|
789
|
-
show: Call \`pyplot.show()\` only if \`True\`. This allows to customize the graph
|
|
790
|
-
before applying show manually.
|
|
791
|
-
keep_figure_num: if False (by default), the \`Figure N\` above the drawing is
|
|
792
|
-
automatically removed.
|
|
793
|
-
|
|
794
|
-
"""
|
|
795
|
-
self.target(keep_figure_num)
|
|
796
|
-
|
|
797
|
-
xs = list(rng)
|
|
798
|
-
ys = [*map(func, rng)]
|
|
799
|
-
args = (xs,ys) if fmt is None else (xs,ys,fmt)
|
|
800
|
-
out = plt.plot(*args, **kw)
|
|
801
|
-
|
|
802
|
-
if title:
|
|
803
|
-
plt.title(title)
|
|
804
|
-
if show:
|
|
805
|
-
plt.show()
|
|
806
|
-
return out
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
def plot(self, *args, keep_figure_num:bool=False, **kw):
|
|
811
|
-
"""
|
|
812
|
-
Generic interface, strictly equivalent to \`pyplot.plot\`, except the \`PyodidePlot\`
|
|
813
|
-
instance will automatically apply the drawing to the desired html element it is
|
|
814
|
-
related to.
|
|
815
|
-
|
|
816
|
-
_Use specifically this method to "plot"_ ! You then can rely on \`pyplot\` to finalize
|
|
817
|
-
the figure as you prefer.
|
|
818
|
-
"""
|
|
819
|
-
self.target(keep_figure_num)
|
|
820
|
-
out = plt.plot(*args, **kw)
|
|
821
|
-
return out
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
@classmethod
|
|
825
|
-
def clear_current_figure_title(cls):
|
|
826
|
-
""" Remove the automatic title added through matplotlib.pyplot. """
|
|
827
|
-
plt.gcf().canvas.manager.set_window_title('')
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
@classmethod
|
|
831
|
-
def interactive_backend(cls):
|
|
832
|
-
""" Use interactive html5 backend to draw figures """
|
|
833
|
-
matplotlib.use("module://matplotlib_pyodide.html5_canvas_backend")
|
|
834
|
-
|
|
835
|
-
@classmethod
|
|
836
|
-
def wasm_backend(cls):
|
|
837
|
-
""" Use wasm backend rendering to draw static figures """
|
|
838
|
-
matplotlib.use("module://matplotlib_pyodide.wasm_backend")
|
|
839
|
-
|
|
840
|
-
@classmethod
|
|
841
|
-
def matplotlib_backend(cls):
|
|
842
|
-
""" Use interactive html5 backend to draw figures """
|
|
843
|
-
cls.interactive_backend()
|
|
844
|
-
|
|
845
|
-
@classmethod
|
|
846
|
-
def sympy_backend(cls):
|
|
847
|
-
""" Use wasm backend rendering to draw static figures """
|
|
848
|
-
cls.wasm_backend()
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
import js
|
|
852
|
-
PyodidePlot.matplotlib_backend()
|
|
853
|
-
|
|
854
|
-
# THIS IS A PLOT TOKEN
|
|
855
|
-
__builtins__.PyodidePlot = PyodidePlot # don't use the decorator because auto-updated code
|
|
856
|
-
`,
|
|
857
|
-
|
|
858
|
-
|
|
859
694
|
mermaidDrawer: `
|
|
860
695
|
@auto_run
|
|
861
696
|
def _hack_mermaid():
|