pyodide-mkdocs-theme 5.4.16__tar.gz → 5.5.1__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.4.16 → pyodide_mkdocs_theme-5.5.1}/PKG-INFO +1 -1
- pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/__version__.py +1 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base0_extractors.py +15 -15
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps.py +33 -30
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/figure.py +2 -2
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_ide.py +13 -5
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_manager.py +33 -22
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_playground.py +8 -4
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_py_btn.py +2 -2
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_run_macro.py +13 -2
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_terminal.py +2 -2
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/py_script.py +5 -5
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/qcm.py +4 -4
- pyodide_mkdocs_theme-5.4.16/pyodide_mkdocs_theme/pyodide_macros/macros/IDEs.py → pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/pyodide_macros/macros/runners_macros.py +31 -19
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/messages/de_lang.py +2 -2
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/messages/en_lang.py +2 -2
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/messages/fr_lang.py +2 -2
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/parsing.py +6 -6
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/paths_utils.py +22 -3
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_base.py +43 -39
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_contracts.py +34 -25
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_files.py +5 -5
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_indent.py +3 -3
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_macros.py +7 -7
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_meta.py +1 -1
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_templates.py +3 -4
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/pyodide_macros_plugin.py +16 -18
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/config_option_src.py +19 -11
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/macros_configs.py +61 -50
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/sub_configs.py +20 -13
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/macro_config_src.py +0 -11
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/sub_config_src.py +23 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/macros_data.py +12 -8
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/test_cases.py +1 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/pyodide_logger.py +1 -1
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/tools_and_constants.py +70 -28
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-libs/0-config.js +2 -0
- pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/templates/js-libs/functools.js +643 -0
- pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/templates/js-libs/functoolsStorage.js +275 -0
- pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/templates/js-libs/functoolsTxt.js +211 -0
- pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/templates/js-libs/functoolsUi.js +386 -0
- pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/templates/js-libs/functoolsUiBuilder.js +301 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-libs/jsLogger.js +1 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-libs/process_and_gui.js +78 -112
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/0-generic-python-snippets-pyodide.js +49 -15
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/1-error_logs-pyodide.js +1 -1
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/1-packagesInstaller-install-pyodide.js +1 -1
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/1-runtimeManager-runtime-pyodide.js +1 -1
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/2-0-runnersManager-runners.js +131 -44
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/2-pyodideSectionsRunner-runner-pyodide.js +129 -65
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/3-terminalRunner-term.js +118 -388
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/4-0-idesManager-ide.js +33 -11
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideLogistic-ide.js +170 -117
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideRunner-ide.js +93 -46
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/5-ideTester-ides_test.js +2 -3
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/6-2-init-playground.js +2 -1
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/6-idePlayground-playground.js +2 -2
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/qcms-qcm.js +18 -9
- pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/templates/js-per-pages/start-pyodide.js +161 -0
- pyodide_mkdocs_theme-5.5.1/pyodide_mkdocs_theme/templates/js-scripts/subscriptions.js +163 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/pyodide-css/ide.css +5 -8
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyproject.toml +19 -4
- pyodide_mkdocs_theme-5.4.16/pyodide_mkdocs_theme/__version__.py +0 -1
- pyodide_mkdocs_theme-5.4.16/pyodide_mkdocs_theme/templates/js-libs/functools.js +0 -1248
- pyodide_mkdocs_theme-5.4.16/pyodide_mkdocs_theme/templates/js-per-pages/start-pyodide.js +0 -161
- pyodide_mkdocs_theme-5.4.16/pyodide_mkdocs_theme/templates/js-scripts/subscriptions.js +0 -421
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/LICENSE +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/README.md +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/PMT_tools/p5/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/PMT_tools/vis/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/PMT_tools/vis_network/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/__main__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/basthon_p5_to_pmt.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/exceptions.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/_inclusions_tools.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base1_contents_extractor.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base2_inclusions.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base3_generic_extractors.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/files_extractors/concrete_extractors.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/html_builder/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/html_builder/_html_builder.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps_class.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/indent_parser.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_term_ide.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_tester.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/messages/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/messages/classes.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/messages/proxy.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin/config.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/_string_tools_and_constants.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/common_tree_src.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/docs_dirs_config.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/definitions/plugin_config.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/dumpers.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/lang_src.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_config/plugin_config_src.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/maestro_tools.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/options_alterations.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/pages_and_macros_py_configs.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/de/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/de/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/de/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/en/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/en/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/en/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/fr/docs/exo.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/fr/docs/index.md +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/fr/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/models/.gitignore +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/models/main.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/models/mkdocs.yml +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/models/pyodide_plot.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/models/requirements.txt +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/scripts/models/toolbox.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/README.md +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/__init__.py +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/.qcm-circle.svg +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-check-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-download-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-play-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-restart-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-save-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-step-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-stop-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-upload-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/assets/images/icons8-zip-64.png +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/base_pmt.html +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-libs/0-legacy-subscriber.js +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-libs/mathjax-libs.js +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-per-pages/3-btnRunner-py_btn.js +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/js-scripts/overlord.js +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/main.html +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/mkdocs_theme.yml +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/partials/content.html +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/partials/copyright.html +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/partials/footer.html +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/partials/header.html +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/partials/social.html +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/pyodide-css/0-generic.css +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/pyodide-css/btns-header.css +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/pyodide-css/history.css +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/pyodide-css/hourglass.css +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/pyodide-css/qcm.css +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/pyodide_mkdocs_theme/templates/pyodide-css/terminal.css +0 -0
- {pyodide_mkdocs_theme-5.4.16 → pyodide_mkdocs_theme-5.5.1}/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.5.1
|
|
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 @@
|
|
|
1
|
+
__version__ = "5.5.1"
|
|
@@ -25,7 +25,7 @@ If not, see <https://www.gnu.org/licenses/>.
|
|
|
25
25
|
------------------------------------
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
Represent all the files associated to a runner (IDE, terminal, sqlide, ...), holding the
|
|
28
|
+
Represent all the files associated to a runner (IDE, terminal, sqlide, ...), holding the
|
|
29
29
|
logic/tools to build the various sections contents.
|
|
30
30
|
|
|
31
31
|
Context/Contracts/Goals:
|
|
@@ -36,10 +36,11 @@ Context/Contracts/Goals:
|
|
|
36
36
|
* The PMT file can actually not exist at all! (in that case, exo_file is None)
|
|
37
37
|
|
|
38
38
|
* A PMT file, if it exists, contains sections delimited by tokens (comments) in the form:
|
|
39
|
-
|
|
39
|
+
|
|
40
40
|
{head} (PMT|PYODIDE):{section} {tail}
|
|
41
|
-
|
|
42
|
-
Where `head` and `tail` depend on the type of the file, to build a valide comment (python,
|
|
41
|
+
|
|
42
|
+
Where `head` and `tail` depend on the type of the file, to build a valide comment (python,
|
|
43
|
+
sql, ...).
|
|
43
44
|
|
|
44
45
|
* An Extractor instance is cached based on the absolute/resolved path to the targeted
|
|
45
46
|
file (aka `self.exo_file`).
|
|
@@ -47,11 +48,11 @@ Context/Contracts/Goals:
|
|
|
47
48
|
* The file is automatically refreshed when a local file has been modified.
|
|
48
49
|
|
|
49
50
|
* The concrete contents of the files are stored in the instance, avoiding multiple HDD
|
|
50
|
-
reads operations. Note that the content is stored "as is", meaning the inclusions are not
|
|
51
|
+
reads operations. Note that the content is stored "as is", meaning the inclusions are not
|
|
51
52
|
resolved yet, but the code is analyzed so that the inclusions are known upfront.
|
|
52
53
|
|
|
53
|
-
* The final/actual contents are never stored in the object: the concrete contents are
|
|
54
|
-
always built on the fly/on demand, so that all inclusions redirections can apply where
|
|
54
|
+
* The final/actual contents are never stored in the object: the concrete contents are
|
|
55
|
+
always built on the fly/on demand, so that all inclusions redirections can apply where
|
|
55
56
|
needed.
|
|
56
57
|
"""
|
|
57
58
|
# pylint: disable=multiple-statements, missing-function-docstring
|
|
@@ -118,7 +119,7 @@ class BaseFilesExtractor:
|
|
|
118
119
|
Path to the master main file (if any).
|
|
119
120
|
Also used as key cache to retrieve an Extractor instance.
|
|
120
121
|
|
|
121
|
-
WARNING: This path is absolute + resolved, whereas the runner_file for an IDE actually is
|
|
122
|
+
WARNING: This path is absolute + resolved, whereas the runner_file for an IDE actually is
|
|
122
123
|
absolute but NOT normalized (to reduce the needs of ID arugments in macros calls,
|
|
123
124
|
when generating the html ids of the resulting elements).
|
|
124
125
|
"""
|
|
@@ -131,7 +132,7 @@ class BaseFilesExtractor:
|
|
|
131
132
|
|
|
132
133
|
in_pages: Set[str] = field(default_factory=set)
|
|
133
134
|
"""
|
|
134
|
-
|
|
135
|
+
Set of pages uri (relative to the docs_dir) that use the current extractor.
|
|
135
136
|
"""
|
|
136
137
|
|
|
137
138
|
# ---------------------------------------------------------------------------------
|
|
@@ -151,12 +152,6 @@ class BaseFilesExtractor:
|
|
|
151
152
|
md_uri = self.env.page.file.src_uri
|
|
152
153
|
self.in_pages.add(md_uri)
|
|
153
154
|
|
|
154
|
-
if self.arg_name and not self.runner_file:
|
|
155
|
-
raise PmtMacrosInvalidPmtFileError(
|
|
156
|
-
f"No file could be found for { self.ARG_NAME }='{ self.arg_name }'."
|
|
157
|
-
f"{ self.env.log() }"
|
|
158
|
-
)
|
|
159
|
-
|
|
160
155
|
|
|
161
156
|
def __hash__(self):
|
|
162
157
|
return hash(self.exo_file)
|
|
@@ -277,6 +272,11 @@ class BaseExtractorWithCache(BaseFilesExtractor):
|
|
|
277
272
|
if not runner_file:
|
|
278
273
|
runner_file = env.get_sibling_of_current_page(rel_path, tail=cls.EXTENSION)
|
|
279
274
|
|
|
275
|
+
if rel_path and not runner_file:
|
|
276
|
+
raise PmtMacrosInvalidPmtFileError(
|
|
277
|
+
f"No file could be found for '{ rel_path }'.{ env.log() }"
|
|
278
|
+
)
|
|
279
|
+
|
|
280
280
|
exo_file = runner_file and Path(runner_file).resolve()
|
|
281
281
|
extractor = cls._CACHED_EXTRACTORS.get(exo_file)
|
|
282
282
|
|
|
@@ -172,47 +172,50 @@ class HtmlDependencies:
|
|
|
172
172
|
# actually loaded sync (this avoids the need for yet another global async flag...)
|
|
173
173
|
|
|
174
174
|
|
|
175
|
-
lodash
|
|
176
|
-
jQuery
|
|
175
|
+
lodash = Cdn(Block.libs, DepKind.always, "https://cdn.jsdelivr.net/npm/lodash@4.17.20/lodash.min.js")
|
|
176
|
+
jQuery = Cdn(Block.libs, DepKind.always, "https://cdn.jsdelivr.net/npm/jquery@3.7.1")
|
|
177
177
|
|
|
178
|
-
jQuery_css
|
|
179
|
-
awesome_font
|
|
180
|
-
"href": "https://
|
|
181
|
-
"integrity": "
|
|
178
|
+
jQuery_css = Css(Block.libs, DepKind.always, "https://cdn.jsdelivr.net/npm/jquery.terminal@2.43.1/css/jquery.terminal.min.css")
|
|
179
|
+
awesome_font = Css(Block.libs, DepKind.always, {
|
|
180
|
+
"href": "https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css",
|
|
181
|
+
"integrity": "sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=",
|
|
182
182
|
})
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
'
|
|
187
|
-
'integrity': "sha512-GQpIYSKNIPIC763JKTNALj+t18/nfLdzw5gITgFGa31aK/4NmjyPKsfqrjh7CuzpJaG3nqEleeVcWUhHad9Axg==",
|
|
183
|
+
jQterm = Cdn(Block.libs, DepKind.term, "https://cdn.jsdelivr.net/npm/jquery.terminal@2.43.1/js/jquery.terminal.min.js")
|
|
184
|
+
ace = Cdn(Block.libs, DepKind.ide, {
|
|
185
|
+
'src': "https://cdn.jsdelivr.net/npm/ace-builds@1.44.0/src-min-noconflict/ace.js",
|
|
186
|
+
'integrity': "sha256-By0T5T0R4s7M//4aD6fxXPacVDXYl99T2YxxvhxKLn8=",
|
|
188
187
|
})
|
|
189
|
-
ace_tools
|
|
190
|
-
'src': "https://
|
|
191
|
-
'integrity': "
|
|
188
|
+
ace_tools = Cdn(Block.libs, DepKind.ide, {
|
|
189
|
+
'src': "https://cdn.jsdelivr.net/npm/ace-builds@1.44.0/src-min-noconflict/ext-language_tools.js",
|
|
190
|
+
'integrity': "sha256-eZ46N0b3QkDX+7GjjlJfoBuXGKIH86UKJVARHhGzpWA=",
|
|
192
191
|
})
|
|
193
|
-
pyodide
|
|
192
|
+
pyodide = Cdn(Block.libs, DepKind.pyodide, "https://cdn.jsdelivr.net/pyodide/v0.25.0/full/pyodide.js")
|
|
194
193
|
|
|
195
194
|
#vvvvvvvvvvvvvvv
|
|
196
195
|
# GENERATED-libs
|
|
197
|
-
config
|
|
198
|
-
subscriber
|
|
199
|
-
functools
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
196
|
+
config = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/0-config.js", type="text/javascript", extra_dump="dump_to_js_config")
|
|
197
|
+
subscriber = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/0-legacy-subscriber.js", type="text/javascript")
|
|
198
|
+
functools = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/functools.js", type="module")
|
|
199
|
+
functoolsStorage = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/functoolsStorage.js", type="module")
|
|
200
|
+
functoolsTxt = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/functoolsTxt.js", type="module")
|
|
201
|
+
functoolsUi = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/functoolsUi.js", type="module")
|
|
202
|
+
functoolsUiBuilder = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/functoolsUiBuilder.js", type="module")
|
|
203
|
+
jsLogger = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/jsLogger.js", type="module")
|
|
204
|
+
mathjax = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/mathjax-libs.js", type="text/javascript")
|
|
205
|
+
process_and_gui = Cdn(Block.libs, DepKind.always, "{base_url}/js-libs/process_and_gui.js", type="module")
|
|
206
|
+
generic = Css(Block.libs, DepKind.always, "{base_url}/pyodide-css/0-generic.css")
|
|
207
|
+
header = Css(Block.libs, DepKind.always, "{base_url}/pyodide-css/btns-header.css")
|
|
208
|
+
history = Css(Block.libs, DepKind.always, "{base_url}/pyodide-css/history.css")
|
|
209
|
+
hourglass = Css(Block.libs, DepKind.always, "{base_url}/pyodide-css/hourglass.css")
|
|
210
|
+
ide = Css(Block.libs, DepKind.always, "{base_url}/pyodide-css/ide.css")
|
|
211
|
+
qcm = Css(Block.libs, DepKind.always, "{base_url}/pyodide-css/qcm.css")
|
|
212
|
+
terminal = Css(Block.libs, DepKind.always, "{base_url}/pyodide-css/terminal.css")
|
|
213
|
+
testing = Css(Block.libs, DepKind.always, "{base_url}/pyodide-css/testing.css")
|
|
211
214
|
# GENERATED-libs
|
|
212
215
|
#^^^^^^^^^^^^^^^
|
|
213
216
|
|
|
214
217
|
# Always _after_ the js mathjax-libs.js file (SYNC!)
|
|
215
|
-
mathjax_tex
|
|
218
|
+
mathjax_tex = Cdn(Block.libs, DepKind.always, "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js")
|
|
216
219
|
|
|
217
220
|
|
|
218
221
|
#---------------------------------------------------
|
|
@@ -23,7 +23,7 @@ from functools import wraps
|
|
|
23
23
|
from typing import Optional
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
from ..tools_and_constants import
|
|
26
|
+
from ..tools_and_constants import PmtCte, HtmlClass, P5BtnLocation
|
|
27
27
|
from .. import html_builder as Html
|
|
28
28
|
from ..plugin.maestro_macros import MaestroMacros
|
|
29
29
|
from .ide_manager import IdeManager
|
|
@@ -37,7 +37,7 @@ def figure(env:MaestroMacros):
|
|
|
37
37
|
Macro pour insérer une <div> qui devra contenir une figure dessinée ensuite via matplotlib,
|
|
38
38
|
par exemple(ou autre!).
|
|
39
39
|
"""
|
|
40
|
-
MACROS_WITH_INDENTS.add('figure')
|
|
40
|
+
PmtCte.MACROS_WITH_INDENTS.add('figure')
|
|
41
41
|
|
|
42
42
|
def p5_btn(kind:str, div_id:str, side:str):
|
|
43
43
|
return IdeManager.cls_create_button(
|
|
@@ -31,7 +31,7 @@ from pyodide_mkdocs_theme.pyodide_macros.html_dependencies.deps_class import Dep
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
from .. import html_builder as Html
|
|
34
|
-
from ..tools_and_constants import HtmlClass,
|
|
34
|
+
from ..tools_and_constants import HtmlClass, PmtCte, IdeMode, PmtPyMacrosName, Prefix
|
|
35
35
|
from ..messages import Tip
|
|
36
36
|
from ..parsing import add_indent, admonition_safe_html, build_code_fence, items_comma_joiner
|
|
37
37
|
from ..plugin_tools.test_cases import Case
|
|
@@ -233,14 +233,22 @@ class Ide(CommonTermIde):
|
|
|
233
233
|
)
|
|
234
234
|
|
|
235
235
|
self.max_attempts, self.max_attempts_symbol = (
|
|
236
|
-
(inf,
|
|
236
|
+
(inf, PmtCte.infinity_symbol) if is_inf else (int(max_ide), max_ide)
|
|
237
237
|
)
|
|
238
238
|
|
|
239
239
|
|
|
240
240
|
|
|
241
|
-
def
|
|
241
|
+
def _validate_config(self):
|
|
242
242
|
|
|
243
243
|
msg = ""
|
|
244
|
+
if self.auto_run and self.export:
|
|
245
|
+
msg += self._build_error_msg_with_option(
|
|
246
|
+
"IDE with `EXPORT=True` should never have `AUTO_RUN=True` at the same time, because "
|
|
247
|
+
"it could present a risk of executing automatically arbitrary code on the teacher's "
|
|
248
|
+
"machine after importing a zip an reloading the page."
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
|
|
244
252
|
if(
|
|
245
253
|
self.has_check_btn
|
|
246
254
|
and self.env.deactivate_stdout_for_secrets
|
|
@@ -366,7 +374,7 @@ class Ide(CommonTermIde):
|
|
|
366
374
|
global_layout = Html.div(
|
|
367
375
|
self.generate_empty_ide(),
|
|
368
376
|
id = f"{ Prefix.global_ }{ self.editor_name }",
|
|
369
|
-
kls = HtmlClass.py_mk_ide,
|
|
377
|
+
kls = self._get_runner_html_class(HtmlClass.py_mk_ide),
|
|
370
378
|
)
|
|
371
379
|
solution_div = self.build_corr_and_rems()
|
|
372
380
|
|
|
@@ -495,7 +503,7 @@ class Ide(CommonTermIde):
|
|
|
495
503
|
at_least_one = self.has_corr or self.has_rem
|
|
496
504
|
anything = at_least_one or self.has_vis_rem
|
|
497
505
|
with_encrypt = self.env.encrypt_corrections_and_rems and anything
|
|
498
|
-
extra_tokens = (
|
|
506
|
+
extra_tokens = ( PmtCte.encryption_token, ) * with_encrypt
|
|
499
507
|
|
|
500
508
|
|
|
501
509
|
# Build the whole div content:
|
|
@@ -37,13 +37,11 @@ from ..exceptions import (
|
|
|
37
37
|
PmtMermaidConfigError
|
|
38
38
|
)
|
|
39
39
|
from ..tools_and_constants import (
|
|
40
|
-
|
|
41
|
-
PYTHON_KEYWORDS,
|
|
42
|
-
RUN_GROUP_SKIP,
|
|
40
|
+
PmtCte,
|
|
43
41
|
SCRIPT_DATA_TO_JS_EXPORTABLE_PROPS,
|
|
44
42
|
HashPathMode,
|
|
45
43
|
HtmlClass,
|
|
46
|
-
|
|
44
|
+
PmtCte,
|
|
47
45
|
P5BtnLocation,
|
|
48
46
|
PmtPyMacrosName,
|
|
49
47
|
ScriptData,
|
|
@@ -186,16 +184,22 @@ class IdeManagerMacroArguments:
|
|
|
186
184
|
runs are activated.
|
|
187
185
|
"""
|
|
188
186
|
|
|
187
|
+
extra_class: str
|
|
188
|
+
"""
|
|
189
|
+
Additional html classes to put on the outer div of the runner. See self._get_runner_html_class.
|
|
190
|
+
"""
|
|
191
|
+
|
|
189
192
|
extra_kw: Optional[Dict[str,Any]] = None
|
|
190
193
|
"""
|
|
191
194
|
Any kw left in the original call.
|
|
192
|
-
Should
|
|
193
|
-
|
|
195
|
+
Should always be None when reaching IdeManager.__post_init__. This allows subclasses to handle
|
|
196
|
+
the extra (legacy) keywords on their side.
|
|
194
197
|
"""
|
|
195
198
|
|
|
196
199
|
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
|
|
201
|
+
# defined during __post_init__ or in child class
|
|
202
|
+
#-----------------------------------------------
|
|
199
203
|
|
|
200
204
|
exo_py: Optional[Path] = None
|
|
201
205
|
"""
|
|
@@ -406,17 +410,17 @@ class IdeSectionsManager(IdeManagerMacroArguments):
|
|
|
406
410
|
self.contents = self._build_all_resolved_contents()
|
|
407
411
|
self.py_name = self.exo_py.stem if self.exo_py else ""
|
|
408
412
|
|
|
409
|
-
self._define_max_attempts_symbols_and_value() # To do before files validation
|
|
413
|
+
self._define_max_attempts_symbols_and_value() # To do before files validation because of MAX
|
|
410
414
|
|
|
411
|
-
self.
|
|
415
|
+
self._validate_config()
|
|
412
416
|
|
|
413
417
|
if self.rec_limit < -1: # standardization
|
|
414
418
|
self.rec_limit = -1
|
|
415
419
|
|
|
416
|
-
if -1 < self.rec_limit <
|
|
420
|
+
if -1 < self.rec_limit < PmtCte.min_recursion_limit:
|
|
417
421
|
raise PmtMacrosInvalidArgumentError(
|
|
418
422
|
f"The recursion limit is set too low and may causes runtime troubles. "
|
|
419
|
-
f"Please set it to at least {
|
|
423
|
+
f"Please set it to at least { PmtCte.min_recursion_limit }.{ self.env.log() }"
|
|
420
424
|
)
|
|
421
425
|
|
|
422
426
|
# REM contents won't be visible at page load time, hence mkdocs material might miss the requirement.
|
|
@@ -438,7 +442,7 @@ class IdeSectionsManager(IdeManagerMacroArguments):
|
|
|
438
442
|
""" Placeholder, to insert (very...) specific logic for IDEs... """
|
|
439
443
|
|
|
440
444
|
|
|
441
|
-
def
|
|
445
|
+
def _validate_config(self):
|
|
442
446
|
raise NotImplementedError()
|
|
443
447
|
|
|
444
448
|
def _check_forbidden_sections(self, sections:str, err_header:str):
|
|
@@ -463,13 +467,13 @@ class IdeSectionsManager(IdeManagerMacroArguments):
|
|
|
463
467
|
return msg
|
|
464
468
|
|
|
465
469
|
|
|
466
|
-
def _validation_outcome(self, msg:Optional[str]):
|
|
470
|
+
def _validation_outcome(self, msg:Optional[str], exception_class=PmtMacrosError):
|
|
467
471
|
"""
|
|
468
|
-
Routine that can be called from the
|
|
472
|
+
Routine that can be called from the _validate_config implementation, raising if given
|
|
469
473
|
an error message as argument.
|
|
470
474
|
"""
|
|
471
475
|
if msg:
|
|
472
|
-
raise
|
|
476
|
+
raise exception_class(f'{ msg }\n{self.env.log()}')
|
|
473
477
|
|
|
474
478
|
|
|
475
479
|
def iter_over_sections_and_data(self, *, with_corr=True, with_rems=True, with_paths=False):
|
|
@@ -543,6 +547,13 @@ class IdeManagerMdHtmlGenerator(IdeSectionsManager):
|
|
|
543
547
|
self.editor_name = self.generate_id()
|
|
544
548
|
|
|
545
549
|
|
|
550
|
+
def _get_runner_html_class(self, base_class:str):
|
|
551
|
+
"""
|
|
552
|
+
Build the html class string to use for the top level element of the runner, merging any
|
|
553
|
+
additional class passed through the `extra_class` macro argument.
|
|
554
|
+
"""
|
|
555
|
+
return f"{ base_class } { self.extra_class or '' }".rstrip()
|
|
556
|
+
|
|
546
557
|
|
|
547
558
|
def make_element(self) -> str:
|
|
548
559
|
"""
|
|
@@ -984,9 +995,9 @@ class IdeManagerExporter(IdeManagerMdHtmlGenerator, metaclass=ABCMeta):
|
|
|
984
995
|
"""
|
|
985
996
|
Build sequential runs related data.
|
|
986
997
|
|
|
987
|
-
The overall "state" of the runner, considering sequential runs,
|
|
998
|
+
The overall "state" of the runner, considering sequential runs, is determined here:
|
|
988
999
|
- Check the RUN_GROUP argument validity
|
|
989
|
-
- what is its group ID (RUN_GROUP cleaned up)
|
|
1000
|
+
- what is its group ID (RUN_GROUP, cleaned up)
|
|
990
1001
|
- is it in a sequential run group or not ?
|
|
991
1002
|
- does it have priority or not ?
|
|
992
1003
|
|
|
@@ -994,7 +1005,7 @@ class IdeManagerExporter(IdeManagerMdHtmlGenerator, metaclass=ABCMeta):
|
|
|
994
1005
|
self.env.current_page_config.get_run_group_data(...) -> [int, int]
|
|
995
1006
|
"""
|
|
996
1007
|
group_id = self.run_group and self.run_group.strip('*')
|
|
997
|
-
is_skip = group_id == RUN_GROUP_SKIP
|
|
1008
|
+
is_skip = group_id == PmtCte.RUN_GROUP_SKIP
|
|
998
1009
|
has_priority = group_id and (self.run_group.startswith('*') or self.run_group.endswith('*'))
|
|
999
1010
|
|
|
1000
1011
|
if isinstance(group_id, str) and is_skip and has_priority:
|
|
@@ -1028,7 +1039,7 @@ class IdeManagerExporter(IdeManagerMdHtmlGenerator, metaclass=ABCMeta):
|
|
|
1028
1039
|
Compute all code exclusions and white list of imports
|
|
1029
1040
|
"""
|
|
1030
1041
|
|
|
1031
|
-
non_kws, kws, *_ = self.excluded.split(KEYWORDS_SEPARATOR) + ['']
|
|
1042
|
+
non_kws, kws, *_ = self.excluded.split(PmtCte.KEYWORDS_SEPARATOR) + ['']
|
|
1032
1043
|
# print((non_kws, kws))
|
|
1033
1044
|
|
|
1034
1045
|
all_excluded = self._exclusion_string_to_list(string_prop=non_kws)
|
|
@@ -1045,8 +1056,8 @@ class IdeManagerExporter(IdeManagerMdHtmlGenerator, metaclass=ABCMeta):
|
|
|
1045
1056
|
]
|
|
1046
1057
|
# print(*exclusions,sep='\n')
|
|
1047
1058
|
|
|
1048
|
-
if excluded_kws and any(kw for kw in excluded_kws if kw not in PYTHON_KEYWORDS):
|
|
1049
|
-
wrongs=', '.join(sorted(repr(kw) for kw in excluded_kws if kw not in PYTHON_KEYWORDS))
|
|
1059
|
+
if excluded_kws and any(kw for kw in excluded_kws if kw not in PmtCte.PYTHON_KEYWORDS):
|
|
1060
|
+
wrongs=', '.join(sorted(repr(kw) for kw in excluded_kws if kw not in PmtCte.PYTHON_KEYWORDS))
|
|
1050
1061
|
raise PmtMacrosInvalidArgumentError(
|
|
1051
1062
|
f"Invalid python keywords for the `SANS` argument: { wrongs }.{ self.env.log() }"
|
|
1052
1063
|
)
|
|
@@ -149,11 +149,15 @@ normaux, que ce soit pour les tests publics ou les validations.
|
|
|
149
149
|
|
|
150
150
|
<br>
|
|
151
151
|
|
|
152
|
-
___Redirection d'urls :___
|
|
152
|
+
^^___Redirection d'urls :___^^
|
|
153
153
|
|
|
154
|
-
Si vous voulez utiliser des urls relatives à la localisation du fichier markdown d'origine
|
|
155
|
-
python, vous pouvez renseigner ci-dessous le chemin relatif vers le dossier cible,
|
|
156
|
-
du site / du `docs_dir`___.
|
|
154
|
+
Si vous voulez utiliser des urls relatives à la localisation du fichier markdown d'origine
|
|
155
|
+
des codes python, vous pouvez renseigner ci-dessous le chemin relatif vers le dossier cible,
|
|
156
|
+
___depuis la racine du site / du `docs_dir`___.
|
|
157
|
+
<br>Si aucune redirection n'est renseignée, les urls relatives sont traitées normalement, en
|
|
158
|
+
partant du dossier en cours.
|
|
159
|
+
|
|
160
|
+
^^_Dossier cible de la redirection :_^^
|
|
157
161
|
|
|
158
162
|
<input type="text" id="playground-url" placeholder="dossier-dans-docs_dir/sous-dossier/dossier-contenant-le-md">
|
|
159
163
|
|
|
@@ -65,7 +65,7 @@ class PyBtn(IdeManager):
|
|
|
65
65
|
tip_width: int = 0
|
|
66
66
|
|
|
67
67
|
|
|
68
|
-
def
|
|
68
|
+
def _validate_config(self):
|
|
69
69
|
self._check_forbidden_sections(
|
|
70
70
|
"env_term code corr tests secrets post_term REM VIS_REM",
|
|
71
71
|
f"Only the `env` and `post` sections should be used, for { self.MACRO_NAME } macros"
|
|
@@ -88,7 +88,7 @@ class PyBtn(IdeManager):
|
|
|
88
88
|
wrapper = getattr(Html, self.wrapper)(
|
|
89
89
|
button_html,
|
|
90
90
|
id = self.editor_name,
|
|
91
|
-
kls = HtmlClass.py_mk_py_btn,
|
|
91
|
+
kls = self._get_runner_html_class(HtmlClass.py_mk_py_btn),
|
|
92
92
|
markdown = 1, # in case material icon reference is used
|
|
93
93
|
)
|
|
94
94
|
return wrapper
|
|
@@ -26,7 +26,8 @@ from dataclasses import dataclass
|
|
|
26
26
|
from pyodide_mkdocs_theme.pyodide_macros.html_dependencies.deps_class import DepKind
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
from ..
|
|
29
|
+
from ..exceptions import PmtMacrosInvalidArgumentError
|
|
30
|
+
from ..tools_and_constants import PmtCte, PmtPyMacrosName, Prefix
|
|
30
31
|
from .ide_py_btn import PyBtn
|
|
31
32
|
|
|
32
33
|
|
|
@@ -47,10 +48,20 @@ class AutoRun(PyBtn):
|
|
|
47
48
|
|
|
48
49
|
DEPS_KIND: ClassVar[DepKind] = DepKind.run_macro
|
|
49
50
|
|
|
51
|
+
def _validate_config(self):
|
|
52
|
+
super()._validate_config()
|
|
53
|
+
|
|
54
|
+
if self.run_group not in (None, PmtCte.RUN_GROUP_SKIP):
|
|
55
|
+
self._validation_outcome(
|
|
56
|
+
f"The RUN_GROUP argument of `run` macros can only be in {(None, PmtCte.RUN_GROUP_SKIP)}",
|
|
57
|
+
exception_class=PmtMacrosInvalidArgumentError
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
50
61
|
def make_element(self) -> str:
|
|
51
62
|
"""
|
|
52
63
|
{{ run(...) }} elements cannot be inserted in the markdown content now, otherwise they
|
|
53
64
|
will break the md rendering, adding new lines/paragraphs around the empty span. So the
|
|
54
|
-
html code is actually inserted through the plugin's on_page_context
|
|
65
|
+
html code is actually inserted through the plugin's MaestroMacro.on_page_context event.
|
|
55
66
|
"""
|
|
56
67
|
return ""
|
|
@@ -64,7 +64,7 @@ class Terminal(CommonTermIde):
|
|
|
64
64
|
super().handle_extra_args()
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
def
|
|
67
|
+
def _validate_config(self):
|
|
68
68
|
self._check_forbidden_sections(
|
|
69
69
|
"code corr tests secrets REM VIS_REM",
|
|
70
70
|
"No data should be provided in these sections"
|
|
@@ -83,7 +83,7 @@ class Terminal(CommonTermIde):
|
|
|
83
83
|
"""
|
|
84
84
|
terminal_div = self.make_terminal(
|
|
85
85
|
self.editor_name,
|
|
86
|
-
kls = f'{HtmlClass.py_mk_wrapper} {HtmlClass.term_solo}',
|
|
86
|
+
kls = self._get_runner_html_class(f'{HtmlClass.py_mk_wrapper} {HtmlClass.term_solo}'),
|
|
87
87
|
n_lines_h = self.term_height,
|
|
88
88
|
)
|
|
89
89
|
return terminal_div
|
|
@@ -27,7 +27,7 @@ from typing import Any, Tuple, TYPE_CHECKING, Type
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
from ..tools_and_constants import
|
|
30
|
+
from ..tools_and_constants import PmtCte, ScriptData
|
|
31
31
|
from ..parsing import build_code_fence
|
|
32
32
|
from ..plugin.maestro_macros import MaestroMacros
|
|
33
33
|
from ..files_extractors.concrete_extractors import FileExtractor, PythonExtractor, SqlExtractor
|
|
@@ -81,7 +81,7 @@ def section(env:MaestroMacros):
|
|
|
81
81
|
* This macro DOES NOT WORK with content built from different python files. Use the
|
|
82
82
|
`composed_py` macro for this purpose.
|
|
83
83
|
"""
|
|
84
|
-
MACROS_WITH_INDENTS.add('section')
|
|
84
|
+
PmtCte.MACROS_WITH_INDENTS.add('section')
|
|
85
85
|
|
|
86
86
|
@wraps(section)
|
|
87
87
|
def _section(
|
|
@@ -113,7 +113,7 @@ def section(env:MaestroMacros):
|
|
|
113
113
|
|
|
114
114
|
def composition_factory(env:MaestroMacros, func, ExtractorClass:Type[FileExtractor], lang:str):
|
|
115
115
|
|
|
116
|
-
MACROS_WITH_INDENTS.add(func.__name__)
|
|
116
|
+
PmtCte.MACROS_WITH_INDENTS.add(func.__name__)
|
|
117
117
|
|
|
118
118
|
@wraps(func)
|
|
119
119
|
def _composed(
|
|
@@ -173,13 +173,13 @@ def py(env:MaestroMacros):
|
|
|
173
173
|
Macro python rapide, pour insérer le contenu d'un fichier python. Les parties HDR sont
|
|
174
174
|
automatiquement supprimées, de même que les tests publics (cf. Pyodide-Mkdocs).
|
|
175
175
|
Pour tout autre fichier python, tout le contenu est inséré automatiquement (notamment,
|
|
176
|
-
pour les fichiers du thème !).
|
|
176
|
+
pour les fichiers du thème, donc les sections env sont visibles !).
|
|
177
177
|
|
|
178
178
|
Si l'argument @stop est fourni, ce doit être une chaîne de caractères compatible avec
|
|
179
179
|
`re.split`, SANS matching groupes. Tout contenu après ce token sera ignoré (token compris)
|
|
180
180
|
et "strippé".
|
|
181
181
|
"""
|
|
182
|
-
MACROS_WITH_INDENTS.add('py')
|
|
182
|
+
PmtCte.MACROS_WITH_INDENTS.add('py')
|
|
183
183
|
|
|
184
184
|
@wraps(py)
|
|
185
185
|
def wrapped(
|
|
@@ -28,7 +28,7 @@ from typing import Any, Dict, List, Tuple
|
|
|
28
28
|
from ..exceptions import PmtMacrosInvalidArgumentError
|
|
29
29
|
from ..parsing import add_indent
|
|
30
30
|
from ..pyodide_logger import logger
|
|
31
|
-
from ..tools_and_constants import
|
|
31
|
+
from ..tools_and_constants import PmtCte, HtmlClass, PmtCte
|
|
32
32
|
from ..html_dependencies.deps_class import DepKind
|
|
33
33
|
from ..plugin.maestro_macros import MaestroMacros
|
|
34
34
|
|
|
@@ -61,7 +61,7 @@ def multi_qcm(env:MaestroMacros):
|
|
|
61
61
|
@DEBUG=False: If True, md output will be printed to the console
|
|
62
62
|
"""
|
|
63
63
|
|
|
64
|
-
MACROS_WITH_INDENTS.add('multi_qcm')
|
|
64
|
+
PmtCte.MACROS_WITH_INDENTS.add('multi_qcm')
|
|
65
65
|
|
|
66
66
|
@wraps(multi_qcm)
|
|
67
67
|
def wrapped(
|
|
@@ -175,7 +175,7 @@ def multi_qcm(env:MaestroMacros):
|
|
|
175
175
|
encrypt_token = ()
|
|
176
176
|
if env.encrypt_comments:
|
|
177
177
|
env.set_current_page_insertion_needs(DepKind.qcm_encrypt)
|
|
178
|
-
encrypt_token = ( indent_comment(
|
|
178
|
+
encrypt_token = ( indent_comment(PmtCte.encryption_token)+"\n", )
|
|
179
179
|
|
|
180
180
|
classes = ' '.join((
|
|
181
181
|
HtmlClass.py_mk_hidden,
|
|
@@ -266,7 +266,7 @@ def multi_qcm(env:MaestroMacros):
|
|
|
266
266
|
'admo_class': admo_class,
|
|
267
267
|
'qcm_title': qcm_title,
|
|
268
268
|
'tag_list_of_qs': tag_list_of_qs,
|
|
269
|
-
"reveal_rems":
|
|
269
|
+
"reveal_rems": env.qcms_reveal_rems,
|
|
270
270
|
'DEBUG': DEBUG,
|
|
271
271
|
}
|
|
272
272
|
|