pyodide-mkdocs-theme 5.6.7__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.7 → 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.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base0_extractors.py +3 -3
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_builder/_html_builder.py +10 -3
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_base.py +3 -3
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_files.py +1 -2
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/macros_configs.py +2 -2
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/test_cases.py +1 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functools.js +22 -8
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functoolsUi.js +5 -2
- {pyodide_mkdocs_theme-5.6.7 → 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.7 → 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.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/2-0-runnersManager-runners.js +3 -4
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/2-pyodideSectionsRunner-runner-pyodide.js +35 -38
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/3-terminalRunner-term.js +2 -2
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/4-0-idesManager-ide.js +2 -2
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideLogistic-ide.js +26 -17
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideRunner-ide.js +33 -26
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/6-idePlayground-playground.js +2 -1
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyproject.toml +3 -1
- pyodide_mkdocs_theme-5.6.7/pyodide_mkdocs_theme/__version__.py +0 -1
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/LICENSE +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/README.md +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/p5/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/p5/cdns.txt +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/p5v2/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/p5v2/cdns.txt +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/vis/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/vis/cdns.txt +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/vis_network/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/PMT_tools/vis_network/cdns.txt +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/__main__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/basthon_p5_to_pmt.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/exceptions.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/_inclusions_tools.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base1_contents_extractor.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base2_inclusions.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base3_generic_extractors.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/concrete_extractors.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_builder/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps_class.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/indent_parser.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/figure.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_ide.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_manager.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_playground.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_py_btn.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_run_macro.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_term_ide.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_terminal.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_tester.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/py_script.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/qcm.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/macros/runners_macros.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/classes.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/de_lang.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/en_lang.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/fr_lang.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/messages/proxy.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/parsing.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/paths_utils.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/config.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_contracts.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_indent.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_macros.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_meta.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_templates.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin/pyodide_macros_plugin.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → 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.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/common_tree_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/config_option_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → 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.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/plugin_config.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/sub_configs.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/dumpers.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/lang_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/macro_config_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/plugin_config_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/sub_config_src.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/ide_tests.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/macros_data.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/maestro_tools.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/options_alterations.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → 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.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/pyodide_logger.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/pyodide_macros/tools_and_constants.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/de/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/de/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/de/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/en/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/en/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/en/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/fr/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/fr/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/fr/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/.gitignore +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/main.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/pyodide_plot.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/requirements.txt +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/scripts/models/toolbox.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/README.md +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/.qcm-circle.svg +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-check-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-download-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-pause-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-play-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-restart-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-save-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-step-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-stop-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-upload-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/assets/images/icons8-zip-64.png +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/base_pmt.html +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/0-config.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/0-legacy-subscriber.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functoolsStorage.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functoolsTxt.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/functoolsUiBuilder.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/jsLogger.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/mathjax-libs.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-libs/process_and_gui.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → 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.7 → 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.7 → 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.7 → 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.7 → 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.7 → 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.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/qcms-qcm.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-per-pages/start-pyodide.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-scripts/overlord.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/js-scripts/subscriptions.js +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/main.html +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/mkdocs_theme.yml +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/content.html +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/copyright.html +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/footer.html +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/header.html +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/partials/social.html +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/0-generic.css +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/btns-header.css +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/history.css +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/hourglass.css +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/ide.css +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/qcm.css +0 -0
- {pyodide_mkdocs_theme-5.6.7 → pyodide_mkdocs_theme-5.7.0}/pyodide_mkdocs_theme/templates/pyodide-css/terminal.css +0 -0
- {pyodide_mkdocs_theme-5.6.7 → 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"
|
|
@@ -45,7 +45,7 @@ Context/Contracts/Goals:
|
|
|
45
45
|
* An Extractor instance is cached based on the absolute/resolved path to the targeted
|
|
46
46
|
file (aka `self.exo_file`).
|
|
47
47
|
|
|
48
|
-
* The
|
|
48
|
+
* The extractor object is automatically refreshed when a local file has been modified.
|
|
49
49
|
|
|
50
50
|
* The concrete contents of the files are stored in the instance, avoiding multiple HDD
|
|
51
51
|
reads operations. Note that the content is stored "as is", meaning the inclusions are not
|
|
@@ -95,7 +95,6 @@ class BaseFilesExtractor:
|
|
|
95
95
|
interface and contracts.
|
|
96
96
|
|
|
97
97
|
- source file and `arg_name` argument
|
|
98
|
-
- cache management
|
|
99
98
|
- file content extraction generic triggers
|
|
100
99
|
- hash and/or equality definitions
|
|
101
100
|
- abstract methods that must be implemented at some point in the hierarchy
|
|
@@ -256,7 +255,8 @@ class BaseExtractorWithCache(BaseFilesExtractor):
|
|
|
256
255
|
@classmethod
|
|
257
256
|
def get_dirty_pages(cls, *, all=False):
|
|
258
257
|
"""
|
|
259
|
-
|
|
258
|
+
Return a list of all pages instances that should be considered dirty (because a file
|
|
259
|
+
Extractor involved in the page has been modified).
|
|
260
260
|
"""
|
|
261
261
|
unique = {
|
|
262
262
|
uri: page
|
|
@@ -55,16 +55,24 @@ def _build_html_attributes(
|
|
|
55
55
|
if attrs.get('for_'):
|
|
56
56
|
attrs['for'] = attrs.pop('for_')
|
|
57
57
|
|
|
58
|
+
# Merge style sources:
|
|
58
59
|
style = attrs.get('style')
|
|
59
60
|
if style and not isinstance(style, str):
|
|
60
61
|
raise ValueError(
|
|
61
62
|
f'The `style` argument should be given as a string, but was:\n{style!r}'
|
|
62
63
|
)
|
|
63
64
|
|
|
65
|
+
# Merge dataset sources:
|
|
64
66
|
if 'data' in attrs:
|
|
65
67
|
data: Dict = attrs.pop('data')
|
|
66
68
|
attrs.update({f'data-{ k }':v for k,v in data.items()})
|
|
67
69
|
|
|
70
|
+
# Escape html tags delimiters in data-tip-txt:
|
|
71
|
+
# (see https://github.com/Python-Markdown/markdown/issues/1647)
|
|
72
|
+
if 'data-tip-txt' in attrs:
|
|
73
|
+
attrs['data-tip-txt'] = attrs['data-tip-txt'].replace('<','<').replace('>','>')
|
|
74
|
+
|
|
75
|
+
# Handle "named only" properties
|
|
68
76
|
suffix_attrs = ""
|
|
69
77
|
for name in ('disabled', 'checked'):
|
|
70
78
|
if name in attrs:
|
|
@@ -74,9 +82,8 @@ def _build_html_attributes(
|
|
|
74
82
|
attributes = " ".join(
|
|
75
83
|
f'{ name }="{ value }"'
|
|
76
84
|
for name,value in attrs.items()
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
return attributes
|
|
85
|
+
)
|
|
86
|
+
return attributes + suffix_attrs
|
|
80
87
|
|
|
81
88
|
|
|
82
89
|
|
|
@@ -61,8 +61,8 @@ class BaseMaestro(BasePlugin[PyodideMacrosConfig]):
|
|
|
61
61
|
It is also used as "sink" for the super calls of other classes that are not implemented
|
|
62
62
|
on the MacrosPlugin class.
|
|
63
63
|
|
|
64
|
-
Note that, for the ConfigExtractor
|
|
65
|
-
|
|
64
|
+
Note that, for the ConfigExtractor to properly work, the class hierarchy has to extend
|
|
65
|
+
MacrosPlugin at some point.
|
|
66
66
|
"""
|
|
67
67
|
config: PyodideMacroConfig
|
|
68
68
|
|
|
@@ -341,7 +341,7 @@ class BaseMaestro(BasePlugin[PyodideMacrosConfig]):
|
|
|
341
341
|
|
|
342
342
|
top_args_IDE_TEST: str = ''
|
|
343
343
|
"""
|
|
344
|
-
Store the value of self.args_IDE_TEST at the top level, to know
|
|
344
|
+
Store the value of self.args_IDE_TEST at the top level, to know what the user configured
|
|
345
345
|
in the mkdocs.yml file.
|
|
346
346
|
"""
|
|
347
347
|
|
|
@@ -210,7 +210,6 @@ class MaestroGeneratedPages(BaseMaestro):
|
|
|
210
210
|
files.append(file)
|
|
211
211
|
|
|
212
212
|
# "Make dirty" all pages with file extractors that aren't up to date at the moment:
|
|
213
|
-
# (handle only sources)
|
|
214
213
|
for page in FileExtractor.get_dirty_pages():
|
|
215
214
|
src_path = Path(page.file.abs_src_path)
|
|
216
215
|
target_path = Path(page.file.abs_dest_path)
|
|
@@ -245,7 +244,7 @@ class MaestroPyLibs(MaestroGeneratedPages):
|
|
|
245
244
|
|
|
246
245
|
base_py_libs: Set[str] = None # added on the fly
|
|
247
246
|
"""
|
|
248
|
-
Set of all the python_libs paths strings, as declared in the
|
|
247
|
+
Set of all the python_libs paths strings, as declared in the plugin's config (meta or not).
|
|
249
248
|
"""
|
|
250
249
|
|
|
251
250
|
python_libs_in_pyodide: List[str] = None
|
|
@@ -905,8 +905,8 @@ RUN_MACRO = MacroConfigSrc.with_default_docs(
|
|
|
905
905
|
Chemin relatif vers le fichier python (sans extension) à exécuter au chargement de
|
|
906
906
|
la page (sections `env`, `post` et `ignore` uniquement).
|
|
907
907
|
"""},
|
|
908
|
-
RUN_GROUP = {'docs': """
|
|
909
|
-
Seules les valeurs `#!py None` et `#!py "
|
|
908
|
+
RUN_GROUP = {'docs': f"""
|
|
909
|
+
Seules les valeurs `#!py None` et `#!py "{ PmtCte.RUN_GROUP_SKIP }"` sont autorisées pour les macros `run`,
|
|
910
910
|
du fait qu'il serait impossible de déterminer quand passer d'une version à l'autre
|
|
911
911
|
sur le site construit.<br>
|
|
912
912
|
"""}
|
|
@@ -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
|
|
@@ -332,11 +332,14 @@ export const handlePmtTooltips=(()=>{
|
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
const validTags = '<br> <kbd> <code> <i> <u> <b>'.split(' ')
|
|
335
|
+
const unescapeTags = {"<":'<', ">":'>', "\\<": '<'}
|
|
335
336
|
|
|
336
337
|
const getValidHtml=(html)=>{
|
|
337
338
|
// In admonitions, tags are escaped somehow (dunno where exactly), so restore them,
|
|
338
|
-
// if they are allowed:
|
|
339
|
-
html = html.replace(
|
|
339
|
+
// if they are allowed + handle markdown 3.11:
|
|
340
|
+
html = html.replace(/&[lg]t;/g, s=>unescapeTags[s])
|
|
341
|
+
.replace(/\\</g, s=>unescapeTags[s])
|
|
342
|
+
// as a separated step, making sure no mixed escaping is missed
|
|
340
343
|
|
|
341
344
|
const tags = [...html.replace(/\//g,"").match(/<[^>]*>/g)||[]]
|
|
342
345
|
const tagsOk = tags.every(s=>validTags.includes(s))
|