From 83038d654ca5910c2a8f1e811e34f99b5a8fd6d4 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Tue, 27 Dec 2022 17:37:58 -0600 Subject: [PATCH 001/200] Massive undergoing for command integration and the global invocation. --- python/origen/origen/__init__.py | 49 +- python/origen/origen/application.py | 43 +- python/origen/origen/boot.py | 585 ++++--- python/origen/origen/core/plugins.py | 67 + python/origen/origen/helpers/__init__.py | 4 +- python/origen/origen/helpers/env.py | 54 + .../origen/helpers/regressions/__init__.py | 0 .../helpers/regressions/cli/__init__.py | 57 + .../origen/helpers/regressions/cli/command.py | 233 +++ .../helpers/regressions/cli/help_msg.py | 367 +++++ .../origen/helpers/regressions/cli/origen.py | 156 ++ .../origen_metal/_helpers/__init__.py | 25 + .../framework/users/in_new_proc_funcs.py | 8 + .../tests/framework/users/test_users.py | 310 +++- python/origen_metal/tests/utils/test_ldap.py | 46 +- rust/origen/Cargo.lock | 50 +- rust/origen/cli/Cargo.toml | 2 +- rust/origen/cli/src/app_commands.rs | 201 --- rust/origen/cli/src/bin.rs | 1133 +++++++------- .../src/commands/_prelude/clap_arg_actions.rs | 4 + rust/origen/cli/src/commands/_prelude/mod.rs | 15 + rust/origen/cli/src/commands/app.rs | 192 ++- rust/origen/cli/src/commands/aux_cmds.rs | 38 + rust/origen/cli/src/commands/build.rs | 56 +- rust/origen/cli/src/commands/credentials.rs | 54 + rust/origen/cli/src/commands/env.rs | 2 +- rust/origen/cli/src/commands/eval.rs | 28 + rust/origen/cli/src/commands/interactive.rs | 51 +- rust/origen/cli/src/commands/mod.rs | 324 +++- rust/origen/cli/src/commands/new/mod.rs | 6 +- .../cli/src/commands/new/new_resource.rs | 6 +- rust/origen/cli/src/commands/proj/mod.rs | 24 +- rust/origen/cli/src/commands/save_ref.rs | 6 +- rust/origen/cli/src/framework/app_cmds.rs | 144 ++ rust/origen/cli/src/framework/aux_cmds.rs | 335 ++++ rust/origen/cli/src/framework/core_cmds.rs | 104 ++ rust/origen/cli/src/framework/extensions.rs | 369 +++++ rust/origen/cli/src/framework/helps.rs | 202 +++ rust/origen/cli/src/framework/mod.rs | 636 ++++++++ rust/origen/cli/src/framework/plugins.rs | 614 ++++++++ rust/origen/cli/src/python.rs | 15 +- rust/origen/src/core/application/config.rs | 43 +- rust/origen/src/core/config.rs | 182 ++- rust/origen/src/core/status.rs | 70 +- rust/origen/src/lib.rs | 19 +- rust/origen_metal/src/error.rs | 6 + rust/origen_metal/src/framework/logger.rs | 18 +- .../framework/users/password_cache_options.rs | 45 +- rust/origen_metal/src/framework/users/user.rs | 148 +- .../origen_metal/src/framework/users/users.rs | 20 +- rust/origen_metal/src/frontend/mod.rs | 5 + rust/origen_metal/src/lib.rs | 2 + rust/pyapi/src/lib.rs | 484 +++++- rust/pyapi/src/plugins.rs | 192 +++ rust/pyapi_metal/src/framework/logger.rs | 97 ++ rust/pyapi_metal/src/framework/users.rs | 91 +- rust/pyapi_metal/src/frontend/_frontend.rs | 41 + rust/pyapi_metal/src/frontend/mod.rs | 4 + test_apps/pl_ext_cmds/.gitignore | 6 + test_apps/pl_ext_cmds/config/application.toml | 1 + test_apps/pl_ext_cmds/config/commands.toml | 0 test_apps/pl_ext_cmds/config/origen.toml | 14 + .../pl_ext_cmds/pl_ext_cmds/application.py | 6 + .../pl_ext_cmds/pl_ext_cmds/commands.toml | 6 + .../commands/extensions/core/eval.py | 14 + .../pl_ext_cmds/pl_ext_cmds/dut/attributes.py | 0 .../pl_ext_cmds/pl_ext_cmds/dut/controller.py | 18 + .../dut/derivatives/demo/attributes.py | 0 .../dut/derivatives/demo/controller.py | 16 + .../dut/derivatives/demo/levels.py | 0 .../pl_ext_cmds/dut/derivatives/demo/pins.py | 0 .../dut/derivatives/demo/registers.py | 33 + .../dut/derivatives/demo/services.py | 0 .../dut/derivatives/demo/sub_blocks.py | 0 .../dut/derivatives/demo/timing.py | 0 .../pl_ext_cmds/pl_ext_cmds/dut/levels.py | 0 test_apps/pl_ext_cmds/pl_ext_cmds/dut/pins.py | 0 .../pl_ext_cmds/pl_ext_cmds/dut/registers.py | 32 + .../pl_ext_cmds/pl_ext_cmds/dut/services.py | 0 .../pl_ext_cmds/pl_ext_cmds/dut/sub_blocks.py | 0 .../pl_ext_cmds/pl_ext_cmds/dut/timing.py | 0 .../pl_ext_cmds/pl_ext_cmds/flows/.gitkeep | 0 .../pl_ext_cmds/interface/interface.py | 5 + .../pl_ext_cmds/origen.plugin.toml | 0 .../pl_ext_cmds/pl_ext_cmds/patterns/.gitkeep | 0 .../pl_ext_cmds/templates/.gitkeep | 0 test_apps/pl_ext_cmds/poetry.lock | 1358 +++++++++++++++++ test_apps/pl_ext_cmds/pyproject.toml | 17 + test_apps/pl_ext_cmds/setup.cfg | 2 + test_apps/pl_ext_cmds/targets/dut/demo.py | 1 + test_apps/pl_ext_cmds/targets/tester/smt7.py | 1 + test_apps/pl_ext_cmds/targets/tester/smt8.py | 1 + test_apps/pl_ext_cmds/targets/tester/uflex.py | 1 + test_apps/pl_ext_cmds/tests/README.md | 16 + test_apps/pl_ext_cmds/tests/example_test.py | 6 + .../pl_ext_cmds/tests/shared/__init__.py | 5 + test_apps/pl_ext_cmds/vendor/.gitkeep | 0 test_apps/pl_ext_cmds/web/Makefile | 20 + test_apps/pl_ext_cmds/web/make.bat | 35 + .../pl_ext_cmds/web/source/_static/.gitkeep | 0 test_apps/pl_ext_cmds/web/source/conf.py | 76 + test_apps/pl_ext_cmds/web/source/index.rst | 22 + test_apps/python_app/config/commands.toml | 42 +- test_apps/python_app/config/origen.toml | 17 +- .../config/test_case_cmds/commands.toml | 7 + .../config/test_case_cmds/invalid.toml | 5 + .../example/commands/arg_opt_warmup.py | 1 + .../python_app/example/commands/examples.py | 2 + test_apps/python_app/poetry.lock | 635 +++++--- test_apps/python_app/pyproject.toml | 1 + .../python_app/tests/_shared/for_proc.py | 16 +- .../python_app/tests/cli/cmd_testers.toml | 242 +++ test_apps/python_app/tests/cli_test.py | 193 ++- test_apps/python_app/tests/conftest.py | 2 + .../origen_utilities/configs/ldap/__init__.py | 2 +- .../configs/ldap/test_bad_ldap_config.toml | 4 +- .../ldap/test_fully_configured_ldap.toml | 4 +- .../configs/ldap/test_multiple_ldaps.toml | 4 +- .../configs/ldap/test_simple_ldap.toml | 4 +- .../test_error_adding_default_users.toml | 8 +- .../users/test_autopopulated_user.toml | 8 +- .../users/test_loading_default_users.toml | 12 +- .../tests/origen_utilities/test_users.py | 2 +- test_apps/python_app/tests/shared/__init__.py | 11 +- test_apps/python_no_app/commands.toml | 0 test_apps/python_no_app/origen.toml | 91 ++ test_apps/python_no_app/poetry.lock | 1259 +++++++-------- test_apps/python_no_app/pyproject.toml | 16 +- test_apps/python_no_app/tests/__init__.py | 37 + test_apps/python_no_app/tests/cli/__init__.py | 0 test_apps/python_no_app/tests/cli/shared.py | 10 + .../tests/cli/tests__cmd__credentials.py | 151 ++ .../tests/cli/tests__global_cmds.py | 47 + .../tests/cmd_building/__init__.py | 0 .../tests/cmd_building/cmd_testers.toml | 341 +++++ .../cmd_building/cmd_testers/__init__.py | 0 .../error_cases/test_exception_in_run.py | 2 + .../error_cases/test_missing_run_function.py | 1 + .../cmd_building/cmd_testers/nested_common.py | 2 + .../cmd_testers/python_no_app_tests.py | 2 + .../cmd_testers/test_arguments/__init__.py | 16 + .../test_arguments/args_with_value_names.py | 4 + .../test_arguments/delim_multi_arg.py | 4 + .../test_arguments/display_verbosity_opts.py | 6 + .../cmd_testers/test_arguments/flag_opts.py | 4 + .../cmd_testers/test_arguments/hidden_opt.py | 4 + .../cmd_testers/test_arguments/multi_arg.py | 4 + .../cmd_testers/test_arguments/multi_opts.py | 4 + .../test_arguments/no_args_or_opts.py | 4 + .../test_arguments/optional_arg.py | 4 + .../test_arguments/opts_with_aliases.py | 4 + .../test_arguments/opts_with_value_names.py | 4 + .../test_arguments/required_arg.py | 4 + .../test_arguments/single_and_multi_arg.py | 4 + .../single_value_optional_opt.py | 4 + .../single_value_required_opt.py | 4 + .../cmd_testers/test_current_command.py | 9 + .../cmd_testers/test_nested_level_1.py | 7 + ...st_nested_level_2.test_nested_level_3_b.py | 6 + .../test_nested_level_2.py | 6 + .../test_nested_level_3_a.py | 6 + .../tests/cmd_building/shared.py | 159 ++ .../cmd_building/tests__arg_buildling.py | 270 ++++ .../cmd_building/tests__loading_aux_cmds.py | 212 +++ .../tests__loading_plugin_cmds.py | 202 +++ .../tests/cmd_building/tests__opt_building.py | 785 ++++++++++ .../cmd_building/tests__standard_opts.py | 46 + .../tests/cmd_extensions/__init__.py | 1 + .../python_no_app/tests/configs/__init__.py | 54 + .../tests/configs/aux_cmds/add_aux_cmd.toml | 3 + .../configs/aux_cmds/add_aux_cmd_config.toml | 2 + .../conflicting_namespaces_config.toml | 2 + .../aux_cmds/invalid_aux_cmd_path_config.toml | 7 + .../tests/configs/dummy_config.toml | 2 + .../tests/configs/dummy_dir/origen.toml | 0 .../python_no_app/tests/configs/empty.toml | 0 .../configs/python_plugin_and_2nd_only.toml | 6 + .../configs/suppress_plugin_collecting.toml | 2 + .../dummy_aux_cmds/aux_cmds_from_cli_dir.toml | 5 + .../aux_cmds_from_cli_dir/cli_dir_says_hi.py | 2 + .../tests/dummy_aux_cmds/dummy_aux_cmds.toml | 7 + .../dummy_aux_cmds/dummy_aux_cmds/say_hi.py | 2 + .../dummy_aux_cmds/dummy_aux_cmds_2nd.toml | 23 + test_apps/python_no_app/tests/misc_test.py | 750 ++++++++- test_apps/python_no_app/tests/test_cli.py | 13 + .../python_no_app/tests/test_cmd_building.py | 21 + test_apps/python_no_app/tests/test_configs.py | 130 ++ .../tests/test_global_invocation.py | 18 + .../tests/test_plugin_loading.py | 93 ++ test_apps/python_plugin/poetry.lock | 767 +++++----- .../python_plugin/python_plugin/commands.toml | 185 +++ .../python_plugin/commands/echo.py | 5 + .../extensions/aux_ns.dummy_cmds.dummy_cmd.py | 14 + .../aux_ns.dummy_cmds.dummy_cmd.subc.py | 14 + .../commands/extensions/core.eval.py | 11 + .../python_plugin/commands/plugin_says_hi.py | 6 + .../commands/plugin_test_args.py | 1 + .../commands/plugin_test_args.subc.py | 1 + .../commands/plugin_test_ext_stacking.py | 1 + .../commands/plugin_test_ext_stacking.subc.py | 1 + .../python_plugin/origen.plugin.toml | 0 test_apps/python_plugin_no_cmds/.gitignore | 6 + .../config/application.toml | 1 + .../config/commands.toml | 0 .../python_plugin_no_cmds/config/origen.toml | 14 + test_apps/python_plugin_no_cmds/poetry.lock | 1358 +++++++++++++++++ .../python_plugin_no_cmds/pyproject.toml | 17 + .../python_plugin_no_cmds/application.py | 6 + .../python_plugin_no_cmds/commands.toml | 0 .../python_plugin_no_cmds/dut/attributes.py | 0 .../python_plugin_no_cmds/dut/controller.py | 18 + .../dut/derivatives/pigeon/attributes.py | 0 .../dut/derivatives/pigeon/controller.py | 16 + .../dut/derivatives/pigeon/levels.py | 0 .../dut/derivatives/pigeon/pins.py | 0 .../dut/derivatives/pigeon/registers.py | 33 + .../dut/derivatives/pigeon/services.py | 0 .../dut/derivatives/pigeon/sub_blocks.py | 0 .../dut/derivatives/pigeon/timing.py | 0 .../python_plugin_no_cmds/dut/levels.py | 0 .../python_plugin_no_cmds/dut/pins.py | 0 .../python_plugin_no_cmds/dut/registers.py | 32 + .../python_plugin_no_cmds/dut/services.py | 0 .../python_plugin_no_cmds/dut/sub_blocks.py | 0 .../python_plugin_no_cmds/dut/timing.py | 0 .../python_plugin_no_cmds/flows/.gitkeep | 0 .../interface/interface.py | 5 + .../python_plugin_no_cmds/origen.plugin.toml | 0 .../python_plugin_no_cmds/patterns/.gitkeep | 0 .../python_plugin_no_cmds/templates/.gitkeep | 0 test_apps/python_plugin_no_cmds/setup.cfg | 2 + .../targets/dut/pigeon.py | 1 + .../targets/tester/smt7.py | 1 + .../targets/tester/smt8.py | 1 + .../targets/tester/uflex.py | 1 + .../python_plugin_no_cmds/tests/README.md | 16 + .../tests/example_test.py | 6 + .../tests/shared/__init__.py | 5 + .../python_plugin_no_cmds/vendor/.gitkeep | 0 test_apps/python_plugin_no_cmds/web/Makefile | 20 + test_apps/python_plugin_no_cmds/web/make.bat | 35 + .../web/source/_static/.gitkeep | 0 .../python_plugin_no_cmds/web/source/conf.py | 76 + .../web/source/index.rst | 22 + test_apps/python_plugin_the_second/.gitignore | 6 + .../config/application.toml | 5 + .../config/commands.toml | 0 .../config/origen.toml | 14 + .../python_plugin_the_second/poetry.lock | 1358 +++++++++++++++++ .../python_plugin_the_second/pyproject.toml | 17 + .../python_plugin_the_second/application.py | 6 + .../python_plugin_the_second/commands.toml | 49 + .../extensions/aux_ns.dummy_cmds.dummy_cmd.py | 14 + .../aux_ns/dummy_cmds/dummy_cmd/subc.py | 14 + ....python_plugin.plugin_test_ext_stacking.py | 14 + ...on_plugin.plugin_test_ext_stacking.subc.py | 14 + .../dut/attributes.py | 0 .../dut/controller.py | 18 + .../dut/derivatives/quail/attributes.py | 0 .../dut/derivatives/quail/controller.py | 16 + .../dut/derivatives/quail/levels.py | 0 .../dut/derivatives/quail/pins.py | 0 .../dut/derivatives/quail/registers.py | 33 + .../dut/derivatives/quail/services.py | 0 .../dut/derivatives/quail/sub_blocks.py | 0 .../dut/derivatives/quail/timing.py | 0 .../python_plugin_the_second/dut/levels.py | 0 .../python_plugin_the_second/dut/pins.py | 0 .../python_plugin_the_second/dut/registers.py | 32 + .../python_plugin_the_second/dut/services.py | 0 .../dut/sub_blocks.py | 0 .../python_plugin_the_second/dut/timing.py | 0 .../python_plugin_the_second/flows/.gitkeep | 0 .../interface/interface.py | 5 + .../origen.plugin.toml | 0 .../patterns/.gitkeep | 0 .../templates/.gitkeep | 0 test_apps/python_plugin_the_second/setup.cfg | 2 + .../targets/dut/quail.py | 1 + .../targets/tester/smt7.py | 1 + .../targets/tester/smt8.py | 1 + .../targets/tester/uflex.py | 1 + .../python_plugin_the_second/tests/README.md | 16 + .../tests/example_test.py | 6 + .../tests/shared/__init__.py | 5 + .../python_plugin_the_second/vendor/.gitkeep | 0 .../python_plugin_the_second/web/Makefile | 20 + .../python_plugin_the_second/web/make.bat | 35 + .../web/source/_static/.gitkeep | 0 .../web/source/conf.py | 76 + .../web/source/index.rst | 22 + .../test_apps_shared_test_helpers/.gitignore | 6 + .../config/application.toml | 1 + .../config/commands.toml | 0 .../config/origen.toml | 14 + .../test_apps_shared_test_helpers/poetry.lock | 1358 +++++++++++++++++ .../pyproject.toml | 17 + .../test_apps_shared_test_helpers/setup.cfg | 2 + .../targets/dut/.keep | 0 .../targets/tester/smt7.py | 1 + .../targets/tester/smt8.py | 1 + .../targets/tester/uflex.py | 1 + .../application.py | 6 + .../aux_cmds/__init__.py | 6 + .../aux_cmds/core_cmd_exts.toml | 14 + .../aux_cmds/core_cmd_exts/core/eval.py | 6 + .../aux_cmds/core_cmd_exts_cfg.toml | 8 + .../aux_cmds/dummy_cmds.toml | 21 + .../aux_cmds/dummy_cmds/dummy_cmd.py | 1 + .../aux_cmds/dummy_cmds/dummy_cmd/subc.py | 1 + .../aux_cmds/dummy_cmds_cfg.toml | 2 + .../aux_cmds/exts_workout.py | 103 ++ .../aux_cmds/exts_workout.toml | 109 ++ .../aux_ns/dummy_cmds/dummy_cmd.py | 6 + .../aux_ns/dummy_cmds/dummy_cmd.subc.py | 6 + .../plugin/python_plugin/plugin_test_args.py | 6 + .../python_plugin/plugin_test_ext_stacking.py | 75 + .../plugin_test_ext_stacking/subc.py | 16 + .../aux_cmds/exts_workout_cfg.toml | 2 + .../aux_cmds/pl_ext_stacking_from_aux.toml | 47 + .../aux_ns.dummy_cmds.dummy_cmd.py | 14 + .../aux_ns.dummy_cmds.dummy_cmd.subc.py | 14 + ....python_plugin.plugin_test_ext_stacking.py | 14 + ...on_plugin.plugin_test_ext_stacking.subc.py | 14 + .../pl_ext_stacking_from_aux_cfg.toml | 2 + .../cli/__init__.py | 1230 +++++++++++++++ .../cli/ext_helpers.py | 92 ++ .../commands.toml | 25 + .../test_apps_shared_test_helpers/dut/.keep | 0 .../flows/.gitkeep | 0 .../interface/interface.py | 5 + .../origen.plugin.toml | 0 .../patterns/.gitkeep | 0 .../templates/.gitkeep | 0 .../tests/README.md | 16 + .../tests/example_test.py | 6 + .../tests/shared/__init__.py | 5 + .../vendor/.gitkeep | 0 .../web/Makefile | 20 + .../web/make.bat | 35 + .../web/source/_static/.gitkeep | 0 .../web/source/conf.py | 76 + .../web/source/index.rst | 22 + 343 files changed, 21350 insertions(+), 2479 deletions(-) create mode 100644 python/origen/origen/core/plugins.py create mode 100644 python/origen/origen/helpers/env.py create mode 100644 python/origen/origen/helpers/regressions/__init__.py create mode 100644 python/origen/origen/helpers/regressions/cli/__init__.py create mode 100644 python/origen/origen/helpers/regressions/cli/command.py create mode 100644 python/origen/origen/helpers/regressions/cli/help_msg.py create mode 100644 python/origen/origen/helpers/regressions/cli/origen.py create mode 100644 python/origen_metal/tests/framework/users/in_new_proc_funcs.py delete mode 100644 rust/origen/cli/src/app_commands.rs create mode 100644 rust/origen/cli/src/commands/_prelude/clap_arg_actions.rs create mode 100644 rust/origen/cli/src/commands/_prelude/mod.rs create mode 100644 rust/origen/cli/src/commands/aux_cmds.rs create mode 100644 rust/origen/cli/src/commands/credentials.rs create mode 100644 rust/origen/cli/src/commands/eval.rs create mode 100644 rust/origen/cli/src/framework/app_cmds.rs create mode 100644 rust/origen/cli/src/framework/aux_cmds.rs create mode 100644 rust/origen/cli/src/framework/core_cmds.rs create mode 100644 rust/origen/cli/src/framework/extensions.rs create mode 100644 rust/origen/cli/src/framework/helps.rs create mode 100644 rust/origen/cli/src/framework/mod.rs create mode 100644 rust/origen/cli/src/framework/plugins.rs create mode 100644 rust/pyapi/src/plugins.rs create mode 100644 test_apps/pl_ext_cmds/.gitignore create mode 100644 test_apps/pl_ext_cmds/config/application.toml create mode 100644 test_apps/pl_ext_cmds/config/commands.toml create mode 100644 test_apps/pl_ext_cmds/config/origen.toml create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/application.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/commands.toml create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/commands/extensions/core/eval.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/attributes.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/controller.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/attributes.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/controller.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/levels.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/pins.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/registers.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/services.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/sub_blocks.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/timing.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/levels.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/pins.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/registers.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/services.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/sub_blocks.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/dut/timing.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/flows/.gitkeep create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/interface/interface.py create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/origen.plugin.toml create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/patterns/.gitkeep create mode 100644 test_apps/pl_ext_cmds/pl_ext_cmds/templates/.gitkeep create mode 100644 test_apps/pl_ext_cmds/poetry.lock create mode 100644 test_apps/pl_ext_cmds/pyproject.toml create mode 100644 test_apps/pl_ext_cmds/setup.cfg create mode 100644 test_apps/pl_ext_cmds/targets/dut/demo.py create mode 100644 test_apps/pl_ext_cmds/targets/tester/smt7.py create mode 100644 test_apps/pl_ext_cmds/targets/tester/smt8.py create mode 100644 test_apps/pl_ext_cmds/targets/tester/uflex.py create mode 100644 test_apps/pl_ext_cmds/tests/README.md create mode 100644 test_apps/pl_ext_cmds/tests/example_test.py create mode 100644 test_apps/pl_ext_cmds/tests/shared/__init__.py create mode 100644 test_apps/pl_ext_cmds/vendor/.gitkeep create mode 100644 test_apps/pl_ext_cmds/web/Makefile create mode 100644 test_apps/pl_ext_cmds/web/make.bat create mode 100644 test_apps/pl_ext_cmds/web/source/_static/.gitkeep create mode 100644 test_apps/pl_ext_cmds/web/source/conf.py create mode 100644 test_apps/pl_ext_cmds/web/source/index.rst create mode 100644 test_apps/python_app/config/test_case_cmds/commands.toml create mode 100644 test_apps/python_app/config/test_case_cmds/invalid.toml create mode 100644 test_apps/python_app/example/commands/arg_opt_warmup.py create mode 100644 test_apps/python_app/tests/cli/cmd_testers.toml create mode 100644 test_apps/python_no_app/commands.toml create mode 100644 test_apps/python_no_app/origen.toml create mode 100644 test_apps/python_no_app/tests/__init__.py create mode 100644 test_apps/python_no_app/tests/cli/__init__.py create mode 100644 test_apps/python_no_app/tests/cli/shared.py create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__credentials.py create mode 100644 test_apps/python_no_app/tests/cli/tests__global_cmds.py create mode 100644 test_apps/python_no_app/tests/cmd_building/__init__.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers.toml create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/__init__.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/error_cases/test_exception_in_run.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/error_cases/test_missing_run_function.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/nested_common.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/python_no_app_tests.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/args_with_value_names.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/delim_multi_arg.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/display_verbosity_opts.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/flag_opts.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/hidden_opt.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_arg.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_opts.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/no_args_or_opts.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/optional_arg.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_aliases.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_value_names.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/required_arg.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_and_multi_arg.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_optional_opt.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_required_opt.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_current_command.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1.test_nested_level_2.test_nested_level_3_b.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1/test_nested_level_2.py create mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1/test_nested_level_2/test_nested_level_3_a.py create mode 100644 test_apps/python_no_app/tests/cmd_building/shared.py create mode 100644 test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py create mode 100644 test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py create mode 100644 test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py create mode 100644 test_apps/python_no_app/tests/cmd_building/tests__opt_building.py create mode 100644 test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py create mode 100644 test_apps/python_no_app/tests/cmd_extensions/__init__.py create mode 100644 test_apps/python_no_app/tests/configs/__init__.py create mode 100644 test_apps/python_no_app/tests/configs/aux_cmds/add_aux_cmd.toml create mode 100644 test_apps/python_no_app/tests/configs/aux_cmds/add_aux_cmd_config.toml create mode 100644 test_apps/python_no_app/tests/configs/aux_cmds/conflicting_namespaces_config.toml create mode 100644 test_apps/python_no_app/tests/configs/aux_cmds/invalid_aux_cmd_path_config.toml create mode 100644 test_apps/python_no_app/tests/configs/dummy_config.toml create mode 100644 test_apps/python_no_app/tests/configs/dummy_dir/origen.toml create mode 100644 test_apps/python_no_app/tests/configs/empty.toml create mode 100644 test_apps/python_no_app/tests/configs/python_plugin_and_2nd_only.toml create mode 100644 test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml create mode 100644 test_apps/python_no_app/tests/dummy_aux_cmds/aux_cmds_from_cli_dir.toml create mode 100644 test_apps/python_no_app/tests/dummy_aux_cmds/aux_cmds_from_cli_dir/cli_dir_says_hi.py create mode 100644 test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds.toml create mode 100644 test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds/say_hi.py create mode 100644 test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds_2nd.toml create mode 100644 test_apps/python_no_app/tests/test_cli.py create mode 100644 test_apps/python_no_app/tests/test_cmd_building.py create mode 100644 test_apps/python_no_app/tests/test_configs.py create mode 100644 test_apps/python_no_app/tests/test_global_invocation.py create mode 100644 test_apps/python_no_app/tests/test_plugin_loading.py create mode 100644 test_apps/python_plugin/python_plugin/commands.toml create mode 100644 test_apps/python_plugin/python_plugin/commands/echo.py create mode 100644 test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py create mode 100644 test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py create mode 100644 test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py create mode 100644 test_apps/python_plugin/python_plugin/commands/plugin_says_hi.py create mode 100644 test_apps/python_plugin/python_plugin/commands/plugin_test_args.py create mode 100644 test_apps/python_plugin/python_plugin/commands/plugin_test_args.subc.py create mode 100644 test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.py create mode 100644 test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.subc.py create mode 100644 test_apps/python_plugin/python_plugin/origen.plugin.toml create mode 100644 test_apps/python_plugin_no_cmds/.gitignore create mode 100644 test_apps/python_plugin_no_cmds/config/application.toml create mode 100644 test_apps/python_plugin_no_cmds/config/commands.toml create mode 100644 test_apps/python_plugin_no_cmds/config/origen.toml create mode 100644 test_apps/python_plugin_no_cmds/poetry.lock create mode 100644 test_apps/python_plugin_no_cmds/pyproject.toml create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/application.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/commands.toml create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/attributes.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/controller.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/attributes.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/controller.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/levels.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/pins.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/registers.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/services.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/sub_blocks.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/timing.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/levels.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/pins.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/registers.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/services.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/sub_blocks.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/timing.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/flows/.gitkeep create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/interface/interface.py create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/origen.plugin.toml create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/patterns/.gitkeep create mode 100644 test_apps/python_plugin_no_cmds/python_plugin_no_cmds/templates/.gitkeep create mode 100644 test_apps/python_plugin_no_cmds/setup.cfg create mode 100644 test_apps/python_plugin_no_cmds/targets/dut/pigeon.py create mode 100644 test_apps/python_plugin_no_cmds/targets/tester/smt7.py create mode 100644 test_apps/python_plugin_no_cmds/targets/tester/smt8.py create mode 100644 test_apps/python_plugin_no_cmds/targets/tester/uflex.py create mode 100644 test_apps/python_plugin_no_cmds/tests/README.md create mode 100644 test_apps/python_plugin_no_cmds/tests/example_test.py create mode 100644 test_apps/python_plugin_no_cmds/tests/shared/__init__.py create mode 100644 test_apps/python_plugin_no_cmds/vendor/.gitkeep create mode 100644 test_apps/python_plugin_no_cmds/web/Makefile create mode 100644 test_apps/python_plugin_no_cmds/web/make.bat create mode 100644 test_apps/python_plugin_no_cmds/web/source/_static/.gitkeep create mode 100644 test_apps/python_plugin_no_cmds/web/source/conf.py create mode 100644 test_apps/python_plugin_no_cmds/web/source/index.rst create mode 100644 test_apps/python_plugin_the_second/.gitignore create mode 100644 test_apps/python_plugin_the_second/config/application.toml create mode 100644 test_apps/python_plugin_the_second/config/commands.toml create mode 100644 test_apps/python_plugin_the_second/config/origen.toml create mode 100644 test_apps/python_plugin_the_second/poetry.lock create mode 100644 test_apps/python_plugin_the_second/pyproject.toml create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/application.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/commands.toml create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/aux_ns/dummy_cmds/dummy_cmd/subc.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/plugin.python_plugin.plugin_test_ext_stacking.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/plugin.python_plugin.plugin_test_ext_stacking.subc.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/attributes.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/controller.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/attributes.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/controller.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/levels.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/pins.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/registers.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/services.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/sub_blocks.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/timing.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/levels.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/pins.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/registers.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/services.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/sub_blocks.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/dut/timing.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/flows/.gitkeep create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/interface/interface.py create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/origen.plugin.toml create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/patterns/.gitkeep create mode 100644 test_apps/python_plugin_the_second/python_plugin_the_second/templates/.gitkeep create mode 100644 test_apps/python_plugin_the_second/setup.cfg create mode 100644 test_apps/python_plugin_the_second/targets/dut/quail.py create mode 100644 test_apps/python_plugin_the_second/targets/tester/smt7.py create mode 100644 test_apps/python_plugin_the_second/targets/tester/smt8.py create mode 100644 test_apps/python_plugin_the_second/targets/tester/uflex.py create mode 100644 test_apps/python_plugin_the_second/tests/README.md create mode 100644 test_apps/python_plugin_the_second/tests/example_test.py create mode 100644 test_apps/python_plugin_the_second/tests/shared/__init__.py create mode 100644 test_apps/python_plugin_the_second/vendor/.gitkeep create mode 100644 test_apps/python_plugin_the_second/web/Makefile create mode 100644 test_apps/python_plugin_the_second/web/make.bat create mode 100644 test_apps/python_plugin_the_second/web/source/_static/.gitkeep create mode 100644 test_apps/python_plugin_the_second/web/source/conf.py create mode 100644 test_apps/python_plugin_the_second/web/source/index.rst create mode 100644 test_apps/test_apps_shared_test_helpers/.gitignore create mode 100644 test_apps/test_apps_shared_test_helpers/config/application.toml create mode 100644 test_apps/test_apps_shared_test_helpers/config/commands.toml create mode 100644 test_apps/test_apps_shared_test_helpers/config/origen.toml create mode 100644 test_apps/test_apps_shared_test_helpers/poetry.lock create mode 100644 test_apps/test_apps_shared_test_helpers/pyproject.toml create mode 100644 test_apps/test_apps_shared_test_helpers/setup.cfg create mode 100644 test_apps/test_apps_shared_test_helpers/targets/dut/.keep create mode 100644 test_apps/test_apps_shared_test_helpers/targets/tester/smt7.py create mode 100644 test_apps/test_apps_shared_test_helpers/targets/tester/smt8.py create mode 100644 test_apps/test_apps_shared_test_helpers/targets/tester/uflex.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/application.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/__init__.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts/core/eval.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts_cfg.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds/dummy_cmd.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds/dummy_cmd/subc.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds_cfg.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/aux_ns/dummy_cmds/dummy_cmd.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/aux_ns/dummy_cmds/dummy_cmd.subc.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_args.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking/subc.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout_cfg.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.subc.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.subc.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux_cfg.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/dut/.keep create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/flows/.gitkeep create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/interface/interface.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/origen.plugin.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/patterns/.gitkeep create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/templates/.gitkeep create mode 100644 test_apps/test_apps_shared_test_helpers/tests/README.md create mode 100644 test_apps/test_apps_shared_test_helpers/tests/example_test.py create mode 100644 test_apps/test_apps_shared_test_helpers/tests/shared/__init__.py create mode 100644 test_apps/test_apps_shared_test_helpers/vendor/.gitkeep create mode 100644 test_apps/test_apps_shared_test_helpers/web/Makefile create mode 100644 test_apps/test_apps_shared_test_helpers/web/make.bat create mode 100644 test_apps/test_apps_shared_test_helpers/web/source/_static/.gitkeep create mode 100644 test_apps/test_apps_shared_test_helpers/web/source/conf.py create mode 100644 test_apps/test_apps_shared_test_helpers/web/source/index.rst diff --git a/python/origen/origen/__init__.py b/python/origen/origen/__init__.py index 1a4c3591..8ef5e7ec 100644 --- a/python/origen/origen/__init__.py +++ b/python/origen/origen/__init__.py @@ -1,6 +1,6 @@ import sys import re -import os +import os, pathlib init_verbosity = 0 cli_path = None cli_ver = None @@ -31,6 +31,24 @@ import _origen from _origen import _origen_metal +def __getattr__(name: str): + if name == "ldaps": + return _origen.utility.ldaps() + elif name == "current_user": + return users.current_user + elif name == "initial_user": + return users.initial_user + elif name in ["command", "current_command", "cmd", "current_cmd"]: + return _origen._current_command_ + elif name == "plugins": + if origen._plugins is None: + from origen.core.plugins import collect_plugins + origen._plugins = collect_plugins() + return origen._plugins + else: + return _plugins + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") + # Replace origen_metal's native _origen_metal built library # with the one built from origen. sys.modules["origen_metal._origen_metal"] = _origen_metal @@ -39,7 +57,7 @@ om = origen_metal origen_metal.frontend.initialize() -_origen.initialize(init_verbosity, vks, cli_path, cli_ver) +_origen.initialize(init_verbosity, vks, cli_path, cli_ver, pathlib.Path(__file__).parent, sys.executable) from pathlib import Path import importlib @@ -66,6 +84,8 @@ :ref:`Configuring Origen ` ''' +__config_metadata__ = _origen.config_metadata() + status = _origen.status() ''' Dictionary of various application and workspace attributes Keys include: ``{{ list(origen.status.keys())|pprint }}`` @@ -90,6 +110,8 @@ root = Path(status["root"]) __console_history_file__ = root.joinpath(".origen").joinpath( "console_history") +else: + __console_history_file__ = om.users.current_user.__dot_origen_dir__.joinpath("console_history") __in_origen_core_app = status["in_origen_core_app"] ''' Indicates if the current application is the Origen core package @@ -108,7 +130,7 @@ '{{ origen_version }}' ''' -logger = om.framework.logger +logger = om.framework.logger.Logger() ''' Direct access to the build-in logger module for logging and displaying user-friendly output. Also available as :data:`log` Returns: @@ -185,9 +207,8 @@ mode = "development" -_plugins = {} -''' Dictionary of Origen plugins (instances of :py:class:`origen.application.Application`) - that have been referenced and loaded. +_plugins = None +''' Dictionary of Origen plugins that have been referenced and loaded. It should never be access directly since a plugin not being present in this dict may only mean that it hasn't been loaded yet (via an official API) rather than it not existing. ''' @@ -287,7 +308,7 @@ def has_plugin(name): ''' Returns true if an Origen plugin matching the given name is found in the current environment ''' - if name in _plugins: + if name in origen.plugins: return True else: try: @@ -295,7 +316,7 @@ def has_plugin(name): app = a.Application(root=Path(os.path.abspath( a.__file__)).parent.parent, name=name) - _plugins[name] = app + origen.plugins[name] = app return True except ModuleNotFoundError: return False @@ -308,7 +329,7 @@ def plugin(name): current environment. ''' if has_plugin(name): - return _plugins[name] + return origen.plugins[name] else: raise RuntimeError( f"The current Python environment does not contain a plugin named '{name}'" @@ -339,13 +360,3 @@ def __interactive_context__(): 'frontend_root', 'app', 'dut', 'tester', 'producer', 'has_plugin', 'plugin', 'current_user', 'users', 'mailer' ] - - -def __getattr__(name: str): - if name == "ldaps": - return _origen.utility.ldaps() - elif name == "current_user": - return users.current_user - elif name == "initial_user": - return users.initial_user - raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/python/origen/origen/application.py b/python/origen/origen/application.py index c1547657..f622f85f 100644 --- a/python/origen/origen/application.py +++ b/python/origen/origen/application.py @@ -9,6 +9,7 @@ from origen.errors import * from origen.callbacks import _callbacks from types import ModuleType +from pathlib import Path import origen_metal @@ -112,10 +113,14 @@ def release_scribe(self): def mailer(self): return origen.mailer + @property + def is_plugin(self): + return self._plugin + def __init__(self, *args, **options): self._compiler = Compiler() self._translator = Translator() - if origen.app is None: + if (origen.app is None) & _origen.is_app_present(): self._plugin = False self._root = origen.root self._name = _origen.app_config()["name"] @@ -252,26 +257,44 @@ def instantiate_block(self, if r[0]: block_dir = r[1] + app_dir = None if block_dir is None: r = self.block_path_to_dir(path) if not r[0]: paths = path.split(".") - if len(paths) > 1 and origen.has_plugin(paths[0]): - return origen.plugin(paths[0]).instantiate_block( - ".".join(paths[1:]), - None, - class_name=class_name, - sb_options=sb_options) + # FOR_PR clean up and invert case + if paths[0] != "origen" and path[0] != "origen_metal": + if len(paths) > 1 and origen.has_plugin(paths[0]): + return origen.plugin(paths[0]).instantiate_block( + ".".join(paths[1:]), + None, + class_name=class_name, + sb_options=sb_options) + else: + raise RuntimeError( + f"No block was found at path '{orig_path}'") else: - raise RuntimeError( - f"No block was found at path '{orig_path}'") + a = importlib.import_module(f'{"origen"}.application') + app = a.Application(root=Path(os.path.abspath( + a.__file__)).parent.parent, + name="origen") + b = app.instantiate_block( + ".".join(paths[1:]), + None, + class_name=class_name, + sb_options=sb_options) + return b + # name="origen", root=Path(origen.__file__).parent + # return origen.blocks.Controller() + # app_dir = origen.__file__ + # print(f"app path: {app_dir}") else: block_dir = r[1] # If no controller class is defined then look up the nearest available parent controller_dir = block_dir controller_file = None - blocks_dir = self.app_dir.joinpath("blocks") + blocks_dir = app_dir or self.app_dir.joinpath("blocks") p = f"{path.split('.')[-1]}.py" if controller_dir.joinpath(p).exists(): controller_file = controller_dir.joinpath(p) diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 275b30aa..6aa2196c 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -1,20 +1,39 @@ # These must come before all other imports. -from __future__ import print_function, unicode_literals, absolute_import +# from __future__ import print_function, unicode_literals, absolute_import import pathlib -import importlib +from builtins import exit as exit_proc +def unsupported_command(base_cmd, sub_command=None): + if sub_command is None: + print(f"Unsupported command '{base_cmd}'") + else: + print(f"Unsupported sub-command '{sub_command}' for '{base_cmd}'") + exit(1) + +dispatch_plugin_cmd = "_plugin_dispatch_" +dispatch_aux_cmd = "_dispatch_aux_cmd_" +dispatch_app_cmd = "_dispatch_app_cmd_" + +exit = True def run_cmd(command, targets=None, verbosity=None, - verbosity_keywords="", + verbosity_keywords=None, mode=None, files=None, output_dir=None, reference_dir=None, debug=False, args=None, + ext_args=None, + extensions=None, + dispatch_root=None, + dispatch_src=None, + plugins=None, + subcmds=None, + exit=None, **kwargs): ''' Run an Origen command. This is the main entry method for the CLI, but it can also be used in application commands to invoke Origen commands within the same thread instead of @@ -32,8 +51,79 @@ def run_cmd(command, import origen.application import origen.target + if command == dispatch_plugin_cmd: + cmd_src = "plugin" + elif command == dispatch_aux_cmd: + cmd_src = "aux_ns" + elif command == dispatch_app_cmd: + cmd_src = "app" + else: + cmd_src = "core" + + def wrap_mod_from_file(path): + try: + return origen.helpers.mod_from_file(path) + except Exception as e: + return [path, e] + + def mod_from_modulized_path(root, sub_parts): + root = pathlib.Path(root) + if not root.exists(): + return [f"Root directory '{root}' does not exists or is not accessible"] + path = pathlib.Path(f"{root.joinpath('.'.join(sub_parts))}.py") + if not path.exists(): + paths = [path] + modulized_path = pathlib.Path(root) + for i, sub in enumerate(sub_parts[:-1]): + modulized_path = modulized_path.joinpath(sub) + if modulized_path.exists(): + path = pathlib.Path(f"{modulized_path}/{'.'.join(sub_parts[(i+1):])}.py") + if path.exists(): + return wrap_mod_from_file(path) + else: + paths.append(path) + else: + return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] + path = pathlib.Path(f"{modulized_path}/{sub_parts[-1]}.py") + if not path.exists(): + paths.append(path) + return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] + return wrap_mod_from_file(path) + + def call_user_cmd(cmd_type): + print(f"dispatch_root: {dispatch_root}") + path = pathlib.Path(f"{pathlib.Path(dispatch_root).joinpath('/'.join(subcmds))}.py") + if not path.exists(): + modulized_path = pathlib.Path(f"{pathlib.Path(dispatch_root).joinpath('.'.join(subcmds))}.py") + if modulized_path.exists(): + path = modulized_path + else: + cmd = (' ').join(subcmds) + origen.logger.error(f"Could not find implementation for {cmd_type} command '{cmd}' at '{path}' or '{modulized_path}'") + exit(1) + + m = origen.helpers.mod_from_file(path) + if hasattr(m, 'run'): + print("found run") + print(path) + m.run(**(args or {})) + else: + origen.logger.error(f"Could not find 'run' function in module '{path}'") + exit(1) + + def is_subcmd(*subcs): + return list(subcs) == subcmds + + def unsupported_subcmd(subcmd=None): + if subcmd is None: + print(f"Unsupported sub-command '{subcmds.join(' -> ')}' for base command '{command}'") + else: + print(f"Unsupported sub-command '{subcmd}' for '{command}'") + exit(1) + if mode == None: - origen.set_mode(_origen.app_config()["mode"]) + if _origen.is_app_present(): + origen.set_mode(_origen.app_config()["mode"]) else: origen.set_mode(mode) @@ -42,7 +132,9 @@ def run_cmd(command, if verbosity is not None: origen_metal.framework.logger.set_verbosity(verbosity) - origen_metal.framework.logger.set_verbosity_keywords(verbosity_keywords.split(",")) + + if verbosity_keywords is not None: + origen_metal.framework.logger.set_verbosity_keywords(verbosity_keywords) if output_dir is not None: _origen.set_output_dir(output_dir) @@ -53,202 +145,327 @@ def run_cmd(command, if debug: _origen.enable_debug() - origen.target.setup(targets=targets) - - # The generate command handles patterns and flows. - # Future: Add options to generate patterns concurrently, or send them off to LSF. - # For now, just looping over the patterns. - if command == "generate": - origen.producer.generate(*[f for f in _origen.file_handler()]) - - # Alway print a summary when initiated from the CLI - origen.producer.summarize() - - elif command == "compile": - _origen.set_operation("compile") - for file in _origen.file_handler(): - origen.app.compile(pathlib.Path(file)) - - elif command == "interactive": - _origen.set_operation("interactive") - origen.logger.trace("Starting interactive session (on Python side)") - origen.target.load() - - from origen_metal._helpers import interactive - from origen import dut, tester - from origen.registers.actions import write, verify, write_transaction, verify_transaction - interactive.prep_shell(origen.__console_history_file__) - interactive.interact(banner=f"Origen {origen.version}", - context=origen.__interactive_context__()) - - elif command == "web:build": - _origen.set_operation("web") - from origen.web import run_cmd - return run_cmd("build", args) - - elif command == "web:view": - _origen.set_operation("web") - from origen.web import run_cmd - return run_cmd("view", args) - - elif command == "web:clean": - _origen.set_operation("web") - from origen.web import run_cmd - return run_cmd("clean", args) - - elif command == "app:publish": - _origen.set_operation("app") - origen.app.__publish__(**args).summarize_and_exit() - - elif command == "app:package": - _origen.set_operation("app") - origen.app.build_package(args) - - elif command == "app:run_publish_checks": - _origen.set_operation("app") - origen.app.__run_publish_checks__(args).summarize_and_exit() - - elif command == "app:init": - _origen.set_operation("app") - r = origen.app.__rc_init__() - r.summarize_and_exit() - - elif command == "app:status": - _origen.set_operation("app") - r = origen.app.__rc_status__() - r.summarize() - - elif command == "app:checkin": - _origen.set_operation("app") - checkin_all = args.pop("all", False) - args["dry_run"] = args.pop("dry-run", False) - if 'pathspecs' in args and not checkin_all: - r = origen.app.__rc_checkin__(**args) - else: - r = origen.app.__rc_checkin__(pathspecs=None, **args) - r.gist() - - # TODO need to remove generic result - elif command == "mailer:test": - if origen.mailer is None: - from origen_metal.framework import Outcome - r = Outcome(succeeded=False, message="No mailer available!") + from origen.core.plugins import from_origen_cli + from_origen_cli(plugins) + + if _origen.is_app_present(): + origen.target.setup(targets=targets) + + if args is None: + args = {} + if subcmds is None: + subcmds = [] + if ext_args is None: + ext_args = {} + if extensions is None: + extensions = [] + current_ext = None + + def before_cmd(func): + current_ext["before_cmd"] = func.__name__ + return func + setattr(origen.boot, "before_cmd", before_cmd) + + def after_cmd(func): + current_ext["after_cmd"] = func.__name__ + return func + setattr(origen.boot, "after_cmd", after_cmd) + + def clean_up(func): + current_ext["clean_up"] = func.__name__ + return func + setattr(origen.boot, "clean_up", clean_up) + + def on_load(func): + current_ext["on_load"] = func.__name__ + return func + setattr(origen.boot, "on_load", on_load) + + # FOR_PR need to test with app subcmds + + for ext in extensions: + current_ext = ext + m = mod_from_modulized_path(ext['root'], [cmd_src, command if cmd_src == "core" else dispatch_src, *subcmds]) + if isinstance(m, list): + if isinstance(m[1], Exception): + origen.log.error(f"Could not load {ext['source']} extension implementation from '{ext['name']}' ({m[0]})") + origen.log.error(f"Received exception:\n{m[1]}") + else: + origen.log.error(f"Could not find implementation for {ext['source']} extension '{ext['name']}'") + for msg in m: + origen.log.error(f" {msg}") + ext['mod'] = None + # FOR_PR remove obj + ext['obj'] = None else: - r = origen.app.mailer.test(args.get("to", None)) - r.summarize_and_exit() - - # TODO need to remove generic result - elif command == "mailer:send": - if origen.mailer is None: - from origen_metal.framework import Outcome - r = Outcome(succeeded=False, message="No mailer available!") - else: - r = origen.app.mailer.send(subject=args.get("subject", None), - to=args.get("to", None), - body=args["body"]) - r.summarize_and_exit() + ext['mod'] = m + ext['obj'] = m + + if "on_load" in ext: + getattr((ext["mod"]), ext["on_load"])(ext["mod"]) + _origen.set_command(command, subcmds, args, ext_args, extensions) + + try: + for ext in extensions: + if "before_cmd" in ext: + getattr(ext["obj"], ext["before_cmd"])(**ext_args[ext['source']][ext['name']]) + + # The generate command handles patterns and flows. + # Future: Add options to generate patterns concurrently, or send them off to LSF. + # For now, just looping over the patterns. + if command == "generate": + origen.producer.generate(*[f for f in _origen.file_handler()]) + + # Alway print a summary when initiated from the CLI + origen.producer.summarize() + + elif command == "compile": + _origen.set_operation("compile") + for file in _origen.file_handler(): + origen.app.compile(pathlib.Path(file)) + + elif command == "interactive": + _origen.set_operation("interactive") + origen.logger.trace("Starting interactive session (on Python side)") + if _origen.is_app_present: + origen.target.load() + + from origen_metal._helpers import interactive + from origen import dut, tester + from origen.registers.actions import write, verify, write_transaction, verify_transaction + interactive.prep_shell(origen.__console_history_file__) + interactive.interact(banner=f"Origen {origen.version}", + context=origen.__interactive_context__()) + + elif command == "credentials": + _origen.set_operation("credentials") + datasets = args.get("datasets", None) + all = args.get("all", False) + if is_subcmd("set"): + if all: + origen.logger.display("Setting passwords for all available datasets...") + for d in origen.current_user.datasets.values(): + d.password = None + d.password() + origen.logger.display("Done!") + elif datasets is None: + origen.current_user.password = None + origen.current_user.password + else: + for d in datasets: + d.password = None + d.password() + elif is_subcmd("clear"): + if all: + origen.logger.display("Clearing all cached passwords...") + origen.current_user.clear_cached_passwords() + elif datasets is None: + origen.logger.display("Clearing cached password for topmost dataset...") + origen.current_user.clear_cached_password() + else: + for d in datasets: + origen.logger.display(f"Clearing cached password for dataset '{d}'") + origen.current_user.datasets[d].clear_cached_password() + origen.logger.display("Done!") + else: + unsupported_subcmd() + + elif command == "eval": + for c in args['code']: + exec(c) + + elif command == "web:build": + _origen.set_operation("web") + from origen.web import run_cmd + return run_cmd("build", args) + + elif command == "web:view": + _origen.set_operation("web") + from origen.web import run_cmd + return run_cmd("view", args) + + elif command == "web:clean": + _origen.set_operation("web") + from origen.web import run_cmd + return run_cmd("clean", args) + + elif command == "app:publish": + _origen.set_operation("app") + origen.app.__publish__(**args).summarize_and_exit() + + elif command == "app:package": + _origen.set_operation("app") + origen.app.build_package(args) + + elif command == "app:run_publish_checks": + _origen.set_operation("app") + origen.app.__run_publish_checks__(args).summarize_and_exit() + + elif command == "app:init": + _origen.set_operation("app") + r = origen.app.__rc_init__() + r.summarize_and_exit() + + elif command == "app:status": + _origen.set_operation("app") + r = origen.app.__rc_status__() + r.summarize() + + elif command == "app:checkin": + _origen.set_operation("app") + checkin_all = args.pop("all", False) + args["dry_run"] = args.pop("dry-run", False) + if 'pathspecs' in args and not checkin_all: + r = origen.app.__rc_checkin__(**args) + else: + r = origen.app.__rc_checkin__(pathspecs=None, **args) + r.gist() + + # TODO need to remove generic result + elif command == "mailer:test": + if origen.mailer is None: + from origen_metal.framework import Outcome + r = Outcome(succeeded=False, message="No mailer available!") + else: + r = origen.app.mailer.test(args.get("to", None)) + r.summarize_and_exit() + + # TODO need to remove generic result + elif command == "mailer:send": + if origen.mailer is None: + from origen_metal.framework import Outcome + r = Outcome(succeeded=False, message="No mailer available!") + else: + r = origen.app.mailer.send(subject=args.get("subject", None), + to=args.get("to", None), + body=args["body"]) + r.summarize_and_exit() + + # Internal command to give the Origen version loaded by the application to the CLI + elif command == "_version_": + import importlib_metadata + + def tabify(message): + return "\n".join([f"\t{l}" for l in message.split("\n")]) - # Internal command to give the Origen version loaded by the application to the CLI - elif command == "_version_": - import importlib_metadata + try: + if origen.app: + print(f"App\nSuccess\n{tabify(origen.app.version)}") + except Exception as e: + print("App") + print("Error") + print(tabify(repr(e))) - def tabify(message): - return "\n".join([f"\t{l}" for l in message.split("\n")]) + if origen.__in_origen_core_app: + origen.logger.info("Running in Origen core application") + else: + print("Origen") + try: + print( + f"Success\n{tabify(importlib_metadata.version('origen'))}") + except Exception as e: + print("Error") + print(tabify(repr(e))) + + print("_ CLI") + try: + print(f"Success\n{tabify(origen.status['cli_version'])}") + except Exception as e: + print("Error") + print(tabify(repr(e))) - try: - if origen.app: - print(f"App\nSuccess\n{tabify(origen.app.version)}") - except Exception as e: - print("App") - print("Error") - print(tabify(repr(e))) + print("_ PyAPI") + try: + print( + f"Success\n{tabify(origen.status['other_build_info']['pyapi_version'])}" + ) + except Exception as e: + print("Error") + print(tabify(repr(e))) - if origen.__in_origen_core_app: - origen.logger.info("Running in Origen core application") - else: - print("Origen") + print("_ Origen (Rust Backend)") + try: + print(f"Success\n{tabify(origen.status['origen_version'])}") + except Exception as e: + print("Error") + print(tabify(repr(e))) + + print("_ Origen-Core-Support") try: print( - f"Success\n{tabify(importlib_metadata.version('origen'))}") + f"Success\n{tabify(origen.status['origen_core_support_version'])}" + ) except Exception as e: print("Error") print(tabify(repr(e))) - print("_ CLI") - try: - print(f"Success\n{tabify(origen.status['cli_version'])}") - except Exception as e: - print("Error") - print(tabify(repr(e))) + print("_ OrigenMetal (Rust Backend - Origen)") + try: + print( + f"Success\n{tabify(origen.status['origen_metal_backend_version'])}" + ) + except Exception as e: + print("Error") + print(tabify(repr(e))) - print("_ PyAPI") - try: - print( - f"Success\n{tabify(origen.status['other_build_info']['pyapi_version'])}" - ) - except Exception as e: - print("Error") - print(tabify(repr(e))) + print("_ origen_metal") + try: + print( + f"Success\n{tabify(importlib_metadata.version('origen_metal'))}" + ) + except Exception as e: + print("Error") + print(tabify(repr(e))) - print("_ Origen (Rust Backend)") - try: - print(f"Success\n{tabify(origen.status['origen_version'])}") - except Exception as e: - print("Error") - print(tabify(repr(e))) + print("_ _origen_metal (PyAPI Metal)") + try: + print(f"Success\n{tabify(origen_metal._origen_metal.__version__)}") + except Exception as e: + print("Error") + print(tabify(repr(e))) - print("_ Origen-Core-Support") - try: - print( - f"Success\n{tabify(origen.status['origen_core_support_version'])}" - ) - except Exception as e: - print("Error") - print(tabify(repr(e))) + print("_ OrigenMetal (Rust Backend - PyAPI Metal)") + try: + print( + f"Success\n{tabify(origen_metal._origen_metal.__origen_metal_backend_version__)}" + ) + except Exception as e: + print("Error") + print(tabify(repr(e))) - print("_ OrigenMetal (Rust Backend - Origen)") - try: - print( - f"Success\n{tabify(origen.status['origen_metal_backend_version'])}" - ) - except Exception as e: - print("Error") - print(tabify(repr(e))) - print("_ origen_metal") - try: - print( - f"Success\n{tabify(importlib_metadata.version('origen_metal'))}" - ) - except Exception as e: - print("Error") - print(tabify(repr(e))) + elif command == "_dispatch_app_cmd_": + # TODO fix this upstream + subcmds = subcmds[1:] + call_user_cmd("app") - print("_ _origen_metal (PyAPI Metal)") - try: - print(f"Success\n{tabify(origen_metal._origen_metal.__version__)}") - except Exception as e: - print("Error") - print(tabify(repr(e))) + elif command == "_plugin_dispatch_": + call_user_cmd("plugin") - print("_ OrigenMetal (Rust Backend - PyAPI Metal)") - try: - print( - f"Success\n{tabify(origen_metal._origen_metal.__origen_metal_backend_version__)}" - ) - except Exception as e: - print("Error") - print(tabify(repr(e))) - - # Internal command to dispatch an app/plugin command - elif command == "_dispatch_": - path = f'{origen.app.name}.commands' - for cmd in kwargs["commands"]: - path += f'.{cmd}' - m = importlib.import_module(path) - m.run(**(args or {})) - exit(0) + elif command == "_dispatch_aux_cmd_": + call_user_cmd("aux") + else: + print(f"Unknown command: {command}") + exit(1) + + if extensions: + for ext in extensions: + if "after_cmd" in ext: + getattr(ext["obj"], ext["after_cmd"])(**ext_args[ext['source']][ext['name']]) + finally: + for ext in extensions: + try: + if "clean_up" in ext: + getattr(ext["obj"], ext["clean_up"])(**ext_args[ext['source']][ext['name']]) + except Exception as clean_up_e: + print(clean_up_e) + + + if exit is None: + if origen.boot.exit: + exit_proc(0) + elif exit is False: + pass else: - print(f"Unknown command: {command}") - exit(1) + exit_proc(0) diff --git a/python/origen/origen/core/plugins.py b/python/origen/origen/core/plugins.py new file mode 100644 index 00000000..440a5b0f --- /dev/null +++ b/python/origen/origen/core/plugins.py @@ -0,0 +1,67 @@ +# FOR_PR decide if plugins should be implemented here or in pyapi +import origen +from collections import UserDict +import importlib, os +from pathlib import Path +import _origen + +# class Plugin: +# def __init__(self, name, root): +# self.name = name +# self.root = root + +def collect_plugins(): + pls = Plugins() + for n, r in _origen._plugin_roots().items(): + pls.register(n) + # parts = l.split("|") + # if len(parts) != 3: + # origen.log.error(f"Malformed output encountered when collecting plugin roots: {l}") + # continue + + # if not parts[0] == "success": + # origen.log_error(f"Unknown status when collecting plugin roots: {parts[0]}") + # else: + # pls.register(parts[1]) + origen._plugins = pls + return origen._plugins + +def from_origen_cli(plugins): + pls = Plugins() + if plugins: + for name in plugins.keys(): + pls.register(name) + origen._plugins = pls + return origen._plugins + +class Plugins(UserDict): + def __init__(self): + UserDict.__init__(self) + + @property + def plugins(self): + return self.data + + @property + def names(self): + return list(self.data.keys()) + + def register(self, name): + a = importlib.import_module(f'{name}.application') + app = a.Application(root=Path(os.path.abspath( + a.__file__)).parent.parent, + name=name) + self.data[name] = app + return app + + # def add_plugin(self, name, app): + # self._plugins[name] = app + + # def register_plugin() + + def collect(self): + ... + + def load_from_config(self): + for pl in _origen.config['plugins']['load']: + self._load_pl() \ No newline at end of file diff --git a/python/origen/origen/helpers/__init__.py b/python/origen/origen/helpers/__init__.py index 94044e2d..808eddf1 100644 --- a/python/origen/origen/helpers/__init__.py +++ b/python/origen/origen/helpers/__init__.py @@ -1,4 +1,4 @@ -import importlib.util, pathlib +import importlib.util, pathlib, inspect import origen import origen.helpers.num @@ -11,6 +11,8 @@ def try_method(obj, m, args): def has_method(obj, m): return hasattr(obj, m) and callable(getattr(obj, m)) +def calling_filename(frame=1): + return pathlib.Path(inspect.stack()[frame].filename) # Import a module from a file, as described here: https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path # The name can be whatever. If no name is given, then the file name is used diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py new file mode 100644 index 00000000..76a68256 --- /dev/null +++ b/python/origen/origen/helpers/env.py @@ -0,0 +1,54 @@ +# TODO add tests and remove equivalents +import inspect, subprocess, pathlib, os +from origen_metal._helpers import in_new_proc + +def in_new_origen_proc(func=None, mod=None, *, func_kwargs=None, with_configs=None, bypass_config_lookup=False): + if isinstance(with_configs, str) or isinstance(with_configs, pathlib.Path): + with_configs=[with_configs] + + if func is None: + func = getattr(mod, inspect.stack()[1].function) + return in_new_proc(func, mod, func_kwargs=func_kwargs) + +# TODO support options +def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=False, input=None, expect_fail=False, return_details=False): + if isinstance(cmd, str): + cmd = ["origen", cmd] + else: + cmd = ["origen", *cmd] + + subp_env = os.environ.copy() + if isinstance(with_configs, str) or isinstance(with_configs, pathlib.Path): + with_configs=[with_configs] + if with_configs: + subp_env["origen_config_paths"] = ';'.join([str(c) for c in with_configs]) + + if with_env: + subp_env.update(with_env) + + if bypass_config_lookup: + subp_env["origen_bypass_config_lookup"] = "1" + + if expect_fail: + result = subprocess.run(cmd, shell=True, capture_output=True, text=True, input=input, env=subp_env) + if result.returncode == 0: + cmd = ' '.join(cmd) + raise RuntimeError(f"Expected cmd '{cmd}' to fail but received return code 0") + else: + result = subprocess.run(cmd, shell=True, check=False, capture_output=True, text=True, input=input, env=subp_env) + # FOR_PR take these out + print(result.stdout) + print(result.stderr) + if return_details: + return { + # FOR_PR take these out + # "stderr": result.stderr.decode("utf-8"), + # "stdout": result.stdout.decode("utf-8"), + "stderr": result.stderr, + "stdout": result.stdout, + "returncode": result.returncode + } + else: + # FOR_PR take these out + # return result.stdout.decode("utf-8") + return result.stdout diff --git a/python/origen/origen/helpers/regressions/__init__.py b/python/origen/origen/helpers/regressions/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/python/origen/origen/helpers/regressions/cli/__init__.py b/python/origen/origen/helpers/regressions/cli/__init__.py new file mode 100644 index 00000000..f1eff343 --- /dev/null +++ b/python/origen/origen/helpers/regressions/cli/__init__.py @@ -0,0 +1,57 @@ +'''Regression test helpers for testing/checking Origen CLI integration''' + +from .command import Cmd, CmdArg, CmdOpt +from .help_msg import HelpMsg +from .origen import _CommonNames, GlobalCommands, InAppCommands, CoreOpts, CoreErrorMessages + +cmd = command + +class CLI: + HelpMsg = HelpMsg + Cmd = Cmd + CmdOpt = CmdOpt + CmdArg = CmdArg + + opts = CoreOpts() + core_opts = opts + + global_commands = GlobalCommands() + global_cmds = global_commands + global_core_cmds = global_commands + global_core_commands = global_commands + + in_app_commands = InAppCommands() + in_app_cmds = in_app_commands + in_app_core_cmds = in_app_commands + in_app_core_commands = in_app_commands + + common_names = _CommonNames() + + @classmethod + def pl_cmd(cls, plugin, *args, **kwargs): + return cls.Cmd(plugin, cmd_path=[cls.common_names.pl], *args, **kwargs) + + @classmethod + def pl_sub_cmd(cls, plugin, name, *args, cmd_path=None, **kwargs): + return cls.Cmd(name, cmd_path=[cls.common_names.pl, plugin, *(cmd_path or [])], *args, **kwargs) + + @classmethod + def aux_cmd(cls, namespace, *args, from_config=None, **kwargs): + return cls.Cmd(namespace, cmd_path=[cls.common_names.aux_cmds], use_configs=from_config, *args, **kwargs) + + @classmethod + def aux_sub_cmd(cls, namespace, name, *args, cmd_path=None, from_config=None, **kwargs): + return cls.Cmd(name, cmd_path=[cls.common_names.aux_cmds, namespace, *(cmd_path or [])], use_configs=from_config, *args, **kwargs) + + @classmethod + @property + def app_sub_cmd_path(cls): + cmd = cls.in_app_cmds.app + return [cmd.name, cmd.commands.name] + + @classmethod + def app_sub_cmd(cls, *args, cmd_path=None, **kwargs): + return cls.Cmd(cmd_path=[*cls.app_sub_cmd_path, *(cmd_path or [])], *args, **kwargs) + + error_messages = CoreErrorMessages() + err_msgs = error_messages diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py new file mode 100644 index 00000000..0caedffc --- /dev/null +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -0,0 +1,233 @@ +import enum +from pathlib import Path +from origen.helpers.env import run_cli_cmd +from .help_msg import HelpMsg + +class CmdArgOpt: + def to_vn(self): + return self.value_name or self.name.upper() + +class CmdArg(CmdArgOpt): + def __init__( + self, + name, + help=None, + multi=False, + required=False, + value_name=None, + use_delimiter=None + ): + self.name = name + self.help = help + self.multi = multi + self.required = required + self.value_name = value_name + self.use_delimiter = use_delimiter + +class CmdOpt(CmdArgOpt): + def __init__( + self, + name, + help=None, + takes_value=False, + multi=False, + required=False, + sn=None, + ln=None, + sn_aliases=None, + ln_aliases=None, + value_name=None, + hidden = False, + use_delimiter=None + ): + self.name = name + self.help = help + self.takes_value = takes_value + self.multi = multi + self.required = required + self.sn = sn + self.ln = ln + self.sn_aliases = sn_aliases + self.ln_aliases = ln_aliases + self.value_name = value_name + self.hidden = hidden + self.use_delimiter = use_delimiter + + def to_ln(self): + return self.ln or self.name + + def ln_to_cli(self): + return f"--{self.to_ln()}" + + def sn_to_cli(self): + return f"-{self.sn}" + +class SrcTypes(enum.Enum): + CORE = enum.auto() + APP = enum.auto() + PLUGIN = enum.auto() + AUX = enum.auto() + +class CmdExtOpt(CmdOpt): + @classmethod + def from_src(cls, src_name, src_type, *args): + for a in args: + a.src_name = src_name + a.src_type = src_type + return args + + def __init__(self, *args, src_name=None, src_type=None, **kwargs): + CmdOpt.__init__(self, *args, **kwargs) + self.src_name = src_name + self.src_type = src_type + +class CmdDemo: + def __init__(self, name, args=None, expected_output=None) -> None: + self.name = name + self.args = args + self.expected_output = expected_output + self.parent = None + + def run(self, add_args=None, **kwargs): + return self.parent.run(*(self.args + (add_args or [])), **kwargs) + + def assert_present(self, in_str): + assert self.expected_output in in_str + +class Cmd: + def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds = None, use_configs = None, with_env=None, demos=None, global_demos=None, app_demos=None, parent=None): + self.name = name + self.cmd_path = cmd_path or [] + self.help = help + self.args = dict([[arg.name, arg] for arg in (args or [])]) + self.opts = dict([[opt.name, opt] for opt in (opts or [])]) + self.subcmds = dict([[subcmd.name, subcmd] for subcmd in (subcmds or [])]) + self.exts = None + self.with_env = with_env + self.parent = parent + if use_configs: + if not isinstance(use_configs, list): + use_configs = [use_configs] + self.use_configs = [Path(c) for c in use_configs] + else: + self.use_configs = None + for subcmd in self.subcmds.values(): + subcmd.parent = self + subcmd.cmd_path = self.cmd_path + [self.name] + subcmd.use_configs = [*self.use_configs] if self.use_configs else None + + if self.parent is None: + self.update_cmd_paths() + + self.demos = dict([[d.name, d] for d in (demos or [])]) + for d in self.demos.values(): d.parent = self + self.global_demos = dict([[d.name, d] for d in (global_demos or [])]) + for d in self.global_demos.values(): d.parent = self + self.app_demos = dict([[d.name, d] for d in (app_demos or [])]) + for d in self.app_demos.values(): d.parent = self + + def update_cmd_paths(self): + for subcmd in self.subcmds.values(): + subcmd.cmd_path = self.cmd_path + [self.name] + subcmd.update_cmd_paths() + + def extend(self, exts, with_env=None, from_configs=None): + dup = self.__class__( + self.name, + self.cmd_path, + self.help, + self.args.values(), + self.opts.values(), + self.subcmds.values(), + [*self.use_configs] if self.use_configs else None, + self.with_env.copy() if self.with_env else None, + self.demos.values(), + self.global_demos.values(), + self.app_demos.values(), + ) + dup.exts = dict([[ext.name, ext] for ext in (exts or [])]) + if from_configs: + if isinstance(from_configs, str): + from_configs = [from_configs] + elif isinstance(from_configs, Path): + from_configs = [from_configs] + + if dup.use_configs: + dup.use_configs += from_configs + else: + dup.use_configs = from_configs + if with_env: + if dup.with_env: + dup.with_env.update(with_env) + else: + dup.with_env = with_env + return dup + + def _with_configs_(self, with_configs): + if self.use_configs: + if isinstance(with_configs, str): + with_configs = self.use_configs + [with_configs] + elif isinstance(with_configs, Path): + with_configs = self.use_configs + [with_configs] + else: + with_configs = self.use_configs + (with_configs or []) + return with_configs + + def get_help_msg_str(self, with_configs=None): + return self.run("-h", with_configs=with_configs) + + def get_help_msg(self, with_configs=None): + return HelpMsg(self.get_help_msg_str(with_configs=with_configs)) + + def run(self, *args, with_env=None, with_configs=None, expect_fail=False): + return run_cli_cmd( + [*self.cmd_path, *([self.name] if self.name else []), *args], + with_env=with_env or self.with_env, + with_configs=self._with_configs_(with_configs), + expect_fail=expect_fail, + return_details=expect_fail, + ) + + def gen_error(self, *args, with_configs=None, return_stdout=False, return_full=False): + out = self.run( + *args, + with_configs=with_configs, + expect_fail=True, + ) + if return_full: + return out + if return_stdout: + return out["stdout"] + else: + return out["stderr"] + + def __getattr__(self, name: str): + if hasattr(self, 'args') and (name in self.args): + return self.args[name] + elif hasattr(self, 'opts') and (name in self.opts): + return self.opts[name] + elif hasattr(self, 'subcmds') and (name in self.subcmds): + return self.subcmds[name] + elif hasattr(self, 'exts') and (name in self.exts): + return self.exts[name] + return object.__getattribute__(self, name) + + @property + def num_args(self): + return len(self.args) + + @property + def visible_opts(self): + return {n:opt for (n, opt) in self.opts.items() if not opt.hidden} + + @property + def num_opts(self): + return len(self.visible_opts) + 3 # 3 for standard opts (-h, -v, --vk) + + def global_demo(self, name): + print(self.demos) + print(self.global_demos) + if name in self.global_demos: + return self.global_demos[name] + elif name in self.demos: + return self.demos[name] diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py new file mode 100644 index 00000000..349a189e --- /dev/null +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -0,0 +1,367 @@ +class HelpMsg: + def __init__(self, help_str): + print(help_str) + sections = help_str.split("\n\n") + if sections[0] == "Origen, The Semiconductor Developer's Kit": + self.version_str = sections.pop(1).strip() + self.root_cmd = True + else: + self.version_str = None + self.root_cmd = False + + header = sections[0].split("\n") + self.cmd = header[0] + if len(header) > 1: + self.help = "\n".join(header[1:]) + else: + self.help = None + + usage = sections[1].split("\n") + assert usage[0] == "USAGE:" + self.usage = usage[1] + self.after_help_msg = None + + sects = {} + for sect in sections[2:]: + subsects = sect.split("\n") + for (i, s) in enumerate(subsects): + print(f"s: {s}") + if s == "ARGS:": + current = "args" + sects[current] = [] + elif s == "OPTIONS:": + current = "opts" + sects[current] = [] + elif s == "SUBCOMMANDS:": + current = "subcmds" + sects[current] = [] + elif s == "APP COMMAND SHORTCUTS:": + current = "app_cmd_shortcuts" + sects[current] = [] + elif s == "PLUGIN COMMAND SHORTCUTS:": + current = "pl_cmd_shortcuts" + sects[current] = [] + elif s == "AUX COMMAND SHORTCUTS:": + current = "aux_cmd_shortcuts" + sects[current] = [] + elif s == "This command is extended from:": + current = "extensions" + sects["extensions"] = [] + else: + if (i == len(subsects) - 1) and s == "": + next + if not s.startswith(" "): + if current not in ["app_cmd_shortcuts", "pl_cmd_shortcuts", "aux_cmd_shortcuts"]: + current = "after_help_msg" + self.after_help_msg = [s] + elif current == "after_help_msg": + self.after_help_msg.append(s) + else: + sects[current].append(s) + + self.args = [] + if "args" in sects: + for line in sects["args"]: + arg = {} + if line.startswith(' <'): + s = line.strip().split('>', 1) + n = s[0][1:] + arg["value_name"] = n + if s[1].startswith("..."): + arg['multiple_values'] = True + s[1] = s[1][3:] + else: + arg['multiple_values'] = False + s[1] = s[1].strip() + arg['help'] = s[1] if len(s[1]) > 0 else None + else: + arg[n]['help'] += f" {line.strip()}" + self.args.append(arg) + + self.opts = [] + n = None + if "opts" in sects: + for line in sects["opts"]: + print(f"l {line}") + + l = line.strip() + if l[0] == "-": + opt = {} + opt['long_aliases'] = None + opt['short_aliases'] = None + opt['extended_from'] = None + opt['ext_type'] = None + + print(l) + s = l.split(" ", 1) + if len(s) > 1: + opt["help"] = s[1].strip() + else: + opt["help"] = None + + s = s[0].split(" <") + if len(s) > 1: + opt["value_name"] = s[1].split(">")[0] + opt["multiple_values"] = True if ">..." in s[1] else False + else: + opt["value_name"] = None + opt["multiple_values"] = False + + if l[1] == "-": + # Long name only + opt["short_name"] = None + opt["long_name"] = s[0][2:] + else: + names = s[0].split(", ") + if len(names) > 1: + # long name and short name + opt["short_name"] = names[0][1:] + opt["long_name"] = names[1][2:] + else: + # short name only + opt["short_name"] = names[0][1:] + opt["long_name"] = None + self.opts.append(opt) + else: + opt = self.opts[-1] + if "help" in opt: + if opt["help"] is None: + opt["help"] = l + else: + opt["help"] += f" {l}" + else: + opt["help"] = l.strip() + + opt = self.opts[-1] + if ('help' in opt) and (opt['help'] is not None): + import re + + if re.search(r"\[Extended from aux namespace: .*\]", opt['help']): + split = opt['help'].split("[Extended from aux namespace: '", 1) + if len(split) == 2: + if ']' in split[1]: + inner_split = split[1].split("']", 1) + opt['extended_from'] = inner_split[0] + opt['help'] = (split[0] + inner_split[1]).strip() + from .command import SrcTypes + opt['ext_type'] = SrcTypes.AUX + elif re.search(r"\[Extended from plugin: .*\]", opt['help']): + split = opt['help'].split("[Extended from plugin: '", 1) + if len(split) == 2: + if ']' in split[1]: + inner_split = split[1].split("']", 1) + opt['extended_from'] = inner_split[0] + opt['help'] = (split[0] + inner_split[1]).strip() + from .command import SrcTypes + opt['ext_type'] = SrcTypes.PLUGIN + + if re.search(r"\[aliases: .*\]", opt['help']): + print(f"splitting aliases!!: {opt['help']}") + split = opt['help'].split("[aliases: ", 1) + if len(split) == 2: + if ']' in split[1]: + opt['long_aliases'] = [a.strip() for a in split[1].split(']', 1)[0].split(',')] + opt['help'] = split[0] + split[1].split(']', 1)[1] + opt['help'] = opt['help'].strip() + + if re.search(r"\[short aliases: .*\]", opt['help']): + split = opt['help'].split("[short aliases: ", 1) + if len(split) == 2: + if ']' in split[1]: + opt['short_aliases'] = [a.strip() for a in split[1].split(']', 1)[0].split(',')] + opt['help'] = split[0].strip() + + self.subcmds = [] + n = None + if "subcmds" in sects: + print(sects["subcmds"]) + for line in sects["subcmds"]: + if line.startswith(" "): + self.subcmds[-1]["help"] += f" {line.strip()}" + else: + s = line.strip().split(" ", 1) + n = s[0] + self.subcmds.append({ + "name": n, + "help": (s[1].strip() if len(s) > 1 else None) + }) + + if "app_cmd_shortcuts" in sects: + self.app_cmd_shortcuts = {} + for l in sects["app_cmd_shortcuts"]: + cmd = l.split("=>") + for c in cmd[0].strip().split(", "): + self.app_cmd_shortcuts[c] = cmd[1].strip() + else: + self.app_cmd_shortcuts = None + + if "pl_cmd_shortcuts" in sects: + self.pl_cmd_shortcuts = {} + for l in sects["pl_cmd_shortcuts"]: + cmd = l.split("=>") + pln, subc = cmd[1].strip().split(" ") + for c in cmd[0].strip().split(", "): + self.pl_cmd_shortcuts[c] = (pln, subc) + else: + self.plugin_cmd_shortcuts = None + + if "aux_cmd_shortcuts" in sects: + self.aux_cmd_shortcuts = {} + for l in sects["aux_cmd_shortcuts"]: + cmd = l.split("=>") + ns, subc = cmd[1].strip().split(" ") + for c in cmd[0].strip().split(", "): + self.aux_cmd_shortcuts[c] = (ns, subc) + else: + self.aux_cmd_shortcuts = None + self.app_exts = False + self.aux_exts = None + self.pl_exts = None + if "extensions" in sects: + for l in sects["extensions"]: + if l == "- the App": + self.apps_exts = True + + split = l.split("- Aux Namespaces: ", 1) + if len(split) == 2: + self.aux_exts = [s[1:-1] for s in split[1].split(", ")] + next + + split = l.split("- Plugins: ", 1) + if len(split) == 2: + self.pl_exts = [s[1:-1] for s in split[1].split(", ")] + next + + if self.after_help_msg is not None: + self.after_help_msg = ("\n").join(self.after_help_msg) + + @property + def subcmd_names(self): + if self.subcmds: + return [subc["name"] for subc in self.subcmds] + + def assert_num_args(self, expected): + assert len(self.args) == expected + return True + + def assert_num_opts(self, expected): + assert len(self.opts) == expected + return True + + def assert_arg_at(self, expected_index, arg): + a = self.args[expected_index] + if arg.value_name is not False: + if arg.value_name is None: + assert a["value_name"] == arg.name.upper() + else: + assert a["value_name"] == arg.value_name + if arg.multi is not False: + assert a["multiple_values"] == arg.multi + if arg.help is not False: + assert a["help"] == arg.help + return True + + def assert_args(self, *expected): + if expected == (None,): + expected = [] + self.assert_num_args(len(expected)) + for i, a in enumerate(expected): + self.assert_arg_at(i, a) + return True + + def _assert_opt_params_(self, o, opt): + if opt.sn is not False: + assert o["short_name"] == opt.sn + if opt.ln is not False: + if opt.sn is not None: + assert o["long_name"] == opt.ln + else: + assert o["long_name"] == opt.to_ln() + if opt.value_name is not False: + if opt.takes_value: + assert o["value_name"] == opt.to_vn() + assert o["multiple_values"] == opt.multi + # if opt.value_name is None: + # assert o["value_name"] is None + # assert o["multiple_values"] is None + # else: + # assert o["value_name"] == opt.value_name + # assert o["multiple_values"] == opt.multi + if opt.help is not False: + assert o["help"] ==opt.help + if opt.sn_aliases is not False: + assert o['short_aliases'] == opt.sn_aliases + if opt.ln_aliases is not False: + assert o['long_aliases'] == opt.ln_aliases + + def assert_opt_at(self, expected_index, opt): + o = self.opts[expected_index] + self._assert_opt_params_(o, opt) + assert o["extended_from"] is None + assert o["ext_type"] is None + return True + + def assert_ext_at(self, expected_index, ext): + o = self.opts[expected_index] + self._assert_opt_params_(o, ext) + if ext.src_name is not False: + assert o["extended_from"] == ext.src_name + if ext.src_type is not False: + assert o["ext_type"] == ext.src_type + return True + + def assert_opts(self, *expected_opts): + assert self.assert_num_opts(len(expected_opts)) + for i, o in enumerate(expected_opts): + from .command import CmdExtOpt + if isinstance(o, CmdExtOpt): + self.assert_ext_at(i, o) + elif isinstance(o, str): + if o == "help": + self.assert_help_opt_at(i) + elif o == "vk": + self.assert_vk_opt_at(i) + elif o == "v": + self.assert_v_opt_at(i) + else: + raise RuntimeError(f"Unknown keyword opt: {o}") + else: + self.assert_opt_at(i, o) + return True + + def assert_subcmd_at(self, expected_index, subc): + s = self.subcmds[expected_index] + assert s['name'] == subc.name + if subc.help is not False: + assert s['help'] == subc.help + return True + + def assert_subcmds(self, *expected_subcmds): + if expected_subcmds == (None,): + expected_subcmds = [] + assert len(expected_subcmds) == len(self.subcmds) + for i, o in enumerate(expected_subcmds): + if isinstance(o, str): + if o == "help": + self.assert_help_subcmd_at(i) + else: + raise RuntimeError(f"Unknown subcmd keyword: {o}") + else: + self.assert_subcmd_at(i, o) + return True + + def assert_help_subcmd_at(self, expected_index): + from .origen import help_subcmd + return self.assert_subcmd_at(expected_index, help_subcmd()) + + def assert_help_opt_at(self, expected_index): + from .origen import CoreOpts + return self.assert_opt_at(expected_index, CoreOpts.help) + + def assert_v_opt_at(self, expected_index): + from .origen import CoreOpts + return self.assert_opt_at(expected_index, CoreOpts.verbosity) + + def assert_vk_opt_at(self, expected_index): + from .origen import CoreOpts + return self.assert_opt_at(expected_index, CoreOpts.vk) diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py new file mode 100644 index 00000000..5c210bab --- /dev/null +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -0,0 +1,156 @@ +import origen +from .command import CmdOpt, Cmd, CmdArg, CmdDemo + +def help_subcmd(): + return Cmd("help", help="Print this message or the help of the given subcommand(s)") + +class _CommonNames: + aux_cmds = "auxillary_commands" + pls = "plugins" + pl = "plugin" + build = "build" + creds = "credentials" + new = "new" + eval = "eval" + fmt = "fmt" + i = "interactive" + +class CoreCommands: + @classmethod + @property + def all_names(cls): + return [cmd.name for cmd in cls.cmds] + + @classmethod + @property + def all_names_add_help(cls): + return cls.all_names + ["help"] + +class GlobalCommands(CoreCommands): + class Names: + eval = _CommonNames.eval + aux_cmds = _CommonNames.aux_cmds + pls = _CommonNames.pls + pl = _CommonNames.pl + + proj = "proj" + new = _CommonNames.new + creds = _CommonNames.creds + i = _CommonNames.i + fmt = _CommonNames.fmt + build = _CommonNames.build + names = Names() + + eval = Cmd( + names.eval, + help="Evaluates statements in an Origen context", + args=[ + CmdArg("code", "Statements to evaluate", multi=True, required=True) + ], + demos=[CmdDemo( + "minimal", + args=["h = 'hi!'; print( origen.version ); print( h )", "print( h )"], + expected_output=f"{origen.version}\nhi!\nhi!" + )] + ) + aux_cmds = Cmd(names.aux_cmds, help="Interface with auxillary commands") + pls = Cmd(names.pls) + pl = Cmd(names.pl) + proj = Cmd(names.proj) + new = Cmd(names.new) + creds = Cmd(names.creds) + i = Cmd(names.i) + fmt = Cmd(names.fmt) + build = Cmd(names.build) + + commands = [ + proj, new, creds, eval, i, + pls, pl, aux_cmds, fmt, build + ] + cmds = commands + + origen = Cmd("") + +class InAppCommands(CoreCommands): + class Names: + app = "app" + aux_cmds = _CommonNames.aux_cmds + build = _CommonNames.build + compile = "compile" + creds = _CommonNames.creds + env = "env" + eval = _CommonNames.eval + exec = "exec" + fmt = _CommonNames.fmt + generate = "generate" + i = _CommonNames.i + mailer = "mailer" + mode = "mode" + new = _CommonNames.new + pl = _CommonNames.pl + pls = _CommonNames.pls + save_ref = "save_ref" + target = "target" + web = "web" + names = Names() + + app = Cmd(names.app, subcmds=[Cmd("commands")]) + aux_cmds = Cmd(names.aux_cmds) + build = Cmd(names.build) + compile = Cmd(names.compile) + creds = Cmd(names.creds) + env = Cmd(names.env) + eval = Cmd(names.eval) + exec = Cmd(names.exec) + fmt = Cmd(names.fmt) + generate = Cmd(names.generate) + i = Cmd(names.i) + mailer = Cmd(names.mailer) + mode = Cmd(names.mode) + new = Cmd(names.new) + pl = Cmd(names.pl) + pls = Cmd(names.pls) + save_ref = Cmd(names.save_ref) + target = Cmd(names.target) + web = Cmd(names.web) + + commands = [ + app, aux_cmds, build, compile, creds, env, eval, exec, fmt, generate, i, mailer, mode, new, pl, pls, save_ref, target, web + ] + cmds = commands + + origen = Cmd(None) + +class CoreOpts: + help = CmdOpt('help', "Print help information", sn="h", ln="help") + verbosity = CmdOpt('verbosity', "Terminal verbosity level e.g. -v, -vv, -vvv", sn="v") + vk= CmdOpt("verbosity_keywords", "Keywords for verbose listeners", value_name= "verbosity_keywords", takes_value=True, multi=True, sn="k") + +class CoreErrorMessages: + @classmethod + def too_many_args(cls, val): + return f"Found argument '{val}' which wasn't expected, or isn't valid in this context" + + @classmethod + def unknown_opt_msg(cls, opt, ln=True): + if ln: + prefix = "--" + else: + prefix = "-" + + if isinstance(opt, CmdOpt): + n = f"{prefix}{opt.name}" + else: + n = f"{prefix}{opt}" + + return f"Found argument '{n}' which wasn't expected, or isn't valid in this context" + + @classmethod + def missing_required_arg(cls, *vals): + mapped_vals = [] + for v in vals: + if isinstance(v, CmdOpt): + mapped_vals.append(f"{v.ln_to_cli()} <{v.to_vn()}>") + else: + mapped_vals.append(f"<{v.to_vn()}>") + return "The following required arguments were not provided:" + "\n " + " \n".join(mapped_vals) diff --git a/python/origen_metal/origen_metal/_helpers/__init__.py b/python/origen_metal/origen_metal/_helpers/__init__.py index e69de29b..7cfe0ba6 100644 --- a/python/origen_metal/origen_metal/_helpers/__init__.py +++ b/python/origen_metal/origen_metal/_helpers/__init__.py @@ -0,0 +1,25 @@ +import inspect +import multiprocessing as mp + +# TODO swap out assert? + +def in_new_proc(func=None, mod=None, func_kwargs=None, expect_fail=False): + if func is None: + func = getattr(mod, inspect.stack()[1].function) + context = mp.get_context("spawn") + q = context.Queue() + + args=(q, func_kwargs) + proc = context.Process(target=func, args=args) + proc.start() + proc.join() + results = {} + while not q.empty(): + # Convert the populated Queue to a dictionary + obj = q.get() + results[obj[0]] = obj[1] + if expect_fail: + assert proc.exitcode == 1 + else: + assert proc.exitcode == 0 + return results diff --git a/python/origen_metal/tests/framework/users/in_new_proc_funcs.py b/python/origen_metal/tests/framework/users/in_new_proc_funcs.py new file mode 100644 index 00000000..4685f4db --- /dev/null +++ b/python/origen_metal/tests/framework/users/in_new_proc_funcs.py @@ -0,0 +1,8 @@ +def try_home_dir(q, options): + import os + os.environ.pop("HOME", None) + os.environ.pop("USERPROFILE", None) + + import origen_metal + origen_metal.users.lookup_current_id(update_current=True) + origen_metal.users.current_user.set_home_dir() diff --git a/python/origen_metal/tests/framework/users/test_users.py b/python/origen_metal/tests/framework/users/test_users.py index 3740ec71..028574f3 100644 --- a/python/origen_metal/tests/framework/users/test_users.py +++ b/python/origen_metal/tests/framework/users/test_users.py @@ -4,6 +4,8 @@ import origen_metal as om from .shared import Base +from origen_metal._helpers import in_new_proc + from .tests__users_basics import T_Users from .tests__initial_and_current_user import T_InitialAndCurrentUser from .tests__datasets import T_Datasets @@ -14,6 +16,8 @@ from .tests__validating_passwords import T_ValidatingPasswords from .tests__user_roles import T_UserRoles +from .in_new_proc_funcs import try_home_dir + class TestUsers(T_Users): pass @@ -74,6 +78,46 @@ def hd2(self, hd): def hd3(self, hd): return hd.joinpath("3") + @property + def logged_in_user_home_dir(self): + return pathlib.Path.home() + + @property + def routed_user(self): + if not hasattr(self, "_routed_user"): + self._routed_user = False + return self._routed_user + + @property + def routed_dataset(self): + if not hasattr(self, "_routed_dataset"): + self._routed_dataset = False + return self._routed_dataset + + callback_home_dir = Path("/callback_home/") + + def lookup_home_dir_function(self, user, dataset, is_current): + if user.id == "return_str": + return str(self.callback_home_dir.joinpath("str/u_str")) + elif user.id == "return_error": + raise RuntimeError("Encountered user 'return_error'!") + elif user.id == "return_none": + return None + elif user.id == self.logged_in_id: + if dataset is None: + self._routed_user = True + else: + self._routed_dataset = True + return False + elif user.id == "return_true": + return True + else: + hd = self.callback_home_dir.joinpath(user.id) + if dataset is None: + return hd + else: + return hd.joinpath(f"dataset/{dataset.dataset_name}") + def test_home_dir_starts_as_none(self, unload_users, u, ddk): assert u.home_dir is None assert u.datasets[ddk].home_dir is None @@ -115,6 +159,32 @@ def test_home_dir_can_be_set_and_retrieved_per_dataset( assert d.home_dir == Path(hd_str) assert d2.home_dir == hd2 + def test_set_method(self, unload_users, u, d, d2, ddk, d2_name, hd, hd2, hd3): + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + + u.set_home_dir(hd) + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir is None + + d2.set_home_dir(hd2) + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir == hd2 + + d.set_home_dir(hd3) + assert u.home_dir == hd3 + assert d.home_dir == hd3 + assert d2.home_dir == hd2 + + hd_str = "home/dir/str" + d.set_home_dir(hd_str) + assert u.home_dir == Path(hd_str) + assert d.home_dir == Path(hd_str) + assert d2.home_dir == hd2 + def test_home_dir_obeys_hierarchy(self, unload_users, u, d, d2, ddk, d2_name, hd1, hd2): assert u.data_lookup_hierarchy == [ddk, d2_name] @@ -148,6 +218,52 @@ def test_home_dir_iterates_through_hierarchy(self, unload_users, u, d, d2, d.home_dir = hd1 assert u.home_dir == hd1 + def test_clearing_home_dir(self, unload_users, u, d, d2, hd, hd2, hd3): + # Add a 3rd dataset outside of the data lookup hierarchy + # TODO add option to not add to data lookup hierarchy? + old_hierarchy = u.data_lookup_hierarchy + d3 = u.add_dataset("ds3") + d3.home_dir = hd3 + u.data_lookup_hierarchy = old_hierarchy + + d.set_home_dir(hd) + d2.set_home_dir(hd2) + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir == hd2 + + # Clears all home directories in the hierarchy + # d3 (not in hierarchy) should remain + u.clear_home_dir() + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + assert d3.home_dir == hd3 + + d.set_home_dir(hd) + d2.set_home_dir(hd2) + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir == hd2 + assert d3.home_dir == hd3 + + # Clear a specific home dir + d.clear_home_dir() + assert u.home_dir == hd2 + assert d.home_dir is None + assert d2.home_dir == hd2 + assert d3.home_dir == hd3 + + # Use setter method to clear + u.home_dir = None + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + assert d3.home_dir == hd3 + + d3.home_dir = None + assert d3.home_dir is None + def test_requiring_a_home_dir_is_set(self, unload_users, u, hd1): assert u.home_dir is None with pytest.raises( @@ -176,9 +292,201 @@ def test_requiring_a_home_dir_is_set_per_dataset(self, unload_users, u, d, d.home_dir = hd1 assert d.require_home_dir == hd1 + def test_looking_up_home_dir(self, unload_users, users, ddk): + u = users.add(self.logged_in_id) + assert u.home_dir is None + assert u.datasets[ddk].home_dir is None + + u.set_home_dir() + hd = self.logged_in_user_home_dir + assert u.home_dir == hd + assert u.datasets[ddk].home_dir == hd + + def test_looking_up_home_dir_from_callback(self, fresh_frontend, unload_users, users, u): + assert users.lookup_home_dir_function is None + users.lookup_home_dir_function = self.lookup_home_dir_function + assert users.lookup_home_dir_function == users.lookup_home_dir_function + + assert u.home_dir is None + u.set_home_dir() + assert u.home_dir == self.callback_home_dir.joinpath(u.id) + + u_str = users.add("return_str") + assert u_str.home_dir is None + u_str.set_home_dir() + assert u_str.home_dir == self.callback_home_dir.joinpath("str/u_str") + + def test_looking_up_home_dir_for_dataset(self, fresh_frontend, unload_users, users, ddk, hd): + u = users.add(self.logged_in_id) + d = u.datasets[ddk] + d2 = u.add_dataset("ds2", as_topmost=False) + assert u.home_dir is None + assert d.home_dir is None + + u.home_dir = hd + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir is None + + d2.set_home_dir() + assert u.home_dir == hd + assert d2.home_dir == self.logged_in_user_home_dir + + def test_looking_up_home_dir_for_dataset_from_callback(self, fresh_frontend, users, unload_users, u, d, d2): + users.lookup_home_dir_function = self.lookup_home_dir_function + assert d.home_dir is None + assert d2.home_dir is None + + d.set_home_dir() + assert d.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d.dataset_name}") + assert d2.home_dir is None + + d2.set_home_dir() + assert d.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d.dataset_name}") + assert d2.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d2.dataset_name}") + + def test_lookup_home_dir_with_none_argument(self, fresh_frontend, users, unload_users, u, d, d2): + users.lookup_home_dir_function = self.lookup_home_dir_function + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + + u.set_home_dir(None) + assert u.home_dir == self.callback_home_dir.joinpath(u.id) + assert d.home_dir == self.callback_home_dir.joinpath(u.id) + assert d2.home_dir is None + + d2.set_home_dir(None) + assert d2.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d2.dataset_name}") + + def test_error_in_callback(self, fresh_frontend, unload_users, users, hd, hd2, hd3): + users.lookup_home_dir_function = self.lookup_home_dir_function + u = users.add("return_error") + d2 = u.add_dataset("ds2", as_topmost=False) + + err = "Encountered Exception 'RuntimeError' with message: Encountered user 'return_error'!" + + assert u.home_dir is None + with pytest.raises(RuntimeError, match=err): + u.set_home_dir() + assert u.home_dir is None + + u.home_dir = hd + with pytest.raises(RuntimeError, match=err): + u.set_home_dir() + assert u.home_dir == hd + + assert d2.home_dir is None + with pytest.raises(RuntimeError, match=err): + d2.set_home_dir() + assert d2.home_dir is None + + d2.home_dir = hd3 + with pytest.raises(RuntimeError, match=err): + d2.set_home_dir() + assert d2.home_dir == hd3 + + def test_callback_falls_back_to_default(self, fresh_frontend, unload_users, users): + assert self.routed_user is False + users.lookup_home_dir_function = self.lookup_home_dir_function + u = users.add(self.logged_in_id) + d = u.add_dataset("ds") + d2 = u.add_dataset("ds2", as_topmost=False) + assert u.home_dir is None + + u.set_home_dir() + assert u.home_dir == self.logged_in_user_home_dir + assert self.routed_user is True + + assert d2.home_dir is None + assert self.routed_dataset is False + d2.set_home_dir() + assert u.home_dir == self.logged_in_user_home_dir + assert self.routed_dataset is True + + def test_callback_returns_none(self, fresh_frontend, unload_users, users, hd, hd2): + users.lookup_home_dir_function = self.lookup_home_dir_function + u = users.add("return_none") + d = u.add_dataset("ds") + d2 = u.add_dataset("ds2", as_topmost=False) + + assert u.home_dir is None + u.set_home_dir() + assert u.home_dir is None + + u.home_dir = hd + assert u.home_dir == hd + u.set_home_dir() + assert u.home_dir is None + + u.home_dir = hd + assert d2.home_dir is None + d2.set_home_dir() + assert d2.home_dir is None + assert u.home_dir == hd + + d2.home_dir = hd2 + assert d2.home_dir == hd2 + d2.set_home_dir() + assert d2.home_dir is None + assert u.home_dir == hd + + def test_callback_returns_true(self, fresh_frontend, unload_users, users, hd, hd2): + users.lookup_home_dir_function = self.lookup_home_dir_function + u = users.add("return_true") + d = u.add_dataset("ds") + err = "'True' is not a valid return value when looking up a user's home directory" + + u.home_dir = hd + with pytest.raises(RuntimeError, match=err): + u.set_home_dir() + assert u.home_dir == hd + + d.home_dir = hd2 + with pytest.raises(RuntimeError, match=err): + d.set_home_dir() + assert u.home_dir == hd2 + + def test_inappropriate_home_dir_for_user(self, fresh_frontend, unload_users, users, u, hd): + assert u.home_dir is None + err = f"Home directory '.*' is not appropriate for current user with id '{u.id}'" + + with pytest.raises(RuntimeError, match=err): + u.set_home_dir() + assert u.home_dir is None + u.home_dir = hd + + d = u.add_dataset("ds") + with pytest.raises(RuntimeError, match=err): + d.set_home_dir() + assert d.home_dir is None + assert u.home_dir == hd + + def test_error_when_env_is_not_set(self, fresh_frontend, unload_users, users, capfd): + in_new_proc(func=try_home_dir, expect_fail=True) + if om.running_on_windows: + env = "USERPROFILE" + else: + env = "HOME" + assert f"RuntimeError: Please set environment variable {env} to point to your home directory, then try again" in capfd.readouterr().err + + # TEST_NEEDED + @pytest.mark.skip + def test_om_home_dir(self): + raise NotImplementedError() + assert om.home_dir == hd + assert om.home_dir == hd1 + assert om.home_dir == hd2 + + # TEST_NEEDED + @pytest.mark.skip + def test_error_on_om_home_dir_with_no_current_user(self): + raise NotImplementedError() + # TEST_NEEDED + # TODO move elsewhere? @pytest.mark.skip - def test_auto_setting_home_dir(self): + def test_origen_dot_dir(self): raise NotImplementedError() # TEST_NEEDED diff --git a/python/origen_metal/tests/utils/test_ldap.py b/python/origen_metal/tests/utils/test_ldap.py index d356c4dd..a32ac5d8 100644 --- a/python/origen_metal/tests/utils/test_ldap.py +++ b/python/origen_metal/tests/utils/test_ldap.py @@ -104,6 +104,50 @@ } } +JUMPCLOUD = { + "name": "jump_cloud", + "server": "ldap://ldap.jumpcloud.com:389", + "base": "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com", + "auth_config": { + "scheme": "simple_bind", + "username": "uid=sponge,ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com", + "password": "KrabbyPatties#1", + }, + "dn_prefix": None, + "populate_user_config": { + "data_id": "uid", + "mapping": { + "email": "mail", + "last_name": "sn", + "full_name": "cn" + } + }, + "users": { + "p-star": { + "fields": { + 'mail': ['patrick.star@bikini.bottom'], + 'cn': ['Patrick Star'], + 'objectClass': ['top', 'person', 'organizationalPerson', 'inetOrgPerson', 'shadowAccount', 'posixAccount', 'jumpcloudUser'], + 'givenName': ['Patrick'], + 'uid': ['p-star'], + 'uidNumber': ['5002'], + 'gidNumber': ['5002'], + 'sn': ['Star'], + 'homeDirectory': ['/home/p-star'], + 'loginShell': ['/bin/bash'], + }, + "password": "Jellyfishing!", + }, + "squidy": { + "fields": { + 'mail': ['squidward.tentacles@bikini.bottom'], + 'sn': ['Tentacles'], + 'cn': ['Squidward Tentacles'], + } + } + } +} + class Common: def dummy_ldap(self, name=None, timeout=5, continuous_bind=False, populate_user_config=False): if populate_user_config is True: @@ -221,7 +265,7 @@ def __getitem__(self, key): @classmethod def get_dummy_config(cls): - return cls.DummyLDAPConfig(ZFLEX) + return cls.DummyLDAPConfig(JUMPCLOUD) @property def config(self): diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index 1b06a7e1..66e35e7d 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -460,18 +460,42 @@ dependencies = [ "atty", "bitflags", "strsim 0.8.0", - "textwrap", + "textwrap 0.11.0", "unicode-width", "vec_map", ] +[[package]] +name = "clap" +version = "3.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +dependencies = [ + "atty", + "bitflags", + "clap_lex", + "indexmap", + "strsim 0.10.0", + "termcolor", + "textwrap 0.16.0", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + [[package]] name = "cli" version = "2.0.0-dev.5" dependencies = [ "base64-url", "built", - "clap", + "clap 3.2.23", "flate2", "indexmap", "lazy_static", @@ -2556,6 +2580,12 @@ dependencies = [ "whoami 1.2.1", ] +[[package]] +name = "os_str_bytes" +version = "6.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" + [[package]] name = "parking" version = "2.0.0" @@ -2836,7 +2866,7 @@ dependencies = [ "ansi_colours", "ansi_term", "atty", - "clap", + "clap 2.33.3", "console 0.7.7", "content_inspector", "derive_builder", @@ -3800,13 +3830,19 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "structopt" version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69b041cdcb67226aca307e6e7be44c8806423d83e018bd662360a93dabce4d71" dependencies = [ - "clap", + "clap 2.33.3", "lazy_static", "structopt-derive", ] @@ -4012,6 +4048,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "textwrap" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" + [[package]] name = "thiserror" version = "1.0.26" diff --git a/rust/origen/cli/Cargo.toml b/rust/origen/cli/Cargo.toml index c4441c70..bc8a9134 100644 --- a/rust/origen/cli/Cargo.toml +++ b/rust/origen/cli/Cargo.toml @@ -12,7 +12,7 @@ path = "src/bin.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = "2.33.0" +clap = {version = "3.2.17", features = ["unstable-replace"]} origen = { path = ".." } origen_metal = { path = "../../origen_metal" } pathdiff = "0.1" diff --git a/rust/origen/cli/src/app_commands.rs b/rust/origen/cli/src/app_commands.rs deleted file mode 100644 index 2330e7df..00000000 --- a/rust/origen/cli/src/app_commands.rs +++ /dev/null @@ -1,201 +0,0 @@ -//! This module handles the parsing of commands defined by the current application - -use crate::python; -use crate::CommandHelp; -use clap::ArgMatches; -use std::collections::HashMap; -use std::fs; -use std::path::{Path, PathBuf}; -use std::process::exit; - -#[derive(Default, Clone)] -pub struct AppCommands { - root: PathBuf, - pub command_helps: Vec, - pub commands: Vec, -} - -#[derive(Debug, Deserialize)] -struct CommandsToml { - command: Option>, -} - -#[derive(Debug, Deserialize, Clone)] -pub struct Command { - pub name: String, - pub help: String, - pub alias: Option, - pub arg: Option>, - pub subcommand: Option>, -} - -#[derive(Debug, Deserialize, Clone)] -pub struct Arg { - pub name: String, - pub help: String, - pub short: Option, - pub long: Option, - pub takes_value: Option, - pub multiple: Option, - pub required: Option, - pub value_name: Option, - pub use_delimiter: Option, - pub hidden: Option, - pub switch: Option, - pub upcased_name: Option, -} - -impl AppCommands { - pub fn new(root: &Path) -> AppCommands { - AppCommands { - root: root.to_path_buf(), - command_helps: vec![], - commands: vec![], - } - } - - /// Parse the commands from config/commands.toml if found. - /// Will swallow any errors that occur and print an error message, but allowing the CLI - /// boot to continue. - pub fn parse_commands(&mut self) { - let commands_toml = self.root.join("config").join("commands.toml"); - if commands_toml.exists() { - let content = match fs::read_to_string(&commands_toml) { - Ok(x) => x, - Err(e) => { - log_error!("{}", e); - return; - } - }; - - let command_config: CommandsToml = match toml::from_str(&content) { - Ok(x) => x, - Err(e) => { - log_error!("Malformed config/commands.toml: {}", e); - return; - } - }; - - if let Some(commands) = command_config.command { - for mut command in commands { - self.command_helps.push(CommandHelp { - name: command.name.clone(), - help: command.help.clone(), - shortcut: command.alias.clone(), - }); - build_upcase_names(&mut command); - self.commands.push(command); - } - } - } - } - - pub fn max_name_width(&self) -> Option { - self.command_helps - .iter() - .map(|c| c.name.chars().count()) - .max() - } - - pub fn dispatch(&self, mut matches: &ArgMatches) { - let mut commands: Vec = vec![]; - let mut given_args: HashMap> = HashMap::new(); - let mut name; - let mut command: Option<&Command> = None; - - while matches.subcommand_name().is_some() { - // Don't need to worry about not finding here, clap has already pre-screened the given values - name = matches.subcommand_name().unwrap(); - - if let Some(cmd) = command { - command = cmd - .subcommand - .as_ref() - .unwrap() - .iter() - .find(|c| c.name == name); - } else { - command = self.commands.iter().find(|c| c.name == name); - } - - matches = matches.subcommand_matches(&name).unwrap(); - - if let Some(cmd) = command { - if let Some(args) = &cmd.arg { - for arg in args { - if arg.multiple.is_some() && arg.multiple.unwrap() { - if let Some(v) = matches.values_of(&arg.name) { - let vals: Vec = v.map(|v| v.to_string()).collect(); - given_args.insert(arg.name.to_string(), vals); - } - } else { - if let Some(v) = matches.value_of(&arg.name) { - given_args.insert(arg.name.to_string(), vec![v.to_string()]); - } - } - } - } - } - - commands.push(name.to_string()); - } - - let mut cmd = "from origen.boot import run_cmd; run_cmd('_dispatch_', ".to_string(); - - cmd += &format!( - "commands=[{}]", - &commands - .iter() - .map(|s| format!("r'{}'", s)) - .collect::>() - .join(",") - ); - - cmd += ", args={"; - let mut first = true; - for (k, v) in given_args { - if !first { - cmd += ", "; - } - cmd += &format!( - "r'{}': [{}]", - &k, - v.iter() - .map(|s| format!("r'{}'", s)) - .collect::>() - .join(",") - ); - first = false; - } - cmd += "});"; - - log_debug!("Launching Python: '{}'", &cmd); - - match python::run(&cmd) { - Err(e) => { - log_error!("{}", &e); - exit(1); - } - Ok(exit_status) => { - if exit_status.success() { - exit(0); - } else { - exit(exit_status.code().unwrap_or(1)); - } - } - } - } -} - -fn build_upcase_names(command: &mut Command) { - if let Some(args) = &mut command.arg { - for arg in args { - arg.upcased_name = Some(arg.name.to_uppercase()); - } - } - if let Some(subcommands) = &mut command.subcommand { - for mut subcmd in subcommands { - build_upcase_names(&mut subcmd); - } - } -} diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index b805adaa..09af7595 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -5,18 +5,22 @@ extern crate serde; #[macro_use] extern crate origen_metal; -mod app_commands; +mod framework; mod commands; mod python; -use app_commands::AppCommands; -use clap::{App, AppSettings, Arg, SubCommand}; +use clap::{Arg, Command}; use indexmap::map::IndexMap; use origen::{Result, LOGGER, STATUS}; use origen_metal as om; use std::iter::FromIterator; use std::path::Path; use std::process::exit; +use std::collections::HashMap; +use framework::{Extensions, Plugins, AuxCmds, AppCmds, CmdHelps}; +use framework::plugins::{PL_MGR_CMD_NAME, PL_CMD_NAME, run_pl_mgr, run_pl}; +use clap::error::ErrorKind as ClapErrorKind; +use commands::_prelude::clap_arg_actions::*; static VERBOSITY_HELP_STR: &str = "Terminal verbosity level e.g. -v, -vv, -vvv"; static VERBOSITY_KEYWORD_HELP_STR: &str = "Keywords for verbose listeners"; @@ -69,6 +73,8 @@ fn main() -> Result<()> { vec![], None, Some(built_info::PKG_VERSION.to_string()), + None, + None, ); args = args.drain(1..).collect(); } @@ -108,6 +114,8 @@ fn main() -> Result<()> { vec![], exe, Some(built_info::PKG_VERSION.to_string()), + None, + None, ); let version = match STATUS.is_app_present { @@ -120,35 +128,63 @@ fn main() -> Result<()> { ); } - let mut app = App::new("") - .setting(AppSettings::ArgRequiredElseHelp) - .setting(AppSettings::VersionlessSubcommands) - .setting(AppSettings::DisableVersion) + // The main help message is going to be automatically generated to allow us to handle and clearly + // separate commands added by the app and plugins. + // When a command is added below it must also be added to these vectors. + let mut origen_commands: Vec = vec![]; + let mut helps = CmdHelps::new(); + let mut app_cmds: Option; + let mut plugin_commands: IndexMap> = IndexMap::new(); + let mut extensions = Extensions::new(); + let mut aux_cmds = AuxCmds::new(&mut extensions)?; + + let plugins = match Plugins::new(&mut extensions) { + Ok(pl) => pl, + Err(e) => { + log_error!("Failed to collect plugins. Encountered error: {}", e); + None + } + }; + + if let Some(app) = &STATUS.app.as_ref() { + app_cmds = Some(AppCmds::new(app, &mut extensions)?); + } else { + app_cmds = None; + } + + // Structures to hold command aliases and replacements + // Clap does not want to own the values and, in the case of replacements + // cannot be checked (easily) due to borrowing from one command to update another + // Easier to just store things here and have clap reference them. + let mut top_app_replacements: Vec<[&str; 3]> = vec![]; + let mut top_app_cmd_aliases: IndexMap> = IndexMap::new(); + let mut top_pl_replacements: Vec<[&str; 3]> = vec![]; + let mut top_pl_cmd_aliases: IndexMap>> = IndexMap::new(); + let mut top_aux_replacements: Vec<[&str; 3]> = vec![]; + let mut top_aux_cmd_aliases: IndexMap>> = IndexMap::new(); + let mut after_help_str = "".to_string(); + + let mut app = Command::new("") + .arg_required_else_help(true) + .disable_version_flag(true) .before_help("Origen, The Semiconductor Developer's Kit") - .after_help("See 'origen -h' for more information on a specific command.") .version(&*version) .arg( - Arg::with_name("verbose") - .short("v") - .multiple(true) + Arg::new("verbose") + .short('v') + .action(clap::builder::ArgAction::Count) .global(true) .help(VERBOSITY_HELP_STR), ) .arg( - Arg::with_name("verbosity_keywords") - .short("k") + Arg::new("verbosity_keywords") + .short('k') .multiple(true) - .takes_value(true) + .action(AppendArgs) .global(true) .help(VERBOSITY_KEYWORD_HELP_STR), ); - // The main help message is going to be automatically generated to allow us to handle and clearly - // separate commands added by the app and plugins. - // When a command is added below it must also be added to these vectors. - let mut origen_commands: Vec = vec![]; - let mut app_commands: Vec = vec![]; - /************************************************************************************/ /******************** Global only commands ******************************************/ /************************************************************************************/ @@ -163,115 +199,117 @@ fn main() -> Result<()> { app = app .subcommand( - SubCommand::with_name("proj") + Command::new("proj") .display_order(1) .about(proj_help) - .setting(AppSettings::ArgRequiredElseHelp) - .subcommand(SubCommand::with_name("init") + .arg_required_else_help(true) + .subcommand(Command::new("init") .display_order(5) .about("Initialize a new project directory (create an initial project BOM)") - .arg(Arg::with_name("dir") - .takes_value(true) + .arg(Arg::new("dir") + .action(SetArg) .help("The path to the project directory to initialize (PWD will be used by default if not given)") .value_name("DIR") ) ) - .subcommand(SubCommand::with_name("packages") + .subcommand(Command::new("packages") .display_order(7) .about("Displays the IDs of all packages and package groups defined by the BOM") ) - .subcommand(SubCommand::with_name("create") + .subcommand(Command::new("create") .display_order(10) .about("Create a new project workspace from the project BOM") - .arg(Arg::with_name("path") + .arg(Arg::new("path") .help("The path to the new workspace directory") - .takes_value(true) + .action(SetArg) .value_name("PATH") .required(true) ) ) - .subcommand(SubCommand::with_name("update") + .subcommand(Command::new("update") .display_order(15) .about("Update an existing project workspace per its current BOM") - .arg(Arg::with_name("force") - .short("f") + .arg(Arg::new("force") + .short('f') .long("force") .required(false) - .takes_value(false) + .action(SetArgTrue) .help("Force the update and potentially lose any local modifications") ) - .arg(Arg::with_name("links") - .short("l") + .arg(Arg::new("links") + .short('l') .long("links") .required(false) - .takes_value(false) + .action(SetArgTrue) .help("Update the workspace links") ) - .arg(Arg::with_name("packages") + .arg(Arg::new("packages") .value_name("PACKAGES") - .takes_value(true) + .action(AppendArgs) .multiple(true) .help("Packages and/or groups to be updated, run 'origen proj packages' to see a list of possible package IDs") .required_unless("links") .required(true) ) ) - .subcommand(SubCommand::with_name("mods") + .subcommand(Command::new("mods") .display_order(20) .about("Display a list of modified files within the given package(s)") - .arg(Arg::with_name("packages") + .arg(Arg::new("packages") .help("Package(s) to look for modifications in, use 'all' to see the modification to all packages") + .action(AppendArgs) .multiple(true) .value_name("PACKAGES") .required(true) ) ) - .subcommand(SubCommand::with_name("clean") + .subcommand(Command::new("clean") .display_order(20) .about("Revert all local modifications within the given package(s)") - .arg(Arg::with_name("packages") + .arg(Arg::new("packages") .help("Package(s) to revert local modifications in, use 'all' to clean all packages") + .action(AppendArgs) .multiple(true) .value_name("PACKAGES") .required(true) ) ) - .subcommand(SubCommand::with_name("tag") + .subcommand(Command::new("tag") .display_order(20) .about("Apply the given tag to the current view of the given package(s)") - .arg(Arg::with_name("name") + .arg(Arg::new("name") .help("Name of the tag to be applied") - .takes_value(true) + .action(SetArg) .value_name("NAME") .required(true) ) - .arg(Arg::with_name("packages") + .arg(Arg::new("packages") .help("Package(s) to be tagged, use 'all' to tag all packages") .multiple(true) - .takes_value(true) + .action(AppendArgs) .value_name("PACKAGES") .required(true) ) - .arg(Arg::with_name("force") - .short("f") + .arg(Arg::new("force") + .short('f') .long("force") .required(false) - .takes_value(false) + .action(SetArgTrue) .help("Force the application of the tag even if there are local modifications") ) - .arg(Arg::with_name("message") - .short("m") + .arg(Arg::new("message") + .short('m') .long("message") .required(false) - .takes_value(true) + .action(SetArg) .help("A message to be applied with the tag") ) ) - .subcommand(SubCommand::with_name("bom") + .subcommand(Command::new("bom") .display_order(25) .about("View the active BOM in the current or given directory") - .arg(Arg::with_name("dir") - .takes_value(true) + .arg(Arg::new("dir") + .action(SetArg) .help("The path to a directory (PWD will be used by default if not given)") .value_name("DIR") ) @@ -286,27 +324,45 @@ fn main() -> Result<()> { shortcut: None, }); app = app.subcommand( - SubCommand::with_name("new").about(new_help).arg( - Arg::with_name("name") + Command::new("new").about(new_help).arg( + Arg::new("name") .help("The lowercased and underscored name of the new application") - .takes_value(true) + .action(SetArg) .required(true) .number_of_values(1) .value_name("NAME"), ) - .arg(Arg::with_name("setup") + .arg(Arg::new("setup") .help("Don't create the new app's virtual environment after building (need to manually run 'origen env setup' within the new app workspace before using it in that case)") .long("no-setup") .required(false) - .takes_value(false) + .action(SetArgTrue) ), ); } + framework::plugins::add_helps(&mut helps, plugins.as_ref()); + framework::aux_cmds::add_helps(&mut helps, &aux_cmds); + commands::eval::add_helps(&mut helps); + commands::credentials::add_helps(&mut helps); + + if STATUS.is_app_present { + commands::app::add_helps(&mut helps, app_cmds.as_ref().unwrap()); + } + + helps.apply_exts(&extensions); + /************************************************************************************/ /******************** Global and app commands ***************************************/ /************************************************************************************/ + // app = mailer::add_commands(app, &mut origen_commands)?; + app = commands::credentials::add_commands(app, &helps, &extensions)?; + app = commands::eval::add_commands(app, &helps, &extensions)?; + app = commands::interactive::add_commands(app, &mut origen_commands)?; + app = framework::plugins::add_commands(app, &helps, plugins.as_ref(), &extensions)?; + app = framework::aux_cmds::add_commands(app, &helps, &aux_cmds, &extensions)?; + /************************************************************************************/ /******************** Origen dev commands *******************************************/ /************************************************************************************/ @@ -324,7 +380,7 @@ fn main() -> Result<()> { app = app //************************************************************************************/ - .subcommand(SubCommand::with_name("fmt").about(fmt_help)); + .subcommand(Command::new("fmt").about(fmt_help)); } if STATUS.is_origen_present || STATUS.is_app_in_origen_dev_mode { @@ -337,37 +393,7 @@ fn main() -> Result<()> { /******************** In application commands ***************************************/ /************************************************************************************/ if STATUS.is_app_present { - /************************************************************************************/ - let i_help = "Start an Origen console to interact with the DUT"; - origen_commands.push(CommandHelp { - name: "interactive".to_string(), - help: i_help.to_string(), - shortcut: Some("i".to_string()), - }); - app = app.subcommand( - SubCommand::with_name("interactive") - .about(i_help) - .visible_alias("i") - .arg( - Arg::with_name("target") - .short("t") - .long("target") - .help("Override the default target currently set by the workspace") - .takes_value(true) - .use_delimiter(true) - .multiple(true) - .number_of_values(1) - .value_name("TARGET"), - ) - .arg( - Arg::with_name("mode") - .short("m") - .long("mode") - .help("Override the default execution mode currently set by the workspace") - .takes_value(true) - .value_name("MODE"), - ), - ); + app = commands::app::add_commands(app, &helps, app_cmds.as_ref().unwrap(), &extensions)?; /************************************************************************************/ let new_help = "Generate a new block, flow, pattern, etc. for your application"; @@ -377,10 +403,10 @@ fn main() -> Result<()> { shortcut: None, }); app = app.subcommand( - SubCommand::with_name("new") + Command::new("new") .about(new_help) - .setting(AppSettings::ArgRequiredElseHelp) - .subcommand(SubCommand::with_name("dut") + .arg_required_else_help(true) + .subcommand(Command::new("dut") .display_order(5) .about("Create a new top-level (DUT) block, see 'origen new dut -h' for more info") .long_about( @@ -396,14 +422,14 @@ Examples: origen new dut # Creates /blocks/dut/... origen new dut falcon # Creates /blocks/dut/derivatives/falcon/... origen new dut dsp/falcon # Creates /blocks/dut/derivatives/dsp/derivatives/falcon/...") - .arg(Arg::with_name("name") - .takes_value(true) + .arg(Arg::new("name") + .action(SetArg) .required(false) .help("The name of the new DUT") .value_name("NAME") ) ) - .subcommand(SubCommand::with_name("block") + .subcommand(Command::new("block") .display_order(5) .about("Create a new block, see 'origen new block -h' for more info") .long_about( @@ -426,18 +452,18 @@ Examples: # Example of creating a nested sub-block origen new block bist --parent nvm/flash # Creates /blocks/nvm/derivatives/flash/blocks/bist/...") - .arg(Arg::with_name("name") - .takes_value(true) + .arg(Arg::new("name") + .action(SetArg) .required(true) .help("The name of the new block, including its parents if applicable") .value_name("NAME") ) .arg( - Arg::with_name("parent") - .short("p") + Arg::new("parent") + .short('p') .long("parent") .help("Create the new block nested within this existing block") - .takes_value(true) + .action(SetArg) .required(false) .value_name("PARENT") ) @@ -452,58 +478,58 @@ Examples: shortcut: Some("g".to_string()), }); app = app.subcommand( - SubCommand::with_name("generate") + Command::new("generate") .about(g_help) .visible_alias("g") .arg( - Arg::with_name("files") + Arg::new("files") .help("The name of the file(s) to be generated") - .takes_value(true) + .action(AppendArgs) .value_name("FILES") .multiple(true) .required(true), ) .arg( - Arg::with_name("target") - .short("t") + Arg::new("target") + .short('t') .long("target") .help("Override the default target currently set by the workspace") - .takes_value(true) + .action(AppendArgs) .use_delimiter(true) .multiple(true) .number_of_values(1) .value_name("TARGET"), ) .arg( - Arg::with_name("mode") - .short("m") + Arg::new("mode") + .short('m') .long("mode") .help("Override the default execution mode currently set by the workspace") - .takes_value(true) + .action(SetArg) .value_name("MODE"), ) .arg( - Arg::with_name("output_dir") - .short("o") + Arg::new("output_dir") + .short('o') .long("output-dir") .help("Override the default output directory (/output)") - .takes_value(true) + .action(SetArg) .value_name("OUTPUT_DIR"), ) .arg( - Arg::with_name("reference_dir") - .short("r") + Arg::new("reference_dir") + .short('r') .long("reference-dir") .help("Override the default reference directory (/.ref)") - .takes_value(true) + .action(SetArg) .value_name("REFERENCE_DIR"), ) .arg( - Arg::with_name("debug") + Arg::new("debug") .long("debug") - .short("d") + .short('d') .help("Enable Python caller tracking for debug (takes longer to execute)") - .takes_value(false), + .action(SetArgTrue), ), ); @@ -515,34 +541,34 @@ Examples: shortcut: Some("c".to_string()), }); app = app.subcommand( - SubCommand::with_name("compile") + Command::new("compile") .about(c_help) .visible_alias("c") .arg( - Arg::with_name("files") + Arg::new("files") .help("The name of the file(s) to be generated") - .takes_value(true) + .action(AppendArgs) .value_name("FILES") .multiple(true) .required(true), ) .arg( - Arg::with_name("target") - .short("t") + Arg::new("target") + .short('t') .long("target") .help("Override the default target currently set by the workspace") - .takes_value(true) + .action(AppendArgs) .use_delimiter(true) .multiple(true) .number_of_values(1) .value_name("TARGET"), ) .arg( - Arg::with_name("mode") - .short("m") + Arg::new("mode") + .short('m') .long("mode") .help("Override the default execution mode currently set by the workspace") - .takes_value(true) + .action(SetArg) .value_name("MODE"), ), ); @@ -555,98 +581,98 @@ Examples: shortcut: Some("t".to_string()), }); app = app.subcommand( - SubCommand::with_name("target") + Command::new("target") .about(t_help) .visible_alias("t") .arg( - Arg::with_name("full-paths") + Arg::new("full-paths") .long("full-paths") - .short("f") + .short('f') .help("Display targets' full paths") - .takes_value(false), + .action(SetArgTrue), ) .subcommand( - SubCommand::with_name("add") + Command::new("add") .about("Activates the given target(s)") .visible_alias("a") .arg( - Arg::with_name("targets") + Arg::new("targets") .help("Targets to be activated") - .takes_value(true) + .action(AppendArgs) .value_name("TARGETS") .multiple(true) .required(true), ) .arg( - Arg::with_name("full-paths") + Arg::new("full-paths") .long("full-paths") - .short("f") + .short('f') .help("Display targets' full paths") - .takes_value(false), + .action(SetArgTrue), ), ) .subcommand( - SubCommand::with_name("remove") + Command::new("remove") .about("Deactivates the given target(s)") .visible_alias("r") .arg( - Arg::with_name("targets") + Arg::new("targets") .help("Targets to be deactivated") - .takes_value(true) + .action(AppendArgs) .value_name("TARGETS") .multiple(true) .required(true), ) .arg( - Arg::with_name("full-paths") + Arg::new("full-paths") .long("full-paths") - .short("f") + .short('f') .help("Display targets' full paths") - .takes_value(false), + .action(SetArgTrue), ), ) .subcommand( - SubCommand::with_name("set") + Command::new("set") .about("Activates the given target(s) while deactivating all others") .visible_alias("s") .arg( - Arg::with_name("targets") + Arg::new("targets") .help("Targets to be set") - .takes_value(true) + .action(AppendArgs) .value_name("TARGETS") .multiple(true) .required(true), ) .arg( - Arg::with_name("full-paths") + Arg::new("full-paths") .long("full-paths") - .short("f") + .short('f') .help("Display targets' full paths") - .takes_value(false), + .action(SetArgTrue), ), ) .subcommand( - SubCommand::with_name("default") + Command::new("default") .about("Activates the default target(s) while deactivating all others") .visible_alias("d") .arg( - Arg::with_name("full-paths") + Arg::new("full-paths") .long("full-paths") - .short("f") + .short('f') .help("Display targets' full paths") - .takes_value(false), + .action(SetArgTrue), ), ) .subcommand( - SubCommand::with_name("view") + Command::new("view") .about("Views the currently activated target(s)") .visible_alias("v") .arg( - Arg::with_name("full-paths") + Arg::new("full-paths") .long("full-paths") - .short("f") + .short('f') .help("Display targets' full paths") - .takes_value(false), + .action(SetArgTrue), ), ), ); @@ -659,66 +685,66 @@ Examples: shortcut: Some("w".to_string()), }); app = app.subcommand( - SubCommand::with_name("web") + Command::new("web") .about(t_help) - .setting(AppSettings::ArgRequiredElseHelp) + .arg_required_else_help(true) .visible_alias("w") .subcommand( - SubCommand::with_name("build") // What I think this command should be called + Command::new("build") // What I think this command should be called .about("Builds the web documentation") .visible_alias("b") .visible_alias("compile") // If coming from O1 .visible_alias("html") // If coming from Sphinx and using quickstart's Makefile .arg( - Arg::with_name("view") + Arg::new("view") .long("view") .help("Launch your web browser after the build") - .takes_value(false), + .action(SetArgTrue), ) .arg( - Arg::with_name("clean") + Arg::new("clean") .long("clean") .help( "Clean up directories from previous builds and force a rebuild", ) - .takes_value(false), + .action(SetArgTrue), ) .arg( - Arg::with_name("release") + Arg::new("release") .long("release") - .short("r") + .short('r') .help("Release (deploy) the resulting web pages") - .takes_value(false), + .action(SetArgTrue), ) .arg( - Arg::with_name("archive") + Arg::new("archive") .long("archive") - .short("a") + .short('a') .help("Archive the resulting web pages after building") - .takes_value(true) + .action(SetArg) .multiple(false) .min_values(0), ) .arg( - Arg::with_name("as-release") + Arg::new("as-release") .long("as-release") .help("Build webpages with release checks") - .takes_value(false), + .action(SetArgTrue), ) .arg( - Arg::with_name("release-with-warnings") + Arg::new("release-with-warnings") .long("release-with-warnings") .help("Release webpages even if warnings persists") - .takes_value(false), + .action(SetArgTrue), ) .arg( - Arg::with_name("no-api") + Arg::new("no-api") .long("no-api") .help("Skip building the API") - .takes_value(false), + .action(SetArgTrue), ) .arg( - Arg::with_name("sphinx-args") + Arg::new("sphinx-args") .long("sphinx-args") .help( "Additional arguments to pass to the 'sphinx-build' command @@ -726,22 +752,22 @@ Examples: E.g.: 'origen web build --sphinx-args \"-q -D my_config_define=1\"' -> 'sphinx-build -q -D my_config_define=1'", ) - .takes_value(true) + .action(SetArg) .multiple(false) .allow_hyphen_values(true), - ), // .arg(Arg::with_name("pdf") + ), // .arg(Arg::new("pdf") // .long("pdf") // .help("Create a PDF of resulting web pages") - // .takes_value(false) + // .action(SetArgTrue) // ) ) .subcommand( - SubCommand::with_name("view") + Command::new("view") .about("Launches your web browser to view previously built documentation") .visible_alias("v"), ) .subcommand( - SubCommand::with_name("clean") + Command::new("clean") .about("Cleans the output directory and all cached files"), ), ); @@ -755,51 +781,51 @@ Examples: shortcut: None, }); app = app.subcommand( - SubCommand::with_name("mailer") + Command::new("mailer") .about(mailer_help) - .setting(AppSettings::ArgRequiredElseHelp) + .arg_required_else_help(true) .subcommand( - SubCommand::with_name("send") + Command::new("send") .about("Quickly send an email") .arg( - Arg::with_name("body") + Arg::new("body") .help("Email message body") .long("body") - .takes_value(true) + .action(SetArg) .required(true) .value_name("BODY") .index(1), ) .arg( - Arg::with_name("subject") + Arg::new("subject") .help("Email subject line") .long("subject") - .short("s") - .takes_value(true) + .short('s') + .action(SetArg) .value_name("SUBJECT"), ) .arg( - Arg::with_name("to") + Arg::new("to") .help("Recipient list") .long("to") - .short("t") - .takes_value(true) + .short('t') + .action(AppendArgs) .required(true) .multiple(true) .value_name("TO"), ), ) .subcommand( - SubCommand::with_name("test") + Command::new("test") .about("Send a test email") .arg( - Arg::with_name("to") + Arg::new("to") .help( "Recipient list. If omitted, will be sent to the current user", ) .long("to") - .short("t") - .takes_value(true) + .short('t') + .action(AppendArgs) .required(false) .multiple(true) .value_name("TO"), @@ -807,65 +833,6 @@ Examples: ), ); - /************************************************************************************/ - let credentials_help = "Set or clear user credentials"; - origen_commands.push(CommandHelp { - name: "credentials".to_string(), - help: credentials_help.to_string(), - shortcut: None, - }); - app = app.subcommand( - SubCommand::with_name("credentials") - .about(credentials_help) - .setting(AppSettings::ArgRequiredElseHelp) - .subcommand( - SubCommand::with_name("set") - .about("Set the current user's password") - .arg( - Arg::with_name("all") - .help("Set the password for all datasets") - .takes_value(false) - .required(false) - .long("all") - .short("a"), - ) - .arg( - Arg::with_name("dataset") - .help("Specify the dataset to set the password for") - .takes_value(true) - .required(false) - .value_name("DATASET") - .multiple(true) - .conflicts_with("all") - .long("dataset") - .short("d"), - ), - ) - .subcommand( - SubCommand::with_name("clear") - .about("Clear the user's password") - .arg( - Arg::with_name("all") - .help("Clear the password for all datasets") - .takes_value(false) - .required(false) - .conflicts_with("dataset") - .long("all") - .short("a"), - ) - .arg( - Arg::with_name("dataset") - .help("Specify the dataset to clear the password for") - .takes_value(true) - .required(false) - .value_name("DATASET") - .multiple(true) - .long("dataset") - .short("d"), - ), - ), - ); - /************************************************************************************/ let mode_help = "Set/view the default execution mode"; origen_commands.push(CommandHelp { @@ -874,117 +841,17 @@ Examples: shortcut: Some("m".to_string()), }); app = app.subcommand( - SubCommand::with_name("mode") + Command::new("mode") .about(mode_help) .visible_alias("m") .arg( - Arg::with_name("mode") + Arg::new("mode") .help("The name of the mode to be set as the default mode") - .takes_value(true) + .action(SetArg) .value_name("MODE"), ), ); - /************************************************************************************/ - let app_help = "Commands for packaging and releasing your application"; - origen_commands.push(CommandHelp { - name: "app".to_string(), - help: app_help.to_string(), - shortcut: None, - }); - app = app.subcommand( - SubCommand::with_name("app") - .about(app_help) - .setting(AppSettings::ArgRequiredElseHelp) - .subcommand( - SubCommand::with_name("init") - .about("Initialize the application's revision control") - ) - .subcommand( - SubCommand::with_name("status") - .about("Show any local changes") - .arg(Arg::with_name("modified") - .long("modified") - .takes_value(false) - .help("Show tracked, modified files") - ) - .arg(Arg::with_name("untracked") - .long("untracked") - .takes_value(false) - .help("Show untracked files") - ) - ) - .subcommand( - SubCommand::with_name("checkin") - .about("Check in the given pathspecs") - .arg(Arg::with_name("pathspecs") - .help("The paths to be checked in") - .takes_value(true) - .value_name("PATHSPECS") - .multiple(true) - ) - .arg(Arg::with_name("all") - .long("all") - .short("a") - .takes_value(false) - .conflicts_with("pathspecs") - .help("Check in all changes in the workspace") - ) - .arg(Arg::with_name("dry-run") - .long("dry-run") - .takes_value(false) - .conflicts_with("pathspecs") - .help("Perform a dry-run only") - ) - .arg(Arg::with_name("message") - .long("message") - .short("m") - .takes_value(true) - .required(true) - .help("Message to provide with the check-in operation") - ) - ) - .subcommand( - SubCommand::with_name("package") - .about("Build the app into publishable package (e.g., a 'python wheel')"), - ) - .subcommand(SubCommand::with_name("run_publish_checks") - .about("Run production-ready and publish-ready checks") - ) - .subcommand(SubCommand::with_name("publish") - .about("Publish (release) the app") - .arg(Arg::with_name("dry-run") - .long("dry-run") - .takes_value(false) - .help("Runs through the entire process except the uploading and mailer steps") - ) - .arg(Arg::with_name("version") - .long("version") - .takes_value(true) - .value_name("VERSION") - .help("Publish with the given version increment") - ) - .arg(Arg::with_name("release-note") - .long("release-note") - .takes_value(true) - .value_name("NOTE") - .help("Publish with the given release note") - ) - .arg(Arg::with_name("release-title") - .long("release-title") - .takes_value(true) - .value_name("TITLE") - .help("Publish with the given release title") - ) - .arg(Arg::with_name("no-release-title") - .long("no-release-title") - .takes_value(false) - .help("Indicate no release title will be provided") - .conflicts_with("release-title") - ) - ), - ); - /************************************************************************************/ let env_help = "Manage your application's Origen/Python environment (dependencies, etc.)"; origen_commands.push(CommandHelp { @@ -992,19 +859,19 @@ Examples: help: env_help.to_string(), shortcut: None, }); - app = app.subcommand(SubCommand::with_name("env").about(env_help) - .setting(AppSettings::ArgRequiredElseHelp) + app = app.subcommand(Command::new("env").about(env_help) + .arg_required_else_help(true) .subcommand( - SubCommand::with_name("setup") + Command::new("setup") .about("Setup your application's Python environment for the first time in a new workspace, this will install dependencies per the poetry.lock file") - .arg(Arg::with_name("origen") + .arg(Arg::new("origen") .long("origen") .help("The path to a local version of Origen to use (to develop Origen)") - .takes_value(true), - ), + .action(SetArg) + ), ) .subcommand( - SubCommand::with_name("update") + Command::new("update") .about("Update your application's Python dependencies according to the latest pyproject.toml file"), ) ); @@ -1017,22 +884,21 @@ Examples: shortcut: None, }); app = app.subcommand( - SubCommand::with_name("exec") + Command::new("exec") .about(exec_help) - .setting(AppSettings::ArgRequiredElseHelp) - .setting(AppSettings::DisableVersion) - .setting(AppSettings::AllowLeadingHyphen) + .arg_required_else_help(true) + .allow_hyphen_values(true) .arg( - Arg::with_name("cmd") + Arg::new("cmd") .help("The command to be run") - .takes_value(true) + .action(SetArg) .required(true) .value_name("COMMAND"), ) .arg( - Arg::with_name("args") + Arg::new("args") .help("Arguments to be passed to the command") - .takes_value(true) + .action(AppendArgs) .allow_hyphen_values(true) .multiple(true) .number_of_values(1) @@ -1050,28 +916,28 @@ Examples: shortcut: None, }); app = app.subcommand( - SubCommand::with_name("save_ref") + Command::new("save_ref") .about(save_ref_help) .arg( - Arg::with_name("files") + Arg::new("files") .help("The name of the file(s) to be saved") - .takes_value(true) + .action(SetArg) .value_name("FILES") .multiple(true) .required_unless_one(&["new", "changed"]), ) .arg( - Arg::with_name("new") + Arg::new("new") .long("new") .required(false) - .takes_value(false) + .action(SetArgTrue) .help("Update all NEW file references from the last generate run"), ) .arg( - Arg::with_name("changed") + Arg::new("changed") .long("changed") .required(false) - .takes_value(false) + .action(SetArgTrue) .help("Update all CHANGED file references from the last generate run"), ), ); @@ -1084,29 +950,6 @@ Examples: .max() .unwrap(); - let mut app_command_defs = AppCommands::new(Path::new("/")); - let cmds; - if STATUS.is_app_present { - app_command_defs = AppCommands::new(&origen::app().unwrap().root); - app_command_defs.parse_commands(); - // Need to hold this in a long-lived immutable reference for referencing in clap args - cmds = app_command_defs.commands.clone(); - - if let Some(width) = app_command_defs.max_name_width() { - if width > name_width { - name_width = width; - } - } - for command in &app_command_defs.command_helps { - app_commands.push(command.clone()); - } - // This defines the application commands - // For each command - for i in 0..cmds.len() { - let cmd = build_command(&cmds[i]); - app = app.subcommand(cmd); - } - } // Clap is great, but its generated help doesn't give the flexibility needed to handle things // like app and plugin command additions, so we make our own @@ -1132,57 +975,261 @@ CORE COMMANDS: help_message += &command.render(name_width); } - if !app_commands.is_empty() { - help_message += "\nAPP COMMANDS:\n"; - for command in &app_commands { - help_message += &command.render(name_width); + help_message += "\nSee 'origen -h' for more information on a specific command."; + + let h = &*Box::leak(help_message.into_boxed_str()); + let mut all_cmds_and_aliases = vec![]; + for subc in app.get_subcommands() { + all_cmds_and_aliases.push(subc.get_name().to_string()); + for a in subc.get_all_aliases() { + all_cmds_and_aliases.push(a.to_string()); + } + } + + if let Some(a_cmds) = app_cmds.as_ref() { + for top_cmd in a_cmds.top_commands.iter() { + // TODO test that aliases vs. command names at the same level are safe (clap should fail earlier for this) + match app.try_get_matches_from_mut(["origen", top_cmd]) { + Ok(_) => { + top_app_cmd_aliases.insert(top_cmd.to_string(), vec!(top_cmd.to_string())); + top_app_replacements.push(["app", "commands", top_cmd]); + }, + Err(e) => { + match e.kind { + (ClapErrorKind::DisplayHelp | + ClapErrorKind::DisplayHelpOnMissingArgumentOrSubcommand | + ClapErrorKind::DisplayVersion | + ClapErrorKind::UnknownArgument) => { + top_app_cmd_aliases.insert(top_cmd.to_string(), vec!(top_cmd.to_string())); + top_app_replacements.push(["app", "commands", top_cmd]); + }, + _ => {} + } + }, + } + let current_top_cmd_aliases = app.find_subcommand("app").unwrap().find_subcommand("commands").unwrap().find_subcommand(top_cmd).unwrap().get_all_aliases().map( |a| a.to_string()).collect::>(); + for a in current_top_cmd_aliases.iter() { + match app.try_get_matches_from_mut(["origen", a]) { + Ok(_) => { + if let Some(aliases) = top_app_cmd_aliases.get_mut(top_cmd) { + aliases.push(a.to_string()); + } else { + top_app_cmd_aliases.insert(top_cmd.to_string(), vec!(a.to_string())); + } + }, + Err(e) => { + match e.kind { + (ClapErrorKind::DisplayHelp | + ClapErrorKind::DisplayHelpOnMissingArgumentOrSubcommand | + ClapErrorKind::DisplayVersion | + ClapErrorKind::UnknownArgument) => { + if let Some(aliases) = top_app_cmd_aliases.get_mut(top_cmd) { + aliases.push(a.to_string()); + } else { + top_app_cmd_aliases.insert(top_cmd.to_string(), vec!(a.to_string())); + } + }, + _ => {} + } + }, + } + } + } + + let mut strs = vec!(); + if !top_app_cmd_aliases.is_empty() { + let mut len = 0; + for (n, aliases) in top_app_cmd_aliases.iter() { + for a in aliases.iter() { + top_app_replacements.push(["app", "commands", a]); + } + + let s = aliases.join(", "); + let l = s.len(); + if l > len { + len = l; + } + strs.push((s, l, n)) + } + for r in top_app_replacements.iter() { + app = app.replace(r[2], r); + } + after_help_str += "APP COMMAND SHORTCUTS:\nThe following shortcuts to application commands are available:\n"; + for s in strs.iter() { + after_help_str += &format!(" {s}{: {c}\n", "", w=(len - s.1), s=s.0, c=s.2); + } + after_help_str += "\n"; + } + } + + if let Some(pls) = plugins.as_ref() { + for (n, pl) in pls.plugins.iter() { + for top_cmd in pl.top_commands.iter() { + if !all_cmds_and_aliases.contains(top_cmd) { + if let Some(cmd_aliases) = top_pl_cmd_aliases.get_mut(n) { + cmd_aliases.insert(top_cmd.to_string(), vec!(top_cmd.to_string())); + } else { + let mut pl_aliases = IndexMap::new(); + pl_aliases.insert(top_cmd.to_string(), vec!(top_cmd.to_string())); + top_pl_cmd_aliases.insert(n.to_string(), pl_aliases); + all_cmds_and_aliases.push(top_cmd.to_string()); + } + } + + let current_top_cmd_aliases = app.find_subcommand("plugin").unwrap().find_subcommand(n).unwrap().find_subcommand(top_cmd).unwrap().get_all_aliases().map( |a| a.to_string()).collect::>(); + for a in current_top_cmd_aliases.iter() { + if !all_cmds_and_aliases.contains(a) { + if let Some(pl_aliases) = top_pl_cmd_aliases.get_mut(n) { + if let Some(cmd_aliases) = pl_aliases.get_mut(top_cmd) { + cmd_aliases.push(a.to_string()); + } else { + pl_aliases.insert(top_cmd.to_string(), vec!(a.to_string())); + } + } else { + let mut pl_aliases = IndexMap::new(); + pl_aliases.insert(top_cmd.to_string(), vec!(a.to_string())); + top_pl_cmd_aliases.insert(n.to_string(), pl_aliases); + } + all_cmds_and_aliases.push(a.to_string()); + } + } + } + } + + let mut strs = vec!(); + if !top_pl_cmd_aliases.is_empty() { + let mut len = 0; + for (pln, pl_aliases) in top_pl_cmd_aliases.iter() { + for (cmdn, cmda) in pl_aliases { + for a in cmda.iter() { + top_pl_replacements.push(["plugin", pln, cmdn]); + } + + let s = cmda.join(", "); + let l = s.len(); + if l > len { + len = l; + } + strs.push((s, l, format!("{} {}", pln, cmdn))) + } + } + + for r in top_pl_replacements.iter() { + app = app.replace(r[2], r); + } + + after_help_str += "PLUGIN COMMAND SHORTCUTS:\nThe following shortcuts to plugin commands are available:\n"; + for s in strs.iter() { + after_help_str += &format!(" {s}{: {c}\n", "", w=(len - s.1), s=s.0, c=s.2); + } + after_help_str += "\n"; } } - help_message += "\nSee 'origen -h' for more information on a specific command."; + for (n, ns) in aux_cmds.namespaces.iter() { + for top_cmd in ns.top_commands.iter() { + if !all_cmds_and_aliases.contains(top_cmd) { + if let Some(cmd_aliases) = top_aux_cmd_aliases.get_mut(n) { + cmd_aliases.insert(top_cmd.to_string(), vec!(top_cmd.to_string())); + } else { + let mut ns_aliases = IndexMap::new(); + ns_aliases.insert(top_cmd.to_string(), vec!(top_cmd.to_string())); + top_aux_cmd_aliases.insert(n.to_string(), ns_aliases); + } + all_cmds_and_aliases.push(top_cmd.to_string()); + } - app = app.help(help_message.as_str()); + let current_top_cmd_aliases = app.find_subcommand("auxillary_commands").unwrap().find_subcommand(n).unwrap().find_subcommand(top_cmd).unwrap().get_all_aliases().map( |a| a.to_string()).collect::>(); + for a in current_top_cmd_aliases.iter() { + if !all_cmds_and_aliases.contains(a) { + if let Some(ns_aliases) = top_aux_cmd_aliases.get_mut(n) { + if let Some(cmd_aliases) = ns_aliases.get_mut(top_cmd) { + cmd_aliases.push(a.to_string()); + } else { + ns_aliases.insert(top_cmd.to_string(), vec!(a.to_string())); + } + } else { + let mut ns_aliases = IndexMap::new(); + ns_aliases.insert(top_cmd.to_string(), vec!(a.to_string())); + top_aux_cmd_aliases.insert(n.to_string(), ns_aliases); + } + all_cmds_and_aliases.push(a.to_string()); + } + } + } + } + if !top_aux_cmd_aliases.is_empty() { + let mut strs = vec!(); + let mut len = 0; + for (auxn, aux_aliases) in top_aux_cmd_aliases.iter() { + for (cmdn, cmda) in aux_aliases { + for a in cmda.iter() { + top_aux_replacements.push(["auxillary_commands", auxn, cmdn]); + } - let matches = app.get_matches(); + let s = cmda.join(", "); + let l = s.len(); + if l > len { + len = l; + } + strs.push((s, l, format!("{} {}", auxn, cmdn))) + } + } + + for r in top_aux_replacements.iter() { + app = app.replace(r[2], r); + } + + after_help_str += "AUX COMMAND SHORTCUTS:\nThe following shortcuts to auxillary commands are available:\n"; + for s in strs.iter() { + after_help_str += &format!(" {s}{: {c}\n", "", w=(len - s.1), s=s.0, c=s.2); + } + after_help_str += "\n"; + } + + after_help_str += "See 'origen -h' for more information on a specific command."; + app = app.after_help(&*after_help_str); - let _ = LOGGER.set_verbosity(matches.occurrences_of("verbose") as u8); - if let Some(keywords) = matches.values_of("verbosity_keywords") { + let matches = app.get_matches_mut(); + + let _ = LOGGER.set_verbosity(*matches.get_one::("verbose").unwrap()); + if let Some(keywords) = matches.get_many::("verbosity_keywords") { let _ = LOGGER.set_verbosity_keywords(keywords.map(|k| k.to_string()).collect()); } + macro_rules! run_cmd_match_case { + ($cmd:ident, $cmd_name:ident) => { + commands::$cmd::run(matches.subcommand_matches(commands::$cmd::$cmd_name).unwrap(), &app, &extensions, plugins.as_ref())? + }; + ($cmd:ident) => { + commands::$cmd::run(matches.subcommand_matches(commands::$cmd::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref())? + } + } + match matches.subcommand_name() { - Some("app") => commands::app::run(matches.subcommand_matches("app").unwrap()), + Some(commands::app::CMD_NAME) => commands::app::run(matches.subcommand_matches(commands::app::CMD_NAME).unwrap(), &app, &extensions, plugins.as_ref(), &app_cmds.as_ref().unwrap())?, Some("env") => commands::env::run(matches.subcommand_matches("env").unwrap()), Some("fmt") => commands::fmt::run()?, Some("new") => commands::new::run(matches.subcommand_matches("new").unwrap()), Some("build") => commands::build::run(matches.subcommand_matches("build").unwrap())?, Some("proj") => commands::proj::run(matches.subcommand_matches("proj").unwrap()), - Some("interactive") => { - log_trace!("Launching interactive session"); - let m = matches.subcommand_matches("interactive").unwrap(); - commands::interactive::run( - if let Some(targets) = m.values_of("target") { - Some(targets.collect()) - } else { - Option::None - }, - &m.value_of("mode"), - ); - } + Some(commands::eval::BASE_CMD) => run_cmd_match_case!(eval), + Some(commands::interactive::BASE_CMD) => run_cmd_match_case!(interactive), + Some(commands::aux_cmds::CMD_NAME) => commands::aux_cmds::run(matches.subcommand_matches(commands::aux_cmds::CMD_NAME).unwrap(), &app, &extensions, plugins.as_ref(), &aux_cmds)?, Some("generate") => { let m = matches.subcommand_matches("generate").unwrap(); commands::launch( "generate", - if let Some(targets) = m.values_of("target") { - Some(targets.collect()) + if let Some(targets) = m.get_many::("target") { + Some(targets.map(|t| t.as_str()).collect()) } else { Option::None }, - &m.value_of("mode"), - Some(m.values_of("files").unwrap().collect()), - m.value_of("output_dir"), - m.value_of("reference_dir"), - m.is_present("debug"), + &m.get_one::<&str>("mode").map(|s| *s), + Some(m.get_many::("files").unwrap().map(|t| t.as_str()).collect()), + m.get_one::<&str>("output_dir").map(|s| *s), + m.get_one::<&str>("reference_dir").map(|s| *s), + m.contains_id("debug"), None, ); } @@ -1190,76 +1237,76 @@ CORE COMMANDS: let m = matches.subcommand_matches("compile").unwrap(); commands::launch( "compile", - if let Some(targets) = m.values_of("target") { - Some(targets.collect()) + if let Some(targets) = m.get_many::("target") { + Some(targets.map(|t| t.as_str()).collect()) } else { Option::None }, - &m.value_of("mode"), - Some(m.values_of("files").unwrap().collect()), - m.value_of("output_dir"), - m.value_of("reference_dir"), + &m.get_one::<&str>("mode").map(|s| *s), + Some(m.get_many::("files").unwrap().map(|t| t.as_str()).collect()), + m.get_one::<&str>("output_dir").map(|s| *s), + m.get_one::<&str>("reference_dir").map(|s| *s), false, None, ); } Some("target") => { let m = matches.subcommand_matches("target").unwrap(); - let subm = m.subcommand(); - if let Some(s) = subm.1 { + if let Some(subm) = m.subcommand() { + let s = subm.1; commands::target::run( Some(subm.0), - match s.values_of("targets") { - Some(targets) => Some(targets.collect()), + match s.get_many::("targets") { + Some(targets) => Some(targets.map(|t| t.as_str()).collect()), None => None, }, - s.is_present("full-paths"), + s.contains_id("full-paths"), ) } else { - commands::target::run(None, None, m.is_present("full-paths")); + commands::target::run(None, None, m.contains_id("full-paths")); } } Some("web") => { let cmd = matches.subcommand_matches("web").unwrap(); - let subcmd = cmd.subcommand(); - let sub = subcmd.1.unwrap(); + let subcmd = cmd.subcommand().unwrap(); + let sub = subcmd.1; match subcmd.0 { "build" => { let mut args = IndexMap::new(); - if sub.is_present("view") { + if sub.contains_id("view") { args.insert("view", "True".to_string()); } - if sub.is_present("clean") { + if sub.contains_id("clean") { args.insert("clean", "True".to_string()); } - if sub.is_present("no-api") { + if sub.contains_id("no-api") { args.insert("no-api", "True".to_string()); } - if sub.is_present("as-release") { + if sub.contains_id("as-release") { args.insert("as-release", "True".to_string()); } - if sub.is_present("release-with-warnings") { + if sub.contains_id("release-with-warnings") { args.insert("release-with-warnings", "True".to_string()); } - if sub.is_present("release") { + if sub.contains_id("release") { args.insert("release", "True".to_string()); } - if sub.is_present("archive") { - if let Some(archive) = sub.value_of("archive") { + if sub.contains_id("archive") { + if let Some(archive) = sub.get_one::<&str>("archive") { args.insert("archive", format!("'{}'", archive)); } else { args.insert("archive", "True".to_string()); } } - if let Some(s_args) = sub.value_of("sphinx-args") { + if let Some(s_args) = sub.get_one::<&str>("sphinx-args") { // Recall that this comes in as a single argument, potentially quoted to mimic multiple, // but a single argument from the perspective here nonetheless args.insert("sphinx-args", format!("'{}'", s_args)); } commands::launch( "web:build", - if let Some(targets) = cmd.values_of("target") { - Some(targets.collect()) + if let Some(targets) = cmd.get_many::("target") { + Some(targets.map(|t| t.as_str()).collect()) } else { Option::None }, @@ -1280,26 +1327,26 @@ CORE COMMANDS: } Some("mailer") => { let cmd = matches.subcommand_matches("mailer").unwrap(); - let subcmd = cmd.subcommand(); - let sub = subcmd.1.unwrap(); + let subcmd = cmd.subcommand().unwrap(); + let sub = subcmd.1; match subcmd.0 { "send" => { let mut args = IndexMap::new(); - if let Some(t) = sub.values_of("to") { + if let Some(t) = sub.get_many::("to") { let r = t.map(|x| format!("\"{}\"", x)).collect::>(); args.insert("to", format!("[{}]", r.join(","))); } - if let Some(s) = sub.value_of("subject") { + if let Some(s) = sub.get_one::<&str>("subject") { args.insert("subject", format!("\"{}\"", s)); } - if let Some(b) = sub.value_of("body") { + if let Some(b) = sub.get_one::<&str>("body") { args.insert("body", format!("\"{}\"", b)); } commands::launch( "mailer:send", - if let Some(targets) = cmd.values_of("target") { - Some(targets.collect()) + if let Some(targets) = cmd.get_many::("target") { + Some(targets.map(|t| t.as_str()).collect()) } else { Option::None }, @@ -1313,14 +1360,14 @@ CORE COMMANDS: } "test" => { let mut args = IndexMap::new(); - if let Some(t) = sub.values_of("to") { + if let Some(t) = sub.get_many::("to") { let r = t.map(|x| format!("\"{}\"", x)).collect::>(); args.insert("to", format!("[{}]", r.join(","))); } commands::launch( "mailer:test", - if let Some(targets) = cmd.values_of("target") { - Some(targets.collect()) + if let Some(targets) = cmd.get_many::("target") { + Some(targets.map(|t| t.as_str()).collect()) } else { Option::None }, @@ -1335,80 +1382,10 @@ CORE COMMANDS: _ => {} } } - Some("credentials") => { - // TODO re-add support for this command - todo!(); - // let cmd = matches.subcommand_matches("credentials").unwrap(); - // let subcmd = cmd.subcommand(); - // let sub = subcmd.1.unwrap(); - // match subcmd.0 { - // "set" => { - // if sub.is_present("all") { - // match origen::core::user::set_all_passwords() { - // Ok(_) => {} - // Err(e) => { - // origen::display_redln!( - // "Could not set all passwords. Errors were encountered:\n{}", - // e.msg - // ); - // } - // } - // } else { - // if let Some(datasets) = sub.values_of("dataset") { - // match origen::core::user::set_passwords(Some(datasets.collect())) { - // Ok(_) => {} - // Err(e) => { - // origen::display_redln!("Could not set all requested passwords. Errors were encountered:\n{}", e.msg); - // } - // } - // } else { - // match origen::core::user::set_passwords(None) { - // Ok(_) => {} - // Err(e) => { - // origen::display_redln!("Could not clear all passwords. Errors were encountered:\n{}", e.msg); - // } - // } - // } - // } - // } - // "clear" => { - // if sub.is_present("all") { - // match origen::core::user::clear_all_passwords() { - // Ok(_) => {} - // Err(e) => { - // origen::display_redln!( - // "Could not clear all passwords. Errors were encountered:\n{}", - // e.msg - // ); - // } - // } - // } else { - // if let Some(datasets) = sub.values_of("dataset") { - // match origen::core::user::clear_passwords(Some(datasets.collect())) { - // Ok(_) => {} - // Err(e) => { - // origen::display_redln!("Could not clear all given passwords. Errors were encountered:\n{}", e.msg); - // } - // } - // } else { - // match origen::core::user::clear_passwords(None) { - // Ok(_) => {} - // Err(e) => { - // origen::display_redln!( - // "Could not clear password. Errors were encountered:\n{}", - // e.msg - // ); - // } - // } - // } - // } - // } - // _ => {} - // } - } + Some("credentials") => run_cmd_match_case!(credentials), Some("mode") => { let matches = matches.subcommand_matches("mode").unwrap(); - commands::mode::run(matches.value_of("mode")); + commands::mode::run(matches.get_one::<&str>("mode").map(|s| *s)); } Some("save_ref") => { let matches = matches.subcommand_matches("save_ref").unwrap(); @@ -1552,68 +1529,18 @@ CORE COMMANDS: } } } - _ => { - // To get here we must be dealing with a command added by an app/plugin - app_command_defs.dispatch(&matches); + Some(PL_MGR_CMD_NAME) => run_pl_mgr(matches.subcommand_matches(PL_MGR_CMD_NAME).unwrap(), plugins.as_ref())?, + Some(PL_CMD_NAME) => run_pl(matches.subcommand_matches(PL_CMD_NAME).unwrap(), &app, &extensions, plugins.as_ref())?, + Some(invalid_cmd) => { + // This case shouldn't happen as clap should've previously kicked out on any invalid command + unreachable!("Uncaught invalid command encountered: '{}'", invalid_cmd); } - } - Ok(()) -} - -fn build_command(cmd_def: &app_commands::Command) -> App { - let mut cmd = SubCommand::with_name(&cmd_def.name).about(cmd_def.help.as_str()); - if cmd_def.alias.is_some() { - cmd = cmd.visible_alias(cmd_def.alias.as_ref().unwrap().as_str()); - } - if cmd_def.arg.is_some() { - // For each arg - for j in 0..cmd_def.arg.as_ref().unwrap().len() { - let arg_def = &cmd_def.arg.as_ref().unwrap()[j]; - let mut arg = Arg::with_name(&arg_def.name).help(&arg_def.help); - // If this is an arg without a switch - if arg_def.switch.is_some() && !arg_def.switch.unwrap() { - // Do nothing? - } else { - if arg_def.long.is_some() { - arg = arg.long(&arg_def.long.as_ref().unwrap()); - } else { - arg = arg.long(&arg_def.name); - } - if arg_def.short.is_some() { - arg = arg.short(arg_def.short.as_ref().unwrap()) - } - } - if arg_def.takes_value.is_some() { - arg = arg.takes_value(arg_def.takes_value.unwrap()) - } - if arg_def.multiple.is_some() { - arg = arg.multiple(arg_def.multiple.unwrap()) - } - if arg_def.required.is_some() { - arg = arg.required(arg_def.required.unwrap()) - } - if arg_def.value_name.is_some() { - arg = arg.value_name(arg_def.value_name.as_ref().unwrap()) - } else { - arg = arg.value_name(arg_def.upcased_name.as_ref().unwrap()) - } - if arg_def.use_delimiter.is_some() { - arg = arg.use_delimiter(arg_def.use_delimiter.unwrap()) - } - if arg_def.hidden.is_some() { - arg = arg.hidden(arg_def.hidden.unwrap()) - } - - cmd = cmd.arg(arg); - } - } - if let Some(subcommands) = &cmd_def.subcommand { - for c in subcommands { - let subcmd = build_command(&c); - cmd = cmd.subcommand(subcmd); + None => { + // This case shouldn't happen as clap should've previously kicked out on any invalid command + unreachable!("Uncaught invalid command encountered!"); } } - cmd + Ok(()) } fn parse_version_token(input: &str) -> (String, bool) { diff --git a/rust/origen/cli/src/commands/_prelude/clap_arg_actions.rs b/rust/origen/cli/src/commands/_prelude/clap_arg_actions.rs new file mode 100644 index 00000000..10c94674 --- /dev/null +++ b/rust/origen/cli/src/commands/_prelude/clap_arg_actions.rs @@ -0,0 +1,4 @@ +pub use clap::builder::ArgAction::Set as SetArg; +pub use clap::builder::ArgAction::Append as AppendArgs; +pub use clap::builder::ArgAction::Count as CountArgs; +pub use clap::builder::ArgAction::SetTrue as SetArgTrue; diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs new file mode 100644 index 00000000..907ef461 --- /dev/null +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -0,0 +1,15 @@ +pub mod clap_arg_actions; + +pub use clap::{App, AppSettings, Arg, Command}; +pub use origen::Result; +pub use super::super::CommandHelp; +pub use indexmap::IndexMap; +pub use super::{launch, launch_simple, launch_as}; +pub use crate::framework::{Extensions, Plugins}; +pub use crate::framework::{CmdHelps, CmdHelp, CmdSrc}; + +// FOR_PR remove this +pub type RunInput<'a> = &'a clap::ArgMatches; + +pub use clap_arg_actions::*; +pub use crate::{gen_core_cmd_funcs, core_subcmd, gen_simple_run_func}; \ No newline at end of file diff --git a/rust/origen/cli/src/commands/app.rs b/rust/origen/cli/src/commands/app.rs index 7b8253a6..22e475e1 100644 --- a/rust/origen/cli/src/commands/app.rs +++ b/rust/origen/cli/src/commands/app.rs @@ -1,11 +1,117 @@ -use clap::ArgMatches; +use clap::{ArgMatches, Command}; use indexmap::IndexMap; +use crate::framework::AppCmds; +use crate::commands::_prelude::*; +use crate::framework::app_cmds::add_commands as add_app_user_commands; +use crate::framework::app_cmds::add_helps as add_app_cmd_helps; +use crate::framework::build_path; -fn _run(cmd: &str, proc_cmd: &ArgMatches, args: Option>) { +pub const CMD_NAME: &'static str = "app"; + +pub (crate) fn add_helps(helps: &mut CmdHelps, app_cmds: &AppCmds) { + helps.add_core_cmd(CMD_NAME).set_help_msg("Manage and interface with the application"); + add_app_cmd_helps(helps, app_cmds); +} + +pub (crate) fn add_commands<'a>(mut app: App<'a>, helps: &'a CmdHelps, app_cmds: &'a AppCmds, exts: &'a Extensions, ) -> Result> { + let mut app_subc = helps.core_cmd(CMD_NAME) + .arg_required_else_help(true) + .subcommand( + Command::new("init") + .about("Initialize the application's revision control") + ) + .subcommand( + Command::new("status") + .about("Show any local changes") + .arg(Arg::new("modified") + .long("modified") + .action(SetArgTrue) + .help("Show tracked, modified files") + ) + .arg(Arg::new("untracked") + .long("untracked") + .action(SetArgTrue) + .help("Show untracked files") + ) + ) + .subcommand( + Command::new("checkin") + .about("Check in the given pathspecs") + .arg(Arg::new("pathspecs") + .help("The paths to be checked in") + .action(AppendArgs) + .value_name("PATHSPECS") + .multiple(true) + ) + .arg(Arg::new("all") + .long("all") + .short('a') + .action(SetArgTrue) + .conflicts_with("pathspecs") + .help("Check in all changes in the workspace") + ) + .arg(Arg::new("dry-run") + .long("dry-run") + .action(SetArgTrue) + .conflicts_with("pathspecs") + .help("Perform a dry-run only") + ) + .arg(Arg::new("message") + .long("message") + .short('m') + .action(SetArg) + .required(true) + .help("Message to provide with the check-in operation") + ) + ) + .subcommand( + Command::new("package") + .about("Build the app into publishable package (e.g., a 'python wheel')"), + ) + .subcommand(Command::new("run_publish_checks") + .about("Run production-ready and publish-ready checks") + ) + .subcommand(Command::new("publish") + .about("Publish (release) the app") + .arg(Arg::new("dry-run") + .long("dry-run") + .action(SetArgTrue) + .help("Runs through the entire process except the uploading and mailer steps") + ) + .arg(Arg::new("version") + .long("version") + .action(SetArg) + .value_name("VERSION") + .help("Publish with the given version increment") + ) + .arg(Arg::new("release-note") + .long("release-note") + .action(SetArg) + .value_name("NOTE") + .help("Publish with the given release note") + ) + .arg(Arg::new("release-title") + .long("release-title") + .action(SetArg) + .value_name("TITLE") + .help("Publish with the given release title") + ) + .arg(Arg::new("no-release-title") + .long("no-release-title") + .action(SetArgTrue) + .help("Indicate no release title will be provided") + .conflicts_with("release-title") + ) + ); + app_subc = add_app_user_commands(app_subc, helps, app_cmds, exts)?; + Ok(app.subcommand(app_subc)) +} + +fn _run(cmd: &str, proc_cmd: &ArgMatches, args: Option>) -> Result<()>{ super::launch( cmd, - if let Some(targets) = proc_cmd.values_of("target") { - Some(targets.collect()) + if let Some(targets) = proc_cmd.get_many::("target") { + Some(targets.map(|t| t.as_str()).collect()) } else { Option::None }, @@ -16,34 +122,35 @@ fn _run(cmd: &str, proc_cmd: &ArgMatches, args: Option>) false, args, ); + Ok(()) } -pub fn run(cmd: &ArgMatches) { - let subcmd = cmd.subcommand(); - let sub = subcmd.1.unwrap(); +pub(crate) fn run(cmd: &ArgMatches, mut app: &App, exts: &Extensions, plugins: Option<&Plugins>, app_cmds: &AppCmds) -> origen::Result<()> { + let subcmd = cmd.subcommand().unwrap(); + let sub = subcmd.1; match subcmd.0 { "init" => { - _run("app:init", sub, None); + _run("app:init", sub, None) } "status" => { let mut args = IndexMap::new(); - if sub.is_present("modified") { + if sub.contains_id("modified") { args.insert("modified", "True".to_string()); } - if sub.is_present("untracked") { + if sub.contains_id("untracked") { args.insert("untracked", "True".to_string()); } - _run("app:status", sub, Some(args)); + _run("app:status", sub, Some(args)) } "checkin" => { let mut args = IndexMap::new(); - if sub.is_present("all") { + if sub.contains_id("all") { args.insert("all", "True".to_string()); } - if sub.is_present("dry-run") { + if sub.contains_id("dry-run") { args.insert("dry-run", "True".to_string()); } - if let Some(pathspecs) = sub.values_of("pathspecs") { + if let Some(pathspecs) = sub.get_many::("pathspecs") { let p = pathspecs .map(|ps| format!("\"{}\"", ps)) .collect::>(); @@ -51,34 +158,71 @@ pub fn run(cmd: &ArgMatches) { } args.insert( "msg", - format!("\"{}\"", sub.value_of("message").unwrap().to_string()), + format!("\"{}\"", sub.get_one::("message").unwrap()), ); - _run("app:checkin", sub, Some(args)); + _run("app:checkin", sub, Some(args)) } "package" => { - _run("app:package", sub, None); + _run("app:package", sub, None) } "publish" => { let mut args = IndexMap::new(); - if sub.is_present("dry-run") { + if sub.contains_id("dry-run") { args.insert("dry-run", "True".to_string()); } - if let Some(v) = sub.value_of("version") { + if let Some(v) = sub.get_one::<&str>("version") { args.insert("version", format!("\"{}\"", v.to_string())); } - if let Some(r) = sub.value_of("release-note") { + if let Some(r) = sub.get_one::<&str>("release-note") { args.insert("release-note", format!("\"{}\"", r.to_string())); } - if let Some(t) = sub.value_of("release-title") { + if let Some(t) = sub.get_one::<&str>("release-title") { args.insert("release-title", format!("\"{}\"", t.to_string())); } - if sub.is_present("no-release-title") { + if sub.contains_id("no-release-title") { args.insert("no-release-title", "True".to_string()); } - _run("app:publish", sub, Some(args)); + _run("app:publish", sub, Some(args)) } "run_publish_checks" => { - _run("app:run_publish_checks", sub, None); + _run("app:run_publish_checks", sub, None) + } + "commands" => { + if let Some(subc) = cmd.subcommand() { + // FOR_PR clean up + // let ns_ins = aux_cmds.namespaces.get(subc.0).expect(&format!("Expected auxillary command namespace '{}' to be present, but was not found", subc.0)); + let path = build_path(&cmd)?; + + let mut overrides = IndexMap::new(); + + let mut matches = cmd; + let mut path_pieces: Vec = vec!(); + app = app.find_subcommand(CMD_NAME).unwrap(); + // app = app.find_subcommand(subc.0).unwrap(); + while matches.subcommand_name().is_some() { + let n = matches.subcommand_name().unwrap(); + matches = matches.subcommand_matches(&n).unwrap(); + app = app.find_subcommand(n).unwrap(); + // path_pieces.push(format!("r'{}'", n)); + path_pieces.push(n.to_string()); + } + + // let mut cmd_def = get_cmd_def(cmd, app); // app.find_subcommand(); + // TODO app isn't right here - needs to be subcommand + launch_as("_dispatch_app_cmd_", Some(&path_pieces), matches, app, exts.get_aux_ext(subc.0, &path), plugins, Some( + { + overrides.insert("dispatch_root".to_string(), Some(format!("r'{}'", app_cmds.cmds_root()?.display()))); + // overrides.insert("dispatch_cmds".to_string(), Some(format!("[{}]", path_pieces.join(", ")))); + overrides + } + ), None); + Ok(()) + } else { + // This case shouldn't happen as any non-valid command should be + // caught previously by clap and a non-command invocation should + // print the help message. + unreachable!("Expected an APP command but none was found!"); + } } _ => unreachable!(), diff --git a/rust/origen/cli/src/commands/aux_cmds.rs b/rust/origen/cli/src/commands/aux_cmds.rs new file mode 100644 index 00000000..5232ed53 --- /dev/null +++ b/rust/origen/cli/src/commands/aux_cmds.rs @@ -0,0 +1,38 @@ +pub use crate::framework::aux_cmds::CMD_NAME; +use super::launch_as; +use crate::framework::build_path; +use indexmap::IndexMap; + +pub(crate) fn run(cmd: &clap::ArgMatches, mut app: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>, aux_cmds: &crate::AuxCmds) -> origen::Result<()> { + if let Some(subc) = cmd.subcommand() { + let ns_ins = aux_cmds.namespaces.get(subc.0).expect(&format!("Expected auxillary command namespace '{}' to be present, but was not found", subc.0)); + let path = build_path(&subc.1)?; + + let mut overrides = IndexMap::new(); + + let mut matches = subc.1; + let mut path_pieces: Vec = vec!(); + app = app.find_subcommand(CMD_NAME).unwrap(); + app = app.find_subcommand(subc.0).unwrap(); + while matches.subcommand_name().is_some() { + let n = matches.subcommand_name().unwrap(); + matches = matches.subcommand_matches(&n).unwrap(); + app = app.find_subcommand(n).unwrap(); + path_pieces.push(n.to_string()); + } + + launch_as("_dispatch_aux_cmd_", Some(&path_pieces), matches, app, exts.get_aux_ext(subc.0, &path), plugins, Some( + { + overrides.insert("dispatch_root".to_string(), Some(format!("r'{}'", ns_ins.root().display()))); + overrides.insert("dispatch_src".to_string(), Some(format!("r'{}'", subc.0))); + overrides + } + ), None); + Ok(()) + } else { + // This case shouldn't happen as any non-valid command should be + // caught previously by clap and a non-command invocation should + // print the help message. + unreachable!("Expected an AUX command but none was found!"); + } +} diff --git a/rust/origen/cli/src/commands/build.rs b/rust/origen/cli/src/commands/build.rs index 36072431..d7ba7f39 100644 --- a/rust/origen/cli/src/commands/build.rs +++ b/rust/origen/cli/src/commands/build.rs @@ -1,5 +1,6 @@ use crate::CommandHelp; -use clap::{App, Arg, ArgMatches, SubCommand}; +use clap::{App, Arg, ArgMatches}; +use clap::Command as ClapCommand; use origen::core::file_handler::File; use origen::utility::version::Version; use origen::{Result, STATUS}; @@ -9,18 +10,19 @@ use regex::Regex; use sha2::{Digest, Sha256}; use std::path::Path; use std::process::Command; +use super::_prelude::clap_arg_actions::*; -pub fn define<'a>(app: App<'a, 'a>) -> (App<'a, 'a>, CommandHelp) { +pub fn define<'a>(app: App<'a>) -> (App<'a>, CommandHelp) { let help = match STATUS.is_origen_present { true => "Build and publish Origen, builds the pyapi Rust package by default", false => "Build Origen", }; - let mut cmd = SubCommand::with_name("build").about(help).arg( - Arg::with_name("cli") + let mut cmd = ClapCommand::new("build").about(help).arg( + Arg::new("cli") .long("cli") .required(false) - .takes_value(false) + .action(SetArgTrue) .display_order(1) .help("Build the CLI (instead of the Python API)"), ); @@ -28,50 +30,50 @@ pub fn define<'a>(app: App<'a, 'a>) -> (App<'a, 'a>, CommandHelp) { if STATUS.is_origen_present { cmd = cmd .arg( - Arg::with_name("release") + Arg::new("release") .long("release") .required(false) - .takes_value(false) + .action(SetArgTrue) .display_order(1) .help("Build a release version (applied by default with --publish and only applicable to Rust builds)"), ) .arg( - Arg::with_name("target") + Arg::new("target") .long("target") .required(false) - .takes_value(true) + .action(SetArg) .display_order(1) .help("The Rust h/ware target (passed directly to Cargo build)"), ) .arg( - Arg::with_name("publish") + Arg::new("publish") .long("publish") .required(false) - .takes_value(false) + .action(SetArgTrue) .display_order(1) .help("Publish packages (e.g. to PyPI) after building"), ) .arg( - Arg::with_name("dry_run") + Arg::new("dry_run") .long("dry-run") .required(false) - .takes_value(false) + .action(SetArgTrue) .display_order(1) .help("Use with --publish to perform a full dry run of the publishable build without actually publishing it"), ) .arg( - Arg::with_name("version") + Arg::new("version") .long("version") .required(false) - .takes_value(true) + .action(SetArg) .value_name("VERSION") .display_order(1) .help("Set the version (of all components) to the given value"), ) .arg( - Arg::with_name("metal") + Arg::new("metal") .long("metal") - .takes_value(false) + .action(SetArgTrue) .display_order(1) .help("Build the metal_pyapi"), ); @@ -87,7 +89,7 @@ pub fn define<'a>(app: App<'a, 'a>) -> (App<'a, 'a>, CommandHelp) { } pub fn run(matches: &ArgMatches) -> Result<()> { - if let Some(v) = matches.value_of("version") { + if let Some(v) = matches.get_one::<&str>("version") { let mut version_bad = false; let version; match Version::new_semver(v) { @@ -148,7 +150,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { // Build the latest CLI, this can be requested from an Origen workspace or an app workspace that is // locally referencing an Origen workspace - if matches.is_present("cli") { + if matches.contains_id("cli") { cd(&STATUS .origen_wksp_root .join("rust") @@ -156,7 +158,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { .join("cli"))?; display!(""); let mut args = vec!["build"]; - if matches.is_present("release") || matches.is_present("publish") { + if matches.contains_id("release") || matches.contains_id("publish") { args.push("--release"); } Command::new("cargo") @@ -166,13 +168,13 @@ pub fn run(matches: &ArgMatches) -> Result<()> { display!(""); // Build the metal_pyapi - } else if matches.is_present("metal") { + } else if matches.contains_id("metal") { build_metal(matches)?; // Build the PyAPI by default } else { // A publish build will also build the origen_pyapi Python package and // publish it to PyPI, only available within an Origen workspace - if matches.is_present("publish") { + if matches.contains_id("publish") { let wheel_dir = &STATUS .origen_wksp_root .join("rust") @@ -212,7 +214,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { change_pyapi_wheel_version(&wheel_dir, &old, &new); } - if matches.is_present("publish") && !matches.is_present("dry_run") { + if matches.contains_id("publish") && !matches.contains_id("dry_run") { let pypi_token = std::env::var("ORIGEN_PYPI_TOKEN").expect("ORIGEN_PYPI_TOKEN is not defined"); @@ -246,11 +248,11 @@ pub fn run(matches: &ArgMatches) -> Result<()> { let mut target = "debug"; let mut arch_target = None; - if matches.is_present("release") { + if matches.contains_id("release") { args.push("--release"); target = "release"; } - if let Some(t) = matches.value_of("target") { + if let Some(t) = matches.get_one::<&str>("target") { args.push("--target"); args.push(t); arch_target = Some(t); @@ -319,11 +321,11 @@ fn build_metal(matches: &ArgMatches) -> Result<()> { let mut target = "debug"; let mut arch_target = None; - if matches.is_present("release") { + if matches.contains_id("release") { args.push("--release"); target = "release"; } - if let Some(t) = matches.value_of("target") { + if let Some(t) = matches.get_one::<&str>("target") { args.push("--target"); args.push(t); arch_target = Some(t); diff --git a/rust/origen/cli/src/commands/credentials.rs b/rust/origen/cli/src/commands/credentials.rs new file mode 100644 index 00000000..10b69e50 --- /dev/null +++ b/rust/origen/cli/src/commands/credentials.rs @@ -0,0 +1,54 @@ +use clap::{App, AppSettings, Arg, ArgMatches, Command}; +use origen::Result; +use super::super::CommandHelp; +use indexmap::IndexMap; +use super::launch_simple; +use super::_prelude::*; + +pub const BASE_CMD: &'static str = "credentials"; + +gen_core_cmd_funcs!( + BASE_CMD, + "Set or clear user credentials", + { |cmd: App<'a>| { cmd.setting(AppSettings::ArgRequiredElseHelp) }}, + core_subcmd!("set", "Set the current user's password", { |cmd: App| { + cmd.arg( + Arg::new("all") + .help("Set the password for all datasets") + .action(SetArgTrue) + .required(false) + .long("all") + .short('a'), + ).arg( + Arg::new("datasets") + .help("Specify the dataset to set the password for") + .action(AppendArgs) + .required(false) + .multiple(true) + .conflicts_with("all") + .long("dataset") + .short('d'), + ) + }}), + core_subcmd!("clear", "Clear the user's password", { |cmd: App| { + cmd.arg( + Arg::new("all") + .help("Clear the password for all datasets") + .action(SetArgTrue) + .required(false) + .long("all") + .short('a'), + ).arg( + Arg::new("datasets") + .help("Specify the dataset to clear the password for") + .action(AppendArgs) + .required(false) + .conflicts_with("all") + .multiple(true) + .long("datasets") + .short('d'), + ) + }}) +); + +gen_simple_run_func!(); diff --git a/rust/origen/cli/src/commands/env.rs b/rust/origen/cli/src/commands/env.rs index 3514e662..eee2238e 100644 --- a/rust/origen/cli/src/commands/env.rs +++ b/rust/origen/cli/src/commands/env.rs @@ -33,7 +33,7 @@ pub fn run(matches: &ArgMatches) { let origen_root = match matches .subcommand_matches("setup") .unwrap() - .value_of("origen") + .get_one::<&str>("origen") { None => None, Some(x) => { diff --git a/rust/origen/cli/src/commands/eval.rs b/rust/origen/cli/src/commands/eval.rs new file mode 100644 index 00000000..7fb01a88 --- /dev/null +++ b/rust/origen/cli/src/commands/eval.rs @@ -0,0 +1,28 @@ +use clap::{App, AppSettings, Arg, Command, ArgMatches}; +use super::_prelude::*; +use origen::Result; +use super::super::CommandHelp; +use indexmap::IndexMap; +use super::launch2; +use crate::{Extensions, Plugins}; + +pub const CMD_NAME: &'static str = "eval"; +pub const BASE_CMD: &'static str = "eval"; + +gen_core_cmd_funcs!( + BASE_CMD, + "Evaluates statements in an Origen context", + { |cmd: App<'a>| { + cmd.visible_alias("e") + .arg( + Arg::new("code") + .help("Statements to evaluate") + .action(AppendArgs) + .value_name("CODE") + .multiple(true) + .required(true) + ) + }} +); + +gen_simple_run_func!(); diff --git a/rust/origen/cli/src/commands/interactive.rs b/rust/origen/cli/src/commands/interactive.rs index f78f9a80..c2c8aefe 100644 --- a/rust/origen/cli/src/commands/interactive.rs +++ b/rust/origen/cli/src/commands/interactive.rs @@ -1,18 +1,41 @@ -use origen::app; +// FOR_PR clean up and switch to macros to generate +use crate::commands::_prelude::*; +use origen::STATUS; use std::fs; -pub fn run(targets: Option>, mode: &Option<&str>) { - let dot_origen_dir = app().unwrap().root.join(".origen"); - if !dot_origen_dir.exists() { - let _ = fs::create_dir(&dot_origen_dir); - } - let history_file = dot_origen_dir.join("console_history"); - if !history_file.exists() { - let _ = fs::OpenOptions::new() - .create(true) - .write(true) - .open(&history_file); - } +pub const BASE_CMD: &'static str = "interactive"; +pub const CMD_NAME: &'static str = "interactive"; - super::launch("interactive", targets, mode, None, None, None, false, None); +pub (crate) fn add_commands<'a>(app: App<'a>, origen_commands: &mut Vec) -> Result> { + let i_help = "Start an Origen console to interact with the DUT"; + origen_commands.push(CommandHelp { + name: "interactive".to_string(), + help: i_help.to_string(), + shortcut: Some("i".to_string()), + }); + let mut subc = Command::new("interactive").about(i_help).visible_alias("i"); + if STATUS.is_app_present { + subc = subc.arg( + Arg::new("target") + .short('t') + .long("target") + .help("Override the default target currently set by the workspace") + .action(AppendArgs) + .use_delimiter(true) + .multiple(true) + .number_of_values(1) + .value_name("TARGET"), + ) + .arg( + Arg::new("mode") + .short('m') + .long("mode") + .help("Override the default execution mode currently set by the workspace") + .action(SetArg) + .value_name("MODE"), + ); + } + Ok(app.subcommand(subc)) } + +crate::gen_simple_run_func!(); diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 7ddc96b5..de43ca67 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -1,3 +1,4 @@ +// FOR_PR clean up, specifically launch stuff pub mod app; pub mod build; pub mod env; @@ -9,11 +10,332 @@ pub mod new; pub mod proj; pub mod save_ref; pub mod target; +pub mod mailer; +pub mod credentials; +pub mod eval; +pub mod aux_cmds; +pub mod _prelude; +pub use eval::CMD_NAME as EVAL_CMD_NAME; + +#[macro_use] use crate::python; +use crate::vks_to_cmd; + use indexmap::map::IndexMap; use origen::{clean_mode, LOGGER}; use std::process::exit; +use origen::Result; +use _prelude::{SetArgTrue, CountArgs}; + +use clap::{App, ArgMatches}; +// use crate::Extensions; +use crate::framework::extensions::{Extension, ExtensionSource}; +use crate::Plugins; +use std::collections::HashMap; + +#[macro_export] +macro_rules! gen_simple_run_func { + ($base_cmd: expr) => { + pub(crate) fn run(mut invocation: &clap::ArgMatches, mut cmd_def: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>) -> Result<()> { + // let mut matches = cmd; + let mut path_pieces: Vec = vec!(); + // let mut overrides = IndexMap::new(); + // let base_cmd = cmd.name; + cmd_def = cmd_def.find_subcommand($base_cmd).unwrap(); + if invocation.subcommand_name().is_some() { + while invocation.subcommand_name().is_some() { + let n = invocation.subcommand_name().unwrap(); + invocation = invocation.subcommand_matches(&n).unwrap(); + cmd_def = cmd_def.find_subcommand(n).unwrap(); + // path_pieces.push(format!("r'{}'", n)); + path_pieces.push(n.to_string()); + } + crate::commands::launch3( + Some($base_cmd), + Some(&path_pieces), + invocation, + cmd_def, + exts.get_core_ext(&format!("{}.{}", $base_cmd, path_pieces.join("."))), + plugins, + None, + None, + ); + } else { + crate::commands::launch2( + // CMD_NAME, + invocation, + cmd_def, + exts.get_core_ext($base_cmd), + plugins, + ); + } + + // crate::commands::launch2( + // // CMD_NAME, + // cmd, + // app.find_subcommand($cmd_name).unwrap(), + // exts.get_core_ext($cmd_name), + // plugins, + // ); + Ok(()) + } + }; + () => { + crate::gen_simple_run_func!(BASE_CMD); + } +} + +// #[macro_export] +// macro_rules! gen_run_func { +// ? +// } + +pub fn launch_simple(command: &str, args: Option>) { + launch(command, None, &None, None, None, None, false, args) +} + +// pub fn launch_cmd() + +pub fn launch_as( + cmd: &str, + subcmds: Option<&Vec>, + invocation: &ArgMatches, + cmd_def: &App, + cmd_exts: Option<&Vec>, + plugins: Option<&Plugins>, + overrides: Option>>, + arg_overrides: Option>>, +) -> () +{ + launch3(Some(cmd), subcmds, invocation, cmd_def, cmd_exts, plugins, overrides, arg_overrides) +} +pub fn launch2(invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>) { + // TODO arg overrides + launch3(None, None, invocation, cmd_def, cmd_exts, plugins, None, None) +} + +// pub fn launch4(invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>, callback: Option) { +// // TODO arg overrides +// launch3(None, invocation, cmd_def, cmd_exts, plugins, None, None) +// } + +pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>, overrides: Option>>, arg_overrides: Option>>) { + // let mut args = "{".to_string(); + // let mut ext_args = "{".to_string(); + // let mut arg_str: String; + // let mut first_arg = true; + let mut args: Vec = vec!(); + + // println!("exts from launch: {:?}", cmd_exts); + let mut opt_names = HashMap::new(); + let mut ext_args = HashMap::new(); + if let Some(exts) = cmd_exts { + for ext in exts { + if let Some(opts) = ext.opts.as_ref() { + for opt in opts { + opt_names.insert(opt.name.as_str(), &ext.source); + if !ext_args.contains_key(&ext.source) { + ext_args.insert(&ext.source, vec!()); + } + } + } + } + } + println!("ext names: {:?}", opt_names); + + for arg in cmd_def.get_arguments() { + println!("Arg: {}", arg.get_id()); + let arg_n= arg.get_id(); + if arg_n == "verbose" || arg_n == "verbosity_keywords" { + continue; + } + + // let ext_opts = HashSet::new(); + // for e in cmd_exts.iter() { + // // ext_opts.push(e.) + // } + if invocation.contains_id(arg_n) { + let arg_str: String; + if arg.is_takes_value_set() { + if arg.is_multiple_values_set() { + // Give to Python as an array of string values + let r = invocation.get_many::(arg_n).unwrap().map(|x| format!("\"{}\"", x)).collect::>(); + arg_str = format!("r'{}': [{}]", arg_n, r.join(", ")); + } else { + // Give to Python a single string value + arg_str = format!("r'{}': r'{}'", arg_n, invocation.get_one::(arg_n).unwrap()); + } + } else { + match arg.get_action() { + SetArgTrue => { + if *(invocation.get_one::(arg_n).unwrap()) { + arg_str = format!("r'{}': True", arg_n); + } else { + continue; + } + }, + CountArgs => { + let count = *(invocation.get_one::(arg_n).unwrap()); + if count > 0 { + arg_str = format!("r'{}': {}", arg_n, count); + } else { + continue; + } + }, + _ => { + log_error!("Unsupported action '{:#?}' for arg '{}'", arg.get_action(), arg_n); //arg_str = format!("r'{}': True", arg_n) + exit(1); + } + } + } + // if first_arg { + // args += &arg_str; + // first_arg = false; + // } else { + // args += ", "; + // args += &arg_str; + // } + if let Some(ext_src) = opt_names.get(arg_n) { + ext_args.get_mut(ext_src).unwrap().push(arg_str); + } else { + args.push(arg_str); + } + } + } + println!("ext args: {:?}", ext_args); + // args += "}"; + // ext_args += "}"; + // println!("args: {}", args); + + let mut cmd = format!("from origen.boot import run_cmd; run_cmd('{}'", base_cmd.unwrap_or_else(|| cmd_def.get_name())); + if let Some(subs) = subcmds.as_ref() { + cmd += &format!(", subcmds=[{}]", subs.iter().map( |s| format!("r'{}'", s) ).collect::>().join(", ")); + } + cmd += &format!(", args={{{}}}", args.join(", ")); + + let mut app_ext_str = "".to_string(); + let mut pl_ext_str = "".to_string(); + let mut aux_ext_str = "".to_string(); + if !ext_args.is_empty() { + // let mut app_ext_str = "{".to_string(); + // let mut pl_ext_str = "{".to_string(); + // let mut aux_ext_str = "{".to_string(); + // let mut app_ext_args = vec!(); + // let mut pl_ext_args = vec!(); + // let mut aux_ext_args = vec!(); + for ext in ext_args { + match ext.0 { + ExtensionSource::App => { + app_ext_str = ext.1.join(", "); + todo!() + }, + ExtensionSource::Plugin(ref pl_name) => { + pl_ext_str += &format!(", '{}': {{{}}}", pl_name, ext.1.join(", ")); + // pl_ext_args.push(format!("")); + }, + ExtensionSource::Aux(ref ns, ref path) => { + aux_ext_str += &format!(", '{}': {{{}}}", ns, ext.1.join(", ")); + }, + } + } + // if !app_ext_str.is_empty() { + // app_ext_str = app_ext_str[2..].to_string(); + // } + if !pl_ext_str.is_empty() { + pl_ext_str = pl_ext_str[2..].to_string(); + } + if !aux_ext_str.is_empty() { + aux_ext_str = aux_ext_str[2..].to_string(); + } + // app_ext_str += "}"; + // pl_ext_str += "}"; + // aux_ext_str += "}"; + } + cmd += &format!( + ", ext_args={{'app': {{{}}}, 'plugin': {{{}}}, 'aux': {{{}}}}}", + app_ext_str, + pl_ext_str, + aux_ext_str, + ); + + if let Some(exts) = cmd_exts { + let mut ext_setups: Vec = vec!(); + for ext in exts { + // ext_setup: HashMap<&str, String> = HashMap::new(); + let mut ext_setup = "{".to_string(); + match ext.source { + ExtensionSource::App => { + ext_setup += "'source': 'app'" + }, + ExtensionSource::Plugin(ref pl_name) => { + ext_setup += &format!( + "'root': r'{}', 'name': r'{}', 'source': 'plugin'", + plugins.unwrap().plugins.get(pl_name).unwrap().root.as_path().join("commands/extensions/").display(), + pl_name, + ); + }, + ExtensionSource::Aux(ref ns, ref path) => { + ext_setup += &format!( + "'root': r'{}', 'name': r'{}', 'source': 'aux'", + path.display(), + ns, + // plugins.unwrap().plugins.get(pl_name).unwrap().root.as_path().join(format!("commands/extensions/{}.py", ext.extends)).display() + ); + } + } + ext_setup += "}"; + // ext_setups.push(ext_setup.iter().map( |n, v| &format!("'{}': '{}'", )).collect::>().join(', ')) + ext_setups.push(ext_setup); + } + cmd += &format!(", extensions=[{}]", ext_setups.join(", ")); + } + + if let Some(pls) = plugins { + // let mut pls_config = "{".to_string(); + cmd += &format!( + ", plugins={{{}}}", + pls.plugins.iter().map(|(n, pl)| format!("'{}': {{'root': r'{}'}}", n, pl.root.display())).collect::>().join(", ") + ); + // for pl in pls { + // pl_config = format!("'{}': {{}}", pl.name, pl.root.display()); + // cmd += + // pl_config += "}"; + // } + // pls_config += "}"; + // cmd += &format!(", plugins={}") + } + + if let Some(top_overrides) = overrides { + for (name, val) in top_overrides.iter() { + if let Some(v) = val { + cmd += &format!(", {}={}", name, v); + } + } + } + + cmd += &format!(", verbosity={}", LOGGER.verbosity()); + cmd += &format!(", {}", vks_to_cmd!()); + cmd += ");"; + + log_debug!("Launching Python: '{}'", &cmd); + println!("CMD: {}", cmd); + // println!("Launching Python: '{}'", &cmd); + + match python::run(&cmd) { + Err(e) => { + log_error!("{}", &e); + exit(1); + } + Ok(exit_status) => { + if exit_status.success() { + exit(0); + } else { + exit(exit_status.code().unwrap_or(1)); + } + } + } +} /// Launch the given command in Python pub fn launch( @@ -68,7 +390,7 @@ pub fn launch( } cmd += &format!(", verbosity={}", LOGGER.verbosity()); - cmd += &format!(", verbosity_keywords=\"{}\"", LOGGER.keywords_to_cmd()); + cmd += &format!(", {}", vks_to_cmd!()); cmd += ");"; log_debug!("Launching Python: '{}'", &cmd); diff --git a/rust/origen/cli/src/commands/new/mod.rs b/rust/origen/cli/src/commands/new/mod.rs index 5ea74db3..7fbf2f0e 100644 --- a/rust/origen/cli/src/commands/new/mod.rs +++ b/rust/origen/cli/src/commands/new/mod.rs @@ -29,8 +29,8 @@ pub fn run(matches: &ArgMatches) { new_resource::run(matches); return; } - let name = matches.value_of("name").unwrap(); - if name.to_lowercase() != name { + let name = matches.get_one::<&str>("name").unwrap(); + if &name.to_lowercase() != name { display_red!("ERROR: "); displayln!("The application name must be lowercased"); std::process::exit(1); @@ -80,7 +80,7 @@ pub fn run(matches: &ArgMatches) { new_app.apply_template(&PY_APP, &context); - if !matches.is_present("no-setup") { + if !matches.contains_id("no-setup") { new_app.setup(); } } diff --git a/rust/origen/cli/src/commands/new/new_resource.rs b/rust/origen/cli/src/commands/new/new_resource.rs index 23546f48..0564d021 100644 --- a/rust/origen/cli/src/commands/new/new_resource.rs +++ b/rust/origen/cli/src/commands/new/new_resource.rs @@ -10,7 +10,7 @@ pub fn run(matches: &ArgMatches) { Some("dut") => { let name; - if let Some(n) = matches.subcommand_matches("dut").unwrap().value_of("name") { + if let Some(n) = matches.subcommand_matches("dut").unwrap().get_one::<&str>("name") { // Add the leading 'dut' to the fully qualified new DUT name if missing if !n.starts_with("dut/") { name = format!("dut/{}", n); @@ -63,9 +63,9 @@ pub fn run(matches: &ArgMatches) { } Some("block") => { let matches = matches.subcommand_matches("block").unwrap(); - let name = matches.value_of("name").unwrap().to_string(); + let name = matches.get_one::("name").unwrap(); let mut nested = false; - let parent = matches.value_of("parent"); + let parent = matches.get_one::<&str>("parent"); let mut block_name = clean_and_validate_resource_name(&name, "NAME"); if let Some(p) = parent { diff --git a/rust/origen/cli/src/commands/proj/mod.rs b/rust/origen/cli/src/commands/proj/mod.rs index aa5ab1a7..2d1cc5d9 100644 --- a/rust/origen/cli/src/commands/proj/mod.rs +++ b/rust/origen/cli/src/commands/proj/mod.rs @@ -49,7 +49,7 @@ pub fn run(matches: &ArgMatches) { let path = matches .subcommand_matches("create") .unwrap() - .value_of("path") + .get_one::<&str>("path") .unwrap(); let mut path = PathBuf::from(path); if !path.is_absolute() { @@ -162,10 +162,10 @@ pub fn run(matches: &ArgMatches) { } Some("update") => { let matches = matches.subcommand_matches("update").unwrap(); - let force = matches.is_present("force"); - let mut links = matches.is_present("links"); - if let Some(packages) = matches.values_of("packages") { - if packages.map(|p| p).collect::>().contains(&"all") { + let force = matches.contains_id("force"); + let mut links = matches.contains_id("links"); + if let Some(packages) = matches.get_many::<&str>("packages") { + if packages.map(|p| *p).collect::>().contains(&"all") { links = true; } } @@ -370,9 +370,9 @@ pub fn run(matches: &ArgMatches) { } Some("tag") => { let matches = matches.subcommand_matches("tag").unwrap(); - let force = matches.is_present("force"); - let tagname = matches.value_of("name").unwrap(); - let message = matches.value_of("message"); + let force = matches.contains_id("force"); + let tagname = matches.get_one::<&str>("name").unwrap(); + let message = matches.get_one::<&str>("message"); let package_ids = get_package_ids_from_args(matches, true); let mut packages_with_existing_tag: Vec<&str> = vec![]; let bom = BOM::for_dir(&pwd()); @@ -384,7 +384,7 @@ pub fn run(matches: &ArgMatches) { if package.has_repo() { display!("{} ... ", package.id); let rc = package.rc(bom.root()).unwrap(); - match rc.tag(tagname, force, message) { + match rc.tag(tagname, force, message.map(|s| *s)) { Err(e) => { if e.to_string().contains("tag already exists") { packages_with_existing_tag.push(&package.id); @@ -430,8 +430,8 @@ pub fn run(matches: &ArgMatches) { /// If a given ID does not match a known package or group the process will be exited with an error. /// Optionally return all packages if no packages arg given. fn get_package_ids_from_args(matches: &ArgMatches, return_all_if_none: bool) -> Vec { - let mut package_args: Vec<&str> = match matches.values_of("packages") { - Some(pkgs) => pkgs.map(|p| p).collect(), + let mut package_args: Vec<&str> = match matches.get_many::("packages") { + Some(pkgs) => pkgs.map(|p| p.as_str()).collect(), None => vec![], }; if package_args.is_empty() && return_all_if_none { @@ -459,7 +459,7 @@ fn pwd() -> PathBuf { /// If validate is not true then the path returned may not be absolute and the caller /// is responsible for handling that (if required) after then have created it fn get_dir_or_pwd(matches: &ArgMatches, validate: bool) -> PathBuf { - let dir = match matches.value_of("dir") { + let dir = match matches.get_one::<&str>("dir") { Some(x) => PathBuf::from(x), None => pwd(), }; diff --git a/rust/origen/cli/src/commands/save_ref.rs b/rust/origen/cli/src/commands/save_ref.rs index c50c1c44..361c2831 100644 --- a/rust/origen/cli/src/commands/save_ref.rs +++ b/rust/origen/cli/src/commands/save_ref.rs @@ -4,9 +4,9 @@ use std::path::Path; pub fn run(matches: &clap::ArgMatches) { let mut exit_code = 0; - let new = matches.is_present("new"); - let changed = matches.is_present("changed"); - let files = matches.values_of("files"); + let new = matches.contains_id("new"); + let changed = matches.contains_id("changed"); + let files = matches.get_many::("files"); if new { if let Err(e) = reference_files::apply_all_new_refs() { diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs new file mode 100644 index 00000000..6a096901 --- /dev/null +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -0,0 +1,144 @@ +use origen::{Result, STATUS, ORIGEN_CONFIG}; +use indexmap::IndexMap; +use std::fs; +use std::path::PathBuf; +use crate::commands::_prelude::*; +use super::{build_commands}; +use origen::core::application::Application; + +use clap::Command as ClapCommand; + +use super::{Command, CommandsToml, CommandTOML, Extensions, Arg, build_path}; + +// pub const CMD_NAME: &'static str = "commands"; +pub const APP_COMMANDS: [&'static str; 2] = [crate::commands::app::CMD_NAME, "commands"]; + +pub struct AppCmds { + pub root: PathBuf, + pub top_commands: Vec, + pub commands: IndexMap::, +} + +impl AppCmds { + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) { + // let mut sub_commands: Option>; + // { + // build_upcase_names(current_cmd); + // } + if let Some(ref mut sub_cmds) = current_cmd.subcommand { + // sub_commands = Some(vec![]); + for mut sub in sub_cmds { + // sub_commands.as_mut().push(sub.name.to_string()); + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub); + } + } else { + // sub_commands = None; + } + // println!("PATH: {}", current_path); + slf.commands.insert(current_path.clone(), Command::from_toml_cmd(current_cmd, ¤t_path)); + } + + pub fn new(app: &Application, exts: &mut Extensions) -> Result { + let mut slf = Self { + root: app.root.to_owned(), + top_commands: vec!(), + commands: IndexMap::new(), + }; + + // let commands_toml = slf.root.join("config").join("commands.toml"); + for commands_toml in app.config().cmd_paths() { + // if commands_toml.exists() { + let content = match fs::read_to_string(&commands_toml) { + Ok(x) => x, + Err(e) => { + bail!("{}", e); + } + }; + + let command_config: CommandsToml = match toml::from_str(&content) { + Ok(x) => x, + Err(e) => { + bail!("Malformed commands.toml: {}", e); + } + }; + // TODO error on help given? + // slf.help = command_config.help.to_owned(); + + if let Some(mut commands) = command_config.command { + for mut cmd in commands { + slf.top_commands.push(cmd.name.to_owned()); + Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); + } + } + // } + + if let Some(mut extensions) = command_config.extension { + for ext in extensions { + match exts.add_from_app_toml(ext) { + Ok(_) => {}, + Err(e) => log_error!("Failed to add extensions from application from '{}': {}", &commands_toml.display(), e) + } + // slf.extensions.push(Extension::from_extension_toml(ExtensionSource::Plugin(slf.name.to_string()), ext)?); + } + } + } + Ok(slf) + } + + pub fn cmds_root(&self) -> Result { + let mut r = self.root.to_owned(); + r.push(STATUS.app.as_ref().unwrap().name()); + r.push("commands"); + Ok(r) + } +} + +pub (crate) fn add_helps(helps: &mut CmdHelps, app_cmds: &AppCmds) { + helps.add_core_sub_cmd(&APP_COMMANDS).set_help_msg("Interface with commands added by the application"); + for (n, c) in app_cmds.commands.iter() { + helps.add_app_cmd(n).set_help_msg(&c.help); + } +} + +pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, app_commands: &'a AppCmds, exts: &'a Extensions) -> Result> { + // let help = "Interface with commands added by the application"; + // origen_commands.push(CommandHelp { + // name: CMD_NAME.to_string(), + // help: help.to_string(), + // shortcut: None, + // }); + + let mut app_cmds_cmd = helps.core_subc(&APP_COMMANDS) + // ClapCommand::new(CMD_NAME) + // .about(help) + // .setting(AppSettings::ArgRequiredElseHelp) + .visible_alias("cmds") + // .setting(AppSettings::ArgRequiredElseHelp) + .arg_required_else_help(true); + // .subcommand( + // ClapCommand::new("list") + // .about("List the available plugins") + // .visible_alias("ls") + // ); + + for top_cmd_name in app_commands.top_commands.iter() { + // app_cmds_cmd = app_cmds_cmd.subcommand(build_commands(cmds).unwrap(), &|cmd| { + // cmds.commands.get(cmd).unwrap() + // }); + + + app_cmds_cmd = app_cmds_cmd.subcommand(build_commands( + &app_commands.commands.get(top_cmd_name).unwrap(), + &|cmd, app| { + exts.apply_to_app_cmd(cmd, app) + }, + &|cmd| { + app_commands.commands.get(cmd).unwrap() + }, + &|cmd, app| { + helps.apply_helps(&CmdSrc::App(cmd.to_string()), app) + }, + )); + } + Ok(app.subcommand(app_cmds_cmd)) +} diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs new file mode 100644 index 00000000..5666b3e8 --- /dev/null +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -0,0 +1,335 @@ +use origen::{Result, ORIGEN_CONFIG, origen_config_metadata}; +use crate::commands::_prelude::*; +// use crate::app_commands::Command as CommandTOML; + +use super::{Command, Arg, build_commands}; + +// use crate::app_commands::Command as AppCommand; +use std::fs; +use std::path::PathBuf; +use origen::core::config::AuxillaryCommandsTOML; +use super::extensions::ExtensionTOML; +use super::{CommandTOML}; + +use clap; + +pub const CMD_NAME: &'static str = "auxillary_commands"; + +// pub struct AuxCmdsTOML { +// Vec, + pub command: Option>, + pub extension: Option> +} + +#[derive(Default)] +pub struct AuxCmds { + pub namespaces: IndexMap, +} + +impl AuxCmds { + pub fn new(exts: &mut Extensions) -> Result { + let mut slf = Self::default(); + if let Some(aux_cmds_configs) = ORIGEN_CONFIG.auxillary_commands.as_ref() { + for (i, config) in aux_cmds_configs.iter().enumerate() { + match AuxCmdNamespace::new(i, config, exts) { + Ok(aux_ns) => { + let ns = aux_ns.namespace().to_string(); + if let Some(existing_ns) = slf.namespaces.get(&ns) { + log_error!("Auxillary commands namespaced '{}' already exists.", ns); + log_error!("Cannot add namespace from config '{}'", origen_config_metadata().aux_cmd_sources[i].display()); + log_error!("Namespace first defined in config '{}'", existing_ns.origin().display()); + } else { + slf.namespaces.insert(ns, aux_ns); + } + } + Err(e) => { + log_error!( + "Unable to add auxillary commands at '{}' from config '{}'. The following error was met:", + config.path().display(), + origen_config_metadata().aux_cmd_sources[i].display() + ); + // log_error!("Unable to add auxillary commands from config '{}'. The following error was met:", config.path); + log_error!("{}", e); + } + } + } + } + Ok(slf) + } +} + +pub struct AuxCmdNamespace { + commands: IndexMap, + pub top_commands: Vec, + index: usize, + // path: PathBuf, + help: Option, + // name: Option, +} + +impl AuxCmdNamespace { + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) { + // let mut sub_commands: Option>; + // { + // build_upcase_names(current_cmd); + // } + if let Some(ref mut sub_cmds) = current_cmd.subcommand { + // sub_commands = Some(vec![]); + for mut sub in sub_cmds { + // sub_commands.as_mut().push(sub.name.to_string()); + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub); + } + } else { + // sub_commands = None; + } + slf.commands.insert(current_path.clone(), Command::from_toml_cmd(current_cmd, ¤t_path)); + } + + pub fn new(index: usize, config: &AuxillaryCommandsTOML, exts: &mut Extensions) -> Result { + let mut slf = Self { + commands: IndexMap::new(), + top_commands: vec!(), + index: index, + help: None, + }; + + let mut commands_toml = PathBuf::from(&config.path); + if commands_toml.extension().is_none() { + commands_toml.set_extension("toml"); + } + + if commands_toml.exists() { + let content = match fs::read_to_string(&commands_toml) { + Ok(x) => x, + Err(e) => { + bail!("{}", e); + } + }; + + let command_config: CommandsToml = match toml::from_str(&content) { + Ok(x) => x, + Err(e) => { + bail!("Malformed commands.toml: {}", e); + } + }; + slf.help = command_config.help.to_owned(); + + if let Some(mut commands) = command_config.command { + for mut cmd in commands { + slf.top_commands.push(cmd.name.to_owned()); + Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); + } + } + + // TODO extensions? + if let Some(mut extensions) = command_config.extension { + for ext in extensions { + match exts.add_from_aux_toml(&slf, ext) { + Ok(_) => {}, + Err(e) => log_error!("Failed to add extensions from aux commands '{}' ({}): {}", slf.namespace(), slf.path().display(), e) + } + } + } + } else { + bail!("Could not find auxillary commands file at '{}'", commands_toml.display()); + } + Ok(slf) + } + + pub fn namespace(&self) -> String { + let config = &ORIGEN_CONFIG.auxillary_commands.as_ref().unwrap()[self.index]; + if let Some(n) = config.name.as_ref() { + n.to_string() + } else { + format!("{}", PathBuf::from(&config.path).file_stem().unwrap().to_str().unwrap()) + } + } + + pub fn path(&self) -> PathBuf { + PathBuf::from(&ORIGEN_CONFIG.auxillary_commands.as_ref().unwrap()[self.index].path) + } + + pub fn root(&self) -> PathBuf { + self.path().with_extension("") + } + + pub fn origin(&self) -> PathBuf { + origen_config_metadata().aux_cmd_sources[self.index].to_path_buf() + } +} + +pub (crate) fn add_helps(helps: &mut CmdHelps, aux_cmds: &AuxCmds) { + helps.add_core_cmd(CMD_NAME).set_help_msg("Interface with auxillary commands"); + for (ns, cmds) in aux_cmds.namespaces.iter() { + for (n, c) in cmds.commands.iter() { + helps.add_aux_cmd(ns, n).set_help_msg(&c.help); + } + } +} + +pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: &'a AuxCmds, exts: &'a Extensions) -> Result> { + // let help = "Interface with auxillary commands"; + // origen_commands.push(CommandHelp { + // name: CMD_NAME.to_string(), + // help: help.to_string(), + // shortcut: None, + // }); + + let mut aux_sub = helps.core_cmd(CMD_NAME) + // .about(help) + .visible_alias("aux_cmds") + .arg_required_else_help(true); + // .setting(AppSettings::ArgRequiredElseHelp); + // .arg("details") + // .arg("show_sources") + + for (ns, cmds) in aux_commands.namespaces.iter() { + let mut aux_sub_sub = clap::Command::new(ns).setting(AppSettings::ArgRequiredElseHelp); + if let Some(h) = cmds.help.as_ref() { + aux_sub_sub = aux_sub_sub.about(h.as_str()); + } + for top_cmd_name in cmds.top_commands.iter() { + // aux_sub_sub = aux_sub_sub.subcommand(super::build_commands(&c, &pls)); + // aux_sub_sub = aux_sub_sub.subcommand(super::build_commands(&c, Box::new(|namespace, cmd| aux_commands.namespaces.get(namespace).unwrap().commands.get(cmd).unwrap()))); + // let c = cmds.get(top_cmd_name).unwrap(); + // println!("N {}", top_cmd_name); + // println!("C {}", c.name); + aux_sub_sub = aux_sub_sub.subcommand(build_commands( + &cmds.commands.get(top_cmd_name).unwrap(), + &|cmd, app| { + exts.apply_to_aux_cmd(&ns, cmd, app) + }, + &|cmd| { + cmds.commands.get(cmd).unwrap() + }, + &|cmd, app| { + helps.apply_helps(&CmdSrc::Aux(ns.to_string(), cmd.to_string()), app) + } + )); + // aux_sub_sub = aux_sub_sub.subcommand(super::build_commands(&c, aux_commands::temp)); + } + aux_sub = aux_sub.subcommand(aux_sub_sub); + } + Ok(app.subcommand(aux_sub)) + + // if let Some(aux_cmds_configs) = ORIGEN_CONFIG.auxillary_commands.as_ref() { + // for (aux_cmds_config) in aux_cmds_configs.iter() { + // println!("Aux commands from {}", aux_cmds_config.path); + + // let mut commands_toml = PathBuf::from(aux_cmds); + // if commands_toml.extension.is_none() { + // commands_toml.push(".toml"); + // } + + // if commands_toml.exists() { + // let content = match fs::read_to_string(&commands_toml) { + // Ok(x) => x, + // Err(e) => { + // bail!("{}", e); + // } + // }; + + // let command_config: CommandsToml = match toml::from_str(&content) { + // Ok(x) => x, + // Err(e) => { + // bail!("Malformed commands.toml: {}", e); + // } + // }; + + // if let Some(mut commands) = command_config.command { + // let aux_namespace = SubCommand::with_name() + // for mut cmd in commands { + // // for (n, c) in pl.commands.iter() { + // aux_namespace = aux_namespace.subcommand(crate::build_command(&cmd)); + // // } + // // Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); + // } + // // for mut command in commands { + // // slf.command_helps.push(CommandHelp { + // // name: command.name.clone(), + // // help: command.help.clone(), + // // shortcut: command.alias.clone(), + // // }); + // // build_upcase_names(&mut command); + // // slf.commands.push(command); + // // } + // } + + // // if let Some(mut extensions) = command_config.extension { + // // for ext in extensions { + // // match exts.add_from_pl_toml(&slf, ext) { + // // Ok(_) => {}, + // // Err(e) => log_error!("Failed to add extensions from plugin '{}': {}", slf.name, e) + // // } + // // // slf.extensions.push(Extension::from_extension_toml(ExtensionSource::Plugin(slf.name.to_string()), ext)?); + // // } + // // } + // } else { + // bail!("Could not find auxillary commands file at {}", commands_toml.display()); + // } + + + // } + // } + + // let updated = app.subcommand( + // SubCommand::with_name(CMD_NAME) + // // .subcommand( + // // SubCommand::with_name("list") + // // .about("List the available plugins") + // // .visible_alias("ls") + // // // .arg( + // // // Arg::new("all") + // // // .help("Set the password for all datasets") + // // // .takes_value(false) + // // // .required(false) + // // // .long("all") + // // // .short('a'), + // // // ) + // // ) + // ); + + // let help = "Access added commands from individual plugins"; + // origen_commands.push(CommandHelp { + // name: PL_CMD_NAME.to_string(), + // help: help.to_string(), + // shortcut: None, + // }); + // let mut pl_sub = SubCommand::with_name(PL_CMD_NAME) + // .about(help) + // .visible_alias("pl"); + // if let Some(pls) = plugins { + // for (pl_name, pl) in pls.plugins.iter() { + // let mut pl_sub_sub = SubCommand::with_name(pl_name).setting(AppSettings::ArgRequiredElseHelp); + // // if let Some(pl_cmds) = pl.commands { + // // for (n, c) in pl_cmds { + // for (n, c) in pl.commands.iter() { + // pl_sub_sub = pl_sub_sub.subcommand(crate::build_pl_commands(&c, &pls)); + // } + // pl_sub = pl_sub.subcommand(pl_sub_sub); + // // } + // } + // } + // let updated = updated.subcommand(pl_sub); + // // let updated = app.subcommand( + // // SubCommand::with_name(PL_CMD_NAME) + // // .about(help) + // // // .setting(AppSettings::ArgRequiredElseHelp) + // // .visible_alias("pl") + // // // .arg( + // // // Arg::new("code") + // // // .help("Set the password for all datasets") + // // // .takes_value(true) + // // // .value_name("CODE") + // // // .multiple(true) + // // // .required(true) + // // // ) + // // ); + + // Ok(updated) +} \ No newline at end of file diff --git a/rust/origen/cli/src/framework/core_cmds.rs b/rust/origen/cli/src/framework/core_cmds.rs new file mode 100644 index 00000000..38f57399 --- /dev/null +++ b/rust/origen/cli/src/framework/core_cmds.rs @@ -0,0 +1,104 @@ +use super::{CmdHelps, Extensions}; +use origen::Result; +use clap::Command; + +pub fn add_core_subc_helps(helps: &mut CmdHelps, base_name: &str, cmd: &str, cmd_help: &str, subcmds: &[SubCmd]) { + let n = format!("{}.{}", base_name, cmd); + helps.add_core_cmd(&n).set_help_msg(cmd_help); + for subc in subcmds { + add_core_subc_helps(helps, &n, subc.name, subc.help, subc.subcmds); + } +} + +pub fn add_core_subcs<'a>(helps: &'a CmdHelps, exts: &'a Extensions, cmd: Command<'a>, base: Vec<&str>, subcmd: &SubCmd) -> Result> { + let mut n = base.clone(); + n.push((subcmd.name)); + let mut subc = helps.core_subc(&n); + for s in subcmd.subcmds { + subc = add_core_subcs(helps, exts, subc, n.clone(), s)?; + } + if let Some(setup) = subcmd.proc { + subc = setup(subc); + } + // add exts + subc = exts.apply_to_core_cmd(&n.join("."), subc); + Ok(cmd.subcommand(subc)) +} + +pub struct SubCmd<'a> { + pub name: &'static str, + pub help: &'static str, + pub subcmds: &'a [SubCmd<'a>], + pub proc: Option<&'a dyn Fn(Command) -> Command>, +} + +#[macro_export] +macro_rules! core_subcmd { + ($name:expr, $help:expr, $proc:tt) => {{ + $crate::framework::core_cmds::SubCmd { + name: $name, + help: $help, + subcmds: &[], + proc: Some(&$proc), + } + }}; + + ($name:expr, $help:expr, $proc:tt, $($subcmd:expr ), *) => {{ + $crate::framework::core_cmds::SubCmd { + name: $name, + help: $help, + subcmds: &[$($subcmd),*], + proc: Some(&$proc), + } + }}; + + ($name:expr, $help:expr) => {{ + $crate::framework::core_cmds::SubCmd { + name: $name, + help: $help, + subcmds: &[], + proc: None, + } + }}; + + ($name:expr, $help:expr, $($subcmd:expr ), *) => {{ + $crate::framework::core_cmds::SubCmd { + name: $name, + help: $help, + subcmds: &[$($subcmd),*], + proc: None, + } + }}; +} + +#[macro_export] +macro_rules! gen_core_cmd_funcs { + ($base_name:expr, $cmd_help:expr, $proc:tt) => { + gen_core_cmd_funcs!($base_name, $cmd_help, $proc,); + }; + ($base_name:expr, $cmd_help:expr, $proc:tt, $($subcmd:expr ), *) => { + // ($base_name:expr, $cmd_help:expr, $subcmds:expr) => { + // let mut cmd = helps.core_cmd(CMD_NAME); + pub (crate) fn add_helps(helps: &mut $crate::CmdHelps) { + helps.add_core_cmd($base_name).set_help_msg($cmd_help); + // for subc in $subcmds { + // add_core_cmd_int!(helps, $base_name, $subcmd.0, $subcmd.1, $subcmd.2); + // } + $( + // add_core_cmd_int!(helps, $base_name, $subcmd.0, $subcmd.1, $subcmd.2); + $crate::framework::core_cmds::add_core_subc_helps(helps, $base_name, $subcmd.name, $subcmd.help, $subcmd.subcmds); + )* + } + + pub (crate) fn add_commands<'a>(app: clap::Command<'a>, helps: &'a $crate::CmdHelps, exts: &'a $crate::Extensions) -> origen::Result> { + let mut cmd = helps.core_cmd($base_name); + cmd = $proc(cmd); + $( + // add_core_cmd_int!(helps, $base_name, $subcmd.0, $subcmd.1, $subcmd.2); + cmd = $crate::framework::core_cmds::add_core_subcs(helps, exts, cmd, vec!($base_name), &$subcmd)?; + )* + cmd = exts.apply_to_core_cmd($base_name, cmd); + Ok(app.subcommand(cmd)) + } + }; +} \ No newline at end of file diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs new file mode 100644 index 00000000..656129da --- /dev/null +++ b/rust/origen/cli/src/framework/extensions.rs @@ -0,0 +1,369 @@ +use std::collections::HashMap; +use origen::{Result, in_app_invocation, in_global_invocation}; +// use crate::app_commands::{CommandsToml}; +use super::plugins::{Plugins, Plugin}; +use super::aux_cmds::{AuxCmdNamespace}; +use clap::Command as ClapCommand; +use super::{ArgTOML, Arg, OptTOML, Opt, CmdSrc}; +use crate::{from_toml_args, from_toml_opts}; +use std::path::PathBuf; +use std::{fmt, env}; + +// TODO refactor this +use super::helps::CmdSrc as ExtensionTarget; + +// macro_rules! core_cmd { +// // ($src: expr) => { crate::ExtensionSource::Core($src) } +// // ($src: expr) => { crate::ExtensionSource::Plugin($src) } +// // ($src: expr, $app: expr) => { +// // let mut split = cmd.split('.'); +// // let mut sub = app.find_subcommand_mut(split.next().unwrap()).unwrap(); +// // } +// } + +#[derive(Debug)] +pub struct Extensions { + extensions: HashMap>, +} + +impl Extensions { + pub fn new() -> Self { + Self { + extensions: HashMap::new(), + } + } + + pub fn exts(&self) -> &HashMap> { + &self.extensions + } + + fn add_ext(&mut self, t: ExtensionTOML, f: F) -> Result + where F: Fn(ExtensionTOML) -> Result + { + let c = CmdSrc::new(&t.extend)?; + let e = f(t)?; + if !e.should_extend_in_env()? { + return Ok(false); + } + if in_app_invocation() { + // App is present + if !e.should_extend_app_context() { + return Ok(false) + } + } else { + if c.is_app_cmd() { + // Outside of an app but extending an app command - implicitly skip these + return Ok(false) + } else { + if !e.should_extend_global_context() { + return Ok(false) + } + } + } + self.extensions.entry(c).or_default().push(e); + Ok(true) + } + + pub fn add_from_app_toml(&mut self, ext_toml: ExtensionTOML) -> Result { + // println!("Extending"); + // let t = ExtensionTarget::new(&ext_toml.extend)?; + // let e = Extension::from_extension_toml(ExtensionSource::App, ext_toml)?; + self.add_ext(ext_toml, |t| Extension::from_extension_toml(ExtensionSource::App, t)) + + // self.extensions.entry(ExtensionTarget::new(&ext_toml.extend)?).or_default().push( + // Extension::from_extension_toml(ExtensionSource::App, ext_toml)? + // ); + // println!("Ext: {:?}", self.extensions.keys().collect::>()); + // Ok(()) + } + + pub fn add_from_pl_toml(&mut self, pl: &Plugin, ext_toml: ExtensionTOML) -> Result { + // println!("Extending"); + // let t = ExtensionTarget::new(&ext_toml.extend)?; + // let e = Extension::from_extension_toml(ExtensionSource::Plugin(pl.name.to_owned()), ext_toml)?; + self.add_ext(ext_toml, |t| Extension::from_extension_toml(ExtensionSource::Plugin(pl.name.to_owned()), t)) + // if self.should_add_ext(t, e) { + // // if !app_present!() && (t.is_app_cmd() || e.extend_in_app_context_only()) { + // // return Ok(()) + // // } + // self.extensions.entry(t).or_default().push(e); + // } + // // println!("Ext: {:?}", self.extensions.keys().collect::>()); + // Ok(()) + } + + pub fn add_from_aux_toml(&mut self, ns: &AuxCmdNamespace, ext_toml: ExtensionTOML) -> Result { + // println!("Extending"); + // let t = ExtensionTarget::new(&ext_toml.extend)?; + // let e = Extension::from_extension_toml(ExtensionSource::Aux(ns.namespace(), ns.root()), ext_toml)?; + self.add_ext(ext_toml, |t| Extension::from_extension_toml(ExtensionSource::Aux(ns.namespace(), ns.root()), t)) + // if self.should_add_ext(t, e) { + // self.extensions.entry(t).or_default().push(e); + // } + + // self.extensions.entry(ExtensionTarget::new(&ext_toml.extend)?).or_default().push( + // Extension::from_extension_toml(ExtensionSource::Aux(ns.namespace(), ns.root()), ext_toml)? + // ); + // println!("Ext: {:?}", self.extensions.keys().collect::>()); + // Ok(()) + } + + // pub fn add_from_app_toml(&mut self, ExtensionSource, ExtensionTOML) -> Result<()> { + // ? + // } + + // pub fn add_from_toml(&mut self, src: ExtensionSource, ext_toml: ExtensionTOML) -> Result<()> { + // todo!() + // } + + pub fn apply_to_core_cmd<'a>(&'a self, cmd: &str, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + self.apply_to(&ExtensionTarget::Core(cmd.to_string()), app) + } + + pub fn apply_to_app_cmd<'a>(&'a self, cmd: &str, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + self.apply_to(&ExtensionTarget::App(cmd.to_string()), app) + } + + pub fn apply_to_pl_cmd<'a>(&'a self, pl: &str, cmd: &str, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + self.apply_to(&ExtensionTarget::Plugin(pl.to_string(), cmd.to_string()), app) + } + + pub fn apply_to_aux_cmd<'a>(&'a self, ns: &str, cmd: &str, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + self.apply_to(&ExtensionTarget::Aux(ns.to_string(), cmd.to_string()), app) + } + + pub fn apply_to<'a>(&'a self, cmd: &ExtensionTarget, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + if let Some(exts) = self.extensions.get(cmd) { + for ext in exts { + if let Some(args) = ext.args.as_ref() { + app = super::apply_args(args, app); + } + if let Some(opts) = ext.opts.as_ref() { + app = super::apply_opts(opts, app); + } + } + } else { + // println!("No extension found for {:?}", cmd); + // TODO + } + app + } + + pub fn get_core_ext(&self, cmd_path: &str) -> Option<&Vec> { + self.extensions.get(&ExtensionTarget::Core(cmd_path.to_string())) + } + + pub fn get_core_subc_ext(&self, cmd_path: &[&str]) -> Option<&Vec> { + self.extensions.get(&ExtensionTarget::Core(cmd_path.join("."))) + } + + pub fn get_app_ext(&self, cmd_path: &str) -> Option<&Vec> { + self.extensions.get(&ExtensionTarget::App(cmd_path.to_string())) + } + + pub fn get_pl_ext(&self, pl: &str, cmd_path: &str) -> Option<&Vec> { + self.extensions.get(&ExtensionTarget::Plugin(pl.to_string(), cmd_path.to_string())) + } + + pub fn get_aux_ext(&self, ns: &str, cmd_path: &str) -> Option<&Vec> { + self.extensions.get(&ExtensionTarget::Aux(ns.to_string(), cmd_path.to_string())) + } + + // pub fn apply<'a>(&self, plugins: &Option, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + // for (target, ext) in self.extensions.iter() { + // match target { + // ExtensionTarget::Core(cmd) => { + // // todo!() + // let mut split = cmd.split('.'); + // let mut sub = app.find_subcommand_mut(split.next().unwrap()).unwrap(); + // // let mut sub = app.find_subcommand_mut(split.next().unwrap()).unwrap(); // ok_or(format!("Cannot find core command '{}'", target))?; + // // while let Some(s) = split.next() { + // // sub = sub.find_subcommand_mut(split.next().unwrap()).unwrap(); // ok_or(format!("Cannot find core command '{}'", target))?; + // // } + // // sub.mut_subcommand(split.next().unwrap(), |subc| subc.disable_help_flag(true)); + // // sub.subcommand("hi"); + // }, + // ExtensionTarget::App(cmd) => { + // // todo!() + // }, + // ExtensionTarget::Plugin(pl, cmd) => { + // // todo!() + // } + // } + // } + // app + // } +} + +// #[derive(Debug, Hash, Eq, PartialEq)] +// pub enum ExtensionTarget { +// Core(String), // Extend a core command +// App(String), // Extend an app command +// Plugin(String, String), // Extend a plugin command +// Aux(String, String), // Extend an auxillary command +// } + +// impl PartialEq for ExtensionTarget { +// fn eq(&self, other: &ExtensionTarget) -> bool { +// match self { +// Self::Core(cmd) => match other { +// Self::Core(other_cmd) => cmd == other_cmd, +// _ => false +// }, +// Self::Plugin(pl, cmd) => match other { +// Self::Plugin(other_pl, other_cmd) => (pl == other_pl) && (cmd == other_cmd), +// _ => false, +// }, +// _=> false +// } +// } +// } + +// impl Eq for ExtensionTarget {} + +// impl ExtensionTarget { +// pub fn new(target: &str) -> Result { +// let (scope, t) = target.split_once('.').ok_or_else(|| format!("Could not discern scope from '{}'", target))?; +// Ok(match scope { +// "origen" => Self::Core(t.to_string()), +// "app" => Self::App(t.to_string()), +// "plugin" => { +// let (pl_name, pl_t) = t.split_once('.').ok_or_else(|| format!("Could not discern plugin from '{}'", t))?; +// Self::Plugin(pl_name.to_string(), pl_t.to_string()) +// } +// "aux" => { +// let (ns_name, aux_t) = t.split_once('.').ok_or_else(|| format!("Could not discern auxillary command namespace from '{}'", t))?; +// Self::Plugin(ns_name.to_string(), aux_t.to_string()) +// } +// _ => bail!("Unknown target scope '{}'. Expected 'origen', 'app', 'aux', or 'plugin'", scope) +// }) +// } +// } + +#[derive(Debug, Deserialize)] //, Deserialize, Clone)] +pub struct ExtensionTOML { + pub extend: String, // Command to extend + // pub target: Option, + pub in_global_context: Option, // Extend in the global context + pub in_app_context: Option, // Extend in application context + pub on_env: Option>, + pub arg: Option>, + pub opt: Option>, + // pub name: String, + // pub help: String, + // pub alias: Option, + // pub arg: Option>, + // pub subcommands: Option>, + // pub full_name: String, +} + +#[derive(Debug, Hash, Eq, PartialEq)] +pub enum ExtensionSource { + App, + Plugin(String), + Aux(String, PathBuf), +} + +impl fmt::Display for ExtensionSource { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::App => write!(f, "the App"), + Self::Plugin(pl_name) => write!(f, "plugin '{}'", pl_name), + Self::Aux(ns, _) => write!(f, "aux namespace '{}'", ns) + } + } +} + +#[derive(Debug)] +pub struct Extension { + pub extends: String, + pub in_global_context: Option, + pub in_app_context: Option, + pub on_env: Option>, + pub args: Option>, + pub opts: Option>, + + pub source: ExtensionSource, +} + +impl Extension { + // pub fn add_extension(extensions: &mut Extensions, ext_source: ExtensionSource, ext: ExtensionTOML) -> Result { + // self.extensions.insert() + // } + + pub fn from_extension_toml(ext_source: ExtensionSource, ext: ExtensionTOML) -> Result { + let mut slf = Self { + extends: ext.extend, + in_global_context: ext.in_global_context, + in_app_context: ext.in_app_context, + on_env: ext.on_env, + args: from_toml_args!(ext.arg), + opts: from_toml_opts!(ext.opt), + source: ext_source, + }; + if let Some(opts) = slf.opts.as_mut() { + for opt in opts { + opt.help += &format!(" [Extended from {}]", + match slf.source { + ExtensionSource::App => { + "the app".to_string() + }, + ExtensionSource::Plugin(ref pl_name) => { + format!("plugin: '{}'", pl_name) + }, + ExtensionSource::Aux(ref ns, _) => { + format!("aux namespace: '{}'", ns) + } + } + ); + } + } + Ok(slf) + } + + pub fn should_extend_global_context(&self) -> bool { + self.in_global_context.unwrap_or(true) + } + + pub fn should_extend_app_context(&self) -> bool { + self.in_app_context.unwrap_or(true) + } + + pub fn should_extend_in_env(&self) -> Result { + if let Some(envs) = self.on_env.as_ref() { + for e in envs { + let mut s = e.splitn(1, '='); + let e_name= s.next().ok_or_else( || format!("Failed to parse 'on_env' '{}', extending '{}', for {}", e, self.extends, self.source))?.trim(); + let e_val = s.next(); + // return Ok(true) + match env::var(e_name) { + Ok(val) => { + if let Some(v) = e_val { + if v == val { + return Ok(true); + } + } else { + return Ok(true); + } + }, + Err(err) => match err { + env::VarError::NotPresent => {}, + _ => { + return Err(err.into()); + } + } + } + // let v = e.ok_or_else(|err| match err { + // std::env::VarError::NotPresent { + // return false + // }, + // _ => return Err(err) + // }) + // let s = + } + Ok(false) + } else { + Ok(true) + } + } +} diff --git a/rust/origen/cli/src/framework/helps.rs b/rust/origen/cli/src/framework/helps.rs new file mode 100644 index 00000000..e9c61b9e --- /dev/null +++ b/rust/origen/cli/src/framework/helps.rs @@ -0,0 +1,202 @@ +use std::collections::HashMap; +use super::Plugin; +use crate::commands::_prelude::*; +use std::fmt; +use super::extensions::ExtensionSource; + +#[derive(Debug)] +pub struct CmdHelps { + helps: HashMap +} + +impl CmdHelps { + pub fn new() -> Self { + Self { + helps: HashMap::new() + } + } + + pub fn core_cmd(&self, cmd: &str) -> Command { + self.apply_core_cmd_helps(cmd, Command::new(cmd)) + } + + pub fn core_subc(&self, cmd_path: &[&str]) -> Command { + self.apply_core_subc_helps(cmd_path, Command::new(*cmd_path.last().unwrap())) + } + + pub fn add_core_cmd(&mut self, cmd_name: &str) -> &mut CmdHelp { + // self.insert(CmdSrc::Core(cmd_name.to_string()), CmdHelp::new()); + // self.get() + self.helps.entry(CmdSrc::Core(cmd_name.to_string())).or_default() + } + + pub fn add_core_sub_cmd(&mut self, cmd_path: &[&str]) -> &mut CmdHelp { + self.helps.entry(CmdSrc::Core(cmd_path.join("."))).or_default() + } + + pub fn add_app_cmd(&mut self, cmd_name: &str) -> &mut CmdHelp { + self.helps.entry(CmdSrc::App(cmd_name.to_string())).or_default() + } + + pub fn add_pl_cmd(&mut self, pl_name: &str, cmd_name: &str) -> &mut CmdHelp { + // self.insert(CmdSrc::Core(cmd_name.to_string()), CmdHelp::new()); + // self.get() + // &mut self.entry(CmdSrc::Core(cmd_name.to_string())).and_modify() + self.helps.entry(CmdSrc::Plugin(pl_name.to_string(), cmd_name.to_string())).or_default() + } + + pub fn add_aux_cmd(&mut self, ns: &str, cmd_name: &str) -> &mut CmdHelp { + self.helps.entry(CmdSrc::Aux(ns.to_string(), cmd_name.to_string())).or_default() + } + + pub fn apply_core_cmd_helps<'a>(&'a self, cmd_name: &str, mut app: Command<'a>) -> Command<'a> { + self.apply_helps(&CmdSrc::Core(cmd_name.to_string()), app) + } + + pub fn apply_core_subc_helps<'a>(&'a self, cmd_path: &[&str], mut app: Command<'a>) -> Command<'a> { + self.apply_helps(&CmdSrc::Core(cmd_path.join(".")), app) + } + + pub fn apply_helps<'a>(&'a self, cmd_src: &CmdSrc, mut app: Command<'a>) -> Command<'a> { + if let Some(helps) = self.helps.get(cmd_src) { + if let Some(h) = helps.before_help.as_ref() { + app = app.before_help(h.as_str()); + } + if let Some(h) = helps.help.as_ref() { + app = app.about(h.as_str()); + } + if let Some(h) = helps.after_help.as_ref() { + app = app.after_help(h.as_str()); + } + } else { + log_error!("Could not apply help messages to {} - no such command found", cmd_src); + } + app + } + + pub fn apply_exts(&mut self, extensions: &Extensions) { + for (target, exts) in extensions.exts() { + if let Some(help) = self.helps.get_mut(&target) { + let mut extended_from_app = false; + let mut pls: Vec<&str> = vec!(); + let mut nspaces: Vec<&str> = vec!(); + for ext in exts.iter() { + match ext.source { + ExtensionSource::App => extended_from_app = true, + ExtensionSource::Plugin(ref n) => pls.push(n), + ExtensionSource::Aux(ref n, _) => nspaces.push(n), + } + } + let mut msg = "This command is extended from:".to_string(); + if extended_from_app { + msg += "\n - the App"; + } + if !pls.is_empty() { + msg += &format!( + "\n - Plugins: {}", + pls.iter().map(|n| format!("'{}'", n)).collect::>().join(", ") + ); + } + if !nspaces.is_empty() { + msg += &format!( + "\n - Aux Namespaces: {}", + nspaces.iter().map(|n| format!("'{}'", n)).collect::>().join(", ") + ); + } + // exts.iter().map( |e| e.source.to_string()).collect::>().join(", ") + if let Some(after) = help.after_help.as_ref() { + help.after_help = Some(after.to_string() + "\n\n" + &msg); + } else { + help.after_help = Some(msg); + } + } else { + // Suppress any app command errors when in the global context + // if !app_present!() && target.is_app_cmd() { + log_error!("Tried to extend unknown command '{}' from:", target); + for ext in exts { + log_error!("\t{}", ext.source); + } + // } + } + } + } +} + +#[derive(Default, Debug)] +pub struct CmdHelp { + help: Option, + after_help: Option, + before_help: Option, +} + +impl CmdHelp { + pub fn set_help_msg(&mut self, help_msg: &str) -> &mut Self { + self.help = Some(help_msg.to_string()); + self + } + + pub fn set_optional_help_msg(&mut self, help_msg: Option) -> &mut Self { + self.help = help_msg; + self + } +} + + +#[derive(Debug, Hash, Eq, PartialEq)] +pub enum Invocation { + Global, + App, +} + +#[derive(Debug, Hash, Eq, PartialEq)] +pub enum CmdSrc { + Core(String), // Core command + App(String), // App command + Plugin(String, String), // Plugin command + Aux(String, String), // Aux command +} + +impl CmdSrc { + pub fn new(target: &str) -> Result { + let (scope, t) = target.split_once('.').ok_or_else(|| format!("Could not discern scope from '{}'", target))?; + Ok(match scope { + "origen" => Self::Core(t.to_string()), + "app" => Self::App(t.to_string()), + "plugin" => { + let (pl_name, pl_t) = t.split_once('.').ok_or_else(|| format!("Could not discern plugin from '{}'", t))?; + Self::Plugin(pl_name.to_string(), pl_t.to_string()) + } + "aux" | "aux_ns" => { + let (ns_name, aux_t) = t.split_once('.').ok_or_else(|| format!("Could not discern auxillary command namespace from '{}'", t))?; + Self::Aux(ns_name.to_string(), aux_t.to_string()) + } + _ => bail!("Unknown target scope '{}'. Expected 'origen', 'app', 'aux', or 'plugin'", scope) + }) + } + + pub fn is_app_cmd(&self) -> bool { + match self { + Self::App(_) => true, + _ => false, + } + } +} + +impl fmt::Display for CmdSrc { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::Core(cmd) => { + write!(f, "origen.{}", cmd) + }, + Self::App(cmd) => { + write!(f, "app.{}", cmd) + }, + Self::Plugin(pl_name, cmd) => { + write!(f, "plugin.{}.{}", pl_name, cmd) + }, + Self::Aux(ns_name, cmd) => { + write!(f, "aux_ns.{}.{}", ns_name, cmd) + } + } + } +} \ No newline at end of file diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs new file mode 100644 index 00000000..e4e20077 --- /dev/null +++ b/rust/origen/cli/src/framework/mod.rs @@ -0,0 +1,636 @@ +// FOR_PR clean up this and entire directory +pub mod helps; +pub mod extensions; +pub mod plugins; +pub mod aux_cmds; +pub mod app_cmds; +#[macro_use] +pub mod core_cmds; + +pub use extensions::{Extensions, ExtensionTOML}; +pub use plugins::{Plugins, Plugin}; +pub use aux_cmds::AuxCmds; +pub use app_cmds::AppCmds; +pub use helps::{CmdHelps, CmdHelp, CmdSrc}; + +use clap::{App}; +use clap::Command as ClapCommand; +use origen::Result; +use crate::commands::_prelude::clap_arg_actions::*; + +#[macro_export] +macro_rules! from_toml_args { + ($toml_args: expr) => { + $toml_args.as_ref() + .map(|args| args.iter() + .map( |a| crate::framework::Arg::from_toml(a)) + .collect::>()) + } +} + +#[macro_export] +macro_rules! from_toml_opts { + ($toml_opts: expr) => { + $toml_opts.as_ref() + .map(|opts| opts.iter() + .map( |o| crate::framework::Opt::from_toml(o)) + .collect::>()) + } +} + +#[derive(Debug, Deserialize)] +pub (crate) struct CommandsToml { + pub command: Option>, + pub extension: Option> +} + +#[derive(Debug, Deserialize, Clone)] +pub struct CommandTOML { + pub name: String, + pub help: String, + pub alias: Option, + pub arg: Option>, + pub opt: Option>, + pub subcommand: Option>, + // pub consolidate_subc_run_funcs: Option, + // pub run_func: Option, +} + +#[derive(Debug)] +pub struct Command { + pub name: String, + pub help: String, + pub alias: Option, + pub args: Option>, + pub opts: Option>, + pub subcommands: Option>, + pub full_name: String, + // pub consolidate_subc_run_funcs: Option, + // pub run_func: Option, +} + +impl Command { + pub fn from_toml_cmd(cmd: &CommandTOML, cmd_path: &str) -> Self { + Self { + name: cmd.name.to_owned(), + help: cmd.help.to_owned(), + alias: cmd.alias.to_owned(), + // args: cmd.arg.to_owned(), + args: from_toml_args!(cmd.arg), + opts: from_toml_opts!(cmd.opt), + // opts: cmd.opt.as_ref().map(|opts| opts.iter().map( |o| Opt::from_toml(o)).collect::>()), + subcommands: cmd.subcommand.as_ref() + .map(|sub_cmds| sub_cmds.iter() + .map(|c| format!("{}.{}", cmd_path, &c.name.to_string())) + .collect::>() + ), + full_name: cmd_path.to_string(), + } + } +} + +#[derive(Debug, Deserialize, Clone)] +pub struct ArgTOML { + pub name: String, + pub help: String, + pub multiple: Option, + pub required: Option, + pub value_name: Option, + pub use_delimiter: Option, +} + +#[derive(Debug)] +pub struct Arg { + pub name: String, + pub help: String, + pub multiple: Option, + pub required: Option, + pub value_name: Option, + pub use_delimiter: Option, + pub upcased_name: Option, +} + +impl Arg { + fn from_toml(arg: &ArgTOML) -> Self { + Self { + name: arg.name.to_owned(), + help: arg.help.to_owned(), + multiple: arg.multiple, + required: arg.required, + value_name: arg.value_name.to_owned(), + use_delimiter: arg.use_delimiter, + upcased_name: { + if arg.value_name.is_some() { + None + } else { + Some(arg.name.to_uppercase()) + } + }, + } + } +} + +#[derive(Debug, Deserialize, Clone)] +pub struct OptTOML { + pub name: String, + pub help: String, + pub short: Option, + pub long: Option, + pub takes_value: Option, + pub multiple: Option, + pub required: Option, + pub value_name: Option, + pub use_delimiter: Option, + pub short_aliases: Option>, + pub long_aliases: Option>, + pub hidden: Option, +} + +#[derive(Debug)] +pub struct Opt { + pub name: String, + pub help: String, + pub short: Option, + pub long: Option, + pub takes_value: Option, + pub multiple: Option, + pub required: Option, + pub value_name: Option, + pub use_delimiter: Option, + pub short_aliases: Option>, + pub long_aliases: Option>, + pub hidden: Option, + pub upcased_name: Option, +} + +impl Opt { + fn from_toml(opt: &OptTOML) -> Self { + Self { + name: opt.name.to_owned(), + help: opt.help.to_owned(), + short: opt.short, + long: opt.long.to_owned(), + takes_value: opt.takes_value, + multiple: opt.multiple, + required: opt.required, + value_name: opt.value_name.to_owned(), + use_delimiter: opt.use_delimiter, + short_aliases: opt.short_aliases.to_owned(), + long_aliases: opt.long_aliases.to_owned(), + hidden: opt.hidden, + upcased_name: { + if opt.value_name.is_some() { + None + } else { + Some(opt.name.to_uppercase()) + } + }, + } + } +} + +// pub (crate) fn build_upcase_names(command: &mut CommandTOML) { +// if let Some(args) = &mut command.arg { +// for arg in args { +// arg.upcased_name = Some(arg.name.to_uppercase()); +// } +// } +// if let Some(subcommands) = &mut command.subcommand { +// for mut subcmd in subcommands { +// build_upcase_names(&mut subcmd); +// } +// } +// } +// helps: &'a mut CmdHelps, +pub (crate) fn build_commands<'a, F, G, H>(cmd_def: &'a Command, exts: &G, cmd_container: &F, apply_helps: &H) -> App<'a> +where + F: Fn(&str) -> &'a Command, + G: Fn(&str, App<'a>) -> App<'a>, + H: Fn(&str, App<'a>) -> App<'a> +{ + let mut cmd = ClapCommand::new(&cmd_def.name); // .about(cmd_def.help.as_str()); + // TODO need test case for cmd alias + if cmd_def.alias.is_some() { + cmd = cmd.visible_alias(cmd_def.alias.as_ref().unwrap().as_str()); + } + + if let Some(args) = cmd_def.args.as_ref() { + // let mut req_arg_index = 0; + cmd = apply_args(args, cmd); + // for arg_def in args.iter() { + // let mut arg = clap::Arg::new(arg_def.name.as_str()) + // .takes_value(true) + // .help(arg_def.help.as_str()); + + // if let Some(vn) = arg_def.value_name.as_ref() { + // arg = arg.value_name(vn); + // } else { + // arg = arg.value_name(arg_def.upcased_name.as_ref().unwrap()); + // } + + // if let Some(d) = arg_def.use_delimiter { + // arg = arg.use_value_delimiter(d); + // arg = arg.multiple_values(true); + // } + // if let Some(m) = arg_def.multiple { + // arg = arg.multiple_values(m); + // } + + // if let Some(r) = arg_def.required { + // arg = arg.required(r); + // } + + // cmd = cmd.arg(arg); + // } + } + + if let Some(opts) = cmd_def.opts.as_ref() { + // For each arg + // for j in 0..cmd_def.args.len() { + cmd = apply_opts(opts, cmd); + // for opt_def in opts.iter() { + // let opt_def = &cmd_def.opts.as_ref().unwrap()[j]; + // println!("opt name: {}", opt_def.name); + // let mut opt = clap::Arg::new(opt_def.name.as_str()).help(opt_def.help.as_str()); + + // if let Some(ud) = opt_def.use_delimiter { + // opt = opt.use_value_delimiter(ud); + // opt = opt.multiple_values(true); + // opt = opt.takes_value(true); + // } + // if let Some(m) = opt_def.multiple { + // opt = opt.multiple(m); + // opt = opt.takes_value(true); + // } + // if let Some(val_name) = opt_def.value_name.as_ref() { + // opt = opt.value_name(val_name); + // opt = opt.takes_value(true); + // } + // if let Some(tv) = opt_def.takes_value { + // opt = opt.takes_value(tv); + // } + + // if !opt.is_takes_value_set() { + // opt = opt.action(clap::ArgAction::Count); + // } + + // // if let Some(s) = opt_def.stack.or(true) { + // // if !arg.is_takes_value_set { + // // arg.action(clap::ArgAction::Count); + // // // arg = arg.multiple_occurrences(s); + // // } + // // } + // if let Some(ln) = opt_def.long.as_ref() { + // opt = opt.long(ln); + // } else { + // if !opt_def.short.is_some() { + // opt = opt.long(&opt_def.name); + // } + // } + // if let Some(sn) = opt_def.short { + // opt = opt.short(sn); + // // let chars = n.chars(); + // // if let Some(c) = chars.next() { + // // arg = arg.short(c); + // // } + // // if let Some(c) = chars.next() { + // // bail! + // // } + // // arg = arg.short(opt_def.short.as_ref().unwrap().chars().next().unwrap()) + // } + + + // // // If this is an arg without a switch + // // if arg_def.switch.is_some() && !arg_def.switch.unwrap() { + // // // Do nothing? + // // } else { + // // if arg_def.long.is_some() { + // // arg = arg.long(&arg_def.long.as_ref().unwrap()); + // // } else { + // // arg = arg.long(&arg_def.name); + // // } + // // if arg_def.short.is_some() { + // // arg = arg.short(arg_def.short.as_ref().unwrap().chars().next().unwrap()) + // // // arg = arg.short(arg_def.short.as_ref().unwrap()) + // // } + // // } + + // if let Some(r) = opt_def.required { + // opt = opt.required(r); + // } + + // if let Some(h) = opt_def.hidden { + // opt = opt.hidden(h); + // } + + // // if opt_def.takes_value.unwrap_or(false) || opt_def.value_name.is_some() || opt_def.multiple.is_some() { + // if opt.is_takes_value_set() && opt_def.value_name.is_none() { + // opt = opt.value_name(opt_def.upcased_name.as_ref().unwrap()); + // // if let Some(val_name) = opt_def.value_name.as_ref() { + // // opt = opt.value_name(val_name); + // // } else { + // // opt = opt.value_name(opt_def.upcased_name.as_ref().unwrap()); + // // } + // } + + // if let Some(lns) = opt_def.long_aliases.as_ref() { + // let v = lns.iter().map( |s| s.as_str() ).collect::>(); + // opt = opt.visible_aliases(&v[..]); + // } + + // if let Some(sns) = opt_def.short_aliases.as_ref() { + // // let v = sns.iter().map( |s| s.as_str() ).collect::>(); + // opt = opt.visible_short_aliases(&sns[..]); + // } + + // cmd = cmd.arg(opt); + // } + } + + if let Some(subcommands) = &cmd_def.subcommands { + for c in subcommands { + // let subcmd = build_command(&c); + // let split = c.split_once('.').unwrap(); + // let subcmd = build_pl_commands(plugins.plugins.get(split.0).unwrap().commands.get(split.1).unwrap(), plugins); + let subcmd = build_commands( + cmd_container(c), + exts, + cmd_container, + apply_helps, + ); + cmd = cmd.subcommand(subcmd); + } + } + cmd = exts(&cmd_def.full_name, cmd); + cmd = apply_helps(&cmd_def.full_name, cmd); + // cmd = cmd.about(helps.first().as_ref().unwrap().help.as_ref().unwrap().as_str()); + + cmd +} + +pub (crate) fn apply_args<'a>(args: &'a Vec, mut cmd: App<'a>) -> App<'a> { + for arg_def in args { + // let arg_def = &cmd_def.arg.as_ref().unwrap()[j]; + // let mut arg = clap::Arg::new(arg_def.name.as_str()).help(arg_def.help.as_str()); + let mut arg = clap::Arg::new(arg_def.name.as_str()) + .action(SetArg) + .help(arg_def.help.as_str()); + + if let Some(vn) = arg_def.value_name.as_ref() { + arg = arg.value_name(vn); + } else { + arg = arg.value_name(arg_def.upcased_name.as_ref().unwrap()); + } + + if let Some(d) = arg_def.use_delimiter { + arg = arg.use_value_delimiter(d); + arg = arg.multiple_values(true).action(AppendArgs); + } + if let Some(m) = arg_def.multiple { + arg = arg.multiple_values(m).action(AppendArgs); + } + + if let Some(r) = arg_def.required { + arg = arg.required(r); + } + + // if let Some(ln) = arg_def.long.as_ref() { + // arg = arg.long(ln); + // } else { + // arg = arg.long(&arg_def.name); + // } + + // if arg_def.short.is_some() { + // // TODO add error handling + // // arg = arg.short(arg_def.short.as_ref().unwrap().chars().next().unwrap()) + // // arg = arg.short(arg_def.short.as_ref().unwrap()) + // } + + // If this is an arg without a switch + // if arg_def.switch.is_some() && !arg_def.switch.unwrap() { + // // Do nothing? + // } else { + // if arg_def.long.is_some() { + // arg = arg.long(&arg_def.long.as_ref().unwrap()); + // } else { + // arg = arg.long(&arg_def.name); + // } + // if arg_def.short.is_some() { + // arg = arg.short(arg_def.short.as_ref().unwrap().chars().next().unwrap()) + // // arg = arg.short(arg_def.short.as_ref().unwrap()) + // } + // } + + // if let Some(tv) = arg_def.takes_value.as_ref() { + // arg = arg.takes_value(*tv); + // } + + // if arg_def.multiple.is_some() { + // arg = arg.multiple(arg_def.multiple.unwrap()) + // } + // if arg_def.required.is_some() { + // arg = arg.required(arg_def.required.unwrap()); + // } + // if arg_def.use_delimiter.is_some() { + // arg = arg.use_delimiter(arg_def.use_delimiter.unwrap()) + // } + // if arg_def.hidden.is_some() { + // arg = arg.hidden(arg_def.hidden.unwrap()) + // } + + // if arg_def.takes_value.unwrap_or(false) || arg_def.value_name.is_some() || arg_def.multiple.is_some() { + // if arg_def.value_name.is_some() { + // arg = arg.value_name(arg_def.value_name.as_ref().unwrap()) + // } else { + // arg = arg.value_name(arg_def.upcased_name.as_ref().unwrap()) + // } + // } + + cmd = cmd.arg(arg); + } + cmd +} + +pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { + for opt_def in opts { + let mut opt = clap::Arg::new(opt_def.name.as_str()).action(CountArgs).help(opt_def.help.as_str()); + + if let Some(val_name) = opt_def.value_name.as_ref() { + opt = opt.value_name(val_name).action(SetArg); + // opt = opt.takes_value(true); + } + if let Some(tv) = opt_def.takes_value { + if tv { + // opt = opt.takes_value(tv); + opt = opt.action(AppendArgs); + } + } + if let Some(ud) = opt_def.use_delimiter { + if ud { + opt = opt.use_value_delimiter(ud); + } + opt = opt.multiple_values(true); + opt = opt.action(AppendArgs); // takes_value(true); + } + if let Some(m) = opt_def.multiple { + if m { + opt = opt.multiple(m).action(AppendArgs); + } else { + opt = opt.multiple(m).action(SetArg); + } + // opt = opt.takes_value(true); + } + + // if !opt.is_takes_value_set() { + // opt = opt.action(clap::ArgAction::Count); + // } + // println!("action {:?} {}", opt.get_action(), opt.get_action().takes_values()); + // if !opt.get_action().takes_values() { + // opt = opt.action(CountArgs); + // } + + // if let Some(s) = opt_def.stack.or(true) { + // if !arg.is_takes_value_set { + // arg.action(clap::ArgAction::Count); + // // arg = arg.multiple_occurrences(s); + // } + // } + if let Some(ln) = opt_def.long.as_ref() { + opt = opt.long(ln); + } else { + if !opt_def.short.is_some() { + opt = opt.long(&opt_def.name); + } + } + if let Some(sn) = opt_def.short { + opt = opt.short(sn); + // let chars = n.chars(); + // if let Some(c) = chars.next() { + // arg = arg.short(c); + // } + // if let Some(c) = chars.next() { + // bail! + // } + // arg = arg.short(opt_def.short.as_ref().unwrap().chars().next().unwrap()) + } + + + // // If this is an arg without a switch + // if arg_def.switch.is_some() && !arg_def.switch.unwrap() { + // // Do nothing? + // } else { + // if arg_def.long.is_some() { + // arg = arg.long(&arg_def.long.as_ref().unwrap()); + // } else { + // arg = arg.long(&arg_def.name); + // } + // if arg_def.short.is_some() { + // arg = arg.short(arg_def.short.as_ref().unwrap().chars().next().unwrap()) + // // arg = arg.short(arg_def.short.as_ref().unwrap()) + // } + // } + + if let Some(r) = opt_def.required { + opt = opt.required(r); + } + + if let Some(h) = opt_def.hidden { + opt = opt.hidden(h); + } + + // if opt_def.takes_value.unwrap_or(false) || opt_def.value_name.is_some() || opt_def.multiple.is_some() { + if opt.get_action().takes_values() && opt_def.value_name.is_none() { + opt = opt.value_name(opt_def.upcased_name.as_ref().unwrap().as_str()); + // if let Some(val_name) = opt_def.value_name.as_ref() { + // opt = opt.value_name(val_name); + // } else { + // opt = opt.value_name(opt_def.upcased_name.as_ref().unwrap()); + // } + } + + if let Some(lns) = opt_def.long_aliases.as_ref() { + let v = lns.iter().map( |s| s.as_str() ).collect::>(); + opt = opt.visible_aliases(&v[..]); + } + + if let Some(sns) = opt_def.short_aliases.as_ref() { + // let v = sns.iter().map( |s| s.as_str() ).collect::>(); + opt = opt.visible_short_aliases(&sns[..].iter().map(|a| *a).collect::>()); + } + + cmd = cmd.arg(opt); + } + cmd +} + +pub fn build_path<'a>(mut matches: &'a clap::ArgMatches) -> Result { + let mut path_pieces = vec!(); + while matches.subcommand_name().is_some() { + let n = matches.subcommand_name().unwrap(); + matches = matches.subcommand_matches(&n).unwrap(); + path_pieces.push(n); + // if path.is_empty() { + // path = name.to_string(); + // } else { + // path = format!("{}.{}", path, name); + // } + + // if let Some(cmd) = current_cmd { + // current_cmd = + // } + + // if let Some(cmd) = self.commands.get(&path) { + // // println!("Found command at {}", path); + // // if let Some(args) = &cmd.arg { + // // for arg in args { + // // if arg.multiple.is_some() && arg.multiple.unwrap() { + // // if let Some(v) = matches.values_of(&arg.name) { + // // let vals: Vec = v.map(|v| v.to_string()).collect(); + // // given_args.insert(arg.name.to_string(), vals); + // // } + // // } else { + // // if let Some(v) = matches.value_of(&arg.name) { + // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); + // // } + // // } + // // } + // // } + // if let Some(args) = &cmd.arg { + // for arg in args { + // if arg.multiple.is_some() && arg.multiple.unwrap() { + // if let Some(v) = matches.values_of(&arg.name) { + // // let vals: Vec = v.map(|v| v.to_string()).collect(); + // // given_args.insert(arg.name.to_string(), vals); + // args_str += &format!(", r'{}': [{}]", &arg.name, v.map(|v| format!("r'{}'", v)).collect::>().join(",")); + // } + // } else { + // if let Some(v) = matches.value_of(&arg.name) { + // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); + // args_str += &format!(", r'{}': r'{}'", &arg.name, v); + // } else if matches.contains_id(&arg.name) { + // args_str += &format!(", r'{}': True", &arg.name); + // } + // } + // } + // } + // } + // commands.push(name.to_string()); + } + Ok(path_pieces.join(".")) +} + +// pub fn get_cmd_def<'a>(mut matches: &clap::ArgMatches, mut app: &'a App<'a>) -> &'a App<'a> { +// while matches.subcommand_name().is_some() { +// let n = matches.subcommand_name().unwrap(); +// matches = matches.subcommand_matches(&n).unwrap(); +// app = app.find_subcommand(n).unwrap(); +// } +// app + +// // for (n, pl) in self.plugins.iter() { +// // if let Some(cmd) = pl.find_command(matches) { +// // return Some(cmd); +// // } +// // } +// // None +// } diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs new file mode 100644 index 00000000..e174e7fd --- /dev/null +++ b/rust/origen/cli/src/framework/plugins.rs @@ -0,0 +1,614 @@ +use origen::{Result, ORIGEN_CONFIG}; +use crate::{python, CommandHelp}; +use std::path::PathBuf; +use indexmap::IndexMap; +// use crate::app_commands::{CommandsToml}; +// use crate::app_commands::Command as AppCommand; +use std::fs; +use clap::ArgMatches; +use std::collections::HashMap; +use crate::commands::_prelude::*; +use std::process::exit; +use super::{ClapCommand, Command, CommandsToml, CommandTOML, Extensions, Arg, build_path}; +use crate::commands::launch_as; + +pub const PL_MGR_CMD_NAME: &'static str = "plugins"; +pub const PL_CMD_NAME: &'static str = "plugin"; +pub const PL_MGR_LIST_CMD: [&'static str; 2] = [PL_MGR_CMD_NAME, "list"]; + + +pub fn run_pl_mgr(cmd: RunInput, plugins: Option<&Plugins>) -> Result<()> { + if let Some(subcmd) = cmd.subcommand() { + let sub = subcmd.1; + match subcmd.0 { + "list" => { + if let Some(pls) = plugins { + displayln!("Available plugins:\n"); + for (name, pl) in pls.plugins.iter() { + displayln!("{}", name); + } + } else { + displayln!("No plugins available!"); + } + }, + _ => unreachable!() + } + } + Ok(()) +} + +pub fn run_pl(cmd: RunInput, mut app: &clap::App, exts: &crate::Extensions, plugins: Option<&Plugins>) -> Result<()> { + if let Some(subcmd) = cmd.subcommand() { + let sub = subcmd.1; + plugins.unwrap().plugins.get(subcmd.0).unwrap().dispatch(sub, app, exts, plugins) + } else { + Ok(()) + } +} + +pub (crate) fn add_helps(helps: &mut CmdHelps, plugins: Option<&Plugins>) { + helps.add_core_cmd(PL_MGR_CMD_NAME).set_help_msg("Interface with the Origen plugin manager"); + helps.add_core_sub_cmd(&PL_MGR_LIST_CMD).set_help_msg("List the available plugins"); + + helps.add_core_cmd(PL_CMD_NAME).set_help_msg("Access added commands from individual plugins"); + if let Some(pls) = plugins { + for (pl_name, pl) in pls.plugins.iter() { + for (n, c) in pl.commands.iter() { + helps.add_pl_cmd(pl_name, n).set_help_msg(&c.help); + } + } + } +} + +// cmd_helps: &'a mut crate::CmdHelps, +pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, plugins: Option<&'a Plugins>, exts: &'a Extensions) -> Result> { + // let help = "Interface with the Origen plugin manager"; + // helps.add_core_cmd(PL_MGR_CMD_NAME.to_string()).set_help_msg("Interface with the Origen plugin manager"); + // origen_commands.push(CommandHelp { + // name: PL_MGR_CMD_NAME.to_string(), + // help: help.to_string(), + // shortcut: None, + // }); + let updated = app.subcommand( + helps.apply_core_cmd_helps( + PL_MGR_CMD_NAME, + ClapCommand::new(PL_MGR_CMD_NAME) + // .about(help) + .visible_alias("pl_mgr") + .visible_alias("pls") + .arg_required_else_help(true) + .subcommand( + helps.core_subc(&PL_MGR_LIST_CMD) + .visible_alias("ls") + // ClapCommand::new("list") + // .about("List the available plugins") + // .visible_alias("ls") + // .arg( + // Arg::new("all") + // .help("Set the password for all datasets") + // .takes_value(false) + // .required(false) + // .long("all") + // .short('a'), + // ) + ) + ) + ); + + // let help = "Access added commands from individual plugins"; + // origen_commands.push(CommandHelp { + // name: PL_CMD_NAME.to_string(), + // help: help.to_string(), + // shortcut: None, + // }); + let mut pl_sub = ClapCommand::new(PL_CMD_NAME) + // .about(help) + .visible_alias("pl"); + pl_sub = helps.apply_core_cmd_helps(PL_CMD_NAME, pl_sub); + + if let Some(pls) = plugins { + for (pl_name, pl) in pls.plugins.iter() { + let mut pl_sub_sub = ClapCommand::new(pl_name.as_str()).setting(AppSettings::ArgRequiredElseHelp); + // if let Some(pl_cmds) = pl.commands { + // for (n, c) in pl_cmds { + // for (n, c) in pl.commands.iter() { + for n in pl.top_commands.iter() { + // pl_sub_sub = pl_sub_sub.subcommand(crate::build_pl_commands(&c, &pls)); + pl_sub_sub = pl_sub_sub.subcommand( + super::build_commands( + // c, // &cmds.commands.get(top_cmd_name).unwrap(), + &pl.commands.get(n).unwrap(), + // cmd_helps, + &|cmd, app| { + // println!("cmd... {}", cmd); + // println!("pl name.. {}", pl_name); + exts.apply_to_pl_cmd(&pl_name, cmd, app) + }, + &|cmd| { + // let split = cmd.split_once('.').unwrap(); + // println!("S: {:?}", split); + pls.plugins.get(pl_name).unwrap().commands.get(cmd).unwrap() + // pls.plugins.get(split.0).unwrap().commands.get(split.1).unwrap() + }, + &|cmd, app| { + // let split = cmd.split_once('.').unwrap(); + helps.apply_helps(&CmdSrc::Plugin(pl_name.to_string(), cmd.to_string()), app) + } + ) + ); +// for c in subcommands { +// // let subcmd = build_command(&c); +// let split = c.split_once('.').unwrap(); +// let subcmd = build_pl_commands(plugins.plugins.get(split.0).unwrap().commands.get(split.1).unwrap(), plugins); +// cmd = cmd.subcommand(subcmd); +// } + + } + pl_sub = pl_sub.subcommand(pl_sub_sub); + // } + } + } + let updated = updated.subcommand(pl_sub); + // let updated = app.subcommand( + // SubCommand::with_name(PL_CMD_NAME) + // .about(help) + // // .setting(AppSettings::ArgRequiredElseHelp) + // .visible_alias("pl") + // // .arg( + // // Arg::new("code") + // // .help("Set the password for all datasets") + // // .takes_value(true) + // // .value_name("CODE") + // // .multiple(true) + // // .required(true) + // // ) + // ); + + Ok(updated) +} + +pub struct Plugins { + pub plugins: IndexMap + // pub commands: HashMap +} + +impl Plugins { + pub fn new(exts: &mut Extensions) -> Result> { + if ORIGEN_CONFIG.should_collect_plugins() { + let mut slf = Self { + plugins: IndexMap::new(), + }; + + python::run_with_callbacks( + "import _origen; _origen._display_plugin_roots()", + Some(&mut |line| { + if let Some((status, result)) = line.split_once('|') { + match status { + "success" => { + if let Some((name, path)) = result.split_once('|') { + //let pl_config = PluginConfig::from_path(path) + // pl_cmds.insert(name, PathBuf::from(path)); + match Plugin::new(name, PathBuf::from(path), exts) { + Ok(pl) => { + slf.plugins.insert(name.to_string(), pl); + }, + Err(e) => { + log_error!("{}", e); + log_error!("Unable to collect plugin {}", path); + } + } + } else { + log_error!("Malformed output when collecting plugin roots (post status): {}", result) + } + }, + _ => log_error!("Unknown status when collecting plugin roots: {}", status) + } + } else { + log_error!("Malformed output encountered when collecting plugin roots: {}", line); + } + // output_lines += &format!("{}\n", line); + // println!("{}", line); + }), + None, + )?; + Ok(Some(slf)) + } else { + Ok(None) + } + } + + pub fn find_command(&self, mut matches: &ArgMatches) -> Option<&Command> { + for (n, pl) in self.plugins.iter() { + if let Some(cmd) = pl.find_command(matches) { + return Some(cmd); + } + } + None + } + + // pub fn dispatch(&self, mut matches: &ArgMatches) { + // } +} + +pub struct Plugin { + pub name: String, + pub root: PathBuf, + // TODO see about making this indices instead of duplicating string + pub top_commands: Vec, + // pub command_helps: Vec, + // pub commands: Vec, + pub commands: IndexMap::, + // pub extensions: Vec, +} + +impl Plugin { + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) { + // let mut sub_commands: Option>; + // { + // build_upcase_names(current_cmd); + // } + if let Some(ref mut sub_cmds) = current_cmd.subcommand { + // sub_commands = Some(vec![]); + for mut sub in sub_cmds { + // sub_commands.as_mut().push(sub.name.to_string()); + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub); + } + } else { + // sub_commands = None; + } + // println!("PATH: {}", current_path); + slf.commands.insert(current_path.clone(), Command::from_toml_cmd(current_cmd, ¤t_path)); + } + + pub fn new(name: &str, path: PathBuf, exts: &mut Extensions) -> Result { + // fn add_command(current_cmd, current_path, plugins) { + // plugins.insert() + // } + + let mut slf = Self { + name: name.to_string(), + root: path, + top_commands: vec!(), + commands: IndexMap::new(), + // extensions: vec!(), + // command_helps: vec![], + // commands: vec![], + }; + + let commands_toml = slf.root.join("commands.toml"); + + if commands_toml.exists() { + let content = match fs::read_to_string(&commands_toml) { + Ok(x) => x, + Err(e) => { + bail!("{}", e); + } + }; + + let command_config: CommandsToml = match toml::from_str(&content) { + Ok(x) => x, + Err(e) => { + bail!("Malformed commands.toml: {}", e); + } + }; + + if let Some(mut commands) = command_config.command { + for mut cmd in commands { + slf.top_commands.push(cmd.name.to_owned()); + Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); + } + // for mut command in commands { + // slf.command_helps.push(CommandHelp { + // name: command.name.clone(), + // help: command.help.clone(), + // shortcut: command.alias.clone(), + // }); + // build_upcase_names(&mut command); + // slf.commands.push(command); + // } + } + + if let Some(mut extensions) = command_config.extension { + for ext in extensions { + match exts.add_from_pl_toml(&slf, ext) { + Ok(_) => {}, + Err(e) => log_error!("Failed to add extensions from plugin '{}': {}", slf.name, e) + } + // slf.extensions.push(Extension::from_extension_toml(ExtensionSource::Plugin(slf.name.to_string()), ext)?); + } + } + } + + Ok(slf) + } + + pub fn command_helps(&self) -> Vec { + let mut helps = vec!(); + for (_, cmd) in self.commands.iter() { + helps.push(CommandHelp { + name: cmd.name.clone(), + help: cmd.help.clone(), + shortcut: cmd.alias.clone(), + }); + } + helps + } + + // pub fn with_command(&self) -> Option> { + + // } + + pub fn get_mut_command(&mut self, path: &str) -> Option<&mut Command> { + todo!(); + // let retn_cmd = None; + // let split = path.split('.').collect::>(); + // if let Some(mut cmd) = self.commands.get_mut(split.pop().unwrap()) { + // while true { + // if let Some(s) = split.pop() { + // if let Some(c) = cmd.subcommand.as_ref().unwrap().iter_mut().find(|c| c.name == s) { + // cmd = c; + // retn_cmd = Some(c); + // } else { + // return None; + // } + // } else { + // break; + // } + // } + // } + // retn_cmd + } + + pub fn find_command(&self, mut matches: &ArgMatches) -> Option<&Command> { + todo!(); + // let mut commands: Vec<&Command> = vec![]; + // let mut given_args: HashMap> = HashMap::new(); + // let mut name; + // let mut command: Option<&Command> = None; + + // while matches.subcommand_name().is_some() { + // // Don't need to worry about not finding here, clap has already pre-screened the given values + // name = matches.subcommand_name().unwrap(); + + // if let Some(cmd) = command { + // command = cmd + // .subcommand + // .as_ref() + // .unwrap() + // .iter() + // .find(|c| c.name == name); + // } else { + // command = self.commands.iter().find(|c| c.name == name); + // } + + // // matches = matches.subcommand_matches(&name).unwrap(); + + // if let Some(cmd) = command { + // // if let Some(args) = &cmd.arg { + // // for arg in args { + // // if arg.multiple.is_some() && arg.multiple.unwrap() { + // // if let Some(v) = matches.values_of(&arg.name) { + // // let vals: Vec = v.map(|v| v.to_string()).collect(); + // // given_args.insert(arg.name.to_string(), vals); + // // } + // // } else { + // // if let Some(v) = matches.value_of(&arg.name) { + // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); + // // } + // // } + // // } + // // } + // commands.push(cmd); + // } + + // // commands.push(name.to_string()); + // } + // commands.last().map( |c| *c) + // // if commands.is_empty() { + // // None + // // } else { + // // Some(commands.last()) + // // } + } + + pub fn dispatch(&self, cmd: &clap::ArgMatches, mut app: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>) -> Result<()> { + if let Some(subc) = cmd.subcommand() { + let path = build_path(&cmd)?; + + let mut matches = cmd; + let mut path_pieces: Vec = vec!(); + let mut overrides = IndexMap::new(); + app = app.find_subcommand("plugin").unwrap().find_subcommand(&self.name).unwrap(); + while matches.subcommand_name().is_some() { + let n = matches.subcommand_name().unwrap(); + matches = matches.subcommand_matches(&n).unwrap(); + app = app.find_subcommand(n).unwrap(); + // path_pieces.push(format!("r'{}'", n)); + path_pieces.push(n.to_string()); + } + // println!("dis: {} {}", subc.0, &path); + + launch_as("_plugin_dispatch_", Some(&path_pieces), matches, app, exts.get_pl_ext(&self.name, &path), plugins, Some( + { + overrides.insert("dispatch_root".to_string(), Some(format!("r'{}/commands'", &self.root.display()))); + overrides.insert("dispatch_src".to_string(), Some(format!("r'{}'", &self.name))); + // overrides.insert("dispatch_cmds".to_string(), Some(format!("[r'{}', {}]", &self.name, path_pieces.join(", ")))); + overrides + } + ), None); + + Ok(()) + } else { + // FOR_PR get message from aux/app + todo!() + } + + // let mut commands: Vec = vec![]; + // let mut given_args: HashMap> = HashMap::new(); + // let mut name; + // let mut path: String = "".to_string(); + // let mut current_cmd: Option<&Command> = None; + // let mut args_str: String = "".to_string(); + + // while matches.subcommand_name().is_some() { + // name = matches.subcommand_name().unwrap(); + // if path.is_empty() { + // path = name.to_string(); + // } else { + // path = format!("{}.{}", path, name); + // } + + // // if let Some(cmd) = current_cmd { + // // current_cmd = + // // } + + // matches = matches.subcommand_matches(&name).unwrap(); + // if let Some(cmd) = self.commands.get(&path) { + // // println!("Found command at {}", path); + // // if let Some(args) = &cmd.arg { + // // for arg in args { + // // if arg.multiple.is_some() && arg.multiple.unwrap() { + // // if let Some(v) = matches.values_of(&arg.name) { + // // let vals: Vec = v.map(|v| v.to_string()).collect(); + // // given_args.insert(arg.name.to_string(), vals); + // // } + // // } else { + // // if let Some(v) = matches.value_of(&arg.name) { + // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); + // // } + // // } + // // } + // // } + // if let Some(args) = &cmd.args { + // for arg in args { + // if arg.multiple.is_some() && arg.multiple.unwrap() { + // if let Some(v) = matches.values_of(&arg.name) { + // // let vals: Vec = v.map(|v| v.to_string()).collect(); + // // given_args.insert(arg.name.to_string(), vals); + // args_str += &format!(", r'{}': [{}]", &arg.name, v.map(|v| format!("r'{}'", v)).collect::>().join(",")); + // } + // } else { + // if let Some(v) = matches.value_of(&arg.name) { + // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); + // args_str += &format!(", r'{}': r'{}'", &arg.name, v); + // } else if matches.contains_id(&arg.name) { + // args_str += &format!(", r'{}': True", &arg.name); + // } + // } + // } + // } + // } + + // commands.push(name.to_string()); + // } + // // println!("Final command {:?}", commands); + + // // Build the dispatch command + // let mut cmd = "from origen.boot import run_cmd; run_cmd('_plugin_dispatch_', ".to_string(); + + // cmd += &format!( + // "commands=[r'{}', {}]", + // &self.name, + // &commands + // .iter() + // .map(|s| format!("r'{}'", s)) + // .collect::>() + // .join(",") + // ); + + // cmd += ", args={"; + // if !args_str.is_empty() { + // cmd += &args_str[2..args_str.len()]; + // } + // // let mut first = true; + // // for (k, v) in given_args { + // // if !first { + // // cmd += ", "; + // // } + // // cmd += &format!( + // // "r'{}': [{}]", + // // &k, + // // v.iter() + // // .map(|s| format!("r'{}'", s)) + // // .collect::>() + // // .join(",") + // // ); + // // first = false; + // // } + // cmd += "});"; + + // log_debug!("Launching Python: '{}'", &cmd); + // println!("Launching Python: '{}'", &cmd); + + // match python::run(&cmd) { + // Err(e) => { + // log_error!("{}", &e); + // exit(1); + // } + // Ok(exit_status) => { + // if exit_status.success() { + // exit(0); + // } else { + // exit(exit_status.code().unwrap_or(1)); + // } + // } + // } + + // // Unnecessary with exists + // Ok(()) + } +} + +// #[derive(Debug, Deserialize)] +// pub struct PluginConfigTOML { +// pub commands: Option>, +// } + +// pub(crate) fn collect_plugin_commands(pl_cmds: &mut IndexMap>) -> Result<()> { +// if ORIGEN_CONFIG.should_collect_plugins() { +// python::run_with_callbacks( +// "import _origen; _origen._plugin_roots()", +// Some(&mut |line| { +// if let Some((status, result)) = line.split_once('|') { +// match status { +// "success" => { +// if let Some((name, path)) = result.split_once('|') { +// //let pl_config = PluginConfig::from_path(path) +// // pl_cmds.insert(name, PathBuf::from(path)); +// match Plugin::new(name, PathBuf::from(path)) { +// Ok(pl) => self.plugins.insert(name.to_string(), pl), +// Err(e) => { +// log_error!("{}", e); +// log_error!("Unable to collect plugin {}", path) +// } +// } +// } else { +// log_error!("Malformed out when collecting plugin roots (post status): {}", result) +// } +// }, +// _ => log_error!("Unknown status when collecting plugin roots: {}", status) +// } +// } else { +// log_error!("Malformed output encountered when collecting plugin roots: {}", line); +// } +// // output_lines += &format!("{}\n", line); +// // println!("{}", line); +// }), +// None, +// )?; +// } +// Ok(()) +// } + +// if let Some(pl_config) = origen::CONFIG.plugins.as_ref() { +// python::run_with_callbacks("import _origen; _origen._plugin_roots()", +// Some(&mut |line| { +// // output_lines += &format!("{}\n", line); +// println!("{}", line); +// }), +// None, +// )?; +// if pl_config.discover_plugins() { +// python::get_plugin_roots()?; +// } +// } diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index 3fc51adc..d41afa94 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -17,6 +17,16 @@ const PYTHONS: &[&str] = &[ ]; pub const MIN_PYTHON_VERSION: &str = "3.6.0"; +#[macro_export] +macro_rules! vks_to_cmd { + () => { + format!( + "verbosity_keywords=[{}]", + origen::LOGGER.data().keywords.iter().map(|k| format!("r'{}'", k)).collect::>().join(", ") + ) + } +} + lazy_static! { pub static ref PYTHON_CONFIG: Config = Config::default(); } @@ -160,10 +170,7 @@ pub fn run(code: &str) -> Result { cmd.arg(&code); cmd.arg("-"); cmd.arg(&format!("verbosity={}", origen::LOGGER.verbosity())); - cmd.arg(&format!( - "verbosity_keywords={}", - origen::LOGGER.keywords_to_cmd() - )); + cmd.arg(&vks_to_cmd!()); // current_exe returns the Python process once it gets underway, so pass in the CLI // location for Origen to use (used to resolve Origen config files) if let Ok(p) = std::env::current_exe() { diff --git a/rust/origen/src/core/application/config.rs b/rust/origen/src/core/application/config.rs index 05c33358..f8c5e39e 100644 --- a/rust/origen/src/core/application/config.rs +++ b/rust/origen/src/core/application/config.rs @@ -5,6 +5,8 @@ use origen_metal::config; use origen_metal::config::{Environment, File}; use std::collections::HashMap; use std::path::{Path, PathBuf}; +use crate::om::glob::glob; +use crate::Result; const PUBLISHER_OPTIONS: &[&str] = &["system", "package_app", "upload_app"]; @@ -34,6 +36,7 @@ pub struct Config { pub linter: Option>, pub release_scribe: Option>, pub app_session_root: Option, + pub commands: Option>, } impl Config { @@ -53,6 +56,7 @@ impl Config { self.linter = latest.linter; self.release_scribe = latest.release_scribe; self.app_session_root = latest.app_session_root; + self.commands = latest.commands; } pub fn check_defaults(root: &Path) { @@ -95,6 +99,8 @@ impl Config { .set_default("release_scribe", None::>) .unwrap() .set_default("app_session_root", None::) + .unwrap() + .set_default("commands", None::>) .unwrap(); let file = root.join("config").join("application.toml"); @@ -108,7 +114,7 @@ impl Config { s = s.add_source(File::with_name(&format!("{}", file.display()))); } } - s = s.add_source(Environment::with_prefix("origen_app")); + s = s.add_source(Environment::with_prefix("origen_app").list_separator(",").with_list_parse_key("commands").try_parsing(true)); let cb = exit_on_bad_config!(s.build()); let mut c: Self = exit_on_bad_config!(cb.try_deserialize()); @@ -144,4 +150,39 @@ impl Config { } unknowns } + + pub fn cmd_paths(&self) -> Vec { + let mut retn = vec!(); + if let Some(cmds) = self.commands.as_ref() { + // Load in only the commands explicitly given + for cmds_toml in cmds { + let ct = self.root.as_ref().unwrap().join("config").join(cmds_toml); + if ct.exists() { + retn.push(ct.to_owned()); + } else { + log_error!("Can not locate app commands file '{}'", ct.display()) + } + } + } else { + // Load in any commands from: + // 1) app_root/commands.toml + // 2) app_root/commands/*/**.toml + let commands_toml = self.root.as_ref().unwrap().join("config").join("commands.toml"); + // println!("commands toml: {}", commands_toml.display()); + if commands_toml.exists() { + retn.push(commands_toml); + } + let mut commands_dir = self.root.as_ref().unwrap().join("config/commands"); + if commands_dir.exists() { + commands_dir = commands_dir.join("**/*.toml"); + for entry in glob(commands_dir.to_str().unwrap()).unwrap() { + match entry { + Ok(e) => retn.push(e), + Err(e) => log_error!("Error processing commands toml: {}", e) + } + } + } + } + retn + } } diff --git a/rust/origen/src/core/config.rs b/rust/origen/src/core/config.rs index 9b88130e..47a8c983 100644 --- a/rust/origen/src/core/config.rs +++ b/rust/origen/src/core/config.rs @@ -21,10 +21,6 @@ use std::process::exit; use crate::om; use om::framework::users::DatasetConfig as OMDatasetConfig; -lazy_static! { - pub static ref CONFIG: Config = Config::default(); -} - #[derive(Debug, Deserialize)] pub struct LDAPConfig { pub server: String, @@ -91,6 +87,7 @@ impl std::convert::From for config::ValueKind { #[derive(Serialize, Deserialize, Debug, Clone, Default)] pub struct InitialUserConfig { pub initialize: Option, + pub init_home_dir: Option, } impl std::convert::From for config::ValueKind { @@ -117,6 +114,65 @@ impl std::convert::From for config::ValueKind { // pub session__user_root: Option, // } +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct PluginConfig { + pub name: String, +} + +impl std::convert::From for config::ValueKind { + fn from(_value: PluginConfig) -> Self { + Self::Nil + } +} + +#[derive(Serialize, Deserialize, Debug, Clone, Default)] +pub struct PluginsConfig { + pub collect: Option, + pub load: Option>, +} + +impl PluginsConfig { + pub fn collect(&self) -> bool { + self.collect.unwrap_or(true) + } + + pub fn should_collect_any(&self) -> bool { + self.collect() || self.load.is_some() + } +} + +impl std::convert::From for config::ValueKind { + fn from(_value: PluginsConfig) -> Self { + Self::Nil + } +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct AuxillaryCommandsTOML { + pub name: Option, + pub path: String, +} + +impl AuxillaryCommandsTOML { + pub fn set_override(&self, mut config: config::ConfigBuilder, i: usize) -> config::ConfigBuilder { + config = config.set_override(format!("auxillary_commands[{}].path", i), self.path.to_string()).unwrap(); + config = config.set_override(format!("auxillary_commands[{}].name", i), self.name.to_owned()).unwrap(); + config + } + + pub fn path(&self) -> PathBuf { + let mut path = PathBuf::from(&self.path); + path.set_extension("toml"); + path + } +} + +impl std::convert::From for config::ValueKind { + fn from(_value: AuxillaryCommandsTOML) -> Self { + Self::Nil + } +} + #[macro_export] macro_rules! exit_on_bad_config { ($result: expr) => { @@ -131,6 +187,12 @@ macro_rules! exit_on_bad_config { } } +#[derive(Default)] +pub struct ConfigMetadata { + pub files: Vec, + pub aux_cmd_sources: Vec, +} + #[allow(non_snake_case)] #[derive(Debug, Deserialize)] // If you add an attribute to this you must also update: @@ -144,6 +206,9 @@ pub struct Config { pub pkg_server_pull: String, pub some_val: u32, + // Plugins + pub plugins: Option, + // Mailer pub maillists: Option, pub mailer: Option, @@ -160,7 +225,7 @@ pub struct Config { pub user__data_lookup_hierarchy: Option>, pub user__datasets: Option>, pub user__password_auth_attempts: u8, - pub user__password_cache_option: String, + pub user__password_cache_option: Option, pub user__current_user_lookup_function: Option, // pub user__password_reasons: HashMap, pub user__dataset_motives: HashMap, @@ -173,6 +238,32 @@ pub struct Config { pub initial_user: Option, // User session root path pub session__user_root: Option, + + pub additional_config_dirs: Option>, + pub additional_configs: Option>, + pub auxillary_commands: Option>, +} + +impl Config { + fn append_configs(mut starting_path: PathBuf, file_list: &mut Vec) { + let f = starting_path.join("origen.toml"); + log_trace!("Looking for Origen config file at '{}'", f.display()); + if f.exists() { + file_list.push(f); + } + + while starting_path.pop() { + let f = starting_path.join("origen.toml"); + log_trace!("Looking for Origen config file at '{}'", f.display()); + if f.exists() { + file_list.push(f); + } + } + } + + pub fn should_collect_plugins(&self) -> bool { + self.plugins.as_ref().map_or(true, |pl_config| pl_config.should_collect_any()) + } } impl Default for Config { @@ -187,6 +278,7 @@ impl Default for Config { s = s.set_default("pkg_server_push", "").unwrap(); s = s.set_default("pkg_server_pull", "").unwrap(); s = s.set_default("some_val", 3).unwrap(); + s = s.set_default("plugins", None::).unwrap(); s = s.set_default("maillists", None::).unwrap(); s = s.set_default("mailer", None::).unwrap(); s = s @@ -200,7 +292,7 @@ impl Default for Config { .unwrap(); s = s.set_default("user__password_auth_attempts", 3).unwrap(); s = s - .set_default("user__password_cache_option", "keyring") + .set_default("user__password_cache_option", None::) .unwrap(); s = s .set_default("user__datasets", { @@ -247,6 +339,7 @@ impl Default for Config { // Session setup s = s.set_default("session__user_root", None::).unwrap(); + s = s.set_default("auxillary_commands", None::>).unwrap(); // Find all the origen.toml files let mut files: Vec = Vec::new(); @@ -309,26 +402,44 @@ impl Default for Config { files.push(f); } } + } else { + match std::env::current_dir() { + Ok(path) => { + let f = path.join("origen.toml"); + log_trace!("Looking for Origen config file in current working directory at '{}'", f.display()); + if f.exists() { + files.push(f); + } + } + Err(e) => { + log_error!("Failed to lookup current working directory: {}", e.to_string()) + } + } } - // TODO: Should this be the Python installation dir? - if let Some(mut path) = STATUS.cli_location() { - let f = path.join("origen.toml"); - log_trace!("Looking for Origen config file at '{}'", f.display()); - if f.exists() { - files.push(f); - } - while path.pop() { - let f = path.join("origen.toml"); - log_trace!("Looking for Origen config file at '{}'", f.display()); - if f.exists() { - files.push(f); - } - } + // Check for configs in the Python install directory and its parents + if let Some(path) = STATUS.fe_exe_loc().as_ref() { + log_trace!("Looking for Origen config files from frontend install directory: '{}'", path.display()); + Self::append_configs(path.to_owned(), &mut files); + } + + // Check for configs in the Origen package directory and its parents + // Depending on the virtual env setups, this could be different + if let Some(path) = STATUS.fe_pkg_loc().as_ref() { + log_trace!("Looking for Origen config files from frontend package directory: '{}'", path.display()); + Self::append_configs(path.to_owned(), &mut files); + } + + // Check for configs in the CLI directory and its parents + if let Some(mut path) = STATUS.cli_location() { + log_trace!("Looking for Origen config files from the CLI directory: '{}'", path.display()); + Self::append_configs(path, &mut files); } } + let mut all_cmds: Vec = vec!(); + let mut aux_cmd_sources: Vec = vec!(); // Now add in the files, with the last one found taking lowest priority for f in files.iter().rev() { log_trace!("Loading Origen config file from '{}'", f.display()); @@ -390,11 +501,40 @@ impl Default for Config { } }, } + + match built.get::>>("auxillary_commands") { + Ok(r) => { + if let Some(cmds) = r { + for (i, cmd) in cmds.iter().enumerate() { + let mut cmd_clone = cmd.clone(); + cmd_clone.path = om::_utility::file_utils::to_abs_path(&cmd.path, &f.parent().unwrap().to_path_buf()).display().to_string(); + aux_cmd_sources.push(f.to_path_buf()); + all_cmds.push(cmd_clone); + } + } + } + Err(e) => match e { + config::ConfigError::NotFound(_) => {} + _ => { + log_error!("Malformed config file: {}", f.display()); + log_error!("{}", e); + exit(1); + } + }, + } } // Add in settings from the environment (with a prefix of ORIGEN) s = s.add_source(Environment::with_prefix("origen")); - + crate::set_origen_config_metadata(ConfigMetadata { + files: files, + aux_cmd_sources: aux_cmd_sources, + }); + if !all_cmds.is_empty() { + for (i, cmd) in all_cmds.iter().enumerate() { + s = cmd.set_override(s, i); + } + } exit_on_bad_config!(exit_on_bad_config!(s.build()).try_deserialize()) } } diff --git a/rust/origen/src/core/status.rs b/rust/origen/src/core/status.rs index 90627131..7ac7497e 100644 --- a/rust/origen/src/core/status.rs +++ b/rust/origen/src/core/status.rs @@ -11,7 +11,8 @@ use std::env; use std::path::Path; use std::path::PathBuf; use std::str::FromStr; -use std::sync::RwLock; +use std::sync::{RwLock, RwLockReadGuard}; +use crate::TypedValueMap; // Trait for extending std::path::PathBuf use path_slash::PathBufExt; @@ -26,6 +27,7 @@ pub enum Operation { Compile, Interactive, Web, + Credentials, App, AppCommand, } @@ -45,6 +47,7 @@ impl FromStr for Operation { "compile" => Ok(Operation::Compile), "interactive" => Ok(Operation::Interactive), "web" => Ok(Operation::Web), + "credentials" => Ok(Operation::Credentials), "app" => Ok(Operation::App), "appcommand" => Ok(Operation::AppCommand), _ => Err(format!("Unknown Operation: '{}'", &s)), @@ -52,6 +55,13 @@ impl FromStr for Operation { } } +#[derive(Debug)] +pub struct CurrentCommand { + pub top_cmd: String, + pub subcmds: Vec, + pub args: TypedValueMap, +} + /// Exposes some status information about the runtime environment, e.g. whether an /// application workspace is present // @@ -92,6 +102,8 @@ pub struct Status { reference_dir: RwLock>, cli_location: RwLock>, cli_version: RwLock>, + fe_pkg_loc: RwLock>, + fe_exe_loc: RwLock>, pub origen_core_support_version: Version, pub origen_metal_backend_version: Version, other_build_info: RwLock>, @@ -101,6 +113,7 @@ pub struct Status { unique_id: RwLock, debug_enabled: RwLock, _operation: RwLock, + command: RwLock>, } impl Default for Status { @@ -167,6 +180,8 @@ impl Default for Status { reference_dir: RwLock::new(None), cli_location: RwLock::new(None), cli_version: RwLock::new(None), + fe_pkg_loc: RwLock::new(None), + fe_exe_loc: RwLock::new(None), origen_core_support_version: Version::new_semver({ let mut v: &str = ""; for d in built_info::DEPENDENCIES.iter() { @@ -191,6 +206,7 @@ impl Default for Status { unique_id: RwLock::new(0), debug_enabled: RwLock::new(false), _operation: RwLock::new(Operation::None), + command: RwLock::new(None), }; log_trace!("Status built successfully"); s @@ -326,6 +342,24 @@ impl Status { *self.debug_enabled.read().unwrap() } + pub fn set_command(&self, top_cmd: String, subcommands: Vec, args: TypedValueMap) { + let mut cmd = self.command.write().unwrap(); + *cmd = Some(CurrentCommand { + top_cmd: top_cmd, + subcmds: subcommands, + args: args + }); + } + + pub fn clear_command(&self) { + let mut cmd = self.command.write().unwrap(); + *cmd = None; + } + + pub fn command(&self) -> RwLockReadGuard> { + self.command.read().unwrap() + } + pub fn set_operation(&self, val: Operation) { let mut operation = self._operation.write().unwrap(); *operation = val; @@ -357,6 +391,24 @@ impl Status { self.cli_version.read().unwrap().to_owned() } + pub fn set_fe_pkg_loc(&self, loc: Option) { + let mut fe_pkg_loc = self.fe_pkg_loc.write().unwrap(); + *fe_pkg_loc = loc; + } + + pub fn fe_pkg_loc(&self) -> RwLockReadGuard> { + self.fe_pkg_loc.read().unwrap() + } + + pub fn set_fe_exe_loc(&self, loc: Option) { + let mut fe_exe_loc = self.fe_exe_loc.write().unwrap(); + *fe_exe_loc = loc; + } + + pub fn fe_exe_loc(&self) -> RwLockReadGuard> { + self.fe_exe_loc.read().unwrap() + } + pub fn update_other_build_info(&self, key: &str, item: &str) -> OrigenResult<()> { self.other_build_info .write() @@ -476,10 +528,6 @@ impl Status { f(dir.as_ref()) } } - - // pub fn current_user(&self) -> &User { - // &self._current_user.read().unwrap() - // } } pub fn search_for_from_pwd(paths: Vec<&str>, searching_for_app: bool) -> (bool, PathBuf) { @@ -549,3 +597,15 @@ fn clean_path(path: &Path) -> PathBuf { } clean_path } + +pub fn app_present() -> bool { + crate::STATUS.is_app_present +} + +pub fn in_app_invocation() -> bool { + app_present() +} + +pub fn in_global_invocation() -> bool { + !app_present() +} diff --git a/rust/origen/src/lib.rs b/rust/origen/src/lib.rs index 0238c462..118147fd 100644 --- a/rust/origen/src/lib.rs +++ b/rust/origen/src/lib.rs @@ -29,11 +29,13 @@ pub use origen_metal::Error; use self::core::application::Application; use self::core::config::Config as OrigenConfig; +use self::core::config::ConfigMetadata as OrigenConfigMetadata; pub use self::core::dut::Dut; use self::core::frontend::Handle; use self::core::model::registers::BitCollection; pub use self::core::producer::Producer; use self::core::status::Status; +pub use self::core::status::{app_present, in_app_invocation, in_global_invocation}; pub use self::core::tester::{Capture, Overlay, Tester}; pub use self::services::Services; pub use self::utility::sessions::{setup_sessions, with_app_session, with_app_session_group}; @@ -42,8 +44,9 @@ pub use om::prelude::frontend::*; pub use om::{TypedValue, LOGGER}; pub use origen_metal as om; use std::fmt; +use std::path::PathBuf; use std::sync::{Mutex, MutexGuard}; -use std::sync::RwLock; +use std::sync::{RwLock, RwLockReadGuard}; use generator::PAT; use origen_metal::ast::{Attrs, Node, AST}; @@ -73,6 +76,7 @@ lazy_static! { /// Provides configuration information derived from origen.toml files found in the Origen /// installation and application file system paths pub static ref ORIGEN_CONFIG: OrigenConfig = OrigenConfig::default(); + pub static ref ORIGEN_CONFIG_METADATA: RwLock = RwLock::new(OrigenConfigMetadata::default()); /// The current device model, containing all metadata about hierarchy, regs, pins, specs, /// timing, etc. and responsible for maintaining the current state of the DUT (regs, pins, /// etc.) @@ -155,6 +159,8 @@ pub fn initialize( verbosity_keywords: Vec, cli_location: Option, cli_version: Option, + fe_pkg_loc: Option, + fe_exe_loc: Option, ) { if let Some(v) = verbosity { let _ = LOGGER.set_verbosity(v); @@ -162,6 +168,8 @@ pub fn initialize( } STATUS.set_cli_location(cli_location); STATUS.set_cli_version(cli_version); + STATUS.set_fe_pkg_loc(fe_pkg_loc); + STATUS.set_fe_exe_loc(fe_exe_loc); log_debug!("Initialized Origen {}", STATUS.origen_version); } @@ -209,6 +217,15 @@ pub fn services() -> MutexGuard<'static, Services> { SERVICES.lock().unwrap() } +pub fn origen_config_metadata<'a>() -> RwLockReadGuard<'a, OrigenConfigMetadata> { + ORIGEN_CONFIG_METADATA.read().unwrap() +} + +pub (crate) fn set_origen_config_metadata(new: OrigenConfigMetadata) { + let mut m = ORIGEN_CONFIG_METADATA.write().unwrap(); + *m = new; +} + /// Sanitizes the given mode string and returns it, but will exit the process if it is invalid pub fn clean_mode(name: &str) -> String { let mut matches: Vec = Vec::new(); diff --git a/rust/origen_metal/src/error.rs b/rust/origen_metal/src/error.rs index 4d672e8b..eb31eb5d 100644 --- a/rust/origen_metal/src/error.rs +++ b/rust/origen_metal/src/error.rs @@ -115,6 +115,12 @@ impl std::convert::From for Error { } } +impl std::convert::From<&str> for Error { + fn from(err: &str) -> Self { + Error::new(err) + } +} + impl std::convert::From for Error { fn from(err: lettre::address::AddressError) -> Self { Error::new(&err.to_string()) diff --git a/rust/origen_metal/src/framework/logger.rs b/rust/origen_metal/src/framework/logger.rs index 0453a7de..5408c3f8 100644 --- a/rust/origen_metal/src/framework/logger.rs +++ b/rust/origen_metal/src/framework/logger.rs @@ -60,7 +60,7 @@ use std::cell::RefCell; use std::fs; use std::io::Write; use std::path::{Path, PathBuf}; -use std::sync::RwLock; +use std::sync::{RwLock, RwLockReadGuard}; // Thread specific files, a log request will write to the last log in this vector, if // none are present then it will fall back to the global/shared files in Logger.inner.files @@ -75,7 +75,7 @@ pub struct Logger { #[derive(Default)] pub struct Inner { level: u8, - keywords: Vec, + pub keywords: Vec, // The currently open log files, the last one is the one that will be written to // (unless there is an open thread-specific log file) files: Vec<(PathBuf, fs::File)>, @@ -88,6 +88,10 @@ pub struct Inner { } impl Logger { + pub fn data(&self) -> RwLockReadGuard { + self.inner.read().unwrap() + } + pub fn verbosity(&self) -> u8 { self.inner.read().unwrap().level } @@ -497,14 +501,8 @@ impl Logger { Ok(()) } - pub fn keywords_to_cmd(&self) -> String { - let keywords; - { - let inner = self.inner.read().unwrap(); - keywords = inner.keywords.join(","); - } - log_debug!("Converted Verbosity Keywords to: {}", keywords); - keywords + pub fn keywords(&self) -> Vec { + self.inner.read().unwrap().keywords.to_owned() } pub fn has_keyword(&self, keyword: &str) -> bool { diff --git a/rust/origen_metal/src/framework/users/password_cache_options.rs b/rust/origen_metal/src/framework/users/password_cache_options.rs index 8db694dc..a8a1f71c 100644 --- a/rust/origen_metal/src/framework/users/password_cache_options.rs +++ b/rust/origen_metal/src/framework/users/password_cache_options.rs @@ -5,6 +5,7 @@ use crate::_utility::{str_from_byte_array, bytes_from_str_of_bytes}; use crate::utils::encryption::{decrypt_with, encrypt_with}; #[cfg(feature = "password-cache")] use keyring::Keyring; +use std::fmt; pub const PASSWORD_KEY: &str = "user_password__"; @@ -12,7 +13,7 @@ fn to_session_password<'a>(dataset: &str) -> String { format!("{}{}", PASSWORD_KEY, dataset) } -#[derive(Debug)] +#[derive(Debug, Clone)] pub enum PasswordCacheOptions { Session, Keyring, @@ -139,3 +140,45 @@ impl PasswordCacheOptions { } } } + +impl fmt::Display for PasswordCacheOptions { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", match self { + Self::Session => "session", + Self::Keyring => "keyring", + Self::None => "none", + }) + } +} + +impl From<&PasswordCacheOptions> for Option { + fn from(value: &PasswordCacheOptions) -> Option { + match value { + PasswordCacheOptions::None => None, + _ => Some(value.to_string()) + } + } +} + +impl From for Option { + fn from(value: PasswordCacheOptions) -> Option { + PasswordCacheOptions::into(value) + } +} + +impl TryFrom> for PasswordCacheOptions { + type Error = crate::Error; + + fn try_from(value: Option<&str>) -> Result { + if let Some(v) = value { + Ok(match v.to_lowercase().as_str() { + "session" | "session_store" => PasswordCacheOptions::Session, + "keyring" => PasswordCacheOptions::Keyring, + "none" => PasswordCacheOptions::None, + _ => bail!("Invalid password cache option: '{}'", v) + }) + } else { + Ok(PasswordCacheOptions::None) + } + } +} diff --git a/rust/origen_metal/src/framework/users/user.rs b/rust/origen_metal/src/framework/users/user.rs index 63970103..94cd3514 100644 --- a/rust/origen_metal/src/framework/users/user.rs +++ b/rust/origen_metal/src/framework/users/user.rs @@ -10,6 +10,7 @@ use std::path::PathBuf; use std::sync::{Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard}; use crate::{log_error}; use crate::frontend::FeatureReturn; +use std::env; pub const DEFAULT_DATASET_KEY: &str = "__origen__default__"; pub const DEFAULT_USER_SESSION_PATH_OFFSET: &str = "./.o2/.session"; @@ -245,6 +246,101 @@ impl PopulateUserReturn { } } +pub fn try_default_home_dir(user: Option<&str>, dataset: Option<&str>) -> Result> { + let u_id: String; + let is_current; + match user { + Some(id) => { + if let Some(cid) = super::users::get_current_user_id()? { + is_current = cid == id; + } else { + is_current = false; + } + u_id = id.to_owned(); + }, + None => { + if let Some(id) = super::users::get_current_user_id()? { + u_id = id; + is_current = true; + } else { + bail!("Cannot attempt to lookup home directory when no current user has been set!") + } + } + } + + // TODO see about wrapping function calls like this (optional frontend functions) + let fe_res = crate::with_optional_frontend(|f| { + if let Some(fe) = f { + if let Some(result) = fe.lookup_home_dir(&u_id, dataset, is_current) { + return Ok(Some(result?)) + } + } + Ok(None) + })?; + + if let Some(r) = fe_res { + Ok(r) + } else { + let hd: PathBuf; + if cfg!(windows) { + match env::var("USERPROFILE") { + Ok(path) => hd = PathBuf::from(path), + Err(e) => { + match e { + env::VarError::NotPresent => bail!("Please set environment variable USERPROFILE to point to your home directory, then try again"), + _ => bail!(&e.to_string()) + } + } + } + } else { + match env::var("HOME") { + Ok(path) => hd = PathBuf::from(path), + Err(e) => { + match e { + env::VarError::NotPresent => bail!("Please set environment variable HOME to point to your home directory, then try again"), + _ => bail!(&e.to_string()) + } + } + } + } + + if !hd.ends_with(&u_id) { + bail!("Home directory '{}' is not appropriate for current user with id '{}'", hd.display(), &u_id) + } else { + Ok(Some(hd)) + } + // try_default_home_dir_lookup() // super::whoami() + } +} + +// pub fn try_default_home_dir_lookup() -> Result { +// let hd; +// if cfg!(windows) { +// match env::var("USERPROFILE") { +// Some(path) => hd = PathBuf::from(path), +// None => bail!("Please set environment variable USERPROFILE to point to your home directory, then try again") +// } +// } else { +// match env::var("HOME") { +// Some(path) => hd = PathBuf::from(path), +// None => bail!("Please set environment variable HOME to point to your home directory, then try again") +// } +// } + +// // Confirm that this directory is suitable for the current user +// super::users::with_current_user( |user| { // get_current_user_id +// if let Some(u) = user { +// if !hd.ends_with(u.id) { +// bail!("Home directory '{}' is not appropriate for current user with id '{}'", hd.display(), u.id) +// } +// } else { +// bail!("Cannot attempt to lookup home directory when no current user has been set!") +// } +// Ok(hd) +// }) +// } + + #[derive(Debug, Default)] struct PopulateStatus { populating: RwLock, @@ -703,11 +799,21 @@ impl User { } pub fn set_home_dir(&self, new_dir: Option) -> Result<()> { - let mut data = self.write_data(None).unwrap(); - data.home_dir = new_dir; + if new_dir.is_some() { + let mut data = self.write_data(None)?; + data.home_dir = new_dir; + } else { + self.for_datasets_in_hierarchy_mut( |d| { d.home_dir = None; Ok(()) })?; + } Ok(()) } + pub fn dot_origen_dir(&self) -> Result { + let mut dot = self.require_home_dir()?; + dot.push(".origen"); + Ok(dot) + } + pub fn _cache_password(&self, password: &str, dataset: &str) -> Result { self.password_cache_option .cache_password(self, password, dataset) @@ -728,11 +834,15 @@ impl User { None => format!("\nPlease enter your password ({}): ", dataset), }; } - let pass = rpassword::read_password_from_tty(Some(&msg)).unwrap(); + let pass = match rpassword::read_password_from_tty(Some(&msg)) { + Ok(pw) => pw, + Err(e) => bail!("Error encountered prompting for password: {}", e) + }; let attempt = self._try_password(&pass, Some(dataset))?; + if attempt.0 { self._cache_password(&pass, dataset)?; - let mut data = self.write_data(Some(dataset)).unwrap(); + let mut data = self.write_data(Some(dataset))?; data.password = Some(pass.clone()); return Ok(pass); } else { @@ -981,7 +1091,11 @@ impl User { let _ = crate::sessions(); } } - self.write_data(dataset)?.clear_cached_password(self) + if dataset.is_some() { + self.write_data(dataset)?.clear_cached_password(self) + } else { + self.for_datasets_in_hierarchy_mut(|d| d.clear_cached_password(self)) + } } pub fn should_auto_populate(&self) -> bool { @@ -1180,6 +1294,30 @@ impl User { } Ok(()) } + + pub fn for_datasets_in_hierarchy(&self, mut func: F) -> Result<()> + where + F: FnMut(&Data) -> Result, + { + for n in self.data_lookup_hierarchy.iter() { + self.with_dataset(&n, |d| { + func(d) + })?; + }; + Ok(()) + } + + pub fn for_datasets_in_hierarchy_mut(&self, mut func: F) -> Result<()> + where + F: FnMut(&mut Data) -> Result, + { + for n in self.data_lookup_hierarchy.iter() { + self.with_dataset_mut(&n, |d| { + func(d) + })?; + }; + Ok(()) + } } impl PartialEq for User { diff --git a/rust/origen_metal/src/framework/users/users.rs b/rust/origen_metal/src/framework/users/users.rs index 0022dbfe..1a5f17e0 100644 --- a/rust/origen_metal/src/framework/users/users.rs +++ b/rust/origen_metal/src/framework/users/users.rs @@ -1,5 +1,6 @@ use super::data::DatasetConfig; use super::user::{PopulateUserReturn, SessionConfig, User}; +use super::password_cache_options::PasswordCacheOptions; use crate::{Outcome, Result, USERS}; use indexmap::IndexMap; use std::sync::{RwLockReadGuard, RwLockWriteGuard}; @@ -271,6 +272,7 @@ pub struct Users { default_session_config: SessionConfig, default_auto_populate: Option, default_should_validate_passwords: Option, + default_password_cache_option: Option, default_roles: Vec, uid_cnt: usize, password_encryption_key__byte_str: String, @@ -433,7 +435,7 @@ impl Users { id, &self, // TODO support password cache option - None, + self.default_password_cache_option.clone(), self.uid_cnt, auto_populate.map_or_else(|| self.default_auto_populate.to_owned(), |ap| Some(ap)) )?); @@ -513,6 +515,7 @@ impl Users { self.default_session_config = SessionConfig::new(); self.default_auto_populate = None; self.default_should_validate_passwords = None; + self.default_password_cache_option = None; self.default_roles = vec!(); self.password_encryption_key__byte_str = encryption::default_encryption_key__byte_str().to_string(); @@ -697,6 +700,20 @@ impl Users { self.default_should_validate_passwords = set_to; } + pub fn default_password_cache_option(&self) -> &Option { + &self.default_password_cache_option + } + + // pub fn set_default_password_cache_option(&mut self, set_to: Option<&str>) -> Result<()> { + // self.default_password_cache_option = Some(set_to.try_into()?); + // Ok(()) + // } + + pub fn set_default_password_cache_option>(&mut self, set_to: P) -> Result<()> { + self.default_password_cache_option = Some(set_to.try_into()?); + Ok(()) + } + pub fn default_roles(&self) -> Result<&Vec> { Ok(&self.default_roles) } @@ -748,6 +765,7 @@ impl Default for Users { default_session_config: SessionConfig::new(), default_auto_populate: None, default_should_validate_passwords: None, + default_password_cache_option: None, default_roles: vec!(), uid_cnt: 0, password_encryption_key__byte_str: encryption::default_encryption_key__byte_str() diff --git a/rust/origen_metal/src/frontend/mod.rs b/rust/origen_metal/src/frontend/mod.rs index 5a521024..8e1feb1f 100644 --- a/rust/origen_metal/src/frontend/mod.rs +++ b/rust/origen_metal/src/frontend/mod.rs @@ -5,6 +5,7 @@ use crate::{Result, TypedValue}; use indexmap::IndexMap; use std::any::Any; use std::sync::RwLockReadGuard; +use std::path::PathBuf; pub use crate::utils::revision_control::frontend::RevisionControlFrontendAPI; pub use data_store::{DataStoreFeature, DataStoreFrontendAPI, FeatureReturn}; @@ -199,5 +200,9 @@ pub trait FrontendAPI { None } + fn lookup_home_dir(&self, user_id: &str, dataset: Option<&str>, current_user: bool) -> Option>> { + None + } + fn as_any(&self) -> &dyn Any; } diff --git a/rust/origen_metal/src/lib.rs b/rust/origen_metal/src/lib.rs index 918ed9be..d5cea02f 100644 --- a/rust/origen_metal/src/lib.rs +++ b/rust/origen_metal/src/lib.rs @@ -1,6 +1,8 @@ #[macro_use] pub extern crate lazy_static; pub extern crate config; +pub extern crate indexmap; +pub extern crate glob; #[macro_use] extern crate serde; #[macro_use] diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index 28b715e9..da5952d2 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -26,22 +26,26 @@ mod tester; mod tester_apis; #[macro_use] mod utility; +mod plugins; use crate::registers::bit_collection::BitCollection; use num_bigint::BigUint; use om::lazy_static::lazy_static; use origen::{Dut, Error, Operation, Result, Value, FLOW, ORIGEN_CONFIG, STATUS, TEST}; use origen_metal as om; +use pyapi_metal as py_om; use pyapi_metal::pypath; +use pyapi_metal::_helpers::typed_value; use pyo3::conversion::AsPyPointer; use pyo3::prelude::*; -use pyo3::types::{PyAny, PyBytes, PyDict}; +use pyo3::types::{PyAny, PyBytes, PyDict, PyList}; use pyo3::{wrap_pyfunction, wrap_pymodule}; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::sync::MutexGuard; use utility::location::Location; use paste::paste; +use std::collections::HashMap; use crate::dut::__PYO3_PYMODULE_DEF_DUT; use crate::tester::__PYO3_PYMODULE_DEF_TESTER; @@ -61,14 +65,18 @@ pub mod built_info { include!(concat!(env!("OUT_DIR"), "/built.rs")); } +pub const current_command_str: &str = "_current_command_"; + #[pymodule] /// This is the top-level _origen module which can be imported by Python -fn _origen(_py: Python, m: &PyModule) -> PyResult<()> { +fn _origen(py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(initialize))?; m.add_wrapped(wrap_pyfunction!(status))?; m.add_wrapped(wrap_pyfunction!(version))?; m.add_wrapped(wrap_pyfunction!(config))?; + m.add_wrapped(wrap_pyfunction!(config_metadata))?; m.add_wrapped(wrap_pyfunction!(app_config))?; + m.add_wrapped(wrap_pyfunction!(is_app_present))?; m.add_wrapped(wrap_pyfunction!(clean_mode))?; m.add_wrapped(wrap_pyfunction!(target_file))?; m.add_wrapped(wrap_pyfunction!(test))?; @@ -88,6 +96,12 @@ fn _origen(_py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(enable_debug))?; m.add_wrapped(wrap_pyfunction!(set_operation))?; m.add_wrapped(wrap_pyfunction!(boot_users))?; + m.add_wrapped(wrap_pyfunction!(_plugin_roots))?; + m.add_wrapped(wrap_pyfunction!(_display_plugin_roots))?; + m.add_wrapped(wrap_pyfunction!(_find_plugin_roots))?; + m.add_wrapped(wrap_pyfunction!(_collect_plugin_roots))?; + m.add_wrapped(wrap_pyfunction!(set_command))?; + m.add_wrapped(wrap_pyfunction!(clear_command))?; m.add_wrapped(wrap_pymodule!(dut))?; m.add_wrapped(wrap_pymodule!(tester))?; @@ -101,10 +115,12 @@ fn _origen(_py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pymodule!(prog_gen))?; file_handler::define(m)?; + plugins::define(py, m)?; // Compile the _origen_metal library along with this one // to allow re-use from that library m.add_wrapped(wrap_pymodule!(_origen_metal))?; + m.setattr(current_command_str, py.None()); Ok(()) } @@ -365,8 +381,10 @@ fn initialize( verbosity_keywords: Vec, cli_location: Option, cli_version: Option, + fe_pkg_loc: Option, + fe_exe_loc: Option, ) -> PyResult<()> { - origen::initialize(log_verbosity, verbosity_keywords, cli_location, cli_version); + origen::initialize(log_verbosity, verbosity_keywords, cli_location, cli_version, fe_pkg_loc, fe_exe_loc); origen::STATUS.update_other_build_info("pyapi_version", built_info::PKG_VERSION)?; origen::FRONTEND .write() @@ -423,6 +441,198 @@ fn enable_debug() -> PyResult<()> { Ok(()) } +macro_rules! _origen { + ($py: expr) => { + pyo3::types::PyModule::import($py, "_origen")? + }; +} + +// FOR_PR see about moving current command and extensions to standalone file +fn get_current_command(py: Python) -> PyResult> { + _origen!(py).getattr("_current_command_")?.extract::>() +} + +#[pyfunction] +fn set_command(py: Python, base_cmd: String, subcmds: Vec, args: Py, ext_args: Py, exts: &PyList) -> PyResult<()> { + let cmd = CurrentCommand { + base: base_cmd, + subcmds: subcmds, + args: args, + exts: Py::new(py, Extensions::new(py, exts, ext_args)?)?, + }; + _origen!(py).setattr("_current_command_", Py::new(py, cmd)?) +} + +#[pyfunction] +fn clear_command() -> PyResult<()> { + // Ok(STATUS.clear_command()) + // FOR_PR + // TEST_NEEDED also + todo!() +} + +#[pyclass] +pub struct Extension { + name: String, + args: Py, + source: String, + // m: , // FOR_PR store mod here? +} + +#[pymethods] +impl Extension { + #[getter] + pub fn args<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { + Ok(self.args.as_ref(py)) + } +} + +#[pyclass] +pub struct Extensions { + exts: IndexMap> +} + +#[pymethods] +impl Extensions { + fn get(&self, ext_name: &str) -> PyResult>> { + Ok(match self.exts.get(ext_name) { + Some(ext) => Some(ext), + None => None, + }) + } + + fn keys(&self) -> PyResult> { + Ok(self.exts.keys().map(|k| k.to_string()).collect()) + } + + fn values(&self) -> PyResult>> { + let mut retn: Vec<&Py> = vec![]; + for (_, ext) in self.exts.iter() { + retn.push(ext); + } + Ok(retn) + } + + fn items(&self) -> PyResult)>> { + let mut retn: Vec<(String, &Py)> = vec![]; + for (n, ext) in self.exts.iter() { + retn.push((n.to_string(), ext)); + } + Ok(retn) + } + + fn __getitem__(&self, py: Python, key: &str) -> PyResult<&Py> { + if let Some(s) = self.get(key)? { + Ok(s) + } else { + Err(pyo3::exceptions::PyKeyError::new_err(format!( + "No extension '{}' available for command '{}'", + key, + get_current_command(py)?.cmd()? + ))) + } + } + + fn __len__(&self) -> PyResult { + Ok(self.exts.len()) + } + + fn __iter__(slf: PyRefMut) -> PyResult { + Ok(ExtensionsIter { + keys: slf.keys().unwrap(), + i: 0, + }) + } +} + +#[pyclass] +pub struct ExtensionsIter { + pub keys: Vec, + pub i: usize, +} + +#[pymethods] +impl ExtensionsIter { + fn __iter__(slf: PyRefMut) -> PyResult> { + Ok(slf.into()) + } + + fn __next__(mut slf: PyRefMut) -> PyResult> { + if slf.i >= slf.keys.len() { + return Ok(None); + } + let name = slf.keys[slf.i].clone(); + slf.i += 1; + Ok(Some(name)) + } +} + +impl Extensions { + pub fn new<'py>(py: Python<'py>, exts: &PyList, ext_args: Py) -> PyResult { + let mut slf = Self { + exts: IndexMap::new(), + }; + + for ext in exts.iter() { + let ext_cfg = ext.extract::<&PyDict>()?; + let source = PyAny::get_item(ext_cfg, "source")?.extract::()?; + let ext_name = PyAny::get_item(ext_cfg, "name")?.extract::()?; + let ext_path = format!("{}.{}", source, ext_name); + + let src_ext_args = PyAny::get_item(ext_args.as_ref(py), &source)?.extract::<&PyDict>()?; + + let py_ext = Extension { + args: PyAny::get_item(src_ext_args, &ext_name)?.extract::>()?, + name: ext_name, + source: ext_path.clone(), + }; + slf.exts.insert(ext_path, Py::new(py, py_ext)?); + } + + Ok(slf) + } +} + +#[pyclass] +pub struct CurrentCommand { + base: String, + subcmds: Vec, + args: Py, + exts: Py, +} + +#[pymethods] +impl CurrentCommand { + #[getter] + pub fn cmd(&self) -> PyResult { + Ok(if self.subcmds.is_empty() { + self.base.to_string() + } else { + format!("{}.{}", self.base, self.subcmds.join(".")) + }) + } + + #[getter] + pub fn base_cmd(&self) -> PyResult<&str> { + Ok(&self.base) + } + + #[getter] + pub fn subcmds(&self) -> PyResult> { + Ok(self.subcmds.clone()) + } + + #[getter] + pub fn exts<'py>(&'py self, py: Python<'py>) -> PyResult<&Py> { + Ok(&self.exts) + } + + #[getter] + pub fn args<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { + Ok(self.args.as_ref(py)) + } +} + #[pyfunction] /// Set the current Origen operation (generate, compile, etc.) fn set_operation(name: String) -> PyResult<()> { @@ -532,41 +742,204 @@ fn config(py: Python) -> PyResult { Ok(ret.into()) } +#[pyfunction] +fn config_metadata<'py>(py: Python<'py>) -> PyResult<&'py PyDict> { + let m = origen::origen_config_metadata(); + let retn = PyDict::new(py); + retn.set_item("files", m.files.iter().map( |p| Ok(pypath!(py, p.display()))).collect::>>()?); + Ok(retn) +} + +// FOR_PR see about moving plugin stuff to another file +// Also clean up + +use origen_metal::indexmap::IndexMap; + +#[pyfunction] +// fn _plugin_roots(py: Python) -> PyResult> { +fn _plugin_roots<'py>(py: Python<'py>) -> PyResult<&'py PyDict> { + // let mut pl_roots: IndexMap; + let pl_roots; + if let Some(plugins) = ORIGEN_CONFIG.plugins.as_ref() { + // let l = PyDict::new(py); + if plugins.collect() { + pl_roots = _collect_plugin_roots(py)?; + } else { + pl_roots = PyDict::new(py); // IndexMap::new(); + } + + if let Some(plugins_to_load) = plugins.load.as_ref() { + // pl_roots.extend(_find_plugin_roots(py, plugins_to_load.iter().map( |pl| pl.name.as_str()).collect::>())?); + for (n, r) in _find_plugin_roots(py, plugins_to_load.iter().map( |pl| pl.name.as_str()).collect::>())?.iter() { + pl_roots.set_item(n, r); + } + + // println!("loading..."); + // for pl in plugins_to_load { + // println!("{}: {}", &pl.name, pkgs.get_item(&pl.name)?); + // } + } + } else { + pl_roots = _collect_plugin_roots(py)?; + } + Ok(pl_roots) + // // println!("Start Plugin Roots:"); + // for (pl, path) in pl_roots { + // println!("success|{}|{}", pl, path.display()); + // } + // // println!("End Plugin Roots"); + // Ok(()) +} + +// #[pyfunction] +// fn _get_plugin_roots<'py>(py: Python<'py>) -> PyResult<&PyDict> { +// py_om::_helpers::map_to_pydict(py, _plugin_roots(py)?)? +// } + + +#[pyfunction] +fn _display_plugin_roots(py: Python) -> PyResult<()> { + for (pl, path) in _plugin_roots(py)?.iter() { + println!("success|{}|{}", pl.extract::()?, path.extract::()?.display()); + } + Ok(()) +} + +#[pyfunction] +// fn _find_plugin_roots(py: Python, plugins: Vec<&str>) -> PyResult> { +fn _find_plugin_roots<'py>(py: Python<'py>, plugins: Vec<&str>) -> PyResult<&'py PyDict> { + let l = PyDict::new(py); + l.set_item("plugin_paths", PyDict::new(py)); + py.run(&format!( +r#" +from pathlib import Path +import importlib, importlib_metadata + +for to_load in [{}]: + s = importlib.util.find_spec(to_load) + if s.origin: + root = Path(s.origin).parent + if root.joinpath("origen.plugin.toml").exists(): + plugin_paths[to_load] = root + elif s.submodule_search_locations: + for root in s.submodule_search_locations: + root = Path(root) + if root.joinpath("origen.plugin.toml").exists(): + plugin_paths[to_load] = root +"#, + plugins.iter().map( |n| format!("'{}'", n)).collect::>().join(",")), + None, + Some(l) + )?; + // l.get_item("plugin_paths").unwrap().extract() + Ok(l.get_item("plugin_paths").unwrap().extract()?) +} + +#[pyfunction] +// fn _collect_plugin_roots(py: Python) -> PyResult> { +fn _collect_plugin_roots<'py>(py: Python<'py>) -> PyResult<&'py PyDict> { + let l = PyDict::new(py); + l.set_item("plugin_paths", PyDict::new(py)); + py.run( +r#" +from pathlib import Path +import importlib, importlib_metadata + +for dist in importlib_metadata.distributions(): + n = str(Path(dist._path).name).split('-')[0].lower() + s = importlib.util.find_spec(n) + if s: + if s.origin: + root = Path(s.origin).parent + if root.joinpath("origen.plugin.toml").exists(): + plugin_paths[n] = root + elif s.submodule_search_locations: + for root in s.submodule_search_locations: + root = Path(root) + if root.joinpath("origen.plugin.toml").exists(): + plugin_paths[n] = root +"#, + None, + Some(l) + )?; + // println!("Start Plugin Roots:"); + // for pl in l.get_item("plugin_paths").unwrap().extract::>()? { + // println!("{}", pl.display()); + // } + // println!("End Plugin Roots"); + // l.get_item("plugin_paths").unwrap().extract() + Ok(l.get_item("plugin_paths").unwrap().extract()?) + + // println!("collecting plugin roots..."); + // if let Some(plugins) = ORIGEN_CONFIG.plugins.as_ref() { + // println!("collecting plugin roots..."); + // // let pl_roots = vec![]; + // // let l = PyTuple::new() + // let l = PyDict::new(py); + // l.set_item("pkg_resources", PyModule::import(py, "pkg_resources")?)?; + // println!("imported..."); + // let pkgs = py.eval("{d.project_name: d.location for d in pkg_resources.working_set}", None, Some(l))?; + // println!("evaled..."); + // println!("{:?}", pkgs); + // // if plugins.collect() { + // // // TODO + // // // todo!(); + // // } + + // if let Some(plugins_to_load) = plugins.load.as_ref() { + // println!("loading..."); + // for pl in plugins_to_load { + // println!("{}: {}", &pl.name, pkgs.get_item(&pl.name)?); + // } + // } + // } + // Ok(()) +} + +#[pyfunction] +fn is_app_present() -> PyResult { + Ok(STATUS.is_app_present) +} + /// Returns the Origen application configuration (as defined in application.toml) #[pyfunction] -fn app_config(py: Python) -> PyResult { - let ret = PyDict::new(py); - let _ = origen::app().unwrap().with_config(|config| { - let _ = ret.set_item("name", &config.name); - let _ = ret.set_item("target", &config.target); - let _ = ret.set_item("mode", &config.mode); - let _ = ret.set_item("__output_directory__", &config.output_directory); - let _ = ret.set_item( - "__website_output_directory__", - &config.website_output_directory, - ); - let _ = ret.set_item( - "__website_source_directory__", - &config.website_source_directory, - ); - let _ = ret.set_item( - "website_release_location", - match &config.website_release_location { - Some(loc) => Py::new( - py, - Location { - location: (*loc).clone(), - }, - ) - .unwrap() - .to_object(py), - None => py.None(), - }, - ); - let _ = ret.set_item("website_release_name", &config.website_release_name); - Ok(()) - }); - Ok(ret.into()) +fn app_config(py: Python) -> PyResult> { + if let Some(app) = origen::app() { + let ret = PyDict::new(py); + let _ = app.with_config(|config| { + let _ = ret.set_item("name", &config.name); + let _ = ret.set_item("target", &config.target); + let _ = ret.set_item("mode", &config.mode); + let _ = ret.set_item("__output_directory__", &config.output_directory); + let _ = ret.set_item( + "__website_output_directory__", + &config.website_output_directory, + ); + let _ = ret.set_item( + "__website_source_directory__", + &config.website_source_directory, + ); + let _ = ret.set_item( + "website_release_location", + match &config.website_release_location { + Some(loc) => Py::new( + py, + Location { + location: (*loc).clone(), + }, + ) + .unwrap() + .to_object(py), + None => py.None(), + }, + ); + let _ = ret.set_item("website_release_name", &config.website_release_name); + Ok(()) + }); + Ok(Some(ret.into())) + } else { + Ok(None) + } } /// clean_mode(name) @@ -677,6 +1050,16 @@ pub fn boot_users(py: Python) -> PyResult let users = pyapi_metal::framework::users::users()?; + if let Some(pw_cache_option) = &crate::ORIGEN_CONFIG.user__password_cache_option { + match users.set_default_password_cache_option(Some(pw_cache_option)) { + Ok(_) => {}, + Err(e) => { + om::log_error!("{}: Error encountered updating default password cache option", *BASE_MSG); + om::log_error!("{}", e); + } + } + } + if let Some(dsets) = &crate::ORIGEN_CONFIG.user__datasets { let mut replace_default = true; for (dn, config) in dsets { @@ -841,9 +1224,34 @@ pub fn boot_users(py: Python) -> PyResult // Initialize the current user if ORIGEN_CONFIG.initial_user.as_ref().map_or(true, |u| u.initialize.unwrap_or(true)) { match users.lookup_current_id(true) { - Ok(_) => {} + Ok(_) => { + if ORIGEN_CONFIG.initial_user.as_ref().map_or(true, |u| u.init_home_dir.unwrap_or(true)) { + match users.current_user() { + Ok(usr) => { + match usr { + Some(u) => { + match u.set_home_dir(None) { + Ok(_) => {}, + Err(e) => { + log_error!("{}: Failed to lookup current user's home directory", *BASE_MSG); + log_error!("{}", e); + } + } + }, + None => { + log_error!("{}: Failed to lookup current user", *BASE_MSG); + } + } + }, + Err(e) => { + log_error!("{}: Failed to lookup current user", *BASE_MSG); + log_error!("{}", e); + } + } + } + }, Err(e) => { - om::log_error!("{}: Failed to lookup current user", *BASE_MSG); + log_error!("{}: Failed to lookup current user", *BASE_MSG); log_error!("{}", e); } } diff --git a/rust/pyapi/src/plugins.rs b/rust/pyapi/src/plugins.rs new file mode 100644 index 00000000..0aaa3a25 --- /dev/null +++ b/rust/pyapi/src/plugins.rs @@ -0,0 +1,192 @@ +// FOR_PR figure out what'sn needed here vs. what's staying in FE +use pyo3::prelude::*; +use pyo3::types::PyDict; +use pyo3::wrap_pyfunction; +use pyapi_metal::{pypath, runtime_error, key_error}; +use origen_metal::indexmap::IndexMap; +use std::path::PathBuf; +use pyo3::exceptions::PyKeyError; + +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "plugins")?; + subm.add_wrapped(wrap_pyfunction!(from_origen_cli))?; + subm.add_wrapped(wrap_pyfunction!(default))?; + subm.add_class::()?; + subm.add_class::()?; + m.add_submodule(subm)?; + Ok(()) +} + +#[pyfunction] +pub fn from_origen_cli(py: Python, plugin_configs: &PyDict) -> PyResult { + Plugins::from_pl_config_dict(py, plugin_configs) +} + +#[pyfunction] +pub fn default(py: Python) -> PyResult { + Plugins::from_roots(py) +} + +// #[pymodule] +// pub fn plugins(_py: Python, m: &PyModule) -> PyResult<()> { +// m.add_wrapped(plugins); +// m.add_class::()?; +// m.add_class::()?; +// Ok(()) +// } + +#[pyclass] +pub struct Plugins { + plugins: IndexMap> +} + +#[pymethods] +impl Plugins { + #[getter] + pub fn plugins<'py>(&self, py: Python<'py>) -> PyResult<&'py PyDict> { + let retn = PyDict::new(py); + for (n, pl) in self.plugins.iter() { + retn.set_item(n, pl)?; + } + Ok(retn) + } + + #[getter] + pub fn names(&self) -> PyResult> { + self.keys() + } + + pub fn get(&self, py: Python, key: &str) -> PyResult>> { + Ok(if let Some(pl) = self.plugins.get(key) { + // PyDataStoreCategory::autoload_category(cat.borrow(py).into(), py)?; + Some(pl) + } else { + None + }) + } + + fn keys(&self) -> PyResult> { + Ok(self.plugins.keys().map(|k| k.to_string()).collect()) + } + + // TODO dictlike + // fn values(&self) -> PyResult>> { + // Ok(self.plugins.iter().map(|(_, cat)| cat).collect()) + // } + + // TODO dictlike + // fn items(&self) -> PyResult)>> { + // Ok(self + // .plugins + // .iter() + // .map(|(n, cat)| (n.to_string(), cat)) + // .collect()) + // } + + fn __getitem__(&self, key: &str) -> PyResult<&Py> { + Python::with_gil( |py| { + if let Some(pl) = self.get(py, key)? { + Ok(pl) + } else { + key_error!(format!("Unknown plugin '{}'", key)) + } + }) + } + + fn __len__(&self) -> PyResult { + Ok(self.plugins.len()) + } + + fn __iter__(slf: PyRefMut) -> PyResult { + Ok(PluginsIter { + keys: slf.keys().unwrap(), + i: 0, + }) + } +} + +impl Plugins { + pub fn from_pl_config_dict(py: Python, plugin_configs: &PyDict) -> PyResult { + Ok(Self { + plugins: { + let mut plugins = IndexMap::new(); + for (n, pl) in plugin_configs { + let name = n.extract::()?; + plugins.insert(name.to_owned(), { + let cfg = pl.extract::<&PyDict>()?; + let r = cfg.get_item("root").ok_or_else(|| PyKeyError::new_err(format!("A 'root' is required for plugin '{}'", name)))?.extract::()?; + Py::new(py, Plugin { + name: name, + root: r, + })? + }); + } + plugins + } + }) + } + + pub fn from_roots(py: Python) -> PyResult { + let roots = super::_plugin_roots(py)?; + Ok(Self { + plugins: { + let mut plugins = IndexMap::new(); + for (n, r) in roots { + let name = n.extract::()?; + let root = r.extract::()?; + plugins.insert(name.to_owned(), Py::new(py, Plugin { name: name, root: root })?); + // plugins.insert(name.to_owned(), { + // let cfg = pl.extract::<&PyDict>()?; + // let r = cfg.get_item("root").ok_or_else(|| PyKeyError::new_err(format!("A 'root' is required for plugin '{}'", name)))?.extract::()?; + // Py::new(py, Plugin { + // name: name, + // root: r, + // })? + // }); + } + plugins + } + }) + } +} + +#[pyclass] +pub struct PluginsIter { + pub keys: Vec, + pub i: usize, +} + +#[pymethods] +impl PluginsIter { + fn __iter__(slf: PyRefMut) -> PyResult> { + Ok(slf.into()) + } + + fn __next__(mut slf: PyRefMut) -> PyResult> { + if slf.i >= slf.keys.len() { + return Ok(None); + } + let name = slf.keys[slf.i].clone(); + slf.i += 1; + Ok(Some(name)) + } +} + +#[pyclass] +pub struct Plugin { + name: String, + root: PathBuf, +} + +#[pymethods] +impl Plugin { + #[getter] + pub fn name(&self) -> PyResult<&String> { + Ok(&self.name) + } + + #[getter] + pub fn root(&self, py: Python) -> PyResult { + Ok(pypath!(py, self.root.display())) + } +} diff --git a/rust/pyapi_metal/src/framework/logger.rs b/rust/pyapi_metal/src/framework/logger.rs index 82c11197..321baec3 100644 --- a/rust/pyapi_metal/src/framework/logger.rs +++ b/rust/pyapi_metal/src/framework/logger.rs @@ -1,4 +1,5 @@ use origen_metal::LOGGER; +use crate::pypath; use pyo3::prelude::*; use pyo3::types::{PyDict, PyTuple}; use pyo3::wrap_pyfunction; @@ -17,6 +18,9 @@ pub(crate) fn define(py: Python, m: &PyModule) -> PyResult<()> { subm.add_wrapped(wrap_pyfunction!(output_file))?; subm.add_wrapped(wrap_pyfunction!(set_verbosity))?; subm.add_wrapped(wrap_pyfunction!(set_verbosity_keywords))?; + subm.add_wrapped(wrap_pyfunction!(get_verbosity))?; + subm.add_wrapped(wrap_pyfunction!(get_keywords))?; + subm.add_class::()?; m.add_submodule(subm)?; Ok(()) } @@ -103,3 +107,96 @@ fn set_verbosity_keywords(keywords: Vec) -> PyResult<()> { LOGGER.set_verbosity_keywords(keywords)?; Ok(()) } + +#[pyfunction] +fn get_verbosity() -> PyResult { + Ok(LOGGER.verbosity()) +} + +#[pyfunction] +fn get_keywords() -> PyResult> { + Ok(LOGGER.keywords()) +} + +/// Class-like wrapper for Logger +#[pyclass] +pub struct Logger {} + +#[pymethods] +impl Logger { + + #[new] + fn new() -> Self { + Self {} + } + + #[args(messages = "*", kwargs = "**")] + fn debug(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + debug(py, messages, kwargs) + } + + #[args(messages = "*", kwargs = "**")] + fn deprecated(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + deprecated(py, messages, kwargs) + } + + #[args(messages = "*", kwargs = "**")] + fn error(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + error(py, messages, kwargs) + } + + #[args(messages = "*", kwargs = "**")] + fn info(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + info(py, messages, kwargs) + } + + #[args(messages = "*", kwargs = "**")] + fn success(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + success(py, messages, kwargs) + } + + #[args(messages = "*", kwargs = "**")] + fn warning(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + warning(py, messages, kwargs) + } + + #[args(messages = "*", kwargs = "**")] + fn display(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + display(py, messages, kwargs) + } + + #[args(messages = "*", kwargs = "**")] + fn log(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + log(py, messages, kwargs) + } + + #[args(messages = "*", kwargs = "**")] + fn trace(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { + trace(py, messages, kwargs) + } + + #[getter] + fn output_file(&self, py: Python) -> PyResult { + Ok(pypath!(py, LOGGER.output_file().display())) + } + + #[getter] + fn get_verbosity(&self) -> PyResult { + get_verbosity() + } + + #[setter] + fn set_verbosity(&self, level: u8) -> PyResult<()> { + set_verbosity(level) + } + + #[getter] + fn get_keywords(&self) -> PyResult> { + get_keywords() + } + + #[setter] + fn set_keywords(&self, keywords: Vec) -> PyResult<()> { + set_verbosity_keywords(keywords) + } +} diff --git a/rust/pyapi_metal/src/framework/users.rs b/rust/pyapi_metal/src/framework/users.rs index b914fd1c..9fb748a7 100644 --- a/rust/pyapi_metal/src/framework/users.rs +++ b/rust/pyapi_metal/src/framework/users.rs @@ -7,6 +7,7 @@ use pyo3::prelude::*; use pyo3::types::PyDict; use pyo3::wrap_pyfunction; use std::collections::HashMap; +use crate::frontend::{LOOKUP_HOME_DIR_FUNC_KEY}; use super::file_permissions::FilePermissions; use std::path::PathBuf; @@ -254,6 +255,27 @@ impl Users { }) } + #[getter] + pub fn get_lookup_home_dir_function(&self) -> PyResult> { + crate::frontend::with_py_frontend(|py, py_fe| { + Ok(match py_fe._users_.get(*LOOKUP_HOME_DIR_FUNC_KEY) { + Some(f) => Some(f.to_object(py)), + None => None, + }) + }) + } + + #[setter] + pub fn set_lookup_home_dir_function(&self, func: Option<&PyAny>) -> PyResult<()> { + crate::frontend::with_mut_py_frontend(|py, mut py_fe| { + match func { + Some(f) => py_fe._users_.insert(LOOKUP_HOME_DIR_FUNC_KEY.to_string(), f.to_object(py)), + None => py_fe._users_.remove(*LOOKUP_HOME_DIR_FUNC_KEY), + }; + Ok(()) + }) + } + #[getter] fn get_datakeys(&self) -> PyResult> { let users = om::users(); @@ -471,6 +493,18 @@ impl Users { Ok(self.for_role(role, true, required)?.pop()) } + #[setter] + pub fn set_default_password_cache_option(&self, password_cache_option: Option<&str>) -> PyResult<()> { + let mut users = om::users_mut(); + Ok(users.set_default_password_cache_option(password_cache_option)?) + } + + #[getter] + pub fn get_default_password_cache_option(&self) -> PyResult> { + let mut users = om::users_mut(); + Ok(users.default_password_cache_option().as_ref().map_or( None, |p| p.into())) + } + fn __getitem__(&self, id: &str) -> PyResult { let users = om::users(); match users.user(id) { @@ -746,8 +780,8 @@ impl UserDataset { })?) } - #[setter] - pub fn set_home_dir(&self, hd: Option) -> PyResult<()> { + #[setter(home_dir)] + pub fn home_dir_setter(&self, hd: Option) -> PyResult<()> { Ok(om::with_user_dataset_mut( Some(&self.user_id), &self.dataset, @@ -758,14 +792,37 @@ impl UserDataset { )?) } + pub fn set_home_dir(&self, d: Option) -> PyResult<()> { + self.home_dir_setter( + if d.is_some() { + d + } else { + origen_metal::framework::users::user::try_default_home_dir(Some(&self.user_id), Some(&self.dataset))? + } + ) + } + + pub fn clear_home_dir(&self) -> PyResult<()> { + self.home_dir_setter(None) + } + /// Gets the password for this dataset #[getter] - fn get_password(&self) -> PyResult { + fn password(&self) -> PyResult { Ok(om::with_user(&self.user_id, |u| { u.password(Some(&self.dataset), false, None) })?) } + #[getter] + fn __password__(&self) -> PyResult> { + Ok(om::with_user_dataset( + Some(&self.user_id), + &self.dataset, + |d| Ok(d.password.as_ref().map( |s| s.to_string())), + )?) + } + #[setter] pub fn set_password(&self, password: Option) -> PyResult<()> { Ok(om::with_user(&self.user_id, |u| { @@ -1472,7 +1529,7 @@ impl User { } /// Clears the cached password only for the default dataset - fn clear_cache_password(&self) -> PyResult<()> { + fn clear_cached_password(&self) -> PyResult<()> { Ok(om::with_user(&self.user_id, |u| { u.clear_cached_password(None) })?) @@ -1669,14 +1726,36 @@ impl User { })?) } - #[setter] - pub fn set_home_dir(&self, d: Option) -> PyResult<()> { + #[setter(home_dir)] + pub fn home_dir_setter(&self, d: Option) -> PyResult<()> { Ok(om::with_user(&self.user_id, |u| { u.set_home_dir(d.clone())?; Ok(()) })?) } + pub fn set_home_dir(&self, d: Option) -> PyResult<()> { + self.home_dir_setter( + if d.is_some() { + d + } else { + origen_metal::framework::users::user::try_default_home_dir(Some(&self.user_id), None)? + } + ) + } + + pub fn clear_home_dir(&self) -> PyResult<()> { + self.home_dir_setter(None) + } + + #[allow(non_snake_case)] + #[getter] + pub fn __dot_origen_dir__(&self, py: Python) -> PyResult { + Ok(pypath!(py, om::with_user(&self.user_id, |u| { + u.dot_origen_dir() + })?.display())) + } + #[getter] pub fn session_config(&self) -> PyResult { Ok(UserSessionConfig::new(&self.user_id)) diff --git a/rust/pyapi_metal/src/frontend/_frontend.rs b/rust/pyapi_metal/src/frontend/_frontend.rs index 40d65fb6..edecb1d1 100644 --- a/rust/pyapi_metal/src/frontend/_frontend.rs +++ b/rust/pyapi_metal/src/frontend/_frontend.rs @@ -12,6 +12,8 @@ use origen_metal::Result as OMResult; use pyo3::prelude::*; use pyo3::types::{PyDict, PyList, PyTuple}; use std::collections::HashMap; +use std::path::PathBuf; +use crate::framework::users::{User, UserDataset}; use crate::_helpers::typed_value; @@ -133,6 +135,45 @@ impl origen_metal::frontend::FrontendAPI for Frontend { } } + fn lookup_home_dir(&self, user_id: &str, dataset: Option<&str>, is_current: bool) -> Option>> { + let fe_result = with_py_frontend(|py, fe| { + Ok(match fe._users_.get(*super::LOOKUP_HOME_DIR_FUNC_KEY) { + Some(f) => { + let args = ( + User::new(user_id)?, + if let Some(d) = dataset { + Py::new(py, UserDataset::new(user_id, d))?.to_object(py) + } else { + py.None() + }, + is_current, + ); + + let result = f.call1(py, args)?; + if result.is_none(py) { + Some(None) + } else if let Ok(b) = result.extract::(py) { + if b { + return runtime_error!("'True' is not a valid return value when looking up a user's home directory") + } else { + None + } + } else { + Some(Some(result.extract::(py)?)) + } + } + None => None, + }) + }); + match fe_result { + Ok(r) => match r { + Some(res) => return Some(Ok(res)), + None => None, + }, + Err(e) => Some(Err(e.into())), + } + } + fn as_any(&self) -> &dyn std::any::Any { self } diff --git a/rust/pyapi_metal/src/frontend/mod.rs b/rust/pyapi_metal/src/frontend/mod.rs index 842c618c..e804f2c8 100644 --- a/rust/pyapi_metal/src/frontend/mod.rs +++ b/rust/pyapi_metal/src/frontend/mod.rs @@ -2,6 +2,10 @@ static MOD_PATH: &'static str = "origen_metal._origen_metal"; static MOD: &'static str = "frontend"; static PY_FRONTEND: &'static str = "__py_frontend__"; +crate::lazy_static! { + pub static ref LOOKUP_HOME_DIR_FUNC_KEY: &'static str = "lookup_default_home_dir_function"; +} + #[macro_export] macro_rules! frontend_mod { ($py:expr) => {{ diff --git a/test_apps/pl_ext_cmds/.gitignore b/test_apps/pl_ext_cmds/.gitignore new file mode 100644 index 00000000..47275fc7 --- /dev/null +++ b/test_apps/pl_ext_cmds/.gitignore @@ -0,0 +1,6 @@ +/.origen +/output +/web/source/_static/build +/web/source/interbuild +/tmp +/.ref \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/config/application.toml b/test_apps/pl_ext_cmds/config/application.toml new file mode 100644 index 00000000..a47e1634 --- /dev/null +++ b/test_apps/pl_ext_cmds/config/application.toml @@ -0,0 +1 @@ +name = "pl_ext_cmds" \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/config/commands.toml b/test_apps/pl_ext_cmds/config/commands.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/config/origen.toml b/test_apps/pl_ext_cmds/config/origen.toml new file mode 100644 index 00000000..eee0cdec --- /dev/null +++ b/test_apps/pl_ext_cmds/config/origen.toml @@ -0,0 +1,14 @@ +# Use this to define your application-specific Origen configuration +# Do not delete it even if you don't use it since it is also used by the Origen +# command line interface to determine when it is in an Origen application workspace + +# Specify what command should be used to invoke python, if not specified +# Origen will try python, python3, python3.8, etc. until one is found that +# satisfies the minimum Python version requirement +#python_cmd = "mypython" + +# If your company has an internal package server enter it here: +#pkg_server = "https://pkgs.company.net:9292" +# or here, if you need to use different urls for push and pull (write and read): +#pkg_server_push = "https://pkgs.company.net:9292" +#pkg_server_pull = "https://pkgs.company.net:9292" \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/application.py b/test_apps/pl_ext_cmds/pl_ext_cmds/application.py new file mode 100644 index 00000000..5b9a0cb4 --- /dev/null +++ b/test_apps/pl_ext_cmds/pl_ext_cmds/application.py @@ -0,0 +1,6 @@ +from origen.application import Base + +# This class represents this application and is automatically instantiated as `origen.app` +# It is required by Origen and should not be renamed or removed under any circumstances +class Application(Base): + pass diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/commands.toml b/test_apps/pl_ext_cmds/pl_ext_cmds/commands.toml new file mode 100644 index 00000000..64fd060f --- /dev/null +++ b/test_apps/pl_ext_cmds/pl_ext_cmds/commands.toml @@ -0,0 +1,6 @@ +[[extension]] +extend = "origen.eval" + + [[extension.opt]] + name = "pl_ext_cmds_generic_ext" + help = "Generic ext from pl_ext_cmds plugin" \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/commands/extensions/core/eval.py b/test_apps/pl_ext_cmds/pl_ext_cmds/commands/extensions/core/eval.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/pl_ext_cmds/pl_ext_cmds/commands/extensions/core/eval.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/attributes.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/attributes.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/controller.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/controller.py new file mode 100644 index 00000000..2e09abc1 --- /dev/null +++ b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/controller.py @@ -0,0 +1,18 @@ +from origen.controller import TopLevel as BaseController +import origen + + +class Controller(BaseController): + def write_register(self, reg_or_val, size=None, address=None, **kwargs): + # Invoke your driver of choice to dispatch this write_register request, + # here is a JTAG example: + #self.jtag.write_ir(0xF, size=8) + #self.jtag.write_dr(reg_or_val, size) + raise RuntimeError(f"A request to write a register was received by '{self.path}' ({type(self)}), however the logic to implement it has not been defined yet") + + def verify_register(self, reg_or_val, size=None, address=None, **kwargs): + # Invoke your driver of choice to dispatch this verify_register request, + # here is a JTAG example: + #self.jtag.write_ir(0x1F, size=8) + #self.jtag.verify_dr(reg_or_val, size) + raise RuntimeError(f"A request to verify a register was received by '{self.path}' ({type(self)}), however the logic to implement it has not been defined yet") diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/attributes.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/attributes.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/controller.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/controller.py new file mode 100644 index 00000000..05ae2a5e --- /dev/null +++ b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/controller.py @@ -0,0 +1,16 @@ +from ...controller import Controller as Parent +import origen + + +class Controller(Parent): + def write_register(self, reg_or_val, size=None, address=None, **kwargs): + # All write register requests originated from within this block (or one of its children) + # will be sent to the parent class by default, however you can intercept it here and do + # something else if required + super().write_register(reg_or_val, size, address, **kwargs) + + def verify_register(self, reg_or_val, size=None, address=None, **kwargs): + # A verify register requests originated from within this block (or one of its children) + # will be sent to the parent class by default, however you can intercept it here and do + # something else if required + super().verify_register(reg_or_val, size, address, **kwargs) diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/levels.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/levels.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/pins.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/pins.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/registers.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/registers.py new file mode 100644 index 00000000..591d55e9 --- /dev/null +++ b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/registers.py @@ -0,0 +1,33 @@ +########################################################################################## +# Any registers defined here will be added to this DUT and all of its derivative children +########################################################################################## + +# Example of a simple register definition with all bits r/w, 0x0 is the local offset address: +# +# SimpleReg("my_reg1", 0x0, size=32) # 32 is the default size if not specified +SimpleReg("hawk_reg1", 0x0, size=32) # 32 is the default size if not specified +# +# Example of a richer definition with bitfields: +# +# with Reg("my_reg2", 0x4): +# Field("coco", offset=7, access="ro") +# Field("aien", offset=6) +# Field("diff", offset=5) +# Field( +# "adch", +# offset=0, +# width=5, +# reset=0x1F, +# enums={ +# # A simple enum +# "val1": 3, +# # A more complex enum, all fields except for value are optional +# "val2": { +# "value": 5, +# "usage": "w", +# "description": "The value of something" +# }, +# }) +# +# For more examples and full documentation see: https://origen-sdk.org/o2/guides/registers + diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/services.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/services.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/sub_blocks.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/sub_blocks.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/timing.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/derivatives/demo/timing.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/levels.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/levels.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/pins.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/pins.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/registers.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/registers.py new file mode 100644 index 00000000..5de5f73c --- /dev/null +++ b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/registers.py @@ -0,0 +1,32 @@ +########################################################################################## +# Any registers defined here will be added to all DUTs in your application +########################################################################################## + +# Example of a simple register definition with all bits r/w, 0x0 is the local offset address: +# +# SimpleReg("my_reg1", 0x0, size=32) # 32 is the default size if not specified +# +# Example of a richer definition with bitfields: +# +# with Reg("my_reg2", 0x4): +# Field("coco", offset=7, access="ro") +# Field("aien", offset=6) +# Field("diff", offset=5) +# Field( +# "adch", +# offset=0, +# width=5, +# reset=0x1F, +# enums={ +# # A simple enum +# "val1": 3, +# # A more complex enum, all fields except for value are optional +# "val2": { +# "value": 5, +# "usage": "w", +# "description": "The value of something" +# }, +# }) +# +# For more examples and full documentation see: https://origen-sdk.org/o2/guides/registers + diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/services.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/services.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/sub_blocks.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/sub_blocks.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/dut/timing.py b/test_apps/pl_ext_cmds/pl_ext_cmds/dut/timing.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/flows/.gitkeep b/test_apps/pl_ext_cmds/pl_ext_cmds/flows/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/interface/interface.py b/test_apps/pl_ext_cmds/pl_ext_cmds/interface/interface.py new file mode 100644 index 00000000..97544bae --- /dev/null +++ b/test_apps/pl_ext_cmds/pl_ext_cmds/interface/interface.py @@ -0,0 +1,5 @@ +from origen.interface import BaseInterface + + +class Interface(BaseInterface): + pass \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/origen.plugin.toml b/test_apps/pl_ext_cmds/pl_ext_cmds/origen.plugin.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/patterns/.gitkeep b/test_apps/pl_ext_cmds/pl_ext_cmds/patterns/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/pl_ext_cmds/templates/.gitkeep b/test_apps/pl_ext_cmds/pl_ext_cmds/templates/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/poetry.lock b/test_apps/pl_ext_cmds/poetry.lock new file mode 100644 index 00000000..74f65dab --- /dev/null +++ b/test_apps/pl_ext_cmds/poetry.lock @@ -0,0 +1,1358 @@ +[[package]] +name = "alabaster" +version = "0.7.12" +description = "A configurable sidebar-enabled Sphinx theme" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "atomicwrites" +version = "1.4.1" +description = "Atomic file writes." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "attrs" +version = "22.1.0" +description = "Classes Without Boilerplate" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.extras] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] + +[[package]] +name = "babel" +version = "2.10.3" +description = "Internationalization utilities" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pytz = ">=2015.7" + +[[package]] +name = "beautifulsoup4" +version = "4.8.2" +description = "Screen-scraping library" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +soupsieve = ">=1.2" + +[package.extras] +html5lib = ["html5lib"] +lxml = ["lxml"] + +[[package]] +name = "bs4" +version = "0.0.1" +description = "Dummy package for Beautiful Soup" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +beautifulsoup4 = "*" + +[[package]] +name = "cachecontrol" +version = "0.12.11" +description = "httplib2 caching for requests" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} +msgpack = ">=0.5.2" +requests = "*" + +[package.extras] +filecache = ["lockfile (>=0.9)"] +redis = ["redis (>=2.10.5)"] + +[[package]] +name = "cachy" +version = "0.3.0" +description = "Cachy provides a simple yet effective caching library." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.extras] +redis = ["redis (>=3.3.6,<4.0.0)"] +memcached = ["python-memcached (>=1.59,<2.0)"] +msgpack = ["msgpack-python (>=0.5,<0.6)"] + +[[package]] +name = "certifi" +version = "2022.6.15" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "2.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" +optional = false +python-versions = ">=3.6.0" + +[package.extras] +unicode_backport = ["unicodedata2"] + +[[package]] +name = "cleo" +version = "0.8.1" +description = "Cleo allows you to create beautiful and testable command-line interfaces." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +clikit = ">=0.6.0,<0.7.0" + +[[package]] +name = "clikit" +version = "0.6.2" +description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +pastel = ">=0.2.0,<0.3.0" +pylev = ">=1.3,<2.0" + +[[package]] +name = "colorama" +version = "0.4.5" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "commonmark" +version = "0.9.1" +description = "Python parser for the CommonMark Markdown spec" +category = "main" +optional = false +python-versions = "*" + +[package.extras] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] + +[[package]] +name = "crashtest" +version = "0.3.1" +description = "Manage Python errors with ease" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "cryptography" +version = "37.0.4" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +cffi = ">=1.12" + +[package.extras] +docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] +docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +sdist = ["setuptools_rust (>=0.11.4)"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] + +[[package]] +name = "distlib" +version = "0.3.5" +description = "Distribution utilities" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "docutils" +version = "0.19" +description = "Docutils -- Python Documentation Utilities" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "filelock" +version = "3.8.0" +description = "A platform independent file lock." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] +docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] + +[[package]] +name = "html5lib" +version = "1.1" +description = "HTML parser based on the WHATWG HTML specification" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +six = ">=1.9" +webencodings = "*" + +[package.extras] +all = ["genshi", "chardet (>=2.2)", "lxml"] +chardet = ["chardet (>=2.2)"] +genshi = ["genshi"] +lxml = ["lxml"] + +[[package]] +name = "idna" +version = "3.3" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "importlib-metadata" +version = "1.7.0" +description = "Read metadata from Python packages" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["sphinx", "rst.linker"] +testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] + +[[package]] +name = "jeepney" +version = "0.8.0" +description = "Low-level, pure Python DBus protocol wrapper." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] +trio = ["trio", "async-generator"] + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "keyring" +version = "22.3.0" +description = "Store and access your passwords safely." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] + +[[package]] +name = "lockfile" +version = "0.12.2" +description = "Platform-independent file locking module" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "mako" +version = "1.1.0" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +MarkupSafe = ">=0.9.2" + +[[package]] +name = "markupsafe" +version = "2.1.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "more-itertools" +version = "8.14.0" +description = "More routines for operating on iterables, beyond itertools" +category = "dev" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "msgpack" +version = "1.0.4" +description = "MessagePack serializer" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "origen" +version = "2.0.0.dev5" +description = "Semiconductor Developer's Kit" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +beautifulsoup4 = "4.8.2" +bs4 = "0.0.1" +colorama = "^0.4" +importlib-metadata = ">= 1.7.0" +Jinja2 = "^3" +mako = "1.1.0" +origen_autoapi = "2.0.1" +origen_metal = "= 0.4.0" +poetry = "^1.1.14" +recommonmark = ">= 0" +sphinx = "3.0.2" +sphinxbootstrap4theme = ">= 0" +termcolor = ">= 1.1.0" +yapf = "0.30" + +[package.source] +type = "directory" +url = "../../python/origen" + +[[package]] +name = "origen-autoapi" +version = "2.0.1" +description = "Automatic API reference documentation generation for Sphinx inspired by Doxygen, with changes for the Origen project." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +sphinx = "*" + +[[package]] +name = "origen-metal" +version = "0.4.0" +description = "Bare metal APIs for the Origen SDK" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +colorama = ">= 0.4.4" +pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} +termcolor = ">= 1.1.0" + +[package.source] +type = "directory" +url = "../../python/origen_metal" + +[[package]] +name = "packaging" +version = "20.9" +description = "Core utilities for Python packages" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +pyparsing = ">=2.0.2" + +[[package]] +name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pkginfo" +version = "1.8.3" +description = "Query metadatdata from sdists / bdists / installed packages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" + +[package.extras] +testing = ["nose", "coverage"] + +[[package]] +name = "platformdirs" +version = "2.5.2" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "poetry" +version = "1.1.14" +description = "Python dependency management and packaging made easy." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +cachy = ">=0.3.0,<0.4.0" +cleo = ">=0.8.1,<0.9.0" +clikit = ">=0.6.2,<0.7.0" +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +html5lib = ">=1.0,<2.0" +importlib-metadata = {version = ">=1.6.0,<2.0.0", markers = "python_version < \"3.8\""} +keyring = {version = ">=21.2.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +packaging = ">=20.4,<21.0" +pexpect = ">=4.7.0,<5.0.0" +pkginfo = ">=1.4,<2.0" +poetry-core = ">=1.0.7,<1.1.0" +requests = ">=2.18,<3.0" +requests-toolbelt = ">=0.9.1,<0.10.0" +shellingham = ">=1.1,<2.0" +tomlkit = ">=0.7.0,<1.0.0" +virtualenv = ">=20.0.26,<21.0.0" + +[[package]] +name = "poetry-core" +version = "1.0.8" +description = "Poetry PEP 517 Build Backend" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pygments" +version = "2.12.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "pylev" +version = "1.4.0" +description = "A pure Python Levenshtein implementation that's not freaking GPL'd." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pyparsing" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +category = "main" +optional = false +python-versions = ">=3.6.8" + +[package.extras] +diagrams = ["railroad-diagrams", "jinja2"] + +[[package]] +name = "pyreadline3" +version = "3.4.1" +description = "A python implementation of GNU readline." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pytest" +version = "3.10.1" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +atomicwrites = ">=1.0" +attrs = ">=17.4.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +more-itertools = ">=4.0.0" +pluggy = ">=0.7" +py = ">=1.5.0" +six = ">=1.10.0" + +[[package]] +name = "pytz" +version = "2022.2.1" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pywin32-ctypes" +version = "0.2.0" +description = "" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "recommonmark" +version = "0.7.1" +description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +commonmark = ">=0.8.1" +docutils = ">=0.11" +sphinx = ">=1.3.1" + +[[package]] +name = "requests" +version = "2.28.1" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=3.7, <4" + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<3" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<1.27" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-toolbelt" +version = "0.9.1" +description = "A utility belt for advanced users of python-requests" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +name = "secretstorage" +version = "3.3.3" +description = "Python bindings to FreeDesktop.org Secret Service API" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + +[[package]] +name = "shellingham" +version = "1.5.0" +description = "Tool to Detect Surrounding Shell" +category = "main" +optional = false +python-versions = ">=3.4" + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "soupsieve" +version = "2.3.2.post1" +description = "A modern CSS selector implementation for Beautiful Soup." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "sphinx" +version = "3.0.2" +description = "Python documentation generator" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +alabaster = ">=0.7,<0.8" +babel = ">=1.3" +colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.12" +imagesize = "*" +Jinja2 = ">=2.3" +packaging = "*" +Pygments = ">=2.0" +requests = ">=2.5.0" +snowballstemmer = ">=1.1" +sphinxcontrib-applehelp = "*" +sphinxcontrib-devhelp = "*" +sphinxcontrib-htmlhelp = "*" +sphinxcontrib-jsmath = "*" +sphinxcontrib-qthelp = "*" +sphinxcontrib-serializinghtml = "*" + +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-stubs"] +test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] + +[[package]] +name = "sphinxbootstrap4theme" +version = "0.6.0" +description = "Sphinx Bootstrap4 Theme" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.2" +description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.2" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.0" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest", "html5lib"] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +test = ["pytest", "flake8", "mypy"] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.3" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.5" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "termcolor" +version = "1.1.0" +description = "ANSII Color formatting for output in terminal." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "tomlkit" +version = "0.11.4" +description = "Style preserving TOML library" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "urllib3" +version = "1.26.11" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" + +[package.extras] +brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[[package]] +name = "virtualenv" +version = "20.16.2" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +distlib = ">=0.3.1,<1" +filelock = ">=3.2,<4" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +platformdirs = ">=2,<3" + +[package.extras] +testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] +docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] + +[[package]] +name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "yapf" +version = "0.30.0" +description = "A formatter for Python code." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "zipp" +version = "3.8.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] + +[metadata] +lock-version = "1.1" +python-versions = ">=3.7,<3.11" +content-hash = "1f4c2af7a73abea014b8d078693c410088ef6c775fb5d4b9e8e06aa06b9a5680" + +[metadata.files] +alabaster = [ + {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, + {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, +] +atomicwrites = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] +attrs = [ + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, +] +babel = [ + {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, + {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, +] +beautifulsoup4 = [ + {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, + {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, + {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, +] +bs4 = [ + {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, +] +cachecontrol = [ + {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, + {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, +] +cachy = [ + {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, + {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, +] +certifi = [ + {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, + {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, +] +cffi = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] +charset-normalizer = [ + {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, + {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, +] +cleo = [ + {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, + {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, +] +clikit = [ + {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, + {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, +] +colorama = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] +commonmark = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] +crashtest = [ + {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, + {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, +] +cryptography = [ + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, + {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, + {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, + {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, +] +distlib = [ + {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, + {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, +] +docutils = [ + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, +] +filelock = [ + {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, + {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, +] +html5lib = [ + {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, + {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, +] +idna = [ + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, +] +imagesize = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] +importlib-metadata = [ + {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, + {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, +] +jeepney = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, +] +jinja2 = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] +keyring = [ + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, +] +lockfile = [ + {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, + {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +] +mako = [ + {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, +] +markupsafe = [ + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] +more-itertools = [ + {file = "more-itertools-8.14.0.tar.gz", hash = "sha256:c09443cd3d5438b8dafccd867a6bc1cb0894389e90cb53d227456b0b0bccb750"}, + {file = "more_itertools-8.14.0-py3-none-any.whl", hash = "sha256:1bc4f91ee5b1b31ac7ceacc17c09befe6a40a503907baf9c839c229b5095cfd2"}, +] +msgpack = [ + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, +] +origen = [] +origen-autoapi = [ + {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, + {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, +] +origen-metal = [] +packaging = [ + {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, + {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, +] +pastel = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] +pexpect = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] +pkginfo = [ + {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, + {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, +] +platformdirs = [ + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, +] +pluggy = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] +poetry = [ + {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, + {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, +] +poetry-core = [ + {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, + {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, +] +ptyprocess = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] +py = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] +pycparser = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] +pygments = [ + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, +] +pylev = [ + {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, + {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, +] +pyparsing = [ + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, +] +pyreadline3 = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] +pytest = [ + {file = "pytest-3.10.1-py2.py3-none-any.whl", hash = "sha256:3f193df1cfe1d1609d4c583838bea3d532b18d6160fd3f55c9447fdca30848ec"}, + {file = "pytest-3.10.1.tar.gz", hash = "sha256:e246cf173c01169b9617fc07264b7b1316e78d7a650055235d6d897bc80d9660"}, +] +pytz = [ + {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, + {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, +] +pywin32-ctypes = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] +recommonmark = [ + {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, + {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, +] +requests = [ + {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, + {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, +] +requests-toolbelt = [ + {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, + {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, +] +secretstorage = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] +shellingham = [ + {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, + {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] +snowballstemmer = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] +soupsieve = [ + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, +] +sphinx = [ + {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, + {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, +] +sphinxbootstrap4theme = [ + {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, +] +sphinxcontrib-applehelp = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] +sphinxcontrib-devhelp = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] +sphinxcontrib-htmlhelp = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] +sphinxcontrib-jsmath = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] +sphinxcontrib-qthelp = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] +sphinxcontrib-serializinghtml = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] +termcolor = [ + {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, +] +tomlkit = [ + {file = "tomlkit-0.11.4-py3-none-any.whl", hash = "sha256:25d4e2e446c453be6360c67ddfb88838cfc42026322770ba13d1fbd403a93a5c"}, + {file = "tomlkit-0.11.4.tar.gz", hash = "sha256:3235a9010fae54323e727c3ac06fb720752fe6635b3426e379daec60fbd44a83"}, +] +urllib3 = [ + {file = "urllib3-1.26.11-py2.py3-none-any.whl", hash = "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc"}, + {file = "urllib3-1.26.11.tar.gz", hash = "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"}, +] +virtualenv = [ + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, +] +webencodings = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] +yapf = [ + {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, + {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, +] +zipp = [ + {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, + {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, +] diff --git a/test_apps/pl_ext_cmds/pyproject.toml b/test_apps/pl_ext_cmds/pyproject.toml new file mode 100644 index 00000000..9fc1d4dd --- /dev/null +++ b/test_apps/pl_ext_cmds/pyproject.toml @@ -0,0 +1,17 @@ +[tool.poetry] +name = "pl_ext_cmds" +version = "0.1.0" +description = "Plugin Extending Cmds" +authors = ["Origen-SDK"] + +[tool.poetry.dependencies] +python = ">=3.7,<3.11" +origen = { path = "../../python/origen", develop = true } +origen_metal = { path = "../../python/origen_metal", develop = true } + +[tool.poetry.dev-dependencies] +pytest = "^3" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/setup.cfg b/test_apps/pl_ext_cmds/setup.cfg new file mode 100644 index 00000000..6e1cfdfa --- /dev/null +++ b/test_apps/pl_ext_cmds/setup.cfg @@ -0,0 +1,2 @@ +[tool:pytest] +testpaths = tests \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/targets/dut/demo.py b/test_apps/pl_ext_cmds/targets/dut/demo.py new file mode 100644 index 00000000..8479f6a8 --- /dev/null +++ b/test_apps/pl_ext_cmds/targets/dut/demo.py @@ -0,0 +1 @@ +origen.app.instantiate_dut("dut.demo") \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/targets/tester/smt7.py b/test_apps/pl_ext_cmds/targets/tester/smt7.py new file mode 100644 index 00000000..9335607f --- /dev/null +++ b/test_apps/pl_ext_cmds/targets/tester/smt7.py @@ -0,0 +1 @@ +origen.tester.target("::V93K::SMT7") \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/targets/tester/smt8.py b/test_apps/pl_ext_cmds/targets/tester/smt8.py new file mode 100644 index 00000000..7a378261 --- /dev/null +++ b/test_apps/pl_ext_cmds/targets/tester/smt8.py @@ -0,0 +1 @@ +origen.tester.target("::V93K::SMT8") \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/targets/tester/uflex.py b/test_apps/pl_ext_cmds/targets/tester/uflex.py new file mode 100644 index 00000000..da6c3b88 --- /dev/null +++ b/test_apps/pl_ext_cmds/targets/tester/uflex.py @@ -0,0 +1 @@ +origen.tester.target("Ultraflex") \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/tests/README.md b/test_apps/pl_ext_cmds/tests/README.md new file mode 100644 index 00000000..218887c3 --- /dev/null +++ b/test_apps/pl_ext_cmds/tests/README.md @@ -0,0 +1,16 @@ +Note that the `tests` folder is the place to create tests to verify the +functionality of this Origen application, it does not refer to silicon +tests! + +This is setup to use a popular Python test framework called `pytest` which +requires that following naming convention is followed: + +* All files containing tests must be named `_test.py`, e.g. `tests/example_test.py` +* Functions that define tests within such files must be named `test_`, + e.g. `def test_example():` + +To execute the tests, run the following command from the command line: + +~~~ +poetry run pytest +~~~ \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/tests/example_test.py b/test_apps/pl_ext_cmds/tests/example_test.py new file mode 100644 index 00000000..374f68a0 --- /dev/null +++ b/test_apps/pl_ext_cmds/tests/example_test.py @@ -0,0 +1,6 @@ +import origen +import pytest +from tests.shared import * + +def test_example(): + assert 1 == 1 \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/tests/shared/__init__.py b/test_apps/pl_ext_cmds/tests/shared/__init__.py new file mode 100644 index 00000000..5579f7f3 --- /dev/null +++ b/test_apps/pl_ext_cmds/tests/shared/__init__.py @@ -0,0 +1,5 @@ +# This is a good place to add helper functions that you want to make +# available to all of your tests + +import pytest +import origen \ No newline at end of file diff --git a/test_apps/pl_ext_cmds/vendor/.gitkeep b/test_apps/pl_ext_cmds/vendor/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/web/Makefile b/test_apps/pl_ext_cmds/web/Makefile new file mode 100644 index 00000000..d0c3cbf1 --- /dev/null +++ b/test_apps/pl_ext_cmds/web/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/test_apps/pl_ext_cmds/web/make.bat b/test_apps/pl_ext_cmds/web/make.bat new file mode 100644 index 00000000..9534b018 --- /dev/null +++ b/test_apps/pl_ext_cmds/web/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/test_apps/pl_ext_cmds/web/source/_static/.gitkeep b/test_apps/pl_ext_cmds/web/source/_static/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/pl_ext_cmds/web/source/conf.py b/test_apps/pl_ext_cmds/web/source/conf.py new file mode 100644 index 00000000..a03196d1 --- /dev/null +++ b/test_apps/pl_ext_cmds/web/source/conf.py @@ -0,0 +1,76 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) +import origen +import origen.web + +import sys, os +sys.path.insert(0, os.path.abspath('../../')) + +# -- Project information ----------------------------------------------------- + +project = 'pl_ext_cmds' +copyright = '2020, Origen Core Team' +author = 'Origen Core Team' + +# The full version, including alpha/beta/rc tags +release = '0.0.0' + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'origen.web.origen_sphinx_extension', 'origen_autoapi.sphinx', + 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.autosectionlabel', + 'recommonmark', 'origen.web.shorthand' +] + +autosectionlabel_prefix_document = True +autoapi_modules = { + 'pl_ext_cmds.application': { + 'module-members': ['undoc-members'], + 'class-members': ['members', 'undoc-members'] + } +} +autoapi_output_dir = origen.web.interbuild_dir.joinpath('autoapi') + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +#html_theme_options = { +# 'navbar_links': +# [('Github', 'https://github.com/Origen-SDK/o2/tree/master/example', True)], +# 'logos': [{ +# 'src': '_static/example_logo.png', +# 'alt': 'Example', +# 'rel_src': True, +# }] +#} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/test_apps/pl_ext_cmds/web/source/index.rst b/test_apps/pl_ext_cmds/web/source/index.rst new file mode 100644 index 00000000..b2dc3f0b --- /dev/null +++ b/test_apps/pl_ext_cmds/web/source/index.rst @@ -0,0 +1,22 @@ +.. example documentation master file, created by + sphinx-quickstart on Wed Apr 15 21:59:35 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to pl_ext_cmds's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + interbuild/autoapi/pl_ext_cmds.application/pl_ext_cmds.application + +For information on how to build documentation with Origen, see :link-to:`the documentation guides `. + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/test_apps/python_app/config/commands.toml b/test_apps/python_app/config/commands.toml index 500bee15..3e5f4192 100644 --- a/test_apps/python_app/config/commands.toml +++ b/test_apps/python_app/config/commands.toml @@ -45,4 +45,44 @@ [[command.subcommand]] name = "stop" - help = "Stop playing" \ No newline at end of file + help = "Stop playing" + +[[command]] + name = "arg_opt_warmup" + aliases = ["w", "w-out"] + help = "Gross test command demonstrating args/opts from app commands" + + [[command.arg]] + name = "first" + required = true + help = "First Argument - Required" + + [[command.arg]] + name = "second" + help = "Second Multi-Argument - Not Required" + multiple = true + use_delimiter = true + + [[command.opt]] + name = "flag_opt" + help = "Flag opt" + short = "f" + + [[command.opt]] + name = "single_opt" + help = "Single-value non-required opt" + short_aliases = ["s"] + takes_value = true + + [[command.opt]] + name = "multi_opt" + help = "Multi-value non-required opt" + long_aliases = ["m_opt"] + short_aliases = ["m"] + multiple = true + + [[command.opt]] + name = "hidden_flag_opt" + help = "Hidden flag opt" + long = "hidden" + hidden = true diff --git a/test_apps/python_app/config/origen.toml b/test_apps/python_app/config/origen.toml index c3d12ce1..6d6bc997 100644 --- a/test_apps/python_app/config/origen.toml +++ b/test_apps/python_app/config/origen.toml @@ -52,18 +52,18 @@ full_name = "cn" # LDAP configuration [ldaps] [ldaps.dummy_ldap] -server = "ldap://zflexldap.com:389" -base = "dc=zflexsoftware,dc=com" +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" [ldaps.dummy_ldap.auth] scheme = "simple_bind" -username = "cn=ro_admin,ou=sysadmins,dc=zflexsoftware,dc=com" -password = "zflexpass" +username = "uid=sponge,ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" +password = "KrabbyPatties#1" # Service/functional accounts [default_users] [default_users.dummy_ldap_read_only] -username = "cn=ro_admin,ou=sysadmins,dc=zflexsoftware,dc=com" -password = "zflexpass" +username = "uid=sponge,ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" +password = "KrabbyPatties#1" [mailer] server = "smtp.origen.org" @@ -71,4 +71,7 @@ port = 25 auth_method = "None" domain = "origen.org" user = "dummy_ldap_read_only" -timeout = 120 \ No newline at end of file +timeout = 120 + +[[auxillary_commands]] + path = "../tests/cli/cmd_testers" diff --git a/test_apps/python_app/config/test_case_cmds/commands.toml b/test_apps/python_app/config/test_case_cmds/commands.toml new file mode 100644 index 00000000..f26f67c8 --- /dev/null +++ b/test_apps/python_app/config/test_case_cmds/commands.toml @@ -0,0 +1,7 @@ +[[command]] + name = "echo" + help = "Echo from the application" + + [[command.arg]] + name = "input" + help = "Input to echo" diff --git a/test_apps/python_app/config/test_case_cmds/invalid.toml b/test_apps/python_app/config/test_case_cmds/invalid.toml new file mode 100644 index 00000000..e9630716 --- /dev/null +++ b/test_apps/python_app/config/test_case_cmds/invalid.toml @@ -0,0 +1,5 @@ +[[command]] +name = "invalid" +test = "invalid toml format" + +[[command] \ No newline at end of file diff --git a/test_apps/python_app/example/commands/arg_opt_warmup.py b/test_apps/python_app/example/commands/arg_opt_warmup.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/arg_opt_warmup.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/example/commands/examples.py b/test_apps/python_app/example/commands/examples.py index e9fc08ff..25ad6b01 100644 --- a/test_apps/python_app/example/commands/examples.py +++ b/test_apps/python_app/example/commands/examples.py @@ -6,6 +6,8 @@ def run(**kwargs): os.chdir(origen.root) + origen.boot.exit = False + run_cmd("generate", files=["example/patterns"], reference_dir="approved", diff --git a/test_apps/python_app/poetry.lock b/test_apps/python_app/poetry.lock index 186b363d..36db9342 100644 --- a/test_apps/python_app/poetry.lock +++ b/test_apps/python_app/poetry.lock @@ -16,17 +16,17 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "21.4.0" +version = "22.1.0" description = "Classes Without Boilerplate" -category = "dev" +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.5" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] [[package]] name = "babel" @@ -39,6 +39,14 @@ python-versions = ">=3.6" [package.dependencies] pytz = ">=2015.7" +[[package]] +name = "backports.cached-property" +version = "1.0.2" +description = "cached_property() - computed once per instance, cached as attribute" +category = "main" +optional = false +python-versions = ">=3.6.0" + [[package]] name = "beautifulsoup4" version = "4.8.2" @@ -67,19 +75,19 @@ beautifulsoup4 = "*" [[package]] name = "cachecontrol" -version = "0.12.11" +version = "0.12.12" description = "httplib2 caching for requests" category = "main" optional = false python-versions = ">=3.6" [package.dependencies] -lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} +filelock = {version = ">=3.8.0", optional = true, markers = "extra == \"filecache\""} msgpack = ">=0.5.2" requests = "*" [package.extras] -filecache = ["lockfile (>=0.9)"] +filecache = ["filelock (>=3.8.0)"] redis = ["redis (>=2.10.5)"] [[package]] @@ -97,7 +105,7 @@ msgpack = ["msgpack-python (>=0.5,<0.6)"] [[package]] name = "certifi" -version = "2022.6.15" +version = "2022.9.24" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false @@ -116,7 +124,7 @@ pycparser = "*" [[package]] name = "charset-normalizer" -version = "2.1.0" +version = "2.1.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false @@ -127,27 +135,15 @@ unicode_backport = ["unicodedata2"] [[package]] name = "cleo" -version = "0.8.1" +version = "1.0.0a5" description = "Cleo allows you to create beautiful and testable command-line interfaces." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.dependencies] -clikit = ">=0.6.0,<0.7.0" - -[[package]] -name = "clikit" -version = "0.6.2" -description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.7,<4.0" [package.dependencies] -crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} -pastel = ">=0.2.0,<0.3.0" -pylev = ">=1.3,<2.0" +crashtest = ">=0.3.1,<0.4.0" +pylev = ">=1.3.0,<2.0.0" [[package]] name = "colorama" @@ -178,7 +174,7 @@ python-versions = ">=3.6,<4.0" [[package]] name = "cryptography" -version = "37.0.4" +version = "38.0.2" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -191,13 +187,13 @@ cffi = ">=1.12" docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] -sdist = ["setuptools_rust (>=0.11.4)"] +sdist = ["setuptools-rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] name = "distlib" -version = "0.3.5" +version = "0.3.6" description = "Distribution utilities" category = "main" optional = false @@ -211,17 +207,34 @@ category = "main" optional = false python-versions = ">=3.7" +[[package]] +name = "dulwich" +version = "0.20.46" +description = "Python Git Library" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +urllib3 = ">=1.25" + +[package.extras] +fastimport = ["fastimport"] +https = ["urllib3 (>=1.24.1)"] +paramiko = ["paramiko"] +pgp = ["gpg"] + [[package]] name = "filelock" -version = "3.7.1" +version = "3.8.0" description = "A platform independent file lock." category = "main" optional = false python-versions = ">=3.7" [package.extras] -docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] -testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] +testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] +docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] [[package]] name = "html5lib" @@ -243,7 +256,7 @@ lxml = ["lxml"] [[package]] name = "idna" -version = "3.3" +version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false @@ -259,18 +272,35 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "importlib-metadata" -version = "1.7.0" +version = "4.13.0" description = "Read metadata from Python packages" category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.7" [package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "rst.linker"] -testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +perf = ["ipython"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] + +[[package]] +name = "importlib-resources" +version = "5.10.0" +description = "Read resources from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} + +[package.extras] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [[package]] name = "iniconfig" @@ -280,6 +310,21 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "jaraco.classes" +version = "3.2.3" +description = "Utility functions for Python class constructs" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +more-itertools = "*" + +[package.extras] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] + [[package]] name = "jeepney" version = "0.8.0" @@ -306,31 +351,44 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "jsonschema" +version = "4.16.0" +description = "An implementation of JSON Schema validation for Python" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +attrs = ">=17.4.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} +pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""} +pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" +typing-extensions = {version = "*", markers = "python_version < \"3.8\""} + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] + [[package]] name = "keyring" -version = "22.3.0" +version = "23.9.3" description = "Store and access your passwords safely." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] -importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} +"jaraco.classes" = "*" jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] - -[[package]] -name = "lockfile" -version = "0.12.2" -description = "Platform-independent file locking module" -category = "main" -optional = false -python-versions = "*" +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [[package]] name = "mako" @@ -351,6 +409,14 @@ category = "main" optional = false python-versions = ">=3.7" +[[package]] +name = "more-itertools" +version = "9.0.0" +description = "More routines for operating on iterables, beyond itertools" +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "msgpack" version = "1.0.4" @@ -419,22 +485,14 @@ url = "../../python/origen_metal" [[package]] name = "packaging" -version = "20.9" +version = "21.3" description = "Core utilities for Python packages" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] -pyparsing = ">=2.0.2" - -[[package]] -name = "pastel" -version = "0.2.1" -description = "Bring colors to your terminal." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "pexpect" @@ -458,6 +516,14 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.extras] testing = ["nose", "coverage"] +[[package]] +name = "pkgutil-resolve-name" +version = "1.3.10" +description = "Resolve a name to an object." +category = "main" +optional = false +python-versions = ">=3.6" + [[package]] name = "platformdirs" version = "2.5.2" @@ -487,41 +553,59 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poetry" -version = "1.1.14" +version = "1.2.2" description = "Python dependency management and packaging made easy." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7,<4.0" [package.dependencies] -cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +"backports.cached-property" = {version = ">=1.0.2,<2.0.0", markers = "python_version < \"3.8\""} +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"]} cachy = ">=0.3.0,<0.4.0" -cleo = ">=0.8.1,<0.9.0" -clikit = ">=0.6.2,<0.7.0" -crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +cleo = ">=1.0.0a5,<2.0.0" +crashtest = ">=0.3.0,<0.4.0" +dulwich = ">=0.20.46,<0.21.0" html5lib = ">=1.0,<2.0" -importlib-metadata = {version = ">=1.6.0,<2.0.0", markers = "python_version < \"3.8\""} -keyring = {version = ">=21.2.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} -packaging = ">=20.4,<21.0" +importlib-metadata = {version = ">=4.4,<5.0", markers = "python_version < \"3.10\""} +jsonschema = ">=4.10.0,<5.0.0" +keyring = ">=21.2.0" +packaging = ">=20.4" pexpect = ">=4.7.0,<5.0.0" -pkginfo = ">=1.4,<2.0" -poetry-core = ">=1.0.7,<1.1.0" +pkginfo = ">=1.5,<2.0" +platformdirs = ">=2.5.2,<3.0.0" +poetry-core = "1.3.2" +poetry-plugin-export = ">=1.1.2,<2.0.0" requests = ">=2.18,<3.0" requests-toolbelt = ">=0.9.1,<0.10.0" -shellingham = ">=1.1,<2.0" -tomlkit = ">=0.7.0,<1.0.0" -virtualenv = ">=20.0.26,<21.0.0" +shellingham = ">=1.5,<2.0" +tomlkit = ">=0.11.1,<0.11.2 || >0.11.2,<0.11.3 || >0.11.3,<1.0.0" +urllib3 = ">=1.26.0,<2.0.0" +virtualenv = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6" +xattr = {version = ">=0.9.7,<0.10.0", markers = "sys_platform == \"darwin\""} [[package]] name = "poetry-core" -version = "1.0.8" +version = "1.3.2" description = "Poetry PEP 517 Build Backend" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7,<4.0" [package.dependencies] -importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} +importlib-metadata = {version = ">=1.7.0", markers = "python_version < \"3.8\""} + +[[package]] +name = "poetry-plugin-export" +version = "1.1.2" +description = "Poetry plugin to export the dependencies to various formats" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" + +[package.dependencies] +poetry = ">=1.2.0,<2.0.0" +poetry-core = ">=1.1.0,<2.0.0" [[package]] name = "ptyprocess" @@ -549,12 +633,15 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.12.0" +version = "2.13.0" description = "Pygments is a syntax highlighting package written in Python." category = "main" optional = false python-versions = ">=3.6" +[package.extras] +plugins = ["importlib-metadata"] + [[package]] name = "pylev" version = "1.4.0" @@ -582,6 +669,14 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "pyrsistent" +version = "0.18.1" +description = "Persistent/Functional/Immutable data structures" +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "pytest" version = "6.2.5" @@ -615,6 +710,7 @@ develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} [package.source] type = "directory" @@ -622,7 +718,7 @@ url = "../python_plugin" [[package]] name = "pytz" -version = "2022.1" +version = "2022.5" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -680,7 +776,7 @@ requests = ">=2.0.1,<3.0.0" [[package]] name = "secretstorage" -version = "3.3.2" +version = "3.3.3" description = "Python bindings to FreeDesktop.org Secret Service API" category = "main" optional = false @@ -692,11 +788,11 @@ jeepney = ">=0.6" [[package]] name = "shellingham" -version = "1.4.0" +version = "1.5.0" description = "Tool to Detect Surrounding Shell" category = "main" optional = false -python-versions = "!=3.0,!=3.1,!=3.2,!=3.3,>=2.6" +python-versions = ">=3.4" [[package]] name = "six" @@ -834,11 +930,31 @@ test = ["pytest"] [[package]] name = "termcolor" -version = "1.1.0" -description = "ANSII Color formatting for output in terminal." +version = "2.0.1" +description = "ANSI color formatting for output in terminal" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" + +[package.extras] +tests = ["pytest-cov", "pytest"] + +[[package]] +name = "test-apps-shared-test-helpers" +version = "0.1.0" +description = "Shared Regression Test Helpers for Test Apps" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} + +[package.source] +type = "directory" +url = "../test_apps_shared_test_helpers" [[package]] name = "toml" @@ -850,15 +966,23 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tomlkit" -version = "0.11.1" +version = "0.11.5" description = "Style preserving TOML library" category = "main" optional = false python-versions = ">=3.6,<4.0" +[[package]] +name = "typing-extensions" +version = "4.4.0" +description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "urllib3" -version = "1.26.10" +version = "1.26.12" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false @@ -866,27 +990,26 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, [package.extras] brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.15.1" +version = "20.16.5" description = "Virtual Python Environment builder" category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" [package.dependencies] -distlib = ">=0.3.1,<1" -filelock = ">=3.2,<4" -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -platformdirs = ">=2,<3" -six = ">=1.9.0,<2" +distlib = ">=0.3.5,<1" +filelock = ">=3.4.1,<4" +importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.8\""} +platformdirs = ">=2.4,<3" [package.extras] -docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] +docs = ["proselint (>=0.13)", "sphinx (>=5.1.1)", "sphinx-argparse (>=0.3.1)", "sphinx-rtd-theme (>=1)", "towncrier (>=21.9)"] +testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] [[package]] name = "webencodings" @@ -896,6 +1019,17 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "xattr" +version = "0.9.9" +description = "Python wrapper for extended filesystem attributes" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +cffi = ">=1.0" + [[package]] name = "yapf" version = "0.30.0" @@ -906,20 +1040,20 @@ python-versions = "*" [[package]] name = "zipp" -version = "3.8.1" +version = "3.10.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "jaraco.functools", "more-itertools", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [metadata] lock-version = "1.1" python-versions = ">=3.7,<3.11" -content-hash = "4d869d2fe1546b198d52df841cf2a30fb6bf57df73ad7355df5beff6d306c0a4" +content-hash = "f1f014490864b5d619ae08b69574f6ed6d2c50121f8c787e03583ec5f12a379e" [metadata.files] alabaster = [ @@ -930,13 +1064,17 @@ atomicwrites = [ {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, ] attrs = [ - {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, - {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, ] babel = [ {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, ] +"backports.cached-property" = [ + {file = "backports.cached-property-1.0.2.tar.gz", hash = "sha256:9306f9eed6ec55fd156ace6bc1094e2c86fae5fb2bf07b6a9c00745c656e75dd"}, + {file = "backports.cached_property-1.0.2-py3-none-any.whl", hash = "sha256:baeb28e1cd619a3c9ab8941431fe34e8490861fb998c6c4590693d50171db0cc"}, +] beautifulsoup4 = [ {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, @@ -946,16 +1084,16 @@ bs4 = [ {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, ] cachecontrol = [ - {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, - {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, + {file = "CacheControl-0.12.12-py2.py3-none-any.whl", hash = "sha256:5986a16897cd296bdb7b86b42e0403c4ca30b9875f0e0c7c8e509b50cff115b7"}, + {file = "CacheControl-0.12.12.tar.gz", hash = "sha256:9c2e5208ea76ebd9921176569743ddf6d7f3bb4188dbf61806f0f8fc48ecad38"}, ] cachy = [ {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, ] certifi = [ - {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, - {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, + {file = "certifi-2022.9.24-py3-none-any.whl", hash = "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"}, + {file = "certifi-2022.9.24.tar.gz", hash = "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"}, ] cffi = [ {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, @@ -1024,16 +1162,12 @@ cffi = [ {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, ] charset-normalizer = [ - {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, - {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, + {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, + {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, ] cleo = [ - {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, - {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, -] -clikit = [ - {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, - {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, + {file = "cleo-1.0.0a5-py3-none-any.whl", hash = "sha256:ff53056589300976e960f75afb792dfbfc9c78dcbb5a448e207a17b643826360"}, + {file = "cleo-1.0.0a5.tar.gz", hash = "sha256:097c9d0e0332fd53cc89fc11eb0a6ba0309e6a3933c08f7b38558555486925d3"}, ] colorama = [ {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, @@ -1048,61 +1182,106 @@ crashtest = [ {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, ] cryptography = [ - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, - {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, - {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, - {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, + {file = "cryptography-38.0.2-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:6635b89790a616913ae95977dcd756582a3c5a298a0b8f4071a35ec8809e1cab"}, + {file = "cryptography-38.0.2-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:d14f7e1e6726046c8afd240673cb31828dbd434d710d4ecb2060982e5c76df75"}, + {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:bd6ca1f5541420f13250b3335228dc7eb6102761a107442cbfba5de4ccc99891"}, + {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32f4ab6652f0630884cc902154f1f26a3a5d8495404250019172dca6fd4abf70"}, + {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b99713109d76ad35736dcc4e47d54fbaa36cce761adc0333db75e86621fa68c"}, + {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:e03aaa0bb3783302ea23f0f483222d918f148c65e0f953d1c8d82f5e509a7fab"}, + {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:eb603f1809dd095d07a426d81457f4b8236ff4d7a67a976f9da47e13977d427e"}, + {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:55974e634712f7d054886a754a10c67b58e6a9d1c6c3d0d1181919e7fb336d0e"}, + {file = "cryptography-38.0.2-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:74ccc297d7cd013ca7faf640afaedb305b265420b342ab32d5fa07ddd19f24a1"}, + {file = "cryptography-38.0.2-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:8c6987de4b656f4d8d70ce422b5e275deedf9bf28d99e0470d50706a1470822c"}, + {file = "cryptography-38.0.2-cp36-abi3-win32.whl", hash = "sha256:dc8d465c2cf489f12f1168670a4eb90e68701916b15f5a1c6a1dd0f9c0b02e92"}, + {file = "cryptography-38.0.2-cp36-abi3-win_amd64.whl", hash = "sha256:ab4d517e2dc08d862493e727a4411ce6caab8a7ac2089b99a059d938ced5aa8b"}, + {file = "cryptography-38.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc7852c5f61c62df783bccdef935d5d64ca0dac7e6ace07f9937eff31690ce20"}, + {file = "cryptography-38.0.2-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:0d631744fdd965a6ca7e94106046c62ca26cd55a13c47aa76f9d07aa30806b8b"}, + {file = "cryptography-38.0.2-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:a25c5e86d34ec43ea59848afc44ec941da0c6d126fcc9ace72a1360e096e528b"}, + {file = "cryptography-38.0.2-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6ea4cbf5d8e8678dcd87fdb1bb5386d6a91cc8d738866f815c6839751221818c"}, + {file = "cryptography-38.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b4c782b5f47751983f5acd29344210d4de36524b78fa4fc96e9e47d31e44654"}, + {file = "cryptography-38.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:24cb9cb0ea0bc860250cb494ce59bb8d021c00de3a8ead140c0bb198bd0922ca"}, + {file = "cryptography-38.0.2-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:ca99f9c7599a02cddb878c64a2c81bbe0ffef7424c202acef47dd7c069b7469a"}, + {file = "cryptography-38.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e553175c49ae31db579342d342e649db36cd91f457f3a90eed47698451479890"}, + {file = "cryptography-38.0.2-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7e3040ec05cff2ec32719d2b6428d9c022463c3a97735b7ba524e0283a48c8b4"}, + {file = "cryptography-38.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e90261b616c0805f0147c50fc69f758d7e321f5c446eea291618f2aa6742c5f3"}, + {file = "cryptography-38.0.2-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:8526fb97be3bae2977bdd8896a552c9149d04b6b77b36b7dfe026b16136061b2"}, + {file = "cryptography-38.0.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:407148dbe633d6f0bb3c6d4c0807d33a50d8dadfb1ca40b368fe72fcac4b2116"}, + {file = "cryptography-38.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:8fa734b9a7cf555fecddd4ba23e2c5524719bacdd63fd61544166c1352fa5e48"}, + {file = "cryptography-38.0.2.tar.gz", hash = "sha256:7a022ec87c7a8bdad99f516a4ee6ffcb3a2bc31487577f9eccbc9b2edb1a8fd4"}, ] distlib = [ - {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, - {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, ] docutils = [ {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, ] +dulwich = [ + {file = "dulwich-0.20.46-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:6676196e9cf377cde62aa2f5d741e93207437343e0c62368bd0d784c322a3c49"}, + {file = "dulwich-0.20.46-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a1ca555a3eafe7388d6cb81bb08f34608a1592500f0bd4c26734c91d208a546"}, + {file = "dulwich-0.20.46-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:769442c9657b10fc35ac625beeaf440540c9288c96fcfaba3e58adf745c5cafd"}, + {file = "dulwich-0.20.46-cp310-cp310-win32.whl", hash = "sha256:de22a54f68c6c4e97f9b924abd46da4618536d7934b9849066be9fc5cd31205d"}, + {file = "dulwich-0.20.46-cp310-cp310-win_amd64.whl", hash = "sha256:42fa5a68908556eb6c40f231a67caf6a4660588aad707a9d6b334fa1d8f04bf7"}, + {file = "dulwich-0.20.46-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:3e16376031466848e44aabf3489fafb054482143744b21167dbd168731041c74"}, + {file = "dulwich-0.20.46-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:153c7512587384a290c60fef330f1ab397a59559e19e8b02a0169ff21b4c69fb"}, + {file = "dulwich-0.20.46-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5b68bd815cd2769c75e5a78708eb0440612df19b370a977aa9e01a056baa9ed"}, + {file = "dulwich-0.20.46-cp311-cp311-win32.whl", hash = "sha256:b1339bca70764eb8e780d80c72e7c1cb4651201dc9e43ec5d616bf51eb3bb3a6"}, + {file = "dulwich-0.20.46-cp311-cp311-win_amd64.whl", hash = "sha256:1162fdafb2abdfe66649617061f3853cb26384fade1f6884f6fe6e9c570a7552"}, + {file = "dulwich-0.20.46-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:6826512f778eaa47e2e8c0a46cdc555958f9f5286771490b8642b4b508ea5d25"}, + {file = "dulwich-0.20.46-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:100d39bc18196a07c521fd5f60f78f397493303daa0b8690216864bbc621cd5d"}, + {file = "dulwich-0.20.46-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4cd2cd7baa81246bdc8c5272d4e9224e2255da7a0618a220aab5e07b9888e9b"}, + {file = "dulwich-0.20.46-cp36-cp36m-win32.whl", hash = "sha256:6eed5a3194d64112605fc0f638f4fa91771495e8674fa3e6d6b33bf150d297d5"}, + {file = "dulwich-0.20.46-cp36-cp36m-win_amd64.whl", hash = "sha256:9ca4d73987f5b0e2e843497876f9bb39a47384a2e50597a85542285f5c890293"}, + {file = "dulwich-0.20.46-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:b9f49de83911eed7adbe83136229837ef9d102e42dbe6aacb1a18be45c997ace"}, + {file = "dulwich-0.20.46-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d38be7d3a78d608ecab3348f7920d6b9002e7972dd245206dc8075cfdb91621d"}, + {file = "dulwich-0.20.46-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4b7a7feb966a4669c254b18385fe0b3c639f3b1f5ddef0d9e083364cc762847"}, + {file = "dulwich-0.20.46-cp37-cp37m-win32.whl", hash = "sha256:f9552ac246bceab1c5cdd1ec3cfe9446fe76b9853eaf59d3244df03eb27fd3fe"}, + {file = "dulwich-0.20.46-cp37-cp37m-win_amd64.whl", hash = "sha256:90a075aeb0fdbad7e18b9db3af161e3d635e2b7697b7a4b467e6844a13b0b210"}, + {file = "dulwich-0.20.46-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:8d6fee82cedb2362942d9ef94061901f7e07d7d8674e4c7b6fceeef7822ae275"}, + {file = "dulwich-0.20.46-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:669c6b3d82996518a7fec4604771bd285e23f0860f41f565fef5987265d431d9"}, + {file = "dulwich-0.20.46-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd3eac228117487a959ac8f49ea2787eac34acc69999fe7adae70b23e3c3571c"}, + {file = "dulwich-0.20.46-cp38-cp38-win32.whl", hash = "sha256:92024f572d32680e021219f77015c8b443c38022e502b7f51ad7cf51a6285a36"}, + {file = "dulwich-0.20.46-cp38-cp38-win_amd64.whl", hash = "sha256:d928de1eba0326a2a8a52ed94c9bf7c315ff4db606a1aa3ae688d39574f93267"}, + {file = "dulwich-0.20.46-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:a5d1b7a3a7d84a5dedbb90092e00097357106b9642ac08a96c2ae89ccd8afd9a"}, + {file = "dulwich-0.20.46-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b739d759c10e2af7c964dcc97fd4e5dc49e8567d080eed8906fc422c79b7fdcf"}, + {file = "dulwich-0.20.46-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fc7a4f633f5468453d5dd84a753cd99d4433f0397437229a0a8b10347935591"}, + {file = "dulwich-0.20.46-cp39-cp39-win32.whl", hash = "sha256:525115c4d1fbf60a5fe98f340b4ca597ba47b2c75d9c5ec750dd0e9115ef8ec6"}, + {file = "dulwich-0.20.46-cp39-cp39-win_amd64.whl", hash = "sha256:73e2585a9fcf1f8cdad8597a0c384c0b365b2e8346463130c96d9ea1478587ae"}, + {file = "dulwich-0.20.46.tar.gz", hash = "sha256:4f0e88ffff5db1523d93d92f1525fe5fa161318ffbaad502c1b9b3be7a067172"}, +] filelock = [ - {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, - {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, + {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, + {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, ] html5lib = [ {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, ] idna = [ - {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, - {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, ] imagesize = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, ] importlib-metadata = [ - {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, - {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, + {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, + {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, +] +importlib-resources = [ + {file = "importlib_resources-5.10.0-py3-none-any.whl", hash = "sha256:ee17ec648f85480d523596ce49eae8ead87d5631ae1551f913c0100b5edd3437"}, + {file = "importlib_resources-5.10.0.tar.gz", hash = "sha256:c01b1b94210d9849f286b86bb51bcea7cd56dde0600d8db721d7b81330711668"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] +"jaraco.classes" = [ + {file = "jaraco.classes-3.2.3-py3-none-any.whl", hash = "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158"}, + {file = "jaraco.classes-3.2.3.tar.gz", hash = "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a"}, +] jeepney = [ {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, @@ -1111,13 +1290,13 @@ jinja2 = [ {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] -keyring = [ - {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, - {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, +jsonschema = [ + {file = "jsonschema-4.16.0-py3-none-any.whl", hash = "sha256:9e74b8f9738d6a946d70705dc692b74b5429cd0960d58e79ffecfc43b2221eb9"}, + {file = "jsonschema-4.16.0.tar.gz", hash = "sha256:165059f076eff6971bae5b742fc029a7b4ef3f9bcf04c14e4776a7605de14b23"}, ] -lockfile = [ - {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, - {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +keyring = [ + {file = "keyring-23.9.3-py3-none-any.whl", hash = "sha256:69732a15cb1433bdfbc3b980a8a36a04878a6cfd7cb99f497b573f31618001c0"}, + {file = "keyring-23.9.3.tar.gz", hash = "sha256:69b01dd83c42f590250fe7a1f503fc229b14de83857314b1933a3ddbf595c4a5"}, ] mako = [ {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, @@ -1164,6 +1343,10 @@ markupsafe = [ {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] +more-itertools = [ + {file = "more-itertools-9.0.0.tar.gz", hash = "sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab"}, + {file = "more_itertools-9.0.0-py3-none-any.whl", hash = "sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41"}, +] msgpack = [ {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, @@ -1225,12 +1408,8 @@ origen-autoapi = [ ] origen-metal = [] packaging = [ - {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, - {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, -] -pastel = [ - {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, - {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, + {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, + {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] pexpect = [ {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, @@ -1240,6 +1419,10 @@ pkginfo = [ {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, ] +pkgutil-resolve-name = [ + {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, + {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, +] platformdirs = [ {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, @@ -1249,12 +1432,16 @@ pluggy = [ {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] poetry = [ - {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, - {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, + {file = "poetry-1.2.2-py3-none-any.whl", hash = "sha256:93ea3c4a622485c2a7b7249f1e34e4ac84f8229ded76153b67506313201b154f"}, + {file = "poetry-1.2.2.tar.gz", hash = "sha256:6d9ed0b1b826a0a79190f2078d7d78483fa24bf2494f3b170e354eaa5e7b5ea1"}, ] poetry-core = [ - {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, - {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, + {file = "poetry-core-1.3.2.tar.gz", hash = "sha256:0ab006a40cb38d6a38b97264f6835da2f08a96912f2728ce668e9ac6a34f686f"}, + {file = "poetry_core-1.3.2-py3-none-any.whl", hash = "sha256:ea0f5a90b339cde132b4e43cff78a1b440cd928db864bb67cfc97fdfcefe7218"}, +] +poetry-plugin-export = [ + {file = "poetry-plugin-export-1.1.2.tar.gz", hash = "sha256:5e92525dd63f38ce74a51ed68ea91d753523f21ce5f9ef8d3b793e2a4b2222ef"}, + {file = "poetry_plugin_export-1.1.2-py3-none-any.whl", hash = "sha256:946e3313b3d00c18fb9a50522e9d5e6a7e111beaba8d6ae33297662fc2070ac1"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, @@ -1269,8 +1456,8 @@ pycparser = [ {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] pygments = [ - {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, - {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, + {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, + {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, ] pylev = [ {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, @@ -1284,14 +1471,37 @@ pyreadline3 = [ {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, ] +pyrsistent = [ + {file = "pyrsistent-0.18.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:df46c854f490f81210870e509818b729db4488e1f30f2a1ce1698b2295a878d1"}, + {file = "pyrsistent-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d45866ececf4a5fff8742c25722da6d4c9e180daa7b405dc0a2a2790d668c26"}, + {file = "pyrsistent-0.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4ed6784ceac462a7d6fcb7e9b663e93b9a6fb373b7f43594f9ff68875788e01e"}, + {file = "pyrsistent-0.18.1-cp310-cp310-win32.whl", hash = "sha256:e4f3149fd5eb9b285d6bfb54d2e5173f6a116fe19172686797c056672689daf6"}, + {file = "pyrsistent-0.18.1-cp310-cp310-win_amd64.whl", hash = "sha256:636ce2dc235046ccd3d8c56a7ad54e99d5c1cd0ef07d9ae847306c91d11b5fec"}, + {file = "pyrsistent-0.18.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e92a52c166426efbe0d1ec1332ee9119b6d32fc1f0bbfd55d5c1088070e7fc1b"}, + {file = "pyrsistent-0.18.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7a096646eab884bf8bed965bad63ea327e0d0c38989fc83c5ea7b8a87037bfc"}, + {file = "pyrsistent-0.18.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cdfd2c361b8a8e5d9499b9082b501c452ade8bbf42aef97ea04854f4a3f43b22"}, + {file = "pyrsistent-0.18.1-cp37-cp37m-win32.whl", hash = "sha256:7ec335fc998faa4febe75cc5268a9eac0478b3f681602c1f27befaf2a1abe1d8"}, + {file = "pyrsistent-0.18.1-cp37-cp37m-win_amd64.whl", hash = "sha256:6455fc599df93d1f60e1c5c4fe471499f08d190d57eca040c0ea182301321286"}, + {file = "pyrsistent-0.18.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:fd8da6d0124efa2f67d86fa70c851022f87c98e205f0594e1fae044e7119a5a6"}, + {file = "pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bfe2388663fd18bd8ce7db2c91c7400bf3e1a9e8bd7d63bf7e77d39051b85ec"}, + {file = "pyrsistent-0.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e3e1fcc45199df76053026a51cc59ab2ea3fc7c094c6627e93b7b44cdae2c8c"}, + {file = "pyrsistent-0.18.1-cp38-cp38-win32.whl", hash = "sha256:b568f35ad53a7b07ed9b1b2bae09eb15cdd671a5ba5d2c66caee40dbf91c68ca"}, + {file = "pyrsistent-0.18.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1b96547410f76078eaf66d282ddca2e4baae8964364abb4f4dcdde855cd123a"}, + {file = "pyrsistent-0.18.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f87cc2863ef33c709e237d4b5f4502a62a00fab450c9e020892e8e2ede5847f5"}, + {file = "pyrsistent-0.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc66318fb7ee012071b2792024564973ecc80e9522842eb4e17743604b5e045"}, + {file = "pyrsistent-0.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:914474c9f1d93080338ace89cb2acee74f4f666fb0424896fcfb8d86058bf17c"}, + {file = "pyrsistent-0.18.1-cp39-cp39-win32.whl", hash = "sha256:1b34eedd6812bf4d33814fca1b66005805d3640ce53140ab8bbb1e2651b0d9bc"}, + {file = "pyrsistent-0.18.1-cp39-cp39-win_amd64.whl", hash = "sha256:e24a828f57e0c337c8d8bb9f6b12f09dfdf0273da25fda9e314f0b684b415a07"}, + {file = "pyrsistent-0.18.1.tar.gz", hash = "sha256:d4d61f8b993a7255ba714df3aca52700f8125289f84f704cf80916517c46eb96"}, +] pytest = [ {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] python-plugin = [] pytz = [ - {file = "pytz-2022.1-py2.py3-none-any.whl", hash = "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"}, - {file = "pytz-2022.1.tar.gz", hash = "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7"}, + {file = "pytz-2022.5-py2.py3-none-any.whl", hash = "sha256:335ab46900b1465e714b4fda4963d87363264eb662aab5e65da039c25f1f5b22"}, + {file = "pytz-2022.5.tar.gz", hash = "sha256:c4d88f472f54d615e9cd582a5004d1e5f624854a6a27a6211591c251f22a6914"}, ] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, @@ -1310,12 +1520,12 @@ requests-toolbelt = [ {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, ] secretstorage = [ - {file = "SecretStorage-3.3.2-py3-none-any.whl", hash = "sha256:755dc845b6ad76dcbcbc07ea3da75ae54bb1ea529eb72d15f83d26499a5df319"}, - {file = "SecretStorage-3.3.2.tar.gz", hash = "sha256:0a8eb9645b320881c222e827c26f4cfcf55363e8b374a021981ef886657a912f"}, + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, ] shellingham = [ - {file = "shellingham-1.4.0-py2.py3-none-any.whl", hash = "sha256:536b67a0697f2e4af32ab176c00a50ac2899c5a05e0d8e2dadac8e58888283f9"}, - {file = "shellingham-1.4.0.tar.gz", hash = "sha256:4855c2458d6904829bd34c299f11fdeed7cfefbf8a2c522e4caea6cd76b3171e"}, + {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, + {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, ] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, @@ -1361,33 +1571,96 @@ sphinxcontrib-serializinghtml = [ {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, ] termcolor = [ - {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, + {file = "termcolor-2.0.1-py3-none-any.whl", hash = "sha256:7e597f9de8e001a3208c4132938597413b9da45382b6f1d150cff8d062b7aaa3"}, + {file = "termcolor-2.0.1.tar.gz", hash = "sha256:6b2cf769e93364a2676e1de56a7c0cff2cf5bd07f37e9cc80b0dd6320ebfe388"}, ] +test-apps-shared-test-helpers = [] toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tomlkit = [ - {file = "tomlkit-0.11.1-py3-none-any.whl", hash = "sha256:1c5bebdf19d5051e2e1de6cf70adfc5948d47221f097fcff7a3ffc91e953eaf5"}, - {file = "tomlkit-0.11.1.tar.gz", hash = "sha256:61901f81ff4017951119cd0d1ed9b7af31c821d6845c8c477587bbdcd5e5854e"}, + {file = "tomlkit-0.11.5-py3-none-any.whl", hash = "sha256:f2ef9da9cef846ee027947dc99a45d6b68a63b0ebc21944649505bf2e8bc5fe7"}, + {file = "tomlkit-0.11.5.tar.gz", hash = "sha256:571854ebbb5eac89abcb4a2e47d7ea27b89bf29e09c35395da6f03dd4ae23d1c"}, +] +typing-extensions = [ + {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, + {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, ] urllib3 = [ - {file = "urllib3-1.26.10-py2.py3-none-any.whl", hash = "sha256:8298d6d56d39be0e3bc13c1c97d133f9b45d797169a0e11cdd0e0489d786f7ec"}, - {file = "urllib3-1.26.10.tar.gz", hash = "sha256:879ba4d1e89654d9769ce13121e0f94310ea32e8d2f8cf587b77c08bbcdb30d6"}, + {file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"}, + {file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"}, ] virtualenv = [ - {file = "virtualenv-20.15.1-py2.py3-none-any.whl", hash = "sha256:b30aefac647e86af6d82bfc944c556f8f1a9c90427b2fb4e3bfbf338cb82becf"}, - {file = "virtualenv-20.15.1.tar.gz", hash = "sha256:288171134a2ff3bfb1a2f54f119e77cd1b81c29fc1265a2356f3e8d14c7d58c4"}, + {file = "virtualenv-20.16.5-py3-none-any.whl", hash = "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27"}, + {file = "virtualenv-20.16.5.tar.gz", hash = "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da"}, ] webencodings = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, ] +xattr = [ + {file = "xattr-0.9.9-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:58a9fb4fd19b467e88f4b75b5243706caa57e312d3aee757b53b57c7fd0f4ba9"}, + {file = "xattr-0.9.9-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e71efca59705c7abde5b7f76323ebe00ed2977f10cba4204b9421dada036b5ca"}, + {file = "xattr-0.9.9-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:1aad96b6603961c3d1ca1aaa8369b1a8d684a7b37357b2428087c286bf0e561c"}, + {file = "xattr-0.9.9-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:46cb74f98d31d9d70f975ec3e6554360a9bdcbb4b9fb50a69fabe54f9f928c97"}, + {file = "xattr-0.9.9-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:80c2db56058a687d7439be041f916cbeb2943fbe2623e53d5da721a4552d8991"}, + {file = "xattr-0.9.9-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:c360d1cc42e885b64d84f64de3c501dd7bce576248327ef583b4625ee63aa023"}, + {file = "xattr-0.9.9-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:debd87afe6bdf88c3689bde52eecf2b166388b13ef7388259d23223374db417d"}, + {file = "xattr-0.9.9-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:4280c9f33a8678828f1bbc3d3dc8b823b5e4a113ee5ecb0fb98bff60cc2b9ad1"}, + {file = "xattr-0.9.9-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:e0916ec1656d2071cd3139d1f52426825985d8ed076f981ef7f0bc13dfa8e96c"}, + {file = "xattr-0.9.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a517916fbf2f58a3222bb2048fe1eeff4e23e07a4ce6228a27de004c80bf53ab"}, + {file = "xattr-0.9.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e886c882b3b28c7a684c3e3daf46347da5428a46b88bc6d62c4867d574b90c54"}, + {file = "xattr-0.9.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:373e3d1fd9258438fc38d1438142d3659f36743f374a20457346ef26741ed441"}, + {file = "xattr-0.9.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a7beeb54ca140273b2f6320bb98b701ec30628af2ebe4eb30f7051419eb4ef3"}, + {file = "xattr-0.9.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef3ca29cdaae9c47c625d84bb6c9046f7275cccde0ea805caa23ca58d3671f3f"}, + {file = "xattr-0.9.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c381d890931cd18b137ce3fb5c5f08b672c3c61e2e47b1a7442ee46e827abfe"}, + {file = "xattr-0.9.9-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:59c5783ccf57cf2700ce57d51a92134900ed26f6ab20d209f383fb898903fea6"}, + {file = "xattr-0.9.9-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:966b885b69d95362e2a12d39f84889cf857090e57263b5ac33409498aa00c160"}, + {file = "xattr-0.9.9-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efaaf0cb1ea8e9febb7baad301ae8cc9ad7a96fdfc5c6399d165e7a19e3e61ce"}, + {file = "xattr-0.9.9-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f19fa75ed1e9db86354efab29869cb2be6976d456bd7c89e67b118d5384a1d98"}, + {file = "xattr-0.9.9-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ca28ad06828244b315214ee35388f57e81e90aac2ceac3f32e42ae394e31b9c"}, + {file = "xattr-0.9.9-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:532c7f1656dd2fe937116b9e210229f716d7fc7ac142f9cdace7da92266d32e8"}, + {file = "xattr-0.9.9-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11c28033c17e98c67e0def9d6ebd415ad3c006a7bc3fee6bad79c5e52d0dff49"}, + {file = "xattr-0.9.9-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:473cabb30e544ea08c8c01c1ef18053147cdc8552d443ac97815e46fbb13c7d4"}, + {file = "xattr-0.9.9-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:c4a308522b444d090fbd66a385c9519b6b977818226921b0d2fc403667c93564"}, + {file = "xattr-0.9.9-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:82493434488aca72d88b5129dac8f212e7b8bdca7ceffe7bb977c850f2452e4e"}, + {file = "xattr-0.9.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e41d289706c7e8940f4d08e865da6a8ae988123e40a44f9a97ddc09e67795d7d"}, + {file = "xattr-0.9.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef08698e360cf43688dca3db3421b156b29948a714d5d089348073f463c11646"}, + {file = "xattr-0.9.9-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4eb10ac16ca8d534c0395425d52121e0c1981f808e1b3f577f6a5ec33d3853e4"}, + {file = "xattr-0.9.9-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5605fec07b0e964bd980cc70ec335b9eb1b7ac7c6f314c7c2d8f54b09104fe4c"}, + {file = "xattr-0.9.9-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:974e7d577ddb15e4552fb0ec10a4cfe09bdf6267365aa2b8394bb04637785aad"}, + {file = "xattr-0.9.9-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ad6777de922c638bfa87a0d7faebc5722ddef04a1210b2a8909289b58b769af0"}, + {file = "xattr-0.9.9-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3887e70873ebf0efbde32f9929ec1c7e45ec0013561743e2cc0406a91e51113b"}, + {file = "xattr-0.9.9-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:83caa8e93a45a0f25f91b92d9b45f490c87bff74f02555df6312efeba0dacc31"}, + {file = "xattr-0.9.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e33ec0a1d913d946d1ab7509f37ee37306c45af735347f13b963df34ffe6e029"}, + {file = "xattr-0.9.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:263c58dca83372260c5c195e0b59959e38e1f107f0b7350de82e3db38479036c"}, + {file = "xattr-0.9.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:125dfb9905428162349d3b8b825d9a18280893f0cb0db2a2467d5ef253fa6ce2"}, + {file = "xattr-0.9.9-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e243524e0dde16d7a2e1b52512ad2c6964df2143dd1c79b820dcb4c6c0822c20"}, + {file = "xattr-0.9.9-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01ec07d24a14406bdc6a123041c63a88e1c4a3f820e4a7d30f7609d57311b499"}, + {file = "xattr-0.9.9-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:85c1df5f1d209345ea96de137419e886a27bb55076b3ae01faacf35aafcf3a61"}, + {file = "xattr-0.9.9-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ca74d3eff92d6dc16e271fbad9cbab547fb9a0c983189c4031c3ff3d150dd871"}, + {file = "xattr-0.9.9-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7d17505e49ac70c0e71939c5aac96417a863583fb30a2d6304d5ac881230548f"}, + {file = "xattr-0.9.9-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1ae47a6398d3c04623fa386a4aa2f66e5cd3cdb1a7e69d1bfaeb8c73983bf271"}, + {file = "xattr-0.9.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:809e2537d0aff9fca97dacf3245cbbaf711bbced5d1b0235a8d1906b04e26114"}, + {file = "xattr-0.9.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:de3af84364f06d67b3662ccf7c1a73e1d389d8d274394e952651e7bf1bbd2718"}, + {file = "xattr-0.9.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b62cdad232d2d2dedd39b543701db8e3883444ec0d57ce3fab8f75e5f8b0301"}, + {file = "xattr-0.9.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6b11d2eda397d47f7075743409683c233519ca52aa1dac109b413a4d8c15b740"}, + {file = "xattr-0.9.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:661c0a939aefdf071887121f534bb10588d69c7b2dfca5c486af2fc81a0786e8"}, + {file = "xattr-0.9.9-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5db7c2db320a8d5264d437d71f1eb7270a7e4a6545296e7766161d17752590b7"}, + {file = "xattr-0.9.9-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:83203e60cbaca9536d297e5039b285a600ff84e6e9e8536fe2d521825eeeb437"}, + {file = "xattr-0.9.9-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:42bfb4e4da06477e739770ac6942edbdc71e9fc3b497b67db5fba712fa8109c2"}, + {file = "xattr-0.9.9-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:67047d04d1c56ad4f0f5886085e91b0077238ab3faaec6492c3c21920c6566eb"}, + {file = "xattr-0.9.9-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:885782bc82ded1a3f684d54a1af259ae9fcc347fa54b5a05b8aad82b8a42044c"}, + {file = "xattr-0.9.9-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bc84ccec618b5aa089e7cee8b07fcc92d4069aac4053da604c8143a0d6b1381"}, + {file = "xattr-0.9.9-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baeff3e5dda8ea7e9424cfaee51829f46afe3836c30d02f343f9049c685681ca"}, + {file = "xattr-0.9.9.tar.gz", hash = "sha256:09cb7e1efb3aa1b4991d6be4eb25b73dc518b4fe894f0915f5b0dcede972f346"}, +] yapf = [ {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, ] zipp = [ - {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, - {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, + {file = "zipp-3.10.0-py3-none-any.whl", hash = "sha256:4fcb6f278987a6605757302a6e40e896257570d11c51628968ccb2a47e80c6c1"}, + {file = "zipp-3.10.0.tar.gz", hash = "sha256:7a7262fd930bd3e36c50b9a64897aec3fafff3dfdeec9623ae22b40e93f99bb8"}, ] diff --git a/test_apps/python_app/pyproject.toml b/test_apps/python_app/pyproject.toml index 3630595b..688d6e26 100644 --- a/test_apps/python_app/pyproject.toml +++ b/test_apps/python_app/pyproject.toml @@ -8,6 +8,7 @@ authors = ["Origen-SDK"] python = ">=3.7,<3.11" origen = "= 2.0.0.dev5" python_plugin = { path = "../python_plugin", develop = true } +test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true } [tool.poetry.dev-dependencies] pytest = "^6.0" diff --git a/test_apps/python_app/tests/_shared/for_proc.py b/test_apps/python_app/tests/_shared/for_proc.py index 54091fc1..a04c76d9 100644 --- a/test_apps/python_app/tests/_shared/for_proc.py +++ b/test_apps/python_app/tests/_shared/for_proc.py @@ -3,10 +3,18 @@ def setenv(config_root, config_name=None, bypass_config_lookup=None, cd=None): if bypass_config_lookup: os.environ['origen_bypass_config_lookup'] = "1" if config_root is not None: - if config_name is None: - config_name = inspect.stack()[1].function - os.environ['origen_config_paths'] = str( - config_root.joinpath(f"{config_name}.toml").absolute()) + if isinstance(config_root, list): + os.environ['origen_config_paths'] = ";".join([str(c) for c in config_root]) + else: + if config_name is None: + config_name = inspect.stack()[1].function + if config_name: + os.environ['origen_config_paths'] = str(config_root.joinpath(f"{config_name}.toml").absolute()) + else: + if isinstance(config_root, pathlib.Path): + os.environ['origen_config_paths'] = str(config_root.absolute()) + else: + os.environ['origen_config_paths'] = config_root if cd: os.chdir(str(cd)) \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/cmd_testers.toml b/test_apps/python_app/tests/cli/cmd_testers.toml new file mode 100644 index 00000000..44296091 --- /dev/null +++ b/test_apps/python_app/tests/cli/cmd_testers.toml @@ -0,0 +1,242 @@ +help = "Commands to assisted in testing aux commands when no app is present" + +[[command]] +name = "python_no_app_tests" +help = "Test commands for python-no-app workspace" + +[[command]] +name = "test_current_command" +help = "Tests origen.current_command" + +[[command]] +name = "test_nested_level_1" +help = "Tests origen.current_command L1" + + [[command.subcommand]] + name = "test_nested_level_2" + help = "Tests origen.current_command L2" + + [[command.subcommand.subcommand]] + name = "test_nested_level_3_a" + help = "Tests origen.current_command L3a" + + [[command.subcommand.subcommand]] + name = "test_nested_level_3_b" + help = "Tests origen.current_command L3b" + +[[command]] +name = "test_arguments" +help = "Test various argument schemes from commands" + + # Very simple subcommands that only support a small piece of the options at a time + [[command.subcommand]] + name = "single_value_optional_arg" + help = "Command taking optional, single arguments" + + # Default setting for an arg is not required + [[command.subcommand.arg]] + name = "implicit_single_val" + takes_value = true + help = "Implicit non-required single value" + + [[command.subcommand.arg]] + name = "explicit_single_val" + takes_value = true + required = false + help = "Explicit non-required single value" + + [[command.subcommand]] + name = "single_value_required_arg" + help = "Command with single-value optional and required arguments" + + # Default setting is arg is not required + [[command.subcommand.arg]] + name = "non_req_val" + takes_value = true + help = "Non-required single value" + + [[command.subcommand.arg]] + name = "req_val" + takes_value = true + required = true + help = "Required single value" + + [[command.subcommand]] + name = "multi_val_args" + help = "Command with multi-value optional and required arguments" + + [[command.subcommand.arg]] + name = "m_arg" + takes_value = true + multiple = true + help = "Arg with multiple values" + + # Takes value should be implied with multiple + [[command.subcommand.arg]] + name = "im_m_arg" + multiple = true + help = "Arg accepting multiple values were 'takes value' is implied" + + [[command.subcommand.arg]] + name = "req_m_arg" + multiple = true + required = true + help = "Required arg accepting multiple values" + + [[command.subcommand.arg]] + name = "d_m_arg" + multiple = true + use_delimiter = true + help = "Delimited multi arg" + + [[command.subcommand.arg]] + name = "d_im_m_arg" + use_delimiter = true + help = "Delimited arg where 'multi' and 'takes value' is implied" + + [[command.subcommand]] + name = "flag_args" + help = "Command with flag-style arguments only" + + [[command.subcommand.arg]] + name = "im_f_arg" + help = "Stackable flag arg with 'takes value=false' implied" + + [[command.subcommand.arg]] + name = "ex_f_arg" + takes_value = false + help = "Stackable flag arg with 'takes value=false' set" + + [[command.subcommand]] + name = "args_with_explicit_value_name" + help = "Command with single/multi-args with custom value names" + + [[command.subcommand.arg]] + name = "s_arg_nv_im_tv" + value_name = "s_val_impl" + help = "Single arg with value name, implying 'takes_value'=true" + + [[command.subcommand.arg]] + name = "s_arg_nv_ex_tv" + value_name = "s_val_expl" + takes_value = true + help = "Single arg with value name and explicit 'takes_value'=true" + + [[command.subcommand.arg]] + name = "m_arg_named_val" + value_name = "m_val" + multiple = true + help = "Multi-arg with value name" + + [[command.subcommand.arg]] + name = "s_arg_ln_nv" + value_name = "ln_nv" + help = "Single arg with long name and value name" + + [[command.subcommand]] + name = "arg_with_aliases" + help = "Command with argument aliasing, custom long, and short names" + + [[command.subcommand.arg]] + name = "single_arg" + takes_value = true + long = "s_arg" + short = "s" + help = "Single arg with long/short name" + + [[command.subcommand.arg]] + name = "multi_arg" + takes_value = true + multiple = true + long = "m_arg" + short = "m" + help = "Multi-arg with long/short name" + + [[command.subcommand.arg]] + name = "occurrence_counter" + long = "cnt" + short = "o" + help = "Flag arg with long/short name" + + [[command.subcommand.arg]] + name = "flag_arg_short_name" + short = "f" + help = "Flag arg with short name only" + + [[command.subcommand.arg]] + name = "flag_arg_long_name" + long = "ln_f_arg" + help = "Flag arg with long name only" + + [[command.subcommand.arg]] + name = "flag_arg_dupl_ln_sn" + long = "f" + help = "Flag arg with ln matching another's sn" + + [[command.subcommand.arg]] + name = "fa_sn_aliases" + short_aliases = ['a', 'b'] + help = "Flag arg with short aliases" + + [[command.subcommand.arg]] + name = "fa_sn_and_aliases" + short = "c" + short_aliases = ['d', 'e'] + help = "Flag arg with short name and short aliases" + + [[command.subcommand.arg]] + name = "fa_ln_aliases" + long_aliases = ['fa', 'fb'] + help = "Flag arg with long aliases" + + [[command.subcommand.arg]] + name = "fa_ln_and_aliases" + long = "fc" + long_aliases = ['fd', 'fe'] + help = "Flag arg with long name and long aliases" + + [[command.subcommand.arg]] + name = "fa_sn_ln_aliases" + long_aliases = ['sn_ln_1', 'sn_ln_2'] + short_aliases = ['z'] + help = "Flag arg with long and short aliases" + + [[command.subcommand]] + name = "hidden_arg" + help = "Command with a hidden arg" + + [[command.subcommand.arg]] + name = "non_hidden_arg" + hidden = false + takes_value = true + help = "Non-hidden arg" + + [[command.subcommand.arg]] + name = "hidden_arg" + hidden = true + takes_value = true + help = "Hidden arg" + +[[command]] +name = "error_cases" +help = "Commands to test error messages and improper command configuration" + + [[command.subcommand]] + name = "missing_impl_dir" + help = "Parent to test missing implementation directory" + + [[command.subcommand.subcommand]] + name = "missing_impl_dir_subc" + help = "Generate error for missing implementation directory" + + [[command.subcommand]] + name = "missing_impl_file" + help = "Generate error for implementation module file" + + [[command.subcommand]] + name = "test_missing_run_function" + help = "Generate error for a missing run function" + + [[command.subcommand]] + name = "test_exception_in_run" + help = "Generate error for an exception during execution" diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 5e445bdd..de05bb5d 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -1,34 +1,11 @@ -# see the following docs -# https://docs.python.org/3/library/subprocess.html#subprocess.Popen -# https://docs.python.org/3/library/subprocess.html#subprocess.call -# https://docs.python.org/3/library/subprocess.html#subprocess.run - -# Makes a lot of sense to run tests that require a Python workspace here -# rather than as Rust cli tests (Rust tests would need to ensure a working app -# is available before running). -# -# Global commands could go here if the working dir is changed first. -# Otherwise Rust cli tests can be used. See the rust/origen/cli/test directory -# -# an interactive command test write to stdin like this: -# process = subprocess.Popen(['origen', '-v']), -# stdin=subprocess.PIPE, -# stdout=subprocess.PIPE, -# stderr=subprocess.PIPE, -# universal_newlines=True, -# bufsize=0) -# process.stdin.write("yes\n") -# process.stdin.close() -# read output, etc - import pytest, pathlib import subprocess import os import origen +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg origen_cli = os.getenv('TRAVIS_ORIGEN_CLI') or 'origen' - def test_origen_v(): #import pdb; pdb.set_trace() process = subprocess.Popen([f'{origen_cli}', '-v'], @@ -48,7 +25,7 @@ def test_bad_command(): process = subprocess.Popen([f'{origen_cli}', 'thisisnotacommand'], stderr=subprocess.PIPE, universal_newlines=True) - assert process.wait() == 1 + assert process.wait() == 2 assert "error:" in process.stderr.readline() @@ -82,7 +59,8 @@ def test_origen_v(self): out = r.stdout.decode("utf-8").strip() err = r.stderr.decode("utf-8").strip() p = pathlib.Path("tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml") - assert "Couldn't boot app to determine the in-application Origen version" in out + # TODO should this kill the process? + # assert "Couldn't boot app to determine the in-application Origen version" in out assert f"invalid type: string \"hi\", expected an integer for key `ldaps.bad.timeout` in {str(p)}" in out assert err == "" @@ -113,6 +91,167 @@ def test_bad_config_path(self): assert r.returncode == 1 out = r.stdout.decode("utf-8").strip() err = r.stderr.decode("utf-8").strip() - assert "Couldn't boot app to determine the in-application Origen version" in out + # TODO should this kill the process? + # assert "Couldn't boot app to determine the in-application Origen version" in out assert "missing.toml either does not exists or is not accessible" in out assert err == "" + +class TestAppWorkspaceCoreCommands(CLIShared): + @classmethod + @property + def cmd_shortcuts__app(cls): + return { + 'arg_opt_warmup': 'arg_opt_warmup', + "examples": "examples", + "playground": "playground", + "y": "playground", + } + + def test_app_workspace_help_message(self): + help = self.in_app_cmds.origen.get_help_msg() + assert help.root_cmd is True + assert "Origen CLI: 2." in help.version_str + + assert len(help.opts) == 3 + help.assert_help_opt_at(0) + help.assert_vk_opt_at(1) + help.assert_v_opt_at(2) + + assert set(help.subcmd_names) == set(self.in_app_cmds.all_names_add_help) + print(help.app_cmd_shortcuts) + assert help.app_cmd_shortcuts == self.cmd_shortcuts__app + # TODO plugin commands + # assert help.pl_cmd_shortcuts == self.cmd_shortcuts__default_plugins + # TODO Aux commands + # assert help.pl_cmd_shortcuts == { + # "plugin_says_hi": ("python_plugin", "plugin_says_hi"), + # "echo": ("python_plugin", "echo"), + # } + + @pytest.mark.parametrize("cmd", CLIShared.in_app_cmds.cmds, ids=CLIShared.in_app_cmds.all_names) + def test_core_commands_are_available(self, cmd): + ''' Just testing that "-h" doesn't crash for all core commands ''' + help = cmd.get_help_msg() + assert len(help.opts) >= 3 + +class TestAppCommandBuilding(CLIShared): + warmup_cmd = CLIShared.app_sub_cmd( + "arg_opt_warmup", + help = "Gross test command demonstrating args/opts from app commands", + args=[ + CmdArg("first", help="First Argument - Required", required=True), + CmdArg("second", help="Second Multi-Argument - Not Required", use_delimiter=True, multi=True), + ], + opts=[ + CmdOpt("flag_opt", sn="f", help="Flag opt"), + CmdOpt("single_opt", sn_aliases=["s"], takes_value=True, help="Single-value non-required opt"), + CmdOpt("multi_opt", sn_aliases=["m"], ln_aliases=["m_opt"], multi=True, help="Multi-value non-required opt"), + CmdOpt("hidden_flag_opt", hidden=True, ln="hidden", help="Hidden flag opt"), + ] + ) + + def test_app_command_args_and_opts(self): + cmd = self.warmup_cmd + help = cmd.get_help_msg() + help.assert_num_args(cmd.num_args) + help.assert_num_opts(cmd.num_opts) + help.assert_arg_at(0, cmd.first) + help.assert_arg_at(1, cmd.second) + + help.assert_opt_at(0, cmd.flag_opt) + help.assert_help_opt_at(1) + help.assert_vk_opt_at(2) + help.assert_opt_at(3, cmd.multi_opt) + help.assert_opt_at(4, cmd.single_opt) + help.assert_v_opt_at(5) + + rv = "req_arg" + m0 = "m0" + m12 = "m1,m2" + mo0 = "mo0" + mo12 = "m01,m02" + mo4 = "mo4" + sv = "s_opt" + + out = cmd.run( + rv, + m0, m12, + "-f", + "-s", sv, + "-m", mo0, mo12, + "--m_opt", mo4, + "--hidden" + ) + assert cmd.first.to_assert_str(rv) in out + assert cmd.second.to_assert_str([m0, m12]) in out + assert cmd.flag_opt.to_assert_str(1) in out + assert cmd.single_opt.to_assert_str(sv) in out + assert cmd.multi_opt.to_assert_str([mo0, mo12, mo4]) in out + assert cmd.hidden_flag_opt.to_assert_str(1) in out + assert cmd.parse_arg_keys(out) == [ + cmd.first.name, + cmd.second.name, + cmd.flag_opt.name, + cmd.single_opt.name, + cmd.multi_opt.name, + cmd.hidden_flag_opt.name, + ] + + out = cmd.run( + rv, + "-f", "-f", + "-m", mo0, mo12, + ) + assert cmd.first.to_assert_str(rv) in out + assert cmd.flag_opt.to_assert_str(2) in out + assert cmd.multi_opt.to_assert_str([mo0, mo12]) in out + assert cmd.parse_arg_keys(out) == [ + cmd.first.name, + cmd.flag_opt.name, + cmd.multi_opt.name, + ] + + out = cmd.gen_error() + assert self.err_msgs.missing_required_arg(cmd.first) in out + +class TestErrorCases(CLIShared): + @pytest.mark.skip + def test_invalid_cmd_toml(self): + # FOR_PR need to make app specific + out = self.in_app_cmds.origen.run(with_env={"ORIGEN_APP_COMMANDS": "test_case_cmds/invalid.toml,test_case_cmds/error_cases.toml"}) # run_cli_cmd(["-h"]) #.split("\n\n") + print(out) + help = self.HelpMsg(out) + assert list(help.subcmds.keys()) == ["add_aux_cmd", "cmd_testers", "help", "python_no_app_aux_cmds"] + assert f"Unable to add auxillary commands at '{self.aux_cmd_configs_dir}{os.sep}./invalid_aux_cmd_path.toml' from config '{self.aux_cmd_configs_dir}{os.sep}invalid_aux_cmd_path_config.toml'. The following error was met" in out + + @pytest.mark.skip + def test_error_global_and_in_app_setting_used(self): + fail + +class TestPluginCommandsAreAdded: + ... + +class TestAuxCommandsAreAdded: + ... + +@pytest.mark.skip +class TestAppPluginAndAuxCommandClashing: + def test_app_cmd_overrides_pl_cmd(self): + fail + + def test_app_cmd_overrides_aux_cmd(self): + fail + + # def test_extending_app_cmds(self): + # fail + +@pytest.mark.skip +class TestExtendingFromAppCommands: + def test_extending_global_cmds(self): + fail + + def test_extending_plugin_cmds(self): + fail + + def test_extending_aux_cmds(self): + fail diff --git a/test_apps/python_app/tests/conftest.py b/test_apps/python_app/tests/conftest.py index d0b493c2..77e9f3e4 100644 --- a/test_apps/python_app/tests/conftest.py +++ b/test_apps/python_app/tests/conftest.py @@ -1,6 +1,8 @@ import os, pytest from ._shared import tmp_dir +pytest.register_assert_rewrite("origen.helpers.regressions") + # Move the session store into a local test directory os.environ['origen_session__user_root'] = str(tmp_dir()) os.environ['origen_app_app_session_root'] = str(tmp_dir()) diff --git a/test_apps/python_app/tests/origen_utilities/configs/ldap/__init__.py b/test_apps/python_app/tests/origen_utilities/configs/ldap/__init__.py index f053932e..80b964de 100644 --- a/test_apps/python_app/tests/origen_utilities/configs/ldap/__init__.py +++ b/test_apps/python_app/tests/origen_utilities/configs/ldap/__init__.py @@ -49,7 +49,7 @@ def test_multiple_ldaps(q, options): assert len(origen.ldaps) == 3 assert origen.ldaps["l1"].server == "ldap://ldap.duke.edu:389" assert origen.ldaps["l2"].server == "ldap://db.debian.org:389" - assert origen.ldaps["l3"].server == "ldap://zflexldap.com:389" + assert origen.ldaps["l3"].server == "ldap://ldap.jumpcloud.com:389" def test_bad_ldap_config(q, options): diff --git a/test_apps/python_app/tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml b/test_apps/python_app/tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml index 75460b0d..c2eb0773 100644 --- a/test_apps/python_app/tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml +++ b/test_apps/python_app/tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml @@ -1,5 +1,5 @@ [ldaps] [ldaps.bad] -server = "ldap://zflexldap.com:389" -base = "dc=zflexsoftware,dc=com" +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" timeout = "hi" diff --git a/test_apps/python_app/tests/origen_utilities/configs/ldap/test_fully_configured_ldap.toml b/test_apps/python_app/tests/origen_utilities/configs/ldap/test_fully_configured_ldap.toml index bd33bb14..36d159f7 100644 --- a/test_apps/python_app/tests/origen_utilities/configs/ldap/test_fully_configured_ldap.toml +++ b/test_apps/python_app/tests/origen_utilities/configs/ldap/test_fully_configured_ldap.toml @@ -1,7 +1,7 @@ [ldaps] [ldaps.full] -server = "ldap://zflexldap.com:389" -base = "dc=zflexsoftware,dc=com" +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" timeout = 45 continuous_bind = true [ldaps.full.auth] diff --git a/test_apps/python_app/tests/origen_utilities/configs/ldap/test_multiple_ldaps.toml b/test_apps/python_app/tests/origen_utilities/configs/ldap/test_multiple_ldaps.toml index 54ebcbaf..3a1333be 100644 --- a/test_apps/python_app/tests/origen_utilities/configs/ldap/test_multiple_ldaps.toml +++ b/test_apps/python_app/tests/origen_utilities/configs/ldap/test_multiple_ldaps.toml @@ -7,5 +7,5 @@ base = "dc=duke,dc=edu" server = "ldap://db.debian.org:389" base = "dc=debian,dc=org" [ldaps.l3] -server = "ldap://zflexldap.com:389" -base = "cn=ro_admin,ou=sysadmins,dc=zflexsoftware,dc=com" +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" diff --git a/test_apps/python_app/tests/origen_utilities/configs/ldap/test_simple_ldap.toml b/test_apps/python_app/tests/origen_utilities/configs/ldap/test_simple_ldap.toml index 730f6aac..7e551143 100644 --- a/test_apps/python_app/tests/origen_utilities/configs/ldap/test_simple_ldap.toml +++ b/test_apps/python_app/tests/origen_utilities/configs/ldap/test_simple_ldap.toml @@ -1,4 +1,4 @@ [ldaps] [ldaps.simple] -server = "ldap://zflexldap.com:389" -base = "dc=zflexsoftware,dc=com" +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" diff --git a/test_apps/python_app/tests/origen_utilities/configs/users/error_conditions/test_error_adding_default_users.toml b/test_apps/python_app/tests/origen_utilities/configs/users/error_conditions/test_error_adding_default_users.toml index 2b37842c..eb1318c6 100644 --- a/test_apps/python_app/tests/origen_utilities/configs/users/error_conditions/test_error_adding_default_users.toml +++ b/test_apps/python_app/tests/origen_utilities/configs/users/error_conditions/test_error_adding_default_users.toml @@ -18,11 +18,11 @@ initialize = false [ldaps] [ldaps.dummy_autopop] -server = "ldap://zflexldap.com:389" -base = "dc=zflexsoftware,dc=com" +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" [ldaps.dummy_autopop.auth] -username = "cn=ro_admin,ou=sysadmins,dc=zflexsoftware,dc=com" -password = "zflexpass" +username = "uid=sponge,ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" +password = "KrabbyPatties#1" [ldaps.dummy_autopop.populate_user_config] [ldaps.dummy_autopop.populate_user_config.mapping] full_name = "cn" diff --git a/test_apps/python_app/tests/origen_utilities/configs/users/test_autopopulated_user.toml b/test_apps/python_app/tests/origen_utilities/configs/users/test_autopopulated_user.toml index 7c7f80fd..b016a530 100644 --- a/test_apps/python_app/tests/origen_utilities/configs/users/test_autopopulated_user.toml +++ b/test_apps/python_app/tests/origen_utilities/configs/users/test_autopopulated_user.toml @@ -8,11 +8,11 @@ data_store = "dummy_autopop_ldap" [ldaps] [ldaps.dummy_autopop_ldap] -server = "ldap://zflexldap.com:389" -base = "dc=zflexsoftware,dc=com" +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" [ldaps.dummy_autopop_ldap.auth] -username = "cn=ro_admin,ou=sysadmins,dc=zflexsoftware,dc=com" -password = "zflexpass" +username = "uid=sponge,ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" +password = "KrabbyPatties#1" [ldaps.dummy_autopop_ldap.populate_user_config] [ldaps.dummy_autopop_ldap.populate_user_config.mapping] email = "mail" diff --git a/test_apps/python_app/tests/origen_utilities/configs/users/test_loading_default_users.toml b/test_apps/python_app/tests/origen_utilities/configs/users/test_loading_default_users.toml index 66bcdbef..7dc5917f 100644 --- a/test_apps/python_app/tests/origen_utilities/configs/users/test_loading_default_users.toml +++ b/test_apps/python_app/tests/origen_utilities/configs/users/test_loading_default_users.toml @@ -11,11 +11,11 @@ initialize = false [ldaps] [ldaps.dummy_autopop] -server = "ldap://zflexldap.com:389" -base = "dc=zflexsoftware,dc=com" +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" [ldaps.dummy_autopop.auth] -username = "cn=ro_admin,ou=sysadmins,dc=zflexsoftware,dc=com" -password = "zflexpass" +username = "uid=sponge,ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" +password = "KrabbyPatties#1" [ldaps.dummy_autopop.populate_user_config] [ldaps.dummy_autopop.populate_user_config.mapping] email = "mail" @@ -35,10 +35,10 @@ last_name = "USER" # full_name = "TEST FULL USER" auto_populate = false should_validate_passwords = false -[default_users.guest1] +[default_users.p-star] auto_populate = true should_validate_passwords = false -[default_users.guest2] +[default_users.squidy] auto_populate = true should_validate_passwords = false email = "guest2@origen.org" diff --git a/test_apps/python_app/tests/origen_utilities/test_users.py b/test_apps/python_app/tests/origen_utilities/test_users.py index c943eed1..bce2b89c 100644 --- a/test_apps/python_app/tests/origen_utilities/test_users.py +++ b/test_apps/python_app/tests/origen_utilities/test_users.py @@ -82,7 +82,7 @@ def test_loading_default_users(self): ldap_u2 = ldap_config.users[1] retn = in_new_origen_proc(mod=user_configs) - assert retn["user_ids"] == {"basic", "full user", "guest1", "guest2"} + assert retn["user_ids"] == {"basic", "full user", "squidy", "p-star"} u = retn["basic"] assert u["dataset_names"] == {'autopop_ldap', 'other'} assert u["username"] == "basic" diff --git a/test_apps/python_app/tests/shared/__init__.py b/test_apps/python_app/tests/shared/__init__.py index adb980c9..a1dbbf33 100644 --- a/test_apps/python_app/tests/shared/__init__.py +++ b/test_apps/python_app/tests/shared/__init__.py @@ -1,4 +1,4 @@ -import pytest, pathlib, inspect, os, sys +import pytest, pathlib, inspect import multiprocessing as mp import origen, _origen # pylint: disable=import-error import tests._shared @@ -97,14 +97,5 @@ def in_new_origen_proc(func=None, mod=None, options=None, expect_fail=False): return results -def setenv(q, bypass_config_lookup=None): - import os, inspect, pathlib, sys - if bypass_config_lookup: - os.environ['origen_bypass_config_lookup'] = "1" - os.environ['origen_config_paths'] = str( - pathlib.Path(__file__).parent.joinpath( - f"{inspect.stack()[1].function}.toml").absolute()) - - def instantiate_dut(name): origen.target.load(lambda: origen.app.instantiate_dut(name)) diff --git a/test_apps/python_no_app/commands.toml b/test_apps/python_no_app/commands.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_no_app/origen.toml b/test_apps/python_no_app/origen.toml new file mode 100644 index 00000000..b156ba8b --- /dev/null +++ b/test_apps/python_no_app/origen.toml @@ -0,0 +1,91 @@ +# Use this to define your application-specific Origen configuration +# Do not delete it even if you don't use it since it is also used by the Origen +# command line interface to determine when it is in an Origen application workspace + +# Specify what command should be used to invoke python, if not specified +# Origen will try python, python3, python3.8, etc. until one is found that +# satisfies the minimum Python version requirement +#python_cmd = "mypython" + +# If your company has an internal package server enter it here: +#pkg_server = "https://pkgs.company.net:9292" +# or here, if you need to use different urls for push and pull (write and read): +#pkg_server_push = "https://pkgs.company.net:9292" +#pkg_server_pull = "https://pkgs.company.net:9292" + +session__user_root = "./" + +### Users Setup ### +# Various items to customize user data +# +# If any datasets are available, selects which is the default +user__data_lookup_hierarchy = ["test", "backup"] +user__password_cache_option = "session" +# Allows passwords to be stored in the user's session store +# +# User datasets allow for single user to be "registered" in multiple systems +[user__datasets] +[user__datasets.test] +[user__datasets.test2] +[user__datasets.backup] +[user__datasets.dummy_ldap_ds] +category = "ldaps" +data_store = "dummy_ldap" # Corresponds to LDAP name +data_id = "uid" +data_service_user = "dummy_ldap_read_only" +should_validate_password = true +auto_populate = false +[user__datasets.git] +data_store = "git" +auto_populate = false + +# When a password is requested for the given reason, will select the appropriate dataset +[user__dataset_motives] +"rc" = "git" +"just because" = "test2" + +[user__dataset_mappings] +[user__dataset_mappings.dummy_ldap_ds] +email = "mail" +last_name = "sn" +uid = "uid" +full_name = "cn" + +# LDAP configuration +[ldaps] +[ldaps.dummy_ldap] +server = "ldap://ldap.jumpcloud.com:389" +base = "ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" +[ldaps.dummy_ldap.auth] +scheme = "simple_bind" +username = "uid=sponge,ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" +password = "KrabbyPatties#1" + +# Service/functional accounts +[default_users] +[default_users.dummy_ldap_read_only] +username = "uid=sponge,ou=Users,o=63a333b92aef93fc947e34f7,dc=jumpcloud,dc=com" +password = "KrabbyPatties#1" + +[mailer] +server = "smtp.origen.org" +port = 25 +auth_method = "None" +domain = "origen.org" +user = "dummy_ldap_read_only" +timeout = 120 + +[plugins] +collect = false +load = [ + { name = "python_plugin" }, + { name = "python_plugin_the_second" }, + { name = "python_plugin_no_cmds" }, +] + +[[auxillary_commands]] + path = "./tests/cmd_building/cmd_testers" + +[[auxillary_commands]] + name = "python_no_app_aux_cmds" + path = "./tests/dummy_aux_cmds/dummy_aux_cmds.toml" diff --git a/test_apps/python_no_app/poetry.lock b/test_apps/python_no_app/poetry.lock index edb89088..8751e512 100644 --- a/test_apps/python_no_app/poetry.lock +++ b/test_apps/python_no_app/poetry.lock @@ -1,59 +1,51 @@ [[package]] -category = "main" -description = "A configurable sidebar-enabled Sphinx theme" name = "alabaster" -optional = false -python-versions = "*" version = "0.7.12" - -[[package]] +description = "A configurable sidebar-enabled Sphinx theme" category = "main" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -name = "appdirs" optional = false python-versions = "*" -version = "1.4.4" [[package]] -category = "main" -description = "Atomic file writes." name = "atomicwrites" +version = "1.4.1" +description = "Atomic file writes." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.4.0" [[package]] -category = "main" -description = "Classes Without Boilerplate" name = "attrs" +version = "22.1.0" +description = "Classes Without Boilerplate" +category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "21.2.0" +python-versions = ">=3.5" [package.extras] -dev = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] -tests_no_zope = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] [[package]] -category = "main" -description = "Internationalization utilities" name = "babel" +version = "2.10.3" +description = "Internationalization utilities" +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.9.1" +python-versions = ">=3.6" [package.dependencies] pytz = ">=2015.7" [[package]] -category = "main" -description = "Screen-scraping library" name = "beautifulsoup4" +version = "4.8.2" +description = "Screen-scraping library" +category = "main" optional = false python-versions = "*" -version = "4.8.2" [package.dependencies] soupsieve = ">=1.2" @@ -63,183 +55,181 @@ html5lib = ["html5lib"] lxml = ["lxml"] [[package]] -category = "main" -description = "Dummy package for Beautiful Soup" name = "bs4" +version = "0.0.1" +description = "Dummy package for Beautiful Soup" +category = "main" optional = false python-versions = "*" -version = "0.0.1" [package.dependencies] beautifulsoup4 = "*" [[package]] -category = "main" -description = "httplib2 caching for requests" name = "cachecontrol" +version = "0.12.11" +description = "httplib2 caching for requests" +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.12.6" +python-versions = ">=3.6" [package.dependencies] +lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} msgpack = ">=0.5.2" requests = "*" -[package.dependencies.lockfile] -optional = true -version = ">=0.9" - [package.extras] filecache = ["lockfile (>=0.9)"] redis = ["redis (>=2.10.5)"] [[package]] -category = "main" -description = "Cachy provides a simple yet effective caching library." name = "cachy" +version = "0.3.0" +description = "Cachy provides a simple yet effective caching library." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.3.0" [package.extras] +redis = ["redis (>=3.3.6,<4.0.0)"] memcached = ["python-memcached (>=1.59,<2.0)"] msgpack = ["msgpack-python (>=0.5,<0.6)"] -redis = ["redis (>=3.3.6,<4.0.0)"] [[package]] -category = "main" -description = "Python package for providing Mozilla's CA Bundle." name = "certifi" +version = "2022.6.15" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" optional = false -python-versions = "*" -version = "2020.12.5" +python-versions = ">=3.6" [[package]] -category = "main" -description = "Foreign Function Interface for Python calling C code." -marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform == \"linux\"" name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "main" optional = false python-versions = "*" -version = "1.14.5" [package.dependencies] pycparser = "*" [[package]] +name = "charset-normalizer" +version = "2.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" -description = "Universal encoding detector for Python 2 and 3" -name = "chardet" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "4.0.0" +python-versions = ">=3.6.0" + +[package.extras] +unicode_backport = ["unicodedata2"] [[package]] -category = "main" -description = "Cleo allows you to create beautiful and testable command-line interfaces." name = "cleo" +version = "0.8.1" +description = "Cleo allows you to create beautiful and testable command-line interfaces." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.8.1" [package.dependencies] clikit = ">=0.6.0,<0.7.0" [[package]] -category = "main" -description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." name = "clikit" +version = "0.6.2" +description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.6.2" [package.dependencies] +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} pastel = ">=0.2.0,<0.3.0" pylev = ">=1.3,<2.0" -[package.dependencies.crashtest] -python = ">=3.6,<4.0" -version = ">=0.3.0,<0.4.0" - [[package]] -category = "main" -description = "Cross-platform colored terminal text." name = "colorama" +version = "0.4.5" +description = "Cross-platform colored terminal text." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.4.4" [[package]] -category = "main" -description = "Python parser for the CommonMark Markdown spec" name = "commonmark" +version = "0.9.1" +description = "Python parser for the CommonMark Markdown spec" +category = "main" optional = false python-versions = "*" -version = "0.9.1" [package.extras] -test = ["flake8 (3.7.8)", "hypothesis (3.55.3)"] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] -category = "main" -description = "Manage Python errors with ease" -marker = "python_version >= \"3.6\" and python_version < \"4.0\"" name = "crashtest" +version = "0.3.1" +description = "Manage Python errors with ease" +category = "main" optional = false python-versions = ">=3.6,<4.0" -version = "0.3.1" [[package]] -category = "main" -description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform == \"linux\"" name = "cryptography" +version = "37.0.4" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "main" optional = false python-versions = ">=3.6" -version = "3.4.7" [package.dependencies] cffi = ">=1.12" [package.extras] -docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"] -docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] +docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] -sdist = ["setuptools-rust (>=0.11.4)"] +sdist = ["setuptools_rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] +test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] -category = "main" -description = "Distribution utilities" name = "distlib" +version = "0.3.5" +description = "Distribution utilities" +category = "main" optional = false python-versions = "*" -version = "0.3.1" [[package]] -category = "main" -description = "Docutils -- Python Documentation Utilities" name = "docutils" +version = "0.19" +description = "Docutils -- Python Documentation Utilities" +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.17.1" +python-versions = ">=3.7" [[package]] -category = "main" -description = "A platform independent file lock." name = "filelock" +version = "3.8.0" +description = "A platform independent file lock." +category = "main" optional = false -python-versions = "*" -version = "3.0.12" +python-versions = ">=3.7" + +[package.extras] +testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] +docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] [[package]] -category = "main" -description = "HTML parser based on the WHATWG HTML specification" name = "html5lib" +version = "1.1" +description = "HTML parser based on the WHATWG HTML specification" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "1.1" [package.dependencies] six = ">=1.9" @@ -252,29 +242,28 @@ genshi = ["genshi"] lxml = ["lxml"] [[package]] -category = "main" -description = "Internationalized Domain Names in Applications (IDNA)" name = "idna" +version = "3.3" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.10" +python-versions = ">=3.5" [[package]] -category = "main" -description = "Getting image size from png/jpeg/jpeg2000/gif file" name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.2.0" [[package]] -category = "main" -description = "Read metadata from Python packages" -marker = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\" or python_version < \"3.8\" or python_version >= \"3.6\" and python_version < \"3.8\"" name = "importlib-metadata" +version = "1.7.0" +description = "Read metadata from Python packages" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "1.7.0" [package.dependencies] zipp = ">=0.5" @@ -284,147 +273,111 @@ docs = ["sphinx", "rst.linker"] testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] [[package]] -category = "main" -description = "Read resources from Python packages" -marker = "python_version < \"3.7\"" -name = "importlib-resources" +name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "dev" optional = false -python-versions = ">=3.6" -version = "5.1.3" - -[package.dependencies] -[package.dependencies.zipp] -python = "<3.8" -version = ">=0.4" - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] +python-versions = "*" [[package]] -category = "main" -description = "Low-level, pure Python DBus protocol wrapper." -marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform == \"linux\"" name = "jeepney" +version = "0.8.0" +description = "Low-level, pure Python DBus protocol wrapper." +category = "main" optional = false -python-versions = ">=3.6" -version = "0.6.0" +python-versions = ">=3.7" [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio", "testpath", "trio"] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] +trio = ["trio", "async-generator"] [[package]] -category = "main" -description = "A very fast and expressive template engine." name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.11.3" +python-versions = ">=3.7" [package.dependencies] -MarkupSafe = ">=0.23" +MarkupSafe = ">=2.0" [package.extras] -i18n = ["Babel (>=0.8)"] +i18n = ["Babel (>=2.7)"] [[package]] -category = "main" -description = "Store and access your passwords safely." -marker = "python_version >= \"3.6\" and python_version < \"4.0\"" name = "keyring" +version = "22.3.0" +description = "Store and access your passwords safely." +category = "main" optional = false python-versions = ">=3.6" -version = "21.8.0" [package.dependencies] -SecretStorage = ">=3.2" -jeepney = ">=0.4.2" -pywin32-ctypes = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1" - -[package.dependencies.importlib-metadata] -python = "<3.8" -version = ">=1" +importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] -category = "main" -description = "Platform-independent file locking module" name = "lockfile" -optional = false -python-versions = "*" version = "0.12.2" - -[[package]] +description = "Platform-independent file locking module" category = "main" -description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." -name = "lxml" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" -version = "4.4.2" - -[package.extras] -cssselect = ["cssselect (>=0.7)"] -html5 = ["html5lib"] -htmlsoup = ["beautifulsoup4"] -source = ["Cython (>=0.29.7)"] +python-versions = "*" [[package]] -category = "main" -description = "A super-fast templating language that borrows the best ideas from the existing templating languages." name = "mako" +version = "1.1.0" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.1.0" [package.dependencies] MarkupSafe = ">=0.9.2" [[package]] -category = "main" -description = "Safely add untrusted strings to HTML/XML markup." name = "markupsafe" -optional = false -python-versions = ">=3.6" -version = "2.0.1" - -[[package]] +version = "2.1.1" +description = "Safely add untrusted strings to HTML/XML markup." category = "main" -description = "More routines for operating on iterables, beyond itertools" -name = "more-itertools" optional = false -python-versions = ">=3.5" -version = "8.7.0" +python-versions = ">=3.7" [[package]] -category = "main" -description = "MessagePack (de)serializer." name = "msgpack" +version = "1.0.4" +description = "MessagePack serializer" +category = "main" optional = false python-versions = "*" -version = "1.0.2" [[package]] -category = "main" -description = "" -develop = true name = "origen" +version = "2.0.0.dev5" +description = "Semiconductor Developer's Kit" +category = "main" optional = false -python-versions = "^3.6" -version = "2.0.0.dev4" +python-versions = ">=3.7,<3.11" +develop = true [package.dependencies] -Jinja2 = "^2" beautifulsoup4 = "4.8.2" bs4 = "0.0.1" colorama = "^0.4" -lxml = "4.4.2" +importlib-metadata = ">= 1.7.0" +Jinja2 = "^3" mako = "1.1.0" origen_autoapi = "2.0.1" -poetry = "1.1.2" -pyreadline = "^2.1" +origen_metal = "= 0.4.0" +poetry = "^1.1.14" recommonmark = ">= 0" sphinx = "3.0.2" sphinxbootstrap4theme = ">= 0" @@ -432,230 +385,265 @@ termcolor = ">= 1.1.0" yapf = "0.30" [package.source] -reference = "" type = "directory" -url = "../../python" +url = "../../python/origen" [[package]] -category = "main" -description = "Automatic API reference documentation generation for Sphinx inspired by Doxygen, with changes for the Origen project." name = "origen-autoapi" +version = "2.0.1" +description = "Automatic API reference documentation generation for Sphinx inspired by Doxygen, with changes for the Origen project." +category = "main" optional = false python-versions = "*" -version = "2.0.1" [package.dependencies] sphinx = "*" [[package]] +name = "origen-metal" +version = "0.4.0" +description = "Bare metal APIs for the Origen SDK" category = "main" -description = "Core utilities for Python packages" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +colorama = ">= 0.4.4" +pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} +termcolor = ">= 1.1.0" + +[package.source] +type = "directory" +url = "../../python/origen_metal" + +[[package]] name = "packaging" +version = "20.9" +description = "Core utilities for Python packages" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "20.9" [package.dependencies] pyparsing = ">=2.0.2" [[package]] -category = "main" -description = "Bring colors to your terminal." name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.2.1" [[package]] -category = "main" -description = "Pexpect allows easy control of interactive console applications." name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "main" optional = false python-versions = "*" -version = "4.8.0" [package.dependencies] ptyprocess = ">=0.5" [[package]] -category = "main" -description = "Query metadatdata from sdists / bdists / installed packages." name = "pkginfo" +version = "1.8.3" +description = "Query metadatdata from sdists / bdists / installed packages." +category = "main" optional = false -python-versions = "*" -version = "1.7.0" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.extras] testing = ["nose", "coverage"] [[package]] +name = "platformdirs" +version = "2.5.2" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" -description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] + +[[package]] name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.13.1" +python-versions = ">=3.6" [package.dependencies] -[package.dependencies.importlib-metadata] -python = "<3.8" -version = ">=0.12" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] -category = "main" -description = "Python dependency management and packaging made easy." name = "poetry" +version = "1.1.14" +description = "Python dependency management and packaging made easy." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "1.1.2" [package.dependencies] +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} cachy = ">=0.3.0,<0.4.0" cleo = ">=0.8.1,<0.9.0" clikit = ">=0.6.2,<0.7.0" +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} html5lib = ">=1.0,<2.0" +importlib-metadata = {version = ">=1.6.0,<2.0.0", markers = "python_version < \"3.8\""} +keyring = {version = ">=21.2.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} packaging = ">=20.4,<21.0" pexpect = ">=4.7.0,<5.0.0" pkginfo = ">=1.4,<2.0" -poetry-core = ">=1.0.0,<2.0.0" +poetry-core = ">=1.0.7,<1.1.0" requests = ">=2.18,<3.0" requests-toolbelt = ">=0.9.1,<0.10.0" shellingham = ">=1.1,<2.0" tomlkit = ">=0.7.0,<1.0.0" virtualenv = ">=20.0.26,<21.0.0" -[package.dependencies.cachecontrol] -extras = ["filecache"] -version = ">=0.12.4,<0.13.0" - -[package.dependencies.crashtest] -python = ">=3.6,<4.0" -version = ">=0.3.0,<0.4.0" - -[package.dependencies.importlib-metadata] -python = "<3.8" -version = ">=1.6.0,<2.0.0" - -[package.dependencies.keyring] -python = ">=3.6,<4.0" -version = ">=21.2.0,<22.0.0" - [[package]] -category = "main" -description = "Poetry PEP 517 Build Backend" name = "poetry-core" +version = "1.0.8" +description = "Poetry PEP 517 Build Backend" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "1.0.3" [package.dependencies] -[package.dependencies.importlib-metadata] -python = ">=2.7,<2.8 || >=3.5,<3.8" -version = ">=1.7.0,<2.0.0" +importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} [[package]] -category = "main" -description = "Run a subprocess in a pseudo terminal" name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "main" optional = false python-versions = "*" -version = "0.7.0" [[package]] -category = "main" -description = "library with cross-python path, ini-parsing, io, code, log facilities" name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.10.0" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] -category = "main" -description = "C parser in Python" -marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform == \"linux\"" name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.20" [[package]] -category = "main" -description = "Pygments is a syntax highlighting package written in Python." name = "pygments" +version = "2.12.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "main" optional = false -python-versions = ">=3.5" -version = "2.9.0" +python-versions = ">=3.6" [[package]] -category = "main" -description = "A pure Python Levenshtein implementation that's not freaking GPL'd." name = "pylev" +version = "1.4.0" +description = "A pure Python Levenshtein implementation that's not freaking GPL'd." +category = "main" optional = false python-versions = "*" -version = "1.3.0" [[package]] -category = "main" -description = "Python parsing module" name = "pyparsing" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +category = "main" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -version = "2.4.7" +python-versions = ">=3.6.8" + +[package.extras] +diagrams = ["railroad-diagrams", "jinja2"] [[package]] +name = "pyreadline3" +version = "3.4.1" +description = "A python implementation of GNU readline." category = "main" -description = "A python implmementation of GNU readline." -marker = "sys_platform == \"win32\"" -name = "pyreadline" optional = false python-versions = "*" -version = "2.1" [[package]] -category = "main" -description = "pytest: simple powerful testing with Python" name = "pytest" +version = "6.2.5" +description = "pytest: simple powerful testing with Python" +category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "3.10.1" +python-versions = ">=3.6" [package.dependencies] -atomicwrites = ">=1.0" -attrs = ">=17.4.0" -colorama = "*" -more-itertools = ">=4.0.0" -pluggy = ">=0.7" -py = ">=1.5.0" -setuptools = "*" -six = ">=1.10.0" +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} +attrs = ">=19.2.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +py = ">=1.8.2" +toml = "*" + +[package.extras] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] +name = "python-plugin" +version = "0.1.0" +description = "Example Origen Plugin" category = "main" -description = "World timezone definitions, modern and historical" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} + +[package.source] +type = "directory" +url = "../python_plugin" + +[[package]] name = "pytz" +version = "2022.2.1" +description = "World timezone definitions, modern and historical" +category = "main" optional = false python-versions = "*" -version = "2021.1" [[package]] -category = "main" -description = "" -marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform == \"win32\"" name = "pywin32-ctypes" +version = "0.2.0" +description = "" +category = "main" optional = false python-versions = "*" -version = "0.2.0" [[package]] -category = "main" -description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." name = "recommonmark" +version = "0.7.1" +description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." +category = "main" optional = false python-versions = "*" -version = "0.7.1" [package.dependencies] commonmark = ">=0.8.1" @@ -663,98 +651,96 @@ docutils = ">=0.11" sphinx = ">=1.3.1" [[package]] -category = "main" -description = "Python HTTP for Humans." name = "requests" +version = "2.28.1" +description = "Python HTTP for Humans." +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.25.1" +python-versions = ">=3.7, <4" [package.dependencies] certifi = ">=2017.4.17" -chardet = ">=3.0.2,<5" -idna = ">=2.5,<3" +charset-normalizer = ">=2,<3" +idna = ">=2.5,<4" urllib3 = ">=1.21.1,<1.27" [package.extras] -security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] [[package]] -category = "main" -description = "A utility belt for advanced users of python-requests" name = "requests-toolbelt" +version = "0.9.1" +description = "A utility belt for advanced users of python-requests" +category = "main" optional = false python-versions = "*" -version = "0.9.1" [package.dependencies] requests = ">=2.0.1,<3.0.0" [[package]] -category = "main" -description = "Python bindings to FreeDesktop.org Secret Service API" -marker = "python_version >= \"3.6\" and python_version < \"4.0\" and sys_platform == \"linux\"" name = "secretstorage" +version = "3.3.3" +description = "Python bindings to FreeDesktop.org Secret Service API" +category = "main" optional = false python-versions = ">=3.6" -version = "3.3.1" [package.dependencies] cryptography = ">=2.0" jeepney = ">=0.6" [[package]] -category = "main" -description = "Tool to Detect Surrounding Shell" name = "shellingham" +version = "1.5.0" +description = "Tool to Detect Surrounding Shell" +category = "main" optional = false -python-versions = "!=3.0,!=3.1,!=3.2,!=3.3,>=2.6" -version = "1.4.0" +python-versions = ">=3.4" [[package]] -category = "main" -description = "Python 2 and 3 compatibility utilities" name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -version = "1.16.0" [[package]] -category = "main" -description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "main" optional = false python-versions = "*" -version = "2.1.0" [[package]] -category = "main" -description = "A modern CSS selector implementation for Beautiful Soup." name = "soupsieve" +version = "2.3.2.post1" +description = "A modern CSS selector implementation for Beautiful Soup." +category = "main" optional = false python-versions = ">=3.6" -version = "2.2.1" [[package]] -category = "main" -description = "Python documentation generator" name = "sphinx" +version = "3.0.2" +description = "Python documentation generator" +category = "main" optional = false python-versions = ">=3.5" -version = "3.0.2" [package.dependencies] -Jinja2 = ">=2.3" -Pygments = ">=2.0" alabaster = ">=0.7,<0.8" babel = ">=1.3" -colorama = ">=0.3.5" +colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} docutils = ">=0.12" imagesize = "*" +Jinja2 = ">=2.3" packaging = "*" +Pygments = ">=2.0" requests = ">=2.5.0" -setuptools = "*" snowballstemmer = ">=1.1" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" @@ -769,193 +755,187 @@ lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-s test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] [[package]] -category = "main" -description = "Sphinx Bootstrap4 Theme" name = "sphinxbootstrap4theme" +version = "0.6.0" +description = "Sphinx Bootstrap4 Theme" +category = "main" optional = false python-versions = "*" -version = "0.6.0" [[package]] -category = "main" -description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" name = "sphinxcontrib-applehelp" +version = "1.0.2" +description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" +category = "main" optional = false python-versions = ">=3.5" -version = "1.0.2" [package.extras] lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest"] [[package]] -category = "main" -description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." name = "sphinxcontrib-devhelp" +version = "1.0.2" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +category = "main" optional = false python-versions = ">=3.5" -version = "1.0.2" [package.extras] lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest"] [[package]] -category = "main" -description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" name = "sphinxcontrib-htmlhelp" +version = "2.0.0" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +category = "main" optional = false -python-versions = ">=3.5" -version = "1.0.3" +python-versions = ">=3.6" [package.extras] lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest", "html5lib"] [[package]] -category = "main" -description = "A sphinx extension which renders display math in HTML via JavaScript" name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +category = "main" optional = false python-versions = ">=3.5" -version = "1.0.1" [package.extras] test = ["pytest", "flake8", "mypy"] [[package]] -category = "main" -description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." name = "sphinxcontrib-qthelp" +version = "1.0.3" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +category = "main" optional = false python-versions = ">=3.5" -version = "1.0.3" [package.extras] lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest"] [[package]] -category = "main" -description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." name = "sphinxcontrib-serializinghtml" +version = "1.1.5" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +category = "main" optional = false python-versions = ">=3.5" -version = "1.1.4" [package.extras] lint = ["flake8", "mypy", "docutils-stubs"] test = ["pytest"] [[package]] -category = "main" -description = "ANSII Color formatting for output in terminal." name = "termcolor" +version = "1.1.0" +description = "ANSII Color formatting for output in terminal." +category = "main" optional = false python-versions = "*" -version = "1.1.0" [[package]] -category = "main" -description = "Style preserving TOML library" -name = "tomlkit" +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.7.1" +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] +name = "tomlkit" +version = "0.11.4" +description = "Style preserving TOML library" category = "main" -description = "HTTP library with thread-safe connection pooling, file post, and more." +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] name = "urllib3" +version = "1.26.11" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" -version = "1.26.4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" [package.extras] -brotli = ["brotlipy (>=0.6.0)"] +brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] -socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] -category = "main" -description = "Virtual Python Environment builder" name = "virtualenv" +version = "20.16.2" +description = "Virtual Python Environment builder" +category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "20.4.6" +python-versions = ">=3.6" [package.dependencies] -appdirs = ">=1.4.3,<2" distlib = ">=0.3.1,<1" -filelock = ">=3.0.0,<4" -six = ">=1.9.0,<2" - -[package.dependencies.importlib-metadata] -python = "<3.8" -version = ">=0.12" - -[package.dependencies.importlib-resources] -python = "<3.7" -version = ">=1.0" +filelock = ">=3.2,<4" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +platformdirs = ">=2,<3" [package.extras] -docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] +testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] +docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] [[package]] -category = "main" -description = "Character encoding aliases for legacy web content" name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "main" optional = false python-versions = "*" -version = "0.5.1" [[package]] -category = "main" -description = "A formatter for Python code." name = "yapf" +version = "0.30.0" +description = "A formatter for Python code." +category = "main" optional = false python-versions = "*" -version = "0.30.0" [[package]] -category = "main" -description = "Backport of pathlib-compatible object wrapper for zip files" -marker = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\" or python_version < \"3.8\" or python_version >= \"3.6\" and python_version < \"3.8\"" name = "zipp" +version = "3.8.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" optional = false -python-versions = ">=3.6" -version = "3.4.1" +python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [metadata] -content-hash = "35c04b3e3aad2e621c267ccda212dbbdcc99bf571ac90258ab9e1a6ee79be974" -lock-version = "1.0" -python-versions = "^3.6" +lock-version = "1.1" +python-versions = ">=3.7,<3.11" +content-hash = "f52e406dc05d89031862868464f57a0ab07bfc6610e4b89ded9ec6240266ce27" [metadata.files] alabaster = [ {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] -appdirs = [ - {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, - {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, -] atomicwrites = [ - {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, - {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, ] attrs = [ - {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, - {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, ] babel = [ - {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"}, - {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, + {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, + {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, ] beautifulsoup4 = [ {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, @@ -966,59 +946,86 @@ bs4 = [ {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, ] cachecontrol = [ - {file = "CacheControl-0.12.6-py2.py3-none-any.whl", hash = "sha256:10d056fa27f8563a271b345207402a6dcce8efab7e5b377e270329c62471b10d"}, - {file = "CacheControl-0.12.6.tar.gz", hash = "sha256:be9aa45477a134aee56c8fac518627e1154df063e85f67d4f83ce0ccc23688e8"}, + {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, + {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, ] cachy = [ {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, ] certifi = [ - {file = "certifi-2020.12.5-py2.py3-none-any.whl", hash = "sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830"}, - {file = "certifi-2020.12.5.tar.gz", hash = "sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c"}, + {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, + {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, ] cffi = [ - {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"}, - {file = "cffi-1.14.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:34eff4b97f3d982fb93e2831e6750127d1355a923ebaeeb565407b3d2f8d41a1"}, - {file = "cffi-1.14.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99cd03ae7988a93dd00bcd9d0b75e1f6c426063d6f03d2f90b89e29b25b82dfa"}, - {file = "cffi-1.14.5-cp27-cp27m-win32.whl", hash = "sha256:65fa59693c62cf06e45ddbb822165394a288edce9e276647f0046e1ec26920f3"}, - {file = "cffi-1.14.5-cp27-cp27m-win_amd64.whl", hash = "sha256:51182f8927c5af975fece87b1b369f722c570fe169f9880764b1ee3bca8347b5"}, - {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:43e0b9d9e2c9e5d152946b9c5fe062c151614b262fda2e7b201204de0b99e482"}, - {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cbde590d4faaa07c72bf979734738f328d239913ba3e043b1e98fe9a39f8b2b6"}, - {file = "cffi-1.14.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:5de7970188bb46b7bf9858eb6890aad302577a5f6f75091fd7cdd3ef13ef3045"}, - {file = "cffi-1.14.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:a465da611f6fa124963b91bf432d960a555563efe4ed1cc403ba5077b15370aa"}, - {file = "cffi-1.14.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:d42b11d692e11b6634f7613ad8df5d6d5f8875f5d48939520d351007b3c13406"}, - {file = "cffi-1.14.5-cp35-cp35m-win32.whl", hash = "sha256:72d8d3ef52c208ee1c7b2e341f7d71c6fd3157138abf1a95166e6165dd5d4369"}, - {file = "cffi-1.14.5-cp35-cp35m-win_amd64.whl", hash = "sha256:29314480e958fd8aab22e4a58b355b629c59bf5f2ac2492b61e3dc06d8c7a315"}, - {file = "cffi-1.14.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:3d3dd4c9e559eb172ecf00a2a7517e97d1e96de2a5e610bd9b68cea3925b4892"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, - {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, - {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, - {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, - {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, - {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, - {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, - {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, - {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, - {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, - {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, - {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, - {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, -] -chardet = [ - {file = "chardet-4.0.0-py2.py3-none-any.whl", hash = "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"}, - {file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"}, + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] +charset-normalizer = [ + {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, + {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, ] cleo = [ {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, @@ -1029,7 +1036,8 @@ clikit = [ {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, ] colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, ] commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, @@ -1040,173 +1048,182 @@ crashtest = [ {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, ] cryptography = [ - {file = "cryptography-3.4.7-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:3d8427734c781ea5f1b41d6589c293089704d4759e34597dce91014ac125aad1"}, - {file = "cryptography-3.4.7-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:8e56e16617872b0957d1c9742a3f94b43533447fd78321514abbe7db216aa250"}, - {file = "cryptography-3.4.7-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:37340614f8a5d2fb9aeea67fd159bfe4f5f4ed535b1090ce8ec428b2f15a11f2"}, - {file = "cryptography-3.4.7-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:240f5c21aef0b73f40bb9f78d2caff73186700bf1bc6b94285699aff98cc16c6"}, - {file = "cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:1e056c28420c072c5e3cb36e2b23ee55e260cb04eee08f702e0edfec3fb51959"}, - {file = "cryptography-3.4.7-cp36-abi3-win32.whl", hash = "sha256:0f1212a66329c80d68aeeb39b8a16d54ef57071bf22ff4e521657b27372e327d"}, - {file = "cryptography-3.4.7-cp36-abi3-win_amd64.whl", hash = "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca"}, - {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873"}, - {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d"}, - {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177"}, - {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, - {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, + {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, + {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, + {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, ] distlib = [ - {file = "distlib-0.3.1-py2.py3-none-any.whl", hash = "sha256:8c09de2c67b3e7deef7184574fc060ab8a793e7adbb183d942c389c8b13c52fb"}, - {file = "distlib-0.3.1.zip", hash = "sha256:edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1"}, + {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, + {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, ] docutils = [ - {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, - {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, ] filelock = [ - {file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"}, - {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, + {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, + {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, ] html5lib = [ {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, ] idna = [ - {file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"}, - {file = "idna-2.10.tar.gz", hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"}, + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, ] imagesize = [ - {file = "imagesize-1.2.0-py2.py3-none-any.whl", hash = "sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1"}, - {file = "imagesize-1.2.0.tar.gz", hash = "sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1"}, + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, ] importlib-metadata = [ {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, ] -importlib-resources = [ - {file = "importlib_resources-5.1.3-py3-none-any.whl", hash = "sha256:3b9c774e0e7e8d9c069eb2fe6aee7e9ae71759a381dec02eb45249fba7f38713"}, - {file = "importlib_resources-5.1.3.tar.gz", hash = "sha256:0786b216556e53b34156263ab654406e543a8b0d9b1381019e25a36a09263c36"}, +iniconfig = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] jeepney = [ - {file = "jeepney-0.6.0-py3-none-any.whl", hash = "sha256:aec56c0eb1691a841795111e184e13cad504f7703b9a64f63020816afa79a8ae"}, - {file = "jeepney-0.6.0.tar.gz", hash = "sha256:7d59b6622675ca9e993a6bd38de845051d315f8b0c72cca3aef733a20b648657"}, + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, ] jinja2 = [ - {file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"}, - {file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"}, + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] keyring = [ - {file = "keyring-21.8.0-py3-none-any.whl", hash = "sha256:4be9cbaaaf83e61d6399f733d113ede7d1c73bc75cb6aeb64eee0f6ac39b30ea"}, - {file = "keyring-21.8.0.tar.gz", hash = "sha256:1746d3ac913d449a090caf11e9e4af00e26c3f7f7e81027872192b2398b98675"}, + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, ] lockfile = [ {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, ] -lxml = [ - {file = "lxml-4.4.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:7b4fc7b1ecc987ca7aaf3f4f0e71bbfbd81aaabf87002558f5bc95da3a865bcd"}, - {file = "lxml-4.4.2-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:f6ed60a62c5f1c44e789d2cf14009423cb1646b44a43e40a9cf6a21f077678a1"}, - {file = "lxml-4.4.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:4fcc472ef87f45c429d3b923b925704aa581f875d65bac80f8ab0c3296a63f78"}, - {file = "lxml-4.4.2-cp27-cp27m-win32.whl", hash = "sha256:ad9b81351fdc236bda538efa6879315448411a81186c836d4b80d6ca8217cdb9"}, - {file = "lxml-4.4.2-cp27-cp27m-win_amd64.whl", hash = "sha256:8f54f0924d12c47a382c600c880770b5ebfc96c9fd94cf6f6bdc21caf6163ea7"}, - {file = "lxml-4.4.2-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:217262fcf6a4c2e1c7cb1efa08bd9ebc432502abc6c255c4abab611e8be0d14d"}, - {file = "lxml-4.4.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:6e74d5f4d6ecd6942375c52ffcd35f4318a61a02328f6f1bd79fcb4ffedf969e"}, - {file = "lxml-4.4.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:13cf89be53348d1c17b453867da68704802966c433b2bb4fa1f970daadd2ef70"}, - {file = "lxml-4.4.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:cf4650942de5e5685ad308e22bcafbccfe37c54aa7c0e30cd620c2ee5c93d336"}, - {file = "lxml-4.4.2-cp35-cp35m-win32.whl", hash = "sha256:0571e607558665ed42e450d7bf0e2941d542c18e117b1ebbf0ba72f287ad841c"}, - {file = "lxml-4.4.2-cp35-cp35m-win_amd64.whl", hash = "sha256:3213f753e8ae86c396e0e066866e64c6b04618e85c723b32ecb0909885211f74"}, - {file = "lxml-4.4.2-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:4690984a4dee1033da0af6df0b7a6bde83f74e1c0c870623797cec77964de34d"}, - {file = "lxml-4.4.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0e3f04a7615fdac0be5e18b2406529521d6dbdb0167d2a690ee328bef7807487"}, - {file = "lxml-4.4.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:e301055deadfedbd80cf94f2f65ff23126b232b0d1fea28f332ce58137bcdb18"}, - {file = "lxml-4.4.2-cp36-cp36m-win32.whl", hash = "sha256:223e544828f1955daaf4cefbb4853bc416b2ec3fd56d4f4204a8b17007c21250"}, - {file = "lxml-4.4.2-cp36-cp36m-win_amd64.whl", hash = "sha256:c3c289762cc09735e2a8f8a49571d0e8b4f57ea831ea11558247b5bdea0ac4db"}, - {file = "lxml-4.4.2-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl", hash = "sha256:00ac0d64949fef6b3693813fe636a2d56d97a5a49b5bbb86e4cc4cc50ebc9ea2"}, - {file = "lxml-4.4.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:cfcbc33c9c59c93776aa41ab02e55c288a042211708b72fdb518221cc803abc8"}, - {file = "lxml-4.4.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:61409bd745a265a742f2693e4600e4dbd45cc1daebe1d5fad6fcb22912d44145"}, - {file = "lxml-4.4.2-cp37-cp37m-win32.whl", hash = "sha256:678f1963f755c5d9f5f6968dded7b245dd1ece8cf53c1aa9d80e6734a8c7f41d"}, - {file = "lxml-4.4.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6c6d03549d4e2734133badb9ab1c05d9f0ef4bcd31d83e5d2b4747c85cfa21da"}, - {file = "lxml-4.4.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ebbfe24df7f7b5c6c7620702496b6419f6a9aa2fd7f005eb731cc80d7b4692b9"}, - {file = "lxml-4.4.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:277cb61fede2f95b9c61912fefb3d43fbd5f18bf18a14fae4911b67984486f5d"}, - {file = "lxml-4.4.2-cp38-cp38-win32.whl", hash = "sha256:bbd00e21ea17f7bcc58dccd13869d68441b32899e89cf6cfa90d624a9198ce85"}, - {file = "lxml-4.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:7ed386a40e172ddf44c061ad74881d8622f791d9af0b6f5be20023029129bc85"}, - {file = "lxml-4.4.2.tar.gz", hash = "sha256:eff69ddbf3ad86375c344339371168640951c302450c5d3e9936e98d6459db06"}, -] mako = [ {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, ] markupsafe = [ - {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, - {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, -] -more-itertools = [ - {file = "more-itertools-8.7.0.tar.gz", hash = "sha256:c5d6da9ca3ff65220c3bfd2a8db06d698f05d4d2b9be57e1deb2be5a45019713"}, - {file = "more_itertools-8.7.0-py3-none-any.whl", hash = "sha256:5652a9ac72209ed7df8d9c15daf4e1aa0e3d2ccd3c87f8265a0673cd9cbc9ced"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] msgpack = [ - {file = "msgpack-1.0.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:b6d9e2dae081aa35c44af9c4298de4ee72991305503442a5c74656d82b581fe9"}, - {file = "msgpack-1.0.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:a99b144475230982aee16b3d249170f1cccebf27fb0a08e9f603b69637a62192"}, - {file = "msgpack-1.0.2-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1026dcc10537d27dd2d26c327e552f05ce148977e9d7b9f1718748281b38c841"}, - {file = "msgpack-1.0.2-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:fe07bc6735d08e492a327f496b7850e98cb4d112c56df69b0c844dbebcbb47f6"}, - {file = "msgpack-1.0.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:9ea52fff0473f9f3000987f313310208c879493491ef3ccf66268eff8d5a0326"}, - {file = "msgpack-1.0.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:26a1759f1a88df5f1d0b393eb582ec022326994e311ba9c5818adc5374736439"}, - {file = "msgpack-1.0.2-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:497d2c12426adcd27ab83144057a705efb6acc7e85957a51d43cdcf7f258900f"}, - {file = "msgpack-1.0.2-cp36-cp36m-win32.whl", hash = "sha256:e89ec55871ed5473a041c0495b7b4e6099f6263438e0bd04ccd8418f92d5d7f2"}, - {file = "msgpack-1.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a4355d2193106c7aa77c98fc955252a737d8550320ecdb2e9ac701e15e2943bc"}, - {file = "msgpack-1.0.2-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:d6c64601af8f3893d17ec233237030e3110f11b8a962cb66720bf70c0141aa54"}, - {file = "msgpack-1.0.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:f484cd2dca68502de3704f056fa9b318c94b1539ed17a4c784266df5d6978c87"}, - {file = "msgpack-1.0.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f3e6aaf217ac1c7ce1563cf52a2f4f5d5b1f64e8729d794165db71da57257f0c"}, - {file = "msgpack-1.0.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:8521e5be9e3b93d4d5e07cb80b7e32353264d143c1f072309e1863174c6aadb1"}, - {file = "msgpack-1.0.2-cp37-cp37m-win32.whl", hash = "sha256:31c17bbf2ae5e29e48d794c693b7ca7a0c73bd4280976d408c53df421e838d2a"}, - {file = "msgpack-1.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:8ffb24a3b7518e843cd83538cf859e026d24ec41ac5721c18ed0c55101f9775b"}, - {file = "msgpack-1.0.2-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:b28c0876cce1466d7c2195d7658cf50e4730667196e2f1355c4209444717ee06"}, - {file = "msgpack-1.0.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:87869ba567fe371c4555d2e11e4948778ab6b59d6cc9d8460d543e4cfbbddd1c"}, - {file = "msgpack-1.0.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:b55f7db883530b74c857e50e149126b91bb75d35c08b28db12dcb0346f15e46e"}, - {file = "msgpack-1.0.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:ac25f3e0513f6673e8b405c3a80500eb7be1cf8f57584be524c4fa78fe8e0c83"}, - {file = "msgpack-1.0.2-cp38-cp38-win32.whl", hash = "sha256:0cb94ee48675a45d3b86e61d13c1e6f1696f0183f0715544976356ff86f741d9"}, - {file = "msgpack-1.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:e36a812ef4705a291cdb4a2fd352f013134f26c6ff63477f20235138d1d21009"}, - {file = "msgpack-1.0.2-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:2a5866bdc88d77f6e1370f82f2371c9bc6fc92fe898fa2dec0c5d4f5435a2694"}, - {file = "msgpack-1.0.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:92be4b12de4806d3c36810b0fe2aeedd8d493db39e2eb90742b9c09299eb5759"}, - {file = "msgpack-1.0.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:de6bd7990a2c2dabe926b7e62a92886ccbf809425c347ae7de277067f97c2887"}, - {file = "msgpack-1.0.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:5a9ee2540c78659a1dd0b110f73773533ee3108d4e1219b5a15a8d635b7aca0e"}, - {file = "msgpack-1.0.2-cp39-cp39-win32.whl", hash = "sha256:c747c0cc08bd6d72a586310bda6ea72eeb28e7505990f342552315b229a19b33"}, - {file = "msgpack-1.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:d8167b84af26654c1124857d71650404336f4eb5cc06900667a493fc619ddd9f"}, - {file = "msgpack-1.0.2.tar.gz", hash = "sha256:fae04496f5bc150eefad4e9571d1a76c55d021325dcd484ce45065ebbdd00984"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, ] origen = [] origen-autoapi = [ {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, ] +origen-metal = [] packaging = [ {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, @@ -1220,57 +1237,61 @@ pexpect = [ {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, ] pkginfo = [ - {file = "pkginfo-1.7.0-py2.py3-none-any.whl", hash = "sha256:9fdbea6495622e022cc72c2e5e1b735218e4ffb2a2a69cde2694a6c1f16afb75"}, - {file = "pkginfo-1.7.0.tar.gz", hash = "sha256:029a70cb45c6171c329dfc890cde0879f8c52d6f3922794796e06f577bb03db4"}, + {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, + {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, +] +platformdirs = [ + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, ] pluggy = [ - {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, - {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] poetry = [ - {file = "poetry-1.1.2-py2.py3-none-any.whl", hash = "sha256:79331ccedcf0710a4b589ba988725d8159518350f883ea290c280623e41dbc43"}, - {file = "poetry-1.1.2.tar.gz", hash = "sha256:acb153b63ebcf01ccc1b42ff2d20e6c8d07cb4aa4914fededcdbbd7546150408"}, + {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, + {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, ] poetry-core = [ - {file = "poetry-core-1.0.3.tar.gz", hash = "sha256:2315c928249fc3207801a81868b64c66273077b26c8d8da465dccf8f488c90c5"}, - {file = "poetry_core-1.0.3-py2.py3-none-any.whl", hash = "sha256:c6bde46251112de8384013e1ab8d66e7323d2c75172f80220aba2bc07e208e9a"}, + {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, + {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, ] py = [ - {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, - {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] pycparser = [ - {file = "pycparser-2.20-py2.py3-none-any.whl", hash = "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"}, - {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] pygments = [ - {file = "Pygments-2.9.0-py3-none-any.whl", hash = "sha256:d66e804411278594d764fc69ec36ec13d9ae9147193a1740cd34d272ca383b8e"}, - {file = "Pygments-2.9.0.tar.gz", hash = "sha256:a18f47b506a429f6f4b9df81bb02beab9ca21d0a5fee38ed15aef65f0545519f"}, + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, ] pylev = [ - {file = "pylev-1.3.0-py2.py3-none-any.whl", hash = "sha256:1d29a87beb45ebe1e821e7a3b10da2b6b2f4c79b43f482c2df1a1f748a6e114e"}, - {file = "pylev-1.3.0.tar.gz", hash = "sha256:063910098161199b81e453025653ec53556c1be7165a9b7c50be2f4d57eae1c3"}, + {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, + {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, ] pyparsing = [ - {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, - {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, ] -pyreadline = [ - {file = "pyreadline-2.1.win-amd64.exe", hash = "sha256:9ce5fa65b8992dfa373bddc5b6e0864ead8f291c94fbfec05fbd5c836162e67b"}, - {file = "pyreadline-2.1.win32.exe", hash = "sha256:65540c21bfe14405a3a77e4c085ecfce88724743a4ead47c66b84defcf82c32e"}, - {file = "pyreadline-2.1.zip", hash = "sha256:4530592fc2e85b25b1a9f79664433da09237c1a270e4d78ea5aa3a2c7229e2d1"}, +pyreadline3 = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, ] pytest = [ - {file = "pytest-3.10.1-py2.py3-none-any.whl", hash = "sha256:3f193df1cfe1d1609d4c583838bea3d532b18d6160fd3f55c9447fdca30848ec"}, - {file = "pytest-3.10.1.tar.gz", hash = "sha256:e246cf173c01169b9617fc07264b7b1316e78d7a650055235d6d897bc80d9660"}, + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] +python-plugin = [] pytz = [ - {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, - {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, + {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, + {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, ] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, @@ -1281,32 +1302,32 @@ recommonmark = [ {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, ] requests = [ - {file = "requests-2.25.1-py2.py3-none-any.whl", hash = "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e"}, - {file = "requests-2.25.1.tar.gz", hash = "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804"}, + {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, + {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, ] requests-toolbelt = [ {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, ] secretstorage = [ - {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, - {file = "SecretStorage-3.3.1.tar.gz", hash = "sha256:fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195"}, + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, ] shellingham = [ - {file = "shellingham-1.4.0-py2.py3-none-any.whl", hash = "sha256:536b67a0697f2e4af32ab176c00a50ac2899c5a05e0d8e2dadac8e58888283f9"}, - {file = "shellingham-1.4.0.tar.gz", hash = "sha256:4855c2458d6904829bd34c299f11fdeed7cfefbf8a2c522e4caea6cd76b3171e"}, + {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, + {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, ] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] snowballstemmer = [ - {file = "snowballstemmer-2.1.0-py2.py3-none-any.whl", hash = "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2"}, - {file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"}, + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, ] soupsieve = [ - {file = "soupsieve-2.2.1-py3-none-any.whl", hash = "sha256:c2c1c2d44f158cdbddab7824a9af8c4f83c76b1e23e049479aa432feb6c4c23b"}, - {file = "soupsieve-2.2.1.tar.gz", hash = "sha256:052774848f448cf19c7e959adf5566904d525f33a3f8b6ba6f6f8f26ec7de0cc"}, + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, ] sphinx = [ {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, @@ -1324,8 +1345,8 @@ sphinxcontrib-devhelp = [ {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, ] sphinxcontrib-htmlhelp = [ - {file = "sphinxcontrib-htmlhelp-1.0.3.tar.gz", hash = "sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b"}, - {file = "sphinxcontrib_htmlhelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f"}, + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, ] sphinxcontrib-jsmath = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, @@ -1336,23 +1357,27 @@ sphinxcontrib-qthelp = [ {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, ] sphinxcontrib-serializinghtml = [ - {file = "sphinxcontrib-serializinghtml-1.1.4.tar.gz", hash = "sha256:eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc"}, - {file = "sphinxcontrib_serializinghtml-1.1.4-py2.py3-none-any.whl", hash = "sha256:f242a81d423f59617a8e5cf16f5d4d74e28ee9a66f9e5b637a18082991db5a9a"}, + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, ] termcolor = [ {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, ] +toml = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] tomlkit = [ - {file = "tomlkit-0.7.1-py2.py3-none-any.whl", hash = "sha256:01227863019024861bb83d9a09a757b1c65604969fd2cebb19f5e2b340649792"}, - {file = "tomlkit-0.7.1.tar.gz", hash = "sha256:24d6049e0765aad9c56a30dfa60d54c69f39c142112a6c57ce8f1c285b6b9d8f"}, + {file = "tomlkit-0.11.4-py3-none-any.whl", hash = "sha256:25d4e2e446c453be6360c67ddfb88838cfc42026322770ba13d1fbd403a93a5c"}, + {file = "tomlkit-0.11.4.tar.gz", hash = "sha256:3235a9010fae54323e727c3ac06fb720752fe6635b3426e379daec60fbd44a83"}, ] urllib3 = [ - {file = "urllib3-1.26.4-py2.py3-none-any.whl", hash = "sha256:2f4da4594db7e1e110a944bb1b551fdf4e6c136ad42e4234131391e21eb5b0df"}, - {file = "urllib3-1.26.4.tar.gz", hash = "sha256:e7b021f7241115872f92f43c6508082facffbd1c048e3c6e2bb9c2a157e28937"}, + {file = "urllib3-1.26.11-py2.py3-none-any.whl", hash = "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc"}, + {file = "urllib3-1.26.11.tar.gz", hash = "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"}, ] virtualenv = [ - {file = "virtualenv-20.4.6-py2.py3-none-any.whl", hash = "sha256:307a555cf21e1550885c82120eccaf5acedf42978fd362d32ba8410f9593f543"}, - {file = "virtualenv-20.4.6.tar.gz", hash = "sha256:72cf267afc04bf9c86ec932329b7e94db6a0331ae9847576daaa7ca3c86b29a4"}, + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, ] webencodings = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, @@ -1363,6 +1388,6 @@ yapf = [ {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, ] zipp = [ - {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"}, - {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"}, + {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, + {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, ] diff --git a/test_apps/python_no_app/pyproject.toml b/test_apps/python_no_app/pyproject.toml index 31510669..b4a28a96 100644 --- a/test_apps/python_no_app/pyproject.toml +++ b/test_apps/python_no_app/pyproject.toml @@ -1,10 +1,20 @@ [tool.poetry] name = "python_no_app" version = "0.1.0" -description = "" +description = "O2 workspace without an application" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = "^3.6" +python = ">=3.7,<3.11" origen = { path = "../../python/origen", develop = true } -pytest = "^3.0" +origen_metal = { path = "../../python/origen_metal", develop = true } +python_plugin = { path = "../python_plugin", develop = true } +python_plugin_the_second = { path = "../python_plugin_the_second", develop = true } +python_plugin_no_cmds = { path = "../python_plugin_no_cmds", develop = true } +test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true } + +[tool.poetry.dev-dependencies] +pytest = "^6.0" + +[tool.pytest.ini_options] +addopts = "--ignore=tests/cmd_building/cmd_testers" diff --git a/test_apps/python_no_app/tests/__init__.py b/test_apps/python_no_app/tests/__init__.py new file mode 100644 index 00000000..b915ff3c --- /dev/null +++ b/test_apps/python_no_app/tests/__init__.py @@ -0,0 +1,37 @@ +import sys, pathlib, importlib, contextlib +import pytest + +sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("tests"))) + +import tests as python_app_tests +_python_app_tests_root = pathlib.Path(__file__).parent.joinpath( + "../../python_app/tests/__init__.py").resolve() +_python_app_tests_spec = importlib.util.spec_from_file_location( + "python_app_tests", str(_python_app_tests_root)) +_python_app_tests = importlib.util.module_from_spec(_python_app_tests_spec) +sys.modules["python_app_tests"] = _python_app_tests +_python_app_tests_spec.loader.exec_module(_python_app_tests) + +@contextlib.contextmanager +def python_app_shared(): + _tests_modules_ = dict( + filter(lambda mod: mod[0].split('.')[0] == "tests", + sys.modules.items())) + for name, mod in _tests_modules_.items(): + if f"python_app_{name}" in sys.modules: + sys.modules[name] = sys.modules[f"python_app_{name}"] + else: + sys.modules.pop(name) + try: + yield + finally: + for name, mod in _tests_modules_.items(): + sys.modules[name] = mod + +# Have pytest's assert rewriting take over: +# https://docs.pytest.org/en/stable/writing_plugins.html#assertion-rewriting +# pytest.register_assert_rewrite("tests.shared") +pytest.register_assert_rewrite("tests.cmd_building") +pytest.register_assert_rewrite("tests.cli") +pytest.register_assert_rewrite("origen.helpers.regressions") +pytest.register_assert_rewrite("test_apps_shared_test_helpers") diff --git a/test_apps/python_no_app/tests/cli/__init__.py b/test_apps/python_no_app/tests/cli/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_no_app/tests/cli/shared.py b/test_apps/python_no_app/tests/cli/shared.py new file mode 100644 index 00000000..5f21d733 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/shared.py @@ -0,0 +1,10 @@ +# FOR_PR see if needed +from origen.helpers.regressions.cli import CLI + +class CLICommon(CLI): + ... + # global_core_commands = [ + # "proj", "new", "credentials", "eval", "interactive", + # "plugins", "plugin", "auxillary_commands", "fmt", + # "build" + # ] diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py new file mode 100644 index 00000000..4eff88fa --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py @@ -0,0 +1,151 @@ +# FOR_PR clean up +import pytest, origen, origen_metal +from .shared import CLICommon + +class T_Credentials(CLICommon): + @pytest.mark.skip + def test_set_passwords(self, monkeypatch): + # import io + # monkeypatch.setattr('sys.stdin', io.StringIO('test_pw_updated')) + + u = origen.current_user + assert set(u.datasets.keys()) == { + "test", "backup", "dummy_ldap_ds", "test2", "git" + } + assert u.data_lookup_hierarchy == ["test", "backup"] + u.datasets["dummy_ldap_ds"].should_validate_password = False + + u.datasets["test"].password = "test_pw" + u.datasets["backup"].password = "backup_pw" + u.datasets["dummy_ldap_ds"].password = "dummy_ldap_ds_pw" + u.datasets["test2"].password = "test2_pw" + u.datasets["git"].password = "git_pw" + + assert u.password == "test_pw" + assert u.datasets["test"].password == "test_pw" + assert u.datasets["backup"].password == "backup_pw" + assert u.datasets["dummy_ldap_ds"].password == "dummy_ldap_ds_pw" + assert u.datasets["test2"].password == "test2_pw" + assert u.datasets["git"].password == "git_pw" + + self.global_cmds.cred.run(["set", "test_pw_updated"]) + + self.global_cmds.cred.run(["set", "--dataset", "git" , "git_pw_updated", "--dataset", "test2", "test2_pw_updated"]) + # import subprocess + # proc = subprocess.Popen(["origen", "credentials", "set"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # proc.stdin.flush() + # proc.stdout.flush() + # print(proc.stdout.readline().decode("UTF-8").strip()) + # proc.stdin.write(("test_pw_updated" + "\n").encode('UTF-8')) + # proc.stdin.flush() + # print(proc.stdout.readline().decode("UTF-8").strip()) + + assert u.password == "test_pw_updated" + + @pytest.mark.skip + def test_verify_password(self): + fail + + def test_clearing_passwords(self): + u = origen.current_user + assert set(u.datasets.keys()) == { + "test", "backup", "dummy_ldap_ds", "test2", "git" + } + assert u.data_lookup_hierarchy == ["test", "backup"] + u.datasets["dummy_ldap_ds"].should_validate_password = False + + u.datasets["test"].password = "test_pw" + u.datasets["backup"].password = "backup_pw" + u.datasets["dummy_ldap_ds"].password = "dummy_ldap_ds_pw" + u.datasets["test2"].password = "test2_pw" + u.datasets["git"].password = "git_pw" + + assert u.password == "test_pw" + assert u.datasets["test"].password == "test_pw" + assert u.datasets["backup"].password == "backup_pw" + assert u.datasets["dummy_ldap_ds"].password == "dummy_ldap_ds_pw" + assert u.datasets["test2"].password == "test2_pw" + assert u.datasets["git"].password == "git_pw" + # import time + # time.sleep(5) + + # Should only clear the 'test' pw + # TODO need to clear all hierarchy + # origen_metal.users.unload() + # origen_metal.sessions.unload() + # origen_metal.frontend.reset() + out = self.global_cmds.creds.run("clear") + # import os + # os.remove(r"C:\Users\nxa13790\Documents\origen\o2_2nd\test_apps\python_no_app\.o2\.session\__user__nxa13790__\__user__") + # import time + # time.sleep(5) + assert "Clearing cached password for topmost dataset..." in out + origen_metal.sessions.unload() + origen_metal.users.unload() + origen._origen.boot_users() + u.datasets["dummy_ldap_ds"].should_validate_password = False + u = origen.current_user + # origen.boot_users() + # origen.users.remove(u.id) + # origen.users.lookup_current_id(update_current=True) + # u.session.refresh() + # print(u.password) + + # TODO update this with "prompt=False" option or something better than expecting an error + prompt_err = "Error encountered prompting for password: The handle is invalid" + with pytest.raises(RuntimeError, match=prompt_err): + assert u.password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["test"].password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["backup"].password == None + assert u.datasets["dummy_ldap_ds"].password == "dummy_ldap_ds_pw" + assert u.datasets["test2"].password == "test2_pw" + assert u.datasets["git"].password == "git_pw" + + out = self.global_cmds.creds.run("clear", "--datasets", "git", "test2") + origen_metal.sessions.unload() + origen_metal.users.unload() + origen._origen.boot_users() + u.datasets["dummy_ldap_ds"].should_validate_password = False + u = origen.current_user + + assert "Clearing cached password for dataset 'git'" in out + assert "Clearing cached password for dataset 'test2'" in out + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["test"].password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["backup"].password is None + assert u.datasets["dummy_ldap_ds"].password == "dummy_ldap_ds_pw" + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["test2"].password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["git"].password is None + + u.datasets["test"].password = "test_pw" + u.datasets["backup"].password = "backup_pw" + u.datasets["dummy_ldap_ds"].password = "dummy_ldap_ds_pw" + u.datasets["test2"].password = "test2_pw" + u.datasets["git"].password = "git_pw" + assert u.password == "test_pw" + + out = self.global_cmds.creds.run("clear", "--all") + origen_metal.sessions.unload() + origen_metal.users.unload() + origen._origen.boot_users() + u.datasets["dummy_ldap_ds"].should_validate_password = False + u = origen.current_user + + assert "Clearing all cached passwords..." in out + with pytest.raises(RuntimeError, match=prompt_err): + assert u.password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["test"].password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["backup"].password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["dummy_ldap_ds"].password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["test2"].password is None + with pytest.raises(RuntimeError, match=prompt_err): + assert u.datasets["git"].password is None diff --git a/test_apps/python_no_app/tests/cli/tests__global_cmds.py b/test_apps/python_no_app/tests/cli/tests__global_cmds.py new file mode 100644 index 00000000..bb631072 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__global_cmds.py @@ -0,0 +1,47 @@ +import pytest +from origen.helpers.env import run_cli_cmd +from .shared import CLICommon +from tests.cmd_building.shared import CLICommon as CmdTestersCommon + +class T_GlobalCmds(CLICommon): + def test_origen_v(self): + out = run_cli_cmd(["-v"]) + assert "Origen: " in out + assert "CLI: " in out + assert "app" not in out.lower() + + def test_global_help_message_core_commands(self): + out = run_cli_cmd(["-h"]) + help = CmdTestersCommon.HelpMsg(out) + assert help.root_cmd is True + assert "Origen: 2." in help.version_str + + assert len(help.opts) == 3 + help.assert_help_opt_at(0) + help.assert_vk_opt_at(1) + help.assert_v_opt_at(2) + + # TODO check order? + assert set(s["name"] for s in help.subcmds) == set(self.global_cmds.all_names_add_help) + assert help.app_cmd_shortcuts == None + assert help.pl_cmd_shortcuts == { + "plugin_says_hi": ("python_plugin", "plugin_says_hi"), + "echo": ("python_plugin", "echo"), + "plugin_test_args": ("python_plugin", "plugin_test_args"), + "plugin_test_ext_stacking": ("python_plugin", "plugin_test_ext_stacking"), + } + assert help.aux_cmd_shortcuts == { + "python_no_app_tests": ("cmd_testers", "python_no_app_tests"), + "test_current_command": ("cmd_testers", "test_current_command"), + "test_nested_level_1": ("cmd_testers", "test_nested_level_1"), + "test_arguments": ("cmd_testers", "test_arguments"), + "error_cases": ("cmd_testers", "error_cases"), + "say_hi": ("python_no_app_aux_cmds", "say_hi"), + "say_bye": ("python_no_app_aux_cmds", "say_bye"), + } + + @pytest.mark.parametrize("cmd", CLICommon.global_cmds.cmds, ids=CLICommon.global_cmds.all_names) + def test_core_commands_are_available(self, cmd): + ''' Just testing that "-h" doesn't crash for all core commands ''' + help = cmd.get_help_msg() + assert len(help.opts) >= 3 \ No newline at end of file diff --git a/test_apps/python_no_app/tests/cmd_building/__init__.py b/test_apps/python_no_app/tests/cmd_building/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml b/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml new file mode 100644 index 00000000..666ba279 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml @@ -0,0 +1,341 @@ +help = "Commands to assist in testing aux commands when no app is present" + +[[command]] +name = "python_no_app_tests" +help = "Test commands for python-no-app workspace" + +[[command]] +name = "test_current_command" +help = "Tests origen.current_command" + +[[command]] +name = "test_nested_level_1" +help = "Tests origen.current_command L1" + + [[command.subcommand]] + name = "test_nested_level_2" + help = "Tests origen.current_command L2" + + [[command.subcommand.subcommand]] + name = "test_nested_level_3_a" + help = "Tests origen.current_command L3a" + + [[command.subcommand.subcommand]] + name = "test_nested_level_3_b" + help = "Tests origen.current_command L3b" + +[[command]] +name = "test_arguments" +help = "Test various argument and option schemes from commands" + + [[command.subcommand]] + name = "display_verbosity_opts" + help = "Displays the verbosity and keywords from the current command" + + [[command.subcommand]] + name = "no_args_or_opts" + help = "Command taking no arguments or options" + + [[command.subcommand]] + name = "optional_arg" + help = "Command taking a single, optional argument" + + [[command.subcommand.arg]] + name = "single_val" + help = "Single value" + + [[command.subcommand]] + name = "required_arg" + help = "Command taking a required and optional arg" + + [[command.subcommand.arg]] + name = "required_val" + required = true + help = "Single required value" + + [[command.subcommand.arg]] + name = "optional_val" + help = "Single optional value" + + [[command.subcommand]] + name = "multi_arg" + help = "Command taking a multi-arg" + + [[command.subcommand.arg]] + name = "multi_arg" + multiple = true + help = "Multi-arg value" + + [[command.subcommand]] + name = "delim_multi_arg" + help = "Command taking a delimited multi-arg" + + [[command.subcommand.arg]] + name = "delim_m_arg" + use_delimiter = true + help = "Delimited Multi-arg value ('multiple' implied)" + + [[command.subcommand]] + name = "single_and_multi_arg" + help = "Command taking a single and multi-arg" + + [[command.subcommand.arg]] + name = "single_val" + help = "Single value" + + [[command.subcommand.arg]] + name = "multi_arg" + multiple = true + help = "Multi-arg value" + + [[command.subcommand]] + name = "args_with_value_names" + help = "Single and multi arg with value custom value names" + + [[command.subcommand.arg]] + name = "s_arg" + value_name = "Single Arg Val" + help = "Single value arg with custom value name" + + [[command.subcommand.arg]] + name = "m_arg" + multiple = true + value_name = "Multi Arg Val" + help = "Multi value arg with custom value name" + + # Very simple subcommands that only support a small piece of the options at a time + [[command.subcommand]] + name = "single_value_optional_opt" + help = "Command taking optional, single option" + + # Default setting for an arg is not required + [[command.subcommand.opt]] + name = "implicit_single_val" + takes_value = true + help = "Implicit non-required single value" + + [[command.subcommand.opt]] + name = "explicit_single_val" + takes_value = true + required = false + help = "Explicit non-required single value" + + [[command.subcommand]] + name = "single_value_required_opt" + help = "Command with single-value optional and required options" + + # Default setting is arg is not required + [[command.subcommand.opt]] + name = "non_req_val" + takes_value = true + help = "Non-required single value" + + [[command.subcommand.opt]] + name = "req_val" + takes_value = true + required = true + help = "Required single value" + + [[command.subcommand]] + name = "multi_opts" + help = "Command with multi-value optional and required options" + + [[command.subcommand.opt]] + name = "m_opt" + takes_value = true + multiple = true + help = "Opt with multiple values" + + # Takes value should be implied with multiple + [[command.subcommand.opt]] + name = "im_m_opt" + multiple = true + help = "Opt accepting multiple values were 'takes value' is implied" + + [[command.subcommand.opt]] + name = "req_m_opt" + multiple = true + required = true + help = "Required opt accepting multiple values" + + [[command.subcommand.opt]] + name = "d_m_opt" + multiple = true + use_delimiter = true + help = "Delimited multi opt" + + [[command.subcommand.opt]] + name = "d_im_m_opt" + use_delimiter = true + help = "Delimited opt where 'multi' and 'takes value' is implied" + + [[command.subcommand]] + name = "flag_opts" + help = "Command with flag-style options only" + + [[command.subcommand.opt]] + name = "im_f_opt" + help = "Stackable flag opt with 'takes value=false' implied" + + [[command.subcommand.opt]] + name = "ex_f_opt" + takes_value = false + help = "Stackable flag opt with 'takes value=false' set" + + [[command.subcommand]] + name = "opts_with_value_names" + help = "Command with single/multi-opts with custom value names" + + [[command.subcommand.opt]] + name = "s_opt_nv_im_tv" + value_name = "s_val_impl" + help = "Single opt with value name, implying 'takes_value'=true" + + [[command.subcommand.opt]] + name = "s_opt_nv_ex_tv" + value_name = "s_val_expl" + takes_value = true + help = "Single opt with value name and explicit 'takes_value'=true" + + [[command.subcommand.opt]] + name = "m_opt_named_val" + value_name = "m_val" + multiple = true + help = "Multi-opt with value name" + + [[command.subcommand.opt]] + name = "s_opt_ln_nv" + value_name = "ln_nv" + help = "Single opt with long name and value name" + + [[command.subcommand]] + name = "opts_with_aliases" + help = "Command with option aliasing, custom long, and short names" + + [[command.subcommand.opt]] + name = "single_opt" + takes_value = true + long = "s_opt" + short = "s" + help = "Single opt with long/short name" + + [[command.subcommand.opt]] + name = "multi_opt" + takes_value = true + multiple = true + long = "m_opt" + short = "m" + help = "Multi-opt with long/short name" + + [[command.subcommand.opt]] + name = "occurrence_counter" + long = "cnt" + short = "o" + help = "Flag opt with long/short name" + + [[command.subcommand.opt]] + name = "flag_opt_short_name" + short = "f" + help = "Flag opt with short name only" + + [[command.subcommand.opt]] + name = "flag_opt_long_name" + long = "ln_f_opt" + help = "Flag opt with long name only" + + [[command.subcommand.opt]] + name = "flag_opt_dupl_ln_sn" + long = "f" + help = "Flag opt with ln matching another's sn" + + [[command.subcommand.opt]] + name = "fo_sn_aliases" + short_aliases = ['a', 'b'] + help = "Flag opt with short aliases" + + [[command.subcommand.opt]] + name = "fo_sn_and_aliases" + short = "c" + short_aliases = ['d', 'e'] + help = "Flag opt with short name and short aliases" + + [[command.subcommand.opt]] + name = "fo_ln_aliases" + long_aliases = ['fa', 'fb'] + help = "Flag opt with long aliases" + + [[command.subcommand.opt]] + name = "fo_ln_and_aliases" + long = "fc" + long_aliases = ['fd', 'fe'] + help = "Flag opt with long name and long aliases" + + [[command.subcommand.opt]] + name = "fo_sn_ln_aliases" + long_aliases = ['sn_ln_1', 'sn_ln_2'] + short_aliases = ['z'] + help = "Flag opt with long and short aliases" + + [[command.subcommand]] + name = "hidden_opt" + help = "Command with a hidden opt" + + [[command.subcommand.opt]] + name = "hidden_opt" + hidden = true + help = "Hidden opt" + + [[command.subcommand.opt]] + name = "visible_opt" + hidden = false + help = "Visible, non-hidden, opt" + + [[command.subcommand]] + name = "single_arg_single_opt" + help = "Command with a single arg and single opt" + + [[command.subcommand.arg]] + name = "single_val" + help = "Single value arg" + + [[command.subcommand.opt]] + name = "single_val" + takes_value = true + help = "Single value opt" + + [[command.subcommand]] + name = "multi_arg_multi_opt" + help = "Command with a multi-arg and multi-opt" + + [[command.subcommand.arg]] + name = "multi_arg" + help = "Multi value arg" + + [[command.subcommand.opt]] + name = "multi_opt" + takes_value = true + help = "Multi value opt" + +[[command]] +name = "error_cases" +help = "Commands to test error messages and improper command configuration" + + [[command.subcommand]] + name = "missing_impl_dir" + help = "Parent to test missing implementation directory" + + [[command.subcommand.subcommand]] + name = "missing_impl_dir_subc" + help = "Generate error for missing implementation directory" + + [[command.subcommand]] + name = "missing_impl_file" + help = "Generate error for implementation module file" + + [[command.subcommand]] + name = "test_missing_run_function" + help = "Generate error for a missing run function" + + [[command.subcommand]] + name = "test_exception_in_run" + help = "Generate error for an exception during execution" diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/__init__.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/error_cases/test_exception_in_run.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/error_cases/test_exception_in_run.py new file mode 100644 index 00000000..3503dc2c --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/error_cases/test_exception_in_run.py @@ -0,0 +1,2 @@ +def run(**args): + raise RuntimeError("Raising run time error in 'test_exception_in_run'") \ No newline at end of file diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/error_cases/test_missing_run_function.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/error_cases/test_missing_run_function.py new file mode 100644 index 00000000..b6266f9d --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/error_cases/test_missing_run_function.py @@ -0,0 +1 @@ +# Purposefully missing 'run' method \ No newline at end of file diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/nested_common.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/nested_common.py new file mode 100644 index 00000000..ef27cd63 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/nested_common.py @@ -0,0 +1,2 @@ +def say_hi(lvl): + print(f"Hi from 'cmd_tester' level {lvl}!") diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/python_no_app_tests.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/python_no_app_tests.py new file mode 100644 index 00000000..019604b5 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/python_no_app_tests.py @@ -0,0 +1,2 @@ +def run(**args): + print("Hi from No-App Origen!!") diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py new file mode 100644 index 00000000..2ac3dc5c --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py @@ -0,0 +1,16 @@ +# FOR_PR switch to common method. Use nested_common as example for using common functions when running +from test_apps_shared_test_helpers.cli import output_args + +def run(**args): + if len(args) > 0: + print(output_args(None, args)) + else: + print("No args or opts given!") + +# def run(**args): +# print(f"Arg Keys: {list(args.keys())}") +# if len(args) > 0: +# for n, arg in args.items(): +# print(f"Arg: {n} ({arg.__class__}): {arg}") +# else: +# print("No args or opts given!") diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/args_with_value_names.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/args_with_value_names.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/args_with_value_names.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/delim_multi_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/delim_multi_arg.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/delim_multi_arg.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/display_verbosity_opts.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/display_verbosity_opts.py new file mode 100644 index 00000000..9deb0a86 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/display_verbosity_opts.py @@ -0,0 +1,6 @@ +import origen + +def run(**args): + print(f"verbosity: {origen.logger.verbosity}") + print(f"keywords: {origen.logger.keywords}") + print(f"Args: {args}") diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/flag_opts.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/flag_opts.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/flag_opts.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/hidden_opt.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/hidden_opt.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/hidden_opt.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_arg.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_arg.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_opts.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_opts.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_opts.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/no_args_or_opts.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/no_args_or_opts.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/no_args_or_opts.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/optional_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/optional_arg.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/optional_arg.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_aliases.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_aliases.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_aliases.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_value_names.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_value_names.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_value_names.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/required_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/required_arg.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/required_arg.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_and_multi_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_and_multi_arg.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_and_multi_arg.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_optional_opt.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_optional_opt.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_optional_opt.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_required_opt.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_required_opt.py new file mode 100644 index 00000000..aa93dc47 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_required_opt.py @@ -0,0 +1,4 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) + +from test_arguments import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_current_command.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_current_command.py new file mode 100644 index 00000000..7188bb8b --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_current_command.py @@ -0,0 +1,9 @@ +# FOR_PR not sure if needed +import origen + +def run(**kwargs): + cc = origen.current_command + print(f"Class: {cc.__class__.__name__}") + print(f"Command: {cc.command}") + print(f"SubCommands: {cc.subcommands}") + print(f"Args: {cc.args}") diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1.py new file mode 100644 index 00000000..718ad305 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1.py @@ -0,0 +1,7 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent)) + +from nested_common import say_hi + +def run(**args): + say_hi(1) diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1.test_nested_level_2.test_nested_level_3_b.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1.test_nested_level_2.test_nested_level_3_b.py new file mode 100644 index 00000000..51e7354f --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1.test_nested_level_2.test_nested_level_3_b.py @@ -0,0 +1,6 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent)) +from nested_common import say_hi + +def run(**args): + say_hi("3 (B)") diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1/test_nested_level_2.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1/test_nested_level_2.py new file mode 100644 index 00000000..c90682ec --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1/test_nested_level_2.py @@ -0,0 +1,6 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent)) +from nested_common import say_hi + +def run(**args): + say_hi(2) diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1/test_nested_level_2/test_nested_level_3_a.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1/test_nested_level_2/test_nested_level_3_a.py new file mode 100644 index 00000000..d2ea18fd --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_nested_level_1/test_nested_level_2/test_nested_level_3_a.py @@ -0,0 +1,6 @@ +import sys, pathlib +sys.path.append(str(pathlib.Path(__file__).parent.parent.parent)) +from nested_common import say_hi + +def run(**args): + say_hi("3 (A)") diff --git a/test_apps/python_no_app/tests/cmd_building/shared.py b/test_apps/python_no_app/tests/cmd_building/shared.py new file mode 100644 index 00000000..9009ecfa --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/shared.py @@ -0,0 +1,159 @@ +import pytest, shutil, os +from origen.helpers.env import run_cli_cmd +from origen.helpers.regressions import cli +# from origen.helpers.regressions.cli import cmd +# from origen.helpers.regressions.cli import CLI +# from origen.helpers.regressions.cli import Cmd as CmdBase +# from origen.helpers.regressions.cli import CmdArgOpt as CmdArgOptBase +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg + +# class Cmd(cli.cmd.Cmd): +# # def __init__(self, name, help=None, args=None, opts=None): +# # self.name = name +# # self.help = help +# # self.args = dict([[arg.name, arg] for arg in (args or [])]) +# # self.opts = dict([[opt.name, opt] for opt in (opts or [])]) +# def __init__(self, *args, **kwargs): +# cli.cmd.Cmd.__init__(self, *args, **kwargs) + +# # def get_help_msg_str(self): +# # return CLICommon.run_test_args_cmd_help(self.name) + +# # def get_help_msg(self): +# # return CLICommon.HelpMsg(self.get_help_msg_str()) + +# # def run(self, *args): +# # return CLICommon.run_test_args_cmd(self.name, *args) + +# # def gen_error(self, *args): +# # return CLICommon.run_test_args_cmd(self.name, *args, expect_fail=True)["stderr"] + +# # def __getattr__(self, name: str): +# # if hasattr(self, 'args') and (name in self.args): +# # return self.args[name] +# # elif hasattr(self, 'opts') and (name in self.opts): +# # return self.opts[name] +# # return object.__getattribute__(self, name) + +# @classmethod +# def parse_arg_keys(cls, cmd_output): +# return eval(cmd_output.split("Arg Keys: ", 1)[1].split("\n")[0]) + +# class CmdArgOpt(cli.cmd.CmdArgOpt): +# def to_assert_str(self, vals): +# if self.multi: +# c = list +# elif isinstance(vals, int): +# c = int +# else: +# c = str +# return f"Arg: {self.name} ({c}): {vals}" + +# class CmdArg(cli.cmd.CmdArg, CmdArgOpt): +# pass + +# class CmdOpt(cli.cmd.CmdOpt, CmdArgOpt): +# pass + +class CLICommon(CLIShared): + # cmdn__cmd_testers = "cmd_testers" + # cmdn__test_args = "test_arguments" + # cmdn__error_cases = "error_cases" + + # cmd_base = [cli.CLI.common_names.aux_cmds, cmdn__cmd_testers] + # arg_cmd_base = [*cmd_base, "test_arguments"] + # verbosity_cmd = [*cmd_base, "display_cc_verbosity"] + + # Custom message from testing args/opts. + no_args_or_opts_msg = "No args or opts given!" + + # cmd_testers_cmd = cli.CLI.aux_sub_cmd(cmdn__cmd_testers) + + # @classmethod + # def cmd_testers_sub_cmd(cls, *args, cmd_path=None, **kwargs): + # return cls.aux_sub_cmd( + # cmd_path=[cls.cmdn__cmd_testers, *(cmd_path or [])], + # *args, + # **kwargs + # ) + + # @classmethod + # def test_args_sub_cmd(cls, *args, cmd_path=None, **kwargs): + # return cls.aux_sub_cmd( + # cmd_path=[cls.cmdn__cmd_testers, cls.cmdn__test_args, *(cmd_path or [])], + # *args, + # **kwargs + # ) + + # @classmethod + # @property + # def err_cases_cmd(cls): + # return cls.cmd_testers_sub_cmd(cls.cmdn__error_cases) + + # @classmethod + # def run_test_args_cmd(cls, cmd, *args, expect_fail=False): + # return run_cli_cmd( + # [*cls.arg_cmd_base, cmd, *args], + # expect_fail=expect_fail, + # return_details=expect_fail + # ) + + # @classmethod + # def run_test_args_cmd_help(cls, cmd): + # return run_cli_cmd([*cls.arg_cmd_base, cmd, "-h"]) + + # @classmethod + # def run_display_verbosity_cmd(cls, *args): + # return run_cli_cmd(cls.verbosity_cmd + list(args)) + + # @staticmethod + # def assert_arg(arg, sn=None, ln=None, value_name=None, help=None, short_aliases=None, long_aliases=None): + # if sn is not False: + # assert arg["short_name"] == sn + # if ln is not False: + # assert arg["long_name"] == ln + # if value_name is not False: + # if value_name is None: + # assert arg["value_name"] is None + # assert arg["multiple_values"] is None + # else: + # assert arg["value_name"] == value_name[0] + # assert arg["multiple_values"] == value_name[1] + # if help is not False: + # assert arg["help"] == help + # if short_aliases is not False: + # assert arg['short_aliases'] == short_aliases + # if long_aliases is not False: + # assert arg['long_aliases'] == long_aliases + + # @classmethod + # def assert_help_arg(cls, arg): + # return cls.assert_arg(arg, 'h', "help", None, "Print help information") + + # @classmethod + # def assert_verbose_arg(cls, arg): + # return cls.assert_arg(arg, 'v', None, None, "Terminal verbosity level e.g. -v, -vv, -vvv") + + # @classmethod + # def assert_vk_arg(cls, arg): + # return cls.assert_arg(arg, 'k', None, ("verbosity_keywords", True), "Keywords for verbose listeners") + + @pytest.fixture + def with_cli_aux_cmds(self): + shutil.copy(self.dummy_config, self.cli_config) + shutil.copy(self.cli_aux_cmds_toml, self.cli_dir) + shutil.copytree(self.cli_aux_cmds_impl, self.cli_dir.joinpath("aux_cmds_from_cli_dir"), dirs_exist_ok=True) + yield + os.remove(self.cli_config) + os.remove(self.cli_dir.joinpath("aux_cmds_from_cli_dir.toml")) + shutil.rmtree(self.cli_dir.joinpath("aux_cmds_from_cli_dir")) + + @classmethod + def parse_subcmd_help_dialogue(cls, msg_str): + return CLICommon.HelpMsg(msg_str) + + +# class AuxCmd(): +# ... + + diff --git a/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py b/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py new file mode 100644 index 00000000..afd062b4 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py @@ -0,0 +1,270 @@ +import pytest +from .shared import CLICommon +from test_apps_shared_test_helpers.cli import CmdArg + +class Common(CLICommon): + cmdn__no_args_or_opts = "no_args_or_opts" + cmdn__optional_arg = "optional_arg" + cmdn__required_arg = "required_arg" + cmdn__multi_arg = "multi_arg" + cmdn__delim_multi_arg = "delim_multi_arg" + cmdn__single_and_multi_arg = "single_and_multi_arg" + cmdn__args_with_value_names = "args_with_value_names" + + # cmds = { + # cmdn__no_args_or_opts: CLICommon.test_args_sub_cmd( + # cmdn__no_args_or_opts, + # help="Command taking no arguments or options" + # ), + # cmdn__optional_arg: CLICommon.test_args_sub_cmd( + # cmdn__optional_arg, + # help="Command taking a single, optional argument", + # args=[CmdArg("single_val", "Single value")], + # ), + # cmdn__required_arg: CLICommon.test_args_sub_cmd( + # cmdn__required_arg, + # help="Command taking a required and optional arg", + # args=[ + # CmdArg("required_val", "Single required value", required=True), + # CmdArg("optional_val", "Single optional value") + # ], + # ), + # cmdn__multi_arg: CLICommon.test_args_sub_cmd( + # cmdn__multi_arg, + # help="Command taking a multi-arg", + # args=[ + # CmdArg("multi_arg", "Multi-arg value", True) + # ], + # ), + # cmdn__delim_multi_arg: CLICommon.test_args_sub_cmd( + # cmdn__delim_multi_arg, + # help="Command taking a delimited multi-arg", + # args=[ + # CmdArg("delim_m_arg", "Delimited Multi-arg value ('multiple' implied)", True) + # ], + # ), + # cmdn__single_and_multi_arg: CLICommon.test_args_sub_cmd( + # cmdn__single_and_multi_arg, + # help="Command taking a single and multi-arg", + # args=[ + # CmdArg("single_val", "Single value"), + # CmdArg("multi_arg", "Multi-arg value", True) + # ], + # ), + # cmdn__args_with_value_names: CLICommon.test_args_sub_cmd( + # cmdn__args_with_value_names, + # help="Single and multi arg with value custom value names", + # args=[ + # CmdArg("s_arg", "Single value arg with custom value name", value_name="Single Arg Val"), + # CmdArg("m_arg", "Multi value arg with custom value name", True, value_name="Multi Arg Val") + # ], + # ), + # } + + @pytest.fixture + def cmd(self): + return getattr(self.cmd_testers.test_args, self.cmdn) + +class T_ArgBuilding(Common): + @pytest.fixture + def sv(self): + return "single_arg_value" + + @pytest.fixture + def rv(self): + return "required" + + @pytest.fixture + def m0(self): + return "m0" + + @pytest.fixture + def m1(self): + return "m1" + + @pytest.fixture + def m2(self): + return "m2" + + def test_no_args_available(self): + # cmd = self.cmds[self.cmdn__no_args_or_opts] + cmd = self.cmd_testers.test_args.no_args_or_opts + help = cmd.get_help_msg() + # # help = self.parse_subcmd_help_dialogue(self.run_opt_cmd_help(self.cmd__sv_opt_arg)) + # assert len(help.args) == 0 + # assert len(help.opts) == 3 + help.assert_num_args(0) + help.assert_num_opts(3) + + help.assert_help_opt_at(0) + help.assert_vk_opt_at(1) + help.assert_v_opt_at(2) + # self.assert_help_arg(help['opts'][0]) + # self.assert_vk_arg(help['opts'][1]) + # self.assert_verbose_arg(help['opts'][2]) + + # out = self.run_test_args_cmd(self.cmd__sv_opt_arg) + out = cmd.run() + assert self.no_args_or_opts_msg in out + + class TestSingleOptionArg(Common): + cmdn = Common.cmdn__optional_arg + + def test_help_msg(self, cmd): + help = cmd.get_help_msg() + help.assert_num_args(1) + help.assert_num_opts(3) + help.assert_arg_at(0, cmd.single_val) + + def test_no_args(self, cmd): + # Try with no args + out = cmd.run() + assert self.no_args_or_opts_msg in out + + def test_single_arg_given(self, cmd, sv): + # Try with single arg given + out = cmd.run(sv) + assert cmd.single_val.to_assert_str(sv) in out + # self.assert_arg_present(cmd.optional_arg, sv, str) in out + + def test_error_on_two_args_given(self, cmd, sv): + # Two args should generate error + another_sv = f"another_{sv}" + out = cmd.gen_error(sv, another_sv) + assert self.err_msgs.too_many_args(another_sv) in out + + class TestSingleRequiredArg(Common): + cmdn = Common.cmdn__required_arg + + def test_help_msg(self, cmd): + help = cmd.get_help_msg() + help.assert_num_args(2) + help.assert_num_opts(3) + help.assert_arg_at(0, cmd.required_val) + help.assert_arg_at(1, cmd.optional_val) + + def test_error_on_missing_required_arg(self, cmd): + # No args should generate error + out = cmd.gen_error() + assert self.err_msgs.missing_required_arg(cmd.required_val) in out + + def test_req_arg_given(self, cmd, rv): + # Single required arg + out = cmd.run(rv) + assert cmd.required_val.to_assert_str(rv) in out + + def test_req_and_optional_arg_given(self, cmd, rv): + # Required and optional arg + ov = "optional" + out = cmd.run(rv, ov) + assert cmd.required_val.to_assert_str(rv) in out + assert cmd.optional_val.to_assert_str(ov) in out + + class TestMultiArg(Common): + cmdn = Common.cmdn__multi_arg + + def test_help_msg(self, cmd): + help = cmd.get_help_msg() + help.assert_num_args(1) + help.assert_num_opts(3) + help.assert_arg_at(0, cmd.multi_arg) + + def test_no_args(self, cmd): + # Try with no args + out = cmd.run() + assert self.no_args_or_opts_msg in out + + def test_one_arg(self, cmd, m0): + # Try with one arg + out = cmd.run(m0) + assert cmd.multi_arg.to_assert_str([m0]) in out + + def test_three_args(self, cmd, m0, m1, m2): + # Try with three args + out = cmd.run(m0, m1, m2) + cmd.multi_arg.to_assert_str([m0, m1, m2]) in out + + def test_delimiter_is_not_default(self, cmd, m0, m1, m2): + # No delimiter by default, so this should all look like a single value + out = cmd.run(f"{m0},{m1},{m2}") + assert cmd.multi_arg.to_assert_str([f"{m0},{m1},{m2}"]) in out + + class TestDelimitedMultiArg(Common): + cmdn = Common.cmdn__delim_multi_arg + + def test_help_msg(sel, cmd): + help = cmd.get_help_msg() + help.assert_num_args(1) + help.assert_num_opts(3) + help.assert_arg_at(0, cmd.delim_m_arg) + + def test_no_args(self, cmd): + # Try with no args + out = cmd.run() + assert self.no_args_or_opts_msg in out + + def test_one_arg(self, cmd, m0): + # Try with one arg + out = cmd.run(m0) + assert cmd.delim_m_arg.to_assert_str([m0]) in out + + def test_three_non_delimited_args(self, cmd, m0, m1, m2): + # Try with three args + out = cmd.run(m0, m1, m2) + assert cmd.delim_m_arg.to_assert_str([m0, m1, m2]) in out + + def test_three_delimited_args(self, cmd, m0, m1, m2): + # Use delimiter to split up values + out = cmd.run(f"{m0},{m1},{m2}") + assert cmd.delim_m_arg.to_assert_str([m0, m1, m2]) in out + + class TestArgsWithValueNames(Common): + cmdn = Common.cmdn__args_with_value_names + + def test_help_msg(self, cmd): + help = cmd.get_help_msg() + help.assert_num_args(2) + help.assert_num_opts(3) + help.assert_arg_at(0, cmd.s_arg) + help.assert_arg_at(1, cmd.m_arg) + + def test_value_names(self, cmd): + sv ="single_val" + m0 = "m0_val" + m1 = "m1_val" + out = cmd.run(sv, m0, m1) + assert cmd + assert cmd.s_arg.to_assert_str(sv) in out + assert cmd.m_arg.to_assert_str([m0, m1]) in out + + class TestCombinedSingleAndMultiArgs(Common): + cmdn = Common.cmdn__single_and_multi_arg + + def test_help_msg(self, cmd): + help = cmd.get_help_msg() + help.assert_num_args(2) + help.assert_num_opts(3) + help.assert_arg_at(0, cmd.single_val) + help.assert_arg_at(1, cmd.multi_arg) + + def test_no_args(self, cmd): + # Try no args + out = cmd.run() + assert self.no_args_or_opts_msg in out + + def test_single__arg(self, cmd, sv): + # Try single arg only + out = cmd.run(sv) + assert cmd.single_val.to_assert_str(sv) in out + + def test_two_args(self, cmd, sv, m0): + # Try two args + out = cmd.run(sv, m0) + assert cmd.single_val.to_assert_str(sv) in out + assert cmd.multi_arg.to_assert_str([m0]) in out + + def test_three_args(self, cmd, sv, m0, m1): + # Try three args + out = cmd.run(sv, m0, m1) + assert cmd.single_val.to_assert_str(sv) in out + assert cmd.multi_arg.to_assert_str([m0, m1]) in out diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py new file mode 100644 index 00000000..547895ae --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py @@ -0,0 +1,212 @@ +import pytest, os +from .shared import CLICommon +from tests.test_configs import Common as ConfigCommmon +from origen.helpers.env import run_cli_cmd + +class T_LoadingAuxCommands(CLICommon, ConfigCommmon): + # cmdn_nested_l1 = "test_nested_level_1" + # cmdn_nested_l2 = "test_nested_level_2" + # cmdn_nested_l3a = "test_nested_level_3_a" + # cmdn_nested_l3b = "test_nested_level_3_b" + + # nested_l1_cmd = CLICommon.Cmd(cmdn_nested_l1, CLICommon.cmd_base) + # nested_l2_cmd = CLICommon.Cmd(cmdn_nested_l2, [*CLICommon.cmd_base, cmdn_nested_l1]) + # nested_l3a_cmd = CLICommon.Cmd(cmdn_nested_l3a, [*CLICommon.cmd_base, cmdn_nested_l1, cmdn_nested_l2]) + # nested_l3b_cmd = CLICommon.Cmd(cmdn_nested_l3b, [*CLICommon.cmd_base, cmdn_nested_l1, cmdn_nested_l2]) + + def test_aux_commands_are_added(self): + help = self.global_cmds.aux_cmds.get_help_msg() # run_cli_cmd(["auxillary_commands", "-h"]) + # help = self.parse_subcmd_help_dialogue(out) + # assert list(help.subcmds.keys()) == ["cmd_testers", "help", "python_no_app_aux_cmds"] + help.assert_subcmds( + self.cmd_testers_cmd, + 'help', + self.aux.ns.python_no_app_aux_cmds.base_cmd + ) + + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "python_no_app_tests"]) + out = self.cmd_testers_cmd.run("python_no_app_tests") + assert "Hi from No-App Origen!!" in out + + def test_aux_commands_stack(self, with_cli_aux_cmds): + # Copy origen config, commands toml, and commands to package root + # shutil.copy(self.dummy_config, self.cli_config) + # shutil.copy(, self.cli_config) + # try: + # out = run_cli_cmd(["auxillary_commands", "-h"]) + # print(out) + # # from pathlib import WindowsPath, PosixPath + # # configs = eval(out) + # # retn = in_new_origen_proc(mod=config_funcs) + # finally: + # os.remove(self.cli_config) + + # out = run_cli_cmd(["auxillary_commands", "-h"]) + # help = self.parse_subcmd_help_dialogue(out) + help = self.global_cmds.aux_cmds.get_help_msg() + help.assert_subcmds( + self.aux.ns.aux_cmds_from_cli_dir.base_cmd, + self.cmd_testers_cmd, + 'help', + self.aux.ns.python_no_app_aux_cmds.base_cmd + ) + # assert list(help.subcmds.keys()) == ["aux_cmds_from_cli_dir", "cmd_testers", "help", "python_no_app_aux_cmds"] + + # out = self.global_cmds.aux_cmds.run("aux_cmds_from_cli_dir", "cli_dir_says_hi") + out = self.aux.ns.aux_cmds_from_cli_dir.base_cmd.cli_dir_says_hi.run() + assert "Hi from CLI dir!! " in out + + # TODO Add another toml in the environment + # out = run_cli_cmd(["auxillary_commands", "-h"]) + # help = self.parse_subcmd_help_dialogue(out) + # assert list(help["subcmds"].keys()) == ["aux_cmds_from_cli_dir", "cmd_testers", "help", "python_no_app_aux_cmds"] + + @pytest.mark.xfail + def test_aux_command_tree_view(self): + fail + + class TestNestedCommands(CLICommon): + def test_first_level_nested_aux_commands(self): + # Try first level + help = self.cmd_testers_cmd.get_help_msg() + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "-h"]) + # help = self.parse_subcmd_help_dialogue(out) + # assert list(help.subcmds.keys()) == [ + # "error_cases", + # "help", + # "python_no_app_tests", + # "test_arguments", + # "test_current_command", + # "test_nested_level_1" + # ] + subcs = list(self.cmd_testers_cmd.subcmds.values()) + subcs.insert(1, "help") + help.assert_subcmds(*subcs) + + out = self.cmd_testers.subc_l1.run() + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1"]) + assert "Hi from 'cmd_tester' level 1!" in out + + def test_second_level_nested_aux_commands(self): + # Try second level + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "-h"]) + # help = self.parse_subcmd_help_dialogue(out) + help = self.cmd_testers.subc_l1.get_help_msg() + help.assert_subcmds("help", self.cmd_testers.subc_l2) + # assert list(help.subcmds.keys()) == ["help", "test_nested_level_2"] + + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "test_nested_level_2"]) + out = self.cmd_testers.subc_l2.run() + assert "Hi from 'cmd_tester' level 2!" in out + + def test_third_level_nested_aux_commands(self): + # Try third level + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "test_nested_level_2", "-h"]) + # help = self.parse_subcmd_help_dialogue(out) + help = self.cmd_testers.subc_l2.get_help_msg() + help.assert_subcmds("help", self.cmd_testers.subc_l3_a, self.cmd_testers.subc_l3_b) + # assert list(help.subcmds.keys()) == ["help", "test_nested_level_3_a", "test_nested_level_3_b"] + + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "test_nested_level_2", "test_nested_level_3_a"]) + out = self.cmd_testers.subc_l3_a.run() + assert "Hi from 'cmd_tester' level 3 (A)!" in out + + def test_third_level_nested_aux_commands_modulized_path(self): + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "test_nested_level_2", "test_nested_level_3_b"]) + out = self.cmd_testers.subc_l3_b.run() + assert "Hi from 'cmd_tester' level 3 (B)!" in out + + # TODO need to consolidate with other similar tests + class TestErrorCases(CLICommon, ConfigCommmon): + def test_conflicting_namespaces(self): + orig_config = self.aux_cmd_configs_dir.joinpath("add_aux_cmd_config.toml") + conflicting_config = self.aux_cmd_configs_dir.joinpath("conflicting_namespaces_config.toml") + out = self.global_cmds.aux_cmds.get_help_msg_str(with_configs=[conflicting_config, orig_config]) + # out = run_cli_cmd( + # ["auxillary_commands", "-h"], + # with_configs=[ + # conflicting_config, + # orig_config, + # ] + # ) + # help = self.parse_subcmd_help_dialogue(out) + help = self.HelpMsg(out) + # assert list(help.subcmds.keys()) == ["add_aux_cmd", "cmd_testers", "help", "python_no_app_aux_cmds"] + help.assert_subcmds( + self.aux.ns.add_aux_cmd.base_cmd, + self.cmd_testers_cmd, + "help", + self.aux.ns.python_no_app_aux_cmds.base_cmd + ) + assert "Auxillary commands namespaced 'add_aux_cmd' already exists." in out + assert f"Cannot add namespace from config '{conflicting_config}'" in out + assert f"Namespace first defined in config '{orig_config}'" in out + + @pytest.mark.xfail + def test_conflicting_command_names_within_namespace(self): + fail + + @pytest.mark.xfail + def test_conflicting_subcommand_names_within_namespace(self): + fail + + @pytest.mark.xfail + def test_same_name_commands_in_different_namespace(self): + fail + + @pytest.mark.xfail + def test_same_name_commands_within_namespace_but_different_level(self): + fail + + def test_invalid_aux_path(self): + ''' Should generate a logger error message but not kill the process''' + # out = run_cli_cmd(["auxillary_commands", "-h"], with_configs=self.aux_cmd_configs_dir.joinpath("invalid_aux_cmd_path_config.toml")) + out = self.global_cmds.aux_cmds.get_help_msg_str(with_configs=self.aux_cmd_configs_dir.joinpath("invalid_aux_cmd_path_config.toml")) + help = self.HelpMsg(out) + # assert list(help.subcmds.keys()) == ["add_aux_cmd", "cmd_testers", "help", "python_no_app_aux_cmds"] + help.assert_subcmds( + self.aux.ns.add_aux_cmd.base_cmd, + self.cmd_testers_cmd, + "help", + self.aux.ns.python_no_app_aux_cmds.base_cmd + ) + # assert help.subcmds.keys() == self.aux_base_cmds + assert f"Unable to add auxillary commands at '{self.aux_cmd_configs_dir}{os.sep}./invalid_aux_cmd_path.toml' from config '{self.aux_cmd_configs_dir}{os.sep}invalid_aux_cmd_path_config.toml'. The following error was met" in out + + def test_missing_aux_cmd_impl_dir(self): + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "error_cases", "missing_impl_dir", "missing_impl_dir_subc"], expect_fail=True) + out = self.cmd_testers.error_cases.gen_error("missing_impl_dir", "missing_impl_dir_subc", return_stdout=True) + f = self.cmd_testers_root.joinpath('error_cases/missing_impl_dir/missing_impl_dir_subc.py') + f2 = self.cmd_testers_root.joinpath('error_cases.missing_impl_dir.missing_impl_dir_subc.py') + # print(out) + # print(f"Could not find implementation for auxillary command 'error_cases missing_impl_dir missing_impl_dir_subc' at '{f}' or '{f2}'") + assert f"Could not find implementation for aux command 'error_cases missing_impl_dir missing_impl_dir_subc' at '{f}' or '{f2}'" in out + + def test_missing_aux_cmd_impl_file(self): + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "error_cases", "missing_impl_file"], expect_fail=True) + out = self.cmd_testers.error_cases.gen_error("missing_impl_file", return_stdout=True) + f = self.cmd_testers_root.joinpath('error_cases/missing_impl_file.py') + f2 = self.cmd_testers_root.joinpath('error_cases.missing_impl_file.py') + assert f"Could not find implementation for aux command 'error_cases missing_impl_file' at '{f}' or '{f2}'" in out + + def test_missing_run_function(self): + out = self.cmd_testers.error_cases.gen_error("test_missing_run_function", return_stdout=True) + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "error_cases", "test_missing_run_function"], expect_fail=True) + f = self.cmd_testers_root.joinpath('error_cases/test_missing_run_function.py') + assert f"Could not find 'run' function in module '{f}'" in out + + def test_exception_from_run_function(self): + out = self.cmd_testers.error_cases.gen_error("test_exception_in_run") + # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "error_cases", "test_exception_in_run"], expect_fail=True, return_details=True) + # print(out) + # err = out["stderr"] + assert "test_exception_in_run.py\", line 2" in out + assert "RuntimeError: Raising run time error in 'test_exception_in_run'" in out + + @pytest.mark.xfail + def test_no_help_str_given(self): + fail + + @pytest.mark.xfail + def test_override_help(self): + fail diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py new file mode 100644 index 00000000..f1d8d09d --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py @@ -0,0 +1,202 @@ +import pytest +from .shared import CLICommon, CmdArg, CmdOpt +Cmd = CLICommon.Cmd + +class Common(CLICommon): + pln = "python_plugin" + pln_2nd = "python_plugin_the_second" + pln_no_cmds = "python_plugin_no_cmds" + + pln__cmdn__hi = "plugin_says_hi" + pln__cmdn__echo = "echo" + + # plugin_subcmds = { + # pln: { + # pln__cmdn__hi: Cmd( + # pln__cmdn__hi, + # ["plugin", pln], + # help="Say 'hi' from the python plugin", + # opts=[ + # CmdOpt( + # name="times", + # help="Number of times for the python plugin to say", + # value_name="TIMES", + # ln="times", + # sn="t" + # ), + # CmdOpt( + # name="loudly", + # help="LOUDLY say hi", + # ln="loudly", + # sn="l" + # ), + # CmdOpt( + # name="to", + # help="Specify who should be greeted", + # multi=True, + # ) + # ] + # ), + # pln__cmdn__echo: Cmd( + # pln__cmdn__echo, + # ["plugin", pln], + # help="Echos the input", + # args=[ + # CmdArg( + # name="input", + # help="Input to echo", + # multi=True, + # ) + # ], + # opts=[ + # CmdOpt( + # name="repeat", + # help="Echo again (repeat)", + # ln="repeat", + # sn="r" + # ) + # ] + # ), + # }, + # pln_no_cmds: {}, + # pln_2nd: {}, + # } + + # pl_cmd = Cmd("plugin") + +class T_LoadingPluginCmds(Common): + def test_plugin_cmds_are_added(self): + # TODO is ordering off here? + # help = self.pl_cmd.get_help_msg() + help = self.global_cmds.pl.get_help_msg() + # help.assert_opt_at(0, e_opt) + # assert [pl["name"] for pl in help.subcmds] == [ + # "help", + # self.python_plugin.name, + # self.plugins.python_plugin_no_cmds.name, + # self.plugins.python_plugin_the_second.name + # ] + help.assert_subcmds( + "help", + self.python_plugin.base_cmd, + self.plugins.python_plugin_no_cmds.base_cmd, + self.plugins.python_plugin_the_second.base_cmd + ) + + # def test_plugin_help_msg(self): + # fail + + # def test_no_cmds_present_only_has_help_subcmd(self): + # help = self.cmds["python_plugin_no_cmds"].get_help_msg() + # assert len(help.args) == 0 + # assert len(help.opts) == 0 + # assert list(help.subcmds.keys()) == ["help"] + + class Test_PythonPluginCMDs(Common): + @pytest.fixture + def root_cmd(self): + return self.python_plugin.base_cmd + # return Cmd(self.pln, ["plugin"]) + + @pytest.fixture + def hi_cmd(self): + return self.python_plugin.plugin_says_hi + # return self.plugin_subcmds[self.pln][self.pln__cmdn__hi] + + @pytest.fixture + def echo_cmd(self): + return self.python_plugin.echo + # return self.plugin_subcmds[self.pln][self.pln__cmdn__echo] + + @classmethod + def hi_msg(cls, to=None): + return f"Hi{(' ' + ','.join(to)) if to else ''} from the python plugin!" + + @classmethod + def hi_preface(cls, t=1): + return f"Saying hi {t} time(s)..." + + @classmethod + def echo_msg(cls, *input): + return f"Echoing '" + ','.join(input) + "' from python_plugin" + + def test_help_msg(self, root_cmd): + help = root_cmd.get_help_msg() + print(help.opts) + assert len(help.opts) == 3 + help.assert_help_opt_at(0) + help.assert_vk_opt_at(1) + help.assert_v_opt_at(2) + + # assert len(help.args) == 0 + help.assert_args(None) + help.assert_subcmds(*self.python_plugin.ordered_subcmds) + # assert len(help.subcmds) == 3 + # assert list(help.subcmds.keys()) == [self.pln__cmdn__echo, "help", self.pln__cmdn__hi] + + def test_hi_help_cmd(self, hi_cmd): + help = hi_cmd.get_help_msg() + assert len(help.opts) == 6 + help.assert_help_opt_at(0) + help.assert_vk_opt_at(1) + help.assert_opt_at(2, hi_cmd.loudly) + help.assert_opt_at(3, hi_cmd.times) + help.assert_opt_at(4, hi_cmd.to) + help.assert_v_opt_at(5) + + def test_py_plugin_says_hi(self, hi_cmd): + out = hi_cmd.run() + assert self.hi_preface() in out + assert out.count(self.hi_msg()) == 1 + + def test_py_plugin_says_hi_3_times(self, hi_cmd): + out = hi_cmd.run(hi_cmd.times.sn_to_cli(), "3") + assert self.hi_preface(3) in out + assert out.count(self.hi_msg()) == 3 + + def test_py_plugin_says_hi_loudy_to(self, hi_cmd): + to = ["Scooby", "Shaggy"] + out = hi_cmd.run("--to", *to, "--loudly") + assert self.hi_preface() in out + assert out.count(self.hi_msg(to).upper()) == 1 + + def test_py_plugin_echo(self, echo_cmd): + s = "hello" + out = echo_cmd.run(s) + print(out) + assert out.count(self.echo_msg(s)) == 1 + + def test_py_plugin_echo_multi(self, echo_cmd): + s = ["hello", "there"] + out = echo_cmd.run(*s) + assert out.count(self.echo_msg(*s)) == 1 + + s = ["hello", "there", "repeated"] + out = echo_cmd.run(*s, "-r") + assert out.count(self.echo_msg(*s)) == 2 + + def test_py_plugin_echo_delimited(self, echo_cmd): + s = ["hello", "there", "delimited"] + out = echo_cmd.run(','.join(s), "--repeat") + print(out) + assert out.count(self.echo_msg(*s)) == 2 + + @pytest.mark.skip + def test_nested_cmds(self): + fail + + # class Test_PythonluginThe2ndCMDs(Common): + # pass + + class Test_PythonPluginNoCMDs(Common): + @pytest.fixture + def root_cmd(self): + # return Cmd(self.pln_no_cmds, ["plugin"]) + return self.plugins.python_plugin_no_cmds.base_cmd + + def test_no_cmds_present_only_has_help_subcmd(self, root_cmd): + # help = self.cmds["python_plugin_no_cmds"].get_help_msg() + help = root_cmd.get_help_msg() + help.assert_args(None) + assert len(help.opts) == 3 + help.assert_subcmds(None) diff --git a/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py b/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py new file mode 100644 index 00000000..89da490b --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py @@ -0,0 +1,785 @@ +import pytest +from .shared import CLICommon, CmdOpt + +class Common(CLICommon): + # Hard-coded here to ensure it matches the TOML + cmdn__sv_opt_opt = "single_value_optional_opt" + cmdn__sv_req_opt = "single_value_required_opt" + cmdn__multi_opt = "multi_opts" + cmdn__flag_opts = "flag_opts" + cmdn__opt_vns = "opts_with_value_names" + cmdn__opt_aliases = "opts_with_aliases" + cmdn__hidden_opt = "hidden_opt" + + # cmds = { + # cmdn__sv_opt_opt: CLICommon.test_args_sub_cmd( + # cmdn__sv_opt_opt, + # help="Command taking optional, single option", + # opts=[ + # CmdOpt( + # name="implicit_single_val", + # help='Implicit non-required single value', + # takes_value=True, + # required=False, + # ), + # CmdOpt( + # name="explicit_single_val", + # help='Explicit non-required single value', + # takes_value=True, + # required=False, + # ), + # ] + # ), + # cmdn__sv_req_opt: CLICommon.test_args_sub_cmd( + # cmdn__sv_req_opt, + # help="Command with single-value optional and required options", + # opts=[ + # CmdOpt( + # name="non_req_val", + # help="Non-required single value", + # takes_value=True, + # ), + # CmdOpt( + # name="req_val", + # help="Required single value", + # takes_value=True, + # required=True, + # ), + # ] + # ), + # cmdn__multi_opt: CLICommon.test_args_sub_cmd( + # cmdn__multi_opt, + # help="Command with multi-value optional and required options", + # opts=[ + # CmdOpt( + # name="m_opt", + # help="Opt with multiple values", + # multi=True, + # ), + # CmdOpt( + # name="im_m_opt", + # help="Opt accepting multiple values were 'takes value' is implied", + # multi=True, + # ), + # CmdOpt( + # name="req_m_opt", + # help="Required opt accepting multiple values", + # multi=True, + # required=True, + # ), + # CmdOpt( + # name="d_m_opt", + # help="Delimited multi opt", + # multi=True, + # ), + # CmdOpt( + # name="d_im_m_opt", + # help="Delimited opt where 'multi' and 'takes value' is implied", + # multi=True, + # ), + # ] + # ), + # cmdn__flag_opts: CLICommon.test_args_sub_cmd( + # cmdn__flag_opts, + # help="Command with flag-style options only", + # opts=[ + # CmdOpt( + # name="im_f_opt", + # help="Stackable flag opt with 'takes value=false' implied", + # ), + # CmdOpt( + # name="ex_f_opt", + # help="Stackable flag opt with 'takes value=false' set", + # ), + # ] + # ), + # cmdn__opt_vns: CLICommon.test_args_sub_cmd( + # cmdn__opt_vns, + # help="Command with single/multi-opts with custom value names", + # opts=[ + # CmdOpt( + # name="s_opt_nv_im_tv", + # help="Single opt with value name, implying 'takes_value'=true", + # value_name="s_val_impl", + # ), + # CmdOpt( + # name="s_opt_nv_ex_tv", + # help="Single opt with value name and explicit 'takes_value'=true", + # value_name="s_val_expl", + # takes_value=True, + # ), + # CmdOpt( + # name="m_opt_named_val", + # help="Multi-opt with value name", + # value_name="m_val", + # multi=True, + # ), + # CmdOpt( + # name="s_opt_ln_nv", + # help="Single opt with long name and value name", + # value_name="ln_nv", + # ), + # ] + # ), + # cmdn__opt_aliases: CLICommon.test_args_sub_cmd( + # cmdn__opt_aliases, + # help="Command with option aliasing, custom long, and short names", + # opts=[ + # CmdOpt( + # name="single_opt", + # help="Single opt with long/short name", + # takes_value=True, + # ln="s_opt", + # sn="s" + # ), + # CmdOpt( + # name="multi_opt", + # help="Multi-opt with long/short name", + # takes_value=True, + # multi=True, + # ln="m_opt", + # sn="m" + # ), + # CmdOpt( + # name="occurrence_counter", + # help="Flag opt with long/short name", + # ln="cnt", + # sn="o", + # ), + # CmdOpt( + # name="flag_opt_short_name", + # help="Flag opt with short name only", + # sn="f" + # ), + # CmdOpt( + # name="flag_opt_long_name", + # help="Flag opt with long name only", + # ln="ln_f_opt" + # ), + # CmdOpt( + # name="flag_opt_dupl_ln_sn", + # help="Flag opt with ln matching another's sn", + # ln="f" + # ), + # CmdOpt( + # name="fo_sn_aliases", + # help="Flag opt with short aliases", + # sn_aliases=['a', 'b'] + # ), + # CmdOpt( + # name="fo_sn_and_aliases", + # help="Flag opt with short name and short aliases", + # sn="c", + # sn_aliases=['d', 'e'] + # ), + # CmdOpt( + # name="fo_ln_aliases", + # help="Flag opt with long aliases", + # ln_aliases=['fa', 'fb'] + # ), + # CmdOpt( + # name="fo_ln_and_aliases", + # help="Flag opt with long name and long aliases", + # ln="fc", + # ln_aliases=['fd', 'fe'] + # ), + # CmdOpt( + # name="fo_sn_ln_aliases", + # help="Flag opt with long and short aliases", + # ln_aliases=['sn_ln_1', 'sn_ln_2'], + # sn_aliases=['z'], + # ), + # ] + # ), + # cmdn__hidden_opt: CLICommon.test_args_sub_cmd( + # cmdn__hidden_opt, + # help="Command with a hidden opt", + # opts=[ + # CmdOpt( + # name="hidden_opt", + # help="Hidden opt", + # hidden=True, + # ), + # CmdOpt( + # # name="non_hidden_opt", + # name="visible_opt", + # help="Visible, non-hidden, opt", + # ), + # ] + # ), + # } + + # TODO consolidate this with arg building. or remove + @pytest.fixture + def cmd(self): + return getattr(self.cmd_testers.test_args, self.cmdn) + +class T_OptBuilding(Common): + + class TestOptionSingleValueOpts(Common): + cmdn = Common.cmdn__sv_opt_opt + + @pytest.fixture + def e_opt(self, cmd): + return cmd.explicit_single_val + + @pytest.fixture + def i_opt(self, cmd): + return cmd.implicit_single_val + + @pytest.fixture + def ev(self): + return "expl_value" + + @pytest.fixture + def iv(self): + return "impl_value" + + def test_help_msg(self, cmd, e_opt, i_opt): + help = cmd.get_help_msg() + help.assert_opt_at(0, e_opt) + help.assert_opt_at(2, i_opt) + + def test_expl_sv_opt(self, cmd, e_opt, ev): + out = cmd.run(e_opt.ln_to_cli(), ev) + assert e_opt.to_assert_str(ev) in out + assert cmd.parse_arg_keys(out) == [e_opt.name] + + def test_impl_sv_opt(self, cmd, i_opt, iv): + out = cmd.run(i_opt.ln_to_cli(), iv) + assert i_opt.to_assert_str(iv) in out + assert cmd.parse_arg_keys(out) == [i_opt.name] + + def test_both_opts(self, cmd, e_opt, i_opt, ev, iv): + out = cmd.run(i_opt.ln_to_cli(), iv, e_opt.ln_to_cli(), ev) + assert e_opt.to_assert_str(ev) in out + assert i_opt.to_assert_str(iv) in out + assert cmd.parse_arg_keys(out) == [i_opt.name, e_opt.name] + + def test_both_opts_in_reverse_order(self, cmd, e_opt, i_opt, ev, iv): + out = cmd.run(e_opt.ln_to_cli(), ev, i_opt.ln_to_cli(), iv) + assert e_opt.to_assert_str(ev) in out + assert i_opt.to_assert_str(iv) in out + assert cmd.parse_arg_keys(out) == [i_opt.name, e_opt.name] + + def test_error_on_multi_opt(self, cmd, e_opt, ev): + another_ev = f"another_{ev}" + out = cmd.gen_error(e_opt.ln_to_cli(), ev, another_ev) + assert self.err_msgs.too_many_args(another_ev) in out + + class TestRequiredOpt(Common): + cmdn = Common.cmdn__sv_req_opt + + @pytest.fixture + def o_opt(self, cmd): + return cmd.non_req_val + + @pytest.fixture + def r_opt(self, cmd): + return cmd.req_val + + @pytest.fixture + def ov(self): + return "opt_val" + + @pytest.fixture + def rv(self): + return "req_val" + + def test_help_msg(self, cmd, o_opt, r_opt): + help = cmd.get_help_msg() + help.assert_opt_at(2, o_opt) + help.assert_opt_at(3, r_opt) + + def test_req_opt_given(self, cmd, r_opt, rv): + out = cmd.run(r_opt.ln_to_cli(), rv) + assert r_opt.to_assert_str(rv) in out + assert cmd.parse_arg_keys(out) == [r_opt.name] + + def test_req_and_optional_opt_given(self, cmd, o_opt, r_opt, ov, rv): + out = cmd.run(r_opt.ln_to_cli(), rv, o_opt.ln_to_cli(), ov) + assert r_opt.to_assert_str(rv) in out + assert o_opt.to_assert_str(ov) in out + assert cmd.parse_arg_keys(out) == [o_opt.name, r_opt.name] + + def test_error_on_no_opts_given(self, cmd, r_opt): + out = cmd.gen_error() + assert self.err_msgs.missing_required_arg(r_opt) in out + + def test_error_on_optional_opt_only(self, cmd, r_opt, o_opt, ov): + out = cmd.gen_error(o_opt.ln_to_cli(), ov) + assert self.err_msgs.missing_required_arg(r_opt) in out + + class TestMultiValueOpts(Common): + cmdn = Common.cmdn__multi_opt + + @pytest.fixture + def m_opt(self, cmd): + return cmd.m_opt + + @pytest.fixture + def im_m_opt(self, cmd): + return cmd.im_m_opt + + @pytest.fixture + def req_m_opt(self, cmd): + return cmd.req_m_opt + + @pytest.fixture + def d_m_opt(self, cmd): + return cmd.d_m_opt + + @pytest.fixture + def d_im_m_opt(self, cmd): + return cmd.d_im_m_opt + + @pytest.fixture + def m_opt_v(self): + return ["m0"] + + @pytest.fixture + def im_m_opt_v(self): + return ["mA", "mB", "mC"] + + @pytest.fixture + def req_m_opt_v(self): + return ["r0", "r1"] + + @pytest.fixture + def d_m_opt_v(self): + return ["d0", "d1"] + + @pytest.fixture + def d_im_m_opt_v(self): + return ["i0", "i1", "i2"] + + @pytest.fixture + def m_opt_v_dlim(self): + return "m0" + + @pytest.fixture + def im_m_opt_v_dlim(self): + return "mA,mB,mC" + + @pytest.fixture + def req_m_opt_v_dlim(self): + return "r0,r1" + + @pytest.fixture + def d_m_opt_v_dlim(self): + return "d0,d1" + + @pytest.fixture + def d_im_m_opt_v_dlim(self): + return "i0,i1,i2" + + def test_help_msg(self, cmd, m_opt, im_m_opt, req_m_opt, d_m_opt, d_im_m_opt): + help = cmd.get_help_msg() + help.assert_opt_at(5, m_opt) + help.assert_opt_at(3, im_m_opt) + help.assert_opt_at(6, req_m_opt) + help.assert_opt_at(1, d_m_opt) + help.assert_opt_at(0, d_im_m_opt) + + def test_all_multi_val_opts_given(self, cmd, + m_opt, im_m_opt, req_m_opt, d_m_opt, d_im_m_opt, + m_opt_v, im_m_opt_v, req_m_opt_v, d_m_opt_v, d_im_m_opt_v + ): + out = cmd.run( + m_opt.ln_to_cli(), *m_opt_v, + im_m_opt.ln_to_cli(), *im_m_opt_v, + req_m_opt.ln_to_cli(), *req_m_opt_v, + d_m_opt.ln_to_cli(), *d_m_opt_v, + d_im_m_opt.ln_to_cli(), *d_im_m_opt_v + ) + assert m_opt.to_assert_str(m_opt_v) in out + assert im_m_opt.to_assert_str(im_m_opt_v) in out + assert req_m_opt.to_assert_str(req_m_opt_v) in out + assert d_m_opt.to_assert_str(d_m_opt_v) in out + assert d_im_m_opt.to_assert_str(d_im_m_opt_v) in out + assert cmd.parse_arg_keys(out) == [ + m_opt.name, + im_m_opt.name, + req_m_opt.name, + d_m_opt.name, + d_im_m_opt.name + ] + + def test_delimited_is_not_the_default(self, cmd, + m_opt, im_m_opt, req_m_opt, d_m_opt, d_im_m_opt, + d_m_opt_v, d_im_m_opt_v, + m_opt_v_dlim, im_m_opt_v_dlim, req_m_opt_v_dlim, d_m_opt_v_dlim, d_im_m_opt_v_dlim + ): + out = cmd.run( + m_opt.ln_to_cli(), m_opt_v_dlim, + im_m_opt.ln_to_cli(), im_m_opt_v_dlim, + req_m_opt.ln_to_cli(), req_m_opt_v_dlim, + d_m_opt.ln_to_cli(), d_m_opt_v_dlim, + d_im_m_opt.ln_to_cli(), d_im_m_opt_v_dlim + ) + assert m_opt.to_assert_str([m_opt_v_dlim]) in out + assert im_m_opt.to_assert_str([im_m_opt_v_dlim]) in out + assert req_m_opt.to_assert_str([req_m_opt_v_dlim]) in out + assert d_m_opt.to_assert_str(d_m_opt_v) in out + assert d_im_m_opt.to_assert_str(d_im_m_opt_v) in out + assert cmd.parse_arg_keys(out) == [ + m_opt.name, + im_m_opt.name, + req_m_opt.name, + d_m_opt.name, + d_im_m_opt.name + ] + + def test_multiple_occurrences_stack(self, cmd, m_opt, req_m_opt, m_opt_v, im_m_opt_v, req_m_opt_v): + out = cmd.run( + m_opt.ln_to_cli(), *m_opt_v, + m_opt.ln_to_cli(), *im_m_opt_v, + req_m_opt.ln_to_cli(), *req_m_opt_v, + req_m_opt.ln_to_cli(), *req_m_opt_v, + ) + assert m_opt.to_assert_str([*m_opt_v, *im_m_opt_v]) + assert req_m_opt.to_assert_str([*req_m_opt_v, *req_m_opt_v]) + assert cmd.parse_arg_keys(out) == [m_opt.name, req_m_opt.name] + + def test_error_on_missing_required_opt(self, cmd, req_m_opt): + out = cmd.gen_error() + assert self.err_msgs.missing_required_arg(req_m_opt) in out + + class TestFlagOpts(Common): + cmdn = Common.cmdn__flag_opts + + @pytest.fixture + def e_opt(self, cmd): + return cmd.ex_f_opt + + @pytest.fixture + def i_opt(self, cmd): + return cmd.im_f_opt + + def test_help_msg(self, cmd, e_opt, i_opt): + help = cmd.get_help_msg() + help.assert_opt_at(0, e_opt) + help.assert_opt_at(2, i_opt) + + def test_no_flag_opts_given(self, cmd): + out = cmd.run() + assert self.no_args_or_opts_msg in out + + def test_one_flag_opt_given(self, cmd, e_opt): + out = cmd.run(e_opt.ln_to_cli()) + assert e_opt.to_assert_str(1) in out + + def test_two_flag_opts_given(self, cmd, e_opt, i_opt): + out = cmd.run(e_opt.ln_to_cli(), i_opt.ln_to_cli()) + assert e_opt.to_assert_str(1) in out + assert i_opt.to_assert_str(1) in out + + def test_multiple_occurrences_stack(self, cmd, e_opt, i_opt): + out = cmd.run( + e_opt.ln_to_cli(), + e_opt.ln_to_cli(), + i_opt.ln_to_cli(), + e_opt.ln_to_cli(), + i_opt.ln_to_cli() + ) + assert e_opt.to_assert_str(3) in out + assert i_opt.to_assert_str(2) in out + + def test_error_on_flag_opt_with_value(self, cmd, i_opt): + sv = "single_val" + out = cmd.gen_error(i_opt.ln_to_cli(), sv) + assert self.err_msgs.too_many_args(sv) in out + + class TestOptsWithValueNames(Common): + cmdn = Common.cmdn__opt_vns + + @pytest.fixture + def e_s_opt(self, cmd): + return cmd.s_opt_nv_ex_tv + + @pytest.fixture + def i_s_opt(self, cmd): + return cmd.s_opt_nv_im_tv + + @pytest.fixture + def m_opt(self, cmd): + return cmd.m_opt_named_val + + @pytest.fixture + def ln_s_opt(self, cmd): + return cmd.s_opt_ln_nv + + @pytest.fixture + def sv_e(self): + return "ex_single_val" + + @pytest.fixture + def sv_i(self): + return "im_single_val" + + @pytest.fixture + def mv(self): + return ["mv0", "mv1"] + + def test_help_msg(self, cmd, e_s_opt, i_s_opt, m_opt, ln_s_opt): + help = cmd.get_help_msg() + help.assert_opt_at(5, i_s_opt) + help.assert_opt_at(4, e_s_opt) + help.assert_opt_at(2, m_opt) + help.assert_opt_at(3, ln_s_opt) + + def test_single_value_opt_with_value_name(self, cmd, e_s_opt, i_s_opt, sv_e, sv_i): + out = cmd.run(i_s_opt.ln_to_cli(), sv_i, e_s_opt.ln_to_cli(), sv_e) + assert i_s_opt.to_assert_str(sv_i) in out + assert e_s_opt.to_assert_str(sv_e) in out + assert cmd.parse_arg_keys(out) == [i_s_opt.name, e_s_opt.name] + + def test_multi_value_opt_with_value_name(self, cmd, m_opt, mv): + out = cmd.run(m_opt.ln_to_cli(), *mv) + assert m_opt.to_assert_str(mv) in out + assert cmd.parse_arg_keys(out) == [m_opt.name] + + def test_single_value_opt_with_value_and_long_names(self, cmd, ln_s_opt, sv_i): + out = cmd.run(ln_s_opt.ln_to_cli(), sv_i) + assert ln_s_opt.to_assert_str(sv_i) in out + assert cmd.parse_arg_keys(out) == [ln_s_opt.name] + + class TestOptsWithAliases(Common): + cmdn = Common.cmdn__opt_aliases + + @pytest.fixture + def s_opt(self, cmd): + return cmd.single_opt + + @pytest.fixture + def m_opt(self, cmd): + return cmd.multi_opt + + @pytest.fixture + def oc_opt(self, cmd): + return cmd.occurrence_counter + + @pytest.fixture + def f_sn_opt(self, cmd): + return cmd.flag_opt_short_name + + @pytest.fixture + def f_ln_opt(self, cmd): + return cmd.flag_opt_long_name + + @pytest.fixture + def f_dupl_ln_sn_opt(self, cmd): + return cmd.flag_opt_dupl_ln_sn + + @pytest.fixture + def f_sn_al_opt(self, cmd): + return cmd.fo_sn_aliases + + @pytest.fixture + def f_sn_and_al_opt(self, cmd): + return cmd.fo_sn_and_aliases + + @pytest.fixture + def f_ln_al_opt(self, cmd): + return cmd.fo_ln_aliases + + @pytest.fixture + def f_ln_and_al_opt(self, cmd): + return cmd.fo_ln_and_aliases + + @pytest.fixture + def f_ln_sn_al_opt(self, cmd): + return cmd.fo_sn_ln_aliases + + @pytest.fixture + def tv(self): + return "single_test_val" + + def test_help_msg(self, cmd, + s_opt, m_opt, oc_opt, f_sn_opt, f_ln_opt, + f_dupl_ln_sn_opt, f_ln_al_opt, f_sn_al_opt, + f_sn_and_al_opt, f_ln_and_al_opt, f_ln_sn_al_opt + ): + help = cmd.get_help_msg() + help.assert_num_args(0) + help.assert_num_opts(14) + help.assert_opt_at(12, s_opt) + help.assert_opt_at(10, m_opt) + help.assert_opt_at(11, oc_opt) + help.assert_opt_at(2, f_sn_opt) + help.assert_opt_at(9, f_ln_opt) + help.assert_opt_at(1, f_dupl_ln_sn_opt) + help.assert_opt_at(4, f_ln_al_opt) + help.assert_opt_at(0, f_sn_and_al_opt) + help.assert_opt_at(3, f_ln_and_al_opt) + help.assert_opt_at(5, f_sn_al_opt) + help.assert_opt_at(6, f_ln_sn_al_opt) + + def test_single_val_opt_as_long_name(self, cmd, s_opt, tv): + # Try single opt long name + out = cmd.run(s_opt.ln_to_cli(), tv) + assert s_opt.to_assert_str(tv) in out + assert cmd.parse_arg_keys(out) == [s_opt.name] + + def test_single_val_opt_as_short_name(self, cmd, s_opt, tv): + # Try single opt short name + out = cmd.run(s_opt.sn_to_cli(), tv) + assert s_opt.to_assert_str(tv) in out + assert cmd.parse_arg_keys(out) == [s_opt.name] + + def test_error_on_single_val_opt_name(self, cmd, s_opt, tv): + # Try single opt opt name + # Should fail as ln and sn are used on the CLI + out = cmd.gen_error(f"--{s_opt.name}", tv) + assert self.err_msgs.unknown_opt_msg(s_opt) in out + + def test_multi_val_opt_as_long_name(self, cmd, m_opt, tv): + # Try multi opt long name + out = cmd.run(m_opt.ln_to_cli(), tv, tv) + assert m_opt.to_assert_str([tv, tv]) in out + assert cmd.parse_arg_keys(out) == [m_opt.name] + + def test_multi_val_opt_as_short_name(self, cmd, m_opt, tv): + # Try multi opt short name + out = cmd.run(m_opt.sn_to_cli(), tv, tv, tv) + assert m_opt.to_assert_str([tv, tv, tv]) in out + assert cmd.parse_arg_keys(out) == [m_opt.name] + + def test_error_on_multi_val_opt_name(self, cmd, m_opt, tv): + # Try multi opt opt name + # Should fail as ln and sn are used on the CLI + out = cmd.gen_error(f"--{m_opt.name}", tv) + assert self.err_msgs.unknown_opt_msg(m_opt) in out + + def test_multi_val_opt_ln_sn_stacking(self, cmd, m_opt, tv): + # Try multi opt stacking + out = cmd.run( + m_opt.sn_to_cli(), tv, tv, + m_opt.ln_to_cli(), tv, tv, + m_opt.sn_to_cli(), tv + ) + assert m_opt.to_assert_str([tv, tv, tv, tv, tv]) in out + assert cmd.parse_arg_keys(out) == [m_opt.name] + + def test_flag_opt_long_name(self, cmd, oc_opt): + # Try occurrence counter long name + out = cmd.run(oc_opt.ln_to_cli()) + assert oc_opt.to_assert_str(1) in out + assert cmd.parse_arg_keys(out) == [oc_opt.name] + + def test_flag_opt_short_name(self, cmd, oc_opt): + # Try occurrence counter short name + out = cmd.run(oc_opt.sn_to_cli()) + assert oc_opt.to_assert_str(1) in out + + def test_flag_opt_ln_sn_stacking(self, cmd, oc_opt): + # Try occurrence counter with both short and long name + out = cmd.run(oc_opt.sn_to_cli(), oc_opt.ln_to_cli(), oc_opt.sn_to_cli(), oc_opt.ln_to_cli()) + assert oc_opt.to_assert_str(4) in out + + def test_error_on_flag_opt_name(self, cmd, oc_opt): + # Try occurrence counter opt name + out = cmd.gen_error(f"--{oc_opt.name}") + assert self.err_msgs.unknown_opt_msg(oc_opt) in out + + def test_flag_opt_with_short_name_only(self, cmd, f_sn_opt): + # Try flag opt short only + out = cmd.run(f_sn_opt.sn_to_cli()) + assert f_sn_opt.to_assert_str(1) in out + + def test_error_on_short_name_only_opt_name(self, cmd, f_sn_opt): + # Try flag opt short only opt name + # Should generate an error + out = cmd.gen_error(f"--{f_sn_opt.name}") + assert self.err_msgs.unknown_opt_msg(f_sn_opt) in out + + def test_flag_opt_with_long_name_only(self, cmd, f_ln_opt): + # Try flag opt long only + out = cmd.run(f_ln_opt.ln_to_cli()) + assert f_ln_opt.to_assert_str(1) in out + + def test_error_on_long_name_only_opt_name(self, cmd, f_ln_opt): + # Try flag opt long only opt name + # Should generate an error + out = cmd.gen_error(f"--{f_ln_opt.name}") + assert self.err_msgs.unknown_opt_msg(f_ln_opt) in out + + def test_no_conflict_between_ln_and_sn(self, cmd, f_sn_opt, f_dupl_ln_sn_opt): + # Try flag opt long name same as another's short name + out = cmd.run("--f") + assert f_dupl_ln_sn_opt.to_assert_str(1) in out + + out = cmd.run("--f", "-f") + assert f_dupl_ln_sn_opt.to_assert_str(1) in out + assert f_sn_opt.to_assert_str(1) in out + + def test_short_name_aliasing(self, cmd, f_sn_al_opt): + # Try short name aliases + out = cmd.run(f'--{f_sn_al_opt.name}', '-a', '-b') + assert f_sn_al_opt.to_assert_str(3) in out + + def test_sn_with_sn_aliases(self, cmd, f_sn_and_al_opt): + # Try short name with aliases + out = cmd.run('-c', '-d', '-e') + assert f_sn_and_al_opt.to_assert_str(3) in out + + def test_error_on_opt_name_with_sn_and_sn_aliases(self, cmd, f_sn_and_al_opt): + out = cmd.gen_error(f"--{f_sn_and_al_opt.name}", '-d', '-e') + assert self.err_msgs.unknown_opt_msg(f_sn_and_al_opt) in out + + def test_long_name_aliasing(self, cmd, f_ln_al_opt): + # Try long name aliases + out = cmd.run(f"--{f_ln_al_opt.name}", '--fa', '--fb') + assert f_ln_al_opt.to_assert_str(3) in out + + def test_ln_with_ln_aliases(self, cmd, f_ln_and_al_opt): + # Try long name with aliases + out = cmd.run('--fc', '--fd', '--fe') + assert f_ln_and_al_opt.to_assert_str(3) in out + + def test_error_on_opt_name_with_ln_and_ln_aliases(self, cmd, f_ln_and_al_opt): + out = cmd.gen_error(f"--{f_ln_and_al_opt.name}", '--fd', '--fe') + assert self.err_msgs.unknown_opt_msg(f_ln_and_al_opt) in out + + def test_sn_and_ln_aliases_only(self, cmd, f_ln_sn_al_opt): + # Try long/short name aliases + out = cmd.run(f'--{f_ln_sn_al_opt.name}', '-z', '--sn_ln_1', '--sn_ln_2') + assert f_ln_sn_al_opt.to_assert_str(4) in out + + class TestHiddenOpts(Common): + cmdn = Common.cmdn__hidden_opt + + @pytest.fixture + def h_opt(self, cmd): + return cmd.hidden_opt + + @pytest.fixture + def v_opt(self, cmd): + return cmd.visible_opt + + def test_help_msg(self, cmd, v_opt): + help = cmd.get_help_msg() + help.assert_num_args(0) + help.assert_num_opts(4) + help.assert_help_opt_at(0) + help.assert_vk_opt_at(1) + help.assert_opt_at(3, v_opt) + help.assert_v_opt_at(2) + + def test_hidden_opt_is_available(self, cmd, h_opt): + out = cmd.run(h_opt.ln_to_cli()) + assert h_opt.to_assert_str(1) in out + + def test_visible_opt_only(self, cmd, v_opt): + out = cmd.run(v_opt.ln_to_cli()) + assert v_opt.to_assert_str(1) in out + + def test_hidden_and_visible_opt_only(self, cmd, h_opt, v_opt): + out = cmd.run(h_opt.ln_to_cli(), h_opt.ln_to_cli(), v_opt.ln_to_cli()) + assert h_opt.to_assert_str(2) in out + assert v_opt.to_assert_str(1) in out + + def test_error_on_random_opt(self, cmd): + r_opt = "random" + out = cmd.gen_error(f"--{r_opt}") + assert self.err_msgs.unknown_opt_msg(r_opt) in out diff --git a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py new file mode 100644 index 00000000..5ac8fdc3 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py @@ -0,0 +1,46 @@ +from .shared import CLICommon + +class T_StandardOpts(CLICommon): + # cmdn__display_verbosity = "display_verbosity_opts" + # cmd__display_verbosity = CLICommon.test_args_sub_cmd( + # cmdn__display_verbosity, + # help="Displays the verbosity and keywords from the current command" + # ) + + def test_empty_verbosity_is_accessible(self): + out = self.cmd_testers.display_v.run() + assert r'Args: {}' in out + assert "verbosity: 0" in out + + def test_single_verbosity_is_accessible(self): + out = self.cmd_testers.display_v.run("-v") + assert r'Args: {}' in out + assert "verbosity: 1" in out + + def test_stacked_verbosity_is_accessible(self): + out = self.cmd_testers.display_v.run("-vv") + assert r'Args: {}' in out + assert "verbosity: 2" in out + + def test_stacked_split_verbosity_is_accessible(self): + out = self.cmd_testers.display_v.run("-vv", "-v") + assert r'Args: {}' in out + assert "verbosity: 3" in out + + def test_empty_verbosity_keywords_are_accessible(self): + out = self.cmd_testers.display_v.run() + assert r'Args: {}' in out + assert "keywords: []" in out + + def test_verbosity_keywords_are_accessible(self): + out = self.cmd_testers.display_v.run("-k", "t1", "t2", "-v") + assert r'Args: {}' in out + print(out) + assert "keywords: ['t1', 't2']" in out + assert "verbosity: 1" in out + + def test_verbosity_help(self): + help = self.cmd_testers.display_v.get_help_msg() + help.assert_help_opt_at(0) + help.assert_vk_opt_at(1) + help.assert_v_opt_at(2) diff --git a/test_apps/python_no_app/tests/cmd_extensions/__init__.py b/test_apps/python_no_app/tests/cmd_extensions/__init__.py new file mode 100644 index 00000000..c4c5d516 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_extensions/__init__.py @@ -0,0 +1 @@ +# FOR_PR not sure if needed? \ No newline at end of file diff --git a/test_apps/python_no_app/tests/configs/__init__.py b/test_apps/python_no_app/tests/configs/__init__.py new file mode 100644 index 00000000..c2a6d7fe --- /dev/null +++ b/test_apps/python_no_app/tests/configs/__init__.py @@ -0,0 +1,54 @@ +from tests import python_app_shared +with python_app_shared(): + from python_app_tests._shared.for_proc import setenv + +def test_config_dir_from_env_is_added(q, options): + setenv(options['config_dir'], config_name=False) + + import origen + q.put(('files', origen.__config_metadata__['files'])) + +def test_direct_config_from_env_is_added(q, options): + setenv(options['config_toml'], config_name=False) + + import origen + q.put(('files', origen.__config_metadata__['files'])) + +def test_multiple_configs_from_env_are_added(q, options): + setenv(options['configs'], config_name=False) + + import origen + q.put(('files', origen.__config_metadata__['files'])) + +def test_relative_config_from_env_is_added(q, options): + setenv(options['configs'], config_name=False) + + import origen + q.put(('files', origen.__config_metadata__['files'])) + +def test_error_on_non_toml_config_in_env(q, options): + setenv(options['configs'], config_name=False) + + import origen + q.put(('files', origen.__config_metadata__['files'])) + +def test_plugins_are_collected_by_default(q, options): + setenv(None, bypass_config_lookup=True) + + import origen + q.put(('configs', origen.__config_metadata__['files'])) + q.put(('plugins', origen.plugins.names)) + +def test_suppressing_plugin_collection(q, options): + setenv(options['configs'], config_name=False, bypass_config_lookup=True) + + import origen + q.put(('configs', origen.__config_metadata__['files'])) + q.put(('plugins', origen.plugins.names)) + +def test_enumerating_plugins_to_load(q, options): + setenv(options['configs'], config_name=False, bypass_config_lookup=True) + + import origen + q.put(('configs', origen.__config_metadata__['files'])) + q.put(('plugins', origen.plugins.names)) diff --git a/test_apps/python_no_app/tests/configs/aux_cmds/add_aux_cmd.toml b/test_apps/python_no_app/tests/configs/aux_cmds/add_aux_cmd.toml new file mode 100644 index 00000000..a6097e95 --- /dev/null +++ b/test_apps/python_no_app/tests/configs/aux_cmds/add_aux_cmd.toml @@ -0,0 +1,3 @@ +[[command]] +name = "add_aux_cmd" +help = "Test aux command" diff --git a/test_apps/python_no_app/tests/configs/aux_cmds/add_aux_cmd_config.toml b/test_apps/python_no_app/tests/configs/aux_cmds/add_aux_cmd_config.toml new file mode 100644 index 00000000..618e759c --- /dev/null +++ b/test_apps/python_no_app/tests/configs/aux_cmds/add_aux_cmd_config.toml @@ -0,0 +1,2 @@ +[[auxillary_commands]] +path = "./add_aux_cmd" diff --git a/test_apps/python_no_app/tests/configs/aux_cmds/conflicting_namespaces_config.toml b/test_apps/python_no_app/tests/configs/aux_cmds/conflicting_namespaces_config.toml new file mode 100644 index 00000000..618e759c --- /dev/null +++ b/test_apps/python_no_app/tests/configs/aux_cmds/conflicting_namespaces_config.toml @@ -0,0 +1,2 @@ +[[auxillary_commands]] +path = "./add_aux_cmd" diff --git a/test_apps/python_no_app/tests/configs/aux_cmds/invalid_aux_cmd_path_config.toml b/test_apps/python_no_app/tests/configs/aux_cmds/invalid_aux_cmd_path_config.toml new file mode 100644 index 00000000..8f41b8d2 --- /dev/null +++ b/test_apps/python_no_app/tests/configs/aux_cmds/invalid_aux_cmd_path_config.toml @@ -0,0 +1,7 @@ +# Even if one path is invalid, other should be added + +[[auxillary_commands]] +path = "./invalid_aux_cmd_path" + +[[auxillary_commands]] +path = "./add_aux_cmd" diff --git a/test_apps/python_no_app/tests/configs/dummy_config.toml b/test_apps/python_no_app/tests/configs/dummy_config.toml new file mode 100644 index 00000000..1b13c6ba --- /dev/null +++ b/test_apps/python_no_app/tests/configs/dummy_config.toml @@ -0,0 +1,2 @@ +[[auxillary_commands]] + path = "./aux_cmds_from_cli_dir" diff --git a/test_apps/python_no_app/tests/configs/dummy_dir/origen.toml b/test_apps/python_no_app/tests/configs/dummy_dir/origen.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_no_app/tests/configs/empty.toml b/test_apps/python_no_app/tests/configs/empty.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_no_app/tests/configs/python_plugin_and_2nd_only.toml b/test_apps/python_no_app/tests/configs/python_plugin_and_2nd_only.toml new file mode 100644 index 00000000..03ffcf2a --- /dev/null +++ b/test_apps/python_no_app/tests/configs/python_plugin_and_2nd_only.toml @@ -0,0 +1,6 @@ +[plugins] +collect = false +load = [ + { name = "python_plugin" }, + { name = "python_plugin_the_second" }, +] diff --git a/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml b/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml new file mode 100644 index 00000000..a962ef67 --- /dev/null +++ b/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml @@ -0,0 +1,2 @@ +[plugins] +collect = false diff --git a/test_apps/python_no_app/tests/dummy_aux_cmds/aux_cmds_from_cli_dir.toml b/test_apps/python_no_app/tests/dummy_aux_cmds/aux_cmds_from_cli_dir.toml new file mode 100644 index 00000000..27a00f5b --- /dev/null +++ b/test_apps/python_no_app/tests/dummy_aux_cmds/aux_cmds_from_cli_dir.toml @@ -0,0 +1,5 @@ +help = "Aux Commands from the Origen CLI directory" + +[[command]] +name = "cli_dir_says_hi" +help = "Say 'hi' from the CLI dir" \ No newline at end of file diff --git a/test_apps/python_no_app/tests/dummy_aux_cmds/aux_cmds_from_cli_dir/cli_dir_says_hi.py b/test_apps/python_no_app/tests/dummy_aux_cmds/aux_cmds_from_cli_dir/cli_dir_says_hi.py new file mode 100644 index 00000000..eca98e83 --- /dev/null +++ b/test_apps/python_no_app/tests/dummy_aux_cmds/aux_cmds_from_cli_dir/cli_dir_says_hi.py @@ -0,0 +1,2 @@ +def run(**kwargs): + print(f"Hi from CLI dir!! ({__file__})") \ No newline at end of file diff --git a/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds.toml b/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds.toml new file mode 100644 index 00000000..47ead6d5 --- /dev/null +++ b/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds.toml @@ -0,0 +1,7 @@ +[[command]] + name = "say_hi" + help = "Say hi!" + +[[command]] + name = "say_bye" + help = "Say bye!" diff --git a/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds/say_hi.py b/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds/say_hi.py new file mode 100644 index 00000000..5bebfd0d --- /dev/null +++ b/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds/say_hi.py @@ -0,0 +1,2 @@ +def run(**kwargs): + print("Hi from python-no-app's dummy aux commands!") diff --git a/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds_2nd.toml b/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds_2nd.toml new file mode 100644 index 00000000..5cde8603 --- /dev/null +++ b/test_apps/python_no_app/tests/dummy_aux_cmds/dummy_aux_cmds_2nd.toml @@ -0,0 +1,23 @@ +[[command]] + name = "python_no_app_tests" + help = "Test commands for python-no-app workspace" + +[[command]] + name = "test_current_command" + help = "Tests origen.current_command" + + [[command.subcommand]] + name = "test_nested_level_1" + help = "Tests origen.current_command L1" + + [[command.subcommand.subcommand]] + name = "test_nested_level_2" + help = "Tests origen.current_command L2" + + [[command.subcommand.subcommand.subcommand]] + name = "test_nested_level_3_a" + help = "Tests origen.current_command L3a" + + [[command.subcommand.subcommand.subcommand]] + name = "test_nested_level_3_b" + help = "Tests origen.current_command L3b" diff --git a/test_apps/python_no_app/tests/misc_test.py b/test_apps/python_no_app/tests/misc_test.py index e4a9998b..66bb0080 100644 --- a/test_apps/python_no_app/tests/misc_test.py +++ b/test_apps/python_no_app/tests/misc_test.py @@ -1,4 +1,748 @@ -import origen +# FOR_PR clean up +import re +import shutil +import origen, pytest, origen_metal, getpass, os +from pathlib import Path +# import origen_metal +from origen.helpers.env import in_new_origen_proc, run_cli_cmd +from tests import configs as config_funcs +from test_apps_shared_test_helpers.cli import CmdExtOpt -def test_import(): - assert "2." in origen.version + + # def test_adding_commands_from_config(self): + # fail + + # def test_adding_commands_from_env(self): + # fail + + # def test_adding_commands_frontend_location(self): + # fail + + # def test_adding_commands_from_cli_location(self): + # fail + + # def test_adding_commands_from_plugins(self): + # fail + + # class TestEval + +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg + +class Common(CLIShared): + sv = "single_val" + +# @pytest.mark.skip +class TestExtensions(CLIShared): + # def test_extending_global_core_cmds(self): + # ... + + # @pytest.mark.skip + # class TestExtensionOpts(CLIShared): + # def test_help_msg(self): + # cfg = self.exts.exts_workout_cfg + # help = self.python_plugin.echo.get_help_msg(with_configs=cfg) + # print(help) + # fail + + # class TestExtendingCmds(CLIShared): + # def test_extending_aux_cmds() + + class TestExtensionOpts(Common): + cmd = CLIShared.python_plugin.plugin_test_args.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_args"]["exts"], + from_configs=CLIShared.exts.exts_workout_cfg + ) + subcmd = CLIShared.python_plugin.plugin_test_args.subc.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_args.subc"]["exts"], + from_configs=CLIShared.exts.exts_workout_cfg + ) + + ext_flag = cmd.flag_extension + ext_sa = cmd.single_val_opt + ext_ma = cmd.multi_val_opt + ext_ma_delim = cmd.multi_val_delim_opt + ext_action = cmd.exts_workout_action + ext_ha = cmd.hidden_opt + sa = cmd.single_arg + ma = cmd.multi_arg + sv_opt = cmd.opt_taking_value + f_opt = cmd.flag_opt + + mv = ["m0", "m1", "m2"] + ov = "opt_value" + ext_sv = "ext_single_val" + ext_mv = ["mv0", "mv1"] + ext_mvd = ["mvd0", "mvd1"] + ext_rv = ["no_action"] + + def get_action_results(self, output, actions): + retn = {} + for action in actions: + a = {} + r = output.split(f"Start Action Before CMD: {action}")[1].strip() + a["Before"], r = r.split(f"End Action Before CMD: {action}") + r = output.split(f"Start Action After CMD: {action}")[1].strip() + a["After"], r = r.split(f"End Action After CMD: {action}") + retn[action] = a + return retn + + def test_help_msg(self): + help = self.cmd.get_help_msg() + help.assert_args(self.sa, self.ma) + help.assert_opts( + self.ext_action, + self.ext_flag, + self.f_opt, + "help", + "vk", + self.ext_ma, + self.ext_ma_delim, + self.sv_opt, + self.ext_sa, + "v", + ) + help.assert_subcmds("help", self.cmd.subc) + + assert help.aux_exts == ['exts_workout'] + assert help.pl_exts == None + assert help.app_exts == False + + def test_using_extended_opts(self): + # sv = "single_val" + # mv = ["m0", "m1", "m2"] + # ov = "opt_value" + # ext_sv = "ext_single_val" + # ext_mv = ["mv0", "mv1"] + # ext_mvd = ["mvd0", "mvd1"] + # ext_rv = "required_ext_opt" + out = self.cmd.run( + self.sv, *self.mv, + self.ext_flag.ln_to_cli(), self.ext_flag.sn_to_cli(), + self.cmd.opt_taking_value.ln_to_cli(), self.ov, + self.ext_sa.sn_to_cli(), self.ext_sv, + self.ext_ma.ln_to_cli(), *self.ext_mv, ','.join(self.ext_mvd), + self.ext_ma_delim.ln_to_cli(), ','.join(self.ext_mvd), + self.ext_action.ln_to_cli(), *self.ext_rv, + self.cmd.flag_opt.ln_to_cli(), + self.ext_ha.ln_to_cli(), + self.cmd.flag_opt.ln_to_cli(), + ) + self.cmd.assert_args( + out, + (self.cmd.single_arg, self.sv), + (self.cmd.multi_arg, self.mv), + (self.cmd.opt_taking_value, self.ov), + (self.cmd.flag_opt, 2), + (self.ext_flag, 2), + (self.ext_sa, self.ext_sv), + (self.ext_ma, [*self.ext_mv, ','.join(self.ext_mvd)]), + (self.ext_ma_delim, self.ext_mvd), + (self.ext_action, self.ext_rv), + (self.ext_ha, 1), + ) + + def test_error_on_required_ext_opt(self): + err = self.cmd.gen_error("single_val") + assert self.err_msgs.missing_required_arg(self.ext_action) in err + + def test_accessing_cmd_args_from_ext(self): + actions = ["show_cmd_args"] + out = self.cmd.run( + self.sv, *self.mv, + self.ext_action.ln_to_cli(), *actions + ) + print(out) + self.cmd.assert_args( + out, + (self.cmd.single_arg, self.sv), + (self.cmd.multi_arg, self.mv), + (self.ext_action, actions), + ) + r = self.get_action_results(out, actions) + assert eval(r["show_cmd_args"]["Before"]) == { + self.cmd.single_arg.name: self.sv, + self.cmd.multi_arg.name: self.mv + } + assert eval(r["show_cmd_args"]["After"]) == { + self.cmd.single_arg.name: self.sv, + self.cmd.multi_arg.name: self.mv + } + + def test_accessing_ext_args_directly(self): + actions = ["show_ext_args"] + out = self.cmd.run( + self.sv, *self.mv, + self.ext_action.ln_to_cli(), *actions + ) + print(out) + self.cmd.assert_args( + out, + (self.cmd.single_arg, self.sv), + (self.cmd.multi_arg, self.mv), + (self.ext_action, actions), + ) + r = self.get_action_results(out, actions) + assert eval(r["show_ext_args"]["Before"]) == { + "aux.exts_workout": {self.ext_action.name: actions} + } + assert eval(r["show_ext_args"]["After"]) == { + "aux.exts_workout": {self.ext_action.name: actions} + } + + def test_manipulating_cmd_args_in_ext(self): + actions = ["show_cmd_args", "set_arg__cmd__single_arg__updated"] + out = self.cmd.run( + self.sv, *self.mv, + self.ext_action.ln_to_cli(), *actions + ) + self.cmd.assert_args( + out, + (self.cmd.single_arg, "updated"), + (self.cmd.multi_arg, self.mv), + (self.ext_action, actions), + ) + # print(out) + r = self.get_action_results(out, actions) + assert eval(r["show_cmd_args"]["Before"]) == { + self.cmd.single_arg.name: self.sv, + self.cmd.multi_arg.name: self.mv + } + assert eval(r["show_cmd_args"]["After"]) == { + self.cmd.single_arg.name: "updated", + self.cmd.multi_arg.name: self.mv + } + + def test_manipulating_ext_args_in_ext(self): + actions = ["show_ext_args", "exts_workout__test_updating_args"] + out = self.cmd.run( + self.sv, + self.ext_action.ln_to_cli(), *actions, + self.ext_sa.sn_to_cli(), self.ext_sv, + self.ext_ma.ln_to_cli(), *self.ext_mv, + self.ext_ma_delim.ln_to_cli(), ','.join(self.ext_mvd), + self.ext_flag.ln_to_cli(), + self.ext_flag.ln_to_cli(), + ) + print(out) + self.cmd.assert_args( + out, + (self.cmd.single_arg, self.sv), + (self.ext_flag, 3, {"Before": 2}), + (self.ext_sa, "update_sv_opt", {"Before": self.ext_sv}), + (self.ext_ma, self.ext_mv + ["update_mv_opt"], {"Before": self.ext_mv}), + (self.ext_ma_delim, self.ext_mvd), + (self.ext_action, actions), + (CmdExtOpt("new_arg", src_name="exts_workout"), "new_arg_for_ext", {"Before": False}) + ) + + + # def test_ext_cleanup(self): + # fail + + # def test_ext_cleanup(self): + # fail + + @pytest.mark.skip + def test_extending_subcommand(self): + actions = ["no_action"] + out = self.subcmd.run( + self.sv, + self.subcmd.flag_opt.ln_to_cli(), + self.subcmd.exts_workout_action.ln_to_cli(), *actions, + # self.sv, + # self.ext_action.ln_to_cli(), *actions, + # self.ext_sa.sn_to_cli(), self.ext_sv, + # self.ext_ma.ln_to_cli(), *self.ext_mv, + # self.ext_ma_delim.ln_to_cli(), ','.join(self.ext_mvd), + # self.ext_flag.ln_to_cli(), + # self.ext_flag.ln_to_cli(), + ) + # print(out) + self.subcmd.assert_args( + out, + (self.subcmd.single_arg, self.sv), + (self.subcmd.exts_workout_action, actions), + ) + + def test_subc_help_msg(self): + subc = self.subcmd + help = subc.get_help_msg() + # help.assert_num_opts(9) + help.assert_args(subc.single_arg) + help.assert_opts( + subc.exts_workout_action, + subc.flag_opt, + "help", + "vk", + "v", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['exts_workout'] + assert help.pl_exts == None + assert help.app_exts == False + + @pytest.mark.skip + def test_basic_extending_from_pl(self): + help = self.global_cmds.eval.get_help_msg() + assert help.pl_exts == [] + + class TestExtensionStacking(Common): + cmd = CLIShared.python_plugin.plugin_test_ext_stacking.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ] + ) + subc = CLIShared.python_plugin.plugin_test_ext_stacking.subc.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking.subc"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ], + ) + + def test_ext_stacking_help_msg(self): + cmd = self.cmd + help = cmd.get_help_msg() + # help.assert_num_opts(9) + help.assert_args(cmd.single_arg) + help.assert_opts( + cmd.ext_action, + cmd.flag_opt, + "help", + "vk", + cmd.pl_ext_stacking_action, + cmd.pl_ext_stacking_flag, + cmd.pl_the_2nd_ext_action, + cmd.pl_the_2nd_ext_flag, + "v", + ) + help.assert_subcmds("help", self.subc) + + assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] + assert help.pl_exts == ['python_plugin_the_second'] + assert help.app_exts == False + + def test_ext_stacking(self): + cmd = self.cmd + # actions = ["show_cmd_args"] + actions = ["none"] + out = cmd.run( + self.sv, + cmd.flag_opt.ln_to_cli(), + cmd.ext_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_flag.ln_to_cli(), cmd.pl_ext_stacking_flag.ln_to_cli(), + cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + cmd.pl_the_2nd_ext_flag.ln_to_cli(), + ) + print(out) + cmd.assert_args( + out, + (cmd.single_arg, self.sv), + (cmd.flag_opt, 1), + (cmd.ext_action, actions), + (cmd.pl_ext_stacking_action, actions), + (cmd.pl_ext_stacking_flag, 2), + (cmd.pl_the_2nd_ext_action, actions), + (cmd.pl_the_2nd_ext_flag, 1), + ) + + def test_manipulating_other_ext_args(self): + cmd = self.cmd + # actions = ["show_cmd_args"] + actions = ["update_flag_opts"] + out = cmd.run( + self.sv, + cmd.flag_opt.ln_to_cli(), + cmd.ext_action.ln_to_cli(), *actions, + # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_flag.ln_to_cli(), cmd.pl_ext_stacking_flag.ln_to_cli(), + # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + cmd.pl_the_2nd_ext_flag.ln_to_cli(), + ) + print(out) + cmd.assert_args( + out, + (cmd.single_arg, self.sv), + (cmd.flag_opt, 2), + (cmd.ext_action, actions), + # (cmd.pl_ext_stacking_action, actions), + (cmd.pl_ext_stacking_flag, 3, {"Before": 2}), + # (cmd.pl_the_2nd_ext_action, actions), + (cmd.pl_the_2nd_ext_flag, 2), + ) + + def test_subc_ext_stacking_help_msg(self): + subc = self.subc + help = subc.get_help_msg() + # help.assert_num_opts(9) + help.assert_args(subc.single_arg) + help.assert_opts( + subc.ext_action_subc, + subc.flag_opt, + "help", + "vk", + subc.pl_ext_stacking_action_subc, + subc.pl_ext_stacking_flag_subc, + subc.pl_the_2nd_ext_action_subc, + subc.pl_the_2nd_ext_flag_subc, + "v", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] + assert help.pl_exts == ['python_plugin_the_second'] + assert help.app_exts == False + + def test_subc_ext_stacking(self): + actions = ["none"] + subc = self.subc + out = subc.run( + self.sv, + subc.flag_opt.ln_to_cli(), + subc.ext_action_subc.ln_to_cli(), *actions, + # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, + subc.pl_ext_stacking_flag_subc.ln_to_cli(), subc.pl_ext_stacking_flag_subc.ln_to_cli(), + # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + subc.pl_the_2nd_ext_flag_subc.ln_to_cli(), + ) + print(out) + subc.assert_args( + out, + (subc.single_arg, self.sv), + (subc.flag_opt, 1), + (subc.ext_action_subc, actions), + # (subc.pl_ext_stacking_action_subc, actions), + (subc.pl_ext_stacking_flag_subc, 2), + # (subc.pl_the_2nd_ext_action_subc, actions), + (subc.pl_the_2nd_ext_flag_subc, 1), + ) + + class TestExtendingAuxCmds(Common): + cmd = CLIShared.aux.ns.dummy_cmds.dummy_cmd.extend( + CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ], + with_env={"ORIGEN_DUMMY_AUX_CMDS": "1"} + ) + subc = CLIShared.aux.ns.dummy_cmds.dummy_cmd.subc.extend( + CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd.subc"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ], + with_env={"ORIGEN_DUMMY_AUX_CMDS": "1"} + ) + + @property + def na(self): + return "no_action" + + def test_extending_aux_cmd_help_msg(self): + cmd = self.cmd + help = cmd.get_help_msg() + help.assert_args(cmd.action_arg) + help.assert_opts( + cmd.exts_workout_action, + cmd.exts_workout_flag, + "help", + "vk", + cmd.pl_ext_stacking_action, + cmd.pl_ext_stacking_from_aux_flag, + cmd.python_plugin_action, + cmd.python_plugin_flag, + cmd.python_plugin_the_second_action, + cmd.python_plugin_the_second_flag, + "v", + ) + help.assert_subcmds("help", cmd.subc) + + assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] + assert help.pl_exts == ['python_plugin', 'python_plugin_the_second'] + assert help.app_exts == False + + def test_extending_aux_cmd(self): + cmd = self.cmd + # actions = ["show_cmd_args"] + # actions = ["update_flag_opts"] + out = cmd.run( + self.na, + # cmd.flag_opt.ln_to_cli(), + # cmd.ext_action.ln_to_cli(), + # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), + # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + cmd.python_plugin_the_second_flag.ln_to_cli(), + cmd.python_plugin_flag.ln_to_cli(), + ) + cmd.assert_args( + out, + (cmd.action_arg, [self.na]), + # (cmd.flag_opt, 1), + (cmd.exts_workout_action, None), + # (cmd.pl_ext_stacking_action, actions), + (cmd.pl_ext_stacking_from_aux_flag, 2), + # (cmd.pl_the_2nd_ext_action, actions), + (cmd.python_plugin_the_second_flag, 1), + (cmd.python_plugin_flag, 1), + ) + + def test_manipulating_args_from_aux_exts(self): + cmd = self.cmd + # actions = ["show_cmd_args"] + actions = [ + "inc_flag__aux_ext__pl_ext_stacking_from_aux_flag", + "inc_flag__plugin_ext__python_plugin_the_second_flag", + "set_flag__plugin_ext__python_plugin_flag" + ] + out = cmd.run( + self.na, + cmd.exts_workout_action.ln_to_cli(), *actions, + # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), + # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + cmd.python_plugin_the_second_flag.ln_to_cli(), + ) + print(out) + cmd.assert_args( + out, + (cmd.action_arg, [self.na]), + (cmd.exts_workout_action, actions), + (cmd.python_plugin_flag, -1), + # (cmd.pl_ext_stacking_action, actions), + (cmd.pl_ext_stacking_from_aux_flag, 3, {"Before": 2}), + # (cmd.pl_the_2nd_ext_action, actions), + (cmd.python_plugin_the_second_flag, 2), + ) + + def test_extending_aux_cmd_help_msg_subc(self): + cmd = self.subc + help = cmd.get_help_msg() + help.assert_args(cmd.action_arg) + help.assert_opts( + cmd.exts_workout_action, + cmd.exts_workout_flag_subc, + cmd.flag_opt, + "help", + "vk", + cmd.pl_ext_stacking_from_aux_action_subc, + cmd.pl_ext_stacking_from_aux_flag_subc, + cmd.python_plugin_action_subc, + cmd.python_plugin_flag_subc, + cmd.python_plugin_the_second_action_subc, + cmd.python_plugin_the_second_flag_subc, + "v", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] + assert help.pl_exts == ['python_plugin', 'python_plugin_the_second'] + assert help.app_exts == False + + def test_extending_aux_subcmd(self): + cmd = self.subc + # actions = ["show_cmd_args"] + # actions = ["update_flag_opts"] + actions = ["no_action"] + out = cmd.run( + self.na, + cmd.flag_opt.ln_to_cli(), + cmd.exts_workout_action.ln_to_cli(), *actions, + # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + cmd.python_plugin_the_second_flag_subc.ln_to_cli(), + cmd.python_plugin_flag_subc.ln_to_cli(), + ) + print(out) + cmd.assert_args( + out, + (cmd.action_arg, [self.na]), + (cmd.flag_opt, 1), + (cmd.exts_workout_action, actions), + (cmd.exts_workout_flag_subc, None), + # (cmd.pl_ext_stacking_action, actions), + (cmd.pl_ext_stacking_from_aux_flag_subc, 2), + # (cmd.pl_the_2nd_ext_action, actions), + (cmd.python_plugin_the_second_flag_subc, 1), + (cmd.python_plugin_flag_subc, 1), + ) + + def test_manipulating_args_from_aux_subcmd(self): + cmd = self.subc + actions = [ + "inc_flag__cmd__flag_opt", + "inc_multi_arg__cmd__action_arg__updated", + "inc_flag__aux_ext__pl_ext_stacking_from_aux_flag_subc", + "inc_flag__plugin_ext__python_plugin_the_second_flag_subc", + "inc_flag__plugin_ext__python_plugin_flag_subc" + ] + out = cmd.run( + self.na, + cmd.flag_opt.ln_to_cli(), + cmd.exts_workout_action.ln_to_cli(), *actions, + # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + cmd.python_plugin_the_second_flag_subc.ln_to_cli(), + cmd.python_plugin_flag_subc.ln_to_cli(), + ) + print(out) + cmd.assert_args( + out, + (cmd.action_arg, ["updated"]), + (cmd.flag_opt, 2), + (cmd.exts_workout_action, actions), + (cmd.exts_workout_flag_subc, None), + # (cmd.pl_ext_stacking_action, actions), + (cmd.pl_ext_stacking_from_aux_flag_subc, 3, {"Before": 2}), + # (cmd.pl_the_2nd_ext_action, actions), + (cmd.python_plugin_the_second_flag_subc, 2), + (cmd.python_plugin_flag_subc, 2), + ) + + @pytest.mark.skip + def test_hidden_exts_full_name(self): + fail + + # @pytest.mark.parameterize() + def test_extending_origen_cmd_from_plugin(self): + ''' Test each global command is extendable''' + cmd = self.global_cmds.eval # origen.helpers.regressions.origen + cmd = cmd.extend( + CLIShared.exts.exts["generic_core_ext"]["exts"], + from_configs=[CLIShared.exts.core_cmd_exts_cfg] + ) + + # help = cmd.get_help_msg(with_config=[self.exts_from_aux, self.exts_from_pl]) + help = cmd.get_help_msg() + help.assert_args(cmd.code) + help.assert_opts( + cmd.core_cmd_exts_generic_core_ext, + "help", + "vk", + cmd.pl_ext_cmds_generic_ext, + "v", + ) + help.assert_subcmds(None) + assert help.aux_exts == ['core_cmd_exts'] + assert help.pl_exts == ['pl_ext_cmds'] + assert help.app_exts == False + + # out = cmd.run(with_config=[self.exts_from_aux, self.exts_from_pl]) + d = cmd.global_demo("minimal") + out = d.run(add_args=[ + cmd.core_cmd_exts_generic_core_ext.ln_to_cli(), + cmd.pl_ext_cmds_generic_ext.ln_to_cli(), + cmd.pl_ext_cmds_generic_ext.ln_to_cli(), + ]) + d.assert_present(out) + cmd.core_cmd_exts_generic_core_ext.assert_present(1, out) + cmd.pl_ext_cmds_generic_ext.assert_present(2, out) + + @pytest.mark.skip + def test_extending_pl_cmd_from_aux_cmds(self): + fail + + @pytest.mark.skip + def test_extending_aux_cmd_from_pl(self): + fail + + @pytest.mark.skip + class ErrorConditions(): + def test_exception_in_before_cmd(self): + actions = ["before_cmd_exception"] + out = self.cmd.gen_error( + self.sv, + self.ext_action.ln_to_cli(), *actions, + return_full=True, + ) + stderr = out["stderr"] + stdout = out["stdout"] + action_strs = self.ext_action.to_assert_str(actions) + sv_str = self.cmd.single_arg.to_assert_str(self.sv) + print(stdout) + assert "RuntimeError: 'before_cmd_exception' encountered!" in stderr + assert action_strs[0] in stdout + assert action_strs[1] not in stdout + assert action_strs[2] in stdout + assert sv_str not in stdout + fail + + def test_exception_in_after_cmd(self): + fail + + def test_exception_in_cmd(self): + actions = ["none"] + out = self.cmd.gen_error( + "gen_error", + self.ext_action.ln_to_cli(), *actions, + return_full=True, + ) + fail + + def test_exception_in_clean_up(self): + fail + + def test_exceptions_in_multiple_clean_ups(self): + fail + + def test_exceptions_in_before_and_cleanups(self): + fail + + def test_missing_ext_plugin_mod(self): + fail + + def test_missing_ext_plugin_mod(self): + fail + + def test_missing_ext_aux_mod(self): + fail + + def test_missing_multiple_ext_mods(self): + fail + + def test_exception_in_on_load(self): + fail + + def test_exception_during_mod_load(self): + fail + + @pytest.mark.skip + class TestConflictingExtensions(): + def test_conflicts_in_core_cmd(self): + fail + + def test_conflicts_in_aux_cmd(self): + fail + + def test_conflicts_in_pl_cmd(self): + fail + + @pytest.mark.skip + def test_extending_origen_cmd_from_global_context_only(self): + fail + +class TestCurrentCommand: + @pytest.mark.skip + def test_current_command_from_core_cmd(self): + eval_cmd + + @pytest.mark.skip + def test_current_command_from_pl_cmd(self): + pl_cmd + + @pytest.mark.skip + def test_current_command_from_aux_cmd(self): + aux_cmd + + @pytest.mark.skip + def test_current_command_from_app_cmd(self): + app_cmd \ No newline at end of file diff --git a/test_apps/python_no_app/tests/test_cli.py b/test_apps/python_no_app/tests/test_cli.py new file mode 100644 index 00000000..c47ba265 --- /dev/null +++ b/test_apps/python_no_app/tests/test_cli.py @@ -0,0 +1,13 @@ +# FOR_PR add T_EVAL +from .cli.tests__global_cmds import T_GlobalCmds +from .cli.tests__cmd__credentials import T_Credentials +# from .cli.tests__cmd__eval import T_Eval + +class TestGlobalCmds(T_GlobalCmds): + pass + +class TestCredentials(T_Credentials): + pass + +# class TestEval(T_Credentials): +# pass diff --git a/test_apps/python_no_app/tests/test_cmd_building.py b/test_apps/python_no_app/tests/test_cmd_building.py new file mode 100644 index 00000000..e3f92091 --- /dev/null +++ b/test_apps/python_no_app/tests/test_cmd_building.py @@ -0,0 +1,21 @@ +import pytest +from .cmd_building.tests__standard_opts import T_StandardOpts +from .cmd_building.tests__arg_buildling import T_ArgBuilding +from .cmd_building.tests__opt_building import T_OptBuilding +from .cmd_building.tests__loading_aux_cmds import T_LoadingAuxCommands +from .cmd_building.tests__loading_plugin_cmds import T_LoadingPluginCmds + +class TestLoadingAuxCommands(T_LoadingAuxCommands): + pass + +class TestStandardOpts(T_StandardOpts): + pass + +class TestArgBuilding(T_ArgBuilding): + pass + +class TestOptBuilding(T_OptBuilding): + pass + +class TestLoadingPluginCmds(T_LoadingPluginCmds): + pass \ No newline at end of file diff --git a/test_apps/python_no_app/tests/test_configs.py b/test_apps/python_no_app/tests/test_configs.py new file mode 100644 index 00000000..299e81e3 --- /dev/null +++ b/test_apps/python_no_app/tests/test_configs.py @@ -0,0 +1,130 @@ +import pytest, origen, shutil, os +from pathlib import Path +from origen.helpers.env import in_new_origen_proc, run_cli_cmd +from tests import configs as config_funcs + +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg + +class Common(CLIShared): + # FOR_PR see how many of these are needed and what can be moved to test apps shared + tests_root = Path(__file__).parent + working_dir = Path(__file__).parent.parent + working_dir_config = working_dir.joinpath("origen.toml") + cli_dir = working_dir.joinpath("../../rust/origen/target/debug").resolve() + cli_config = cli_dir.joinpath("origen.toml") + + configs_dir = Path(__file__).parent.joinpath("configs") + dummy_config = configs_dir.joinpath("dummy_config.toml") + dummy_configs_dir = configs_dir.joinpath("dummy_dir") + dummy_origen_config = dummy_configs_dir.joinpath("origen.toml") + empty_config = configs_dir.joinpath("empty.toml") + + suppress_plugin_collecting_config = configs_dir.joinpath("suppress_plugin_collecting.toml") + python_plugin_and_2nd_only_config = configs_dir.joinpath("python_plugin_and_2nd_only.toml") + + aux_cmds_dir = Path(__file__).parent.joinpath("dummy_aux_cmds") + cli_aux_cmds_toml = aux_cmds_dir.joinpath("aux_cmds_from_cli_dir.toml") + cli_aux_cmds_impl = aux_cmds_dir.joinpath("aux_cmds_from_cli_dir") + + cmd_testers_root = tests_root.joinpath("cmd_building/cmd_testers") + aux_cmd_configs_dir = configs_dir.joinpath("aux_cmds") + + python_plugin_config_dir_str = "../python_plugin/config" + python_plugin_config_toml = Path(python_plugin_config_dir_str).joinpath("origen.toml") + + @pytest.fixture + def existing_configs(self): + return origen.__config_metadata__['files'] + +class TestConfig(Common): + def test_local_config_is_added(self, existing_configs): + assert self.working_dir_config in origen.__config_metadata__['files'] + + @pytest.mark.skip + def test_package_root_config_is_found(self): + retn = in_new_origen_proc(mod=config_funcs) + assert retn['files'] == [] + + def test_config_from_cli_source_is_added(self, existing_configs): + assert self.cli_config not in existing_configs + shutil.copy(self.empty_config, self.cli_config) + try: + out = run_cli_cmd(["eval", "print( origen.__config_metadata__['files'] )"]) + print(out.split("\n")[-2]) + from pathlib import WindowsPath, PosixPath + configs = eval(out.split("\n")[-2]) + # retn = in_new_origen_proc(mod=config_funcs) + finally: + os.remove(self.cli_config) + + # ensure the config at the CLI directory is removed + assert self.cli_config in configs + + def test_config_dir_from_env_is_added(self, existing_configs): + # Add directory + retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'config_dir': self.dummy_configs_dir}) #, with_configs=self.dummy_configs_dir) + assert retn['files'] == [ + self.dummy_origen_config, + *existing_configs, + ] + + def test_direct_config_from_env_is_added(self, existing_configs): + # Add direct toml source + retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'config_toml': self.dummy_config}) # , with_configs=self.dummy_origen_config) + assert retn['files'] == [ + self.dummy_config, + *existing_configs + ] + + def test_multiple_configs_from_env_are_added(self, existing_configs): + retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'configs': [self.dummy_config, self.dummy_configs_dir]}) + assert retn['files'] == [ + self.dummy_config, + self.dummy_origen_config, + *existing_configs + ] + + def test_relative_config_from_env_is_added(self, existing_configs): + retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'configs': self.python_plugin_config_dir_str}) #, with_configs="../python_no_app/tests/configs/") + assert retn['files'] == [ + self.python_plugin_config_toml, + *existing_configs + ] + + @pytest.mark.xfail + def test_error_on_non_toml_config_in_env(self, existing_configs): + retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'configs': self.dummy_configs_dir.parent.joinpath("__init__.py")}) + assert retn['files'] == [ + self.python_plugin_config_toml, + *existing_configs + ] + + @pytest.mark.skip + def test_error_on_missing_config_dir_in_env(self): + fail + + @pytest.mark.skip + def test_error_on_missing_toml_config_in_env(self): + fail + + @pytest.mark.skip + def test_config_locations_can_stack(self): + fail + + @pytest.mark.xfail + def test_bypassing_config_lookups(self): + # No configs + retn = in_new_origen_proc(mod=config_funcs, bypass_config_lookup=True) + assert retn['files'] == [] + + # Configs from the env are added though + retn = in_new_origen_proc(func=config_funcs.test_bypassing_config_lookup_with_env, bypass_config_lookup=True, with_config=[...]) + assert retn['files'] == [] + + @pytest.mark.skip + def test_user_config_is_added(self): + fail + + @pytest.mark.skip + def test_default_config_lookup_can_be_suppressed(self): + fail diff --git a/test_apps/python_no_app/tests/test_global_invocation.py b/test_apps/python_no_app/tests/test_global_invocation.py new file mode 100644 index 00000000..14c43ff4 --- /dev/null +++ b/test_apps/python_no_app/tests/test_global_invocation.py @@ -0,0 +1,18 @@ +import origen, origen_metal, getpass, pytest + +def test_import(): + assert "2." in origen.version + +def test_app_is_none(): + assert origen.app is None + +class TestGlobalFEIntegration: + def test_frontend_is_accessible(self): + assert (origen_metal.frontend.frontend() is not None) + + def test_current_user_is_available(self): + assert origen.current_user.id == getpass.getuser() + + @pytest.mark.skip + def test_datastores_are_available(self): + assert origen.datastores.keys() == ['ldaps'] \ No newline at end of file diff --git a/test_apps/python_no_app/tests/test_plugin_loading.py b/test_apps/python_no_app/tests/test_plugin_loading.py new file mode 100644 index 00000000..a771a857 --- /dev/null +++ b/test_apps/python_no_app/tests/test_plugin_loading.py @@ -0,0 +1,93 @@ +import pytest, origen, _origen +from origen.helpers.env import in_new_origen_proc, run_cli_cmd +from tests import configs as config_funcs +from tests.test_configs import Common as ConfigCommon +from pathlib import WindowsPath, PosixPath + +class TestLoadingGlobalPlugins(ConfigCommon): + def get_configs_and_plugins_from_cli(cls, configs=None, bypass_config_lookup=False): + header = 'Configs and Plugin Names' + out = run_cli_cmd( + ["eval", f"print( '{header}' ); print( origen.__config_metadata__['files'] ); print( origen.plugins.names )"], + bypass_config_lookup=bypass_config_lookup, + with_configs=configs or None + ) + out = out.split("\n")[0:-1] + print(out) + i = out.index(header) + configs = eval(out[i+1].strip()) + plugins = eval(out[i+2].strip()) + return { + 'configs': configs, + 'plugins': plugins, + } + + def test_plugins_are_collected_by_default(self): + retn = in_new_origen_proc(mod=config_funcs) + assert retn['configs'] == [] + assert retn['plugins'] == self.plugins.python_no_app_collected_pl_names + + # Test from CLI + retn = self.get_configs_and_plugins_from_cli(bypass_config_lookup=True) + assert retn['configs'] == [] + assert retn['plugins'] == self.plugins.python_no_app_collected_pl_names + + def test_plugins_are_accessible(self): + pls = origen.plugins + # TODO + # assert isinstance(pls, _origen.plugins.Plugins) + assert isinstance(pls, origen.core.plugins.Plugins) + pl = pls[self.python_plugin.name] + assert pls.names == self.plugins.python_no_app_config_pl_names + # TODO + assert isinstance(pl, origen.application.Base) + # assert isinstance(pl, _origen.plugins.Plugin) + # TODO + assert pl.is_plugin == True + + # TODO needed? + @pytest.mark.skip + def test_registering_global_plugins(self): + assert origen.plugins.names == self.plugins.python_no_app_config_pl_names + # retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'configs': self.dummy_configs_dir.joinpath("__init__.py")}) + # assert retn['files'] == [ + # self.python_plugin_config_toml, + # *existing_configs + # ] + + def test_suppressing_plugin_collection(self): + c = self.suppress_plugin_collecting_config + retn = in_new_origen_proc( + mod=config_funcs, + func_kwargs={'configs': c} + ) + assert retn['configs'] == [c] + assert retn['plugins'] == [] + + # Try from CLI + retn = self.get_configs_and_plugins_from_cli(configs=c, bypass_config_lookup=True) + assert retn['configs'] == [c] + assert retn['plugins'] == [] + + def test_enumerating_plugins_to_load(self): + c = self.python_plugin_and_2nd_only_config + exp_pls = [self.plugins.python_plugin.name, self.plugins.python_plugin_the_second.name] + retn = in_new_origen_proc( + mod=config_funcs, + func_kwargs={'configs': c} + ) + assert retn['configs'] == [c] + assert retn['plugins'] == exp_pls + + # Try from CLI + retn = self.get_configs_and_plugins_from_cli(configs=c, bypass_config_lookup=True) + assert retn['configs'] == [c] + assert retn['plugins'] == exp_pls + + @pytest.mark.skip + def test_error_on_missing_plugin(self): + fail + + @pytest.mark.skip + def test_error_on_loading_plugins(self): + fail diff --git a/test_apps/python_plugin/poetry.lock b/test_apps/python_plugin/poetry.lock index 793cf428..74f65dab 100644 --- a/test_apps/python_plugin/poetry.lock +++ b/test_apps/python_plugin/poetry.lock @@ -8,7 +8,7 @@ python-versions = "*" [[package]] name = "atomicwrites" -version = "1.4.0" +version = "1.4.1" description = "Atomic file writes." category = "dev" optional = false @@ -16,44 +16,29 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "21.2.0" +version = "22.1.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.5" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] [[package]] name = "babel" -version = "2.9.1" +version = "2.10.3" description = "Internationalization utilities" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] pytz = ">=2015.7" -[[package]] -name = "backports.entry-points-selectable" -version = "1.1.0" -description = "Compatibility shim providing selectable entry points for older implementations" -category = "main" -optional = false -python-versions = ">=2.7" - -[package.dependencies] -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-flake8", "pytest-cov", "pytest-black (>=0.3.7)", "pytest-mypy", "pytest-checkdocs (>=2.4)", "pytest-enabler (>=1.0.1)"] - [[package]] name = "beautifulsoup4" version = "4.8.2" @@ -82,11 +67,11 @@ beautifulsoup4 = "*" [[package]] name = "cachecontrol" -version = "0.12.6" +version = "0.12.11" description = "httplib2 caching for requests" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} @@ -112,15 +97,15 @@ msgpack = ["msgpack-python (>=0.5,<0.6)"] [[package]] name = "certifi" -version = "2021.5.30" +version = "2022.6.15" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false -python-versions = "*" +python-versions = ">=3.6" [[package]] name = "cffi" -version = "1.14.6" +version = "1.15.1" description = "Foreign Function Interface for Python calling C code." category = "main" optional = false @@ -131,11 +116,11 @@ pycparser = "*" [[package]] name = "charset-normalizer" -version = "2.0.4" +version = "2.1.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false -python-versions = ">=3.5.0" +python-versions = ">=3.6.0" [package.extras] unicode_backport = ["unicodedata2"] @@ -166,7 +151,7 @@ pylev = ">=1.3,<2.0" [[package]] name = "colorama" -version = "0.4.4" +version = "0.4.5" description = "Cross-platform colored terminal text." category = "main" optional = false @@ -193,7 +178,7 @@ python-versions = ">=3.6,<4.0" [[package]] name = "cryptography" -version = "3.4.8" +version = "37.0.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -204,15 +189,15 @@ cffi = ">=1.12" [package.extras] docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] -docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] -sdist = ["setuptools-rust (>=0.11.4)"] +sdist = ["setuptools_rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] name = "distlib" -version = "0.3.2" +version = "0.3.5" description = "Distribution utilities" category = "main" optional = false @@ -220,19 +205,23 @@ python-versions = "*" [[package]] name = "docutils" -version = "0.17.1" +version = "0.19" description = "Docutils -- Python Documentation Utilities" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" [[package]] name = "filelock" -version = "3.0.12" +version = "3.8.0" description = "A platform independent file lock." category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" + +[package.extras] +testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] +docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] [[package]] name = "html5lib" @@ -254,7 +243,7 @@ lxml = ["lxml"] [[package]] name = "idna" -version = "3.2" +version = "3.3" description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false @@ -262,7 +251,7 @@ python-versions = ">=3.5" [[package]] name = "imagesize" -version = "1.2.0" +version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" category = "main" optional = false @@ -283,50 +272,35 @@ zipp = ">=0.5" docs = ["sphinx", "rst.linker"] testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] -[[package]] -name = "importlib-resources" -version = "5.2.2" -description = "Read resources from Python packages" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] - [[package]] name = "jeepney" -version = "0.7.1" +version = "0.8.0" description = "Low-level, pure Python DBus protocol wrapper." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio", "testpath", "trio", "async-timeout"] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] trio = ["trio", "async-generator"] [[package]] name = "jinja2" -version = "2.11.3" +version = "3.1.2" description = "A very fast and expressive template engine." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" [package.dependencies] -MarkupSafe = ">=0.23" +MarkupSafe = ">=2.0" [package.extras] -i18n = ["Babel (>=0.8)"] +i18n = ["Babel (>=2.7)"] [[package]] name = "keyring" -version = "21.8.0" +version = "22.3.0" description = "Store and access your passwords safely." category = "main" optional = false @@ -340,7 +314,7 @@ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "jaraco.test (>=3.2.0)", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] name = "lockfile" @@ -350,20 +324,6 @@ category = "main" optional = false python-versions = "*" -[[package]] -name = "lxml" -version = "4.6.3" -description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" - -[package.extras] -cssselect = ["cssselect (>=0.7)"] -html5 = ["html5lib"] -htmlsoup = ["beautifulsoup4"] -source = ["Cython (>=0.29.7)"] - [[package]] name = "mako" version = "1.1.0" @@ -377,15 +337,15 @@ MarkupSafe = ">=0.9.2" [[package]] name = "markupsafe" -version = "2.0.1" +version = "2.1.1" description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "more-itertools" -version = "8.8.0" +version = "8.14.0" description = "More routines for operating on iterables, beyond itertools" category = "dev" optional = false @@ -393,8 +353,8 @@ python-versions = ">=3.5" [[package]] name = "msgpack" -version = "1.0.2" -description = "MessagePack (de)serializer." +version = "1.0.4" +description = "MessagePack serializer" category = "main" optional = false python-versions = "*" @@ -405,7 +365,7 @@ version = "2.0.0.dev5" description = "Semiconductor Developer's Kit" category = "main" optional = false -python-versions = ">=3.6,<3.11" +python-versions = ">=3.7,<3.11" develop = true [package.dependencies] @@ -413,12 +373,11 @@ beautifulsoup4 = "4.8.2" bs4 = "0.0.1" colorama = "^0.4" importlib-metadata = ">= 1.7.0" -Jinja2 = "^2" -lxml = "4.6.3" +Jinja2 = "^3" mako = "1.1.0" origen_autoapi = "2.0.1" -origen_metal = "= 0.3.0" -poetry = "1.1.6" +origen_metal = "= 0.4.0" +poetry = "^1.1.14" recommonmark = ">= 0" sphinx = "3.0.2" sphinxbootstrap4theme = ">= 0" @@ -442,11 +401,21 @@ sphinx = "*" [[package]] name = "origen-metal" -version = "0.3.0" -description = "" +version = "0.4.0" +description = "Bare metal APIs for the Origen SDK" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +colorama = ">= 0.4.4" +pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} +termcolor = ">= 1.1.0" + +[package.source] +type = "directory" +url = "../../python/origen_metal" [[package]] name = "packaging" @@ -480,26 +449,26 @@ ptyprocess = ">=0.5" [[package]] name = "pkginfo" -version = "1.7.1" +version = "1.8.3" description = "Query metadatdata from sdists / bdists / installed packages." category = "main" optional = false -python-versions = "*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.extras] testing = ["nose", "coverage"] [[package]] name = "platformdirs" -version = "2.2.0" +version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] -docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] [[package]] name = "pluggy" @@ -518,25 +487,25 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poetry" -version = "1.1.6" +version = "1.1.14" description = "Python dependency management and packaging made easy." category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -cachecontrol = {version = ">=0.12.4,<0.13.0", extras = ["filecache"]} +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} cachy = ">=0.3.0,<0.4.0" cleo = ">=0.8.1,<0.9.0" clikit = ">=0.6.2,<0.7.0" crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} html5lib = ">=1.0,<2.0" importlib-metadata = {version = ">=1.6.0,<2.0.0", markers = "python_version < \"3.8\""} -keyring = {version = ">=21.2.0,<22.0.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +keyring = {version = ">=21.2.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} packaging = ">=20.4,<21.0" pexpect = ">=4.7.0,<5.0.0" pkginfo = ">=1.4,<2.0" -poetry-core = ">=1.0.3,<1.1.0" +poetry-core = ">=1.0.7,<1.1.0" requests = ">=2.18,<3.0" requests-toolbelt = ">=0.9.1,<0.10.0" shellingham = ">=1.1,<2.0" @@ -545,7 +514,7 @@ virtualenv = ">=20.0.26,<21.0.0" [[package]] name = "poetry-core" -version = "1.0.4" +version = "1.0.8" description = "Poetry PEP 517 Build Backend" category = "main" optional = false @@ -564,15 +533,15 @@ python-versions = "*" [[package]] name = "py" -version = "1.10.0" +version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pycparser" -version = "2.20" +version = "2.21" description = "C parser in Python" category = "main" optional = false @@ -580,11 +549,11 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.10.0" +version = "2.12.0" description = "Pygments is a syntax highlighting package written in Python." category = "main" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [[package]] name = "pylev" @@ -596,11 +565,22 @@ python-versions = "*" [[package]] name = "pyparsing" -version = "2.4.7" -description = "Python parsing module" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" category = "main" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = ">=3.6.8" + +[package.extras] +diagrams = ["railroad-diagrams", "jinja2"] + +[[package]] +name = "pyreadline3" +version = "3.4.1" +description = "A python implementation of GNU readline." +category = "main" +optional = false +python-versions = "*" [[package]] name = "pytest" @@ -621,7 +601,7 @@ six = ">=1.10.0" [[package]] name = "pytz" -version = "2021.1" +version = "2022.2.1" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -650,21 +630,21 @@ sphinx = ">=1.3.1" [[package]] name = "requests" -version = "2.26.0" +version = "2.28.1" description = "Python HTTP for Humans." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.7, <4" [package.dependencies] certifi = ">=2017.4.17" -charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} -idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} +charset-normalizer = ">=2,<3" +idna = ">=2.5,<4" urllib3 = ">=1.21.1,<1.27" [package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "requests-toolbelt" @@ -679,7 +659,7 @@ requests = ">=2.0.1,<3.0.0" [[package]] name = "secretstorage" -version = "3.3.1" +version = "3.3.3" description = "Python bindings to FreeDesktop.org Secret Service API" category = "main" optional = false @@ -691,11 +671,11 @@ jeepney = ">=0.6" [[package]] name = "shellingham" -version = "1.4.0" +version = "1.5.0" description = "Tool to Detect Surrounding Shell" category = "main" optional = false -python-versions = "!=3.0,!=3.1,!=3.2,!=3.3,>=2.6" +python-versions = ">=3.4" [[package]] name = "six" @@ -707,7 +687,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "snowballstemmer" -version = "2.1.0" +version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." category = "main" optional = false @@ -715,7 +695,7 @@ python-versions = "*" [[package]] name = "soupsieve" -version = "2.2.1" +version = "2.3.2.post1" description = "A modern CSS selector implementation for Beautiful Soup." category = "main" optional = false @@ -841,45 +821,42 @@ python-versions = "*" [[package]] name = "tomlkit" -version = "0.7.2" +version = "0.11.4" description = "Style preserving TOML library" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6,<4.0" [[package]] name = "urllib3" -version = "1.26.6" +version = "1.26.11" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" [package.extras] -brotli = ["brotlipy (>=0.6.0)"] +brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.7.2" +version = "20.16.2" description = "Virtual Python Environment builder" category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" [package.dependencies] -"backports.entry-points-selectable" = ">=1.0.4" distlib = ">=0.3.1,<1" -filelock = ">=3.0.0,<4" +filelock = ">=3.2,<4" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -importlib-resources = {version = ">=1.0", markers = "python_version < \"3.7\""} platformdirs = ">=2,<3" -six = ">=1.9.0,<2" [package.extras] -docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] +testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] +docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] [[package]] name = "webencodings" @@ -899,20 +876,20 @@ python-versions = "*" [[package]] name = "zipp" -version = "3.5.0" +version = "3.8.1" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [metadata] lock-version = "1.1" -python-versions = ">=3.6,<3.11" -content-hash = "85dfca7cea21f93ff011a5eb8c242cac42612a7abf505806cc8db053cabe4c3f" +python-versions = ">=3.7,<3.11" +content-hash = "1f4c2af7a73abea014b8d078693c410088ef6c775fb5d4b9e8e06aa06b9a5680" [metadata.files] alabaster = [ @@ -920,20 +897,15 @@ alabaster = [ {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] atomicwrites = [ - {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, - {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, ] attrs = [ - {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, - {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, ] babel = [ - {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"}, - {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, -] -"backports.entry-points-selectable" = [ - {file = "backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl", hash = "sha256:a6d9a871cde5e15b4c4a53e3d43ba890cc6861ec1332c9c2428c92f977192acc"}, - {file = "backports.entry_points_selectable-1.1.0.tar.gz", hash = "sha256:988468260ec1c196dab6ae1149260e2f5472c9110334e5d51adcb77867361f6a"}, + {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, + {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, ] beautifulsoup4 = [ {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, @@ -944,62 +916,86 @@ bs4 = [ {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, ] cachecontrol = [ - {file = "CacheControl-0.12.6-py2.py3-none-any.whl", hash = "sha256:10d056fa27f8563a271b345207402a6dcce8efab7e5b377e270329c62471b10d"}, - {file = "CacheControl-0.12.6.tar.gz", hash = "sha256:be9aa45477a134aee56c8fac518627e1154df063e85f67d4f83ce0ccc23688e8"}, + {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, + {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, ] cachy = [ {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, ] certifi = [ - {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, - {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, + {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, + {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, ] cffi = [ - {file = "cffi-1.14.6-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:22b9c3c320171c108e903d61a3723b51e37aaa8c81255b5e7ce102775bd01e2c"}, - {file = "cffi-1.14.6-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:f0c5d1acbfca6ebdd6b1e3eded8d261affb6ddcf2186205518f1428b8569bb99"}, - {file = "cffi-1.14.6-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99f27fefe34c37ba9875f224a8f36e31d744d8083e00f520f133cab79ad5e819"}, - {file = "cffi-1.14.6-cp27-cp27m-win32.whl", hash = "sha256:55af55e32ae468e9946f741a5d51f9896da6b9bf0bbdd326843fec05c730eb20"}, - {file = "cffi-1.14.6-cp27-cp27m-win_amd64.whl", hash = "sha256:7bcac9a2b4fdbed2c16fa5681356d7121ecabf041f18d97ed5b8e0dd38a80224"}, - {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:ed38b924ce794e505647f7c331b22a693bee1538fdf46b0222c4717b42f744e7"}, - {file = "cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:e22dcb48709fc51a7b58a927391b23ab37eb3737a98ac4338e2448bef8559b33"}, - {file = "cffi-1.14.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e8c6a99be100371dbb046880e7a282152aa5d6127ae01783e37662ef73850d8f"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:19ca0dbdeda3b2615421d54bef8985f72af6e0c47082a8d26122adac81a95872"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d950695ae4381ecd856bcaf2b1e866720e4ab9a1498cba61c602e56630ca7195"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9dc245e3ac69c92ee4c167fbdd7428ec1956d4e754223124991ef29eb57a09d"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a8661b2ce9694ca01c529bfa204dbb144b275a31685a075ce123f12331be790b"}, - {file = "cffi-1.14.6-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b315d709717a99f4b27b59b021e6207c64620790ca3e0bde636a6c7f14618abb"}, - {file = "cffi-1.14.6-cp36-cp36m-win32.whl", hash = "sha256:80b06212075346b5546b0417b9f2bf467fea3bfe7352f781ffc05a8ab24ba14a"}, - {file = "cffi-1.14.6-cp36-cp36m-win_amd64.whl", hash = "sha256:a9da7010cec5a12193d1af9872a00888f396aba3dc79186604a09ea3ee7c029e"}, - {file = "cffi-1.14.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4373612d59c404baeb7cbd788a18b2b2a8331abcc84c3ba40051fcd18b17a4d5"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:f10afb1004f102c7868ebfe91c28f4a712227fe4cb24974350ace1f90e1febbf"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:fd4305f86f53dfd8cd3522269ed7fc34856a8ee3709a5e28b2836b2db9d4cd69"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6d6169cb3c6c2ad50db5b868db6491a790300ade1ed5d1da29289d73bbe40b56"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5d4b68e216fc65e9fe4f524c177b54964af043dde734807586cf5435af84045c"}, - {file = "cffi-1.14.6-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33791e8a2dc2953f28b8d8d300dde42dd929ac28f974c4b4c6272cb2955cb762"}, - {file = "cffi-1.14.6-cp37-cp37m-win32.whl", hash = "sha256:0c0591bee64e438883b0c92a7bed78f6290d40bf02e54c5bf0978eaf36061771"}, - {file = "cffi-1.14.6-cp37-cp37m-win_amd64.whl", hash = "sha256:8eb687582ed7cd8c4bdbff3df6c0da443eb89c3c72e6e5dcdd9c81729712791a"}, - {file = "cffi-1.14.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ba6f2b3f452e150945d58f4badd92310449876c4c954836cfb1803bdd7b422f0"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux1_i686.whl", hash = "sha256:64fda793737bc4037521d4899be780534b9aea552eb673b9833b01f945904c2e"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:9f3e33c28cd39d1b655ed1ba7247133b6f7fc16fa16887b120c0c670e35ce346"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26bb2549b72708c833f5abe62b756176022a7b9a7f689b571e74c8478ead51dc"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:eb687a11f0a7a1839719edd80f41e459cc5366857ecbed383ff376c4e3cc6afd"}, - {file = "cffi-1.14.6-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2ad4d668a5c0645d281dcd17aff2be3212bc109b33814bbb15c4939f44181cc"}, - {file = "cffi-1.14.6-cp38-cp38-win32.whl", hash = "sha256:487d63e1454627c8e47dd230025780e91869cfba4c753a74fda196a1f6ad6548"}, - {file = "cffi-1.14.6-cp38-cp38-win_amd64.whl", hash = "sha256:c33d18eb6e6bc36f09d793c0dc58b0211fccc6ae5149b808da4a62660678b156"}, - {file = "cffi-1.14.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:06c54a68935738d206570b20da5ef2b6b6d92b38ef3ec45c5422c0ebaf338d4d"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux1_i686.whl", hash = "sha256:f174135f5609428cc6e1b9090f9268f5c8935fddb1b25ccb8255a2d50de6789e"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f3ebe6e73c319340830a9b2825d32eb6d8475c1dac020b4f0aa774ee3b898d1c"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c8d896becff2fa653dc4438b54a5a25a971d1f4110b32bd3068db3722c80202"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4922cd707b25e623b902c86188aca466d3620892db76c0bdd7b99a3d5e61d35f"}, - {file = "cffi-1.14.6-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c9e005e9bd57bc987764c32a1bee4364c44fdc11a3cc20a40b93b444984f2b87"}, - {file = "cffi-1.14.6-cp39-cp39-win32.whl", hash = "sha256:eb9e2a346c5238a30a746893f23a9535e700f8192a68c07c0258e7ece6ff3728"}, - {file = "cffi-1.14.6-cp39-cp39-win_amd64.whl", hash = "sha256:818014c754cd3dba7229c0f5884396264d51ffb87ec86e927ef0be140bfdb0d2"}, - {file = "cffi-1.14.6.tar.gz", hash = "sha256:c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd"}, + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, ] charset-normalizer = [ - {file = "charset-normalizer-2.0.4.tar.gz", hash = "sha256:f23667ebe1084be45f6ae0538e4a5a865206544097e4e8bbcacf42cd02a348f3"}, - {file = "charset_normalizer-2.0.4-py3-none-any.whl", hash = "sha256:0c8911edd15d19223366a194a513099a302055a962bca2cec0f54b8b63175d8b"}, + {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, + {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, ] cleo = [ {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, @@ -1010,7 +1006,8 @@ clikit = [ {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, ] colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, ] commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, @@ -1021,208 +1018,182 @@ crashtest = [ {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, ] cryptography = [ - {file = "cryptography-3.4.8-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a00cf305f07b26c351d8d4e1af84ad7501eca8a342dedf24a7acb0e7b7406e14"}, - {file = "cryptography-3.4.8-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:f44d141b8c4ea5eb4dbc9b3ad992d45580c1d22bf5e24363f2fbf50c2d7ae8a7"}, - {file = "cryptography-3.4.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:0a7dcbcd3f1913f664aca35d47c1331fce738d44ec34b7be8b9d332151b0b01e"}, - {file = "cryptography-3.4.8-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:34dae04a0dce5730d8eb7894eab617d8a70d0c97da76b905de9efb7128ad7085"}, - {file = "cryptography-3.4.8-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1eb7bb0df6f6f583dd8e054689def236255161ebbcf62b226454ab9ec663746b"}, - {file = "cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:9965c46c674ba8cc572bc09a03f4c649292ee73e1b683adb1ce81e82e9a6a0fb"}, - {file = "cryptography-3.4.8-cp36-abi3-win32.whl", hash = "sha256:21ca464b3a4b8d8e86ba0ee5045e103a1fcfac3b39319727bc0fc58c09c6aff7"}, - {file = "cryptography-3.4.8-cp36-abi3-win_amd64.whl", hash = "sha256:3520667fda779eb788ea00080124875be18f2d8f0848ec00733c0ec3bb8219fc"}, - {file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d2a6e5ef66503da51d2110edf6c403dc6b494cc0082f85db12f54e9c5d4c3ec5"}, - {file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a305600e7a6b7b855cd798e00278161b681ad6e9b7eca94c721d5f588ab212af"}, - {file = "cryptography-3.4.8-pp36-pypy36_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:3fa3a7ccf96e826affdf1a0a9432be74dc73423125c8f96a909e3835a5ef194a"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:d9ec0e67a14f9d1d48dd87a2531009a9b251c02ea42851c060b25c782516ff06"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:5b0fbfae7ff7febdb74b574055c7466da334a5371f253732d7e2e7525d570498"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94fff993ee9bc1b2440d3b7243d488c6a3d9724cc2b09cdb297f6a886d040ef7"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:8695456444f277af73a4877db9fc979849cd3ee74c198d04fc0776ebc3db52b9"}, - {file = "cryptography-3.4.8-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:cd65b60cfe004790c795cc35f272e41a3df4631e2fb6b35aa7ac6ef2859d554e"}, - {file = "cryptography-3.4.8.tar.gz", hash = "sha256:94cc5ed4ceaefcbe5bf38c8fba6a21fc1d365bb8fb826ea1688e3370b2e24a1c"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, + {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, + {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, + {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, ] distlib = [ - {file = "distlib-0.3.2-py2.py3-none-any.whl", hash = "sha256:23e223426b28491b1ced97dc3bbe183027419dfc7982b4fa2f05d5f3ff10711c"}, - {file = "distlib-0.3.2.zip", hash = "sha256:106fef6dc37dd8c0e2c0a60d3fca3e77460a48907f335fa28420463a6f799736"}, + {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, + {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, ] docutils = [ - {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, - {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, ] filelock = [ - {file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"}, - {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, + {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, + {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, ] html5lib = [ {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, ] idna = [ - {file = "idna-3.2-py3-none-any.whl", hash = "sha256:14475042e284991034cb48e06f6851428fb14c4dc953acd9be9a5e95c7b6dd7a"}, - {file = "idna-3.2.tar.gz", hash = "sha256:467fbad99067910785144ce333826c71fb0e63a425657295239737f7ecd125f3"}, + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, ] imagesize = [ - {file = "imagesize-1.2.0-py2.py3-none-any.whl", hash = "sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1"}, - {file = "imagesize-1.2.0.tar.gz", hash = "sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1"}, + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, ] importlib-metadata = [ {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, ] -importlib-resources = [ - {file = "importlib_resources-5.2.2-py3-none-any.whl", hash = "sha256:2480d8e07d1890056cb53c96e3de44fead9c62f2ba949b0f2e4c4345f4afa977"}, - {file = "importlib_resources-5.2.2.tar.gz", hash = "sha256:a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b"}, -] jeepney = [ - {file = "jeepney-0.7.1-py3-none-any.whl", hash = "sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac"}, - {file = "jeepney-0.7.1.tar.gz", hash = "sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f"}, + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, ] jinja2 = [ - {file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"}, - {file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"}, + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] keyring = [ - {file = "keyring-21.8.0-py3-none-any.whl", hash = "sha256:4be9cbaaaf83e61d6399f733d113ede7d1c73bc75cb6aeb64eee0f6ac39b30ea"}, - {file = "keyring-21.8.0.tar.gz", hash = "sha256:1746d3ac913d449a090caf11e9e4af00e26c3f7f7e81027872192b2398b98675"}, + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, ] lockfile = [ {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, ] -lxml = [ - {file = "lxml-4.6.3-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:df7c53783a46febb0e70f6b05df2ba104610f2fb0d27023409734a3ecbb78fb2"}, - {file = "lxml-4.6.3-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:1b7584d421d254ab86d4f0b13ec662a9014397678a7c4265a02a6d7c2b18a75f"}, - {file = "lxml-4.6.3-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:079f3ae844f38982d156efce585bc540c16a926d4436712cf4baee0cce487a3d"}, - {file = "lxml-4.6.3-cp27-cp27m-win32.whl", hash = "sha256:bc4313cbeb0e7a416a488d72f9680fffffc645f8a838bd2193809881c67dd106"}, - {file = "lxml-4.6.3-cp27-cp27m-win_amd64.whl", hash = "sha256:8157dadbb09a34a6bd95a50690595e1fa0af1a99445e2744110e3dca7831c4ee"}, - {file = "lxml-4.6.3-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:7728e05c35412ba36d3e9795ae8995e3c86958179c9770e65558ec3fdfd3724f"}, - {file = "lxml-4.6.3-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:4bff24dfeea62f2e56f5bab929b4428ae6caba2d1eea0c2d6eb618e30a71e6d4"}, - {file = "lxml-4.6.3-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_24_i686.whl", hash = "sha256:64812391546a18896adaa86c77c59a4998f33c24788cadc35789e55b727a37f4"}, - {file = "lxml-4.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl", hash = "sha256:c1a40c06fd5ba37ad39caa0b3144eb3772e813b5fb5b084198a985431c2f1e8d"}, - {file = "lxml-4.6.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:74f7d8d439b18fa4c385f3f5dfd11144bb87c1da034a466c5b5577d23a1d9b51"}, - {file = "lxml-4.6.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f90ba11136bfdd25cae3951af8da2e95121c9b9b93727b1b896e3fa105b2f586"}, - {file = "lxml-4.6.3-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:4c61b3a0db43a1607d6264166b230438f85bfed02e8cff20c22e564d0faff354"}, - {file = "lxml-4.6.3-cp35-cp35m-manylinux2014_x86_64.whl", hash = "sha256:5c8c163396cc0df3fd151b927e74f6e4acd67160d6c33304e805b84293351d16"}, - {file = "lxml-4.6.3-cp35-cp35m-win32.whl", hash = "sha256:f2380a6376dfa090227b663f9678150ef27543483055cc327555fb592c5967e2"}, - {file = "lxml-4.6.3-cp35-cp35m-win_amd64.whl", hash = "sha256:c4f05c5a7c49d2fb70223d0d5bcfbe474cf928310ac9fa6a7c6dddc831d0b1d4"}, - {file = "lxml-4.6.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d2e35d7bf1c1ac8c538f88d26b396e73dd81440d59c1ef8522e1ea77b345ede4"}, - {file = "lxml-4.6.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:289e9ca1a9287f08daaf796d96e06cb2bc2958891d7911ac7cae1c5f9e1e0ee3"}, - {file = "lxml-4.6.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:bccbfc27563652de7dc9bdc595cb25e90b59c5f8e23e806ed0fd623755b6565d"}, - {file = "lxml-4.6.3-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d916d31fd85b2f78c76400d625076d9124de3e4bda8b016d25a050cc7d603f24"}, - {file = "lxml-4.6.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:820628b7b3135403540202e60551e741f9b6d3304371712521be939470b454ec"}, - {file = "lxml-4.6.3-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:c47ff7e0a36d4efac9fd692cfa33fbd0636674c102e9e8d9b26e1b93a94e7617"}, - {file = "lxml-4.6.3-cp36-cp36m-win32.whl", hash = "sha256:5a0a14e264069c03e46f926be0d8919f4105c1623d620e7ec0e612a2e9bf1c04"}, - {file = "lxml-4.6.3-cp36-cp36m-win_amd64.whl", hash = "sha256:92e821e43ad382332eade6812e298dc9701c75fe289f2a2d39c7960b43d1e92a"}, - {file = "lxml-4.6.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:efd7a09678fd8b53117f6bae4fa3825e0a22b03ef0a932e070c0bdbb3a35e654"}, - {file = "lxml-4.6.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:efac139c3f0bf4f0939f9375af4b02c5ad83a622de52d6dfa8e438e8e01d0eb0"}, - {file = "lxml-4.6.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:0fbcf5565ac01dff87cbfc0ff323515c823081c5777a9fc7703ff58388c258c3"}, - {file = "lxml-4.6.3-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:36108c73739985979bf302006527cf8a20515ce444ba916281d1c43938b8bb96"}, - {file = "lxml-4.6.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:122fba10466c7bd4178b07dba427aa516286b846b2cbd6f6169141917283aae2"}, - {file = "lxml-4.6.3-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:cdaf11d2bd275bf391b5308f86731e5194a21af45fbaaaf1d9e8147b9160ea92"}, - {file = "lxml-4.6.3-cp37-cp37m-win32.whl", hash = "sha256:3439c71103ef0e904ea0a1901611863e51f50b5cd5e8654a151740fde5e1cade"}, - {file = "lxml-4.6.3-cp37-cp37m-win_amd64.whl", hash = "sha256:4289728b5e2000a4ad4ab8da6e1db2e093c63c08bdc0414799ee776a3f78da4b"}, - {file = "lxml-4.6.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b007cbb845b28db4fb8b6a5cdcbf65bacb16a8bd328b53cbc0698688a68e1caa"}, - {file = "lxml-4.6.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:76fa7b1362d19f8fbd3e75fe2fb7c79359b0af8747e6f7141c338f0bee2f871a"}, - {file = "lxml-4.6.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:26e761ab5b07adf5f555ee82fb4bfc35bf93750499c6c7614bd64d12aaa67927"}, - {file = "lxml-4.6.3-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:e1cbd3f19a61e27e011e02f9600837b921ac661f0c40560eefb366e4e4fb275e"}, - {file = "lxml-4.6.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:66e575c62792c3f9ca47cb8b6fab9e35bab91360c783d1606f758761810c9791"}, - {file = "lxml-4.6.3-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:1b38116b6e628118dea5b2186ee6820ab138dbb1e24a13e478490c7db2f326ae"}, - {file = "lxml-4.6.3-cp38-cp38-win32.whl", hash = "sha256:89b8b22a5ff72d89d48d0e62abb14340d9e99fd637d046c27b8b257a01ffbe28"}, - {file = "lxml-4.6.3-cp38-cp38-win_amd64.whl", hash = "sha256:2a9d50e69aac3ebee695424f7dbd7b8c6d6eb7de2a2eb6b0f6c7db6aa41e02b7"}, - {file = "lxml-4.6.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:ce256aaa50f6cc9a649c51be3cd4ff142d67295bfc4f490c9134d0f9f6d58ef0"}, - {file = "lxml-4.6.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:7610b8c31688f0b1be0ef882889817939490a36d0ee880ea562a4e1399c447a1"}, - {file = "lxml-4.6.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f8380c03e45cf09f8557bdaa41e1fa7c81f3ae22828e1db470ab2a6c96d8bc23"}, - {file = "lxml-4.6.3-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:3082c518be8e97324390614dacd041bb1358c882d77108ca1957ba47738d9d59"}, - {file = "lxml-4.6.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:884ab9b29feaca361f7f88d811b1eea9bfca36cf3da27768d28ad45c3ee6f969"}, - {file = "lxml-4.6.3-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:6f12e1427285008fd32a6025e38e977d44d6382cf28e7201ed10d6c1698d2a9a"}, - {file = "lxml-4.6.3-cp39-cp39-win32.whl", hash = "sha256:33bb934a044cf32157c12bfcfbb6649807da20aa92c062ef51903415c704704f"}, - {file = "lxml-4.6.3-cp39-cp39-win_amd64.whl", hash = "sha256:542d454665a3e277f76954418124d67516c5f88e51a900365ed54a9806122b83"}, - {file = "lxml-4.6.3.tar.gz", hash = "sha256:39b78571b3b30645ac77b95f7c69d1bffc4cf8c3b157c435a34da72e78c82468"}, -] mako = [ {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, ] markupsafe = [ - {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, - {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] more-itertools = [ - {file = "more-itertools-8.8.0.tar.gz", hash = "sha256:83f0308e05477c68f56ea3a888172c78ed5d5b3c282addb67508e7ba6c8f813a"}, - {file = "more_itertools-8.8.0-py3-none-any.whl", hash = "sha256:2cf89ec599962f2ddc4d568a05defc40e0a587fbc10d5989713638864c36be4d"}, + {file = "more-itertools-8.14.0.tar.gz", hash = "sha256:c09443cd3d5438b8dafccd867a6bc1cb0894389e90cb53d227456b0b0bccb750"}, + {file = "more_itertools-8.14.0-py3-none-any.whl", hash = "sha256:1bc4f91ee5b1b31ac7ceacc17c09befe6a40a503907baf9c839c229b5095cfd2"}, ] msgpack = [ - {file = "msgpack-1.0.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:b6d9e2dae081aa35c44af9c4298de4ee72991305503442a5c74656d82b581fe9"}, - {file = "msgpack-1.0.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:a99b144475230982aee16b3d249170f1cccebf27fb0a08e9f603b69637a62192"}, - {file = "msgpack-1.0.2-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1026dcc10537d27dd2d26c327e552f05ce148977e9d7b9f1718748281b38c841"}, - {file = "msgpack-1.0.2-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:fe07bc6735d08e492a327f496b7850e98cb4d112c56df69b0c844dbebcbb47f6"}, - {file = "msgpack-1.0.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:9ea52fff0473f9f3000987f313310208c879493491ef3ccf66268eff8d5a0326"}, - {file = "msgpack-1.0.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:26a1759f1a88df5f1d0b393eb582ec022326994e311ba9c5818adc5374736439"}, - {file = "msgpack-1.0.2-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:497d2c12426adcd27ab83144057a705efb6acc7e85957a51d43cdcf7f258900f"}, - {file = "msgpack-1.0.2-cp36-cp36m-win32.whl", hash = "sha256:e89ec55871ed5473a041c0495b7b4e6099f6263438e0bd04ccd8418f92d5d7f2"}, - {file = "msgpack-1.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a4355d2193106c7aa77c98fc955252a737d8550320ecdb2e9ac701e15e2943bc"}, - {file = "msgpack-1.0.2-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:d6c64601af8f3893d17ec233237030e3110f11b8a962cb66720bf70c0141aa54"}, - {file = "msgpack-1.0.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:f484cd2dca68502de3704f056fa9b318c94b1539ed17a4c784266df5d6978c87"}, - {file = "msgpack-1.0.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f3e6aaf217ac1c7ce1563cf52a2f4f5d5b1f64e8729d794165db71da57257f0c"}, - {file = "msgpack-1.0.2-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:8521e5be9e3b93d4d5e07cb80b7e32353264d143c1f072309e1863174c6aadb1"}, - {file = "msgpack-1.0.2-cp37-cp37m-win32.whl", hash = "sha256:31c17bbf2ae5e29e48d794c693b7ca7a0c73bd4280976d408c53df421e838d2a"}, - {file = "msgpack-1.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:8ffb24a3b7518e843cd83538cf859e026d24ec41ac5721c18ed0c55101f9775b"}, - {file = "msgpack-1.0.2-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:b28c0876cce1466d7c2195d7658cf50e4730667196e2f1355c4209444717ee06"}, - {file = "msgpack-1.0.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:87869ba567fe371c4555d2e11e4948778ab6b59d6cc9d8460d543e4cfbbddd1c"}, - {file = "msgpack-1.0.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:b55f7db883530b74c857e50e149126b91bb75d35c08b28db12dcb0346f15e46e"}, - {file = "msgpack-1.0.2-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:ac25f3e0513f6673e8b405c3a80500eb7be1cf8f57584be524c4fa78fe8e0c83"}, - {file = "msgpack-1.0.2-cp38-cp38-win32.whl", hash = "sha256:0cb94ee48675a45d3b86e61d13c1e6f1696f0183f0715544976356ff86f741d9"}, - {file = "msgpack-1.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:e36a812ef4705a291cdb4a2fd352f013134f26c6ff63477f20235138d1d21009"}, - {file = "msgpack-1.0.2-cp39-cp39-macosx_10_14_x86_64.whl", hash = "sha256:2a5866bdc88d77f6e1370f82f2371c9bc6fc92fe898fa2dec0c5d4f5435a2694"}, - {file = "msgpack-1.0.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:92be4b12de4806d3c36810b0fe2aeedd8d493db39e2eb90742b9c09299eb5759"}, - {file = "msgpack-1.0.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:de6bd7990a2c2dabe926b7e62a92886ccbf809425c347ae7de277067f97c2887"}, - {file = "msgpack-1.0.2-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:5a9ee2540c78659a1dd0b110f73773533ee3108d4e1219b5a15a8d635b7aca0e"}, - {file = "msgpack-1.0.2-cp39-cp39-win32.whl", hash = "sha256:c747c0cc08bd6d72a586310bda6ea72eeb28e7505990f342552315b229a19b33"}, - {file = "msgpack-1.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:d8167b84af26654c1124857d71650404336f4eb5cc06900667a493fc619ddd9f"}, - {file = "msgpack-1.0.2.tar.gz", hash = "sha256:fae04496f5bc150eefad4e9571d1a76c55d021325dcd484ce45065ebbdd00984"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, ] origen = [] origen-autoapi = [ {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, ] -origen-metal = [ - {file = "origen_metal-0.3.0-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:309378f4f4361d8a5b0700e865a056ae0574eeed2566aff839000e92a5335eea"}, - {file = "origen_metal-0.3.0-cp36-none-win_amd64.whl", hash = "sha256:709e973b1ae66bf5f951a072cad12193909a7f5258ecd55c2aebfa6d46474385"}, - {file = "origen_metal-0.3.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e7ffe6cdbd78b706854a52a5a8f16fda4f85962a43a80852c033849b9b12ae5b"}, - {file = "origen_metal-0.3.0-cp37-none-win_amd64.whl", hash = "sha256:6b34d02fab1fb1bc3fc69b0e83956893f3ec0c7231483963e1ebaad6a9fd4718"}, - {file = "origen_metal-0.3.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e94d674b6451429e087d2e860dc7dd091e8a042d64c42e13ad3a6ac1c691791f"}, - {file = "origen_metal-0.3.0-cp38-none-win_amd64.whl", hash = "sha256:9d2661e5586ffdc6a1c296e7e88080ce292c66355e413b2a27e98650dfbce43e"}, -] +origen-metal = [] packaging = [ {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, @@ -1236,56 +1207,60 @@ pexpect = [ {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, ] pkginfo = [ - {file = "pkginfo-1.7.1-py2.py3-none-any.whl", hash = "sha256:37ecd857b47e5f55949c41ed061eb51a0bee97a87c969219d144c0e023982779"}, - {file = "pkginfo-1.7.1.tar.gz", hash = "sha256:e7432f81d08adec7297633191bbf0bd47faf13cd8724c3a13250e51d542635bd"}, + {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, + {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, ] platformdirs = [ - {file = "platformdirs-2.2.0-py3-none-any.whl", hash = "sha256:4666d822218db6a262bdfdc9c39d21f23b4cfdb08af331a81e92751daf6c866c"}, - {file = "platformdirs-2.2.0.tar.gz", hash = "sha256:632daad3ab546bd8e6af0537d09805cec458dce201bccfe23012df73332e181e"}, + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, ] pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] poetry = [ - {file = "poetry-1.1.6-py2.py3-none-any.whl", hash = "sha256:768d87fdad55c8b2512996aea74bc389b4772680dcafea90643bdf8eaedf6ca0"}, - {file = "poetry-1.1.6.tar.gz", hash = "sha256:e7c58a50c14aebc18e7de9df64f1dad74b194f21b8e5257251449f0feb4784fa"}, + {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, + {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, ] poetry-core = [ - {file = "poetry-core-1.0.4.tar.gz", hash = "sha256:4b3847ad3e7b5deb88a35b23fa19762b9cef26828770cef3a5b47ffb508119c1"}, - {file = "poetry_core-1.0.4-py2.py3-none-any.whl", hash = "sha256:a99fa921cf84f0521644714bb4b531d9d8f839c64de20aa71fa137f7461a1516"}, + {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, + {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, ] py = [ - {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, - {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] pycparser = [ - {file = "pycparser-2.20-py2.py3-none-any.whl", hash = "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"}, - {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] pygments = [ - {file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"}, - {file = "Pygments-2.10.0.tar.gz", hash = "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"}, + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, ] pylev = [ {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, ] pyparsing = [ - {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, - {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, +] +pyreadline3 = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, ] pytest = [ {file = "pytest-3.10.1-py2.py3-none-any.whl", hash = "sha256:3f193df1cfe1d1609d4c583838bea3d532b18d6160fd3f55c9447fdca30848ec"}, {file = "pytest-3.10.1.tar.gz", hash = "sha256:e246cf173c01169b9617fc07264b7b1316e78d7a650055235d6d897bc80d9660"}, ] pytz = [ - {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, - {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, + {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, + {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, ] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, @@ -1296,32 +1271,32 @@ recommonmark = [ {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, ] requests = [ - {file = "requests-2.26.0-py2.py3-none-any.whl", hash = "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24"}, - {file = "requests-2.26.0.tar.gz", hash = "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"}, + {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, + {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, ] requests-toolbelt = [ {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, ] secretstorage = [ - {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, - {file = "SecretStorage-3.3.1.tar.gz", hash = "sha256:fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195"}, + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, ] shellingham = [ - {file = "shellingham-1.4.0-py2.py3-none-any.whl", hash = "sha256:536b67a0697f2e4af32ab176c00a50ac2899c5a05e0d8e2dadac8e58888283f9"}, - {file = "shellingham-1.4.0.tar.gz", hash = "sha256:4855c2458d6904829bd34c299f11fdeed7cfefbf8a2c522e4caea6cd76b3171e"}, + {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, + {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, ] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] snowballstemmer = [ - {file = "snowballstemmer-2.1.0-py2.py3-none-any.whl", hash = "sha256:b51b447bea85f9968c13b650126a888aabd4cb4463fca868ec596826325dedc2"}, - {file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"}, + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, ] soupsieve = [ - {file = "soupsieve-2.2.1-py3-none-any.whl", hash = "sha256:c2c1c2d44f158cdbddab7824a9af8c4f83c76b1e23e049479aa432feb6c4c23b"}, - {file = "soupsieve-2.2.1.tar.gz", hash = "sha256:052774848f448cf19c7e959adf5566904d525f33a3f8b6ba6f6f8f26ec7de0cc"}, + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, ] sphinx = [ {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, @@ -1358,16 +1333,16 @@ termcolor = [ {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, ] tomlkit = [ - {file = "tomlkit-0.7.2-py2.py3-none-any.whl", hash = "sha256:173ad840fa5d2aac140528ca1933c29791b79a374a0861a80347f42ec9328117"}, - {file = "tomlkit-0.7.2.tar.gz", hash = "sha256:d7a454f319a7e9bd2e249f239168729327e4dd2d27b17dc68be264ad1ce36754"}, + {file = "tomlkit-0.11.4-py3-none-any.whl", hash = "sha256:25d4e2e446c453be6360c67ddfb88838cfc42026322770ba13d1fbd403a93a5c"}, + {file = "tomlkit-0.11.4.tar.gz", hash = "sha256:3235a9010fae54323e727c3ac06fb720752fe6635b3426e379daec60fbd44a83"}, ] urllib3 = [ - {file = "urllib3-1.26.6-py2.py3-none-any.whl", hash = "sha256:39fb8672126159acb139a7718dd10806104dec1e2f0f6c88aab05d17df10c8d4"}, - {file = "urllib3-1.26.6.tar.gz", hash = "sha256:f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f"}, + {file = "urllib3-1.26.11-py2.py3-none-any.whl", hash = "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc"}, + {file = "urllib3-1.26.11.tar.gz", hash = "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"}, ] virtualenv = [ - {file = "virtualenv-20.7.2-py2.py3-none-any.whl", hash = "sha256:e4670891b3a03eb071748c569a87cceaefbf643c5bac46d996c5a45c34aa0f06"}, - {file = "virtualenv-20.7.2.tar.gz", hash = "sha256:9ef4e8ee4710826e98ff3075c9a4739e2cb1040de6a2a8d35db0055840dc96a0"}, + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, ] webencodings = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, @@ -1378,6 +1353,6 @@ yapf = [ {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, ] zipp = [ - {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, - {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, + {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, + {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, ] diff --git a/test_apps/python_plugin/python_plugin/commands.toml b/test_apps/python_plugin/python_plugin/commands.toml new file mode 100644 index 00000000..0383f16e --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands.toml @@ -0,0 +1,185 @@ +[[command]] + name = "plugin_says_hi" + help = "Say 'hi' from the python plugin" + + [[command.opt]] + name = "times" + takes_value = true + short = "t" + long = "times" + help = "Number of times for the python plugin to say" + value_name = "TIMES" + multiple = false + + [[command.opt]] + name = "loudly" + takes_value = false + short = "l" + long = "loudly" + help = "LOUDLY say hi" + + [[command.opt]] + name = "to" + help = "Specify who should be greeted" + takes_value = true + multiple = true + use_delimiter = true + +[[command]] +name = "plugin_test_args" +help = "Test command for a plugin" + + [[command.arg]] + name = "single_arg" + help = "Single Arg" + + [[command.arg]] + name = "multi_arg" + multiple = true + help = "Multi Arg" + + [[command.opt]] + name = "opt_taking_value" + takes_value = true + help = "Opt taking a single value" + long = "opt" + + [[command.opt]] + name = "flag_opt" + help = "Flag Opt" + long = "flag" + + [[command.subcommand]] + name = "subc" + help = "Test Subcommand for plugin_test_args" + + [[command.subcommand.arg]] + name = "single_arg" + help = "Single Arg For Subcommand" + + [[command.subcommand.opt]] + name = "flag_opt" + help = "Flag Opt For Subcommand" + +[[command]] +name = "plugin_test_ext_stacking" +help = "Test ext stacking for plugin command" + + [[command.arg]] + name = "single_arg" + help = "Single Arg" + + [[command.opt]] + name = "flag_opt" + help = "Flag Opt" + + [[command.subcommand]] + name = "subc" + help = "Test Subcommand for ext stacking" + + [[command.subcommand.arg]] + name = "single_arg" + help = "Single Arg" + + [[command.subcommand.opt]] + name = "flag_opt" + help = "Flag Opt" + +[[command]] +name = "echo" +help = "Echos the input" + + [[command.arg]] + name = "input" + use_delimiter = true + help = "Input to echo" + required = true + + [[command.opt]] + name = "repeat" + help = "Echo again (repeat)" + long = "repeat" + short = "r" + +# TODO add this and test +# FOR_PR +# [[extension]] +# # Extend generate command +# # (only available in application context) +# extend = "origen.generate" +# in_global_context = false + +# [[extension.opt]] +# name = "say_hi_in_pattern" +# short = "s" +# help = "Have the plugin say hi in the pattern" +# takes_value = false + +[[extension]] + # Extend eval command only in global context + extend = "origen.eval" + in_global_context = true + in_app_context = false + + [[extension.opt]] + name = "say_hi_before_eval" + short = "b" + help = "Have the plugin say hi before evaluating" + + [[extension.opt]] + name = "say_hi_after_eval" + short = "a" + help = "Have the plugin say hi after evaluating" + +# FOR_PR +#[[extension]] +# # Extend eval command only in an application context +# extend = "origen.eval" +# in_global_context = false +# in_app_context = true + +[[extension]] + # Extend an application's 'playground' commmand + extend = "app.playground" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd" +on_env = ["ORIGEN_DUMMY_AUX_CMDS"] + + [[extension.opt]] + name = "python_plugin_action" + multiple = true + help = "Action from python_plugin" + + [[extension.opt]] + name = "python_plugin_flag" + help = "Flag from python_plugin" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd.subc" +on_env = ["ORIGEN_DUMMY_AUX_CMDS"] + + [[extension.opt]] + name = "python_plugin_action_subc" + multiple = true + help = "Action from python_plugin subc" + + [[extension.opt]] + name = "python_plugin_flag_subc" + help = "Flag from python_plugin subc" + +# FOR_PR +# [[extension]] +# # Extend eval command only in global context +# extend = "origen.eval" +# in_global_context = true +# in_app_context = false + +# [[extension.opt]] +# name = "python_plugin_ext_action" +# help = "Simple extension action from python plugin" +# multiple=true + +# [[extension.opt]] +# name = "python_plugin_ext_flag" +# help = "Simple extension flag from python plugin" diff --git a/test_apps/python_plugin/python_plugin/commands/echo.py b/test_apps/python_plugin/python_plugin/commands/echo.py new file mode 100644 index 00000000..0de8159f --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/echo.py @@ -0,0 +1,5 @@ +def run(input, repeat=False): + s = f"Echoing '" + ','.join(input) + "' from python_plugin" + print(s) + if repeat: + print(f"(repeat) {s}") diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py b/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py new file mode 100644 index 00000000..ac0b4b5e --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py @@ -0,0 +1,11 @@ +import origen + +def before_cmd(): + print("before cmd!!") + print(origen.current_command.args) + if "say_hi_before_eval" in origen.current_command.args: + print("Hi from python-plugin during 'eval'!") + +def after_cmd(): + if "say_hi_before_eval" in origen.current_command.args: + print("Hi again from python-plugin during 'eval'!") diff --git a/test_apps/python_plugin/python_plugin/commands/plugin_says_hi.py b/test_apps/python_plugin/python_plugin/commands/plugin_says_hi.py new file mode 100644 index 00000000..984f92d7 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/plugin_says_hi.py @@ -0,0 +1,6 @@ +def run(times=1, loudly=False, to=None): + t = int(times) + print(f"Saying hi {t} time(s)...") + for _ in range(t): + s = f"Hi{(' ' + ','.join(to)) if to else ''} from the python plugin!" + print(s if not loudly else s.upper()) \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands/plugin_test_args.py b/test_apps/python_plugin/python_plugin/commands/plugin_test_args.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/plugin_test_args.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_plugin/python_plugin/commands/plugin_test_args.subc.py b/test_apps/python_plugin/python_plugin/commands/plugin_test_args.subc.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/plugin_test_args.subc.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.py b/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.subc.py b/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.subc.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.subc.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_plugin/python_plugin/origen.plugin.toml b/test_apps/python_plugin/python_plugin/origen.plugin.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/.gitignore b/test_apps/python_plugin_no_cmds/.gitignore new file mode 100644 index 00000000..47275fc7 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/.gitignore @@ -0,0 +1,6 @@ +/.origen +/output +/web/source/_static/build +/web/source/interbuild +/tmp +/.ref \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/config/application.toml b/test_apps/python_plugin_no_cmds/config/application.toml new file mode 100644 index 00000000..415a9cf4 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/config/application.toml @@ -0,0 +1 @@ +name = "python_plugin_no_cmds" \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/config/commands.toml b/test_apps/python_plugin_no_cmds/config/commands.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/config/origen.toml b/test_apps/python_plugin_no_cmds/config/origen.toml new file mode 100644 index 00000000..eee0cdec --- /dev/null +++ b/test_apps/python_plugin_no_cmds/config/origen.toml @@ -0,0 +1,14 @@ +# Use this to define your application-specific Origen configuration +# Do not delete it even if you don't use it since it is also used by the Origen +# command line interface to determine when it is in an Origen application workspace + +# Specify what command should be used to invoke python, if not specified +# Origen will try python, python3, python3.8, etc. until one is found that +# satisfies the minimum Python version requirement +#python_cmd = "mypython" + +# If your company has an internal package server enter it here: +#pkg_server = "https://pkgs.company.net:9292" +# or here, if you need to use different urls for push and pull (write and read): +#pkg_server_push = "https://pkgs.company.net:9292" +#pkg_server_pull = "https://pkgs.company.net:9292" \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/poetry.lock b/test_apps/python_plugin_no_cmds/poetry.lock new file mode 100644 index 00000000..74f65dab --- /dev/null +++ b/test_apps/python_plugin_no_cmds/poetry.lock @@ -0,0 +1,1358 @@ +[[package]] +name = "alabaster" +version = "0.7.12" +description = "A configurable sidebar-enabled Sphinx theme" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "atomicwrites" +version = "1.4.1" +description = "Atomic file writes." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "attrs" +version = "22.1.0" +description = "Classes Without Boilerplate" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.extras] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] + +[[package]] +name = "babel" +version = "2.10.3" +description = "Internationalization utilities" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pytz = ">=2015.7" + +[[package]] +name = "beautifulsoup4" +version = "4.8.2" +description = "Screen-scraping library" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +soupsieve = ">=1.2" + +[package.extras] +html5lib = ["html5lib"] +lxml = ["lxml"] + +[[package]] +name = "bs4" +version = "0.0.1" +description = "Dummy package for Beautiful Soup" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +beautifulsoup4 = "*" + +[[package]] +name = "cachecontrol" +version = "0.12.11" +description = "httplib2 caching for requests" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} +msgpack = ">=0.5.2" +requests = "*" + +[package.extras] +filecache = ["lockfile (>=0.9)"] +redis = ["redis (>=2.10.5)"] + +[[package]] +name = "cachy" +version = "0.3.0" +description = "Cachy provides a simple yet effective caching library." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.extras] +redis = ["redis (>=3.3.6,<4.0.0)"] +memcached = ["python-memcached (>=1.59,<2.0)"] +msgpack = ["msgpack-python (>=0.5,<0.6)"] + +[[package]] +name = "certifi" +version = "2022.6.15" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "2.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" +optional = false +python-versions = ">=3.6.0" + +[package.extras] +unicode_backport = ["unicodedata2"] + +[[package]] +name = "cleo" +version = "0.8.1" +description = "Cleo allows you to create beautiful and testable command-line interfaces." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +clikit = ">=0.6.0,<0.7.0" + +[[package]] +name = "clikit" +version = "0.6.2" +description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +pastel = ">=0.2.0,<0.3.0" +pylev = ">=1.3,<2.0" + +[[package]] +name = "colorama" +version = "0.4.5" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "commonmark" +version = "0.9.1" +description = "Python parser for the CommonMark Markdown spec" +category = "main" +optional = false +python-versions = "*" + +[package.extras] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] + +[[package]] +name = "crashtest" +version = "0.3.1" +description = "Manage Python errors with ease" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "cryptography" +version = "37.0.4" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +cffi = ">=1.12" + +[package.extras] +docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] +docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +sdist = ["setuptools_rust (>=0.11.4)"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] + +[[package]] +name = "distlib" +version = "0.3.5" +description = "Distribution utilities" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "docutils" +version = "0.19" +description = "Docutils -- Python Documentation Utilities" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "filelock" +version = "3.8.0" +description = "A platform independent file lock." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] +docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] + +[[package]] +name = "html5lib" +version = "1.1" +description = "HTML parser based on the WHATWG HTML specification" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +six = ">=1.9" +webencodings = "*" + +[package.extras] +all = ["genshi", "chardet (>=2.2)", "lxml"] +chardet = ["chardet (>=2.2)"] +genshi = ["genshi"] +lxml = ["lxml"] + +[[package]] +name = "idna" +version = "3.3" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "importlib-metadata" +version = "1.7.0" +description = "Read metadata from Python packages" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["sphinx", "rst.linker"] +testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] + +[[package]] +name = "jeepney" +version = "0.8.0" +description = "Low-level, pure Python DBus protocol wrapper." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] +trio = ["trio", "async-generator"] + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "keyring" +version = "22.3.0" +description = "Store and access your passwords safely." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] + +[[package]] +name = "lockfile" +version = "0.12.2" +description = "Platform-independent file locking module" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "mako" +version = "1.1.0" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +MarkupSafe = ">=0.9.2" + +[[package]] +name = "markupsafe" +version = "2.1.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "more-itertools" +version = "8.14.0" +description = "More routines for operating on iterables, beyond itertools" +category = "dev" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "msgpack" +version = "1.0.4" +description = "MessagePack serializer" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "origen" +version = "2.0.0.dev5" +description = "Semiconductor Developer's Kit" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +beautifulsoup4 = "4.8.2" +bs4 = "0.0.1" +colorama = "^0.4" +importlib-metadata = ">= 1.7.0" +Jinja2 = "^3" +mako = "1.1.0" +origen_autoapi = "2.0.1" +origen_metal = "= 0.4.0" +poetry = "^1.1.14" +recommonmark = ">= 0" +sphinx = "3.0.2" +sphinxbootstrap4theme = ">= 0" +termcolor = ">= 1.1.0" +yapf = "0.30" + +[package.source] +type = "directory" +url = "../../python/origen" + +[[package]] +name = "origen-autoapi" +version = "2.0.1" +description = "Automatic API reference documentation generation for Sphinx inspired by Doxygen, with changes for the Origen project." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +sphinx = "*" + +[[package]] +name = "origen-metal" +version = "0.4.0" +description = "Bare metal APIs for the Origen SDK" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +colorama = ">= 0.4.4" +pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} +termcolor = ">= 1.1.0" + +[package.source] +type = "directory" +url = "../../python/origen_metal" + +[[package]] +name = "packaging" +version = "20.9" +description = "Core utilities for Python packages" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +pyparsing = ">=2.0.2" + +[[package]] +name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pkginfo" +version = "1.8.3" +description = "Query metadatdata from sdists / bdists / installed packages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" + +[package.extras] +testing = ["nose", "coverage"] + +[[package]] +name = "platformdirs" +version = "2.5.2" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "poetry" +version = "1.1.14" +description = "Python dependency management and packaging made easy." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +cachy = ">=0.3.0,<0.4.0" +cleo = ">=0.8.1,<0.9.0" +clikit = ">=0.6.2,<0.7.0" +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +html5lib = ">=1.0,<2.0" +importlib-metadata = {version = ">=1.6.0,<2.0.0", markers = "python_version < \"3.8\""} +keyring = {version = ">=21.2.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +packaging = ">=20.4,<21.0" +pexpect = ">=4.7.0,<5.0.0" +pkginfo = ">=1.4,<2.0" +poetry-core = ">=1.0.7,<1.1.0" +requests = ">=2.18,<3.0" +requests-toolbelt = ">=0.9.1,<0.10.0" +shellingham = ">=1.1,<2.0" +tomlkit = ">=0.7.0,<1.0.0" +virtualenv = ">=20.0.26,<21.0.0" + +[[package]] +name = "poetry-core" +version = "1.0.8" +description = "Poetry PEP 517 Build Backend" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pygments" +version = "2.12.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "pylev" +version = "1.4.0" +description = "A pure Python Levenshtein implementation that's not freaking GPL'd." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pyparsing" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +category = "main" +optional = false +python-versions = ">=3.6.8" + +[package.extras] +diagrams = ["railroad-diagrams", "jinja2"] + +[[package]] +name = "pyreadline3" +version = "3.4.1" +description = "A python implementation of GNU readline." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pytest" +version = "3.10.1" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +atomicwrites = ">=1.0" +attrs = ">=17.4.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +more-itertools = ">=4.0.0" +pluggy = ">=0.7" +py = ">=1.5.0" +six = ">=1.10.0" + +[[package]] +name = "pytz" +version = "2022.2.1" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pywin32-ctypes" +version = "0.2.0" +description = "" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "recommonmark" +version = "0.7.1" +description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +commonmark = ">=0.8.1" +docutils = ">=0.11" +sphinx = ">=1.3.1" + +[[package]] +name = "requests" +version = "2.28.1" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=3.7, <4" + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<3" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<1.27" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-toolbelt" +version = "0.9.1" +description = "A utility belt for advanced users of python-requests" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +name = "secretstorage" +version = "3.3.3" +description = "Python bindings to FreeDesktop.org Secret Service API" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + +[[package]] +name = "shellingham" +version = "1.5.0" +description = "Tool to Detect Surrounding Shell" +category = "main" +optional = false +python-versions = ">=3.4" + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "soupsieve" +version = "2.3.2.post1" +description = "A modern CSS selector implementation for Beautiful Soup." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "sphinx" +version = "3.0.2" +description = "Python documentation generator" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +alabaster = ">=0.7,<0.8" +babel = ">=1.3" +colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.12" +imagesize = "*" +Jinja2 = ">=2.3" +packaging = "*" +Pygments = ">=2.0" +requests = ">=2.5.0" +snowballstemmer = ">=1.1" +sphinxcontrib-applehelp = "*" +sphinxcontrib-devhelp = "*" +sphinxcontrib-htmlhelp = "*" +sphinxcontrib-jsmath = "*" +sphinxcontrib-qthelp = "*" +sphinxcontrib-serializinghtml = "*" + +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-stubs"] +test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] + +[[package]] +name = "sphinxbootstrap4theme" +version = "0.6.0" +description = "Sphinx Bootstrap4 Theme" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.2" +description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.2" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.0" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest", "html5lib"] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +test = ["pytest", "flake8", "mypy"] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.3" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.5" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "termcolor" +version = "1.1.0" +description = "ANSII Color formatting for output in terminal." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "tomlkit" +version = "0.11.4" +description = "Style preserving TOML library" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "urllib3" +version = "1.26.11" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" + +[package.extras] +brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[[package]] +name = "virtualenv" +version = "20.16.2" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +distlib = ">=0.3.1,<1" +filelock = ">=3.2,<4" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +platformdirs = ">=2,<3" + +[package.extras] +testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] +docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] + +[[package]] +name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "yapf" +version = "0.30.0" +description = "A formatter for Python code." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "zipp" +version = "3.8.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] + +[metadata] +lock-version = "1.1" +python-versions = ">=3.7,<3.11" +content-hash = "1f4c2af7a73abea014b8d078693c410088ef6c775fb5d4b9e8e06aa06b9a5680" + +[metadata.files] +alabaster = [ + {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, + {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, +] +atomicwrites = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] +attrs = [ + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, +] +babel = [ + {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, + {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, +] +beautifulsoup4 = [ + {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, + {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, + {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, +] +bs4 = [ + {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, +] +cachecontrol = [ + {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, + {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, +] +cachy = [ + {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, + {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, +] +certifi = [ + {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, + {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, +] +cffi = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] +charset-normalizer = [ + {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, + {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, +] +cleo = [ + {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, + {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, +] +clikit = [ + {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, + {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, +] +colorama = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] +commonmark = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] +crashtest = [ + {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, + {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, +] +cryptography = [ + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, + {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, + {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, + {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, +] +distlib = [ + {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, + {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, +] +docutils = [ + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, +] +filelock = [ + {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, + {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, +] +html5lib = [ + {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, + {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, +] +idna = [ + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, +] +imagesize = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] +importlib-metadata = [ + {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, + {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, +] +jeepney = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, +] +jinja2 = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] +keyring = [ + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, +] +lockfile = [ + {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, + {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +] +mako = [ + {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, +] +markupsafe = [ + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] +more-itertools = [ + {file = "more-itertools-8.14.0.tar.gz", hash = "sha256:c09443cd3d5438b8dafccd867a6bc1cb0894389e90cb53d227456b0b0bccb750"}, + {file = "more_itertools-8.14.0-py3-none-any.whl", hash = "sha256:1bc4f91ee5b1b31ac7ceacc17c09befe6a40a503907baf9c839c229b5095cfd2"}, +] +msgpack = [ + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, +] +origen = [] +origen-autoapi = [ + {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, + {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, +] +origen-metal = [] +packaging = [ + {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, + {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, +] +pastel = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] +pexpect = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] +pkginfo = [ + {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, + {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, +] +platformdirs = [ + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, +] +pluggy = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] +poetry = [ + {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, + {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, +] +poetry-core = [ + {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, + {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, +] +ptyprocess = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] +py = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] +pycparser = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] +pygments = [ + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, +] +pylev = [ + {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, + {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, +] +pyparsing = [ + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, +] +pyreadline3 = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] +pytest = [ + {file = "pytest-3.10.1-py2.py3-none-any.whl", hash = "sha256:3f193df1cfe1d1609d4c583838bea3d532b18d6160fd3f55c9447fdca30848ec"}, + {file = "pytest-3.10.1.tar.gz", hash = "sha256:e246cf173c01169b9617fc07264b7b1316e78d7a650055235d6d897bc80d9660"}, +] +pytz = [ + {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, + {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, +] +pywin32-ctypes = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] +recommonmark = [ + {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, + {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, +] +requests = [ + {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, + {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, +] +requests-toolbelt = [ + {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, + {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, +] +secretstorage = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] +shellingham = [ + {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, + {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] +snowballstemmer = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] +soupsieve = [ + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, +] +sphinx = [ + {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, + {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, +] +sphinxbootstrap4theme = [ + {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, +] +sphinxcontrib-applehelp = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] +sphinxcontrib-devhelp = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] +sphinxcontrib-htmlhelp = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] +sphinxcontrib-jsmath = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] +sphinxcontrib-qthelp = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] +sphinxcontrib-serializinghtml = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] +termcolor = [ + {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, +] +tomlkit = [ + {file = "tomlkit-0.11.4-py3-none-any.whl", hash = "sha256:25d4e2e446c453be6360c67ddfb88838cfc42026322770ba13d1fbd403a93a5c"}, + {file = "tomlkit-0.11.4.tar.gz", hash = "sha256:3235a9010fae54323e727c3ac06fb720752fe6635b3426e379daec60fbd44a83"}, +] +urllib3 = [ + {file = "urllib3-1.26.11-py2.py3-none-any.whl", hash = "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc"}, + {file = "urllib3-1.26.11.tar.gz", hash = "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"}, +] +virtualenv = [ + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, +] +webencodings = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] +yapf = [ + {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, + {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, +] +zipp = [ + {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, + {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, +] diff --git a/test_apps/python_plugin_no_cmds/pyproject.toml b/test_apps/python_plugin_no_cmds/pyproject.toml new file mode 100644 index 00000000..58ced09e --- /dev/null +++ b/test_apps/python_plugin_no_cmds/pyproject.toml @@ -0,0 +1,17 @@ +[tool.poetry] +name = "python_plugin_no_cmds" +version = "0.1.0" +description = "Example Origen Plugin Without Any Commands" +authors = ["Origen-SDK"] + +[tool.poetry.dependencies] +python = ">=3.7,<3.11" +origen = { path = "../../python/origen", develop = true } +origen_metal = { path = "../../python/origen_metal", develop = true } + +[tool.poetry.dev-dependencies] +pytest = "^3" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/application.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/application.py new file mode 100644 index 00000000..5b9a0cb4 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/application.py @@ -0,0 +1,6 @@ +from origen.application import Base + +# This class represents this application and is automatically instantiated as `origen.app` +# It is required by Origen and should not be renamed or removed under any circumstances +class Application(Base): + pass diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/commands.toml b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/commands.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/attributes.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/attributes.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/controller.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/controller.py new file mode 100644 index 00000000..2e09abc1 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/controller.py @@ -0,0 +1,18 @@ +from origen.controller import TopLevel as BaseController +import origen + + +class Controller(BaseController): + def write_register(self, reg_or_val, size=None, address=None, **kwargs): + # Invoke your driver of choice to dispatch this write_register request, + # here is a JTAG example: + #self.jtag.write_ir(0xF, size=8) + #self.jtag.write_dr(reg_or_val, size) + raise RuntimeError(f"A request to write a register was received by '{self.path}' ({type(self)}), however the logic to implement it has not been defined yet") + + def verify_register(self, reg_or_val, size=None, address=None, **kwargs): + # Invoke your driver of choice to dispatch this verify_register request, + # here is a JTAG example: + #self.jtag.write_ir(0x1F, size=8) + #self.jtag.verify_dr(reg_or_val, size) + raise RuntimeError(f"A request to verify a register was received by '{self.path}' ({type(self)}), however the logic to implement it has not been defined yet") diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/attributes.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/attributes.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/controller.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/controller.py new file mode 100644 index 00000000..05ae2a5e --- /dev/null +++ b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/controller.py @@ -0,0 +1,16 @@ +from ...controller import Controller as Parent +import origen + + +class Controller(Parent): + def write_register(self, reg_or_val, size=None, address=None, **kwargs): + # All write register requests originated from within this block (or one of its children) + # will be sent to the parent class by default, however you can intercept it here and do + # something else if required + super().write_register(reg_or_val, size, address, **kwargs) + + def verify_register(self, reg_or_val, size=None, address=None, **kwargs): + # A verify register requests originated from within this block (or one of its children) + # will be sent to the parent class by default, however you can intercept it here and do + # something else if required + super().verify_register(reg_or_val, size, address, **kwargs) diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/levels.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/levels.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/pins.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/pins.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/registers.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/registers.py new file mode 100644 index 00000000..591d55e9 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/registers.py @@ -0,0 +1,33 @@ +########################################################################################## +# Any registers defined here will be added to this DUT and all of its derivative children +########################################################################################## + +# Example of a simple register definition with all bits r/w, 0x0 is the local offset address: +# +# SimpleReg("my_reg1", 0x0, size=32) # 32 is the default size if not specified +SimpleReg("hawk_reg1", 0x0, size=32) # 32 is the default size if not specified +# +# Example of a richer definition with bitfields: +# +# with Reg("my_reg2", 0x4): +# Field("coco", offset=7, access="ro") +# Field("aien", offset=6) +# Field("diff", offset=5) +# Field( +# "adch", +# offset=0, +# width=5, +# reset=0x1F, +# enums={ +# # A simple enum +# "val1": 3, +# # A more complex enum, all fields except for value are optional +# "val2": { +# "value": 5, +# "usage": "w", +# "description": "The value of something" +# }, +# }) +# +# For more examples and full documentation see: https://origen-sdk.org/o2/guides/registers + diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/services.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/services.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/sub_blocks.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/sub_blocks.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/timing.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/derivatives/pigeon/timing.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/levels.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/levels.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/pins.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/pins.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/registers.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/registers.py new file mode 100644 index 00000000..5de5f73c --- /dev/null +++ b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/registers.py @@ -0,0 +1,32 @@ +########################################################################################## +# Any registers defined here will be added to all DUTs in your application +########################################################################################## + +# Example of a simple register definition with all bits r/w, 0x0 is the local offset address: +# +# SimpleReg("my_reg1", 0x0, size=32) # 32 is the default size if not specified +# +# Example of a richer definition with bitfields: +# +# with Reg("my_reg2", 0x4): +# Field("coco", offset=7, access="ro") +# Field("aien", offset=6) +# Field("diff", offset=5) +# Field( +# "adch", +# offset=0, +# width=5, +# reset=0x1F, +# enums={ +# # A simple enum +# "val1": 3, +# # A more complex enum, all fields except for value are optional +# "val2": { +# "value": 5, +# "usage": "w", +# "description": "The value of something" +# }, +# }) +# +# For more examples and full documentation see: https://origen-sdk.org/o2/guides/registers + diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/services.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/services.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/sub_blocks.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/sub_blocks.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/timing.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/dut/timing.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/flows/.gitkeep b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/flows/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/interface/interface.py b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/interface/interface.py new file mode 100644 index 00000000..97544bae --- /dev/null +++ b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/interface/interface.py @@ -0,0 +1,5 @@ +from origen.interface import BaseInterface + + +class Interface(BaseInterface): + pass \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/origen.plugin.toml b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/origen.plugin.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/patterns/.gitkeep b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/patterns/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/templates/.gitkeep b/test_apps/python_plugin_no_cmds/python_plugin_no_cmds/templates/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/setup.cfg b/test_apps/python_plugin_no_cmds/setup.cfg new file mode 100644 index 00000000..6e1cfdfa --- /dev/null +++ b/test_apps/python_plugin_no_cmds/setup.cfg @@ -0,0 +1,2 @@ +[tool:pytest] +testpaths = tests \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/targets/dut/pigeon.py b/test_apps/python_plugin_no_cmds/targets/dut/pigeon.py new file mode 100644 index 00000000..5b6932d7 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/targets/dut/pigeon.py @@ -0,0 +1 @@ +origen.app.instantiate_dut("dut.pigeon") \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/targets/tester/smt7.py b/test_apps/python_plugin_no_cmds/targets/tester/smt7.py new file mode 100644 index 00000000..9335607f --- /dev/null +++ b/test_apps/python_plugin_no_cmds/targets/tester/smt7.py @@ -0,0 +1 @@ +origen.tester.target("::V93K::SMT7") \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/targets/tester/smt8.py b/test_apps/python_plugin_no_cmds/targets/tester/smt8.py new file mode 100644 index 00000000..7a378261 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/targets/tester/smt8.py @@ -0,0 +1 @@ +origen.tester.target("::V93K::SMT8") \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/targets/tester/uflex.py b/test_apps/python_plugin_no_cmds/targets/tester/uflex.py new file mode 100644 index 00000000..da6c3b88 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/targets/tester/uflex.py @@ -0,0 +1 @@ +origen.tester.target("Ultraflex") \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/tests/README.md b/test_apps/python_plugin_no_cmds/tests/README.md new file mode 100644 index 00000000..218887c3 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/tests/README.md @@ -0,0 +1,16 @@ +Note that the `tests` folder is the place to create tests to verify the +functionality of this Origen application, it does not refer to silicon +tests! + +This is setup to use a popular Python test framework called `pytest` which +requires that following naming convention is followed: + +* All files containing tests must be named `_test.py`, e.g. `tests/example_test.py` +* Functions that define tests within such files must be named `test_`, + e.g. `def test_example():` + +To execute the tests, run the following command from the command line: + +~~~ +poetry run pytest +~~~ \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/tests/example_test.py b/test_apps/python_plugin_no_cmds/tests/example_test.py new file mode 100644 index 00000000..374f68a0 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/tests/example_test.py @@ -0,0 +1,6 @@ +import origen +import pytest +from tests.shared import * + +def test_example(): + assert 1 == 1 \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/tests/shared/__init__.py b/test_apps/python_plugin_no_cmds/tests/shared/__init__.py new file mode 100644 index 00000000..5579f7f3 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/tests/shared/__init__.py @@ -0,0 +1,5 @@ +# This is a good place to add helper functions that you want to make +# available to all of your tests + +import pytest +import origen \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/vendor/.gitkeep b/test_apps/python_plugin_no_cmds/vendor/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/web/Makefile b/test_apps/python_plugin_no_cmds/web/Makefile new file mode 100644 index 00000000..d0c3cbf1 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/web/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/test_apps/python_plugin_no_cmds/web/make.bat b/test_apps/python_plugin_no_cmds/web/make.bat new file mode 100644 index 00000000..9534b018 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/web/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/test_apps/python_plugin_no_cmds/web/source/_static/.gitkeep b/test_apps/python_plugin_no_cmds/web/source/_static/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_no_cmds/web/source/conf.py b/test_apps/python_plugin_no_cmds/web/source/conf.py new file mode 100644 index 00000000..97ffc3a8 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/web/source/conf.py @@ -0,0 +1,76 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) +import origen +import origen.web + +import sys, os +sys.path.insert(0, os.path.abspath('../../')) + +# -- Project information ----------------------------------------------------- + +project = 'python_plugin_no_cmds' +copyright = '2020, Origen Core Team' +author = 'Origen Core Team' + +# The full version, including alpha/beta/rc tags +release = '0.0.0' + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'origen.web.origen_sphinx_extension', 'origen_autoapi.sphinx', + 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.autosectionlabel', + 'recommonmark', 'origen.web.shorthand' +] + +autosectionlabel_prefix_document = True +autoapi_modules = { + 'python_plugin_no_cmds.application': { + 'module-members': ['undoc-members'], + 'class-members': ['members', 'undoc-members'] + } +} +autoapi_output_dir = origen.web.interbuild_dir.joinpath('autoapi') + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +#html_theme_options = { +# 'navbar_links': +# [('Github', 'https://github.com/Origen-SDK/o2/tree/master/example', True)], +# 'logos': [{ +# 'src': '_static/example_logo.png', +# 'alt': 'Example', +# 'rel_src': True, +# }] +#} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/test_apps/python_plugin_no_cmds/web/source/index.rst b/test_apps/python_plugin_no_cmds/web/source/index.rst new file mode 100644 index 00000000..da79fe72 --- /dev/null +++ b/test_apps/python_plugin_no_cmds/web/source/index.rst @@ -0,0 +1,22 @@ +.. example documentation master file, created by + sphinx-quickstart on Wed Apr 15 21:59:35 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to python_plugin_no_cmds's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + interbuild/autoapi/python_plugin_no_cmds.application/python_plugin_no_cmds.application + +For information on how to build documentation with Origen, see :link-to:`the documentation guides `. + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/test_apps/python_plugin_the_second/.gitignore b/test_apps/python_plugin_the_second/.gitignore new file mode 100644 index 00000000..47275fc7 --- /dev/null +++ b/test_apps/python_plugin_the_second/.gitignore @@ -0,0 +1,6 @@ +/.origen +/output +/web/source/_static/build +/web/source/interbuild +/tmp +/.ref \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/config/application.toml b/test_apps/python_plugin_the_second/config/application.toml new file mode 100644 index 00000000..fafb9dd7 --- /dev/null +++ b/test_apps/python_plugin_the_second/config/application.toml @@ -0,0 +1,5 @@ +name = "python_plugin_the_second" +# Define a default target/environment that will be used by a new workspace +#target = ["dut/falcon", "tester/v93k"] +# To make your application workspace run in production mode by default +#mode = "production" \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/config/commands.toml b/test_apps/python_plugin_the_second/config/commands.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/config/origen.toml b/test_apps/python_plugin_the_second/config/origen.toml new file mode 100644 index 00000000..eee0cdec --- /dev/null +++ b/test_apps/python_plugin_the_second/config/origen.toml @@ -0,0 +1,14 @@ +# Use this to define your application-specific Origen configuration +# Do not delete it even if you don't use it since it is also used by the Origen +# command line interface to determine when it is in an Origen application workspace + +# Specify what command should be used to invoke python, if not specified +# Origen will try python, python3, python3.8, etc. until one is found that +# satisfies the minimum Python version requirement +#python_cmd = "mypython" + +# If your company has an internal package server enter it here: +#pkg_server = "https://pkgs.company.net:9292" +# or here, if you need to use different urls for push and pull (write and read): +#pkg_server_push = "https://pkgs.company.net:9292" +#pkg_server_pull = "https://pkgs.company.net:9292" \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/poetry.lock b/test_apps/python_plugin_the_second/poetry.lock new file mode 100644 index 00000000..74f65dab --- /dev/null +++ b/test_apps/python_plugin_the_second/poetry.lock @@ -0,0 +1,1358 @@ +[[package]] +name = "alabaster" +version = "0.7.12" +description = "A configurable sidebar-enabled Sphinx theme" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "atomicwrites" +version = "1.4.1" +description = "Atomic file writes." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "attrs" +version = "22.1.0" +description = "Classes Without Boilerplate" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.extras] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] + +[[package]] +name = "babel" +version = "2.10.3" +description = "Internationalization utilities" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pytz = ">=2015.7" + +[[package]] +name = "beautifulsoup4" +version = "4.8.2" +description = "Screen-scraping library" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +soupsieve = ">=1.2" + +[package.extras] +html5lib = ["html5lib"] +lxml = ["lxml"] + +[[package]] +name = "bs4" +version = "0.0.1" +description = "Dummy package for Beautiful Soup" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +beautifulsoup4 = "*" + +[[package]] +name = "cachecontrol" +version = "0.12.11" +description = "httplib2 caching for requests" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} +msgpack = ">=0.5.2" +requests = "*" + +[package.extras] +filecache = ["lockfile (>=0.9)"] +redis = ["redis (>=2.10.5)"] + +[[package]] +name = "cachy" +version = "0.3.0" +description = "Cachy provides a simple yet effective caching library." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.extras] +redis = ["redis (>=3.3.6,<4.0.0)"] +memcached = ["python-memcached (>=1.59,<2.0)"] +msgpack = ["msgpack-python (>=0.5,<0.6)"] + +[[package]] +name = "certifi" +version = "2022.6.15" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "2.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" +optional = false +python-versions = ">=3.6.0" + +[package.extras] +unicode_backport = ["unicodedata2"] + +[[package]] +name = "cleo" +version = "0.8.1" +description = "Cleo allows you to create beautiful and testable command-line interfaces." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +clikit = ">=0.6.0,<0.7.0" + +[[package]] +name = "clikit" +version = "0.6.2" +description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +pastel = ">=0.2.0,<0.3.0" +pylev = ">=1.3,<2.0" + +[[package]] +name = "colorama" +version = "0.4.5" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "commonmark" +version = "0.9.1" +description = "Python parser for the CommonMark Markdown spec" +category = "main" +optional = false +python-versions = "*" + +[package.extras] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] + +[[package]] +name = "crashtest" +version = "0.3.1" +description = "Manage Python errors with ease" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "cryptography" +version = "37.0.4" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +cffi = ">=1.12" + +[package.extras] +docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] +docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +sdist = ["setuptools_rust (>=0.11.4)"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] + +[[package]] +name = "distlib" +version = "0.3.5" +description = "Distribution utilities" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "docutils" +version = "0.19" +description = "Docutils -- Python Documentation Utilities" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "filelock" +version = "3.8.0" +description = "A platform independent file lock." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] +docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] + +[[package]] +name = "html5lib" +version = "1.1" +description = "HTML parser based on the WHATWG HTML specification" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +six = ">=1.9" +webencodings = "*" + +[package.extras] +all = ["genshi", "chardet (>=2.2)", "lxml"] +chardet = ["chardet (>=2.2)"] +genshi = ["genshi"] +lxml = ["lxml"] + +[[package]] +name = "idna" +version = "3.3" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "importlib-metadata" +version = "1.7.0" +description = "Read metadata from Python packages" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["sphinx", "rst.linker"] +testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] + +[[package]] +name = "jeepney" +version = "0.8.0" +description = "Low-level, pure Python DBus protocol wrapper." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] +trio = ["trio", "async-generator"] + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "keyring" +version = "22.3.0" +description = "Store and access your passwords safely." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] + +[[package]] +name = "lockfile" +version = "0.12.2" +description = "Platform-independent file locking module" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "mako" +version = "1.1.0" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +MarkupSafe = ">=0.9.2" + +[[package]] +name = "markupsafe" +version = "2.1.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "more-itertools" +version = "8.14.0" +description = "More routines for operating on iterables, beyond itertools" +category = "dev" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "msgpack" +version = "1.0.4" +description = "MessagePack serializer" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "origen" +version = "2.0.0.dev5" +description = "Semiconductor Developer's Kit" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +beautifulsoup4 = "4.8.2" +bs4 = "0.0.1" +colorama = "^0.4" +importlib-metadata = ">= 1.7.0" +Jinja2 = "^3" +mako = "1.1.0" +origen_autoapi = "2.0.1" +origen_metal = "= 0.4.0" +poetry = "^1.1.14" +recommonmark = ">= 0" +sphinx = "3.0.2" +sphinxbootstrap4theme = ">= 0" +termcolor = ">= 1.1.0" +yapf = "0.30" + +[package.source] +type = "directory" +url = "../../python/origen" + +[[package]] +name = "origen-autoapi" +version = "2.0.1" +description = "Automatic API reference documentation generation for Sphinx inspired by Doxygen, with changes for the Origen project." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +sphinx = "*" + +[[package]] +name = "origen-metal" +version = "0.4.0" +description = "Bare metal APIs for the Origen SDK" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +colorama = ">= 0.4.4" +pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} +termcolor = ">= 1.1.0" + +[package.source] +type = "directory" +url = "../../python/origen_metal" + +[[package]] +name = "packaging" +version = "20.9" +description = "Core utilities for Python packages" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +pyparsing = ">=2.0.2" + +[[package]] +name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pkginfo" +version = "1.8.3" +description = "Query metadatdata from sdists / bdists / installed packages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" + +[package.extras] +testing = ["nose", "coverage"] + +[[package]] +name = "platformdirs" +version = "2.5.2" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "poetry" +version = "1.1.14" +description = "Python dependency management and packaging made easy." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +cachy = ">=0.3.0,<0.4.0" +cleo = ">=0.8.1,<0.9.0" +clikit = ">=0.6.2,<0.7.0" +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +html5lib = ">=1.0,<2.0" +importlib-metadata = {version = ">=1.6.0,<2.0.0", markers = "python_version < \"3.8\""} +keyring = {version = ">=21.2.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +packaging = ">=20.4,<21.0" +pexpect = ">=4.7.0,<5.0.0" +pkginfo = ">=1.4,<2.0" +poetry-core = ">=1.0.7,<1.1.0" +requests = ">=2.18,<3.0" +requests-toolbelt = ">=0.9.1,<0.10.0" +shellingham = ">=1.1,<2.0" +tomlkit = ">=0.7.0,<1.0.0" +virtualenv = ">=20.0.26,<21.0.0" + +[[package]] +name = "poetry-core" +version = "1.0.8" +description = "Poetry PEP 517 Build Backend" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pygments" +version = "2.12.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "pylev" +version = "1.4.0" +description = "A pure Python Levenshtein implementation that's not freaking GPL'd." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pyparsing" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +category = "main" +optional = false +python-versions = ">=3.6.8" + +[package.extras] +diagrams = ["railroad-diagrams", "jinja2"] + +[[package]] +name = "pyreadline3" +version = "3.4.1" +description = "A python implementation of GNU readline." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pytest" +version = "3.10.1" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +atomicwrites = ">=1.0" +attrs = ">=17.4.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +more-itertools = ">=4.0.0" +pluggy = ">=0.7" +py = ">=1.5.0" +six = ">=1.10.0" + +[[package]] +name = "pytz" +version = "2022.2.1" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pywin32-ctypes" +version = "0.2.0" +description = "" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "recommonmark" +version = "0.7.1" +description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +commonmark = ">=0.8.1" +docutils = ">=0.11" +sphinx = ">=1.3.1" + +[[package]] +name = "requests" +version = "2.28.1" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=3.7, <4" + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<3" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<1.27" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-toolbelt" +version = "0.9.1" +description = "A utility belt for advanced users of python-requests" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +name = "secretstorage" +version = "3.3.3" +description = "Python bindings to FreeDesktop.org Secret Service API" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + +[[package]] +name = "shellingham" +version = "1.5.0" +description = "Tool to Detect Surrounding Shell" +category = "main" +optional = false +python-versions = ">=3.4" + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "soupsieve" +version = "2.3.2.post1" +description = "A modern CSS selector implementation for Beautiful Soup." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "sphinx" +version = "3.0.2" +description = "Python documentation generator" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +alabaster = ">=0.7,<0.8" +babel = ">=1.3" +colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.12" +imagesize = "*" +Jinja2 = ">=2.3" +packaging = "*" +Pygments = ">=2.0" +requests = ">=2.5.0" +snowballstemmer = ">=1.1" +sphinxcontrib-applehelp = "*" +sphinxcontrib-devhelp = "*" +sphinxcontrib-htmlhelp = "*" +sphinxcontrib-jsmath = "*" +sphinxcontrib-qthelp = "*" +sphinxcontrib-serializinghtml = "*" + +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-stubs"] +test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] + +[[package]] +name = "sphinxbootstrap4theme" +version = "0.6.0" +description = "Sphinx Bootstrap4 Theme" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.2" +description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.2" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.0" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest", "html5lib"] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +test = ["pytest", "flake8", "mypy"] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.3" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.5" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "termcolor" +version = "1.1.0" +description = "ANSII Color formatting for output in terminal." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "tomlkit" +version = "0.11.4" +description = "Style preserving TOML library" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "urllib3" +version = "1.26.11" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" + +[package.extras] +brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[[package]] +name = "virtualenv" +version = "20.16.2" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +distlib = ">=0.3.1,<1" +filelock = ">=3.2,<4" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +platformdirs = ">=2,<3" + +[package.extras] +testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] +docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] + +[[package]] +name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "yapf" +version = "0.30.0" +description = "A formatter for Python code." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "zipp" +version = "3.8.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] + +[metadata] +lock-version = "1.1" +python-versions = ">=3.7,<3.11" +content-hash = "1f4c2af7a73abea014b8d078693c410088ef6c775fb5d4b9e8e06aa06b9a5680" + +[metadata.files] +alabaster = [ + {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, + {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, +] +atomicwrites = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] +attrs = [ + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, +] +babel = [ + {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, + {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, +] +beautifulsoup4 = [ + {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, + {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, + {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, +] +bs4 = [ + {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, +] +cachecontrol = [ + {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, + {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, +] +cachy = [ + {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, + {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, +] +certifi = [ + {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, + {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, +] +cffi = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] +charset-normalizer = [ + {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, + {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, +] +cleo = [ + {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, + {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, +] +clikit = [ + {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, + {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, +] +colorama = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] +commonmark = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] +crashtest = [ + {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, + {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, +] +cryptography = [ + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, + {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, + {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, + {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, +] +distlib = [ + {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, + {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, +] +docutils = [ + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, +] +filelock = [ + {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, + {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, +] +html5lib = [ + {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, + {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, +] +idna = [ + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, +] +imagesize = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] +importlib-metadata = [ + {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, + {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, +] +jeepney = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, +] +jinja2 = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] +keyring = [ + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, +] +lockfile = [ + {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, + {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +] +mako = [ + {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, +] +markupsafe = [ + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] +more-itertools = [ + {file = "more-itertools-8.14.0.tar.gz", hash = "sha256:c09443cd3d5438b8dafccd867a6bc1cb0894389e90cb53d227456b0b0bccb750"}, + {file = "more_itertools-8.14.0-py3-none-any.whl", hash = "sha256:1bc4f91ee5b1b31ac7ceacc17c09befe6a40a503907baf9c839c229b5095cfd2"}, +] +msgpack = [ + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, +] +origen = [] +origen-autoapi = [ + {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, + {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, +] +origen-metal = [] +packaging = [ + {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, + {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, +] +pastel = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] +pexpect = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] +pkginfo = [ + {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, + {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, +] +platformdirs = [ + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, +] +pluggy = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] +poetry = [ + {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, + {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, +] +poetry-core = [ + {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, + {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, +] +ptyprocess = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] +py = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] +pycparser = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] +pygments = [ + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, +] +pylev = [ + {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, + {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, +] +pyparsing = [ + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, +] +pyreadline3 = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] +pytest = [ + {file = "pytest-3.10.1-py2.py3-none-any.whl", hash = "sha256:3f193df1cfe1d1609d4c583838bea3d532b18d6160fd3f55c9447fdca30848ec"}, + {file = "pytest-3.10.1.tar.gz", hash = "sha256:e246cf173c01169b9617fc07264b7b1316e78d7a650055235d6d897bc80d9660"}, +] +pytz = [ + {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, + {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, +] +pywin32-ctypes = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] +recommonmark = [ + {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, + {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, +] +requests = [ + {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, + {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, +] +requests-toolbelt = [ + {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, + {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, +] +secretstorage = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] +shellingham = [ + {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, + {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] +snowballstemmer = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] +soupsieve = [ + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, +] +sphinx = [ + {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, + {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, +] +sphinxbootstrap4theme = [ + {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, +] +sphinxcontrib-applehelp = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] +sphinxcontrib-devhelp = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] +sphinxcontrib-htmlhelp = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] +sphinxcontrib-jsmath = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] +sphinxcontrib-qthelp = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] +sphinxcontrib-serializinghtml = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] +termcolor = [ + {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, +] +tomlkit = [ + {file = "tomlkit-0.11.4-py3-none-any.whl", hash = "sha256:25d4e2e446c453be6360c67ddfb88838cfc42026322770ba13d1fbd403a93a5c"}, + {file = "tomlkit-0.11.4.tar.gz", hash = "sha256:3235a9010fae54323e727c3ac06fb720752fe6635b3426e379daec60fbd44a83"}, +] +urllib3 = [ + {file = "urllib3-1.26.11-py2.py3-none-any.whl", hash = "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc"}, + {file = "urllib3-1.26.11.tar.gz", hash = "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"}, +] +virtualenv = [ + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, +] +webencodings = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] +yapf = [ + {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, + {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, +] +zipp = [ + {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, + {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, +] diff --git a/test_apps/python_plugin_the_second/pyproject.toml b/test_apps/python_plugin_the_second/pyproject.toml new file mode 100644 index 00000000..c029c5ff --- /dev/null +++ b/test_apps/python_plugin_the_second/pyproject.toml @@ -0,0 +1,17 @@ +[tool.poetry] +name = "python_plugin_the_second" +version = "0.1.0" +description = "Another Example Origen Plugin" +authors = ["Origen-SDK"] + +[tool.poetry.dependencies] +python = ">=3.7,<3.11" +origen = { path = "../../python/origen", develop = true } +origen_metal = { path = "../../python/origen_metal", develop = true } + +[tool.poetry.dev-dependencies] +pytest = "^3" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/application.py b/test_apps/python_plugin_the_second/python_plugin_the_second/application.py new file mode 100644 index 00000000..5b9a0cb4 --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/application.py @@ -0,0 +1,6 @@ +from origen.application import Base + +# This class represents this application and is automatically instantiated as `origen.app` +# It is required by Origen and should not be renamed or removed under any circumstances +class Application(Base): + pass diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/commands.toml b/test_apps/python_plugin_the_second/python_plugin_the_second/commands.toml new file mode 100644 index 00000000..66627d85 --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/commands.toml @@ -0,0 +1,49 @@ +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking" + + [[extension.opt]] + name = "pl_the_2nd_ext_action" + multiple = true + help = "Action from pl_the_2nd plugin" + + [[extension.opt]] + name = "pl_the_2nd_ext_flag" + help = "Flag from pl_the_2nd plugin" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" + + [[extension.opt]] + name = "pl_the_2nd_ext_action_subc" + multiple = true + help = "Action from pl_the_2nd plugin subc" + + [[extension.opt]] + name = "pl_the_2nd_ext_flag_subc" + help = "Flag from pl_the_2nd plugin subc" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd" +on_env = ["ORIGEN_DUMMY_AUX_CMDS"] + + [[extension.opt]] + name = "python_plugin_the_second_action" + multiple = true + help = "Action from pl_the_2nd plugin" + + [[extension.opt]] + name = "python_plugin_the_second_flag" + help = "Flag from pl_the_2nd plugin" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd.subc" +on_env = ["ORIGEN_DUMMY_AUX_CMDS"] + + [[extension.opt]] + name = "python_plugin_the_second_action_subc" + multiple = true + help = "Action from pl_the_2nd plugin subc" + + [[extension.opt]] + name = "python_plugin_the_second_flag_subc" + help = "Flag from pl_the_2nd plugin subc" diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py b/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/aux_ns/dummy_cmds/dummy_cmd/subc.py b/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/aux_ns/dummy_cmds/dummy_cmd/subc.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/aux_ns/dummy_cmds/dummy_cmd/subc.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/plugin.python_plugin.plugin_test_ext_stacking.py b/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/plugin.python_plugin.plugin_test_ext_stacking.py new file mode 100644 index 00000000..47fb03cf --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/plugin.python_plugin.plugin_test_ext_stacking.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/plugin.python_plugin.plugin_test_ext_stacking.subc.py b/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/plugin.python_plugin.plugin_test_ext_stacking.subc.py new file mode 100644 index 00000000..47fb03cf --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/commands/extensions/plugin.python_plugin.plugin_test_ext_stacking.subc.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/attributes.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/attributes.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/controller.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/controller.py new file mode 100644 index 00000000..2e09abc1 --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/controller.py @@ -0,0 +1,18 @@ +from origen.controller import TopLevel as BaseController +import origen + + +class Controller(BaseController): + def write_register(self, reg_or_val, size=None, address=None, **kwargs): + # Invoke your driver of choice to dispatch this write_register request, + # here is a JTAG example: + #self.jtag.write_ir(0xF, size=8) + #self.jtag.write_dr(reg_or_val, size) + raise RuntimeError(f"A request to write a register was received by '{self.path}' ({type(self)}), however the logic to implement it has not been defined yet") + + def verify_register(self, reg_or_val, size=None, address=None, **kwargs): + # Invoke your driver of choice to dispatch this verify_register request, + # here is a JTAG example: + #self.jtag.write_ir(0x1F, size=8) + #self.jtag.verify_dr(reg_or_val, size) + raise RuntimeError(f"A request to verify a register was received by '{self.path}' ({type(self)}), however the logic to implement it has not been defined yet") diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/attributes.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/attributes.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/controller.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/controller.py new file mode 100644 index 00000000..05ae2a5e --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/controller.py @@ -0,0 +1,16 @@ +from ...controller import Controller as Parent +import origen + + +class Controller(Parent): + def write_register(self, reg_or_val, size=None, address=None, **kwargs): + # All write register requests originated from within this block (or one of its children) + # will be sent to the parent class by default, however you can intercept it here and do + # something else if required + super().write_register(reg_or_val, size, address, **kwargs) + + def verify_register(self, reg_or_val, size=None, address=None, **kwargs): + # A verify register requests originated from within this block (or one of its children) + # will be sent to the parent class by default, however you can intercept it here and do + # something else if required + super().verify_register(reg_or_val, size, address, **kwargs) diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/levels.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/levels.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/pins.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/pins.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/registers.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/registers.py new file mode 100644 index 00000000..591d55e9 --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/registers.py @@ -0,0 +1,33 @@ +########################################################################################## +# Any registers defined here will be added to this DUT and all of its derivative children +########################################################################################## + +# Example of a simple register definition with all bits r/w, 0x0 is the local offset address: +# +# SimpleReg("my_reg1", 0x0, size=32) # 32 is the default size if not specified +SimpleReg("hawk_reg1", 0x0, size=32) # 32 is the default size if not specified +# +# Example of a richer definition with bitfields: +# +# with Reg("my_reg2", 0x4): +# Field("coco", offset=7, access="ro") +# Field("aien", offset=6) +# Field("diff", offset=5) +# Field( +# "adch", +# offset=0, +# width=5, +# reset=0x1F, +# enums={ +# # A simple enum +# "val1": 3, +# # A more complex enum, all fields except for value are optional +# "val2": { +# "value": 5, +# "usage": "w", +# "description": "The value of something" +# }, +# }) +# +# For more examples and full documentation see: https://origen-sdk.org/o2/guides/registers + diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/services.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/services.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/sub_blocks.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/sub_blocks.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/timing.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/derivatives/quail/timing.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/levels.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/levels.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/pins.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/pins.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/registers.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/registers.py new file mode 100644 index 00000000..5de5f73c --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/registers.py @@ -0,0 +1,32 @@ +########################################################################################## +# Any registers defined here will be added to all DUTs in your application +########################################################################################## + +# Example of a simple register definition with all bits r/w, 0x0 is the local offset address: +# +# SimpleReg("my_reg1", 0x0, size=32) # 32 is the default size if not specified +# +# Example of a richer definition with bitfields: +# +# with Reg("my_reg2", 0x4): +# Field("coco", offset=7, access="ro") +# Field("aien", offset=6) +# Field("diff", offset=5) +# Field( +# "adch", +# offset=0, +# width=5, +# reset=0x1F, +# enums={ +# # A simple enum +# "val1": 3, +# # A more complex enum, all fields except for value are optional +# "val2": { +# "value": 5, +# "usage": "w", +# "description": "The value of something" +# }, +# }) +# +# For more examples and full documentation see: https://origen-sdk.org/o2/guides/registers + diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/services.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/services.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/sub_blocks.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/sub_blocks.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/dut/timing.py b/test_apps/python_plugin_the_second/python_plugin_the_second/dut/timing.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/flows/.gitkeep b/test_apps/python_plugin_the_second/python_plugin_the_second/flows/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/interface/interface.py b/test_apps/python_plugin_the_second/python_plugin_the_second/interface/interface.py new file mode 100644 index 00000000..97544bae --- /dev/null +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/interface/interface.py @@ -0,0 +1,5 @@ +from origen.interface import BaseInterface + + +class Interface(BaseInterface): + pass \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/origen.plugin.toml b/test_apps/python_plugin_the_second/python_plugin_the_second/origen.plugin.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/patterns/.gitkeep b/test_apps/python_plugin_the_second/python_plugin_the_second/patterns/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/templates/.gitkeep b/test_apps/python_plugin_the_second/python_plugin_the_second/templates/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/setup.cfg b/test_apps/python_plugin_the_second/setup.cfg new file mode 100644 index 00000000..6e1cfdfa --- /dev/null +++ b/test_apps/python_plugin_the_second/setup.cfg @@ -0,0 +1,2 @@ +[tool:pytest] +testpaths = tests \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/targets/dut/quail.py b/test_apps/python_plugin_the_second/targets/dut/quail.py new file mode 100644 index 00000000..c6e37819 --- /dev/null +++ b/test_apps/python_plugin_the_second/targets/dut/quail.py @@ -0,0 +1 @@ +origen.app.instantiate_dut("dut.quail") \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/targets/tester/smt7.py b/test_apps/python_plugin_the_second/targets/tester/smt7.py new file mode 100644 index 00000000..9335607f --- /dev/null +++ b/test_apps/python_plugin_the_second/targets/tester/smt7.py @@ -0,0 +1 @@ +origen.tester.target("::V93K::SMT7") \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/targets/tester/smt8.py b/test_apps/python_plugin_the_second/targets/tester/smt8.py new file mode 100644 index 00000000..7a378261 --- /dev/null +++ b/test_apps/python_plugin_the_second/targets/tester/smt8.py @@ -0,0 +1 @@ +origen.tester.target("::V93K::SMT8") \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/targets/tester/uflex.py b/test_apps/python_plugin_the_second/targets/tester/uflex.py new file mode 100644 index 00000000..da6c3b88 --- /dev/null +++ b/test_apps/python_plugin_the_second/targets/tester/uflex.py @@ -0,0 +1 @@ +origen.tester.target("Ultraflex") \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/tests/README.md b/test_apps/python_plugin_the_second/tests/README.md new file mode 100644 index 00000000..218887c3 --- /dev/null +++ b/test_apps/python_plugin_the_second/tests/README.md @@ -0,0 +1,16 @@ +Note that the `tests` folder is the place to create tests to verify the +functionality of this Origen application, it does not refer to silicon +tests! + +This is setup to use a popular Python test framework called `pytest` which +requires that following naming convention is followed: + +* All files containing tests must be named `_test.py`, e.g. `tests/example_test.py` +* Functions that define tests within such files must be named `test_`, + e.g. `def test_example():` + +To execute the tests, run the following command from the command line: + +~~~ +poetry run pytest +~~~ \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/tests/example_test.py b/test_apps/python_plugin_the_second/tests/example_test.py new file mode 100644 index 00000000..374f68a0 --- /dev/null +++ b/test_apps/python_plugin_the_second/tests/example_test.py @@ -0,0 +1,6 @@ +import origen +import pytest +from tests.shared import * + +def test_example(): + assert 1 == 1 \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/tests/shared/__init__.py b/test_apps/python_plugin_the_second/tests/shared/__init__.py new file mode 100644 index 00000000..5579f7f3 --- /dev/null +++ b/test_apps/python_plugin_the_second/tests/shared/__init__.py @@ -0,0 +1,5 @@ +# This is a good place to add helper functions that you want to make +# available to all of your tests + +import pytest +import origen \ No newline at end of file diff --git a/test_apps/python_plugin_the_second/vendor/.gitkeep b/test_apps/python_plugin_the_second/vendor/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/web/Makefile b/test_apps/python_plugin_the_second/web/Makefile new file mode 100644 index 00000000..d0c3cbf1 --- /dev/null +++ b/test_apps/python_plugin_the_second/web/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/test_apps/python_plugin_the_second/web/make.bat b/test_apps/python_plugin_the_second/web/make.bat new file mode 100644 index 00000000..9534b018 --- /dev/null +++ b/test_apps/python_plugin_the_second/web/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/test_apps/python_plugin_the_second/web/source/_static/.gitkeep b/test_apps/python_plugin_the_second/web/source/_static/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/python_plugin_the_second/web/source/conf.py b/test_apps/python_plugin_the_second/web/source/conf.py new file mode 100644 index 00000000..b1758f34 --- /dev/null +++ b/test_apps/python_plugin_the_second/web/source/conf.py @@ -0,0 +1,76 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) +import origen +import origen.web + +import sys, os +sys.path.insert(0, os.path.abspath('../../')) + +# -- Project information ----------------------------------------------------- + +project = 'python_plugin_the_second' +copyright = '2020, Origen Core Team' +author = 'Origen Core Team' + +# The full version, including alpha/beta/rc tags +release = '0.0.0' + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'origen.web.origen_sphinx_extension', 'origen_autoapi.sphinx', + 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.autosectionlabel', + 'recommonmark', 'origen.web.shorthand' +] + +autosectionlabel_prefix_document = True +autoapi_modules = { + 'python_plugin_the_second.application': { + 'module-members': ['undoc-members'], + 'class-members': ['members', 'undoc-members'] + } +} +autoapi_output_dir = origen.web.interbuild_dir.joinpath('autoapi') + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +#html_theme_options = { +# 'navbar_links': +# [('Github', 'https://github.com/Origen-SDK/o2/tree/master/example', True)], +# 'logos': [{ +# 'src': '_static/example_logo.png', +# 'alt': 'Example', +# 'rel_src': True, +# }] +#} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/test_apps/python_plugin_the_second/web/source/index.rst b/test_apps/python_plugin_the_second/web/source/index.rst new file mode 100644 index 00000000..b06db959 --- /dev/null +++ b/test_apps/python_plugin_the_second/web/source/index.rst @@ -0,0 +1,22 @@ +.. example documentation master file, created by + sphinx-quickstart on Wed Apr 15 21:59:35 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to python_plugin_the_second's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + interbuild/autoapi/python_plugin_the_second.application/python_plugin_the_second.application + +For information on how to build documentation with Origen, see :link-to:`the documentation guides `. + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/test_apps/test_apps_shared_test_helpers/.gitignore b/test_apps/test_apps_shared_test_helpers/.gitignore new file mode 100644 index 00000000..47275fc7 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/.gitignore @@ -0,0 +1,6 @@ +/.origen +/output +/web/source/_static/build +/web/source/interbuild +/tmp +/.ref \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/config/application.toml b/test_apps/test_apps_shared_test_helpers/config/application.toml new file mode 100644 index 00000000..3db0e67e --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/config/application.toml @@ -0,0 +1 @@ +name = "test_apps_shared_test_helpers" \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/config/commands.toml b/test_apps/test_apps_shared_test_helpers/config/commands.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/config/origen.toml b/test_apps/test_apps_shared_test_helpers/config/origen.toml new file mode 100644 index 00000000..eee0cdec --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/config/origen.toml @@ -0,0 +1,14 @@ +# Use this to define your application-specific Origen configuration +# Do not delete it even if you don't use it since it is also used by the Origen +# command line interface to determine when it is in an Origen application workspace + +# Specify what command should be used to invoke python, if not specified +# Origen will try python, python3, python3.8, etc. until one is found that +# satisfies the minimum Python version requirement +#python_cmd = "mypython" + +# If your company has an internal package server enter it here: +#pkg_server = "https://pkgs.company.net:9292" +# or here, if you need to use different urls for push and pull (write and read): +#pkg_server_push = "https://pkgs.company.net:9292" +#pkg_server_pull = "https://pkgs.company.net:9292" \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/poetry.lock b/test_apps/test_apps_shared_test_helpers/poetry.lock new file mode 100644 index 00000000..74f65dab --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/poetry.lock @@ -0,0 +1,1358 @@ +[[package]] +name = "alabaster" +version = "0.7.12" +description = "A configurable sidebar-enabled Sphinx theme" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "atomicwrites" +version = "1.4.1" +description = "Atomic file writes." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "attrs" +version = "22.1.0" +description = "Classes Without Boilerplate" +category = "dev" +optional = false +python-versions = ">=3.5" + +[package.extras] +tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] +dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] + +[[package]] +name = "babel" +version = "2.10.3" +description = "Internationalization utilities" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pytz = ">=2015.7" + +[[package]] +name = "beautifulsoup4" +version = "4.8.2" +description = "Screen-scraping library" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +soupsieve = ">=1.2" + +[package.extras] +html5lib = ["html5lib"] +lxml = ["lxml"] + +[[package]] +name = "bs4" +version = "0.0.1" +description = "Dummy package for Beautiful Soup" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +beautifulsoup4 = "*" + +[[package]] +name = "cachecontrol" +version = "0.12.11" +description = "httplib2 caching for requests" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} +msgpack = ">=0.5.2" +requests = "*" + +[package.extras] +filecache = ["lockfile (>=0.9)"] +redis = ["redis (>=2.10.5)"] + +[[package]] +name = "cachy" +version = "0.3.0" +description = "Cachy provides a simple yet effective caching library." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.extras] +redis = ["redis (>=3.3.6,<4.0.0)"] +memcached = ["python-memcached (>=1.59,<2.0)"] +msgpack = ["msgpack-python (>=0.5,<0.6)"] + +[[package]] +name = "certifi" +version = "2022.6.15" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "2.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" +optional = false +python-versions = ">=3.6.0" + +[package.extras] +unicode_backport = ["unicodedata2"] + +[[package]] +name = "cleo" +version = "0.8.1" +description = "Cleo allows you to create beautiful and testable command-line interfaces." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +clikit = ">=0.6.0,<0.7.0" + +[[package]] +name = "clikit" +version = "0.6.2" +description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +pastel = ">=0.2.0,<0.3.0" +pylev = ">=1.3,<2.0" + +[[package]] +name = "colorama" +version = "0.4.5" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "commonmark" +version = "0.9.1" +description = "Python parser for the CommonMark Markdown spec" +category = "main" +optional = false +python-versions = "*" + +[package.extras] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] + +[[package]] +name = "crashtest" +version = "0.3.1" +description = "Manage Python errors with ease" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "cryptography" +version = "37.0.4" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +cffi = ">=1.12" + +[package.extras] +docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] +docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +sdist = ["setuptools_rust (>=0.11.4)"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] + +[[package]] +name = "distlib" +version = "0.3.5" +description = "Distribution utilities" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "docutils" +version = "0.19" +description = "Docutils -- Python Documentation Utilities" +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "filelock" +version = "3.8.0" +description = "A platform independent file lock." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] +docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] + +[[package]] +name = "html5lib" +version = "1.1" +description = "HTML parser based on the WHATWG HTML specification" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +six = ">=1.9" +webencodings = "*" + +[package.extras] +all = ["genshi", "chardet (>=2.2)", "lxml"] +chardet = ["chardet (>=2.2)"] +genshi = ["genshi"] +lxml = ["lxml"] + +[[package]] +name = "idna" +version = "3.3" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "importlib-metadata" +version = "1.7.0" +description = "Read metadata from Python packages" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["sphinx", "rst.linker"] +testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] + +[[package]] +name = "jeepney" +version = "0.8.0" +description = "Low-level, pure Python DBus protocol wrapper." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] +trio = ["trio", "async-generator"] + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "keyring" +version = "22.3.0" +description = "Store and access your passwords safely." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] + +[[package]] +name = "lockfile" +version = "0.12.2" +description = "Platform-independent file locking module" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "mako" +version = "1.1.0" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +MarkupSafe = ">=0.9.2" + +[[package]] +name = "markupsafe" +version = "2.1.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "more-itertools" +version = "8.14.0" +description = "More routines for operating on iterables, beyond itertools" +category = "dev" +optional = false +python-versions = ">=3.5" + +[[package]] +name = "msgpack" +version = "1.0.4" +description = "MessagePack serializer" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "origen" +version = "2.0.0.dev5" +description = "Semiconductor Developer's Kit" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +beautifulsoup4 = "4.8.2" +bs4 = "0.0.1" +colorama = "^0.4" +importlib-metadata = ">= 1.7.0" +Jinja2 = "^3" +mako = "1.1.0" +origen_autoapi = "2.0.1" +origen_metal = "= 0.4.0" +poetry = "^1.1.14" +recommonmark = ">= 0" +sphinx = "3.0.2" +sphinxbootstrap4theme = ">= 0" +termcolor = ">= 1.1.0" +yapf = "0.30" + +[package.source] +type = "directory" +url = "../../python/origen" + +[[package]] +name = "origen-autoapi" +version = "2.0.1" +description = "Automatic API reference documentation generation for Sphinx inspired by Doxygen, with changes for the Origen project." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +sphinx = "*" + +[[package]] +name = "origen-metal" +version = "0.4.0" +description = "Bare metal APIs for the Origen SDK" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +colorama = ">= 0.4.4" +pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} +termcolor = ">= 1.1.0" + +[package.source] +type = "directory" +url = "../../python/origen_metal" + +[[package]] +name = "packaging" +version = "20.9" +description = "Core utilities for Python packages" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +pyparsing = ">=2.0.2" + +[[package]] +name = "pastel" +version = "0.2.1" +description = "Bring colors to your terminal." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pkginfo" +version = "1.8.3" +description = "Query metadatdata from sdists / bdists / installed packages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" + +[package.extras] +testing = ["nose", "coverage"] + +[[package]] +name = "platformdirs" +version = "2.5.2" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "poetry" +version = "1.1.14" +description = "Python dependency management and packaging made easy." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +cachy = ">=0.3.0,<0.4.0" +cleo = ">=0.8.1,<0.9.0" +clikit = ">=0.6.2,<0.7.0" +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +html5lib = ">=1.0,<2.0" +importlib-metadata = {version = ">=1.6.0,<2.0.0", markers = "python_version < \"3.8\""} +keyring = {version = ">=21.2.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +packaging = ">=20.4,<21.0" +pexpect = ">=4.7.0,<5.0.0" +pkginfo = ">=1.4,<2.0" +poetry-core = ">=1.0.7,<1.1.0" +requests = ">=2.18,<3.0" +requests-toolbelt = ">=0.9.1,<0.10.0" +shellingham = ">=1.1,<2.0" +tomlkit = ">=0.7.0,<1.0.0" +virtualenv = ">=20.0.26,<21.0.0" + +[[package]] +name = "poetry-core" +version = "1.0.8" +description = "Poetry PEP 517 Build Backend" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "pygments" +version = "2.12.0" +description = "Pygments is a syntax highlighting package written in Python." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "pylev" +version = "1.4.0" +description = "A pure Python Levenshtein implementation that's not freaking GPL'd." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pyparsing" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" +category = "main" +optional = false +python-versions = ">=3.6.8" + +[package.extras] +diagrams = ["railroad-diagrams", "jinja2"] + +[[package]] +name = "pyreadline3" +version = "3.4.1" +description = "A python implementation of GNU readline." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pytest" +version = "3.10.1" +description = "pytest: simple powerful testing with Python" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[package.dependencies] +atomicwrites = ">=1.0" +attrs = ">=17.4.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +more-itertools = ">=4.0.0" +pluggy = ">=0.7" +py = ">=1.5.0" +six = ">=1.10.0" + +[[package]] +name = "pytz" +version = "2022.2.1" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "pywin32-ctypes" +version = "0.2.0" +description = "" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "recommonmark" +version = "0.7.1" +description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +commonmark = ">=0.8.1" +docutils = ">=0.11" +sphinx = ">=1.3.1" + +[[package]] +name = "requests" +version = "2.28.1" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=3.7, <4" + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<3" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<1.27" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-toolbelt" +version = "0.9.1" +description = "A utility belt for advanced users of python-requests" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +name = "secretstorage" +version = "3.3.3" +description = "Python bindings to FreeDesktop.org Secret Service API" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + +[[package]] +name = "shellingham" +version = "1.5.0" +description = "Tool to Detect Surrounding Shell" +category = "main" +optional = false +python-versions = ">=3.4" + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "soupsieve" +version = "2.3.2.post1" +description = "A modern CSS selector implementation for Beautiful Soup." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "sphinx" +version = "3.0.2" +description = "Python documentation generator" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.dependencies] +alabaster = ">=0.7,<0.8" +babel = ">=1.3" +colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.12" +imagesize = "*" +Jinja2 = ">=2.3" +packaging = "*" +Pygments = ">=2.0" +requests = ">=2.5.0" +snowballstemmer = ">=1.1" +sphinxcontrib-applehelp = "*" +sphinxcontrib-devhelp = "*" +sphinxcontrib-htmlhelp = "*" +sphinxcontrib-jsmath = "*" +sphinxcontrib-qthelp = "*" +sphinxcontrib-serializinghtml = "*" + +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-stubs"] +test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] + +[[package]] +name = "sphinxbootstrap4theme" +version = "0.6.0" +description = "Sphinx Bootstrap4 Theme" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.2" +description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.2" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.0" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest", "html5lib"] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +test = ["pytest", "flake8", "mypy"] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.3" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.5" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +category = "main" +optional = false +python-versions = ">=3.5" + +[package.extras] +lint = ["flake8", "mypy", "docutils-stubs"] +test = ["pytest"] + +[[package]] +name = "termcolor" +version = "1.1.0" +description = "ANSII Color formatting for output in terminal." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "tomlkit" +version = "0.11.4" +description = "Style preserving TOML library" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[[package]] +name = "urllib3" +version = "1.26.11" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" + +[package.extras] +brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[[package]] +name = "virtualenv" +version = "20.16.2" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +distlib = ">=0.3.1,<1" +filelock = ">=3.2,<4" +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +platformdirs = ">=2,<3" + +[package.extras] +testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] +docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] + +[[package]] +name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "yapf" +version = "0.30.0" +description = "A formatter for Python code." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "zipp" +version = "3.8.1" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] + +[metadata] +lock-version = "1.1" +python-versions = ">=3.7,<3.11" +content-hash = "1f4c2af7a73abea014b8d078693c410088ef6c775fb5d4b9e8e06aa06b9a5680" + +[metadata.files] +alabaster = [ + {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, + {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, +] +atomicwrites = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] +attrs = [ + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, +] +babel = [ + {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, + {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, +] +beautifulsoup4 = [ + {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, + {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, + {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, +] +bs4 = [ + {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, +] +cachecontrol = [ + {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, + {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, +] +cachy = [ + {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, + {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, +] +certifi = [ + {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, + {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, +] +cffi = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] +charset-normalizer = [ + {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, + {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, +] +cleo = [ + {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, + {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, +] +clikit = [ + {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, + {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, +] +colorama = [ + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, +] +commonmark = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] +crashtest = [ + {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, + {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, +] +cryptography = [ + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, + {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, + {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, + {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, + {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, + {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, + {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, + {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, + {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, + {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, +] +distlib = [ + {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, + {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, +] +docutils = [ + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, +] +filelock = [ + {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, + {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, +] +html5lib = [ + {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, + {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, +] +idna = [ + {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, + {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, +] +imagesize = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] +importlib-metadata = [ + {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, + {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, +] +jeepney = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, +] +jinja2 = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] +keyring = [ + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, +] +lockfile = [ + {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, + {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +] +mako = [ + {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, +] +markupsafe = [ + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] +more-itertools = [ + {file = "more-itertools-8.14.0.tar.gz", hash = "sha256:c09443cd3d5438b8dafccd867a6bc1cb0894389e90cb53d227456b0b0bccb750"}, + {file = "more_itertools-8.14.0-py3-none-any.whl", hash = "sha256:1bc4f91ee5b1b31ac7ceacc17c09befe6a40a503907baf9c839c229b5095cfd2"}, +] +msgpack = [ + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, +] +origen = [] +origen-autoapi = [ + {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, + {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, +] +origen-metal = [] +packaging = [ + {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, + {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, +] +pastel = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] +pexpect = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] +pkginfo = [ + {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, + {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, +] +platformdirs = [ + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, +] +pluggy = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] +poetry = [ + {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, + {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, +] +poetry-core = [ + {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, + {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, +] +ptyprocess = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] +py = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] +pycparser = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] +pygments = [ + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, +] +pylev = [ + {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, + {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, +] +pyparsing = [ + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, +] +pyreadline3 = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] +pytest = [ + {file = "pytest-3.10.1-py2.py3-none-any.whl", hash = "sha256:3f193df1cfe1d1609d4c583838bea3d532b18d6160fd3f55c9447fdca30848ec"}, + {file = "pytest-3.10.1.tar.gz", hash = "sha256:e246cf173c01169b9617fc07264b7b1316e78d7a650055235d6d897bc80d9660"}, +] +pytz = [ + {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, + {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, +] +pywin32-ctypes = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] +recommonmark = [ + {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, + {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, +] +requests = [ + {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, + {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, +] +requests-toolbelt = [ + {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, + {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, +] +secretstorage = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] +shellingham = [ + {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, + {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] +snowballstemmer = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] +soupsieve = [ + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, +] +sphinx = [ + {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, + {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, +] +sphinxbootstrap4theme = [ + {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, +] +sphinxcontrib-applehelp = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] +sphinxcontrib-devhelp = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] +sphinxcontrib-htmlhelp = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] +sphinxcontrib-jsmath = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] +sphinxcontrib-qthelp = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] +sphinxcontrib-serializinghtml = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] +termcolor = [ + {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, +] +tomlkit = [ + {file = "tomlkit-0.11.4-py3-none-any.whl", hash = "sha256:25d4e2e446c453be6360c67ddfb88838cfc42026322770ba13d1fbd403a93a5c"}, + {file = "tomlkit-0.11.4.tar.gz", hash = "sha256:3235a9010fae54323e727c3ac06fb720752fe6635b3426e379daec60fbd44a83"}, +] +urllib3 = [ + {file = "urllib3-1.26.11-py2.py3-none-any.whl", hash = "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc"}, + {file = "urllib3-1.26.11.tar.gz", hash = "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"}, +] +virtualenv = [ + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, +] +webencodings = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] +yapf = [ + {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, + {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, +] +zipp = [ + {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, + {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, +] diff --git a/test_apps/test_apps_shared_test_helpers/pyproject.toml b/test_apps/test_apps_shared_test_helpers/pyproject.toml new file mode 100644 index 00000000..22f42005 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/pyproject.toml @@ -0,0 +1,17 @@ +[tool.poetry] +name = "test_apps_shared_test_helpers" +version = "0.1.0" +description = "Shared Regression Test Helpers for Test Apps" +authors = ["Origen-SDK"] + +[tool.poetry.dependencies] +python = ">=3.7,<3.11" +origen = { path = "../../python/origen", develop = true } +pl_ext_cmds = { path = "../pl_ext_cmds", develop = true } + +[tool.poetry.dev-dependencies] +pytest = "^3" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/setup.cfg b/test_apps/test_apps_shared_test_helpers/setup.cfg new file mode 100644 index 00000000..6e1cfdfa --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/setup.cfg @@ -0,0 +1,2 @@ +[tool:pytest] +testpaths = tests \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/targets/dut/.keep b/test_apps/test_apps_shared_test_helpers/targets/dut/.keep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/targets/tester/smt7.py b/test_apps/test_apps_shared_test_helpers/targets/tester/smt7.py new file mode 100644 index 00000000..9335607f --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/targets/tester/smt7.py @@ -0,0 +1 @@ +origen.tester.target("::V93K::SMT7") \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/targets/tester/smt8.py b/test_apps/test_apps_shared_test_helpers/targets/tester/smt8.py new file mode 100644 index 00000000..7a378261 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/targets/tester/smt8.py @@ -0,0 +1 @@ +origen.tester.target("::V93K::SMT8") \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/targets/tester/uflex.py b/test_apps/test_apps_shared_test_helpers/targets/tester/uflex.py new file mode 100644 index 00000000..da6c3b88 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/targets/tester/uflex.py @@ -0,0 +1 @@ +origen.tester.target("Ultraflex") \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/application.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/application.py new file mode 100644 index 00000000..5b9a0cb4 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/application.py @@ -0,0 +1,6 @@ +from origen.application import Base + +# This class represents this application and is automatically instantiated as `origen.app` +# It is required by Origen and should not be renamed or removed under any circumstances +class Application(Base): + pass diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/__init__.py new file mode 100644 index 00000000..74f6c9f0 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/__init__.py @@ -0,0 +1,6 @@ +# FOR_PR see about on-load for all extensions here +import origen +from test_apps_shared_test_helpers.cli import output_args + +def run(**args): + print(output_args(None, args)) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts.toml new file mode 100644 index 00000000..160df9ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts.toml @@ -0,0 +1,14 @@ +[[extension]] +extend = "origen.app" +global = false + + [[extension.opt]] + name = "generic_ext_core_from_aux" + help = "Generic Extension From Aux Commands" + +[[extension]] +extend = "origen.eval" + + [[extension.opt]] + name = "core_cmd_exts_generic_core_ext" + help = "Generic core ext from aux commands" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts/core/eval.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts/core/eval.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts/core/eval.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts_cfg.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts_cfg.toml new file mode 100644 index 00000000..90a3a7c8 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/core_cmd_exts_cfg.toml @@ -0,0 +1,8 @@ +[[auxillary_commands]] +path = "./core_cmd_exts.toml" + +[plugins] +collect = false +load = [ + { name = "pl_ext_cmds" }, +] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds.toml new file mode 100644 index 00000000..14161c17 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds.toml @@ -0,0 +1,21 @@ +[[command]] +name = "dummy_cmd" +help = "Dummy Aux Command" + + [[command.arg]] + name = "action_arg" + help = "Dummy Aux Action" + multiple = true + + [[command.subcommand]] + name = "subc" + help = "Dummy Aux Subcommand" + + [[command.subcommand.arg]] + name = "action_arg" + help = "Dummy Aux Subc Action" + multiple = true + + [[command.subcommand.opt]] + name = "flag_opt" + help = "Dummy Aux Subc Flag" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds/dummy_cmd.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds/dummy_cmd.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds/dummy_cmd.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds/dummy_cmd/subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds/dummy_cmd/subc.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds/dummy_cmd/subc.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds_cfg.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds_cfg.toml new file mode 100644 index 00000000..09e75bc6 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds_cfg.toml @@ -0,0 +1,2 @@ +[[auxillary_commands]] +path = "./dummy_cmds.toml" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.py new file mode 100644 index 00000000..8205a541 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.py @@ -0,0 +1,103 @@ +import origen +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str +from test_apps_shared_test_helpers.cli import before_cmd_ext_args_str +from test_apps_shared_test_helpers.cli import clean_up_ext_args_str +# from test_apps_shared_test_helpers.cli import ExtensionDrivers +# def ext_out() +from origen.boot import before_cmd, after_cmd, clean_up + +req_opt = "action_opt" + +class aux: + class exts_workout: + class plugin_test_args: + @classmethod + def do_action(cls, actions, phase): + if actions: + for action in actions: + print(f"Start Action {phase} CMD: {action}") + if action == "show_cmd_args": + print(origen.current_command.args) + if action == "show_ext_args": + print({ext_name: ext.args for ext_name, ext in origen.current_command.exts.items()}) + # print(f"{ext_name} args: {ext.args}") + # print(origen.current_command.exts["exts_workout"].args) + if action == "update_cmd_args": + if phase == "Before": + origen.command.args["single_arg"] = "updated" + if action == "clear_cmd_args": + origen.command.args["single_val"] = None + if action == "before_cmd_exception": + raise RuntimeError("'before_cmd_exception' encountered!") + if action == "update_ext_workout_args": + if phase == "Before": + args = origen.current_command.exts["aux.exts_workout"].args + # Increment the counter + args["flag_extension"] += 1 + + # Append to a multi-arg + args["multi_val_opt"].append("update_mv_opt") + + # Overwrite an arg + args["single_val_opt"] = "update_sv_opt" + + # Set a new arg + args["new_arg"] = "new_arg_for_ext" + if action == "show_exts": + fail + if action == "update_aux_ext": + fail + if action == "current_command_BIST": + fail + print(f"End Action {phase} CMD: {action}") + + @before_cmd + @classmethod + def before_cmd(cls, **args): + print(before_cmd_ext_args_str(args)) + # if args[ext_req.name] == "update_args": + # ... + action = args.get(req_opt, None) + if action: + cls.do_action(action, "Before") + + # # origen.current_command.args['input'] = ["hijack!"] + # print("before!!") + # args.pop("flag_extension") + # return args + + @classmethod + def after_cmd(cls, **args): + print(after_cmd_ext_args_str(args)) + action = args.get(req_opt, None) + if action: + cls.do_action(action, "After") + + @classmethod + def clean_up(cls, **args): + print(clean_up_ext_args_str(args)) + action = args.get(req_opt, None) + if action: + cls.do_action(action, "CleanUp") + + class subc: + @classmethod + def before_cmd(**args): + print(before_cmd_ext_args_str(args)) + + class plugin_test_ext_stacking: + pass + # @before_cmd + # @classmethod + # def print_args_before(cls, **args): + # print(before_cmd_ext_args_str(args)) + + # @after_cmd + # @classmethod + # def print_args_after(cls, **args): + # print(after_cmd_ext_args_str(args)) + + # @clean_up + # @classmethod + # def print_args_clean(cls, **args): + # print(clean_up_ext_args_str(args)) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml new file mode 100644 index 00000000..dc05e3fd --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml @@ -0,0 +1,109 @@ +[[extension]] +extend = "plugin.python_plugin.plugin_test_args" +help = "Extend plugin command from aux command" + + [[extension.opt]] + name = "flag_extension" + help = "Single flag extension" + short = "f" + long = "flag_ext" + + [[extension.opt]] + name = "single_val_opt" + short = "s" + takes_value = true + help = "Extended opt taking a single value" + # short = "a" + # help = "Have the plugin say hi after evaluating" + + [[extension.opt]] + name = "multi_val_opt" + long = "multi" + short_aliases = ["m"] + long_aliases = ["multi_non_delim"] + multiple = true + help = "Extended opt taking a multiple, non-delimited values" + + [[extension.opt]] + name = "multi_val_delim_opt" + long_aliases = ["multi_delim"] + use_delimiter = true + help = "Extended opt taking a multiple, delimited values" + + # [[extension.opt]] + # name = "required_opt" + # takes_value = true + # required = true + # help = "Required opt taking a single value" + + [[extension.opt]] + name = "exts_workout_action" + takes_value = true + multiple = true + required = true + help = "Additional actions for testing purposes" + + [[extension.opt]] + name = "hidden_opt" + help = "Hidden extended opt" + hidden = true + +[[extension]] +extend = "plugin.python_plugin.plugin_test_args.subc" +help = "Extend plugin command's subcommand from aux command" + + [[extension.opt]] + name = "exts_workout_action" + long = "action" + multiple = true + help = "Action for the extended opt" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking" + + [[extension.opt]] + name = "ext_action" + long = "action" + multiple = true + help = "Action for the extended opt" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" + + [[extension.opt]] + name = "ext_action_subc" + long = "action" + multiple = true + help = "Action for the extended opt subc" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd" + + [[extension.opt]] + name = "exts_workout_action" + long = "action" + multiple = true + help = "Action for the extended opt" + + [[extension.opt]] + name = "exts_workout_flag" + help = "Flag for the extended opt" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd.subc" + + [[extension.opt]] + name = "exts_workout_action" + long = "action" + multiple = true + help = "Action for the extended opt subc" + + [[extension.opt]] + name = "exts_workout_flag_subc" + help = "Flag for the extended opt subc" + +# [[extension]] +# extend = "aux.cmd_testers" + +# [[extension]] +# extend = "aux.cmd_testers.args" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/aux_ns/dummy_cmds/dummy_cmd.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/aux_ns/dummy_cmds/dummy_cmd.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/aux_ns/dummy_cmds/dummy_cmd.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/aux_ns/dummy_cmds/dummy_cmd.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/aux_ns/dummy_cmds/dummy_cmd.subc.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/aux_ns/dummy_cmds/dummy_cmd.subc.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_args.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_args.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_args.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py new file mode 100644 index 00000000..5386136a --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py @@ -0,0 +1,75 @@ +# FOR_PR cleanup and conform to other method + +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + + +import origen +def do_action(actions, phase): + if actions: + for action in actions: + print(f"Start Action {phase} CMD: {action}") + if action == "show_cmd_args": + print(origen.current_command.args) + if action == "show_ext_args": + print({ext_name: ext.args for ext_name, ext in origen.current_command.exts.items()}) + # print(f"{ext_name} args: {ext.args}") + # print(origen.current_command.exts["exts_workout"].args) + if action == "update_cmd_args": + if phase == "Before": + origen.command.args["single_arg"] = "updated" + if action == "clear_cmd_args": + origen.command.args["single_val"] = None + if action == "before_cmd_exception": + raise RuntimeError("'before_cmd_exception' encountered!") + if action == "update_ext_workout_args": + if phase == "Before": + args = origen.current_command.exts["aux.exts_workout"].args + # Increment the counter + args["flag_extension"] += 1 + + # Append to a multi-arg + args["multi_val_opt"].append("update_mv_opt") + + # Overwrite an arg + args["single_val_opt"] = "update_sv_opt" + + # Set a new arg + args["new_arg"] = "new_arg_for_ext" + if action == "update_flag_opts": + if phase == "Before": + origen.current_command.args["flag_opt"] += 1 + # origen.current_command.exts["aux.exts_workout"].args["flag_extension"] += 1 + origen.current_command.exts["aux.pl_ext_stacking_from_aux"].args["pl_ext_stacking_flag"] += 1 + origen.current_command.exts["plugin.python_plugin_the_second"].args["pl_the_2nd_ext_flag"] += 1 + + if action == "show_exts": + fail + if action == "update_aux_ext": + fail + if action == "current_command_BIST": + fail + print(f"End Action {phase} CMD: {action}") + +action_opt = "ext_action" + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + action = args.get(action_opt, None) + if action: + do_action(action, "Before") + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + action = args.get(action_opt, None) + if action: + do_action(action, "After") + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) + action = args.get(action_opt, None) + if action: + do_action(action, "CleanUp") diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking/subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking/subc.py new file mode 100644 index 00000000..727a7699 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking/subc.py @@ -0,0 +1,16 @@ +# FOR_PR switch to on-load +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout_cfg.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout_cfg.toml new file mode 100644 index 00000000..d1ab1c16 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout_cfg.toml @@ -0,0 +1,2 @@ +[[auxillary_commands]] +path = "./exts_workout.toml" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux.toml new file mode 100644 index 00000000..722f5729 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux.toml @@ -0,0 +1,47 @@ +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking" + + [[extension.opt]] + name = "pl_ext_stacking_action" + multiple = true + help = "Action from pl_ext_stacking aux cmds" + + [[extension.opt]] + name = "pl_ext_stacking_flag" + help = "Flag from pl_ext_stacking aux cmds" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" + + [[extension.opt]] + name = "pl_ext_stacking_action_subc" + multiple = true + help = "Action from pl_ext_stacking aux cmds subc" + + [[extension.opt]] + name = "pl_ext_stacking_flag_subc" + help = "Flag from pl_ext_stacking aux cmds subc" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd" + + [[extension.opt]] + name = "pl_ext_stacking_action" + multiple = true + help = "Action from pl_ext_stacking aux cmds" + + [[extension.opt]] + name = "pl_ext_stacking_from_aux_flag" + help = "Flag from pl_ext_stacking aux cmds" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd.subc" + + [[extension.opt]] + name = "pl_ext_stacking_from_aux_action_subc" + multiple = true + help = "Action from pl_ext_stacking aux cmds subc" + + [[extension.opt]] + name = "pl_ext_stacking_from_aux_flag_subc" + help = "Flag from pl_ext_stacking aux cmds subc" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.subc.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.subc.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.subc.py new file mode 100644 index 00000000..bc7b4dd2 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.subc.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str +from origen.boot import before_cmd, after_cmd, clean_up + +@before_cmd +def before(**args): + print(before_cmd_ext_args_str(args)) + +@after_cmd +def after(**args): + print(after_cmd_ext_args_str(args)) + +@clean_up +def clean_up(**args): + print(clean_up_ext_args_str(args)) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux_cfg.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux_cfg.toml new file mode 100644 index 00000000..b258e306 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux_cfg.toml @@ -0,0 +1,2 @@ +[[auxillary_commands]] +path = "./pl_ext_stacking_from_aux.toml" \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py new file mode 100644 index 00000000..dfdac080 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -0,0 +1,1230 @@ +# FOR_PR clean up + +from origen.helpers.regressions import cli +from origen.helpers import calling_filename +from pathlib import Path, PurePosixPath +import re + +# from origen.helpers.regressions.cli import CLI + +# def run(**args): +# print(f"Arg Keys: {list(args.keys())}") +# if len(args) > 0: +# for n, arg in args.items(): +# print(f"Arg: {n} ({arg.__class__}): {arg}") +# else: +# print("No args or opts given!") + +def apply_ext_output_args(mod): + # import inspect + from origen.boot import before_cmd, after_cmd, clean_up + from .ext_helpers import do_action + # print(inspect.stack()[1][0]) + # mod = inspect.getmodule(inspect.stack()[1][0]) + n = get_ext_name() + + def before(**args): + print(before_cmd_ext_args_str(args, ext_name=n)) + do_action(args.get(f"{n}_action", None), "Before") + mod.before = before + before_cmd(mod.before) + + def after(**args): + print(after_cmd_ext_args_str(args, ext_name=n)) + do_action(args.get(f"{n}_action", None), "After") + mod.after = after + after_cmd(mod.after) + + def clean(**args): + print(clean_up_ext_args_str(args, ext_name=n)) + do_action(args.get(f"{n}_action", None), "CleanUp") + mod.clean = clean + clean_up(mod.clean) + +def get_ext_name(frame=None): + split = re.split(r"/plugin\.|/plugin/|/aux_ns\.|/aux_ns/|/core\.|/core/", str(PurePosixPath(calling_filename(frame or 3)))) + if len(split) > 2: + ext_name = split[-2] + else: + ext_name = split[0] + ext_name = Path(ext_name) + if ext_name.stem == "extensions": + ext_name = ext_name.parent.parent + return ext_name.stem + +def output_args(preface, args): + if preface is None: + preface = "(CMD)" + retn = [] + retn.append(f"All Keys: {preface}: {list(args.keys())}") + if len(args) > 0: + for n, arg in args.items(): + retn.append(f"Arg: {preface}: {n} ({arg.__class__}): {arg}") + else: + retn.append(f"Arg: {preface}: No extension args or opts given!") + return '\n'.join(retn) + +def before_cmd_ext_args_str(ext_args, ext_name=None, frame=None): + if ext_name is None: + ext_name = get_ext_name(frame=frame) + return output_args(f"(Ext) ({ext_name}) (Before Cmd)", ext_args) + # retn = [] + # retn << f"Ext Arg Keys ({ext_name}) (Before Cmd): {list(ext_args.keys())}" + # if len(ext_args) > 0: + # for n, arg in ext_args.items(): + # retn << f"Ext Arg ({ext_name}) (Before Cmd): {n} ({arg.__class__}): {arg}" + # else: + # retn << f"({ext_name}) (Before Cmd): No extension args or opts given!" + # return retn + +def after_cmd_ext_args_str(ext_args, ext_name=None): + if ext_name is None: + ext_name = get_ext_name() + return output_args(f"(Ext) ({ext_name}) (After Cmd)", ext_args) + +def clean_up_ext_args_str(ext_args, ext_name=None): + if ext_name is None: + ext_name = get_ext_name() + return output_args(f"(Ext) ({ext_name}) (CleanUp Cmd)", ext_args) + +# TODO shouldn't be needed anymore +class PrintExtArgs: + def __init_subclass__(cls) -> None: + cls.apply_ext_methods() + return super().__init_subclass__() + + @classmethod + def apply_ext_methods(cls): + # print(cls) + # fail + from origen.boot import before_cmd, after_cmd, clean_up + before_cmd(cls.print_args_before) + after_cmd(cls.print_args_after) + clean_up(cls.print_args_clean) + + @classmethod + def print_args_before(cls, **args): + print(before_cmd_ext_args_str(args)) + + @classmethod + def print_args_after(cls, **args): + print(after_cmd_ext_args_str(args)) + + @classmethod + def print_args_clean(cls, **args): + print(clean_up_ext_args_str(args)) + + +# from .. import root +aux_cmds_dir = Path(__file__).parent.parent.joinpath("aux_cmds") + +class Cmd(cli.cmd.Cmd): + # def __init__(self, *args, **kwargs): + # cli.cmd.Cmd.__init__(self, *args, **kwargs) + + def assert_args(self, output, *vals): + ext_args = {} + args = [] + exp_ext_vals = {} + cmd_args = [] + cmd_arg = None + + for i, v in enumerate(vals): + opts = v[1] if isinstance(v[1], dict) else {} + opts = v[2] if len(v) > 2 else {} + + if isinstance(v[0], CmdExtOpt): + ext = ext_args.setdefault(v[0].src_name, {}) + if opts.get("Before", True): + before = ext.setdefault("Before Cmd", []) + if not (("Before" in opts and opts["Before"] is None) or v[1] is None): + before.append(v[0].name) + if opts.get("After", True): + after = ext.setdefault("After Cmd", []) + if not (("After" in opts and opts["After"] is None) or v[1] is None): + after.append(v[0].name) + if opts.get("CleanUp", True): + clean_up = ext.setdefault("CleanUp Cmd", []) + if not (("CleanUp" in opts and opts["CleanUp"] is None) or v[1] is None): + clean_up.append(v[0].name) + # ext_args.setdefault(v[0].src_name, []).append() + else: + args.append(v[0]) + cmd_arg = v[0] + expected = v[0].to_assert_str(v[1], **opts) + if isinstance(expected, str): + expected = [expected] + + if isinstance(v[0], CmdExtOpt): + vals = exp_ext_vals.setdefault(v[0].src_name, [(v[0], None)]) + # if expected == {"Before": {}, "After": {}, "CleanUp": {}}: + if not (v[1] is None and ("Before" not in opts and "After" not in opts and "CleanUp" not in opts)): + if vals[0][1] is None: + exp_ext_vals[v[0].src_name] = [] + vals = exp_ext_vals[v[0].src_name] + vals.append((v[0], expected)) + else: + if v[1] is not None: + cmd_args.append(expected) + # for e in expected: + # print(f"expecting: {e}") + # assert e in output + if len(cmd_args) == 0: + cmd_arg.to_assert_str(None) + else: + for exp in cmd_args: + for e in exp: + print(f"expecting: {e}") + assert e in output + for ns, opt in exp_ext_vals.items(): + if len(opt) == 1 and opt[0][1] is None: + for e in opt[0][0].to_assert_str(None): + print(f"expecting: {e}") + assert e in output + else: + for exp in opt: + for e in exp[1]: + print(f"expecting: {e}") + assert e in output + + actual = self.parse_arg_keys(output) + assert len(actual) == len(args) + # assert actual == args + actual = self.parse_ext_keys(output) + print(actual) + print(ext_args) + assert actual == ext_args + + @classmethod + def parse_arg_keys(cls, cmd_output): + return eval(cmd_output.split("All Keys: (CMD):", 1)[1].split("\n")[0]) + + @classmethod + def parse_ext_keys(cls, cmd_output): + arg_lines = cmd_output.split("All Keys: (Ext) ") + retn = {} + for a in arg_lines[1:]: + a = a.split("\n")[0] + n, keys = a.split(":", 1) + n, phase = n.split(") (") + retn.setdefault(n[1:], {})[phase[0:-1]] = eval(keys) + return retn + +class CmdArgOpt(cli.cmd.CmdArgOpt): + def to_assert_str(self, vals, **opts): + if vals is None: + return f"Arg: (CMD): {self.name}: No extension args or opts given!" + elif self.multi: + c = list + if self.use_delimiter: + vals = [x for v in vals for x in v.split(',')] + elif isinstance(vals, int): + c = int + else: + c = str + return f"Arg: (CMD): {self.name} ({c}): {vals}" + + def assert_present(self, vals, in_str, **opts): + for e in self.to_assert_str(vals, **opts): + assert e in in_str + +class CmdArg(cli.cmd.CmdArg, CmdArgOpt): + pass + +class CmdOpt(cli.cmd.CmdOpt, CmdArgOpt): + pass + +class CmdExtOpt(cli.cmd.CmdExtOpt, CmdArgOpt): + def to_assert_str(self, vals, **opts): + if isinstance(vals, dict): + opts = vals + preface = f"Arg: (Ext) ({self.src_name})" + + retn = [] + before_val = opts["Before"] if "Before" in opts else vals + after_val = opts["After"] if "After" in opts else vals + cleanup_val = opts["CleanUp"] if "CleanUp" in opts else vals + if not before_val is False: + if before_val is None: + retn.append(f"{preface} (Before Cmd):{CmdArgOpt.to_assert_str(self, before_val).split(':', 3)[3]}") + else: + retn.append(f"{preface} (Before Cmd):{CmdArgOpt.to_assert_str(self, before_val).split(':', 2)[2]}") + if not after_val is False: + if after_val is None: + retn.append(f"{preface} (After Cmd):{CmdArgOpt.to_assert_str(self, after_val).split(':', 3)[3]}") + else: + retn.append(f"{preface} (After Cmd):{CmdArgOpt.to_assert_str(self, after_val).split(':', 2)[2]}") + if not cleanup_val is False: + if cleanup_val is None: + retn.append(f"{preface} (CleanUp Cmd):{CmdArgOpt.to_assert_str(self, cleanup_val).split(':', 3)[3]}") + else: + retn.append(f"{preface} (CleanUp Cmd):{CmdArgOpt.to_assert_str(self, cleanup_val).split(':', 2)[2]}") + return retn + +class ExtensionDrivers: + exts_workout_cfg = aux_cmds_dir.joinpath("exts_workout_cfg.toml") + exts_workout_toml = aux_cmds_dir.joinpath("exts_workout.toml") + pl_ext_stacking_from_aux_cfg = aux_cmds_dir.joinpath("pl_ext_stacking_from_aux_cfg.toml") + pl_ext_stacking_from_aux_toml = aux_cmds_dir.joinpath("pl_ext_stacking_from_aux.toml") + core_cmd_exts_cfg = aux_cmds_dir.joinpath("core_cmd_exts_cfg.toml") + core_cmd_exts_toml = aux_cmds_dir.joinpath("core_cmd_exts.toml") + exts = { + "plugin.python_plugin.plugin_test_args": { + "exts": CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "flag_extension", + help="Single flag extension", + sn="f", + ln="flag_ext", + ), + CmdExtOpt( + "single_val_opt", + takes_value=True, + sn="s", + help="Extended opt taking a single value", + ), + CmdExtOpt( + "multi_val_opt", + ln="multi", + sn_aliases=["m"], + ln_aliases=["multi_non_delim"], + multi=True, + value_name="MULTI_VAL", + help="Extended opt taking a multiple, non-delimited values", + ), + CmdExtOpt( + "multi_val_delim_opt", + ln_aliases=["multi_delim"], + multi=True, + use_delimiter=True, + help="Extended opt taking a multiple, delimited values", + ), + CmdExtOpt( + "exts_workout_action", + takes_value=True, + required=True, + multi=True, + help="Additional actions for testing purposes", + ), + CmdExtOpt( + "hidden_opt", + hidden=True, + help="Hidden extended opt", + ), + ), + "toml": exts_workout_toml, + }, + "plugin.python_plugin.plugin_test_args.subc": { + "exts": CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "exts_workout_action", + multi=True, + help="Action for the extended opt", + ln="action", + ), + ), + "toml": exts_workout_toml, + }, + "plugin.python_plugin.plugin_test_ext_stacking": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ext_action", + multi=True, + help="Action for the extended opt", + ln="action", + ), + ), + *CmdExtOpt.from_src( + "pl_ext_stacking_from_aux", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "pl_ext_stacking_action", + multi=True, + help="Action from pl_ext_stacking aux cmds", + ), + CmdExtOpt( + "pl_ext_stacking_flag", + help="Flag from pl_ext_stacking aux cmds", + ), + ), + *CmdExtOpt.from_src( + "python_plugin_the_second", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pl_the_2nd_ext_action", + help="Action from pl_the_2nd plugin", + multi=True, + ), + CmdExtOpt( + "pl_the_2nd_ext_flag", + help="Flag from pl_the_2nd plugin", + ), + ) + ] + }, + "plugin.python_plugin.plugin_test_ext_stacking.subc": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ext_action_subc", + multi=True, + help="Action for the extended opt subc", + ln="action", + ), + ), + *CmdExtOpt.from_src( + "pl_ext_stacking_from_aux", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "pl_ext_stacking_action_subc", + multi=True, + help="Action from pl_ext_stacking aux cmds subc", + ), + CmdExtOpt( + "pl_ext_stacking_flag_subc", + help="Flag from pl_ext_stacking aux cmds subc", + ), + ), + *CmdExtOpt.from_src( + "python_plugin_the_second", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pl_the_2nd_ext_action_subc", + help="Action from pl_the_2nd plugin subc", + multi=True, + ), + CmdExtOpt( + "pl_the_2nd_ext_flag_subc", + help="Flag from pl_the_2nd plugin subc", + ), + ) + ] + }, + "aux.dummy_cmds.dummy_cmd": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "exts_workout_action", + multi=True, + help="Action for the extended opt", + ln="action", + ), + CmdExtOpt( + "exts_workout_flag", + help="Flag for the extended opt", + ), + ), + *CmdExtOpt.from_src( + "pl_ext_stacking_from_aux", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "pl_ext_stacking_action", + multi=True, + help="Action from pl_ext_stacking aux cmds", + ), + CmdExtOpt( + "pl_ext_stacking_from_aux_flag", + help="Flag from pl_ext_stacking aux cmds", + ), + ), + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "python_plugin_action", + help="Action from python_plugin", + multi=True, + ), + CmdExtOpt( + "python_plugin_flag", + help="Flag from python_plugin", + ), + ), + *CmdExtOpt.from_src( + "python_plugin_the_second", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "python_plugin_the_second_action", + help="Action from pl_the_2nd plugin", + multi=True, + ), + CmdExtOpt( + "python_plugin_the_second_flag", + help="Flag from pl_the_2nd plugin", + ), + ), + ], + }, + "aux.dummy_cmds.dummy_cmd.subc": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "exts_workout_action", + multi=True, + help="Action for the extended opt subc", + ln="action", + ), + CmdExtOpt( + "exts_workout_flag_subc", + help="Flag for the extended opt subc", + ), + ), + *CmdExtOpt.from_src( + "pl_ext_stacking_from_aux", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "pl_ext_stacking_from_aux_action_subc", + multi=True, + help="Action from pl_ext_stacking aux cmds subc", + ), + CmdExtOpt( + "pl_ext_stacking_from_aux_flag_subc", + help="Flag from pl_ext_stacking aux cmds subc", + ), + ), + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "python_plugin_action_subc", + help="Action from python_plugin subc", + multi=True, + ), + CmdExtOpt( + "python_plugin_flag_subc", + help="Flag from python_plugin subc", + ), + ), + *CmdExtOpt.from_src( + "python_plugin_the_second", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "python_plugin_the_second_action_subc", + help="Action from pl_the_2nd plugin subc", + multi=True, + ), + CmdExtOpt( + "python_plugin_the_second_flag_subc", + help="Flag from pl_the_2nd plugin subc", + ), + ), + ] + }, + "generic_core_ext": { + "exts": [ + *CmdExtOpt.from_src( + "pl_ext_cmds", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pl_ext_cmds_generic_ext", + help="Generic ext from pl_ext_cmds plugin", + ), + ), + *CmdExtOpt.from_src( + "core_cmd_exts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "core_cmd_exts_generic_core_ext", + help="Generic core ext from aux commands", + ), + ), + ] + } + } + +class PlExtCmds(cli.CLI): + def __init__(self): + self.name = "pl_ext_cmds" + +class PythonPlugin(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "python_plugin" + self.python_plugin = self.pl_cmd( + self.name + ) + self.echo = self.pl_sub_cmd( + self.name, + "echo", + help="Echos the input", + args=[CmdArg( + name="input", + help="Input to echo", + use_delimiter=True, + )], + opts=[CmdOpt( + name="repeat", + help="Echo again (repeat)", + ln="repeat", + sn="r", + )], + ) + self.plugin_says_hi = self.pl_sub_cmd( + self.name, + "plugin_says_hi", + help="Say 'hi' from the python plugin", + opts=[ + CmdOpt( + name="times", + help="Number of times for the python plugin to say", + value_name="TIMES", + ln="times", + sn="t" + ), + CmdOpt( + name="loudly", + help="LOUDLY say hi", + ln="loudly", + sn="l" + ), + CmdOpt( + name="to", + help="Specify who should be greeted", + multi=True, + ) + ] + ) + self.plugin_test_args = self.pl_sub_cmd( + self.name, + "plugin_test_args", + help="Test command for a plugin", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + CmdArg( + name="multi_arg", + help="Multi Arg", + multi=True, + ), + ], + opts=[ + CmdOpt( + name="opt_taking_value", + help="Opt taking a single value", + ln="opt", + ), + CmdOpt( + name="flag_opt", + help="Flag Opt", + ln="flag", + ), + ], + subcmds=[ + Cmd( + "subc", + help="Test Subcommand for plugin_test_args", + args=[ + CmdArg( + name="single_arg", + help="Single Arg For Subcommand", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt For Subcommand", + ), + ] + ) + ] + ) + self.plugin_test_ext_stacking = self.pl_sub_cmd( + self.name, + "plugin_test_ext_stacking", + help="Test ext stacking for plugin command", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt", + ), + ], + subcmds=[ + Cmd( + "subc", + help="Test Subcommand for ext stacking", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt", + ), + ], + ) + ] + ) + + @property + def base_cmd(self): + return self.python_plugin + + @property + def ordered_subcmds(self): + return [ + self.echo, + "help", + self.plugin_says_hi, + self.plugin_test_args, + self.plugin_test_ext_stacking + ] + +class PythonPluginNoCmds(cli.CLI): + def __init__(self): + self.name = "python_plugin_no_cmds" + self.python_plugin_no_cmds = self.pl_cmd( + self.name + ) + + @property + def base_cmd(self): + return self.python_plugin_no_cmds + +class PythonPluginTheSecond(cli.CLI): + def __init__(self): + self.name = "python_plugin_the_second" + self.python_plugin_the_second = self.pl_cmd( + self.name + ) + + @property + def base_cmd(self): + return self.python_plugin_the_second + +class TestAppsSharedTestHelpers(cli.CLI): + def __init__(self): + self.name = "test_apps_shared_test_helpers" + self.test_apps_shared_test_helpers = self.pl_cmd( + self.name + ) + + @property + def base_cmd(self): + return self.test_apps_shared_test_helpers + +class Plugins: + # python_plugin = PythonPlugin() + def __init__(self): + self.plugins = { + "pl_ext_cmds": PlExtCmds(), + "python_plugin": PythonPlugin(), + "python_plugin_no_cmds": PythonPluginNoCmds(), + "python_plugin_the_second": PythonPluginTheSecond(), + "test_apps_shared_test_helpers": TestAppsSharedTestHelpers() + } + + @property + def python_no_app_collected_pl_names(self): + return list(self.plugins.keys()) + + @property + def python_no_app_config_pl_names(self): + return [ + 'python_plugin', + 'python_plugin_the_second', + 'python_plugin_no_cmds' + ] + + def __getattr__(self, name): + if name in self.plugins: + return self.plugins[name] + else: + super + +class AuxCmdsFromCliDir(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "aux_cmds_from_cli_dir" + self.aux_cmds_from_cli_dir = self.aux_cmd( + self.name, + help="Aux Commands from the Origen CLI directory", + subcmds = [ + Cmd("cli_dir_says_hi") + ], + ) + # self.cli_dir_says_hi = self.aux_sub_cmd( + # self.name, + # "cli_dir_says_hi", + # ) + + @property + def base_cmd(self): + return self.aux_cmds_from_cli_dir + +class AddAuxCmds(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "add_aux_cmd" + self.add_aux_cmd = self.aux_cmd( + self.name, + help=None, + ) + + @property + def base_cmd(self): + return self.add_aux_cmd + +class CmdTesters(cli.CLI): + Cmd = Cmd + # cfg_toml + + def __init__(self): + self.name = "cmd_testers" + self.cmd_testers = self.aux_cmd( + self.name, + help="Commands to assist in testing aux commands when no app is present", + subcmds=[ + Cmd( + "error_cases", + help="Commands to test error messages and improper command configuration", + subcmds=[ + Cmd( + "missing_impl_dir", + subcmds=[ + Cmd("missing_impl_dir_subc") + ] + ), + Cmd("missing_impl_file"), + Cmd("test_missing_run_function"), + Cmd("test_exception_in_run"), + ] + ), + Cmd("python_no_app_tests", help="Test commands for python-no-app workspace"), + Cmd( + "test_arguments", + help="Test various argument and option schemes from commands", + subcmds=[ + Cmd("display_verbosity_opts"), + Cmd( + "no_args_or_opts", + help="Command taking no arguments or options" + ), + Cmd( + "optional_arg", + help="Command taking a single, optional argument", + args=[CmdArg("single_val", "Single value")], + ), + Cmd( + "required_arg", + help="Command taking a required and optional arg", + args=[ + CmdArg("required_val", "Single required value", required=True), + CmdArg("optional_val", "Single optional value") + ], + ), + Cmd( + "multi_arg", + help="Command taking a multi-arg", + args=[ + CmdArg("multi_arg", "Multi-arg value", True) + ], + ), + Cmd( + "delim_multi_arg", + help="Command taking a delimited multi-arg", + args=[ + CmdArg("delim_m_arg", "Delimited Multi-arg value ('multiple' implied)", True) + ], + ), + Cmd( + "single_and_multi_arg", + help="Command taking a single and multi-arg", + args=[ + CmdArg("single_val", "Single value"), + CmdArg("multi_arg", "Multi-arg value", True) + ], + ), + Cmd( + "args_with_value_names", + help="Single and multi arg with value custom value names", + args=[ + CmdArg("s_arg", "Single value arg with custom value name", value_name="Single Arg Val"), + CmdArg("m_arg", "Multi value arg with custom value name", True, value_name="Multi Arg Val") + ], + ), + Cmd( + "single_value_optional_opt", + help="Command taking optional, single option", + opts=[ + CmdOpt( + name="implicit_single_val", + help='Implicit non-required single value', + takes_value=True, + required=False, + ), + CmdOpt( + name="explicit_single_val", + help='Explicit non-required single value', + takes_value=True, + required=False, + ), + ] + ), + Cmd( + "single_value_required_opt", + help="Command with single-value optional and required options", + opts=[ + CmdOpt( + name="non_req_val", + help="Non-required single value", + takes_value=True, + ), + CmdOpt( + name="req_val", + help="Required single value", + takes_value=True, + required=True, + ), + ] + ), + Cmd( + "multi_opts", + help="Command with multi-value optional and required options", + opts=[ + CmdOpt( + name="m_opt", + help="Opt with multiple values", + multi=True, + ), + CmdOpt( + name="im_m_opt", + help="Opt accepting multiple values were 'takes value' is implied", + multi=True, + ), + CmdOpt( + name="req_m_opt", + help="Required opt accepting multiple values", + multi=True, + required=True, + ), + CmdOpt( + name="d_m_opt", + help="Delimited multi opt", + multi=True, + ), + CmdOpt( + name="d_im_m_opt", + help="Delimited opt where 'multi' and 'takes value' is implied", + multi=True, + ), + ] + ), + Cmd( + "flag_opts", + help="Command with flag-style options only", + opts=[ + CmdOpt( + name="im_f_opt", + help="Stackable flag opt with 'takes value=false' implied", + ), + CmdOpt( + name="ex_f_opt", + help="Stackable flag opt with 'takes value=false' set", + ), + ] + ), + Cmd( + "opts_with_value_names", + help="Command with single/multi-opts with custom value names", + opts=[ + CmdOpt( + name="s_opt_nv_im_tv", + help="Single opt with value name, implying 'takes_value'=true", + value_name="s_val_impl", + ), + CmdOpt( + name="s_opt_nv_ex_tv", + help="Single opt with value name and explicit 'takes_value'=true", + value_name="s_val_expl", + takes_value=True, + ), + CmdOpt( + name="m_opt_named_val", + help="Multi-opt with value name", + value_name="m_val", + multi=True, + ), + CmdOpt( + name="s_opt_ln_nv", + help="Single opt with long name and value name", + value_name="ln_nv", + ), + ] + ), + Cmd( + "opts_with_aliases", + help="Command with option aliasing, custom long, and short names", + opts=[ + CmdOpt( + name="single_opt", + help="Single opt with long/short name", + takes_value=True, + ln="s_opt", + sn="s" + ), + CmdOpt( + name="multi_opt", + help="Multi-opt with long/short name", + takes_value=True, + multi=True, + ln="m_opt", + sn="m" + ), + CmdOpt( + name="occurrence_counter", + help="Flag opt with long/short name", + ln="cnt", + sn="o", + ), + CmdOpt( + name="flag_opt_short_name", + help="Flag opt with short name only", + sn="f" + ), + CmdOpt( + name="flag_opt_long_name", + help="Flag opt with long name only", + ln="ln_f_opt" + ), + CmdOpt( + name="flag_opt_dupl_ln_sn", + help="Flag opt with ln matching another's sn", + ln="f" + ), + CmdOpt( + name="fo_sn_aliases", + help="Flag opt with short aliases", + sn_aliases=['a', 'b'] + ), + CmdOpt( + name="fo_sn_and_aliases", + help="Flag opt with short name and short aliases", + sn="c", + sn_aliases=['d', 'e'] + ), + CmdOpt( + name="fo_ln_aliases", + help="Flag opt with long aliases", + ln_aliases=['fa', 'fb'] + ), + CmdOpt( + name="fo_ln_and_aliases", + help="Flag opt with long name and long aliases", + ln="fc", + ln_aliases=['fd', 'fe'] + ), + CmdOpt( + name="fo_sn_ln_aliases", + help="Flag opt with long and short aliases", + ln_aliases=['sn_ln_1', 'sn_ln_2'], + sn_aliases=['z'], + ), + ] + ), + Cmd( + "hidden_opt", + help="Command with a hidden opt", + opts=[ + CmdOpt( + name="hidden_opt", + help="Hidden opt", + hidden=True, + ), + CmdOpt( + # name="non_hidden_opt", + name="visible_opt", + help="Visible, non-hidden, opt", + ), + ] + ), + ] + ), + Cmd("test_current_command", help="Tests origen.current_command"), + Cmd( + "test_nested_level_1", + help="Tests origen.current_command L1", + subcmds=[ + Cmd( + "test_nested_level_2", + help="Tests origen.current_command L2", + subcmds=[ + Cmd("test_nested_level_3_a", help="Tests origen.current_command L3a"), + Cmd("test_nested_level_3_b", help="Tests origen.current_command L3b"), + ] + ) + ] + ), + ] + ) + # self.test_arguments = self.aux_sub_cmd( + # self.name, + # "test_arguments", + # ) + # self.error_cases = self.aux_sub_cmd( + # self.name, + # "error_cases" + # ) + # self.display_cc_verbosity = self.aux_sub_cmd( + # self.name, + # "display_cc_verbosity" + # ) + + @property + def base_cmd(self): + return self.cmd_testers + + @property + def test_args(self): + return self.base_cmd.test_arguments + + @property + def display_v(self): + return self.test_args.display_verbosity_opts + + @property + def error_cases(self): + return self.base_cmd.error_cases + + @property + def subc_l1(self): + return self.base_cmd.test_nested_level_1 + + @property + def subc_l2(self): + return self.subc_l1.test_nested_level_2 + + @property + def subc_l3_a(self): + return self.subc_l2.test_nested_level_3_a + + @property + def subc_l3_b(self): + return self.subc_l2.test_nested_level_3_b + + +class DummyCmds(cli.CLI): + Cmd = Cmd + cfg_toml = aux_cmds_dir.joinpath("dummy_cmds_cfg.toml") + + def __init__(self): + self.name = "dummy_cmds" + self.dummy_cmd = self.aux_sub_cmd( + self.name, + "dummy_cmd", + help="Dummy Aux Command", + args=[ + CmdArg( + name="action_arg", + help="Dummy Aux Action", + multi=True, + ), + ], + subcmds=[ + Cmd( + "subc", + help="Dummy Aux Subcommand", + args=[ + CmdArg( + name="action_arg", + help="Dummy Aux Subc Action", + multi=True, + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Dummy Aux Subc Flag", + ), + ], + ) + ], + from_config=self.cfg_toml + ) + +class PythonNoAppAuxCmds(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "python_no_app_aux_cmds" + self.python_no_app_aux_cmds = self.aux_sub_cmd( + self.name, + "python_no_app_aux_cmds" + ) + + @property + def base_cmd(self): + return self.python_no_app_aux_cmds + +class AuxNamespaces: + # dummy_cmds = DummyCmds() + + def __init__(self) -> None: + self.dummy_cmds = DummyCmds() + self.cmd_testers = CmdTesters() + self.python_no_app_aux_cmds = PythonNoAppAuxCmds() + self.aux_cmds_from_cli_dir = AuxCmdsFromCliDir() + self.add_aux_cmd = AddAuxCmds() + +class Aux: + namespaces = AuxNamespaces() + + @classmethod + @property + def ns(cls): + return cls.namespaces + +class CLIShared(cli.CLI): + Cmd = Cmd + + pln__python_plugin = "python_plugin" + + cmd_shortcuts__default_plugins = { + "plugin_says_hi": (pln__python_plugin, "plugin_says_hi"), + "echo": (pln__python_plugin, "echo"), + } + + exts = ExtensionDrivers() + plugins = Plugins() + aux = Aux() + + @classmethod + @property + def python_plugin(cls): + return cls.plugins.python_plugin + + @classmethod + @property + def cmd_testers(cls): + return cls.aux.namespaces.cmd_testers + + @classmethod + @property + def cmd_testers_cmd(cls): + return cls.cmd_testers.cmd_testers diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py new file mode 100644 index 00000000..8d387c22 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py @@ -0,0 +1,92 @@ +# FOR_PR clean up +import origen + +def extract_args_flag(action): + _, is_cmd, f = action.split("__", 2) + if is_cmd == "cmd": + args = origen.current_command.args + else: + print("Exts:") + print(origen.current_command.exts.keys()) + ext = f.rsplit("_flag", 1)[0] + t = is_cmd.split("_")[0] + args = origen.current_command.exts[f"{t}.{ext}"].args + return (args, f) + +def extract(action): + a, is_cmd, rest = action.split("__", 2) + if is_cmd == "cmd": + args = origen.current_command.args + (name, rest) = rest.split("__", 1) + params = rest.split("__") + else: + t = is_cmd.split("_")[0] + (ext, rest) = rest.split("__", 1) + args = origen.current_command.exts[f"{t}.{ext}"].args + (name, rest) = rest.split("__", 1) + name = f"{ext}_{name}" + params = rest.split("__") + return (a, args, name, params) + +def do_action(actions, phase): + if actions: + for action in actions: + print(f"Start Action {phase} CMD: {action}") + # if action == "update_cmd_args": + # if phase == "Before": + # origen.command.args["single_arg"] = "updated" + # if action == "clear_cmd_args": + # origen.command.args["single_val"] = None + # if action == "before_cmd_exception": + # raise RuntimeError("'before_cmd_exception' encountered!") + if action.startswith("inc_flag__"): + if phase == "Before": + _, is_cmd, f = action.split("__", 2) + if is_cmd == "cmd": + args = origen.current_command.args + else: + print("Exts:") + print(origen.current_command.exts.keys()) + ext = f.rsplit("_flag", 1)[0] + t = is_cmd.split("_")[0] + args = origen.current_command.exts[f"{t}.{ext}"].args + args[f] += 1 + elif action.startswith("set_flag"): + if phase == "Before": + args, f = extract_args_flag(action) + args[f] = -1 + elif action.startswith("inc_multi_arg"): + if phase == "Before": + (_, args, name, params) = extract(action) + args[name] = params + elif action.startswith("set_arg__"): + if phase == "Before": + _, args, arg, vals = extract(action) + args[arg] = vals[0] + elif action == "show_cmd_args": + print(origen.current_command.args) + elif action == "show_ext_args": + print({ext_name: ext.args for ext_name, ext in origen.current_command.exts.items()}) + elif action == "exts_workout__test_updating_args": + if phase == "Before": + args = origen.current_command.exts["aux.exts_workout"].args + # Increment the counter + args["flag_extension"] += 1 + + # Append to a multi-arg + args["multi_val_opt"].append("update_mv_opt") + + # Overwrite an arg + args["single_val_opt"] = "update_sv_opt" + + # Set a new arg + args["new_arg"] = "new_arg_for_ext" + elif action == "no_action": + pass + else: + raise RuntimeError(f"No action '{action}' is known!") + # if action == "update_aux_ext": + # fail + # if action == "current_command_BIST": + # fail + print(f"End Action {phase} CMD: {action}") \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml new file mode 100644 index 00000000..8233ce6b --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml @@ -0,0 +1,25 @@ +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking" + + [[extension.opt]] + name = "test_apps_shared_ext_action" + multiple = true + help = "Action from test_apps_shared_test_helpers plugin" + + [[extension.opt]] + name = "test_apps_shared_ext_flag" + multiple = true + help = "Flag from test_apps_shared_test_helpers plugin" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" + + [[extension.opt]] + name = "test_apps_shared_ext_action" + multiple = true + help = "Action from test_apps_shared_test_helpers plugin" + + [[extension.opt]] + name = "test_apps_shared_ext_flag" + multiple = true + help = "Flag from test_apps_shared_test_helpers plugin" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/dut/.keep b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/dut/.keep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/flows/.gitkeep b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/flows/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/interface/interface.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/interface/interface.py new file mode 100644 index 00000000..97544bae --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/interface/interface.py @@ -0,0 +1,5 @@ +from origen.interface import BaseInterface + + +class Interface(BaseInterface): + pass \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/origen.plugin.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/origen.plugin.toml new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/patterns/.gitkeep b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/patterns/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/templates/.gitkeep b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/templates/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/tests/README.md b/test_apps/test_apps_shared_test_helpers/tests/README.md new file mode 100644 index 00000000..218887c3 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/tests/README.md @@ -0,0 +1,16 @@ +Note that the `tests` folder is the place to create tests to verify the +functionality of this Origen application, it does not refer to silicon +tests! + +This is setup to use a popular Python test framework called `pytest` which +requires that following naming convention is followed: + +* All files containing tests must be named `_test.py`, e.g. `tests/example_test.py` +* Functions that define tests within such files must be named `test_`, + e.g. `def test_example():` + +To execute the tests, run the following command from the command line: + +~~~ +poetry run pytest +~~~ \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/tests/example_test.py b/test_apps/test_apps_shared_test_helpers/tests/example_test.py new file mode 100644 index 00000000..374f68a0 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/tests/example_test.py @@ -0,0 +1,6 @@ +import origen +import pytest +from tests.shared import * + +def test_example(): + assert 1 == 1 \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/tests/shared/__init__.py b/test_apps/test_apps_shared_test_helpers/tests/shared/__init__.py new file mode 100644 index 00000000..5579f7f3 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/tests/shared/__init__.py @@ -0,0 +1,5 @@ +# This is a good place to add helper functions that you want to make +# available to all of your tests + +import pytest +import origen \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/vendor/.gitkeep b/test_apps/test_apps_shared_test_helpers/vendor/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/web/Makefile b/test_apps/test_apps_shared_test_helpers/web/Makefile new file mode 100644 index 00000000..d0c3cbf1 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/web/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/test_apps/test_apps_shared_test_helpers/web/make.bat b/test_apps/test_apps_shared_test_helpers/web/make.bat new file mode 100644 index 00000000..9534b018 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/web/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/test_apps/test_apps_shared_test_helpers/web/source/_static/.gitkeep b/test_apps/test_apps_shared_test_helpers/web/source/_static/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/test_apps_shared_test_helpers/web/source/conf.py b/test_apps/test_apps_shared_test_helpers/web/source/conf.py new file mode 100644 index 00000000..92e0859d --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/web/source/conf.py @@ -0,0 +1,76 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) +import origen +import origen.web + +import sys, os +sys.path.insert(0, os.path.abspath('../../')) + +# -- Project information ----------------------------------------------------- + +project = 'test_apps_shared_test_helpers' +copyright = '2020, Origen Core Team' +author = 'Origen Core Team' + +# The full version, including alpha/beta/rc tags +release = '0.0.0' + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + 'origen.web.origen_sphinx_extension', 'origen_autoapi.sphinx', + 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.autosectionlabel', + 'recommonmark', 'origen.web.shorthand' +] + +autosectionlabel_prefix_document = True +autoapi_modules = { + 'test_apps_shared_test_helpers.application': { + 'module-members': ['undoc-members'], + 'class-members': ['members', 'undoc-members'] + } +} +autoapi_output_dir = origen.web.interbuild_dir.joinpath('autoapi') + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +#html_theme_options = { +# 'navbar_links': +# [('Github', 'https://github.com/Origen-SDK/o2/tree/master/example', True)], +# 'logos': [{ +# 'src': '_static/example_logo.png', +# 'alt': 'Example', +# 'rel_src': True, +# }] +#} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/test_apps/test_apps_shared_test_helpers/web/source/index.rst b/test_apps/test_apps_shared_test_helpers/web/source/index.rst new file mode 100644 index 00000000..136694aa --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/web/source/index.rst @@ -0,0 +1,22 @@ +.. example documentation master file, created by + sphinx-quickstart on Wed Apr 15 21:59:35 2020. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to test_apps_shared_test_helpers's documentation! +=================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + interbuild/autoapi/test_apps_shared_test_helpers.application/test_apps_shared_test_helpers.application + +For information on how to build documentation with Origen, see :link-to:`the documentation guides `. + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` From e82fd31681bd834e966e3fc6b80a3583b01a88c1 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Tue, 27 Dec 2022 18:24:56 -0600 Subject: [PATCH 002/200] Fix to see if regressions will work. --- rust/origen/cli/src/commands/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index de43ca67..abb112e0 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -10,7 +10,7 @@ pub mod new; pub mod proj; pub mod save_ref; pub mod target; -pub mod mailer; +// pub mod mailer; pub mod credentials; pub mod eval; pub mod aux_cmds; From 49d2c67ed3c96554080ceb2e3a2ccfb17f2860be Mon Sep 17 00:00:00 2001 From: coreyeng Date: Tue, 27 Dec 2022 21:13:57 -0600 Subject: [PATCH 003/200] Realized settrue arg action sets a default. --- rust/origen/cli/src/commands/build.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rust/origen/cli/src/commands/build.rs b/rust/origen/cli/src/commands/build.rs index d7ba7f39..997da43a 100644 --- a/rust/origen/cli/src/commands/build.rs +++ b/rust/origen/cli/src/commands/build.rs @@ -150,7 +150,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { // Build the latest CLI, this can be requested from an Origen workspace or an app workspace that is // locally referencing an Origen workspace - if matches.contains_id("cli") { + if *matches.get_one("cli").unwrap() { cd(&STATUS .origen_wksp_root .join("rust") @@ -158,7 +158,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { .join("cli"))?; display!(""); let mut args = vec!["build"]; - if matches.contains_id("release") || matches.contains_id("publish") { + if *matches.get_one("release").unwrap() || *matches.get_one("publish").unwrap() { args.push("--release"); } Command::new("cargo") @@ -168,13 +168,13 @@ pub fn run(matches: &ArgMatches) -> Result<()> { display!(""); // Build the metal_pyapi - } else if matches.contains_id("metal") { + } else if *matches.get_one("metal").unwrap() { build_metal(matches)?; // Build the PyAPI by default } else { // A publish build will also build the origen_pyapi Python package and // publish it to PyPI, only available within an Origen workspace - if matches.contains_id("publish") { + if *matches.get_one("publish").unwrap() { let wheel_dir = &STATUS .origen_wksp_root .join("rust") @@ -214,7 +214,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { change_pyapi_wheel_version(&wheel_dir, &old, &new); } - if matches.contains_id("publish") && !matches.contains_id("dry_run") { + if *matches.get_one("publish").unwrap() && !matches.get_one::("dry_run").unwrap() { let pypi_token = std::env::var("ORIGEN_PYPI_TOKEN").expect("ORIGEN_PYPI_TOKEN is not defined"); @@ -248,7 +248,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { let mut target = "debug"; let mut arch_target = None; - if matches.contains_id("release") { + if *matches.get_one("release").unwrap() { args.push("--release"); target = "release"; } @@ -321,7 +321,7 @@ fn build_metal(matches: &ArgMatches) -> Result<()> { let mut target = "debug"; let mut arch_target = None; - if matches.contains_id("release") { + if *matches.get_one("release").unwrap() { args.push("--release"); target = "release"; } From d91835787c844aed16d81037433210e9feaa3479 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Tue, 27 Dec 2022 21:47:05 -0600 Subject: [PATCH 004/200] Add no-app unit tests --- .github/workflows/regression_test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 989868c8..e36d32a3 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -72,14 +72,18 @@ jobs: working-directory: test_apps/python_app run: poetry --version - - name: Run Python Unit Tests + - name: Run Python-App Unit Tests working-directory: test_apps/python_app run: origen exec pytest -vv - - name: Run Diff Tests + - name: Run Python-App Diff Tests working-directory: test_apps/python_app run: origen examples - + + - name: Run Python-No-App Unit Tests + working-directory: test_apps/python_no_app + run: origen exec pytest -vv + - name: Run Rust Tests if: matrix.python-version == 3.8 working-directory: rust/origen From 0fcd539c9a46580e2e1ae88acf6177cdaa918e24 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Wed, 28 Dec 2022 06:55:57 -0600 Subject: [PATCH 005/200] Use poetry directly in no-app tests --- .github/workflows/regression_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index e36d32a3..086238bd 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -82,7 +82,7 @@ jobs: - name: Run Python-No-App Unit Tests working-directory: test_apps/python_no_app - run: origen exec pytest -vv + run: poetry run pytest -vv - name: Run Rust Tests if: matrix.python-version == 3.8 From 130ccf8907cacacd52c779a27a539a55717ce2f9 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Wed, 28 Dec 2022 07:29:10 -0600 Subject: [PATCH 006/200] More tries at no-app tests --- .github/workflows/regression_test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 086238bd..3391630f 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -80,6 +80,18 @@ jobs: working-directory: test_apps/python_app run: origen examples + - name: Setup No-App Env + working-directory: test_apps/python_no_app + run: poetry install + + - name: Display Poetry Version (No-App) + working-directory: test_apps/python_no_app + run: poetry --version + + - name: Display Origen No-App Version + working-directory: test_apps/python_no_app + run: origen -v + - name: Run Python-No-App Unit Tests working-directory: test_apps/python_no_app run: poetry run pytest -vv From fe10d11d0238bd81f8b657b997bc1ee8ba961494 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Wed, 28 Dec 2022 17:29:10 -0600 Subject: [PATCH 007/200] Try updated lockfile --- test_apps/python_no_app/poetry.lock | 971 +++++++++++++++++++++------- 1 file changed, 735 insertions(+), 236 deletions(-) diff --git a/test_apps/python_no_app/poetry.lock b/test_apps/python_no_app/poetry.lock index 8751e512..9201021b 100644 --- a/test_apps/python_no_app/poetry.lock +++ b/test_apps/python_no_app/poetry.lock @@ -16,21 +16,23 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "22.1.0" +version = "22.2.0" description = "Classes Without Boilerplate" -category = "dev" +category = "main" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.extras] -tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] -tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] -docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] -dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +cov = ["attrs", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] +dev = ["attrs"] +docs = ["furo", "sphinx", "myst-parser", "zope.interface", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] +tests = ["attrs", "zope.interface"] +tests-no-zope = ["hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist", "cloudpickle", "mypy (>=0.971,<0.990)", "pytest-mypy-plugins"] +tests_no_zope = ["hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist", "cloudpickle", "mypy (>=0.971,<0.990)", "pytest-mypy-plugins"] [[package]] name = "babel" -version = "2.10.3" +version = "2.11.0" description = "Internationalization utilities" category = "main" optional = false @@ -39,6 +41,14 @@ python-versions = ">=3.6" [package.dependencies] pytz = ">=2015.7" +[[package]] +name = "backports.cached-property" +version = "1.0.2" +description = "cached_property() - computed once per instance, cached as attribute" +category = "main" +optional = false +python-versions = ">=3.6.0" + [[package]] name = "beautifulsoup4" version = "4.8.2" @@ -67,37 +77,24 @@ beautifulsoup4 = "*" [[package]] name = "cachecontrol" -version = "0.12.11" +version = "0.12.12" description = "httplib2 caching for requests" category = "main" optional = false python-versions = ">=3.6" [package.dependencies] -lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} +filelock = {version = ">=3.8.0", optional = true, markers = "extra == \"filecache\""} msgpack = ">=0.5.2" requests = "*" [package.extras] -filecache = ["lockfile (>=0.9)"] +filecache = ["filelock (>=3.8.0)"] redis = ["redis (>=2.10.5)"] -[[package]] -name = "cachy" -version = "0.3.0" -description = "Cachy provides a simple yet effective caching library." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.extras] -redis = ["redis (>=3.3.6,<4.0.0)"] -memcached = ["python-memcached (>=1.59,<2.0)"] -msgpack = ["msgpack-python (>=0.5,<0.6)"] - [[package]] name = "certifi" -version = "2022.6.15" +version = "2022.12.7" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false @@ -116,7 +113,7 @@ pycparser = "*" [[package]] name = "charset-normalizer" -version = "2.1.0" +version = "2.1.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false @@ -127,35 +124,23 @@ unicode_backport = ["unicodedata2"] [[package]] name = "cleo" -version = "0.8.1" +version = "2.0.1" description = "Cleo allows you to create beautiful and testable command-line interfaces." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.7,<4.0" [package.dependencies] -clikit = ">=0.6.0,<0.7.0" - -[[package]] -name = "clikit" -version = "0.6.2" -description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.dependencies] -crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} -pastel = ">=0.2.0,<0.3.0" -pylev = ">=1.3,<2.0" +crashtest = ">=0.4.1,<0.5.0" +rapidfuzz = ">=2.2.0,<3.0.0" [[package]] name = "colorama" -version = "0.4.5" +version = "0.4.6" description = "Cross-platform colored terminal text." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" [[package]] name = "commonmark" @@ -170,15 +155,15 @@ test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "crashtest" -version = "0.3.1" +version = "0.4.1" description = "Manage Python errors with ease" category = "main" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.7,<4.0" [[package]] name = "cryptography" -version = "37.0.4" +version = "38.0.4" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false @@ -191,13 +176,13 @@ cffi = ">=1.12" docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] -sdist = ["setuptools_rust (>=0.11.4)"] +sdist = ["setuptools-rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] [[package]] name = "distlib" -version = "0.3.5" +version = "0.3.6" description = "Distribution utilities" category = "main" optional = false @@ -211,17 +196,34 @@ category = "main" optional = false python-versions = ">=3.7" +[[package]] +name = "dulwich" +version = "0.20.50" +description = "Python Git Library" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +urllib3 = ">=1.25" + +[package.extras] +fastimport = ["fastimport"] +https = ["urllib3 (>=1.24.1)"] +paramiko = ["paramiko"] +pgp = ["gpg"] + [[package]] name = "filelock" -version = "3.8.0" +version = "3.9.0" description = "A platform independent file lock." category = "main" optional = false python-versions = ">=3.7" [package.extras] -testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] -docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] +docs = ["furo (>=2022.12.7)", "sphinx-autodoc-typehints (>=1.19.5)", "sphinx (>=5.3)"] +testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)", "pytest (>=7.2)"] [[package]] name = "html5lib" @@ -243,7 +245,7 @@ lxml = ["lxml"] [[package]] name = "idna" -version = "3.3" +version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false @@ -259,18 +261,35 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "importlib-metadata" -version = "1.7.0" +version = "4.13.0" description = "Read metadata from Python packages" category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.7" [package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "rst.linker"] -testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +perf = ["ipython"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] + +[[package]] +name = "importlib-resources" +version = "5.10.2" +description = "Read resources from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} + +[package.extras] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"] [[package]] name = "iniconfig" @@ -280,6 +299,21 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "jaraco.classes" +version = "3.2.3" +description = "Utility functions for Python class constructs" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +more-itertools = "*" + +[package.extras] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] + [[package]] name = "jeepney" version = "0.8.0" @@ -306,23 +340,46 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "jsonschema" +version = "4.17.3" +description = "An implementation of JSON Schema validation for Python" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +attrs = ">=17.4.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} +pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""} +pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" +typing-extensions = {version = "*", markers = "python_version < \"3.8\""} + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] + [[package]] name = "keyring" -version = "22.3.0" +version = "23.13.1" description = "Store and access your passwords safely." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] -importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} +importlib-resources = {version = "*", markers = "python_version < \"3.9\""} +"jaraco.classes" = "*" jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} -pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +pywin32-ctypes = {version = ">=0.2.0", markers = "sys_platform == \"win32\""} SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] +completion = ["shtab"] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"] [[package]] name = "lockfile" @@ -351,6 +408,14 @@ category = "main" optional = false python-versions = ">=3.7" +[[package]] +name = "more-itertools" +version = "9.0.0" +description = "More routines for operating on iterables, beyond itertools" +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "msgpack" version = "1.0.4" @@ -419,22 +484,11 @@ url = "../../python/origen_metal" [[package]] name = "packaging" -version = "20.9" +version = "22.0" description = "Core utilities for Python packages" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.dependencies] -pyparsing = ">=2.0.2" - -[[package]] -name = "pastel" -version = "0.2.1" -description = "Bring colors to your terminal." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.7" [[package]] name = "pexpect" @@ -449,26 +503,54 @@ ptyprocess = ">=0.5" [[package]] name = "pkginfo" -version = "1.8.3" +version = "1.9.2" description = "Query metadatdata from sdists / bdists / installed packages." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.6" [package.extras] -testing = ["nose", "coverage"] +testing = ["pytest", "pytest-cov"] + +[[package]] +name = "pkgutil-resolve-name" +version = "1.3.10" +description = "Resolve a name to an object." +category = "main" +optional = false +python-versions = ">=3.6" + +[[package]] +name = "pl-ext-cmds" +version = "0.1.0" +description = "Plugin Extending Cmds" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} + +[package.source] +type = "directory" +url = "../pl_ext_cmds" [[package]] name = "platformdirs" -version = "2.5.2" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "2.6.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" +[package.dependencies] +typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} + [package.extras] -docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] -test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx-autodoc-typehints (>=1.19.5)", "sphinx (>=5.3)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest (>=7.2)"] [[package]] name = "pluggy" @@ -487,41 +569,65 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poetry" -version = "1.1.14" +version = "1.3.1" description = "Python dependency management and packaging made easy." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7,<4.0" [package.dependencies] -cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} -cachy = ">=0.3.0,<0.4.0" -cleo = ">=0.8.1,<0.9.0" -clikit = ">=0.6.2,<0.7.0" -crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} +"backports.cached-property" = {version = ">=1.0.2,<2.0.0", markers = "python_version < \"3.8\""} +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"]} +cleo = ">=2.0.0,<3.0.0" +crashtest = ">=0.4.1,<0.5.0" +dulwich = ">=0.20.46,<0.21.0" +filelock = ">=3.8.0,<4.0.0" html5lib = ">=1.0,<2.0" -importlib-metadata = {version = ">=1.6.0,<2.0.0", markers = "python_version < \"3.8\""} -keyring = {version = ">=21.2.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} -packaging = ">=20.4,<21.0" +importlib-metadata = {version = ">=4.4,<5.0", markers = "python_version < \"3.10\""} +jsonschema = ">=4.10.0,<5.0.0" +keyring = ">=23.9.0,<24.0.0" +lockfile = ">=0.12.2,<0.13.0" +packaging = ">=20.4" pexpect = ">=4.7.0,<5.0.0" -pkginfo = ">=1.4,<2.0" -poetry-core = ">=1.0.7,<1.1.0" +pkginfo = ">=1.5,<2.0" +platformdirs = ">=2.5.2,<3.0.0" +poetry-core = "1.4.0" +poetry-plugin-export = ">=1.2.0,<2.0.0" requests = ">=2.18,<3.0" -requests-toolbelt = ">=0.9.1,<0.10.0" -shellingham = ">=1.1,<2.0" -tomlkit = ">=0.7.0,<1.0.0" -virtualenv = ">=20.0.26,<21.0.0" +requests-toolbelt = ">=0.9.1,<0.11.0" +shellingham = ">=1.5,<2.0" +tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} +tomlkit = ">=0.11.1,<0.11.2 || >0.11.2,<0.11.3 || >0.11.3,<1.0.0" +trove-classifiers = ">=2022.5.19" +urllib3 = ">=1.26.0,<2.0.0" +virtualenv = [ + {version = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6,<21.0.0", markers = "sys_platform != \"win32\" or python_version != \"3.9\""}, + {version = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6,<20.16.6", markers = "sys_platform == \"win32\" and python_version == \"3.9\""}, +] +xattr = {version = ">=0.10.0,<0.11.0", markers = "sys_platform == \"darwin\""} [[package]] name = "poetry-core" -version = "1.0.8" +version = "1.4.0" description = "Poetry PEP 517 Build Backend" category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7,<4.0" + +[package.dependencies] +importlib-metadata = {version = ">=1.7.0", markers = "python_version < \"3.8\""} + +[[package]] +name = "poetry-plugin-export" +version = "1.2.0" +description = "Poetry plugin to export the dependencies to various formats" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" [package.dependencies] -importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} +poetry = ">=1.2.2,<2.0.0" +poetry-core = ">=1.3.0,<2.0.0" [[package]] name = "ptyprocess" @@ -549,30 +655,14 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.12.0" +version = "2.13.0" description = "Pygments is a syntax highlighting package written in Python." category = "main" optional = false python-versions = ">=3.6" -[[package]] -name = "pylev" -version = "1.4.0" -description = "A pure Python Levenshtein implementation that's not freaking GPL'd." -category = "main" -optional = false -python-versions = "*" - -[[package]] -name = "pyparsing" -version = "3.0.9" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" -optional = false -python-versions = ">=3.6.8" - [package.extras] -diagrams = ["railroad-diagrams", "jinja2"] +plugins = ["importlib-metadata"] [[package]] name = "pyreadline3" @@ -582,6 +672,14 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "pyrsistent" +version = "0.19.2" +description = "Persistent/Functional/Immutable data structures" +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "pytest" version = "6.2.5" @@ -615,15 +713,48 @@ develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} -origen_metal = {path = "../../python/origen_metal", develop = true} [package.source] type = "directory" url = "../python_plugin" +[[package]] +name = "python-plugin-no-cmds" +version = "0.1.0" +description = "Example Origen Plugin Without Any Commands" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} + +[package.source] +type = "directory" +url = "../python_plugin_no_cmds" + +[[package]] +name = "python-plugin-the-second" +version = "0.1.0" +description = "Another Example Origen Plugin" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} + +[package.source] +type = "directory" +url = "../python_plugin_the_second" + [[package]] name = "pytz" -version = "2022.2.1" +version = "2022.7" description = "World timezone definitions, modern and historical" category = "main" optional = false @@ -637,6 +768,17 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "rapidfuzz" +version = "2.13.7" +description = "rapid fuzzy string matching" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.extras] +full = ["numpy"] + [[package]] name = "recommonmark" version = "0.7.1" @@ -670,11 +812,11 @@ use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "requests-toolbelt" -version = "0.9.1" +version = "0.10.1" description = "A utility belt for advanced users of python-requests" category = "main" optional = false -python-versions = "*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] requests = ">=2.0.1,<3.0.0" @@ -835,11 +977,31 @@ test = ["pytest"] [[package]] name = "termcolor" -version = "1.1.0" -description = "ANSII Color formatting for output in terminal." +version = "2.1.1" +description = "ANSI color formatting for output in terminal" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" + +[package.extras] +tests = ["pytest", "pytest-cov"] + +[[package]] +name = "test-apps-shared-test-helpers" +version = "0.1.0" +description = "Shared Regression Test Helpers for Test Apps" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +pl_ext_cmds = {path = "../pl_ext_cmds", develop = true} + +[package.source] +type = "directory" +url = "../test_apps_shared_test_helpers" [[package]] name = "toml" @@ -849,44 +1011,85 @@ category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "main" +optional = false +python-versions = ">=3.7" + [[package]] name = "tomlkit" -version = "0.11.4" +version = "0.11.6" description = "Style preserving TOML library" category = "main" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.6" + +[[package]] +name = "trove-classifiers" +version = "2022.12.22" +description = "Canonical source for classifiers on PyPI (pypi.org)." +category = "main" +optional = false +python-versions = "*" + +[[package]] +name = "typing-extensions" +version = "4.4.0" +description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" +optional = false +python-versions = ">=3.7" [[package]] name = "urllib3" -version = "1.26.11" +version = "1.26.13" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.extras] brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.16.2" +version = "20.16.5" description = "Virtual Python Environment builder" category = "main" optional = false python-versions = ">=3.6" [package.dependencies] -distlib = ">=0.3.1,<1" -filelock = ">=3.2,<4" -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -platformdirs = ">=2,<3" +distlib = ">=0.3.5,<1" +filelock = ">=3.4.1,<4" +platformdirs = ">=2.4,<3" [package.extras] -testing = ["pytest-timeout (>=1)", "pytest-randomly (>=1)", "pytest-mock (>=2)", "pytest-freezegun (>=0.4.1)", "pytest-env (>=0.6.2)", "pytest (>=4)", "packaging (>=20.0)", "flaky (>=3)", "coverage-enable-subprocess (>=1)", "coverage (>=4)"] -docs = ["towncrier (>=21.3)", "sphinx-rtd-theme (>=0.4.3)", "sphinx-argparse (>=0.2.5)", "sphinx (>=3)", "proselint (>=0.10.2)"] +docs = ["proselint (>=0.13)", "sphinx (>=5.1.1)", "sphinx-argparse (>=0.3.1)", "sphinx-rtd-theme (>=1)", "towncrier (>=21.9)"] +testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] + +[[package]] +name = "virtualenv" +version = "20.17.1" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +distlib = ">=0.3.6,<1" +filelock = ">=3.4.1,<4" +importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.8\""} +platformdirs = ">=2.4,<3" + +[package.extras] +docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] +testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] [[package]] name = "webencodings" @@ -896,6 +1099,17 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "xattr" +version = "0.10.1" +description = "Python wrapper for extended filesystem attributes" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +cffi = ">=1.0" + [[package]] name = "yapf" version = "0.30.0" @@ -906,20 +1120,20 @@ python-versions = "*" [[package]] name = "zipp" -version = "3.8.1" +version = "3.11.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "jaraco.functools", "more-itertools", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"] [metadata] lock-version = "1.1" python-versions = ">=3.7,<3.11" -content-hash = "f52e406dc05d89031862868464f57a0ab07bfc6610e4b89ded9ec6240266ce27" +content-hash = "26480da255683b8b3fa427275d60c56838bea009549dbeec10ceac16960d7b9e" [metadata.files] alabaster = [ @@ -930,12 +1144,16 @@ atomicwrites = [ {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, ] attrs = [ - {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, - {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, + {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, + {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, ] babel = [ - {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, - {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, + {file = "Babel-2.11.0-py3-none-any.whl", hash = "sha256:1ad3eca1c885218f6dce2ab67291178944f810a10a9b5f3cb8382a5a232b64fe"}, + {file = "Babel-2.11.0.tar.gz", hash = "sha256:5ef4b3226b0180dedded4229651c8b0e1a3a6a2837d45a073272f313e4cf97f6"}, +] +"backports.cached-property" = [ + {file = "backports.cached-property-1.0.2.tar.gz", hash = "sha256:9306f9eed6ec55fd156ace6bc1094e2c86fae5fb2bf07b6a9c00745c656e75dd"}, + {file = "backports.cached_property-1.0.2-py3-none-any.whl", hash = "sha256:baeb28e1cd619a3c9ab8941431fe34e8490861fb998c6c4590693d50171db0cc"}, ] beautifulsoup4 = [ {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, @@ -946,16 +1164,12 @@ bs4 = [ {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, ] cachecontrol = [ - {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, - {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, -] -cachy = [ - {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, - {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, + {file = "CacheControl-0.12.12-py2.py3-none-any.whl", hash = "sha256:5986a16897cd296bdb7b86b42e0403c4ca30b9875f0e0c7c8e509b50cff115b7"}, + {file = "CacheControl-0.12.12.tar.gz", hash = "sha256:9c2e5208ea76ebd9921176569743ddf6d7f3bb4188dbf61806f0f8fc48ecad38"}, ] certifi = [ - {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, - {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, + {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, + {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, ] cffi = [ {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, @@ -1024,85 +1238,158 @@ cffi = [ {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, ] charset-normalizer = [ - {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, - {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, + {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, + {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, ] cleo = [ - {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, - {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, -] -clikit = [ - {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, - {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, + {file = "cleo-2.0.1-py3-none-any.whl", hash = "sha256:6eb133670a3ed1f3b052d53789017b6e50fca66d1287e6e6696285f4cb8ea448"}, + {file = "cleo-2.0.1.tar.gz", hash = "sha256:eb4b2e1f3063c11085cebe489a6e9124163c226575a3c3be69b2e51af4a15ec5"}, ] colorama = [ - {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, - {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] commonmark = [ {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, ] crashtest = [ - {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, - {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, + {file = "crashtest-0.4.1-py3-none-any.whl", hash = "sha256:8d23eac5fa660409f57472e3851dab7ac18aba459a8d19cbbba86d3d5aecd2a5"}, + {file = "crashtest-0.4.1.tar.gz", hash = "sha256:80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce"}, ] cryptography = [ - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, - {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, - {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, - {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, + {file = "cryptography-38.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:2fa36a7b2cc0998a3a4d5af26ccb6273f3df133d61da2ba13b3286261e7efb70"}, + {file = "cryptography-38.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:1f13ddda26a04c06eb57119caf27a524ccae20533729f4b1e4a69b54e07035eb"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:2ec2a8714dd005949d4019195d72abed84198d877112abb5a27740e217e0ea8d"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50a1494ed0c3f5b4d07650a68cd6ca62efe8b596ce743a5c94403e6f11bf06c1"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a10498349d4c8eab7357a8f9aa3463791292845b79597ad1b98a543686fb1ec8"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:10652dd7282de17990b88679cb82f832752c4e8237f0c714be518044269415db"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:bfe6472507986613dc6cc00b3d492b2f7564b02b3b3682d25ca7f40fa3fd321b"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:ce127dd0a6a0811c251a6cddd014d292728484e530d80e872ad9806cfb1c5b3c"}, + {file = "cryptography-38.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:53049f3379ef05182864d13bb9686657659407148f901f3f1eee57a733fb4b00"}, + {file = "cryptography-38.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:8a4b2bdb68a447fadebfd7d24855758fe2d6fecc7fed0b78d190b1af39a8e3b0"}, + {file = "cryptography-38.0.4-cp36-abi3-win32.whl", hash = "sha256:1d7e632804a248103b60b16fb145e8df0bc60eed790ece0d12efe8cd3f3e7744"}, + {file = "cryptography-38.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:8e45653fb97eb2f20b8c96f9cd2b3a0654d742b47d638cf2897afbd97f80fa6d"}, + {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca57eb3ddaccd1112c18fc80abe41db443cc2e9dcb1917078e02dfa010a4f353"}, + {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:c9e0d79ee4c56d841bd4ac6e7697c8ff3c8d6da67379057f29e66acffcd1e9a7"}, + {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:0e70da4bdff7601b0ef48e6348339e490ebfb0cbe638e083c9c41fb49f00c8bd"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:998cd19189d8a747b226d24c0207fdaa1e6658a1d3f2494541cb9dfbf7dcb6d2"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67461b5ebca2e4c2ab991733f8ab637a7265bb582f07c7c88914b5afb88cb95b"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:4eb85075437f0b1fd8cd66c688469a0c4119e0ba855e3fef86691971b887caf6"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3178d46f363d4549b9a76264f41c6948752183b3f587666aff0555ac50fd7876"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:6391e59ebe7c62d9902c24a4d8bcbc79a68e7c4ab65863536127c8a9cd94043b"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:78e47e28ddc4ace41dd38c42e6feecfdadf9c3be2af389abbfeef1ff06822285"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fb481682873035600b5502f0015b664abc26466153fab5c6bc92c1ea69d478b"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:4367da5705922cf7070462e964f66e4ac24162e22ab0a2e9d31f1b270dd78083"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b4cad0cea995af760f82820ab4ca54e5471fc782f70a007f31531957f43e9dee"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:80ca53981ceeb3241998443c4964a387771588c4e4a5d92735a493af868294f9"}, + {file = "cryptography-38.0.4.tar.gz", hash = "sha256:175c1a818b87c9ac80bb7377f5520b7f31b3ef2a0004e2420319beadedb67290"}, ] distlib = [ - {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, - {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, ] docutils = [ {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, ] +dulwich = [ + {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:97f02f8d500d4af08dc022d697c56e8539171acc3f575c2fe9acf3b078e5c8c9"}, + {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7301773e5cc16d521bc6490e73772a86a4d1d0263de506f08b54678cc4e2f061"}, + {file = "dulwich-0.20.50-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b70106580ed11f45f4c32d2831d0c9c9f359bc2415fff4a6be443e3a36811398"}, + {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f9c4f2455f966cad94648278fa9972e4695b35d04f82792fa58e1ea15dd83f0"}, + {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9163fbb021a8ad9c35a0814a5eedf45a8eb3a0b764b865d7016d901fc5a947fc"}, + {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:322ff8ff6aa4d6d36294cd36de1c84767eb1903c7db3e7b4475ad091febf5363"}, + {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5d3290a45651c8e534f8e83ae2e30322aefdd162f0f338bae2e79a6ee5a87513"}, + {file = "dulwich-0.20.50-cp310-cp310-win32.whl", hash = "sha256:80ab07131a6e68594441f5c4767e9e44e87fceafc3e347e541c928a18c679bd8"}, + {file = "dulwich-0.20.50-cp310-cp310-win_amd64.whl", hash = "sha256:eefe786a6010f8546baac4912113eeed4e397ddb8c433a345b548a04d4176496"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:df3562dde3079d57287c233d45b790bc967c5aae975c9a7b07ca30e60e055512"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e1ae18d5805f0c0c5dac65795f8d48660437166b12ee2c0ffea95bfdbf9c1051"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d2f7df39bd1378d3b0bfb3e7fc930fd0191924af1f0ef587bcd9946afe076c06"}, + {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:731e7f319b34251fadeb362ada1d52cc932369d9cdfa25c0e41150cda28773d0"}, + {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d11d44176e5d2fa8271fc86ad1e0a8731b9ad8f77df64c12846b30e16135eb"}, + {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7aaabb8e4beadd53f75f853a981caaadef3ef130e5645c902705704eaf136daa"}, + {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3dc9f97ec8d3db08d9723b9fd06f3e52c15b84c800d153cfb59b0a3dc8b8d40"}, + {file = "dulwich-0.20.50-cp311-cp311-win32.whl", hash = "sha256:3b1964fa80cafd5a1fd71615b0313daf6f3295c6ab05656ea0c1d2423539904a"}, + {file = "dulwich-0.20.50-cp311-cp311-win_amd64.whl", hash = "sha256:a24a3893108f3b97beb958670d5f3f2a3bec73a1fe18637a572a85abd949a1c4"}, + {file = "dulwich-0.20.50-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6d409a282f8848fd6c8d7c7545ad2f75c16de5d5977de202642f1d50fdaac554"}, + {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5411d0f1092152e1c0bb916ae490fe181953ae1b8d13f4e68661253e10b78dbb"}, + {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6343569f998ce429e2a5d813c56768ac51b496522401db950f0aa44240bfa901"}, + {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a405cd236766060894411614a272cfb86fe86cde5ca73ef264fc4fa5a715fff4"}, + {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:ee0f9b02019c0ea84cdd31c00a0c283669b771c85612997a911715cf84e33d99"}, + {file = "dulwich-0.20.50-cp36-cp36m-win32.whl", hash = "sha256:2644466270267270f2157ea6f1c0aa224f6f3bf06a307fc39954e6b4b3d82bae"}, + {file = "dulwich-0.20.50-cp36-cp36m-win_amd64.whl", hash = "sha256:d4629635a97e3af1b5da48071e00c8e70fad85f3266fadabe1f5a8f49172c507"}, + {file = "dulwich-0.20.50-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0e4862f318d99cc8a500e3622a89613a88c07d957a0f628cdc2ed86addff790f"}, + {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c96e3fb9d48c0454dc242c7accc7819780c9a7f29e441a9eff12361ed0fa35f9"}, + {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc6092a4f0bbbff2e553e87a9c6325955b64ea43fca21297c8182e19ae8a43c"}, + {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:519b627d49d273e2fd01c79d09e578675ca6cd05193c1787e9ef165c9a1d66ea"}, + {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a75cab01b909c4c683c2083e060e378bc01701b7366b5a7d9846ef6d3b9e3d5"}, + {file = "dulwich-0.20.50-cp37-cp37m-win32.whl", hash = "sha256:ea8ffe26d91dbcd5580dbd5a07270a12ea57b091604d77184da0a0d9fad50ed3"}, + {file = "dulwich-0.20.50-cp37-cp37m-win_amd64.whl", hash = "sha256:8f3af857f94021cae1322d86925bfc0dd31e501e885ab5db275473bfac0bb39d"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3fb35cedb1243bc420d885ef5b4afd642c6ac8f07ddfc7fdbca1becf9948bf7e"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4bb23a9cec63e16c0e432335f068169b73dd44fa9318dd7cd7a4ca83607ff367"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5267619b34ddaf8d9a6b841492cd17a971fd25bf9a5657f2de928385c3a08b94"}, + {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9091f1d53a3c0747cbf0bd127c64e7f09b770264d8fb53e284383fcdf69154e7"}, + {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6ec7c8fea2b44187a3b545e6c11ab9947ffb122647b07abcdb7cc3aaa770c0e"}, + {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:11b180b80363b4fc70664197028181a17ae4c52df9965a29b62a6c52e40c2dbe"}, + {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c83e7840d9d0a94d7033bc109efe0c22dfcdcd816bcd4469085e42809e3bf5ba"}, + {file = "dulwich-0.20.50-cp38-cp38-win32.whl", hash = "sha256:c075f69c2de19d9fd97e3b70832d2b42c6a4a5d909b3ffd1963b67d86029f95f"}, + {file = "dulwich-0.20.50-cp38-cp38-win_amd64.whl", hash = "sha256:06775c5713cfeda778c7c67d4422b5e7554d3a7f644f1dde646cdf486a30285a"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:49f66f1c057c18d7d60363f461f4ab8329320fbe1f02a7a33c255864a7d3c942"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4e541cd690a5e3d55082ed51732d755917e933cddeb4b0204f2a5ec5d5d7b60b"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:80e8750ee2fa0ab2784a095956077758e5f6107de27f637c4b9d18406652c22c"}, + {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbb6368f18451dc44c95c55e1a609d1a01d3821f7ed480b22b2aea1baca0f4a7"}, + {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3ee45001411b638641819b7b3b33f31f13467c84066e432256580fcab7d8815"}, + {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4842e22ed863a776b36ef8ffe9ed7b772eb452b42c8d02975c29d27e3bc50ab4"}, + {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:790e4a641284a7fb4d56ebdaf8b324a5826fbbb9c54307c06f586f9f6a5e56db"}, + {file = "dulwich-0.20.50-cp39-cp39-win32.whl", hash = "sha256:f08406b6b789dea5c95ba1130a0801d8748a67f18be940fe7486a8b481fde875"}, + {file = "dulwich-0.20.50-cp39-cp39-win_amd64.whl", hash = "sha256:78c388ad421199000fb7b5ed5f0c7b509b3e31bd7cad303786a4d0bf89b82f60"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:cb194c53109131bcbcd1ca430fcd437cdaf2d33e204e45fbe121c47eaa43e9af"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7542a72c5640dd0620862d6df8688f02a6c336359b5af9b3fcfe11b7fa6652f"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4aa1d0861517ebbbe0e0084cc9ab4f7ab720624a3eda2bd10e45f774ab858db8"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:583c6bbc27f13fe2e41a19f6987a42681c6e4f6959beae0a6e5bb033b8b081a8"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0c61c193d02c0e1e0d758cdd57ae76685c368d09a01f00d704ba88bd96767cfe"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2edbff3053251985f10702adfafbee118298d383ef5b5b432a5f22d1f1915df"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a344230cadfc5d315752add6ce9d4cfcfc6c85e36bbf57fce9444bcc7c6ea8fb"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:57bff9bde0b6b05b00c6acbb1a94357caddb2908ed7026a48c715ff50d220335"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e29a3c2037761fa816aa556e78364dfc8e3f44b873db2d17aed96f9b06ac83a3"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2aa2a4a84029625bf9c63771f8a628db1f3be2d2ea3cb8b17942cd4317797152"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd9fa00971ecf059bb358085a942ecac5be4ff71acdf299f44c8cbc45c18659f"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:af4adac92fb95671ea3a24f2f8e5e5e8f638711ce9c33a3ca6cd68bf1ff7d99f"}, + {file = "dulwich-0.20.50.tar.gz", hash = "sha256:50a941796b2c675be39be728d540c16b5b7ce77eb9e1b3f855650ece6832d2be"}, +] filelock = [ - {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, - {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, + {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, + {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, ] html5lib = [ {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, ] idna = [ - {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, - {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, ] imagesize = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, ] importlib-metadata = [ - {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, - {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, + {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, + {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, +] +importlib-resources = [ + {file = "importlib_resources-5.10.2-py3-none-any.whl", hash = "sha256:7d543798b0beca10b6a01ac7cafda9f822c54db9e8376a6bf57e0cbd74d486b6"}, + {file = "importlib_resources-5.10.2.tar.gz", hash = "sha256:e4a96c8cc0339647ff9a5e0550d9f276fc5a01ffa276012b58ec108cfd7b8484"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] +"jaraco.classes" = [ + {file = "jaraco.classes-3.2.3-py3-none-any.whl", hash = "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158"}, + {file = "jaraco.classes-3.2.3.tar.gz", hash = "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a"}, +] jeepney = [ {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, @@ -1111,9 +1398,13 @@ jinja2 = [ {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] +jsonschema = [ + {file = "jsonschema-4.17.3-py3-none-any.whl", hash = "sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6"}, + {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, +] keyring = [ - {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, - {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, + {file = "keyring-23.13.1-py3-none-any.whl", hash = "sha256:771ed2a91909389ed6148631de678f82ddc73737d85a927f382a8a1b157898cd"}, + {file = "keyring-23.13.1.tar.gz", hash = "sha256:ba2e15a9b35e21908d0aaf4e0a47acc52d6ae33444df0da2b49d41a46ef6d678"}, ] lockfile = [ {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, @@ -1164,6 +1455,10 @@ markupsafe = [ {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] +more-itertools = [ + {file = "more-itertools-9.0.0.tar.gz", hash = "sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab"}, + {file = "more_itertools-9.0.0-py3-none-any.whl", hash = "sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41"}, +] msgpack = [ {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, @@ -1225,36 +1520,41 @@ origen-autoapi = [ ] origen-metal = [] packaging = [ - {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, - {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, -] -pastel = [ - {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, - {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, + {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"}, + {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"}, ] pexpect = [ {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, ] pkginfo = [ - {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, - {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, + {file = "pkginfo-1.9.2-py3-none-any.whl", hash = "sha256:d580059503f2f4549ad6e4c106d7437356dbd430e2c7df99ee1efe03d75f691e"}, + {file = "pkginfo-1.9.2.tar.gz", hash = "sha256:ac03e37e4d601aaee40f8087f63fc4a2a6c9814dda2c8fa6aab1b1829653bdfa"}, +] +pkgutil-resolve-name = [ + {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, + {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, ] +pl-ext-cmds = [] platformdirs = [ - {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, - {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, + {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, + {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, ] pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] poetry = [ - {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, - {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, + {file = "poetry-1.3.1-py3-none-any.whl", hash = "sha256:e8c24984af3e124ef31a5891c1c11871c948687368ee451e95f7f101ffbf8204"}, + {file = "poetry-1.3.1.tar.gz", hash = "sha256:fde98462ad5dc9879393157da93092206a3411117e25a4761a41c6d08f31aea8"}, ] poetry-core = [ - {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, - {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, + {file = "poetry_core-1.4.0-py3-none-any.whl", hash = "sha256:5559ab80384ac021db329ef317086417e140ee1176bcfcb3a3838b544e213c8e"}, + {file = "poetry_core-1.4.0.tar.gz", hash = "sha256:514bd33c30e0bf56b0ed44ee15e120d7e47b61ad908b2b1011da68c48a84ada9"}, +] +poetry-plugin-export = [ + {file = "poetry_plugin_export-1.2.0-py3-none-any.whl", hash = "sha256:109fb43ebfd0e79d8be2e7f9d43ba2ae357c4975a18dfc0cfdd9597dd086790e"}, + {file = "poetry_plugin_export-1.2.0.tar.gz", hash = "sha256:9a1dd42765408931d7831738749022651d43a2968b67c988db1b7a567dfe41ef"}, ] ptyprocess = [ {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, @@ -1269,34 +1569,143 @@ pycparser = [ {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] pygments = [ - {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, - {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, -] -pylev = [ - {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, - {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, -] -pyparsing = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, + {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, + {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, ] pyreadline3 = [ {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, ] +pyrsistent = [ + {file = "pyrsistent-0.19.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d6982b5a0237e1b7d876b60265564648a69b14017f3b5f908c5be2de3f9abb7a"}, + {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:187d5730b0507d9285a96fca9716310d572e5464cadd19f22b63a6976254d77a"}, + {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:055ab45d5911d7cae397dc418808d8802fb95262751872c841c170b0dbf51eed"}, + {file = "pyrsistent-0.19.2-cp310-cp310-win32.whl", hash = "sha256:456cb30ca8bff00596519f2c53e42c245c09e1a4543945703acd4312949bfd41"}, + {file = "pyrsistent-0.19.2-cp310-cp310-win_amd64.whl", hash = "sha256:b39725209e06759217d1ac5fcdb510e98670af9e37223985f330b611f62e7425"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2aede922a488861de0ad00c7630a6e2d57e8023e4be72d9d7147a9fcd2d30712"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:879b4c2f4d41585c42df4d7654ddffff1239dc4065bc88b745f0341828b83e78"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c43bec251bbd10e3cb58ced80609c5c1eb238da9ca78b964aea410fb820d00d6"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-win32.whl", hash = "sha256:d690b18ac4b3e3cab73b0b7aa7dbe65978a172ff94970ff98d82f2031f8971c2"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-win_amd64.whl", hash = "sha256:3ba4134a3ff0fc7ad225b6b457d1309f4698108fb6b35532d015dca8f5abed73"}, + {file = "pyrsistent-0.19.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a178209e2df710e3f142cbd05313ba0c5ebed0a55d78d9945ac7a4e09d923308"}, + {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e371b844cec09d8dc424d940e54bba8f67a03ebea20ff7b7b0d56f526c71d584"}, + {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:111156137b2e71f3a9936baf27cb322e8024dac3dc54ec7fb9f0bcf3249e68bb"}, + {file = "pyrsistent-0.19.2-cp38-cp38-win32.whl", hash = "sha256:e5d8f84d81e3729c3b506657dddfe46e8ba9c330bf1858ee33108f8bb2adb38a"}, + {file = "pyrsistent-0.19.2-cp38-cp38-win_amd64.whl", hash = "sha256:9cd3e9978d12b5d99cbdc727a3022da0430ad007dacf33d0bf554b96427f33ab"}, + {file = "pyrsistent-0.19.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f1258f4e6c42ad0b20f9cfcc3ada5bd6b83374516cd01c0960e3cb75fdca6770"}, + {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21455e2b16000440e896ab99e8304617151981ed40c29e9507ef1c2e4314ee95"}, + {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd880614c6237243ff53a0539f1cb26987a6dc8ac6e66e0c5a40617296a045e"}, + {file = "pyrsistent-0.19.2-cp39-cp39-win32.whl", hash = "sha256:71d332b0320642b3261e9fee47ab9e65872c2bd90260e5d225dabeed93cbd42b"}, + {file = "pyrsistent-0.19.2-cp39-cp39-win_amd64.whl", hash = "sha256:dec3eac7549869365fe263831f576c8457f6c833937c68542d08fde73457d291"}, + {file = "pyrsistent-0.19.2-py3-none-any.whl", hash = "sha256:ea6b79a02a28550c98b6ca9c35b9f492beaa54d7c5c9e9949555893c8a9234d0"}, + {file = "pyrsistent-0.19.2.tar.gz", hash = "sha256:bfa0351be89c9fcbcb8c9879b826f4353be10f58f8a677efab0c017bf7137ec2"}, +] pytest = [ {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] python-plugin = [] +python-plugin-no-cmds = [] +python-plugin-the-second = [] pytz = [ - {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, - {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, + {file = "pytz-2022.7-py2.py3-none-any.whl", hash = "sha256:93007def75ae22f7cd991c84e02d434876818661f8df9ad5df9e950ff4e52cfd"}, + {file = "pytz-2022.7.tar.gz", hash = "sha256:7ccfae7b4b2c067464a6733c6261673fdb8fd1be905460396b97a073e9fa683a"}, ] pywin32-ctypes = [ {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, ] +rapidfuzz = [ + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b75dd0928ce8e216f88660ab3d5c5ffe990f4dd682fd1709dba29d5dafdde6de"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:24d3fea10680d085fd0a4d76e581bfb2b1074e66e78fd5964d4559e1fcd2a2d4"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8109e0324d21993d5b2d111742bf5958f3516bf8c59f297c5d1cc25a2342eb66"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5f705652360d520c2de52bee11100c92f59b3e3daca308ebb150cbc58aecdad"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7496e8779905b02abc0ab4ba2a848e802ab99a6e20756ffc967a0de4900bd3da"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:24eb6b843492bdc63c79ee4b2f104059b7a2201fef17f25177f585d3be03405a"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:467c1505362823a5af12b10234cb1c4771ccf124c00e3fc9a43696512bd52293"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53dcae85956853b787c27c1cb06f18bb450e22cf57a4ad3444cf03b8ff31724a"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:46b9b8aa09998bc48dd800854e8d9b74bc534d7922c1d6e1bbf783e7fa6ac29c"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:1fbad8fb28d98980f5bff33c7842efef0315d42f0cd59082108482a7e6b61410"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:43fb8cb030f888c3f076d40d428ed5eb4331f5dd6cf1796cfa39c67bf0f0fc1e"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:b6bad92de071cbffa2acd4239c1779f66851b60ffbbda0e4f4e8a2e9b17e7eef"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d00df2e4a81ffa56a6b1ec4d2bc29afdcb7f565e0b8cd3092fece2290c4c7a79"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-win32.whl", hash = "sha256:2c836f0f2d33d4614c3fbaf9a1eb5407c0fe23f8876f47fd15b90f78daa64c34"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-win_amd64.whl", hash = "sha256:c36fd260084bb636b9400bb92016c6bd81fd80e59ed47f2466f85eda1fc9f782"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b34e8c0e492949ecdd5da46a1cfc856a342e2f0389b379b1a45a3cdcd3176a6e"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:875d51b3497439a72e2d76183e1cb5468f3f979ab2ddfc1d1f7dde3b1ecfb42f"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ae33a72336059213996fe4baca4e0e4860913905c2efb7c991eab33b95a98a0a"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5585189b3d90d81ccd62d4f18530d5ac8972021f0aaaa1ffc6af387ff1dce75"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42085d4b154a8232767de8296ac39c8af5bccee6b823b0507de35f51c9cbc2d7"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:585206112c294e335d84de5d5f179c0f932837752d7420e3de21db7fdc476278"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f891b98f8bc6c9d521785816085e9657212621e93f223917fb8e32f318b2957e"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08590905a95ccfa43f4df353dcc5d28c15d70664299c64abcad8721d89adce4f"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b5dd713a1734574c2850c566ac4286594bacbc2d60b9170b795bee4b68656625"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:988f8f6abfba7ee79449f8b50687c174733b079521c3cc121d65ad2d38831846"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b3210869161a864f3831635bb13d24f4708c0aa7208ef5baac1ac4d46e9b4208"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:f6fe570e20e293eb50491ae14ddeef71a6a7e5f59d7e791393ffa99b13f1f8c2"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6120f2995f5154057454c5de99d86b4ef3b38397899b5da1265467e8980b2f60"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-win32.whl", hash = "sha256:b20141fa6cee041917801de0bab503447196d372d4c7ee9a03721b0a8edf5337"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-win_amd64.whl", hash = "sha256:ec55a81ac2b0f41b8d6fb29aad16e55417036c7563bad5568686931aa4ff08f7"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7d005e058d86f2a968a8d28ca6f2052fab1f124a39035aa0523261d6baf21e1f"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe59a0c21a032024edb0c8e43f5dee5623fef0b65a1e3c1281836d9ce199af3b"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cdfc04f7647c29fb48da7a04082c34cdb16f878d3c6d098d62d5715c0ad3000c"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:68a89bb06d5a331511961f4d3fa7606f8e21237467ba9997cae6f67a1c2c2b9e"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:effe182767d102cb65dfbbf74192237dbd22d4191928d59415aa7d7c861d8c88"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25b4cedf2aa19fb7212894ce5f5219010cce611b60350e9a0a4d492122e7b351"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3a9bd02e1679c0fd2ecf69b72d0652dbe2a9844eaf04a36ddf4adfbd70010e95"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5e2b3d020219baa75f82a4e24b7c8adcb598c62f0e54e763c39361a9e5bad510"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:cf62dacb3f9234f3fddd74e178e6d25c68f2067fde765f1d95f87b1381248f58"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:fa263135b892686e11d5b84f6a1892523123a00b7e5882eff4fbdabb38667347"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:fa4c598ed77f74ec973247ca776341200b0f93ec3883e34c222907ce72cb92a4"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-win32.whl", hash = "sha256:c2523f8180ebd9796c18d809e9a19075a1060b1a170fde3799e83db940c1b6d5"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-win_amd64.whl", hash = "sha256:5ada0a14c67452358c1ee52ad14b80517a87b944897aaec3e875279371a9cb96"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ca8a23097c1f50e0fdb4de9e427537ca122a18df2eead06ed39c3a0bef6d9d3a"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9be02162af0376d64b840f2fc8ee3366794fc149f1e06d095a6a1d42447d97c5"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:af4f7c3c904ca709493eb66ca9080b44190c38e9ecb3b48b96d38825d5672559"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f50d1227e6e2a0e3ae1fb1c9a2e1c59577d3051af72c7cab2bcc430cb5e18da"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c71d9d512b76f05fa00282227c2ae884abb60e09f08b5ca3132b7e7431ac7f0d"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b52ac2626945cd21a2487aeefed794c14ee31514c8ae69b7599170418211e6f6"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca00fafd2756bc9649bf80f1cf72c647dce38635f0695d7ce804bc0f759aa756"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d248a109699ce9992304e79c1f8735c82cc4c1386cd8e27027329c0549f248a2"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c88adbcb933f6b8612f6c593384bf824e562bb35fc8a0f55fac690ab5b3486e5"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c8601a66fbfc0052bb7860d2eacd303fcde3c14e87fdde409eceff516d659e77"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:27be9c63215d302ede7d654142a2e21f0d34ea6acba512a4ae4cfd52bbaa5b59"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:3dcffe1f3cbda0dc32133a2ae2255526561ca594f15f9644384549037b355245"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8450d15f7765482e86ef9be2ad1a05683cd826f59ad236ef7b9fb606464a56aa"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-win32.whl", hash = "sha256:460853983ab88f873173e27cc601c5276d469388e6ad6e08c4fd57b2a86f1064"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-win_amd64.whl", hash = "sha256:424f82c35dbe4f83bdc3b490d7d696a1dc6423b3d911460f5493b7ffae999fd2"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c3fbe449d869ea4d0909fc9d862007fb39a584fb0b73349a6aab336f0d90eaed"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:16080c05a63d6042643ae9b6cfec1aefd3e61cef53d0abe0df3069b9d4b72077"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dbcf5371ea704759fcce772c66a07647751d1f5dbdec7818331c9b31ae996c77"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:114810491efb25464016fd554fdf1e20d390309cecef62587494fc474d4b926f"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99a84ab9ac9a823e7e93b4414f86344052a5f3e23b23aa365cda01393ad895bd"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:81642a24798851b118f82884205fc1bd9ff70b655c04018c467824b6ecc1fabc"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3741cb0bf9794783028e8b0cf23dab917fa5e37a6093b94c4c2f805f8e36b9f"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:759a3361711586a29bc753d3d1bdb862983bd9b9f37fbd7f6216c24f7c972554"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1333fb3d603d6b1040e365dca4892ba72c7e896df77a54eae27dc07db90906e3"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:916bc2e6cf492c77ad6deb7bcd088f0ce9c607aaeabc543edeb703e1fbc43e31"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:23524635840500ce6f4d25005c9529a97621689c85d2f727c52eed1782839a6a"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:ebe303cd9839af69dd1f7942acaa80b1ba90bacef2e7ded9347fbed4f1654672"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:fe56659ccadbee97908132135de4b875543353351e0c92e736b7c57aee298b5a"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-win32.whl", hash = "sha256:3f11a7eff7bc6301cd6a5d43f309e22a815af07e1f08eeb2182892fca04c86cb"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-win_amd64.whl", hash = "sha256:e8914dad106dacb0775718e54bf15e528055c4e92fb2677842996f2d52da5069"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7f7930adf84301797c3f09c94b9c5a9ed90a9e8b8ed19b41d2384937e0f9f5bd"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c31022d9970177f6affc6d5dd757ed22e44a10890212032fabab903fdee3bfe7"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f42b82f268689f429def9ecfb86fa65ceea0eaf3fed408b570fe113311bf5ce7"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b477b43ced896301665183a5e0faec0f5aea2373005648da8bdcb3c4b73f280"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:d63def9bbc6b35aef4d76dc740301a4185867e8870cbb8719ec9de672212fca8"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:c66546e30addb04a16cd864f10f5821272a1bfe6462ee5605613b4f1cb6f7b48"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f799d1d6c33d81e983d3682571cc7d993ae7ff772c19b3aabb767039c33f6d1e"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d82f20c0060ffdaadaf642b88ab0aa52365b56dffae812e188e5bdb998043588"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:042644133244bfa7b20de635d500eb9f46af7097f3d90b1724f94866f17cb55e"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75c45dcd595f8178412367e302fd022860ea025dc4a78b197b35428081ed33d5"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3d8b081988d0a49c486e4e845a547565fee7c6e7ad8be57ff29c3d7c14c6894c"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16ffad751f43ab61001187b3fb4a9447ec2d1aedeff7c5bac86d3b95f9980cc3"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:020858dd89b60ce38811cd6e37875c4c3c8d7fcd8bc20a0ad2ed1f464b34dc4e"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cda1e2f66bb4ba7261a0f4c2d052d5d909798fca557cbff68f8a79a87d66a18f"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b6389c50d8d214c9cd11a77f6d501529cb23279a9c9cafe519a3a4b503b5f72a"}, + {file = "rapidfuzz-2.13.7.tar.gz", hash = "sha256:8d3e252d4127c79b4d7c2ae47271636cbaca905c8bb46d80c7930ab906cf4b5c"}, +] recommonmark = [ {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, @@ -1306,8 +1715,8 @@ requests = [ {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, ] requests-toolbelt = [ - {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, - {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, + {file = "requests-toolbelt-0.10.1.tar.gz", hash = "sha256:62e09f7ff5ccbda92772a29f394a49c3ad6cb181d568b1337626b2abb628a63d"}, + {file = "requests_toolbelt-0.10.1-py2.py3-none-any.whl", hash = "sha256:18565aa58116d9951ac39baa288d3adb5b3ff975c4f25eee78555d89e8f247f7"}, ] secretstorage = [ {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, @@ -1361,33 +1770,123 @@ sphinxcontrib-serializinghtml = [ {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, ] termcolor = [ - {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, + {file = "termcolor-2.1.1-py3-none-any.whl", hash = "sha256:fa852e957f97252205e105dd55bbc23b419a70fec0085708fc0515e399f304fd"}, + {file = "termcolor-2.1.1.tar.gz", hash = "sha256:67cee2009adc6449c650f6bcf3bdeed00c8ba53a8cda5362733c53e0a39fb70b"}, ] +test-apps-shared-test-helpers = [] toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +tomli = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] tomlkit = [ - {file = "tomlkit-0.11.4-py3-none-any.whl", hash = "sha256:25d4e2e446c453be6360c67ddfb88838cfc42026322770ba13d1fbd403a93a5c"}, - {file = "tomlkit-0.11.4.tar.gz", hash = "sha256:3235a9010fae54323e727c3ac06fb720752fe6635b3426e379daec60fbd44a83"}, + {file = "tomlkit-0.11.6-py3-none-any.whl", hash = "sha256:07de26b0d8cfc18f871aec595fda24d95b08fef89d147caa861939f37230bf4b"}, + {file = "tomlkit-0.11.6.tar.gz", hash = "sha256:71b952e5721688937fb02cf9d354dbcf0785066149d2855e44531ebdd2b65d73"}, +] +trove-classifiers = [ + {file = "trove-classifiers-2022.12.22.tar.gz", hash = "sha256:fe0fe3f085987161aee2a5a853c7cc7cdf64515c5965d57ad968fdd8cc3b0362"}, + {file = "trove_classifiers-2022.12.22-py3-none-any.whl", hash = "sha256:f0013fd4ce06cfae879a2580ab6acc3d51ec93ecb364d6c061b6c77b44dd72de"}, +] +typing-extensions = [ + {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, + {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, ] urllib3 = [ - {file = "urllib3-1.26.11-py2.py3-none-any.whl", hash = "sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc"}, - {file = "urllib3-1.26.11.tar.gz", hash = "sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"}, + {file = "urllib3-1.26.13-py2.py3-none-any.whl", hash = "sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc"}, + {file = "urllib3-1.26.13.tar.gz", hash = "sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"}, ] virtualenv = [ - {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, - {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, + {file = "virtualenv-20.16.5-py3-none-any.whl", hash = "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27"}, + {file = "virtualenv-20.16.5.tar.gz", hash = "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da"}, + {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, + {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, ] webencodings = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, ] +xattr = [ + {file = "xattr-0.10.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:16a660a883e703b311d1bbbcafc74fa877585ec081cd96e8dd9302c028408ab1"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:1e2973e72faa87ca29d61c23b58c3c89fe102d1b68e091848b0e21a104123503"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:13279fe8f7982e3cdb0e088d5cb340ce9cbe5ef92504b1fd80a0d3591d662f68"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:1dc9b9f580ef4b8ac5e2c04c16b4d5086a611889ac14ecb2e7e87170623a0b75"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:485539262c2b1f5acd6b6ea56e0da2bc281a51f74335c351ea609c23d82c9a79"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:295b3ab335fcd06ca0a9114439b34120968732e3f5e9d16f456d5ec4fa47a0a2"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:a126eb38e14a2f273d584a692fe36cff760395bf7fc061ef059224efdb4eb62c"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:b0e919c24f5b74428afa91507b15e7d2ef63aba98e704ad13d33bed1288dca81"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:e31d062cfe1aaeab6ba3db6bd255f012d105271018e647645941d6609376af18"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:209fb84c09b41c2e4cf16dd2f481bb4a6e2e81f659a47a60091b9bcb2e388840"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c4120090dac33eddffc27e487f9c8f16b29ff3f3f8bcb2251b2c6c3f974ca1e1"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3e739d624491267ec5bb740f4eada93491de429d38d2fcdfb97b25efe1288eca"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2677d40b95636f3482bdaf64ed9138fb4d8376fb7933f434614744780e46e42d"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40039f1532c4456fd0f4c54e9d4e01eb8201248c321c6c6856262d87e9a99593"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:148466e5bb168aba98f80850cf976e931469a3c6eb11e9880d9f6f8b1e66bd06"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0aedf55b116beb6427e6f7958ccd80a8cbc80e82f87a4cd975ccb61a8d27b2ee"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c3024a9ff157247c8190dd0eb54db4a64277f21361b2f756319d9d3cf20e475f"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f1be6e733e9698f645dbb98565bb8df9b75e80e15a21eb52787d7d96800e823b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7880c8a54c18bc091a4ce0adc5c6d81da1c748aec2fe7ac586d204d6ec7eca5b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:89c93b42c3ba8aedbc29da759f152731196c2492a2154371c0aae3ef8ba8301b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6b905e808df61b677eb972f915f8a751960284358b520d0601c8cbc476ba2df6"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1ef954d0655f93a34d07d0cc7e02765ec779ff0b59dc898ee08c6326ad614d5"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:199b20301b6acc9022661412346714ce764d322068ef387c4de38062474db76c"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec0956a8ab0f0d3f9011ba480f1e1271b703d11542375ef73eb8695a6bd4b78b"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ffcb57ca1be338d69edad93cf59aac7c6bb4dbb92fd7bf8d456c69ea42f7e6d2"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1f0563196ee54756fe2047627d316977dc77d11acd7a07970336e1a711e934db"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc354f086f926a1c7f04886f97880fed1a26d20e3bc338d0d965fd161dbdb8ab"}, + {file = "xattr-0.10.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c0cd2d02ef2fb45ecf2b0da066a58472d54682c6d4f0452dfe7ae2f3a76a42ea"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:49626096ddd72dcc1654aadd84b103577d8424f26524a48d199847b5d55612d0"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ceaa26bef8fcb17eb59d92a7481c2d15d20211e217772fb43c08c859b01afc6a"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8c014c371391f28f8cd27d73ea59f42b30772cd640b5a2538ad4f440fd9190b"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:46c32cd605673606b9388a313b0050ee7877a0640d7561eea243ace4fa2cc5a6"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:772b22c4ff791fe5816a7c2a1c9fcba83f9ab9bea138eb44d4d70f34676232b4"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:183ad611a2d70b5a3f5f7aadef0fcef604ea33dcf508228765fd4ddac2c7321d"}, + {file = "xattr-0.10.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8068df3ebdfa9411e58d5ae4a05d807ec5994645bb01af66ec9f6da718b65c5b"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bc40570155beb85e963ae45300a530223d9822edfdf09991b880e69625ba38a"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:436e1aaf23c07e15bed63115f1712d2097e207214fc6bcde147c1efede37e2c5"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7298455ccf3a922d403339781b10299b858bb5ec76435445f2da46fb768e31a5"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:986c2305c6c1a08f78611eb38ef9f1f47682774ce954efb5a4f3715e8da00d5f"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5dc6099e76e33fa3082a905fe59df766b196534c705cf7a2e3ad9bed2b8a180e"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:042ad818cda6013162c0bfd3816f6b74b7700e73c908cde6768da824686885f8"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9d4c306828a45b41b76ca17adc26ac3dc00a80e01a5ba85d71df2a3e948828f2"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a606280b0c9071ef52572434ecd3648407b20df3d27af02c6592e84486b05894"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5b49d591cf34cda2079fd7a5cb2a7a1519f54dc2e62abe3e0720036f6ed41a85"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b8705ac6791426559c1a5c2b88bb2f0e83dc5616a09b4500899bfff6a929302"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a5ea974930e876bc5c146f54ac0f85bb39b7b5de2b6fc63f90364712ae368ebe"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f55a2dd73a12a1ae5113c5d9cd4b4ab6bf7950f4d76d0a1a0c0c4264d50da61d"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:475c38da0d3614cc5564467c4efece1e38bd0705a4dbecf8deeb0564a86fb010"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:925284a4a28e369459b2b7481ea22840eed3e0573a4a4c06b6b0614ecd27d0a7"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa32f1b45fed9122bed911de0fcc654da349e1f04fa4a9c8ef9b53e1cc98b91e"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c5d3d0e728bace64b74c475eb4da6148cd172b2d23021a1dcd055d92f17619ac"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8faaacf311e2b5cc67c030c999167a78a9906073e6abf08eaa8cf05b0416515c"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cc6b8d5ca452674e1a96e246a3d2db5f477aecbc7c945c73f890f56323e75203"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3725746a6502f40f72ef27e0c7bfc31052a239503ff3eefa807d6b02a249be22"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:789bd406d1aad6735e97b20c6d6a1701e1c0661136be9be862e6a04564da771f"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9a7a807ab538210ff8532220d8fc5e2d51c212681f63dbd4e7ede32543b070f"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3e5825b5fc99ecdd493b0cc09ec35391e7a451394fdf623a88b24726011c950d"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:80638d1ce7189dc52f26c234cee3522f060fadab6a8bc3562fe0ddcbe11ba5a4"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3ff0dbe4a6ce2ce065c6de08f415bcb270ecfd7bf1655a633ddeac695ce8b250"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5267e5f9435c840d2674194150b511bef929fa7d3bc942a4a75b9eddef18d8d8"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b27dfc13b193cb290d5d9e62f806bb9a99b00cd73bb6370d556116ad7bb5dc12"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:636ebdde0277bce4d12d2ef2550885804834418fee0eb456b69be928e604ecc4"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d60c27922ec80310b45574351f71e0dd3a139c5295e8f8b19d19c0010196544f"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b34df5aad035d0343bd740a95ca30db99b776e2630dca9cc1ba8e682c9cc25ea"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f24a7c04ff666d0fe905dfee0a84bc899d624aeb6dccd1ea86b5c347f15c20c1"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3878e1aff8eca64badad8f6d896cb98c52984b1e9cd9668a3ab70294d1ef92d"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4abef557028c551d59cf2fb3bf63f2a0c89f00d77e54c1c15282ecdd56943496"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0e14bd5965d3db173d6983abdc1241c22219385c22df8b0eb8f1846c15ce1fee"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f9be588a4b6043b03777d50654c6079af3da60cc37527dbb80d36ec98842b1e"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bc4ae264aa679aacf964abf3ea88e147eb4a22aea6af8c6d03ebdebd64cfd6"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:827b5a97673b9997067fde383a7f7dc67342403093b94ea3c24ae0f4f1fec649"}, + {file = "xattr-0.10.1.tar.gz", hash = "sha256:c12e7d81ffaa0605b3ac8c22c2994a8e18a9cf1c59287a1b7722a2289c952ec5"}, +] yapf = [ {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, ] zipp = [ - {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, - {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, + {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"}, + {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"}, ] From 87f2c58ae92fd91349663a0a3a711a538af93883 Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 30 Dec 2022 14:13:44 -0600 Subject: [PATCH 008/200] Updates for Linux/Python 3.8- --- python/origen/origen/helpers/env.py | 15 +++++---- .../helpers/regressions/cli/__init__.py | 14 ++++---- .../origen/helpers/regressions/cli/origen.py | 21 ++++++++++-- rust/origen_metal/Cargo.lock | 7 ++++ .../python_app/tests/_shared/for_proc.py | 2 +- test_apps/python_app/tests/cli_test.py | 3 +- .../tests/cli/tests__cmd__credentials.py | 2 ++ .../tests/test_plugin_loading.py | 4 +-- .../cli/__init__.py | 32 +++---------------- 9 files changed, 52 insertions(+), 48 deletions(-) diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index 76a68256..b83c8a17 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -1,6 +1,7 @@ # TODO add tests and remove equivalents import inspect, subprocess, pathlib, os from origen_metal._helpers import in_new_proc +from origen import running_on_windows def in_new_origen_proc(func=None, mod=None, *, func_kwargs=None, with_configs=None, bypass_config_lookup=False): if isinstance(with_configs, str) or isinstance(with_configs, pathlib.Path): @@ -11,7 +12,7 @@ def in_new_origen_proc(func=None, mod=None, *, func_kwargs=None, with_configs=No return in_new_proc(func, mod, func_kwargs=func_kwargs) # TODO support options -def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=False, input=None, expect_fail=False, return_details=False): +def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=False, input=None, expect_fail=False, return_details=False, shell=None): if isinstance(cmd, str): cmd = ["origen", cmd] else: @@ -21,7 +22,7 @@ def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=F if isinstance(with_configs, str) or isinstance(with_configs, pathlib.Path): with_configs=[with_configs] if with_configs: - subp_env["origen_config_paths"] = ';'.join([str(c) for c in with_configs]) + subp_env["origen_config_paths"] = os.pathsep.join([str(c) for c in with_configs]) if with_env: subp_env.update(with_env) @@ -29,13 +30,17 @@ def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=F if bypass_config_lookup: subp_env["origen_bypass_config_lookup"] = "1" + if shell is None: + shell = running_on_windows + if expect_fail: - result = subprocess.run(cmd, shell=True, capture_output=True, text=True, input=input, env=subp_env) + result = subprocess.run(cmd, shell=shell, capture_output=True, text=True, input=input, env=subp_env) if result.returncode == 0: cmd = ' '.join(cmd) raise RuntimeError(f"Expected cmd '{cmd}' to fail but received return code 0") else: - result = subprocess.run(cmd, shell=True, check=False, capture_output=True, text=True, input=input, env=subp_env) + # FOR_PR make check an option + result = subprocess.run(cmd, shell=shell, check=False, capture_output=True, text=True, input=input, env=subp_env) # FOR_PR take these out print(result.stdout) print(result.stderr) @@ -49,6 +54,4 @@ def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=F "returncode": result.returncode } else: - # FOR_PR take these out - # return result.stdout.decode("utf-8") return result.stdout diff --git a/python/origen/origen/helpers/regressions/cli/__init__.py b/python/origen/origen/helpers/regressions/cli/__init__.py index f1eff343..1bcbc7fb 100644 --- a/python/origen/origen/helpers/regressions/cli/__init__.py +++ b/python/origen/origen/helpers/regressions/cli/__init__.py @@ -6,7 +6,13 @@ cmd = command -class CLI: +class CLIProperties(type): + @property + def app_sub_cmd_path(cls): + cmd = cls.in_app_cmds.app + return [cmd.name, cmd.commands.name] + +class CLI(metaclass=CLIProperties): HelpMsg = HelpMsg Cmd = Cmd CmdOpt = CmdOpt @@ -43,12 +49,6 @@ def aux_cmd(cls, namespace, *args, from_config=None, **kwargs): def aux_sub_cmd(cls, namespace, name, *args, cmd_path=None, from_config=None, **kwargs): return cls.Cmd(name, cmd_path=[cls.common_names.aux_cmds, namespace, *(cmd_path or [])], use_configs=from_config, *args, **kwargs) - @classmethod - @property - def app_sub_cmd_path(cls): - cmd = cls.in_app_cmds.app - return [cmd.name, cmd.commands.name] - @classmethod def app_sub_cmd(cls, *args, cmd_path=None, **kwargs): return cls.Cmd(cmd_path=[*cls.app_sub_cmd_path, *(cmd_path or [])], *args, **kwargs) diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 5c210bab..97d98234 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -15,17 +15,32 @@ class _CommonNames: fmt = "fmt" i = "interactive" -class CoreCommands: - @classmethod +# Use this to mimic: +# @classmethod +# @property +# Available in Python 3.9+ +class CoreCommandsProperties(type): @property def all_names(cls): return [cmd.name for cmd in cls.cmds] - @classmethod @property def all_names_add_help(cls): return cls.all_names + ["help"] +class CoreCommands(metaclass=CoreCommandsProperties): + # Use this to mimic: + # @classmethod + # @property + # Available in Python 3.9+ + def __getattr__(self, name=None): + if name == "all_names_add_help": + return self.__class__.all_names + ["help"] + elif name == "all_names": + return [cmd.name for cmd in self.__class__.cmds] + else: + self.__getattribute__(name) + class GlobalCommands(CoreCommands): class Names: eval = _CommonNames.eval diff --git a/rust/origen_metal/Cargo.lock b/rust/origen_metal/Cargo.lock index 334db1d2..41de80ad 100644 --- a/rust/origen_metal/Cargo.lock +++ b/rust/origen_metal/Cargo.lock @@ -755,6 +755,12 @@ dependencies = [ "url", ] +[[package]] +name = "glob" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" + [[package]] name = "h2" version = "0.3.13" @@ -1494,6 +1500,7 @@ dependencies = [ "enum-display-derive", "enum-utils", "git2", + "glob", "indexmap", "keyring", "lazy_static", diff --git a/test_apps/python_app/tests/_shared/for_proc.py b/test_apps/python_app/tests/_shared/for_proc.py index a04c76d9..6f6e9270 100644 --- a/test_apps/python_app/tests/_shared/for_proc.py +++ b/test_apps/python_app/tests/_shared/for_proc.py @@ -4,7 +4,7 @@ def setenv(config_root, config_name=None, bypass_config_lookup=None, cd=None): os.environ['origen_bypass_config_lookup'] = "1" if config_root is not None: if isinstance(config_root, list): - os.environ['origen_config_paths'] = ";".join([str(c) for c in config_root]) + os.environ['origen_config_paths'] = os.pathsep.join([str(c) for c in config_root]) else: if config_name is None: config_name = inspect.stack()[1].function diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index de05bb5d..75d8842b 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -97,9 +97,8 @@ def test_bad_config_path(self): assert err == "" class TestAppWorkspaceCoreCommands(CLIShared): - @classmethod @property - def cmd_shortcuts__app(cls): + def cmd_shortcuts__app(self): return { 'arg_opt_warmup': 'arg_opt_warmup', "examples": "examples", diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py index 4eff88fa..a0c91de3 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py @@ -46,6 +46,8 @@ def test_set_passwords(self, monkeypatch): def test_verify_password(self): fail + # FOR_PR fix on linux and add back in + @pytest.mark.skip def test_clearing_passwords(self): u = origen.current_user assert set(u.datasets.keys()) == { diff --git a/test_apps/python_no_app/tests/test_plugin_loading.py b/test_apps/python_no_app/tests/test_plugin_loading.py index a771a857..007dc1a5 100644 --- a/test_apps/python_no_app/tests/test_plugin_loading.py +++ b/test_apps/python_no_app/tests/test_plugin_loading.py @@ -25,12 +25,12 @@ def get_configs_and_plugins_from_cli(cls, configs=None, bypass_config_lookup=Fal def test_plugins_are_collected_by_default(self): retn = in_new_origen_proc(mod=config_funcs) assert retn['configs'] == [] - assert retn['plugins'] == self.plugins.python_no_app_collected_pl_names + assert set(retn['plugins']) == set(self.plugins.python_no_app_collected_pl_names) # Test from CLI retn = self.get_configs_and_plugins_from_cli(bypass_config_lookup=True) assert retn['configs'] == [] - assert retn['plugins'] == self.plugins.python_no_app_collected_pl_names + assert set(retn['plugins']) == set(self.plugins.python_no_app_collected_pl_names) def test_plugins_are_accessible(self): pls = origen.plugins diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index dfdac080..181697ad 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -728,7 +728,6 @@ def base_cmd(self): return self.test_apps_shared_test_helpers class Plugins: - # python_plugin = PythonPlugin() def __init__(self): self.plugins = { "pl_ext_cmds": PlExtCmds(), @@ -768,11 +767,7 @@ def __init__(self): Cmd("cli_dir_says_hi") ], ) - # self.cli_dir_says_hi = self.aux_sub_cmd( - # self.name, - # "cli_dir_says_hi", - # ) - + @property def base_cmd(self): return self.aux_cmds_from_cli_dir @@ -1183,8 +1178,6 @@ def base_cmd(self): return self.python_no_app_aux_cmds class AuxNamespaces: - # dummy_cmds = DummyCmds() - def __init__(self) -> None: self.dummy_cmds = DummyCmds() self.cmd_testers = CmdTesters() @@ -1194,11 +1187,7 @@ def __init__(self) -> None: class Aux: namespaces = AuxNamespaces() - - @classmethod - @property - def ns(cls): - return cls.namespaces + ns = namespaces class CLIShared(cli.CLI): Cmd = Cmd @@ -1214,17 +1203,6 @@ class CLIShared(cli.CLI): plugins = Plugins() aux = Aux() - @classmethod - @property - def python_plugin(cls): - return cls.plugins.python_plugin - - @classmethod - @property - def cmd_testers(cls): - return cls.aux.namespaces.cmd_testers - - @classmethod - @property - def cmd_testers_cmd(cls): - return cls.cmd_testers.cmd_testers + python_plugin = plugins.python_plugin + cmd_testers = aux.namespaces.cmd_testers + cmd_testers_cmd = cmd_testers.cmd_testers From d945b0e8b866bcb41474aab0d30578fc567a98ca Mon Sep 17 00:00:00 2001 From: coreyeng Date: Fri, 30 Dec 2022 15:50:15 -0600 Subject: [PATCH 009/200] regression debug --- .github/workflows/regression_test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 3391630f..bfe75d66 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -88,9 +88,14 @@ jobs: working-directory: test_apps/python_no_app run: poetry --version + # Debug - name: Display Origen No-App Version working-directory: test_apps/python_no_app - run: origen -v + run: ls ../../python/origen + + - name: Display Origen No-App Version + working-directory: test_apps/python_no_app + run: poetry run origen -vvv - name: Run Python-No-App Unit Tests working-directory: test_apps/python_no_app From f7bce367eb60d1d95a3d6134ee174bb22dbd67fc Mon Sep 17 00:00:00 2001 From: coreyeng Date: Fri, 30 Dec 2022 17:16:00 -0600 Subject: [PATCH 010/200] regressions debug --- .github/workflows/regression_test.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index bfe75d66..d3e2e234 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -88,8 +88,20 @@ jobs: working-directory: test_apps/python_no_app run: poetry --version + # Copy _origen + - name: Copy Origen Metal (Windows) + if: matrix.os == 'windows-latest' + working-directory: .\rust\pyapi\ + run: cp .\target\debug\_origen.dll ..\..\python\origen\_origen.pyd + + # Copy _origen + - name: Copy Origen Metal (Linux) + if: matrix.os == 'ubuntu-latest' + working-directory: rust/pyapi + run: cp target/debug/lib_origen.so ../../python/origen/_origen.so + # Debug - - name: Display Origen No-App Version + - name: Display python/origen directory working-directory: test_apps/python_no_app run: ls ../../python/origen From a3298eb058d8ae43d980d1ec04ca568bb4349f5d Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 30 Dec 2022 18:10:24 -0600 Subject: [PATCH 011/200] Attempt python 3.7 fix. Some minor cleanup. --- .../tests/cmd_building/shared.py | 153 +------------- .../cmd_building/tests__arg_buildling.py | 51 ----- .../cmd_building/tests__loading_aux_cmds.py | 1 - .../tests__loading_plugin_cmds.py | 56 +---- .../tests/cmd_building/tests__opt_building.py | 200 +----------------- .../cmd_building/tests__standard_opts.py | 6 - 6 files changed, 9 insertions(+), 458 deletions(-) diff --git a/test_apps/python_no_app/tests/cmd_building/shared.py b/test_apps/python_no_app/tests/cmd_building/shared.py index 9009ecfa..ec75c123 100644 --- a/test_apps/python_no_app/tests/cmd_building/shared.py +++ b/test_apps/python_no_app/tests/cmd_building/shared.py @@ -1,159 +1,20 @@ import pytest, shutil, os -from origen.helpers.env import run_cli_cmd -from origen.helpers.regressions import cli -# from origen.helpers.regressions.cli import cmd -# from origen.helpers.regressions.cli import CLI -# from origen.helpers.regressions.cli import Cmd as CmdBase -# from origen.helpers.regressions.cli import CmdArgOpt as CmdArgOptBase -from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg - -# class Cmd(cli.cmd.Cmd): -# # def __init__(self, name, help=None, args=None, opts=None): -# # self.name = name -# # self.help = help -# # self.args = dict([[arg.name, arg] for arg in (args or [])]) -# # self.opts = dict([[opt.name, opt] for opt in (opts or [])]) -# def __init__(self, *args, **kwargs): -# cli.cmd.Cmd.__init__(self, *args, **kwargs) - -# # def get_help_msg_str(self): -# # return CLICommon.run_test_args_cmd_help(self.name) - -# # def get_help_msg(self): -# # return CLICommon.HelpMsg(self.get_help_msg_str()) - -# # def run(self, *args): -# # return CLICommon.run_test_args_cmd(self.name, *args) - -# # def gen_error(self, *args): -# # return CLICommon.run_test_args_cmd(self.name, *args, expect_fail=True)["stderr"] - -# # def __getattr__(self, name: str): -# # if hasattr(self, 'args') and (name in self.args): -# # return self.args[name] -# # elif hasattr(self, 'opts') and (name in self.opts): -# # return self.opts[name] -# # return object.__getattribute__(self, name) - -# @classmethod -# def parse_arg_keys(cls, cmd_output): -# return eval(cmd_output.split("Arg Keys: ", 1)[1].split("\n")[0]) - -# class CmdArgOpt(cli.cmd.CmdArgOpt): -# def to_assert_str(self, vals): -# if self.multi: -# c = list -# elif isinstance(vals, int): -# c = int -# else: -# c = str -# return f"Arg: {self.name} ({c}): {vals}" - -# class CmdArg(cli.cmd.CmdArg, CmdArgOpt): -# pass - -# class CmdOpt(cli.cmd.CmdOpt, CmdArgOpt): -# pass +from test_apps_shared_test_helpers.cli import CLIShared class CLICommon(CLIShared): - # cmdn__cmd_testers = "cmd_testers" - # cmdn__test_args = "test_arguments" - # cmdn__error_cases = "error_cases" - - # cmd_base = [cli.CLI.common_names.aux_cmds, cmdn__cmd_testers] - # arg_cmd_base = [*cmd_base, "test_arguments"] - # verbosity_cmd = [*cmd_base, "display_cc_verbosity"] - + # FOR_PR remove when switched to common method # Custom message from testing args/opts. no_args_or_opts_msg = "No args or opts given!" - # cmd_testers_cmd = cli.CLI.aux_sub_cmd(cmdn__cmd_testers) - - # @classmethod - # def cmd_testers_sub_cmd(cls, *args, cmd_path=None, **kwargs): - # return cls.aux_sub_cmd( - # cmd_path=[cls.cmdn__cmd_testers, *(cmd_path or [])], - # *args, - # **kwargs - # ) - - # @classmethod - # def test_args_sub_cmd(cls, *args, cmd_path=None, **kwargs): - # return cls.aux_sub_cmd( - # cmd_path=[cls.cmdn__cmd_testers, cls.cmdn__test_args, *(cmd_path or [])], - # *args, - # **kwargs - # ) - - # @classmethod - # @property - # def err_cases_cmd(cls): - # return cls.cmd_testers_sub_cmd(cls.cmdn__error_cases) - - # @classmethod - # def run_test_args_cmd(cls, cmd, *args, expect_fail=False): - # return run_cli_cmd( - # [*cls.arg_cmd_base, cmd, *args], - # expect_fail=expect_fail, - # return_details=expect_fail - # ) - - # @classmethod - # def run_test_args_cmd_help(cls, cmd): - # return run_cli_cmd([*cls.arg_cmd_base, cmd, "-h"]) - - # @classmethod - # def run_display_verbosity_cmd(cls, *args): - # return run_cli_cmd(cls.verbosity_cmd + list(args)) - - # @staticmethod - # def assert_arg(arg, sn=None, ln=None, value_name=None, help=None, short_aliases=None, long_aliases=None): - # if sn is not False: - # assert arg["short_name"] == sn - # if ln is not False: - # assert arg["long_name"] == ln - # if value_name is not False: - # if value_name is None: - # assert arg["value_name"] is None - # assert arg["multiple_values"] is None - # else: - # assert arg["value_name"] == value_name[0] - # assert arg["multiple_values"] == value_name[1] - # if help is not False: - # assert arg["help"] == help - # if short_aliases is not False: - # assert arg['short_aliases'] == short_aliases - # if long_aliases is not False: - # assert arg['long_aliases'] == long_aliases - - # @classmethod - # def assert_help_arg(cls, arg): - # return cls.assert_arg(arg, 'h', "help", None, "Print help information") - - # @classmethod - # def assert_verbose_arg(cls, arg): - # return cls.assert_arg(arg, 'v', None, None, "Terminal verbosity level e.g. -v, -vv, -vvv") - - # @classmethod - # def assert_vk_arg(cls, arg): - # return cls.assert_arg(arg, 'k', None, ("verbosity_keywords", True), "Keywords for verbose listeners") - @pytest.fixture def with_cli_aux_cmds(self): shutil.copy(self.dummy_config, self.cli_config) shutil.copy(self.cli_aux_cmds_toml, self.cli_dir) - shutil.copytree(self.cli_aux_cmds_impl, self.cli_dir.joinpath("aux_cmds_from_cli_dir"), dirs_exist_ok=True) + dest_dir = self.cli_dir.joinpath("aux_cmds_from_cli_dir") + if dest_dir.exists(): + shutil.rmtree(dest_dir) + shutil.copytree(self.cli_aux_cmds_impl, dest_dir) yield os.remove(self.cli_config) os.remove(self.cli_dir.joinpath("aux_cmds_from_cli_dir.toml")) - shutil.rmtree(self.cli_dir.joinpath("aux_cmds_from_cli_dir")) - - @classmethod - def parse_subcmd_help_dialogue(cls, msg_str): - return CLICommon.HelpMsg(msg_str) - - -# class AuxCmd(): -# ... - - + shutil.rmtree(dest_dir) diff --git a/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py b/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py index afd062b4..b5e29664 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py @@ -1,6 +1,5 @@ import pytest from .shared import CLICommon -from test_apps_shared_test_helpers.cli import CmdArg class Common(CLICommon): cmdn__no_args_or_opts = "no_args_or_opts" @@ -11,56 +10,6 @@ class Common(CLICommon): cmdn__single_and_multi_arg = "single_and_multi_arg" cmdn__args_with_value_names = "args_with_value_names" - # cmds = { - # cmdn__no_args_or_opts: CLICommon.test_args_sub_cmd( - # cmdn__no_args_or_opts, - # help="Command taking no arguments or options" - # ), - # cmdn__optional_arg: CLICommon.test_args_sub_cmd( - # cmdn__optional_arg, - # help="Command taking a single, optional argument", - # args=[CmdArg("single_val", "Single value")], - # ), - # cmdn__required_arg: CLICommon.test_args_sub_cmd( - # cmdn__required_arg, - # help="Command taking a required and optional arg", - # args=[ - # CmdArg("required_val", "Single required value", required=True), - # CmdArg("optional_val", "Single optional value") - # ], - # ), - # cmdn__multi_arg: CLICommon.test_args_sub_cmd( - # cmdn__multi_arg, - # help="Command taking a multi-arg", - # args=[ - # CmdArg("multi_arg", "Multi-arg value", True) - # ], - # ), - # cmdn__delim_multi_arg: CLICommon.test_args_sub_cmd( - # cmdn__delim_multi_arg, - # help="Command taking a delimited multi-arg", - # args=[ - # CmdArg("delim_m_arg", "Delimited Multi-arg value ('multiple' implied)", True) - # ], - # ), - # cmdn__single_and_multi_arg: CLICommon.test_args_sub_cmd( - # cmdn__single_and_multi_arg, - # help="Command taking a single and multi-arg", - # args=[ - # CmdArg("single_val", "Single value"), - # CmdArg("multi_arg", "Multi-arg value", True) - # ], - # ), - # cmdn__args_with_value_names: CLICommon.test_args_sub_cmd( - # cmdn__args_with_value_names, - # help="Single and multi arg with value custom value names", - # args=[ - # CmdArg("s_arg", "Single value arg with custom value name", value_name="Single Arg Val"), - # CmdArg("m_arg", "Multi value arg with custom value name", True, value_name="Multi Arg Val") - # ], - # ), - # } - @pytest.fixture def cmd(self): return getattr(self.cmd_testers.test_args, self.cmdn) diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py index 547895ae..dc672c97 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py @@ -1,7 +1,6 @@ import pytest, os from .shared import CLICommon from tests.test_configs import Common as ConfigCommmon -from origen.helpers.env import run_cli_cmd class T_LoadingAuxCommands(CLICommon, ConfigCommmon): # cmdn_nested_l1 = "test_nested_level_1" diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py index f1d8d09d..078370cb 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py @@ -1,5 +1,5 @@ import pytest -from .shared import CLICommon, CmdArg, CmdOpt +from .shared import CLICommon Cmd = CLICommon.Cmd class Common(CLICommon): @@ -10,60 +10,6 @@ class Common(CLICommon): pln__cmdn__hi = "plugin_says_hi" pln__cmdn__echo = "echo" - # plugin_subcmds = { - # pln: { - # pln__cmdn__hi: Cmd( - # pln__cmdn__hi, - # ["plugin", pln], - # help="Say 'hi' from the python plugin", - # opts=[ - # CmdOpt( - # name="times", - # help="Number of times for the python plugin to say", - # value_name="TIMES", - # ln="times", - # sn="t" - # ), - # CmdOpt( - # name="loudly", - # help="LOUDLY say hi", - # ln="loudly", - # sn="l" - # ), - # CmdOpt( - # name="to", - # help="Specify who should be greeted", - # multi=True, - # ) - # ] - # ), - # pln__cmdn__echo: Cmd( - # pln__cmdn__echo, - # ["plugin", pln], - # help="Echos the input", - # args=[ - # CmdArg( - # name="input", - # help="Input to echo", - # multi=True, - # ) - # ], - # opts=[ - # CmdOpt( - # name="repeat", - # help="Echo again (repeat)", - # ln="repeat", - # sn="r" - # ) - # ] - # ), - # }, - # pln_no_cmds: {}, - # pln_2nd: {}, - # } - - # pl_cmd = Cmd("plugin") - class T_LoadingPluginCmds(Common): def test_plugin_cmds_are_added(self): # TODO is ordering off here? diff --git a/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py b/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py index 89da490b..2a925eba 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py @@ -1,5 +1,5 @@ import pytest -from .shared import CLICommon, CmdOpt +from .shared import CLICommon class Common(CLICommon): # Hard-coded here to ensure it matches the TOML @@ -11,204 +11,6 @@ class Common(CLICommon): cmdn__opt_aliases = "opts_with_aliases" cmdn__hidden_opt = "hidden_opt" - # cmds = { - # cmdn__sv_opt_opt: CLICommon.test_args_sub_cmd( - # cmdn__sv_opt_opt, - # help="Command taking optional, single option", - # opts=[ - # CmdOpt( - # name="implicit_single_val", - # help='Implicit non-required single value', - # takes_value=True, - # required=False, - # ), - # CmdOpt( - # name="explicit_single_val", - # help='Explicit non-required single value', - # takes_value=True, - # required=False, - # ), - # ] - # ), - # cmdn__sv_req_opt: CLICommon.test_args_sub_cmd( - # cmdn__sv_req_opt, - # help="Command with single-value optional and required options", - # opts=[ - # CmdOpt( - # name="non_req_val", - # help="Non-required single value", - # takes_value=True, - # ), - # CmdOpt( - # name="req_val", - # help="Required single value", - # takes_value=True, - # required=True, - # ), - # ] - # ), - # cmdn__multi_opt: CLICommon.test_args_sub_cmd( - # cmdn__multi_opt, - # help="Command with multi-value optional and required options", - # opts=[ - # CmdOpt( - # name="m_opt", - # help="Opt with multiple values", - # multi=True, - # ), - # CmdOpt( - # name="im_m_opt", - # help="Opt accepting multiple values were 'takes value' is implied", - # multi=True, - # ), - # CmdOpt( - # name="req_m_opt", - # help="Required opt accepting multiple values", - # multi=True, - # required=True, - # ), - # CmdOpt( - # name="d_m_opt", - # help="Delimited multi opt", - # multi=True, - # ), - # CmdOpt( - # name="d_im_m_opt", - # help="Delimited opt where 'multi' and 'takes value' is implied", - # multi=True, - # ), - # ] - # ), - # cmdn__flag_opts: CLICommon.test_args_sub_cmd( - # cmdn__flag_opts, - # help="Command with flag-style options only", - # opts=[ - # CmdOpt( - # name="im_f_opt", - # help="Stackable flag opt with 'takes value=false' implied", - # ), - # CmdOpt( - # name="ex_f_opt", - # help="Stackable flag opt with 'takes value=false' set", - # ), - # ] - # ), - # cmdn__opt_vns: CLICommon.test_args_sub_cmd( - # cmdn__opt_vns, - # help="Command with single/multi-opts with custom value names", - # opts=[ - # CmdOpt( - # name="s_opt_nv_im_tv", - # help="Single opt with value name, implying 'takes_value'=true", - # value_name="s_val_impl", - # ), - # CmdOpt( - # name="s_opt_nv_ex_tv", - # help="Single opt with value name and explicit 'takes_value'=true", - # value_name="s_val_expl", - # takes_value=True, - # ), - # CmdOpt( - # name="m_opt_named_val", - # help="Multi-opt with value name", - # value_name="m_val", - # multi=True, - # ), - # CmdOpt( - # name="s_opt_ln_nv", - # help="Single opt with long name and value name", - # value_name="ln_nv", - # ), - # ] - # ), - # cmdn__opt_aliases: CLICommon.test_args_sub_cmd( - # cmdn__opt_aliases, - # help="Command with option aliasing, custom long, and short names", - # opts=[ - # CmdOpt( - # name="single_opt", - # help="Single opt with long/short name", - # takes_value=True, - # ln="s_opt", - # sn="s" - # ), - # CmdOpt( - # name="multi_opt", - # help="Multi-opt with long/short name", - # takes_value=True, - # multi=True, - # ln="m_opt", - # sn="m" - # ), - # CmdOpt( - # name="occurrence_counter", - # help="Flag opt with long/short name", - # ln="cnt", - # sn="o", - # ), - # CmdOpt( - # name="flag_opt_short_name", - # help="Flag opt with short name only", - # sn="f" - # ), - # CmdOpt( - # name="flag_opt_long_name", - # help="Flag opt with long name only", - # ln="ln_f_opt" - # ), - # CmdOpt( - # name="flag_opt_dupl_ln_sn", - # help="Flag opt with ln matching another's sn", - # ln="f" - # ), - # CmdOpt( - # name="fo_sn_aliases", - # help="Flag opt with short aliases", - # sn_aliases=['a', 'b'] - # ), - # CmdOpt( - # name="fo_sn_and_aliases", - # help="Flag opt with short name and short aliases", - # sn="c", - # sn_aliases=['d', 'e'] - # ), - # CmdOpt( - # name="fo_ln_aliases", - # help="Flag opt with long aliases", - # ln_aliases=['fa', 'fb'] - # ), - # CmdOpt( - # name="fo_ln_and_aliases", - # help="Flag opt with long name and long aliases", - # ln="fc", - # ln_aliases=['fd', 'fe'] - # ), - # CmdOpt( - # name="fo_sn_ln_aliases", - # help="Flag opt with long and short aliases", - # ln_aliases=['sn_ln_1', 'sn_ln_2'], - # sn_aliases=['z'], - # ), - # ] - # ), - # cmdn__hidden_opt: CLICommon.test_args_sub_cmd( - # cmdn__hidden_opt, - # help="Command with a hidden opt", - # opts=[ - # CmdOpt( - # name="hidden_opt", - # help="Hidden opt", - # hidden=True, - # ), - # CmdOpt( - # # name="non_hidden_opt", - # name="visible_opt", - # help="Visible, non-hidden, opt", - # ), - # ] - # ), - # } - # TODO consolidate this with arg building. or remove @pytest.fixture def cmd(self): diff --git a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py index 5ac8fdc3..340f469c 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py @@ -1,12 +1,6 @@ from .shared import CLICommon class T_StandardOpts(CLICommon): - # cmdn__display_verbosity = "display_verbosity_opts" - # cmd__display_verbosity = CLICommon.test_args_sub_cmd( - # cmdn__display_verbosity, - # help="Displays the verbosity and keywords from the current command" - # ) - def test_empty_verbosity_is_accessible(self): out = self.cmd_testers.display_v.run() assert r'Args: {}' in out From 2d25f5e8cd11be4be2f0e9ed1cd0ebfb2061f02a Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 30 Dec 2022 21:31:33 -0600 Subject: [PATCH 012/200] Add user setting to disable password prompt. Add some simple tests. Move home_dir tests to separate file. Restore clear credentials CLI test --- .../tests/framework/users/shared.py | 6 + .../tests/framework/users/test_users.py | 457 +----------------- .../tests/framework/users/tests__home_dir.py | 440 +++++++++++++++++ rust/origen_metal/src/framework/users/user.rs | 19 + rust/pyapi_metal/src/framework/users.rs | 21 + test_apps/python_no_app/pyproject.toml | 1 + .../tests/cli/tests__cmd__credentials.py | 7 +- 7 files changed, 516 insertions(+), 435 deletions(-) create mode 100644 python/origen_metal/tests/framework/users/tests__home_dir.py diff --git a/python/origen_metal/tests/framework/users/shared.py b/python/origen_metal/tests/framework/users/shared.py index 6e0f45a2..a14976af 100644 --- a/python/origen_metal/tests/framework/users/shared.py +++ b/python/origen_metal/tests/framework/users/shared.py @@ -100,6 +100,12 @@ def user(self, id=None): def to_user_id(self, id): return f"{self.user_id_root}_{id}" + @pytest.fixture + def cu(self, users, u): + if users.current_user is None: + users.current_user = u + return users.current_user + @property def users_class(self): return om._origen_metal.framework.users.Users diff --git a/python/origen_metal/tests/framework/users/test_users.py b/python/origen_metal/tests/framework/users/test_users.py index 028574f3..1929f2b4 100644 --- a/python/origen_metal/tests/framework/users/test_users.py +++ b/python/origen_metal/tests/framework/users/test_users.py @@ -1,22 +1,16 @@ -from typing import Dict -import pytest, pathlib -from pathlib import Path +import pytest import origen_metal as om from .shared import Base -from origen_metal._helpers import in_new_proc - from .tests__users_basics import T_Users from .tests__initial_and_current_user import T_InitialAndCurrentUser from .tests__datasets import T_Datasets from .tests__user_motives import T_UserMotives from .tests__populating import T_PopulatingUsers -from .tests__datasets import Base as DSBase from .tests__user_sessions import T_UserSessions from .tests__validating_passwords import T_ValidatingPasswords from .tests__user_roles import T_UserRoles - -from .in_new_proc_funcs import try_home_dir +from .tests__home_dir import T_UserHomeDirectory class TestUsers(T_Users): pass @@ -61,435 +55,34 @@ class TestValidatingPasswords(T_ValidatingPasswords): class TestUserRoles(T_UserRoles): pass -class TestUserHomeDirectory(DSBase): - @pytest.fixture - def hd(self): - return Path("test/home/dir") - - @pytest.fixture - def hd1(self, hd): - return hd.joinpath("1") - - @pytest.fixture - def hd2(self, hd): - return hd.joinpath("2") - - @pytest.fixture - def hd3(self, hd): - return hd.joinpath("3") - - @property - def logged_in_user_home_dir(self): - return pathlib.Path.home() - - @property - def routed_user(self): - if not hasattr(self, "_routed_user"): - self._routed_user = False - return self._routed_user +class TestUserHomeDirectory(T_UserHomeDirectory): + pass +class TestDisablingPasswordPrompt(Base): @property - def routed_dataset(self): - if not hasattr(self, "_routed_dataset"): - self._routed_dataset = False - return self._routed_dataset - - callback_home_dir = Path("/callback_home/") - - def lookup_home_dir_function(self, user, dataset, is_current): - if user.id == "return_str": - return str(self.callback_home_dir.joinpath("str/u_str")) - elif user.id == "return_error": - raise RuntimeError("Encountered user 'return_error'!") - elif user.id == "return_none": - return None - elif user.id == self.logged_in_id: - if dataset is None: - self._routed_user = True - else: - self._routed_dataset = True - return False - elif user.id == "return_true": - return True - else: - hd = self.callback_home_dir.joinpath(user.id) - if dataset is None: - return hd - else: - return hd.joinpath(f"dataset/{dataset.dataset_name}") - - def test_home_dir_starts_as_none(self, unload_users, u, ddk): - assert u.home_dir is None - assert u.datasets[ddk].home_dir is None - - def test_home_dir_can_be_set(self, u, d, hd): - u.home_dir = hd - assert u.home_dir == hd - assert d.home_dir == hd - - hd_str = "home/dir/str" - u.home_dir = hd_str - assert u.home_dir == Path(hd_str) - assert d.home_dir == Path(hd_str) - - def test_home_dir_can_be_set_and_retrieved_per_dataset( - self, unload_users, u, d, d2, hd, hd2, hd3): - assert u.home_dir is None - assert d.home_dir is None - assert d2.home_dir is None - - u.home_dir = hd - assert u.home_dir == hd - assert d.home_dir == hd - assert d2.home_dir is None - - d2.home_dir = hd2 - assert u.home_dir == hd - assert d.home_dir == hd - assert d2.home_dir == hd2 - - d.home_dir = hd3 - assert u.home_dir == hd3 - assert d.home_dir == hd3 - assert d2.home_dir == hd2 - - hd_str = "home/dir/str" - d.home_dir = hd_str - assert u.home_dir == Path(hd_str) - assert d.home_dir == Path(hd_str) - assert d2.home_dir == hd2 - - def test_set_method(self, unload_users, u, d, d2, ddk, d2_name, hd, hd2, hd3): - assert u.home_dir is None - assert d.home_dir is None - assert d2.home_dir is None - - u.set_home_dir(hd) - assert u.home_dir == hd - assert d.home_dir == hd - assert d2.home_dir is None - - d2.set_home_dir(hd2) - assert u.home_dir == hd - assert d.home_dir == hd - assert d2.home_dir == hd2 - - d.set_home_dir(hd3) - assert u.home_dir == hd3 - assert d.home_dir == hd3 - assert d2.home_dir == hd2 - - hd_str = "home/dir/str" - d.set_home_dir(hd_str) - assert u.home_dir == Path(hd_str) - assert d.home_dir == Path(hd_str) - assert d2.home_dir == hd2 - - def test_home_dir_obeys_hierarchy(self, unload_users, u, d, d2, ddk, - d2_name, hd1, hd2): - assert u.data_lookup_hierarchy == [ddk, d2_name] - assert u.home_dir is None - - d.home_dir = hd1 - d2.home_dir = hd2 - - assert u.home_dir == hd1 - - u.data_lookup_hierarchy = [d2_name, ddk] - assert u.home_dir == hd2 - - u.data_lookup_hierarchy = [] - with pytest.raises( - RuntimeError, - match= - "Dataset hierarchy is empty! Data lookups must explicitly name the dataset to query" - ): - u.home_dir - - def test_home_dir_iterates_through_hierarchy(self, unload_users, u, d, d2, - ddk, d2_name, hd1, hd2): - assert u.data_lookup_hierarchy == [ddk, d2_name] - assert u.home_dir is None - - d.home_dir is None - d2.home_dir = hd2 - assert u.home_dir == hd2 - - d.home_dir = hd1 - assert u.home_dir == hd1 - - def test_clearing_home_dir(self, unload_users, u, d, d2, hd, hd2, hd3): - # Add a 3rd dataset outside of the data lookup hierarchy - # TODO add option to not add to data lookup hierarchy? - old_hierarchy = u.data_lookup_hierarchy - d3 = u.add_dataset("ds3") - d3.home_dir = hd3 - u.data_lookup_hierarchy = old_hierarchy - - d.set_home_dir(hd) - d2.set_home_dir(hd2) - assert u.home_dir == hd - assert d.home_dir == hd - assert d2.home_dir == hd2 - - # Clears all home directories in the hierarchy - # d3 (not in hierarchy) should remain - u.clear_home_dir() - assert u.home_dir is None - assert d.home_dir is None - assert d2.home_dir is None - assert d3.home_dir == hd3 - - d.set_home_dir(hd) - d2.set_home_dir(hd2) - assert u.home_dir == hd - assert d.home_dir == hd - assert d2.home_dir == hd2 - assert d3.home_dir == hd3 - - # Clear a specific home dir - d.clear_home_dir() - assert u.home_dir == hd2 - assert d.home_dir is None - assert d2.home_dir == hd2 - assert d3.home_dir == hd3 - - # Use setter method to clear - u.home_dir = None - assert u.home_dir is None - assert d.home_dir is None - assert d2.home_dir is None - assert d3.home_dir == hd3 - - d3.home_dir = None - assert d3.home_dir is None - - def test_requiring_a_home_dir_is_set(self, unload_users, u, hd1): - assert u.home_dir is None - with pytest.raises( - RuntimeError, - match= - f"Required a home directory for user '{u.id}' but none has been set" - ): - u.require_home_dir - - u.home_dir = hd1 - assert u.require_home_dir == hd1 - - def test_requiring_a_home_dir_is_set_per_dataset(self, unload_users, u, d, - d2, ddk, hd1, hd2): - assert u.home_dir is None - d2.home_dir = hd2 - assert u.home_dir == hd2 - - with pytest.raises( - RuntimeError, - match= - f"Required a home directory for user '{u.id}' and dataset '{ddk}', but none has been set" - ): - d.require_home_dir - - d.home_dir = hd1 - assert d.require_home_dir == hd1 - - def test_looking_up_home_dir(self, unload_users, users, ddk): - u = users.add(self.logged_in_id) - assert u.home_dir is None - assert u.datasets[ddk].home_dir is None - - u.set_home_dir() - hd = self.logged_in_user_home_dir - assert u.home_dir == hd - assert u.datasets[ddk].home_dir == hd - - def test_looking_up_home_dir_from_callback(self, fresh_frontend, unload_users, users, u): - assert users.lookup_home_dir_function is None - users.lookup_home_dir_function = self.lookup_home_dir_function - assert users.lookup_home_dir_function == users.lookup_home_dir_function - - assert u.home_dir is None - u.set_home_dir() - assert u.home_dir == self.callback_home_dir.joinpath(u.id) - - u_str = users.add("return_str") - assert u_str.home_dir is None - u_str.set_home_dir() - assert u_str.home_dir == self.callback_home_dir.joinpath("str/u_str") - - def test_looking_up_home_dir_for_dataset(self, fresh_frontend, unload_users, users, ddk, hd): - u = users.add(self.logged_in_id) - d = u.datasets[ddk] - d2 = u.add_dataset("ds2", as_topmost=False) - assert u.home_dir is None - assert d.home_dir is None - - u.home_dir = hd - assert u.home_dir == hd - assert d.home_dir == hd - assert d2.home_dir is None - - d2.set_home_dir() - assert u.home_dir == hd - assert d2.home_dir == self.logged_in_user_home_dir - - def test_looking_up_home_dir_for_dataset_from_callback(self, fresh_frontend, users, unload_users, u, d, d2): - users.lookup_home_dir_function = self.lookup_home_dir_function - assert d.home_dir is None - assert d2.home_dir is None - - d.set_home_dir() - assert d.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d.dataset_name}") - assert d2.home_dir is None - - d2.set_home_dir() - assert d.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d.dataset_name}") - assert d2.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d2.dataset_name}") - - def test_lookup_home_dir_with_none_argument(self, fresh_frontend, users, unload_users, u, d, d2): - users.lookup_home_dir_function = self.lookup_home_dir_function - assert u.home_dir is None - assert d.home_dir is None - assert d2.home_dir is None - - u.set_home_dir(None) - assert u.home_dir == self.callback_home_dir.joinpath(u.id) - assert d.home_dir == self.callback_home_dir.joinpath(u.id) - assert d2.home_dir is None - - d2.set_home_dir(None) - assert d2.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d2.dataset_name}") - - def test_error_in_callback(self, fresh_frontend, unload_users, users, hd, hd2, hd3): - users.lookup_home_dir_function = self.lookup_home_dir_function - u = users.add("return_error") - d2 = u.add_dataset("ds2", as_topmost=False) - - err = "Encountered Exception 'RuntimeError' with message: Encountered user 'return_error'!" - - assert u.home_dir is None - with pytest.raises(RuntimeError, match=err): - u.set_home_dir() - assert u.home_dir is None - - u.home_dir = hd - with pytest.raises(RuntimeError, match=err): - u.set_home_dir() - assert u.home_dir == hd - - assert d2.home_dir is None - with pytest.raises(RuntimeError, match=err): - d2.set_home_dir() - assert d2.home_dir is None - - d2.home_dir = hd3 - with pytest.raises(RuntimeError, match=err): - d2.set_home_dir() - assert d2.home_dir == hd3 - - def test_callback_falls_back_to_default(self, fresh_frontend, unload_users, users): - assert self.routed_user is False - users.lookup_home_dir_function = self.lookup_home_dir_function - u = users.add(self.logged_in_id) - d = u.add_dataset("ds") - d2 = u.add_dataset("ds2", as_topmost=False) - assert u.home_dir is None - - u.set_home_dir() - assert u.home_dir == self.logged_in_user_home_dir - assert self.routed_user is True - - assert d2.home_dir is None - assert self.routed_dataset is False - d2.set_home_dir() - assert u.home_dir == self.logged_in_user_home_dir - assert self.routed_dataset is True - - def test_callback_returns_none(self, fresh_frontend, unload_users, users, hd, hd2): - users.lookup_home_dir_function = self.lookup_home_dir_function - u = users.add("return_none") - d = u.add_dataset("ds") - d2 = u.add_dataset("ds2", as_topmost=False) - - assert u.home_dir is None - u.set_home_dir() - assert u.home_dir is None - - u.home_dir = hd - assert u.home_dir == hd - u.set_home_dir() - assert u.home_dir is None - - u.home_dir = hd - assert d2.home_dir is None - d2.set_home_dir() - assert d2.home_dir is None - assert u.home_dir == hd - - d2.home_dir = hd2 - assert d2.home_dir == hd2 - d2.set_home_dir() - assert d2.home_dir is None - assert u.home_dir == hd - - def test_callback_returns_true(self, fresh_frontend, unload_users, users, hd, hd2): - users.lookup_home_dir_function = self.lookup_home_dir_function - u = users.add("return_true") - d = u.add_dataset("ds") - err = "'True' is not a valid return value when looking up a user's home directory" - - u.home_dir = hd - with pytest.raises(RuntimeError, match=err): - u.set_home_dir() - assert u.home_dir == hd - - d.home_dir = hd2 - with pytest.raises(RuntimeError, match=err): - d.set_home_dir() - assert u.home_dir == hd2 - - def test_inappropriate_home_dir_for_user(self, fresh_frontend, unload_users, users, u, hd): - assert u.home_dir is None - err = f"Home directory '.*' is not appropriate for current user with id '{u.id}'" + def prompt_error_msg(self): + return f"Cannot prompt for passwords for user '{self.get_users.current_user.id}'. Passwords must be loaded by the config or set directly." - with pytest.raises(RuntimeError, match=err): - u.set_home_dir() - assert u.home_dir is None - u.home_dir = hd + def test_password_prompt_enabled_by_default(self, fresh_frontend, unload_users, cu): + assert cu.prompt_for_passwords == True + assert cu.__prompt_for_passwords__ == None - d = u.add_dataset("ds") - with pytest.raises(RuntimeError, match=err): - d.set_home_dir() - assert d.home_dir is None - assert u.home_dir == hd + def test_setting_password_prompt(self, cu): + assert cu.prompt_for_passwords == True + assert cu.__prompt_for_passwords__ == None - def test_error_when_env_is_not_set(self, fresh_frontend, unload_users, users, capfd): - in_new_proc(func=try_home_dir, expect_fail=True) - if om.running_on_windows: - env = "USERPROFILE" - else: - env = "HOME" - assert f"RuntimeError: Please set environment variable {env} to point to your home directory, then try again" in capfd.readouterr().err - - # TEST_NEEDED - @pytest.mark.skip - def test_om_home_dir(self): - raise NotImplementedError() - assert om.home_dir == hd - assert om.home_dir == hd1 - assert om.home_dir == hd2 + cu.prompt_for_passwords = True + assert cu.prompt_for_passwords == True + assert cu.__prompt_for_passwords__ == True - # TEST_NEEDED - @pytest.mark.skip - def test_error_on_om_home_dir_with_no_current_user(self): - raise NotImplementedError() + def test_disabling_password_prmopt(self, cu): + cu.prompt_for_passwords = False + assert cu.prompt_for_passwords == False + assert cu.__prompt_for_passwords__ == False - # TEST_NEEDED - # TODO move elsewhere? - @pytest.mark.skip - def test_origen_dot_dir(self): - raise NotImplementedError() + with pytest.raises(RuntimeError, match=self.prompt_error_msg): + cu.password - # TEST_NEEDED - @pytest.mark.skip - def test_setting_home_dir_from_frontend(self): - raise NotImplementedError() + cu.add_dataset("test") + with pytest.raises(RuntimeError, match=self.prompt_error_msg): + cu.datasets['test'].password diff --git a/python/origen_metal/tests/framework/users/tests__home_dir.py b/python/origen_metal/tests/framework/users/tests__home_dir.py new file mode 100644 index 00000000..f9416e32 --- /dev/null +++ b/python/origen_metal/tests/framework/users/tests__home_dir.py @@ -0,0 +1,440 @@ +import pytest, pathlib +from pathlib import Path +import origen_metal as om +from origen_metal._helpers import in_new_proc +from .in_new_proc_funcs import try_home_dir + +from .tests__datasets import Base as DSBase + +class T_UserHomeDirectory(DSBase): + @pytest.fixture + def hd(self): + return Path("test/home/dir") + + @pytest.fixture + def hd1(self, hd): + return hd.joinpath("1") + + @pytest.fixture + def hd2(self, hd): + return hd.joinpath("2") + + @pytest.fixture + def hd3(self, hd): + return hd.joinpath("3") + + @property + def logged_in_user_home_dir(self): + return pathlib.Path.home() + + @property + def routed_user(self): + if not hasattr(self, "_routed_user"): + self._routed_user = False + return self._routed_user + + @property + def routed_dataset(self): + if not hasattr(self, "_routed_dataset"): + self._routed_dataset = False + return self._routed_dataset + + callback_home_dir = Path("/callback_home/") + + def lookup_home_dir_function(self, user, dataset, is_current): + if user.id == "return_str": + return str(self.callback_home_dir.joinpath("str/u_str")) + elif user.id == "return_error": + raise RuntimeError("Encountered user 'return_error'!") + elif user.id == "return_none": + return None + elif user.id == self.logged_in_id: + if dataset is None: + self._routed_user = True + else: + self._routed_dataset = True + return False + elif user.id == "return_true": + return True + else: + hd = self.callback_home_dir.joinpath(user.id) + if dataset is None: + return hd + else: + return hd.joinpath(f"dataset/{dataset.dataset_name}") + + def test_home_dir_starts_as_none(self, unload_users, u, ddk): + assert u.home_dir is None + assert u.datasets[ddk].home_dir is None + + def test_home_dir_can_be_set(self, u, d, hd): + u.home_dir = hd + assert u.home_dir == hd + assert d.home_dir == hd + + hd_str = "home/dir/str" + u.home_dir = hd_str + assert u.home_dir == Path(hd_str) + assert d.home_dir == Path(hd_str) + + def test_home_dir_can_be_set_and_retrieved_per_dataset( + self, unload_users, u, d, d2, hd, hd2, hd3): + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + + u.home_dir = hd + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir is None + + d2.home_dir = hd2 + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir == hd2 + + d.home_dir = hd3 + assert u.home_dir == hd3 + assert d.home_dir == hd3 + assert d2.home_dir == hd2 + + hd_str = "home/dir/str" + d.home_dir = hd_str + assert u.home_dir == Path(hd_str) + assert d.home_dir == Path(hd_str) + assert d2.home_dir == hd2 + + def test_set_method(self, unload_users, u, d, d2, ddk, d2_name, hd, hd2, hd3): + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + + u.set_home_dir(hd) + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir is None + + d2.set_home_dir(hd2) + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir == hd2 + + d.set_home_dir(hd3) + assert u.home_dir == hd3 + assert d.home_dir == hd3 + assert d2.home_dir == hd2 + + hd_str = "home/dir/str" + d.set_home_dir(hd_str) + assert u.home_dir == Path(hd_str) + assert d.home_dir == Path(hd_str) + assert d2.home_dir == hd2 + + def test_home_dir_obeys_hierarchy(self, unload_users, u, d, d2, ddk, + d2_name, hd1, hd2): + assert u.data_lookup_hierarchy == [ddk, d2_name] + assert u.home_dir is None + + d.home_dir = hd1 + d2.home_dir = hd2 + + assert u.home_dir == hd1 + + u.data_lookup_hierarchy = [d2_name, ddk] + assert u.home_dir == hd2 + + u.data_lookup_hierarchy = [] + with pytest.raises( + RuntimeError, + match= + "Dataset hierarchy is empty! Data lookups must explicitly name the dataset to query" + ): + u.home_dir + + def test_home_dir_iterates_through_hierarchy(self, unload_users, u, d, d2, + ddk, d2_name, hd1, hd2): + assert u.data_lookup_hierarchy == [ddk, d2_name] + assert u.home_dir is None + + d.home_dir is None + d2.home_dir = hd2 + assert u.home_dir == hd2 + + d.home_dir = hd1 + assert u.home_dir == hd1 + + def test_clearing_home_dir(self, unload_users, u, d, d2, hd, hd2, hd3): + # Add a 3rd dataset outside of the data lookup hierarchy + # TODO add option to not add to data lookup hierarchy? + old_hierarchy = u.data_lookup_hierarchy + d3 = u.add_dataset("ds3") + d3.home_dir = hd3 + u.data_lookup_hierarchy = old_hierarchy + + d.set_home_dir(hd) + d2.set_home_dir(hd2) + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir == hd2 + + # Clears all home directories in the hierarchy + # d3 (not in hierarchy) should remain + u.clear_home_dir() + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + assert d3.home_dir == hd3 + + d.set_home_dir(hd) + d2.set_home_dir(hd2) + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir == hd2 + assert d3.home_dir == hd3 + + # Clear a specific home dir + d.clear_home_dir() + assert u.home_dir == hd2 + assert d.home_dir is None + assert d2.home_dir == hd2 + assert d3.home_dir == hd3 + + # Use setter method to clear + u.home_dir = None + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + assert d3.home_dir == hd3 + + d3.home_dir = None + assert d3.home_dir is None + + def test_requiring_a_home_dir_is_set(self, unload_users, u, hd1): + assert u.home_dir is None + with pytest.raises( + RuntimeError, + match= + f"Required a home directory for user '{u.id}' but none has been set" + ): + u.require_home_dir + + u.home_dir = hd1 + assert u.require_home_dir == hd1 + + def test_requiring_a_home_dir_is_set_per_dataset(self, unload_users, u, d, + d2, ddk, hd1, hd2): + assert u.home_dir is None + d2.home_dir = hd2 + assert u.home_dir == hd2 + + with pytest.raises( + RuntimeError, + match= + f"Required a home directory for user '{u.id}' and dataset '{ddk}', but none has been set" + ): + d.require_home_dir + + d.home_dir = hd1 + assert d.require_home_dir == hd1 + + def test_looking_up_home_dir(self, unload_users, users, ddk): + u = users.add(self.logged_in_id) + assert u.home_dir is None + assert u.datasets[ddk].home_dir is None + + u.set_home_dir() + hd = self.logged_in_user_home_dir + assert u.home_dir == hd + assert u.datasets[ddk].home_dir == hd + + def test_looking_up_home_dir_from_callback(self, fresh_frontend, unload_users, users, u): + assert users.lookup_home_dir_function is None + users.lookup_home_dir_function = self.lookup_home_dir_function + assert users.lookup_home_dir_function == users.lookup_home_dir_function + + assert u.home_dir is None + u.set_home_dir() + assert u.home_dir == self.callback_home_dir.joinpath(u.id) + + u_str = users.add("return_str") + assert u_str.home_dir is None + u_str.set_home_dir() + assert u_str.home_dir == self.callback_home_dir.joinpath("str/u_str") + + def test_looking_up_home_dir_for_dataset(self, fresh_frontend, unload_users, users, ddk, hd): + u = users.add(self.logged_in_id) + d = u.datasets[ddk] + d2 = u.add_dataset("ds2", as_topmost=False) + assert u.home_dir is None + assert d.home_dir is None + + u.home_dir = hd + assert u.home_dir == hd + assert d.home_dir == hd + assert d2.home_dir is None + + d2.set_home_dir() + assert u.home_dir == hd + assert d2.home_dir == self.logged_in_user_home_dir + + def test_looking_up_home_dir_for_dataset_from_callback(self, fresh_frontend, users, unload_users, u, d, d2): + users.lookup_home_dir_function = self.lookup_home_dir_function + assert d.home_dir is None + assert d2.home_dir is None + + d.set_home_dir() + assert d.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d.dataset_name}") + assert d2.home_dir is None + + d2.set_home_dir() + assert d.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d.dataset_name}") + assert d2.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d2.dataset_name}") + + def test_lookup_home_dir_with_none_argument(self, fresh_frontend, users, unload_users, u, d, d2): + users.lookup_home_dir_function = self.lookup_home_dir_function + assert u.home_dir is None + assert d.home_dir is None + assert d2.home_dir is None + + u.set_home_dir(None) + assert u.home_dir == self.callback_home_dir.joinpath(u.id) + assert d.home_dir == self.callback_home_dir.joinpath(u.id) + assert d2.home_dir is None + + d2.set_home_dir(None) + assert d2.home_dir == self.callback_home_dir.joinpath(f"{u.id}/dataset/{d2.dataset_name}") + + def test_error_in_callback(self, fresh_frontend, unload_users, users, hd, hd2, hd3): + users.lookup_home_dir_function = self.lookup_home_dir_function + u = users.add("return_error") + d2 = u.add_dataset("ds2", as_topmost=False) + + err = "Encountered Exception 'RuntimeError' with message: Encountered user 'return_error'!" + + assert u.home_dir is None + with pytest.raises(RuntimeError, match=err): + u.set_home_dir() + assert u.home_dir is None + + u.home_dir = hd + with pytest.raises(RuntimeError, match=err): + u.set_home_dir() + assert u.home_dir == hd + + assert d2.home_dir is None + with pytest.raises(RuntimeError, match=err): + d2.set_home_dir() + assert d2.home_dir is None + + d2.home_dir = hd3 + with pytest.raises(RuntimeError, match=err): + d2.set_home_dir() + assert d2.home_dir == hd3 + + def test_callback_falls_back_to_default(self, fresh_frontend, unload_users, users): + assert self.routed_user is False + users.lookup_home_dir_function = self.lookup_home_dir_function + u = users.add(self.logged_in_id) + d = u.add_dataset("ds") + d2 = u.add_dataset("ds2", as_topmost=False) + assert u.home_dir is None + + u.set_home_dir() + assert u.home_dir == self.logged_in_user_home_dir + assert self.routed_user is True + + assert d2.home_dir is None + assert self.routed_dataset is False + d2.set_home_dir() + assert u.home_dir == self.logged_in_user_home_dir + assert self.routed_dataset is True + + def test_callback_returns_none(self, fresh_frontend, unload_users, users, hd, hd2): + users.lookup_home_dir_function = self.lookup_home_dir_function + u = users.add("return_none") + d = u.add_dataset("ds") + d2 = u.add_dataset("ds2", as_topmost=False) + + assert u.home_dir is None + u.set_home_dir() + assert u.home_dir is None + + u.home_dir = hd + assert u.home_dir == hd + u.set_home_dir() + assert u.home_dir is None + + u.home_dir = hd + assert d2.home_dir is None + d2.set_home_dir() + assert d2.home_dir is None + assert u.home_dir == hd + + d2.home_dir = hd2 + assert d2.home_dir == hd2 + d2.set_home_dir() + assert d2.home_dir is None + assert u.home_dir == hd + + def test_callback_returns_true(self, fresh_frontend, unload_users, users, hd, hd2): + users.lookup_home_dir_function = self.lookup_home_dir_function + u = users.add("return_true") + d = u.add_dataset("ds") + err = "'True' is not a valid return value when looking up a user's home directory" + + u.home_dir = hd + with pytest.raises(RuntimeError, match=err): + u.set_home_dir() + assert u.home_dir == hd + + d.home_dir = hd2 + with pytest.raises(RuntimeError, match=err): + d.set_home_dir() + assert u.home_dir == hd2 + + def test_inappropriate_home_dir_for_user(self, fresh_frontend, unload_users, users, u, hd): + assert u.home_dir is None + err = f"Home directory '.*' is not appropriate for current user with id '{u.id}'" + + with pytest.raises(RuntimeError, match=err): + u.set_home_dir() + assert u.home_dir is None + u.home_dir = hd + + d = u.add_dataset("ds") + with pytest.raises(RuntimeError, match=err): + d.set_home_dir() + assert d.home_dir is None + assert u.home_dir == hd + + def test_error_when_env_is_not_set(self, fresh_frontend, unload_users, users, capfd): + in_new_proc(func=try_home_dir, expect_fail=True) + if om.running_on_windows: + env = "USERPROFILE" + else: + env = "HOME" + assert f"RuntimeError: Please set environment variable {env} to point to your home directory, then try again" in capfd.readouterr().err + + # TEST_NEEDED + @pytest.mark.skip + def test_om_home_dir(self): + raise NotImplementedError() + assert om.home_dir == hd + assert om.home_dir == hd1 + assert om.home_dir == hd2 + + # TEST_NEEDED + @pytest.mark.skip + def test_error_on_om_home_dir_with_no_current_user(self): + raise NotImplementedError() + + # TEST_NEEDED + # TODO move elsewhere? + @pytest.mark.skip + def test_origen_dot_dir(self): + raise NotImplementedError() + + # TEST_NEEDED + @pytest.mark.skip + def test_setting_home_dir_from_frontend(self): + raise NotImplementedError() diff --git a/rust/origen_metal/src/framework/users/user.rs b/rust/origen_metal/src/framework/users/user.rs index 94cd3514..41639b2a 100644 --- a/rust/origen_metal/src/framework/users/user.rs +++ b/rust/origen_metal/src/framework/users/user.rs @@ -447,6 +447,7 @@ pub struct User { // User-level overrides for dataset configuration auto_populate: Option, should_validate_passwords: Option, + prompt_for_passwords: Option, } impl User { @@ -611,6 +612,9 @@ impl User { roles: RwLock::new(HashSet::new()), auto_populate: auto_populate, should_validate_passwords: users.default_should_validate_passwords().to_owned(), + + // TODO add a users option to inherit from? + prompt_for_passwords: None, }; for (ds, config) in users.default_datasets().iter() { @@ -820,6 +824,9 @@ impl User { } pub fn _password_dialog(&self, dataset: &str, motive: Option<&str>) -> Result { + if !self.prompt_for_passwords() { + bail!("Cannot prompt for passwords for user '{}'. Passwords must be loaded by the config or set directly.", &self.id); + } // TODO add attempts back in // for _attempt in 0..ORIGEN_CONFIG.user__password_auth_attempts { let msg; @@ -975,6 +982,18 @@ impl User { self.should_validate_passwords = new; } + pub fn prompt_for_passwords(&self) -> bool { + self.prompt_for_passwords.unwrap_or(true) + } + + pub fn prompt_for_passwords_value(&self) -> &Option { + &self.prompt_for_passwords + } + + pub fn set_prompt_for_passwords(&mut self, new: Option) -> () { + self.prompt_for_passwords = new; + } + pub fn password( &self, motive_or_dataset: Option<&str>, diff --git a/rust/pyapi_metal/src/framework/users.rs b/rust/pyapi_metal/src/framework/users.rs index 9fb748a7..fbdf175f 100644 --- a/rust/pyapi_metal/src/framework/users.rs +++ b/rust/pyapi_metal/src/framework/users.rs @@ -1556,6 +1556,27 @@ impl User { })?) } + #[getter] + pub fn prompt_for_passwords(&self) -> PyResult { + Ok(om::with_user(&self.user_id, |u| { + Ok(u.prompt_for_passwords()) + })?) + } + + #[setter] + pub fn set_prompt_for_passwords(&self, prompt_for_passwords: Option) -> PyResult<()> { + Ok(om::with_user_mut(&self.user_id, |u| { + Ok(u.set_prompt_for_passwords(prompt_for_passwords)) + })?) + } + + #[getter] + pub fn __prompt_for_passwords__(&self) -> PyResult> { + Ok(om::with_user(&self.user_id, |u| { + Ok(*u.prompt_for_passwords_value()) + })?) + } + // TODO? // #[getter] // fn authenticated(&self) -> PyResult { diff --git a/test_apps/python_no_app/pyproject.toml b/test_apps/python_no_app/pyproject.toml index b4a28a96..75433ed1 100644 --- a/test_apps/python_no_app/pyproject.toml +++ b/test_apps/python_no_app/pyproject.toml @@ -1,3 +1,4 @@ +# FOR_PR clean up all no-app tests [tool.poetry] name = "python_no_app" version = "0.1.0" diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py index a0c91de3..8d0adb46 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py @@ -46,8 +46,6 @@ def test_set_passwords(self, monkeypatch): def test_verify_password(self): fail - # FOR_PR fix on linux and add back in - @pytest.mark.skip def test_clearing_passwords(self): u = origen.current_user assert set(u.datasets.keys()) == { @@ -87,6 +85,7 @@ def test_clearing_passwords(self): origen._origen.boot_users() u.datasets["dummy_ldap_ds"].should_validate_password = False u = origen.current_user + u.prompt_for_passwords = False # origen.boot_users() # origen.users.remove(u.id) # origen.users.lookup_current_id(update_current=True) @@ -94,7 +93,7 @@ def test_clearing_passwords(self): # print(u.password) # TODO update this with "prompt=False" option or something better than expecting an error - prompt_err = "Error encountered prompting for password: The handle is invalid" + prompt_err = f"Cannot prompt for passwords for user '{u.id}'. Passwords must be loaded by the config or set directly." with pytest.raises(RuntimeError, match=prompt_err): assert u.password is None with pytest.raises(RuntimeError, match=prompt_err): @@ -111,6 +110,7 @@ def test_clearing_passwords(self): origen._origen.boot_users() u.datasets["dummy_ldap_ds"].should_validate_password = False u = origen.current_user + u.prompt_for_passwords = False assert "Clearing cached password for dataset 'git'" in out assert "Clearing cached password for dataset 'test2'" in out @@ -137,6 +137,7 @@ def test_clearing_passwords(self): origen._origen.boot_users() u.datasets["dummy_ldap_ds"].should_validate_password = False u = origen.current_user + u.prompt_for_passwords = False assert "Clearing all cached passwords..." in out with pytest.raises(RuntimeError, match=prompt_err): From a38334417a881652b927aa208ecf52f02eaa5e5e Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 31 Dec 2022 18:27:33 -0600 Subject: [PATCH 013/200] Some clean up and refactoring --- python/origen/origen/boot.py | 25 +- python/origen/origen/core/plugins.py | 2 +- rust/origen/cli/src/framework/plugins.rs | 9 +- rust/origen/src/core/application/config.rs | 1 - rust/origen/src/core/config.rs | 4 +- rust/origen_metal/src/frontend/mod.rs | 2 +- rust/pyapi/src/current_command.rs | 80 +++++ rust/pyapi/src/extensions.rs | 145 ++++++++ rust/pyapi/src/lib.rs | 371 +-------------------- rust/pyapi/src/macros.rs | 5 + rust/pyapi/src/plugins.rs | 111 +++++- rust/pyapi_metal/src/_helpers/errors.rs | 17 + rust/pyapi_metal/src/framework/users.rs | 2 +- 13 files changed, 375 insertions(+), 399 deletions(-) create mode 100644 rust/pyapi/src/current_command.rs create mode 100644 rust/pyapi/src/extensions.rs create mode 100644 rust/pyapi/src/macros.rs diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 6aa2196c..f22a446d 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -1,15 +1,13 @@ -# These must come before all other imports. -# from __future__ import print_function, unicode_literals, absolute_import - import pathlib from builtins import exit as exit_proc +# TEST_NEEDED +# Or needed at all? def unsupported_command(base_cmd, sub_command=None): if sub_command is None: - print(f"Unsupported command '{base_cmd}'") + raise RuntimeError(f"Unsupported command '{base_cmd}'") else: - print(f"Unsupported sub-command '{sub_command}' for '{base_cmd}'") - exit(1) + raise RuntimeError(f"Unsupported sub-command '{sub_command}' for '{base_cmd}'") dispatch_plugin_cmd = "_plugin_dispatch_" dispatch_aux_cmd = "_dispatch_aux_cmd_" @@ -51,6 +49,7 @@ def run_cmd(command, import origen.application import origen.target + # FOR_PR make these constants if command == dispatch_plugin_cmd: cmd_src = "plugin" elif command == dispatch_aux_cmd: @@ -195,20 +194,17 @@ def on_load(func): for msg in m: origen.log.error(f" {msg}") ext['mod'] = None - # FOR_PR remove obj - ext['obj'] = None else: ext['mod'] = m - ext['obj'] = m if "on_load" in ext: getattr((ext["mod"]), ext["on_load"])(ext["mod"]) - _origen.set_command(command, subcmds, args, ext_args, extensions) + _origen.current_command.set_command(command, subcmds, args, ext_args, extensions) try: for ext in extensions: if "before_cmd" in ext: - getattr(ext["obj"], ext["before_cmd"])(**ext_args[ext['source']][ext['name']]) + getattr(ext["mod"], ext["before_cmd"])(**ext_args[ext['source']][ext['name']]) # The generate command handles patterns and flows. # Future: Add options to generate patterns concurrently, or send them off to LSF. @@ -446,18 +442,17 @@ def tabify(message): call_user_cmd("aux") else: - print(f"Unknown command: {command}") - exit(1) + unsupported_command(command) if extensions: for ext in extensions: if "after_cmd" in ext: - getattr(ext["obj"], ext["after_cmd"])(**ext_args[ext['source']][ext['name']]) + getattr(ext["mod"], ext["after_cmd"])(**ext_args[ext['source']][ext['name']]) finally: for ext in extensions: try: if "clean_up" in ext: - getattr(ext["obj"], ext["clean_up"])(**ext_args[ext['source']][ext['name']]) + getattr(ext["mod"], ext["clean_up"])(**ext_args[ext['source']][ext['name']]) except Exception as clean_up_e: print(clean_up_e) diff --git a/python/origen/origen/core/plugins.py b/python/origen/origen/core/plugins.py index 440a5b0f..5c078479 100644 --- a/python/origen/origen/core/plugins.py +++ b/python/origen/origen/core/plugins.py @@ -12,7 +12,7 @@ def collect_plugins(): pls = Plugins() - for n, r in _origen._plugin_roots().items(): + for n, r in _origen.plugins.get_plugin_roots().items(): pls.register(n) # parts = l.split("|") # if len(parts) != 3: diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index e174e7fd..d1eb2619 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -180,14 +180,12 @@ impl Plugins { }; python::run_with_callbacks( - "import _origen; _origen._display_plugin_roots()", + "import _origen; _origen.plugins.display_plugin_roots()", Some(&mut |line| { if let Some((status, result)) = line.split_once('|') { match status { "success" => { if let Some((name, path)) = result.split_once('|') { - //let pl_config = PluginConfig::from_path(path) - // pl_cmds.insert(name, PathBuf::from(path)); match Plugin::new(name, PathBuf::from(path), exts) { Ok(pl) => { slf.plugins.insert(name.to_string(), pl); @@ -206,8 +204,6 @@ impl Plugins { } else { log_error!("Malformed output encountered when collecting plugin roots: {}", line); } - // output_lines += &format!("{}\n", line); - // println!("{}", line); }), None, )?; @@ -225,9 +221,6 @@ impl Plugins { } None } - - // pub fn dispatch(&self, mut matches: &ArgMatches) { - // } } pub struct Plugin { diff --git a/rust/origen/src/core/application/config.rs b/rust/origen/src/core/application/config.rs index f8c5e39e..5c41c0ce 100644 --- a/rust/origen/src/core/application/config.rs +++ b/rust/origen/src/core/application/config.rs @@ -6,7 +6,6 @@ use origen_metal::config::{Environment, File}; use std::collections::HashMap; use std::path::{Path, PathBuf}; use crate::om::glob::glob; -use crate::Result; const PUBLISHER_OPTIONS: &[&str] = &["system", "package_app", "upload_app"]; diff --git a/rust/origen/src/core/config.rs b/rust/origen/src/core/config.rs index 47a8c983..7039268b 100644 --- a/rust/origen/src/core/config.rs +++ b/rust/origen/src/core/config.rs @@ -432,7 +432,7 @@ impl Default for Config { } // Check for configs in the CLI directory and its parents - if let Some(mut path) = STATUS.cli_location() { + if let Some(path) = STATUS.cli_location() { log_trace!("Looking for Origen config files from the CLI directory: '{}'", path.display()); Self::append_configs(path, &mut files); } @@ -505,7 +505,7 @@ impl Default for Config { match built.get::>>("auxillary_commands") { Ok(r) => { if let Some(cmds) = r { - for (i, cmd) in cmds.iter().enumerate() { + for cmd in cmds.iter() { let mut cmd_clone = cmd.clone(); cmd_clone.path = om::_utility::file_utils::to_abs_path(&cmd.path, &f.parent().unwrap().to_path_buf()).display().to_string(); aux_cmd_sources.push(f.to_path_buf()); diff --git a/rust/origen_metal/src/frontend/mod.rs b/rust/origen_metal/src/frontend/mod.rs index 8e1feb1f..52e7e274 100644 --- a/rust/origen_metal/src/frontend/mod.rs +++ b/rust/origen_metal/src/frontend/mod.rs @@ -200,7 +200,7 @@ pub trait FrontendAPI { None } - fn lookup_home_dir(&self, user_id: &str, dataset: Option<&str>, current_user: bool) -> Option>> { + fn lookup_home_dir(&self, _user_id: &str, _dataset: Option<&str>, _current_user: bool) -> Option>> { None } diff --git a/rust/pyapi/src/current_command.rs b/rust/pyapi/src/current_command.rs new file mode 100644 index 00000000..c50efaf2 --- /dev/null +++ b/rust/pyapi/src/current_command.rs @@ -0,0 +1,80 @@ +use pyo3::prelude::*; +use pyo3::types::{PyDict, PyList}; +use super::extensions::Extensions; + +pub const ATTR_NAME: &str = "_current_command_"; + +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "current_command")?; + subm.add_wrapped(wrap_pyfunction!(get_command))?; + subm.add_wrapped(wrap_pyfunction!(set_command))?; + subm.add_wrapped(wrap_pyfunction!(clear_command))?; + subm.add_class::()?; + m.add_submodule(subm)?; + Ok(()) +} + +#[pyfunction] +pub fn get_command(py: Python) -> PyResult> { + _origen!(py).getattr(ATTR_NAME)?.extract::>() +} + +#[pyfunction] +fn set_command(py: Python, base_cmd: String, subcmds: Vec, args: Py, ext_args: Py, exts: &PyList) -> PyResult<()> { + let cmd = CurrentCommand { + base: base_cmd, + subcmds: subcmds, + args: args, + exts: Py::new(py, Extensions::new(py, exts, ext_args)?)?, + }; + _origen!(py).setattr(ATTR_NAME, Py::new(py, cmd)?) +} + +#[pyfunction] +fn clear_command() -> PyResult<()> { + // Ok(STATUS.clear_command()) + // FOR_PR + // TEST_NEEDED also + todo!() + // _origen!(py).setattr(ATTR_NAME, Py::new(py, cmd)?) +} + +#[pyclass] +pub struct CurrentCommand { + base: String, + subcmds: Vec, + args: Py, + exts: Py, +} + +#[pymethods] +impl CurrentCommand { + #[getter] + pub fn cmd(&self) -> PyResult { + Ok(if self.subcmds.is_empty() { + self.base.to_string() + } else { + format!("{}.{}", self.base, self.subcmds.join(".")) + }) + } + + #[getter] + pub fn base_cmd(&self) -> PyResult<&str> { + Ok(&self.base) + } + + #[getter] + pub fn subcmds(&self) -> PyResult> { + Ok(self.subcmds.clone()) + } + + #[getter] + pub fn exts(&self) -> PyResult<&Py> { + Ok(&self.exts) + } + + #[getter] + pub fn args<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { + Ok(self.args.as_ref(py)) + } +} \ No newline at end of file diff --git a/rust/pyapi/src/extensions.rs b/rust/pyapi/src/extensions.rs new file mode 100644 index 00000000..3858eaab --- /dev/null +++ b/rust/pyapi/src/extensions.rs @@ -0,0 +1,145 @@ +use pyo3::prelude::*; +use pyo3::types::{PyAny, PyDict, PyList}; +use origen_metal::indexmap::IndexMap; +use crate::current_command::get_command; + +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "extensions")?; + subm.add_class::()?; + subm.add_class::()?; + m.add_submodule(subm)?; + Ok(()) +} + +#[pyclass] +pub struct Extension { + name: String, + args: Py, + source: String, + // m: , // FOR_PR store mod here? +} + +#[pymethods] +impl Extension { + #[getter] + pub fn name(&self) -> PyResult<&str> { + Ok(&self.name) + } + + #[getter] + pub fn args<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { + Ok(self.args.as_ref(py)) + } + + // TODO return path? + #[getter] + pub fn source(&self) -> PyResult<&str> { + Ok(&self.source) + } +} + +#[pyclass] +pub struct Extensions { + exts: IndexMap> +} + +#[pymethods] +impl Extensions { + fn get(&self, ext_name: &str) -> PyResult>> { + Ok(match self.exts.get(ext_name) { + Some(ext) => Some(ext), + None => None, + }) + } + + fn keys(&self) -> PyResult> { + Ok(self.exts.keys().map(|k| k.to_string()).collect()) + } + + fn values(&self) -> PyResult>> { + let mut retn: Vec<&Py> = vec![]; + for (_, ext) in self.exts.iter() { + retn.push(ext); + } + Ok(retn) + } + + fn items(&self) -> PyResult)>> { + let mut retn: Vec<(String, &Py)> = vec![]; + for (n, ext) in self.exts.iter() { + retn.push((n.to_string(), ext)); + } + Ok(retn) + } + + fn __getitem__(&self, py: Python, key: &str) -> PyResult<&Py> { + if let Some(s) = self.get(key)? { + Ok(s) + } else { + Err(pyo3::exceptions::PyKeyError::new_err(format!( + "No extension '{}' available for command '{}'", + key, + get_command(py)?.cmd()? + ))) + } + } + + fn __len__(&self) -> PyResult { + Ok(self.exts.len()) + } + + fn __iter__(slf: PyRefMut) -> PyResult { + Ok(ExtensionsIter { + keys: slf.keys().unwrap(), + i: 0, + }) + } +} + +#[pyclass] +pub struct ExtensionsIter { + pub keys: Vec, + pub i: usize, +} + +#[pymethods] +impl ExtensionsIter { + fn __iter__(slf: PyRefMut) -> PyResult> { + Ok(slf.into()) + } + + fn __next__(mut slf: PyRefMut) -> PyResult> { + if slf.i >= slf.keys.len() { + return Ok(None); + } + let name = slf.keys[slf.i].clone(); + slf.i += 1; + Ok(Some(name)) + } +} + +impl Extensions { + pub fn new<'py>(py: Python<'py>, exts: &PyList, ext_args: Py) -> PyResult { + let mut slf = Self { + exts: IndexMap::new(), + }; + + for ext in exts.iter() { + let ext_cfg = ext.extract::<&PyDict>()?; + let source = PyAny::get_item(ext_cfg, "source")?.extract::()?; + let ext_name = PyAny::get_item(ext_cfg, "name")?.extract::()?; + let ext_path = format!("{}.{}", source, ext_name); + + let src_ext_args = PyAny::get_item(ext_args.as_ref(py), &source)?.extract::<&PyDict>()?; + + let py_ext = Extension { + args: PyAny::get_item(src_ext_args, &ext_name)?.extract::>()?, + name: ext_name, + source: ext_path.clone(), + }; + slf.exts.insert(ext_path, Py::new(py, py_ext)?); + } + + Ok(slf) + } +} \ No newline at end of file diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index da5952d2..accc903d 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -6,7 +6,12 @@ extern crate origen_metal; use pyapi_metal; +#[macro_use] +mod macros; + +mod current_command; mod dut; +mod extensions; mod file_handler; mod meta; mod model; @@ -33,19 +38,16 @@ use num_bigint::BigUint; use om::lazy_static::lazy_static; use origen::{Dut, Error, Operation, Result, Value, FLOW, ORIGEN_CONFIG, STATUS, TEST}; use origen_metal as om; -use pyapi_metal as py_om; -use pyapi_metal::pypath; -use pyapi_metal::_helpers::typed_value; +use pyapi_metal::{runtime_error, pypath}; use pyo3::conversion::AsPyPointer; use pyo3::prelude::*; -use pyo3::types::{PyAny, PyBytes, PyDict, PyList}; +use pyo3::types::{PyAny, PyBytes, PyDict}; use pyo3::{wrap_pyfunction, wrap_pymodule}; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::sync::MutexGuard; use utility::location::Location; use paste::paste; -use std::collections::HashMap; use crate::dut::__PYO3_PYMODULE_DEF_DUT; use crate::tester::__PYO3_PYMODULE_DEF_TESTER; @@ -65,8 +67,6 @@ pub mod built_info { include!(concat!(env!("OUT_DIR"), "/built.rs")); } -pub const current_command_str: &str = "_current_command_"; - #[pymodule] /// This is the top-level _origen module which can be imported by Python fn _origen(py: Python, m: &PyModule) -> PyResult<()> { @@ -96,12 +96,6 @@ fn _origen(py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(enable_debug))?; m.add_wrapped(wrap_pyfunction!(set_operation))?; m.add_wrapped(wrap_pyfunction!(boot_users))?; - m.add_wrapped(wrap_pyfunction!(_plugin_roots))?; - m.add_wrapped(wrap_pyfunction!(_display_plugin_roots))?; - m.add_wrapped(wrap_pyfunction!(_find_plugin_roots))?; - m.add_wrapped(wrap_pyfunction!(_collect_plugin_roots))?; - m.add_wrapped(wrap_pyfunction!(set_command))?; - m.add_wrapped(wrap_pyfunction!(clear_command))?; m.add_wrapped(wrap_pymodule!(dut))?; m.add_wrapped(wrap_pymodule!(tester))?; @@ -116,11 +110,13 @@ fn _origen(py: Python, m: &PyModule) -> PyResult<()> { file_handler::define(m)?; plugins::define(py, m)?; + extensions::define(py, m)?; + current_command::define(py, m)?; // Compile the _origen_metal library along with this one // to allow re-use from that library m.add_wrapped(wrap_pymodule!(_origen_metal))?; - m.setattr(current_command_str, py.None()); + m.setattr(current_command::ATTR_NAME, py.None())?; Ok(()) } @@ -441,198 +437,6 @@ fn enable_debug() -> PyResult<()> { Ok(()) } -macro_rules! _origen { - ($py: expr) => { - pyo3::types::PyModule::import($py, "_origen")? - }; -} - -// FOR_PR see about moving current command and extensions to standalone file -fn get_current_command(py: Python) -> PyResult> { - _origen!(py).getattr("_current_command_")?.extract::>() -} - -#[pyfunction] -fn set_command(py: Python, base_cmd: String, subcmds: Vec, args: Py, ext_args: Py, exts: &PyList) -> PyResult<()> { - let cmd = CurrentCommand { - base: base_cmd, - subcmds: subcmds, - args: args, - exts: Py::new(py, Extensions::new(py, exts, ext_args)?)?, - }; - _origen!(py).setattr("_current_command_", Py::new(py, cmd)?) -} - -#[pyfunction] -fn clear_command() -> PyResult<()> { - // Ok(STATUS.clear_command()) - // FOR_PR - // TEST_NEEDED also - todo!() -} - -#[pyclass] -pub struct Extension { - name: String, - args: Py, - source: String, - // m: , // FOR_PR store mod here? -} - -#[pymethods] -impl Extension { - #[getter] - pub fn args<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { - Ok(self.args.as_ref(py)) - } -} - -#[pyclass] -pub struct Extensions { - exts: IndexMap> -} - -#[pymethods] -impl Extensions { - fn get(&self, ext_name: &str) -> PyResult>> { - Ok(match self.exts.get(ext_name) { - Some(ext) => Some(ext), - None => None, - }) - } - - fn keys(&self) -> PyResult> { - Ok(self.exts.keys().map(|k| k.to_string()).collect()) - } - - fn values(&self) -> PyResult>> { - let mut retn: Vec<&Py> = vec![]; - for (_, ext) in self.exts.iter() { - retn.push(ext); - } - Ok(retn) - } - - fn items(&self) -> PyResult)>> { - let mut retn: Vec<(String, &Py)> = vec![]; - for (n, ext) in self.exts.iter() { - retn.push((n.to_string(), ext)); - } - Ok(retn) - } - - fn __getitem__(&self, py: Python, key: &str) -> PyResult<&Py> { - if let Some(s) = self.get(key)? { - Ok(s) - } else { - Err(pyo3::exceptions::PyKeyError::new_err(format!( - "No extension '{}' available for command '{}'", - key, - get_current_command(py)?.cmd()? - ))) - } - } - - fn __len__(&self) -> PyResult { - Ok(self.exts.len()) - } - - fn __iter__(slf: PyRefMut) -> PyResult { - Ok(ExtensionsIter { - keys: slf.keys().unwrap(), - i: 0, - }) - } -} - -#[pyclass] -pub struct ExtensionsIter { - pub keys: Vec, - pub i: usize, -} - -#[pymethods] -impl ExtensionsIter { - fn __iter__(slf: PyRefMut) -> PyResult> { - Ok(slf.into()) - } - - fn __next__(mut slf: PyRefMut) -> PyResult> { - if slf.i >= slf.keys.len() { - return Ok(None); - } - let name = slf.keys[slf.i].clone(); - slf.i += 1; - Ok(Some(name)) - } -} - -impl Extensions { - pub fn new<'py>(py: Python<'py>, exts: &PyList, ext_args: Py) -> PyResult { - let mut slf = Self { - exts: IndexMap::new(), - }; - - for ext in exts.iter() { - let ext_cfg = ext.extract::<&PyDict>()?; - let source = PyAny::get_item(ext_cfg, "source")?.extract::()?; - let ext_name = PyAny::get_item(ext_cfg, "name")?.extract::()?; - let ext_path = format!("{}.{}", source, ext_name); - - let src_ext_args = PyAny::get_item(ext_args.as_ref(py), &source)?.extract::<&PyDict>()?; - - let py_ext = Extension { - args: PyAny::get_item(src_ext_args, &ext_name)?.extract::>()?, - name: ext_name, - source: ext_path.clone(), - }; - slf.exts.insert(ext_path, Py::new(py, py_ext)?); - } - - Ok(slf) - } -} - -#[pyclass] -pub struct CurrentCommand { - base: String, - subcmds: Vec, - args: Py, - exts: Py, -} - -#[pymethods] -impl CurrentCommand { - #[getter] - pub fn cmd(&self) -> PyResult { - Ok(if self.subcmds.is_empty() { - self.base.to_string() - } else { - format!("{}.{}", self.base, self.subcmds.join(".")) - }) - } - - #[getter] - pub fn base_cmd(&self) -> PyResult<&str> { - Ok(&self.base) - } - - #[getter] - pub fn subcmds(&self) -> PyResult> { - Ok(self.subcmds.clone()) - } - - #[getter] - pub fn exts<'py>(&'py self, py: Python<'py>) -> PyResult<&Py> { - Ok(&self.exts) - } - - #[getter] - pub fn args<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { - Ok(self.args.as_ref(py)) - } -} - #[pyfunction] /// Set the current Origen operation (generate, compile, etc.) fn set_operation(name: String) -> PyResult<()> { @@ -746,156 +550,10 @@ fn config(py: Python) -> PyResult { fn config_metadata<'py>(py: Python<'py>) -> PyResult<&'py PyDict> { let m = origen::origen_config_metadata(); let retn = PyDict::new(py); - retn.set_item("files", m.files.iter().map( |p| Ok(pypath!(py, p.display()))).collect::>>()?); + retn.set_item("files", m.files.iter().map( |p| Ok(pypath!(py, p.display()))).collect::>>()?)?; Ok(retn) } -// FOR_PR see about moving plugin stuff to another file -// Also clean up - -use origen_metal::indexmap::IndexMap; - -#[pyfunction] -// fn _plugin_roots(py: Python) -> PyResult> { -fn _plugin_roots<'py>(py: Python<'py>) -> PyResult<&'py PyDict> { - // let mut pl_roots: IndexMap; - let pl_roots; - if let Some(plugins) = ORIGEN_CONFIG.plugins.as_ref() { - // let l = PyDict::new(py); - if plugins.collect() { - pl_roots = _collect_plugin_roots(py)?; - } else { - pl_roots = PyDict::new(py); // IndexMap::new(); - } - - if let Some(plugins_to_load) = plugins.load.as_ref() { - // pl_roots.extend(_find_plugin_roots(py, plugins_to_load.iter().map( |pl| pl.name.as_str()).collect::>())?); - for (n, r) in _find_plugin_roots(py, plugins_to_load.iter().map( |pl| pl.name.as_str()).collect::>())?.iter() { - pl_roots.set_item(n, r); - } - - // println!("loading..."); - // for pl in plugins_to_load { - // println!("{}: {}", &pl.name, pkgs.get_item(&pl.name)?); - // } - } - } else { - pl_roots = _collect_plugin_roots(py)?; - } - Ok(pl_roots) - // // println!("Start Plugin Roots:"); - // for (pl, path) in pl_roots { - // println!("success|{}|{}", pl, path.display()); - // } - // // println!("End Plugin Roots"); - // Ok(()) -} - -// #[pyfunction] -// fn _get_plugin_roots<'py>(py: Python<'py>) -> PyResult<&PyDict> { -// py_om::_helpers::map_to_pydict(py, _plugin_roots(py)?)? -// } - - -#[pyfunction] -fn _display_plugin_roots(py: Python) -> PyResult<()> { - for (pl, path) in _plugin_roots(py)?.iter() { - println!("success|{}|{}", pl.extract::()?, path.extract::()?.display()); - } - Ok(()) -} - -#[pyfunction] -// fn _find_plugin_roots(py: Python, plugins: Vec<&str>) -> PyResult> { -fn _find_plugin_roots<'py>(py: Python<'py>, plugins: Vec<&str>) -> PyResult<&'py PyDict> { - let l = PyDict::new(py); - l.set_item("plugin_paths", PyDict::new(py)); - py.run(&format!( -r#" -from pathlib import Path -import importlib, importlib_metadata - -for to_load in [{}]: - s = importlib.util.find_spec(to_load) - if s.origin: - root = Path(s.origin).parent - if root.joinpath("origen.plugin.toml").exists(): - plugin_paths[to_load] = root - elif s.submodule_search_locations: - for root in s.submodule_search_locations: - root = Path(root) - if root.joinpath("origen.plugin.toml").exists(): - plugin_paths[to_load] = root -"#, - plugins.iter().map( |n| format!("'{}'", n)).collect::>().join(",")), - None, - Some(l) - )?; - // l.get_item("plugin_paths").unwrap().extract() - Ok(l.get_item("plugin_paths").unwrap().extract()?) -} - -#[pyfunction] -// fn _collect_plugin_roots(py: Python) -> PyResult> { -fn _collect_plugin_roots<'py>(py: Python<'py>) -> PyResult<&'py PyDict> { - let l = PyDict::new(py); - l.set_item("plugin_paths", PyDict::new(py)); - py.run( -r#" -from pathlib import Path -import importlib, importlib_metadata - -for dist in importlib_metadata.distributions(): - n = str(Path(dist._path).name).split('-')[0].lower() - s = importlib.util.find_spec(n) - if s: - if s.origin: - root = Path(s.origin).parent - if root.joinpath("origen.plugin.toml").exists(): - plugin_paths[n] = root - elif s.submodule_search_locations: - for root in s.submodule_search_locations: - root = Path(root) - if root.joinpath("origen.plugin.toml").exists(): - plugin_paths[n] = root -"#, - None, - Some(l) - )?; - // println!("Start Plugin Roots:"); - // for pl in l.get_item("plugin_paths").unwrap().extract::>()? { - // println!("{}", pl.display()); - // } - // println!("End Plugin Roots"); - // l.get_item("plugin_paths").unwrap().extract() - Ok(l.get_item("plugin_paths").unwrap().extract()?) - - // println!("collecting plugin roots..."); - // if let Some(plugins) = ORIGEN_CONFIG.plugins.as_ref() { - // println!("collecting plugin roots..."); - // // let pl_roots = vec![]; - // // let l = PyTuple::new() - // let l = PyDict::new(py); - // l.set_item("pkg_resources", PyModule::import(py, "pkg_resources")?)?; - // println!("imported..."); - // let pkgs = py.eval("{d.project_name: d.location for d in pkg_resources.working_set}", None, Some(l))?; - // println!("evaled..."); - // println!("{:?}", pkgs); - // // if plugins.collect() { - // // // TODO - // // // todo!(); - // // } - - // if let Some(plugins_to_load) = plugins.load.as_ref() { - // println!("loading..."); - // for pl in plugins_to_load { - // println!("{}: {}", &pl.name, pkgs.get_item(&pl.name)?); - // } - // } - // } - // Ok(()) -} - #[pyfunction] fn is_app_present() -> PyResult { Ok(STATUS.is_app_present) @@ -991,13 +649,6 @@ fn start_new_test(name: Option) -> PyResult<()> { Ok(()) } -#[macro_export] -macro_rules! runtime_error { - ($message:expr) => {{ - Err(PyErr::new::($message)) - }}; -} - pub fn pickle(py: Python, object: &impl AsPyPointer) -> PyResult> { let pickle = PyModule::import(py, "pickle")?; pickle diff --git a/rust/pyapi/src/macros.rs b/rust/pyapi/src/macros.rs new file mode 100644 index 00000000..73931a4d --- /dev/null +++ b/rust/pyapi/src/macros.rs @@ -0,0 +1,5 @@ +macro_rules! _origen { + ($py: expr) => { + pyo3::types::PyModule::import($py, "_origen")? + }; +} diff --git a/rust/pyapi/src/plugins.rs b/rust/pyapi/src/plugins.rs index 0aaa3a25..d0babb33 100644 --- a/rust/pyapi/src/plugins.rs +++ b/rust/pyapi/src/plugins.rs @@ -2,7 +2,8 @@ use pyo3::prelude::*; use pyo3::types::PyDict; use pyo3::wrap_pyfunction; -use pyapi_metal::{pypath, runtime_error, key_error}; +use pyapi_metal::{pypath, key_error, key_exception}; +use origen::ORIGEN_CONFIG; use origen_metal::indexmap::IndexMap; use std::path::PathBuf; use pyo3::exceptions::PyKeyError; @@ -11,17 +12,109 @@ pub fn define(py: Python, m: &PyModule) -> PyResult<()> { let subm = PyModule::new(py, "plugins")?; subm.add_wrapped(wrap_pyfunction!(from_origen_cli))?; subm.add_wrapped(wrap_pyfunction!(default))?; + subm.add_wrapped(wrap_pyfunction!(get_plugin_roots))?; + subm.add_wrapped(wrap_pyfunction!(display_plugin_roots))?; + subm.add_wrapped(wrap_pyfunction!(find_plugin_roots))?; + subm.add_wrapped(wrap_pyfunction!(collect_plugin_roots))?; subm.add_class::()?; subm.add_class::()?; m.add_submodule(subm)?; Ok(()) } +#[pyfunction] +fn get_plugin_roots<'py>(py: Python<'py>) -> PyResult<&'py PyDict> { + let pl_roots; + if let Some(plugins) = ORIGEN_CONFIG.plugins.as_ref() { + if plugins.collect() { + pl_roots = collect_plugin_roots(py)?; + } else { + pl_roots = PyDict::new(py); + } + + if let Some(plugins_to_load) = plugins.load.as_ref() { + for (n, r) in find_plugin_roots(py, plugins_to_load.iter().map( |pl| pl.name.as_str()).collect::>())?.iter() { + pl_roots.set_item(n, r)?; + } + } + } else { + pl_roots = collect_plugin_roots(py)?; + } + Ok(pl_roots) +} + +#[pyfunction] +fn display_plugin_roots(py: Python) -> PyResult<()> { + for (pl, path) in get_plugin_roots(py)?.iter() { + println!("success|{}|{}", pl.extract::()?, path.extract::()?.display()); + } + Ok(()) +} + +#[pyfunction] +fn find_plugin_roots<'py>(py: Python<'py>, plugins: Vec<&str>) -> PyResult<&'py PyDict> { + let l = PyDict::new(py); + l.set_item("plugin_paths", PyDict::new(py))?; + py.run(&format!( +r#" +from pathlib import Path +import importlib, importlib_metadata + +for to_load in [{}]: + s = importlib.util.find_spec(to_load) + if s.origin: + root = Path(s.origin).parent + if root.joinpath("origen.plugin.toml").exists(): + plugin_paths[to_load] = root + elif s.submodule_search_locations: + for root in s.submodule_search_locations: + root = Path(root) + if root.joinpath("origen.plugin.toml").exists(): + plugin_paths[to_load] = root +"#, + plugins.iter().map( |n| format!("'{}'", n)).collect::>().join(",")), + None, + Some(l) + )?; + Ok(l.get_item("plugin_paths").ok_or_else( || key_exception!("Error finding plugin roots: expected 'plugin_paths' key."))?.extract()?) +} + +#[pyfunction] +fn collect_plugin_roots<'py>(py: Python<'py>) -> PyResult<&'py PyDict> { + let l = PyDict::new(py); + l.set_item("plugin_paths", PyDict::new(py))?; + py.run( +r#" +from pathlib import Path +import importlib, importlib_metadata + +for dist in importlib_metadata.distributions(): + n = str(Path(dist._path).name).split('-')[0].lower() + s = importlib.util.find_spec(n) + if s: + if s.origin: + root = Path(s.origin).parent + if root.joinpath("origen.plugin.toml").exists(): + plugin_paths[n] = root + elif s.submodule_search_locations: + for root in s.submodule_search_locations: + root = Path(root) + if root.joinpath("origen.plugin.toml").exists(): + plugin_paths[n] = root +"#, + None, + Some(l) + )?; + Ok(l.get_item("plugin_paths").ok_or_else( || key_exception!("Error collecting plugin roots: expected 'plugin_paths' key."))?.extract()?) +} + #[pyfunction] pub fn from_origen_cli(py: Python, plugin_configs: &PyDict) -> PyResult { Plugins::from_pl_config_dict(py, plugin_configs) } +// FOR_PR not sure what's needed from below + #[pyfunction] pub fn default(py: Python) -> PyResult { Plugins::from_roots(py) @@ -56,7 +149,7 @@ impl Plugins { self.keys() } - pub fn get(&self, py: Python, key: &str) -> PyResult>> { + pub fn get(&self, key: &str) -> PyResult>> { Ok(if let Some(pl) = self.plugins.get(key) { // PyDataStoreCategory::autoload_category(cat.borrow(py).into(), py)?; Some(pl) @@ -84,13 +177,11 @@ impl Plugins { // } fn __getitem__(&self, key: &str) -> PyResult<&Py> { - Python::with_gil( |py| { - if let Some(pl) = self.get(py, key)? { - Ok(pl) - } else { - key_error!(format!("Unknown plugin '{}'", key)) - } - }) + if let Some(pl) = self.get(key)? { + Ok(pl) + } else { + key_error!(format!("Unknown plugin '{}'", key)) + } } fn __len__(&self) -> PyResult { @@ -127,7 +218,7 @@ impl Plugins { } pub fn from_roots(py: Python) -> PyResult { - let roots = super::_plugin_roots(py)?; + let roots = get_plugin_roots(py)?; Ok(Self { plugins: { let mut plugins = IndexMap::new(); diff --git a/rust/pyapi_metal/src/_helpers/errors.rs b/rust/pyapi_metal/src/_helpers/errors.rs index 2c612cea..1e13fc15 100644 --- a/rust/pyapi_metal/src/_helpers/errors.rs +++ b/rust/pyapi_metal/src/_helpers/errors.rs @@ -12,6 +12,13 @@ macro_rules! runtime_error { }}; } +#[macro_export] +macro_rules! runtime_exception { + ($message:expr) => {{ + PyErr::new::($message) + }}; +} + #[macro_export] macro_rules! type_error { ($message:expr) => { @@ -32,6 +39,16 @@ macro_rules! key_error { }; } +#[macro_export] +macro_rules! key_exception { + ($message:expr) => { + pyo3::exceptions::PyKeyError::new_err(format!( + "{}", + $message + )) + }; +} + #[macro_export] macro_rules! not_implemented_error { ($message:expr) => { diff --git a/rust/pyapi_metal/src/framework/users.rs b/rust/pyapi_metal/src/framework/users.rs index fbdf175f..0764d05f 100644 --- a/rust/pyapi_metal/src/framework/users.rs +++ b/rust/pyapi_metal/src/framework/users.rs @@ -501,7 +501,7 @@ impl Users { #[getter] pub fn get_default_password_cache_option(&self) -> PyResult> { - let mut users = om::users_mut(); + let users = om::users_mut(); Ok(users.default_password_cache_option().as_ref().map_or( None, |p| p.into())) } From 84da4975953ae73a834d724574cd19df1e3365f0 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 2 Jan 2023 22:01:50 -0600 Subject: [PATCH 014/200] Add core_app. Continued clean up. --- python/origen/origen/__init__.py | 7 + python/origen/origen/application.py | 26 +- .../origen/helpers/regressions/cli/command.py | 32 +- .../helpers/regressions/cli/help_msg.py | 7 + .../origen/helpers/regressions/cli/origen.py | 32 +- test_apps/python_no_app/tests/cli/shared.py | 15 +- .../tests/cli/tests__cmd__eval.py | 47 + .../cmd_testers/test_arguments/__init__.py | 16 +- .../tests/cmd_building/shared.py | 6 +- .../cmd_building/tests__arg_buildling.py | 117 +- .../cmd_building/tests__loading_aux_cmds.py | 76 +- .../tests__loading_plugin_cmds.py | 41 +- .../tests/cmd_building/tests__opt_building.py | 223 ++-- .../cmd_building/tests__standard_opts.py | 1 - .../tests/cmd_extensions/__init__.py | 1 - test_apps/python_no_app/tests/test_cli.py | 7 +- .../cli/__init__.py | 1130 +---------------- .../cli/cmd_models/__init__.py | 141 ++ .../cli/cmd_models/aux.py | 426 +++++++ .../cli/cmd_models/exts.py | 287 +++++ .../cli/cmd_models/plugins.py | 212 ++++ .../cli/ext_helpers.py | 12 - 22 files changed, 1336 insertions(+), 1526 deletions(-) create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__eval.py delete mode 100644 test_apps/python_no_app/tests/cmd_extensions/__init__.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/aux.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py diff --git a/python/origen/origen/__init__.py b/python/origen/origen/__init__.py index 8ef5e7ec..06d835cc 100644 --- a/python/origen/origen/__init__.py +++ b/python/origen/origen/__init__.py @@ -40,6 +40,11 @@ def __getattr__(name: str): return users.initial_user elif name in ["command", "current_command", "cmd", "current_cmd"]: return _origen._current_command_ + elif name == "core_app": + if not origen._core_app: + from origen import application + origen._core_app = application.Application(root=Path(os.path.abspath(application.__file__)).parent.parent, name="origen") + return origen._core_app elif name == "plugins": if origen._plugins is None: from origen.core.plugins import collect_plugins @@ -184,6 +189,8 @@ def __getattr__(name: str): :ref:`The Application Workspace ` ''' +_core_app = None + dut = None ''' Pointer to the current DUT, or ``None``, if no DUT has been set. diff --git a/python/origen/origen/application.py b/python/origen/origen/application.py index f622f85f..5238e7e4 100644 --- a/python/origen/origen/application.py +++ b/python/origen/origen/application.py @@ -262,32 +262,24 @@ def instantiate_block(self, r = self.block_path_to_dir(path) if not r[0]: paths = path.split(".") - # FOR_PR clean up and invert case - if paths[0] != "origen" and path[0] != "origen_metal": - if len(paths) > 1 and origen.has_plugin(paths[0]): - return origen.plugin(paths[0]).instantiate_block( + if paths[0] == "origen": + return origen.core_app.instantiate_block( ".".join(paths[1:]), None, class_name=class_name, sb_options=sb_options) - else: - raise RuntimeError( - f"No block was found at path '{orig_path}'") + elif path[0] == "origen_metal": + raise RuntimeError("origen_metal is not available as controller or application") else: - a = importlib.import_module(f'{"origen"}.application') - app = a.Application(root=Path(os.path.abspath( - a.__file__)).parent.parent, - name="origen") - b = app.instantiate_block( + if len(paths) > 1 and origen.has_plugin(paths[0]): + return origen.plugin(paths[0]).instantiate_block( ".".join(paths[1:]), None, class_name=class_name, sb_options=sb_options) - return b - # name="origen", root=Path(origen.__file__).parent - # return origen.blocks.Controller() - # app_dir = origen.__file__ - # print(f"app path: {app_dir}") + else: + raise RuntimeError( + f"No block was found at path '{orig_path}'") else: block_dir = r[1] diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py index 0caedffc..8f94484f 100644 --- a/python/origen/origen/helpers/regressions/cli/command.py +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -91,8 +91,13 @@ def __init__(self, name, args=None, expected_output=None) -> None: def run(self, add_args=None, **kwargs): return self.parent.run(*(self.args + (add_args or [])), **kwargs) + def gen_error(self, add_args=None, **kwargs): + return self.parent.gen_error(*(self.args + (add_args or [])), **kwargs) + def assert_present(self, in_str): - assert self.expected_output in in_str + expected = [self.expected_output] if isinstance(self.expected_output, str) else self.expected_output + for e in expected: + assert e in in_str class Cmd: def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds = None, use_configs = None, with_env=None, demos=None, global_demos=None, app_demos=None, parent=None): @@ -173,26 +178,29 @@ def _with_configs_(self, with_configs): with_configs = self.use_configs + (with_configs or []) return with_configs - def get_help_msg_str(self, with_configs=None): - return self.run("-h", with_configs=with_configs) + def get_help_msg_str(self, with_configs=None, run_opts=None): + return self.run("-h", with_configs=with_configs, run_opts=run_opts) - def get_help_msg(self, with_configs=None): - return HelpMsg(self.get_help_msg_str(with_configs=with_configs)) + def get_help_msg(self, with_configs=None, bypass_config_lookup=None, run_opts=None): + return HelpMsg(self.get_help_msg_str(with_configs=with_configs, run_opts=run_opts)) - def run(self, *args, with_env=None, with_configs=None, expect_fail=False): + def run(self, *args, with_env=None, with_configs=None, expect_fail=False, run_opts=None): + run_opts = run_opts or {} return run_cli_cmd( [*self.cmd_path, *([self.name] if self.name else []), *args], - with_env=with_env or self.with_env, - with_configs=self._with_configs_(with_configs), - expect_fail=expect_fail, - return_details=expect_fail, + with_env=run_opts.pop("with_env", None) or with_env or self.with_env, + with_configs=run_opts.pop("with_configs", None) or self._with_configs_(with_configs), + expect_fail=run_opts.pop("expect_fail", None) or expect_fail, + return_details=run_opts.pop("return_details", None) or expect_fail, + **(run_opts or {}), ) - def gen_error(self, *args, with_configs=None, return_stdout=False, return_full=False): + def gen_error(self, *args, with_configs=None, return_stdout=False, return_full=False, run_opts=None): out = self.run( *args, with_configs=with_configs, expect_fail=True, + run_opts=run_opts, ) if return_full: return out @@ -208,7 +216,7 @@ def __getattr__(self, name: str): return self.opts[name] elif hasattr(self, 'subcmds') and (name in self.subcmds): return self.subcmds[name] - elif hasattr(self, 'exts') and (name in self.exts): + elif hasattr(self, 'exts') and (name in (self.exts or [])): return self.exts[name] return object.__getattribute__(self, name) diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index 349a189e..f9867b19 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -301,6 +301,9 @@ def assert_opt_at(self, expected_index, opt): assert o["ext_type"] is None return True + def assert_bare_opts(self): + return self.assert_opts("help", "vk", "v") + def assert_ext_at(self, expected_index, ext): o = self.opts[expected_index] self._assert_opt_params_(o, ext) @@ -365,3 +368,7 @@ def assert_v_opt_at(self, expected_index): def assert_vk_opt_at(self, expected_index): from .origen import CoreOpts return self.assert_opt_at(expected_index, CoreOpts.vk) + + def assert_summary(self, msg): + assert self.help == msg + return True \ No newline at end of file diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 97d98234..66269d86 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -62,11 +62,33 @@ class Names: args=[ CmdArg("code", "Statements to evaluate", multi=True, required=True) ], - demos=[CmdDemo( - "minimal", - args=["h = 'hi!'; print( origen.version ); print( h )", "print( h )"], - expected_output=f"{origen.version}\nhi!\nhi!" - )] + demos=[ + CmdDemo( + "minimal", + args=["print( 'hello from eval cmd!' )"], + expected_output="hello from eval cmd" + ), + CmdDemo( + "multi_statement_single_arg", + args=["h = 'hi!'; print( origen.version ); print( h ); print( h )"], + expected_output=f"{origen.version}\nhi!\nhi!" + ), + CmdDemo( + "multi_statement_multi_args", + args=[ + "h = 'hello!'", + "print( origen.version )", + "print( h )", + "print( h )" + ], + expected_output=f"{origen.version}\nhello!\nhello!" + ), + CmdDemo( + "gen_name_error", + args=["print( missing )"], + expected_output=["Traceback (most recent call last):", "NameError: name 'missing' is not defined"] + ) + ] ) aux_cmds = Cmd(names.aux_cmds, help="Interface with auxillary commands") pls = Cmd(names.pls) diff --git a/test_apps/python_no_app/tests/cli/shared.py b/test_apps/python_no_app/tests/cli/shared.py index 5f21d733..df020d12 100644 --- a/test_apps/python_no_app/tests/cli/shared.py +++ b/test_apps/python_no_app/tests/cli/shared.py @@ -1,10 +1,7 @@ -# FOR_PR see if needed -from origen.helpers.regressions.cli import CLI +import pytest +from tests.test_configs import Common as ConfigCommon -class CLICommon(CLI): - ... - # global_core_commands = [ - # "proj", "new", "credentials", "eval", "interactive", - # "plugins", "plugin", "auxillary_commands", "fmt", - # "build" - # ] +class CLICommon(ConfigCommon): + @pytest.fixture + def cmd(self): + return self._cmd diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py new file mode 100644 index 00000000..c23549c7 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py @@ -0,0 +1,47 @@ +import origen, pytest +from .shared import CLICommon + +class T_Eval(CLICommon): + _cmd= origen.helpers.regressions.cli.CLI.global_cmds.eval + _no_config_run_opts = { + "with_configs": CLICommon.suppress_plugin_collecting_config, + "bypass_config_lookup": True + } + + @pytest.fixture + def no_config_run_opts(self): + return self._no_config_run_opts + + def test_help_msg(self, cmd, no_config_run_opts): + help = cmd.get_help_msg(run_opts=no_config_run_opts) + help.assert_summary(cmd.help) + help.assert_args(cmd.code) + help.assert_bare_opts() + + def test_with_single_statment(self, cmd, no_config_run_opts): + d = cmd.demos["multi_statement_single_arg"] + out = d.run(run_opts=no_config_run_opts) + d.assert_present(out) + + def test_with_multiple_statements(self, cmd, no_config_run_opts): + d = cmd.demos["multi_statement_multi_args"] + out = d.run(run_opts=no_config_run_opts) + d.assert_present(out) + + def test_error_with_no_input(self, cmd, no_config_run_opts): + err = cmd.gen_error(run_opts=no_config_run_opts) + assert self.err_msgs.missing_required_arg(cmd.code) in err + + def test_error_in_statements(self, cmd, no_config_run_opts): + d = cmd.demos["gen_name_error"] + out = d.gen_error(run_opts=no_config_run_opts) + d.assert_present(out) + + # FOR_PR + @pytest.mark.skip + def test_error_in_statements_stil_runs_cleanup(self, cmd, no_config_run_opts): + d = cmd.demos["gen_name_error"] + out = d.gen_error(return_full=True) + d.assert_present(out["stderr"]) + print(out["stdout"]) + fail diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py index 2ac3dc5c..84e2c321 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py @@ -1,16 +1,2 @@ # FOR_PR switch to common method. Use nested_common as example for using common functions when running -from test_apps_shared_test_helpers.cli import output_args - -def run(**args): - if len(args) > 0: - print(output_args(None, args)) - else: - print("No args or opts given!") - -# def run(**args): -# print(f"Arg Keys: {list(args.keys())}") -# if len(args) > 0: -# for n, arg in args.items(): -# print(f"Arg: {n} ({arg.__class__}): {arg}") -# else: -# print("No args or opts given!") +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/shared.py b/test_apps/python_no_app/tests/cmd_building/shared.py index ec75c123..4cf10885 100644 --- a/test_apps/python_no_app/tests/cmd_building/shared.py +++ b/test_apps/python_no_app/tests/cmd_building/shared.py @@ -2,9 +2,9 @@ from test_apps_shared_test_helpers.cli import CLIShared class CLICommon(CLIShared): - # FOR_PR remove when switched to common method - # Custom message from testing args/opts. - no_args_or_opts_msg = "No args or opts given!" + @pytest.fixture + def cmd(self): + return self._cmd @pytest.fixture def with_cli_aux_cmds(self): diff --git a/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py b/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py index b5e29664..7a90b4a4 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__arg_buildling.py @@ -2,17 +2,7 @@ from .shared import CLICommon class Common(CLICommon): - cmdn__no_args_or_opts = "no_args_or_opts" - cmdn__optional_arg = "optional_arg" - cmdn__required_arg = "required_arg" - cmdn__multi_arg = "multi_arg" - cmdn__delim_multi_arg = "delim_multi_arg" - cmdn__single_and_multi_arg = "single_and_multi_arg" - cmdn__args_with_value_names = "args_with_value_names" - - @pytest.fixture - def cmd(self): - return getattr(self.cmd_testers.test_args, self.cmdn) + pass class T_ArgBuilding(Common): @pytest.fixture @@ -36,45 +26,31 @@ def m2(self): return "m2" def test_no_args_available(self): - # cmd = self.cmds[self.cmdn__no_args_or_opts] cmd = self.cmd_testers.test_args.no_args_or_opts help = cmd.get_help_msg() - # # help = self.parse_subcmd_help_dialogue(self.run_opt_cmd_help(self.cmd__sv_opt_arg)) - # assert len(help.args) == 0 - # assert len(help.opts) == 3 - help.assert_num_args(0) - help.assert_num_opts(3) - - help.assert_help_opt_at(0) - help.assert_vk_opt_at(1) - help.assert_v_opt_at(2) - # self.assert_help_arg(help['opts'][0]) - # self.assert_vk_arg(help['opts'][1]) - # self.assert_verbose_arg(help['opts'][2]) - - # out = self.run_test_args_cmd(self.cmd__sv_opt_arg) + help.assert_args(None) + help.assert_bare_opts() + out = cmd.run() - assert self.no_args_or_opts_msg in out + cmd.assert_args(out, None) class TestSingleOptionArg(Common): - cmdn = Common.cmdn__optional_arg + _cmd = Common.cmd_testers.test_args.optional_arg def test_help_msg(self, cmd): help = cmd.get_help_msg() - help.assert_num_args(1) - help.assert_num_opts(3) - help.assert_arg_at(0, cmd.single_val) + help.assert_args(cmd.single_val) + help.assert_bare_opts def test_no_args(self, cmd): # Try with no args out = cmd.run() - assert self.no_args_or_opts_msg in out + cmd.assert_args(out, None) def test_single_arg_given(self, cmd, sv): # Try with single arg given out = cmd.run(sv) - assert cmd.single_val.to_assert_str(sv) in out - # self.assert_arg_present(cmd.optional_arg, sv, str) in out + cmd.assert_args(out, (cmd.single_val, sv)) def test_error_on_two_args_given(self, cmd, sv): # Two args should generate error @@ -83,14 +59,12 @@ def test_error_on_two_args_given(self, cmd, sv): assert self.err_msgs.too_many_args(another_sv) in out class TestSingleRequiredArg(Common): - cmdn = Common.cmdn__required_arg + _cmd = Common.cmd_testers.test_args.required_arg def test_help_msg(self, cmd): help = cmd.get_help_msg() - help.assert_num_args(2) - help.assert_num_opts(3) - help.assert_arg_at(0, cmd.required_val) - help.assert_arg_at(1, cmd.optional_val) + help.assert_args(cmd.required_val, cmd.optional_val) + help.assert_bare_opts() def test_error_on_missing_required_arg(self, cmd): # No args should generate error @@ -100,120 +74,109 @@ def test_error_on_missing_required_arg(self, cmd): def test_req_arg_given(self, cmd, rv): # Single required arg out = cmd.run(rv) - assert cmd.required_val.to_assert_str(rv) in out + cmd.assert_args(out, (cmd.required_val, rv)) def test_req_and_optional_arg_given(self, cmd, rv): # Required and optional arg ov = "optional" out = cmd.run(rv, ov) - assert cmd.required_val.to_assert_str(rv) in out - assert cmd.optional_val.to_assert_str(ov) in out + cmd.assert_args(out, (cmd.required_val, rv), (cmd.optional_val, ov)) class TestMultiArg(Common): - cmdn = Common.cmdn__multi_arg + _cmd = Common.cmd_testers.test_args.multi_arg def test_help_msg(self, cmd): help = cmd.get_help_msg() - help.assert_num_args(1) - help.assert_num_opts(3) - help.assert_arg_at(0, cmd.multi_arg) + help.assert_args(cmd.multi_arg) + help.assert_bare_opts() def test_no_args(self, cmd): # Try with no args out = cmd.run() - assert self.no_args_or_opts_msg in out + cmd.assert_args(out, None) def test_one_arg(self, cmd, m0): # Try with one arg out = cmd.run(m0) - assert cmd.multi_arg.to_assert_str([m0]) in out + cmd.assert_args(out, (cmd.multi_arg, [m0])) def test_three_args(self, cmd, m0, m1, m2): # Try with three args out = cmd.run(m0, m1, m2) - cmd.multi_arg.to_assert_str([m0, m1, m2]) in out + cmd.assert_args(out, (cmd.multi_arg, [m0, m1, m2])) def test_delimiter_is_not_default(self, cmd, m0, m1, m2): # No delimiter by default, so this should all look like a single value out = cmd.run(f"{m0},{m1},{m2}") - assert cmd.multi_arg.to_assert_str([f"{m0},{m1},{m2}"]) in out + cmd.multi_arg.to_assert_str([f"{m0},{m1},{m2}"]) in out class TestDelimitedMultiArg(Common): - cmdn = Common.cmdn__delim_multi_arg + _cmd = Common.cmd_testers.test_args.delim_multi_arg def test_help_msg(sel, cmd): help = cmd.get_help_msg() - help.assert_num_args(1) - help.assert_num_opts(3) - help.assert_arg_at(0, cmd.delim_m_arg) + help.assert_args(cmd.delim_m_arg) + help.assert_bare_opts() def test_no_args(self, cmd): # Try with no args out = cmd.run() - assert self.no_args_or_opts_msg in out + cmd.assert_args(out, None) def test_one_arg(self, cmd, m0): # Try with one arg out = cmd.run(m0) - assert cmd.delim_m_arg.to_assert_str([m0]) in out + cmd.assert_args(out, (cmd.delim_m_arg, [m0])) def test_three_non_delimited_args(self, cmd, m0, m1, m2): # Try with three args out = cmd.run(m0, m1, m2) - assert cmd.delim_m_arg.to_assert_str([m0, m1, m2]) in out + cmd.assert_args(out, (cmd.delim_m_arg, [m0, m1, m2])) def test_three_delimited_args(self, cmd, m0, m1, m2): # Use delimiter to split up values out = cmd.run(f"{m0},{m1},{m2}") - assert cmd.delim_m_arg.to_assert_str([m0, m1, m2]) in out + cmd.assert_args(out, (cmd.delim_m_arg, [m0, m1, m2])) class TestArgsWithValueNames(Common): - cmdn = Common.cmdn__args_with_value_names + _cmd = Common.cmd_testers.test_args.args_with_value_names def test_help_msg(self, cmd): help = cmd.get_help_msg() - help.assert_num_args(2) - help.assert_num_opts(3) - help.assert_arg_at(0, cmd.s_arg) - help.assert_arg_at(1, cmd.m_arg) + help.assert_args(cmd.s_arg, cmd.m_arg) + help.assert_bare_opts() def test_value_names(self, cmd): sv ="single_val" m0 = "m0_val" m1 = "m1_val" out = cmd.run(sv, m0, m1) - assert cmd - assert cmd.s_arg.to_assert_str(sv) in out - assert cmd.m_arg.to_assert_str([m0, m1]) in out + cmd.assert_args(out, (cmd.s_arg, sv), (cmd.m_arg, [m0, m1])) class TestCombinedSingleAndMultiArgs(Common): - cmdn = Common.cmdn__single_and_multi_arg + _cmd = Common.cmd_testers.test_args.single_and_multi_arg def test_help_msg(self, cmd): help = cmd.get_help_msg() - help.assert_num_args(2) - help.assert_num_opts(3) - help.assert_arg_at(0, cmd.single_val) - help.assert_arg_at(1, cmd.multi_arg) + help.assert_args(cmd.single_val, cmd.multi_arg) + help.assert_bare_opts() def test_no_args(self, cmd): # Try no args out = cmd.run() - assert self.no_args_or_opts_msg in out + cmd.assert_args(out, None) def test_single__arg(self, cmd, sv): # Try single arg only out = cmd.run(sv) - assert cmd.single_val.to_assert_str(sv) in out + cmd.assert_args(out, (cmd.single_val, sv)) def test_two_args(self, cmd, sv, m0): # Try two args out = cmd.run(sv, m0) - assert cmd.single_val.to_assert_str(sv) in out - assert cmd.multi_arg.to_assert_str([m0]) in out + cmd.assert_args(out, (cmd.single_val, sv), (cmd.multi_arg, [m0])) def test_three_args(self, cmd, sv, m0, m1): # Try three args out = cmd.run(sv, m0, m1) - assert cmd.single_val.to_assert_str(sv) in out - assert cmd.multi_arg.to_assert_str([m0, m1]) in out + cmd.assert_args(out, (cmd.single_val, sv), (cmd.multi_arg, [m0, m1])) diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py index dc672c97..02cf888a 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py @@ -3,45 +3,18 @@ from tests.test_configs import Common as ConfigCommmon class T_LoadingAuxCommands(CLICommon, ConfigCommmon): - # cmdn_nested_l1 = "test_nested_level_1" - # cmdn_nested_l2 = "test_nested_level_2" - # cmdn_nested_l3a = "test_nested_level_3_a" - # cmdn_nested_l3b = "test_nested_level_3_b" - - # nested_l1_cmd = CLICommon.Cmd(cmdn_nested_l1, CLICommon.cmd_base) - # nested_l2_cmd = CLICommon.Cmd(cmdn_nested_l2, [*CLICommon.cmd_base, cmdn_nested_l1]) - # nested_l3a_cmd = CLICommon.Cmd(cmdn_nested_l3a, [*CLICommon.cmd_base, cmdn_nested_l1, cmdn_nested_l2]) - # nested_l3b_cmd = CLICommon.Cmd(cmdn_nested_l3b, [*CLICommon.cmd_base, cmdn_nested_l1, cmdn_nested_l2]) - def test_aux_commands_are_added(self): - help = self.global_cmds.aux_cmds.get_help_msg() # run_cli_cmd(["auxillary_commands", "-h"]) - # help = self.parse_subcmd_help_dialogue(out) - # assert list(help.subcmds.keys()) == ["cmd_testers", "help", "python_no_app_aux_cmds"] + help = self.global_cmds.aux_cmds.get_help_msg() help.assert_subcmds( self.cmd_testers_cmd, 'help', self.aux.ns.python_no_app_aux_cmds.base_cmd ) - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "python_no_app_tests"]) out = self.cmd_testers_cmd.run("python_no_app_tests") assert "Hi from No-App Origen!!" in out def test_aux_commands_stack(self, with_cli_aux_cmds): - # Copy origen config, commands toml, and commands to package root - # shutil.copy(self.dummy_config, self.cli_config) - # shutil.copy(, self.cli_config) - # try: - # out = run_cli_cmd(["auxillary_commands", "-h"]) - # print(out) - # # from pathlib import WindowsPath, PosixPath - # # configs = eval(out) - # # retn = in_new_origen_proc(mod=config_funcs) - # finally: - # os.remove(self.cli_config) - - # out = run_cli_cmd(["auxillary_commands", "-h"]) - # help = self.parse_subcmd_help_dialogue(out) help = self.global_cmds.aux_cmds.get_help_msg() help.assert_subcmds( self.aux.ns.aux_cmds_from_cli_dir.base_cmd, @@ -49,17 +22,10 @@ def test_aux_commands_stack(self, with_cli_aux_cmds): 'help', self.aux.ns.python_no_app_aux_cmds.base_cmd ) - # assert list(help.subcmds.keys()) == ["aux_cmds_from_cli_dir", "cmd_testers", "help", "python_no_app_aux_cmds"] - # out = self.global_cmds.aux_cmds.run("aux_cmds_from_cli_dir", "cli_dir_says_hi") out = self.aux.ns.aux_cmds_from_cli_dir.base_cmd.cli_dir_says_hi.run() assert "Hi from CLI dir!! " in out - # TODO Add another toml in the environment - # out = run_cli_cmd(["auxillary_commands", "-h"]) - # help = self.parse_subcmd_help_dialogue(out) - # assert list(help["subcmds"].keys()) == ["aux_cmds_from_cli_dir", "cmd_testers", "help", "python_no_app_aux_cmds"] - @pytest.mark.xfail def test_aux_command_tree_view(self): fail @@ -68,50 +34,30 @@ class TestNestedCommands(CLICommon): def test_first_level_nested_aux_commands(self): # Try first level help = self.cmd_testers_cmd.get_help_msg() - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "-h"]) - # help = self.parse_subcmd_help_dialogue(out) - # assert list(help.subcmds.keys()) == [ - # "error_cases", - # "help", - # "python_no_app_tests", - # "test_arguments", - # "test_current_command", - # "test_nested_level_1" - # ] subcs = list(self.cmd_testers_cmd.subcmds.values()) subcs.insert(1, "help") help.assert_subcmds(*subcs) out = self.cmd_testers.subc_l1.run() - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1"]) assert "Hi from 'cmd_tester' level 1!" in out def test_second_level_nested_aux_commands(self): # Try second level - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "-h"]) - # help = self.parse_subcmd_help_dialogue(out) help = self.cmd_testers.subc_l1.get_help_msg() help.assert_subcmds("help", self.cmd_testers.subc_l2) - # assert list(help.subcmds.keys()) == ["help", "test_nested_level_2"] - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "test_nested_level_2"]) out = self.cmd_testers.subc_l2.run() assert "Hi from 'cmd_tester' level 2!" in out def test_third_level_nested_aux_commands(self): # Try third level - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "test_nested_level_2", "-h"]) - # help = self.parse_subcmd_help_dialogue(out) help = self.cmd_testers.subc_l2.get_help_msg() help.assert_subcmds("help", self.cmd_testers.subc_l3_a, self.cmd_testers.subc_l3_b) - # assert list(help.subcmds.keys()) == ["help", "test_nested_level_3_a", "test_nested_level_3_b"] - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "test_nested_level_2", "test_nested_level_3_a"]) out = self.cmd_testers.subc_l3_a.run() assert "Hi from 'cmd_tester' level 3 (A)!" in out def test_third_level_nested_aux_commands_modulized_path(self): - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "test_nested_level_1", "test_nested_level_2", "test_nested_level_3_b"]) out = self.cmd_testers.subc_l3_b.run() assert "Hi from 'cmd_tester' level 3 (B)!" in out @@ -121,16 +67,7 @@ def test_conflicting_namespaces(self): orig_config = self.aux_cmd_configs_dir.joinpath("add_aux_cmd_config.toml") conflicting_config = self.aux_cmd_configs_dir.joinpath("conflicting_namespaces_config.toml") out = self.global_cmds.aux_cmds.get_help_msg_str(with_configs=[conflicting_config, orig_config]) - # out = run_cli_cmd( - # ["auxillary_commands", "-h"], - # with_configs=[ - # conflicting_config, - # orig_config, - # ] - # ) - # help = self.parse_subcmd_help_dialogue(out) help = self.HelpMsg(out) - # assert list(help.subcmds.keys()) == ["add_aux_cmd", "cmd_testers", "help", "python_no_app_aux_cmds"] help.assert_subcmds( self.aux.ns.add_aux_cmd.base_cmd, self.cmd_testers_cmd, @@ -159,30 +96,23 @@ def test_same_name_commands_within_namespace_but_different_level(self): def test_invalid_aux_path(self): ''' Should generate a logger error message but not kill the process''' - # out = run_cli_cmd(["auxillary_commands", "-h"], with_configs=self.aux_cmd_configs_dir.joinpath("invalid_aux_cmd_path_config.toml")) out = self.global_cmds.aux_cmds.get_help_msg_str(with_configs=self.aux_cmd_configs_dir.joinpath("invalid_aux_cmd_path_config.toml")) help = self.HelpMsg(out) - # assert list(help.subcmds.keys()) == ["add_aux_cmd", "cmd_testers", "help", "python_no_app_aux_cmds"] help.assert_subcmds( self.aux.ns.add_aux_cmd.base_cmd, self.cmd_testers_cmd, "help", self.aux.ns.python_no_app_aux_cmds.base_cmd ) - # assert help.subcmds.keys() == self.aux_base_cmds assert f"Unable to add auxillary commands at '{self.aux_cmd_configs_dir}{os.sep}./invalid_aux_cmd_path.toml' from config '{self.aux_cmd_configs_dir}{os.sep}invalid_aux_cmd_path_config.toml'. The following error was met" in out def test_missing_aux_cmd_impl_dir(self): - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "error_cases", "missing_impl_dir", "missing_impl_dir_subc"], expect_fail=True) out = self.cmd_testers.error_cases.gen_error("missing_impl_dir", "missing_impl_dir_subc", return_stdout=True) f = self.cmd_testers_root.joinpath('error_cases/missing_impl_dir/missing_impl_dir_subc.py') f2 = self.cmd_testers_root.joinpath('error_cases.missing_impl_dir.missing_impl_dir_subc.py') - # print(out) - # print(f"Could not find implementation for auxillary command 'error_cases missing_impl_dir missing_impl_dir_subc' at '{f}' or '{f2}'") assert f"Could not find implementation for aux command 'error_cases missing_impl_dir missing_impl_dir_subc' at '{f}' or '{f2}'" in out def test_missing_aux_cmd_impl_file(self): - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "error_cases", "missing_impl_file"], expect_fail=True) out = self.cmd_testers.error_cases.gen_error("missing_impl_file", return_stdout=True) f = self.cmd_testers_root.joinpath('error_cases/missing_impl_file.py') f2 = self.cmd_testers_root.joinpath('error_cases.missing_impl_file.py') @@ -190,15 +120,11 @@ def test_missing_aux_cmd_impl_file(self): def test_missing_run_function(self): out = self.cmd_testers.error_cases.gen_error("test_missing_run_function", return_stdout=True) - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "error_cases", "test_missing_run_function"], expect_fail=True) f = self.cmd_testers_root.joinpath('error_cases/test_missing_run_function.py') assert f"Could not find 'run' function in module '{f}'" in out def test_exception_from_run_function(self): out = self.cmd_testers.error_cases.gen_error("test_exception_in_run") - # out = run_cli_cmd(["auxillary_commands", "cmd_testers", "error_cases", "test_exception_in_run"], expect_fail=True, return_details=True) - # print(out) - # err = out["stderr"] assert "test_exception_in_run.py\", line 2" in out assert "RuntimeError: Raising run time error in 'test_exception_in_run'" in out diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py index 078370cb..a138e6de 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py @@ -3,25 +3,12 @@ Cmd = CLICommon.Cmd class Common(CLICommon): - pln = "python_plugin" - pln_2nd = "python_plugin_the_second" - pln_no_cmds = "python_plugin_no_cmds" - - pln__cmdn__hi = "plugin_says_hi" - pln__cmdn__echo = "echo" + pass class T_LoadingPluginCmds(Common): def test_plugin_cmds_are_added(self): # TODO is ordering off here? - # help = self.pl_cmd.get_help_msg() help = self.global_cmds.pl.get_help_msg() - # help.assert_opt_at(0, e_opt) - # assert [pl["name"] for pl in help.subcmds] == [ - # "help", - # self.python_plugin.name, - # self.plugins.python_plugin_no_cmds.name, - # self.plugins.python_plugin_the_second.name - # ] help.assert_subcmds( "help", self.python_plugin.base_cmd, @@ -29,30 +16,26 @@ def test_plugin_cmds_are_added(self): self.plugins.python_plugin_the_second.base_cmd ) - # def test_plugin_help_msg(self): - # fail - - # def test_no_cmds_present_only_has_help_subcmd(self): - # help = self.cmds["python_plugin_no_cmds"].get_help_msg() - # assert len(help.args) == 0 - # assert len(help.opts) == 0 - # assert list(help.subcmds.keys()) == ["help"] + # FOR_PR + @pytest.mark.skip + def test_no_cmds_present_only_has_help_subcmd(self): + help = self.cmds["python_plugin_no_cmds"].get_help_msg() + assert len(help.args) == 0 + assert len(help.opts) == 0 + assert list(help.subcmds.keys()) == ["help"] class Test_PythonPluginCMDs(Common): @pytest.fixture def root_cmd(self): return self.python_plugin.base_cmd - # return Cmd(self.pln, ["plugin"]) @pytest.fixture def hi_cmd(self): return self.python_plugin.plugin_says_hi - # return self.plugin_subcmds[self.pln][self.pln__cmdn__hi] @pytest.fixture def echo_cmd(self): return self.python_plugin.echo - # return self.plugin_subcmds[self.pln][self.pln__cmdn__echo] @classmethod def hi_msg(cls, to=None): @@ -74,11 +57,8 @@ def test_help_msg(self, root_cmd): help.assert_vk_opt_at(1) help.assert_v_opt_at(2) - # assert len(help.args) == 0 help.assert_args(None) help.assert_subcmds(*self.python_plugin.ordered_subcmds) - # assert len(help.subcmds) == 3 - # assert list(help.subcmds.keys()) == [self.pln__cmdn__echo, "help", self.pln__cmdn__hi] def test_hi_help_cmd(self, hi_cmd): help = hi_cmd.get_help_msg() @@ -131,17 +111,12 @@ def test_py_plugin_echo_delimited(self, echo_cmd): def test_nested_cmds(self): fail - # class Test_PythonluginThe2ndCMDs(Common): - # pass - class Test_PythonPluginNoCMDs(Common): @pytest.fixture def root_cmd(self): - # return Cmd(self.pln_no_cmds, ["plugin"]) return self.plugins.python_plugin_no_cmds.base_cmd def test_no_cmds_present_only_has_help_subcmd(self, root_cmd): - # help = self.cmds["python_plugin_no_cmds"].get_help_msg() help = root_cmd.get_help_msg() help.assert_args(None) assert len(help.opts) == 3 diff --git a/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py b/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py index 2a925eba..81280597 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py @@ -2,24 +2,12 @@ from .shared import CLICommon class Common(CLICommon): - # Hard-coded here to ensure it matches the TOML - cmdn__sv_opt_opt = "single_value_optional_opt" - cmdn__sv_req_opt = "single_value_required_opt" - cmdn__multi_opt = "multi_opts" - cmdn__flag_opts = "flag_opts" - cmdn__opt_vns = "opts_with_value_names" - cmdn__opt_aliases = "opts_with_aliases" - cmdn__hidden_opt = "hidden_opt" - - # TODO consolidate this with arg building. or remove - @pytest.fixture - def cmd(self): - return getattr(self.cmd_testers.test_args, self.cmdn) + pass class T_OptBuilding(Common): class TestOptionSingleValueOpts(Common): - cmdn = Common.cmdn__sv_opt_opt + _cmd = Common.cmd_testers.test_args.single_value_optional_opt @pytest.fixture def e_opt(self, cmd): @@ -39,30 +27,23 @@ def iv(self): def test_help_msg(self, cmd, e_opt, i_opt): help = cmd.get_help_msg() - help.assert_opt_at(0, e_opt) - help.assert_opt_at(2, i_opt) + help.assert_opts(e_opt, "help", i_opt, "vk", "v") def test_expl_sv_opt(self, cmd, e_opt, ev): out = cmd.run(e_opt.ln_to_cli(), ev) - assert e_opt.to_assert_str(ev) in out - assert cmd.parse_arg_keys(out) == [e_opt.name] + cmd.assert_args(out, (e_opt, ev)) def test_impl_sv_opt(self, cmd, i_opt, iv): out = cmd.run(i_opt.ln_to_cli(), iv) - assert i_opt.to_assert_str(iv) in out - assert cmd.parse_arg_keys(out) == [i_opt.name] + cmd.assert_args(out, (i_opt, iv)) def test_both_opts(self, cmd, e_opt, i_opt, ev, iv): out = cmd.run(i_opt.ln_to_cli(), iv, e_opt.ln_to_cli(), ev) - assert e_opt.to_assert_str(ev) in out - assert i_opt.to_assert_str(iv) in out - assert cmd.parse_arg_keys(out) == [i_opt.name, e_opt.name] + cmd.assert_args(out, (i_opt, iv), (e_opt, ev)) def test_both_opts_in_reverse_order(self, cmd, e_opt, i_opt, ev, iv): out = cmd.run(e_opt.ln_to_cli(), ev, i_opt.ln_to_cli(), iv) - assert e_opt.to_assert_str(ev) in out - assert i_opt.to_assert_str(iv) in out - assert cmd.parse_arg_keys(out) == [i_opt.name, e_opt.name] + cmd.assert_args(out, (i_opt, iv), (e_opt, ev)) def test_error_on_multi_opt(self, cmd, e_opt, ev): another_ev = f"another_{ev}" @@ -70,7 +51,7 @@ def test_error_on_multi_opt(self, cmd, e_opt, ev): assert self.err_msgs.too_many_args(another_ev) in out class TestRequiredOpt(Common): - cmdn = Common.cmdn__sv_req_opt + _cmd = Common.cmd_testers.test_args.single_value_required_opt @pytest.fixture def o_opt(self, cmd): @@ -90,19 +71,15 @@ def rv(self): def test_help_msg(self, cmd, o_opt, r_opt): help = cmd.get_help_msg() - help.assert_opt_at(2, o_opt) - help.assert_opt_at(3, r_opt) + help.assert_opts("help", "vk", o_opt, r_opt, "v") def test_req_opt_given(self, cmd, r_opt, rv): out = cmd.run(r_opt.ln_to_cli(), rv) - assert r_opt.to_assert_str(rv) in out - assert cmd.parse_arg_keys(out) == [r_opt.name] + cmd.assert_args(out, (r_opt, rv)) def test_req_and_optional_opt_given(self, cmd, o_opt, r_opt, ov, rv): out = cmd.run(r_opt.ln_to_cli(), rv, o_opt.ln_to_cli(), ov) - assert r_opt.to_assert_str(rv) in out - assert o_opt.to_assert_str(ov) in out - assert cmd.parse_arg_keys(out) == [o_opt.name, r_opt.name] + cmd.assert_args(out, (r_opt, rv), (o_opt, ov)) def test_error_on_no_opts_given(self, cmd, r_opt): out = cmd.gen_error() @@ -113,7 +90,7 @@ def test_error_on_optional_opt_only(self, cmd, r_opt, o_opt, ov): assert self.err_msgs.missing_required_arg(r_opt) in out class TestMultiValueOpts(Common): - cmdn = Common.cmdn__multi_opt + _cmd = Common.cmd_testers.test_args.multi_opts @pytest.fixture def m_opt(self, cmd): @@ -177,11 +154,7 @@ def d_im_m_opt_v_dlim(self): def test_help_msg(self, cmd, m_opt, im_m_opt, req_m_opt, d_m_opt, d_im_m_opt): help = cmd.get_help_msg() - help.assert_opt_at(5, m_opt) - help.assert_opt_at(3, im_m_opt) - help.assert_opt_at(6, req_m_opt) - help.assert_opt_at(1, d_m_opt) - help.assert_opt_at(0, d_im_m_opt) + help.assert_opts(d_im_m_opt, d_m_opt, "help", im_m_opt, "vk", m_opt, req_m_opt, "v") def test_all_multi_val_opts_given(self, cmd, m_opt, im_m_opt, req_m_opt, d_m_opt, d_im_m_opt, @@ -194,18 +167,14 @@ def test_all_multi_val_opts_given(self, cmd, d_m_opt.ln_to_cli(), *d_m_opt_v, d_im_m_opt.ln_to_cli(), *d_im_m_opt_v ) - assert m_opt.to_assert_str(m_opt_v) in out - assert im_m_opt.to_assert_str(im_m_opt_v) in out - assert req_m_opt.to_assert_str(req_m_opt_v) in out - assert d_m_opt.to_assert_str(d_m_opt_v) in out - assert d_im_m_opt.to_assert_str(d_im_m_opt_v) in out - assert cmd.parse_arg_keys(out) == [ - m_opt.name, - im_m_opt.name, - req_m_opt.name, - d_m_opt.name, - d_im_m_opt.name - ] + cmd.assert_args( + out, + (m_opt, m_opt_v), + (im_m_opt, im_m_opt_v), + (req_m_opt, req_m_opt_v), + (d_m_opt, d_m_opt_v), + (d_im_m_opt, d_im_m_opt_v), + ) def test_delimited_is_not_the_default(self, cmd, m_opt, im_m_opt, req_m_opt, d_m_opt, d_im_m_opt, @@ -219,18 +188,14 @@ def test_delimited_is_not_the_default(self, cmd, d_m_opt.ln_to_cli(), d_m_opt_v_dlim, d_im_m_opt.ln_to_cli(), d_im_m_opt_v_dlim ) - assert m_opt.to_assert_str([m_opt_v_dlim]) in out - assert im_m_opt.to_assert_str([im_m_opt_v_dlim]) in out - assert req_m_opt.to_assert_str([req_m_opt_v_dlim]) in out - assert d_m_opt.to_assert_str(d_m_opt_v) in out - assert d_im_m_opt.to_assert_str(d_im_m_opt_v) in out - assert cmd.parse_arg_keys(out) == [ - m_opt.name, - im_m_opt.name, - req_m_opt.name, - d_m_opt.name, - d_im_m_opt.name - ] + cmd.assert_args( + out, + (m_opt, [m_opt_v_dlim]), + (im_m_opt, [im_m_opt_v_dlim]), + (req_m_opt, [req_m_opt_v_dlim]), + (d_m_opt, d_m_opt_v), + (d_im_m_opt, d_im_m_opt_v), + ) def test_multiple_occurrences_stack(self, cmd, m_opt, req_m_opt, m_opt_v, im_m_opt_v, req_m_opt_v): out = cmd.run( @@ -239,16 +204,18 @@ def test_multiple_occurrences_stack(self, cmd, m_opt, req_m_opt, m_opt_v, im_m_o req_m_opt.ln_to_cli(), *req_m_opt_v, req_m_opt.ln_to_cli(), *req_m_opt_v, ) - assert m_opt.to_assert_str([*m_opt_v, *im_m_opt_v]) - assert req_m_opt.to_assert_str([*req_m_opt_v, *req_m_opt_v]) - assert cmd.parse_arg_keys(out) == [m_opt.name, req_m_opt.name] + cmd.assert_args( + out, + (m_opt, [*m_opt_v, *im_m_opt_v]), + (req_m_opt, [*req_m_opt_v, *req_m_opt_v]), + ) def test_error_on_missing_required_opt(self, cmd, req_m_opt): out = cmd.gen_error() assert self.err_msgs.missing_required_arg(req_m_opt) in out class TestFlagOpts(Common): - cmdn = Common.cmdn__flag_opts + _cmd = Common.cmd_testers.test_args.flag_opts @pytest.fixture def e_opt(self, cmd): @@ -260,21 +227,19 @@ def i_opt(self, cmd): def test_help_msg(self, cmd, e_opt, i_opt): help = cmd.get_help_msg() - help.assert_opt_at(0, e_opt) - help.assert_opt_at(2, i_opt) + help.assert_opts(e_opt, "help", i_opt, "vk", "v") def test_no_flag_opts_given(self, cmd): out = cmd.run() - assert self.no_args_or_opts_msg in out + cmd.assert_args(out, None) def test_one_flag_opt_given(self, cmd, e_opt): out = cmd.run(e_opt.ln_to_cli()) - assert e_opt.to_assert_str(1) in out + cmd.assert_args(out, (e_opt, 1)) def test_two_flag_opts_given(self, cmd, e_opt, i_opt): out = cmd.run(e_opt.ln_to_cli(), i_opt.ln_to_cli()) - assert e_opt.to_assert_str(1) in out - assert i_opt.to_assert_str(1) in out + cmd.assert_args(out, (e_opt, 1), (i_opt, 1)) def test_multiple_occurrences_stack(self, cmd, e_opt, i_opt): out = cmd.run( @@ -284,8 +249,7 @@ def test_multiple_occurrences_stack(self, cmd, e_opt, i_opt): e_opt.ln_to_cli(), i_opt.ln_to_cli() ) - assert e_opt.to_assert_str(3) in out - assert i_opt.to_assert_str(2) in out + cmd.assert_args(out, (e_opt, 3), (i_opt, 2)) def test_error_on_flag_opt_with_value(self, cmd, i_opt): sv = "single_val" @@ -293,7 +257,7 @@ def test_error_on_flag_opt_with_value(self, cmd, i_opt): assert self.err_msgs.too_many_args(sv) in out class TestOptsWithValueNames(Common): - cmdn = Common.cmdn__opt_vns + _cmd = Common.cmd_testers.test_args.opts_with_value_names @pytest.fixture def e_s_opt(self, cmd): @@ -325,29 +289,22 @@ def mv(self): def test_help_msg(self, cmd, e_s_opt, i_s_opt, m_opt, ln_s_opt): help = cmd.get_help_msg() - help.assert_opt_at(5, i_s_opt) - help.assert_opt_at(4, e_s_opt) - help.assert_opt_at(2, m_opt) - help.assert_opt_at(3, ln_s_opt) + help.assert_opts("help", "vk", m_opt, ln_s_opt, e_s_opt, i_s_opt, "v") def test_single_value_opt_with_value_name(self, cmd, e_s_opt, i_s_opt, sv_e, sv_i): out = cmd.run(i_s_opt.ln_to_cli(), sv_i, e_s_opt.ln_to_cli(), sv_e) - assert i_s_opt.to_assert_str(sv_i) in out - assert e_s_opt.to_assert_str(sv_e) in out - assert cmd.parse_arg_keys(out) == [i_s_opt.name, e_s_opt.name] + cmd.assert_args(out, (i_s_opt, sv_i), (e_s_opt, sv_e)) def test_multi_value_opt_with_value_name(self, cmd, m_opt, mv): out = cmd.run(m_opt.ln_to_cli(), *mv) - assert m_opt.to_assert_str(mv) in out - assert cmd.parse_arg_keys(out) == [m_opt.name] + cmd.assert_args(out, (m_opt, mv)) def test_single_value_opt_with_value_and_long_names(self, cmd, ln_s_opt, sv_i): out = cmd.run(ln_s_opt.ln_to_cli(), sv_i) - assert ln_s_opt.to_assert_str(sv_i) in out - assert cmd.parse_arg_keys(out) == [ln_s_opt.name] + cmd.assert_args(out, (ln_s_opt, sv_i)) class TestOptsWithAliases(Common): - cmdn = Common.cmdn__opt_aliases + _cmd = Common.cmd_testers.test_args.opts_with_aliases @pytest.fixture def s_opt(self, cmd): @@ -403,31 +360,33 @@ def test_help_msg(self, cmd, f_sn_and_al_opt, f_ln_and_al_opt, f_ln_sn_al_opt ): help = cmd.get_help_msg() - help.assert_num_args(0) - help.assert_num_opts(14) - help.assert_opt_at(12, s_opt) - help.assert_opt_at(10, m_opt) - help.assert_opt_at(11, oc_opt) - help.assert_opt_at(2, f_sn_opt) - help.assert_opt_at(9, f_ln_opt) - help.assert_opt_at(1, f_dupl_ln_sn_opt) - help.assert_opt_at(4, f_ln_al_opt) - help.assert_opt_at(0, f_sn_and_al_opt) - help.assert_opt_at(3, f_ln_and_al_opt) - help.assert_opt_at(5, f_sn_al_opt) - help.assert_opt_at(6, f_ln_sn_al_opt) + help.assert_args(None) + help.assert_opts( + f_sn_and_al_opt, + f_dupl_ln_sn_opt, + f_sn_opt, + f_ln_and_al_opt, + f_ln_al_opt, + f_sn_al_opt, + f_ln_sn_al_opt, + "help", + "vk", + f_ln_opt, + m_opt, + oc_opt, + s_opt, + "v" + ) def test_single_val_opt_as_long_name(self, cmd, s_opt, tv): # Try single opt long name out = cmd.run(s_opt.ln_to_cli(), tv) - assert s_opt.to_assert_str(tv) in out - assert cmd.parse_arg_keys(out) == [s_opt.name] + cmd.assert_args(out, (s_opt, tv)) def test_single_val_opt_as_short_name(self, cmd, s_opt, tv): # Try single opt short name out = cmd.run(s_opt.sn_to_cli(), tv) - assert s_opt.to_assert_str(tv) in out - assert cmd.parse_arg_keys(out) == [s_opt.name] + cmd.assert_args(out, (s_opt, tv)) def test_error_on_single_val_opt_name(self, cmd, s_opt, tv): # Try single opt opt name @@ -438,14 +397,12 @@ def test_error_on_single_val_opt_name(self, cmd, s_opt, tv): def test_multi_val_opt_as_long_name(self, cmd, m_opt, tv): # Try multi opt long name out = cmd.run(m_opt.ln_to_cli(), tv, tv) - assert m_opt.to_assert_str([tv, tv]) in out - assert cmd.parse_arg_keys(out) == [m_opt.name] + cmd.assert_args(out, (m_opt, [tv, tv])) def test_multi_val_opt_as_short_name(self, cmd, m_opt, tv): # Try multi opt short name out = cmd.run(m_opt.sn_to_cli(), tv, tv, tv) - assert m_opt.to_assert_str([tv, tv, tv]) in out - assert cmd.parse_arg_keys(out) == [m_opt.name] + cmd.assert_args(out, (m_opt, [tv, tv, tv])) def test_error_on_multi_val_opt_name(self, cmd, m_opt, tv): # Try multi opt opt name @@ -460,24 +417,22 @@ def test_multi_val_opt_ln_sn_stacking(self, cmd, m_opt, tv): m_opt.ln_to_cli(), tv, tv, m_opt.sn_to_cli(), tv ) - assert m_opt.to_assert_str([tv, tv, tv, tv, tv]) in out - assert cmd.parse_arg_keys(out) == [m_opt.name] + cmd.assert_args(out, (m_opt, [tv, tv, tv, tv, tv])) def test_flag_opt_long_name(self, cmd, oc_opt): # Try occurrence counter long name out = cmd.run(oc_opt.ln_to_cli()) - assert oc_opt.to_assert_str(1) in out - assert cmd.parse_arg_keys(out) == [oc_opt.name] + cmd.assert_args(out, (oc_opt, 1)) def test_flag_opt_short_name(self, cmd, oc_opt): # Try occurrence counter short name out = cmd.run(oc_opt.sn_to_cli()) - assert oc_opt.to_assert_str(1) in out + cmd.assert_args(out, (oc_opt, 1)) def test_flag_opt_ln_sn_stacking(self, cmd, oc_opt): # Try occurrence counter with both short and long name out = cmd.run(oc_opt.sn_to_cli(), oc_opt.ln_to_cli(), oc_opt.sn_to_cli(), oc_opt.ln_to_cli()) - assert oc_opt.to_assert_str(4) in out + cmd.assert_args(out, (oc_opt, 4)) def test_error_on_flag_opt_name(self, cmd, oc_opt): # Try occurrence counter opt name @@ -487,7 +442,7 @@ def test_error_on_flag_opt_name(self, cmd, oc_opt): def test_flag_opt_with_short_name_only(self, cmd, f_sn_opt): # Try flag opt short only out = cmd.run(f_sn_opt.sn_to_cli()) - assert f_sn_opt.to_assert_str(1) in out + cmd.assert_args(out, (f_sn_opt, 1)) def test_error_on_short_name_only_opt_name(self, cmd, f_sn_opt): # Try flag opt short only opt name @@ -498,7 +453,7 @@ def test_error_on_short_name_only_opt_name(self, cmd, f_sn_opt): def test_flag_opt_with_long_name_only(self, cmd, f_ln_opt): # Try flag opt long only out = cmd.run(f_ln_opt.ln_to_cli()) - assert f_ln_opt.to_assert_str(1) in out + cmd.assert_args(out, (f_ln_opt, 1)) def test_error_on_long_name_only_opt_name(self, cmd, f_ln_opt): # Try flag opt long only opt name @@ -509,21 +464,20 @@ def test_error_on_long_name_only_opt_name(self, cmd, f_ln_opt): def test_no_conflict_between_ln_and_sn(self, cmd, f_sn_opt, f_dupl_ln_sn_opt): # Try flag opt long name same as another's short name out = cmd.run("--f") - assert f_dupl_ln_sn_opt.to_assert_str(1) in out + cmd.assert_args(out, (f_dupl_ln_sn_opt, 1)) out = cmd.run("--f", "-f") - assert f_dupl_ln_sn_opt.to_assert_str(1) in out - assert f_sn_opt.to_assert_str(1) in out + cmd.assert_args(out, (f_dupl_ln_sn_opt, 1), (f_sn_opt, 1)) def test_short_name_aliasing(self, cmd, f_sn_al_opt): # Try short name aliases out = cmd.run(f'--{f_sn_al_opt.name}', '-a', '-b') - assert f_sn_al_opt.to_assert_str(3) in out + cmd.assert_args(out, (f_sn_al_opt, 3)) def test_sn_with_sn_aliases(self, cmd, f_sn_and_al_opt): # Try short name with aliases out = cmd.run('-c', '-d', '-e') - assert f_sn_and_al_opt.to_assert_str(3) in out + cmd.assert_args(out, (f_sn_and_al_opt, 3)) def test_error_on_opt_name_with_sn_and_sn_aliases(self, cmd, f_sn_and_al_opt): out = cmd.gen_error(f"--{f_sn_and_al_opt.name}", '-d', '-e') @@ -532,12 +486,12 @@ def test_error_on_opt_name_with_sn_and_sn_aliases(self, cmd, f_sn_and_al_opt): def test_long_name_aliasing(self, cmd, f_ln_al_opt): # Try long name aliases out = cmd.run(f"--{f_ln_al_opt.name}", '--fa', '--fb') - assert f_ln_al_opt.to_assert_str(3) in out + cmd.assert_args(out, (f_ln_al_opt, 3)) def test_ln_with_ln_aliases(self, cmd, f_ln_and_al_opt): # Try long name with aliases out = cmd.run('--fc', '--fd', '--fe') - assert f_ln_and_al_opt.to_assert_str(3) in out + cmd.assert_args(out, (f_ln_and_al_opt, 3)) def test_error_on_opt_name_with_ln_and_ln_aliases(self, cmd, f_ln_and_al_opt): out = cmd.gen_error(f"--{f_ln_and_al_opt.name}", '--fd', '--fe') @@ -546,10 +500,10 @@ def test_error_on_opt_name_with_ln_and_ln_aliases(self, cmd, f_ln_and_al_opt): def test_sn_and_ln_aliases_only(self, cmd, f_ln_sn_al_opt): # Try long/short name aliases out = cmd.run(f'--{f_ln_sn_al_opt.name}', '-z', '--sn_ln_1', '--sn_ln_2') - assert f_ln_sn_al_opt.to_assert_str(4) in out + cmd.assert_args(out, (f_ln_sn_al_opt, 4)) class TestHiddenOpts(Common): - cmdn = Common.cmdn__hidden_opt + _cmd = Common.cmd_testers.test_args.hidden_opt @pytest.fixture def h_opt(self, cmd): @@ -561,25 +515,20 @@ def v_opt(self, cmd): def test_help_msg(self, cmd, v_opt): help = cmd.get_help_msg() - help.assert_num_args(0) - help.assert_num_opts(4) - help.assert_help_opt_at(0) - help.assert_vk_opt_at(1) - help.assert_opt_at(3, v_opt) - help.assert_v_opt_at(2) + help.assert_args(None) + help.assert_opts("help", "vk", "v", v_opt) def test_hidden_opt_is_available(self, cmd, h_opt): out = cmd.run(h_opt.ln_to_cli()) - assert h_opt.to_assert_str(1) in out + cmd.assert_args(out, (h_opt, 1)) def test_visible_opt_only(self, cmd, v_opt): out = cmd.run(v_opt.ln_to_cli()) - assert v_opt.to_assert_str(1) in out + cmd.assert_args(out, (v_opt, 1)) def test_hidden_and_visible_opt_only(self, cmd, h_opt, v_opt): out = cmd.run(h_opt.ln_to_cli(), h_opt.ln_to_cli(), v_opt.ln_to_cli()) - assert h_opt.to_assert_str(2) in out - assert v_opt.to_assert_str(1) in out + cmd.assert_args(out, (h_opt, 2), (v_opt, 1)) def test_error_on_random_opt(self, cmd): r_opt = "random" diff --git a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py index 340f469c..f9ea9a06 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py @@ -29,7 +29,6 @@ def test_empty_verbosity_keywords_are_accessible(self): def test_verbosity_keywords_are_accessible(self): out = self.cmd_testers.display_v.run("-k", "t1", "t2", "-v") assert r'Args: {}' in out - print(out) assert "keywords: ['t1', 't2']" in out assert "verbosity: 1" in out diff --git a/test_apps/python_no_app/tests/cmd_extensions/__init__.py b/test_apps/python_no_app/tests/cmd_extensions/__init__.py deleted file mode 100644 index c4c5d516..00000000 --- a/test_apps/python_no_app/tests/cmd_extensions/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# FOR_PR not sure if needed? \ No newline at end of file diff --git a/test_apps/python_no_app/tests/test_cli.py b/test_apps/python_no_app/tests/test_cli.py index c47ba265..ee56d1b4 100644 --- a/test_apps/python_no_app/tests/test_cli.py +++ b/test_apps/python_no_app/tests/test_cli.py @@ -1,7 +1,6 @@ -# FOR_PR add T_EVAL from .cli.tests__global_cmds import T_GlobalCmds from .cli.tests__cmd__credentials import T_Credentials -# from .cli.tests__cmd__eval import T_Eval +from .cli.tests__cmd__eval import T_Eval class TestGlobalCmds(T_GlobalCmds): pass @@ -9,5 +8,5 @@ class TestGlobalCmds(T_GlobalCmds): class TestCredentials(T_Credentials): pass -# class TestEval(T_Credentials): -# pass +class TestEval(T_Eval): + pass diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index 181697ad..3c2bae0b 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -1,26 +1,16 @@ -# FOR_PR clean up - from origen.helpers.regressions import cli from origen.helpers import calling_filename from pathlib import Path, PurePosixPath import re -# from origen.helpers.regressions.cli import CLI - -# def run(**args): -# print(f"Arg Keys: {list(args.keys())}") -# if len(args) > 0: -# for n, arg in args.items(): -# print(f"Arg: {n} ({arg.__class__}): {arg}") -# else: -# print("No args or opts given!") +from .cmd_models import Cmd, CmdArg, CmdOpt, CmdExtOpt +from .cmd_models.aux import Aux +from .cmd_models.exts import ExtensionDrivers +from .cmd_models.plugins import Plugins def apply_ext_output_args(mod): - # import inspect from origen.boot import before_cmd, after_cmd, clean_up from .ext_helpers import do_action - # print(inspect.stack()[1][0]) - # mod = inspect.getmodule(inspect.stack()[1][0]) n = get_ext_name() def before(**args): @@ -61,21 +51,13 @@ def output_args(preface, args): for n, arg in args.items(): retn.append(f"Arg: {preface}: {n} ({arg.__class__}): {arg}") else: - retn.append(f"Arg: {preface}: No extension args or opts given!") + retn.append(f"Arg: {preface}: No args or opts given!") return '\n'.join(retn) def before_cmd_ext_args_str(ext_args, ext_name=None, frame=None): if ext_name is None: ext_name = get_ext_name(frame=frame) return output_args(f"(Ext) ({ext_name}) (Before Cmd)", ext_args) - # retn = [] - # retn << f"Ext Arg Keys ({ext_name}) (Before Cmd): {list(ext_args.keys())}" - # if len(ext_args) > 0: - # for n, arg in ext_args.items(): - # retn << f"Ext Arg ({ext_name}) (Before Cmd): {n} ({arg.__class__}): {arg}" - # else: - # retn << f"({ext_name}) (Before Cmd): No extension args or opts given!" - # return retn def after_cmd_ext_args_str(ext_args, ext_name=None): if ext_name is None: @@ -87,1108 +69,6 @@ def clean_up_ext_args_str(ext_args, ext_name=None): ext_name = get_ext_name() return output_args(f"(Ext) ({ext_name}) (CleanUp Cmd)", ext_args) -# TODO shouldn't be needed anymore -class PrintExtArgs: - def __init_subclass__(cls) -> None: - cls.apply_ext_methods() - return super().__init_subclass__() - - @classmethod - def apply_ext_methods(cls): - # print(cls) - # fail - from origen.boot import before_cmd, after_cmd, clean_up - before_cmd(cls.print_args_before) - after_cmd(cls.print_args_after) - clean_up(cls.print_args_clean) - - @classmethod - def print_args_before(cls, **args): - print(before_cmd_ext_args_str(args)) - - @classmethod - def print_args_after(cls, **args): - print(after_cmd_ext_args_str(args)) - - @classmethod - def print_args_clean(cls, **args): - print(clean_up_ext_args_str(args)) - - -# from .. import root -aux_cmds_dir = Path(__file__).parent.parent.joinpath("aux_cmds") - -class Cmd(cli.cmd.Cmd): - # def __init__(self, *args, **kwargs): - # cli.cmd.Cmd.__init__(self, *args, **kwargs) - - def assert_args(self, output, *vals): - ext_args = {} - args = [] - exp_ext_vals = {} - cmd_args = [] - cmd_arg = None - - for i, v in enumerate(vals): - opts = v[1] if isinstance(v[1], dict) else {} - opts = v[2] if len(v) > 2 else {} - - if isinstance(v[0], CmdExtOpt): - ext = ext_args.setdefault(v[0].src_name, {}) - if opts.get("Before", True): - before = ext.setdefault("Before Cmd", []) - if not (("Before" in opts and opts["Before"] is None) or v[1] is None): - before.append(v[0].name) - if opts.get("After", True): - after = ext.setdefault("After Cmd", []) - if not (("After" in opts and opts["After"] is None) or v[1] is None): - after.append(v[0].name) - if opts.get("CleanUp", True): - clean_up = ext.setdefault("CleanUp Cmd", []) - if not (("CleanUp" in opts and opts["CleanUp"] is None) or v[1] is None): - clean_up.append(v[0].name) - # ext_args.setdefault(v[0].src_name, []).append() - else: - args.append(v[0]) - cmd_arg = v[0] - expected = v[0].to_assert_str(v[1], **opts) - if isinstance(expected, str): - expected = [expected] - - if isinstance(v[0], CmdExtOpt): - vals = exp_ext_vals.setdefault(v[0].src_name, [(v[0], None)]) - # if expected == {"Before": {}, "After": {}, "CleanUp": {}}: - if not (v[1] is None and ("Before" not in opts and "After" not in opts and "CleanUp" not in opts)): - if vals[0][1] is None: - exp_ext_vals[v[0].src_name] = [] - vals = exp_ext_vals[v[0].src_name] - vals.append((v[0], expected)) - else: - if v[1] is not None: - cmd_args.append(expected) - # for e in expected: - # print(f"expecting: {e}") - # assert e in output - if len(cmd_args) == 0: - cmd_arg.to_assert_str(None) - else: - for exp in cmd_args: - for e in exp: - print(f"expecting: {e}") - assert e in output - for ns, opt in exp_ext_vals.items(): - if len(opt) == 1 and opt[0][1] is None: - for e in opt[0][0].to_assert_str(None): - print(f"expecting: {e}") - assert e in output - else: - for exp in opt: - for e in exp[1]: - print(f"expecting: {e}") - assert e in output - - actual = self.parse_arg_keys(output) - assert len(actual) == len(args) - # assert actual == args - actual = self.parse_ext_keys(output) - print(actual) - print(ext_args) - assert actual == ext_args - - @classmethod - def parse_arg_keys(cls, cmd_output): - return eval(cmd_output.split("All Keys: (CMD):", 1)[1].split("\n")[0]) - - @classmethod - def parse_ext_keys(cls, cmd_output): - arg_lines = cmd_output.split("All Keys: (Ext) ") - retn = {} - for a in arg_lines[1:]: - a = a.split("\n")[0] - n, keys = a.split(":", 1) - n, phase = n.split(") (") - retn.setdefault(n[1:], {})[phase[0:-1]] = eval(keys) - return retn - -class CmdArgOpt(cli.cmd.CmdArgOpt): - def to_assert_str(self, vals, **opts): - if vals is None: - return f"Arg: (CMD): {self.name}: No extension args or opts given!" - elif self.multi: - c = list - if self.use_delimiter: - vals = [x for v in vals for x in v.split(',')] - elif isinstance(vals, int): - c = int - else: - c = str - return f"Arg: (CMD): {self.name} ({c}): {vals}" - - def assert_present(self, vals, in_str, **opts): - for e in self.to_assert_str(vals, **opts): - assert e in in_str - -class CmdArg(cli.cmd.CmdArg, CmdArgOpt): - pass - -class CmdOpt(cli.cmd.CmdOpt, CmdArgOpt): - pass - -class CmdExtOpt(cli.cmd.CmdExtOpt, CmdArgOpt): - def to_assert_str(self, vals, **opts): - if isinstance(vals, dict): - opts = vals - preface = f"Arg: (Ext) ({self.src_name})" - - retn = [] - before_val = opts["Before"] if "Before" in opts else vals - after_val = opts["After"] if "After" in opts else vals - cleanup_val = opts["CleanUp"] if "CleanUp" in opts else vals - if not before_val is False: - if before_val is None: - retn.append(f"{preface} (Before Cmd):{CmdArgOpt.to_assert_str(self, before_val).split(':', 3)[3]}") - else: - retn.append(f"{preface} (Before Cmd):{CmdArgOpt.to_assert_str(self, before_val).split(':', 2)[2]}") - if not after_val is False: - if after_val is None: - retn.append(f"{preface} (After Cmd):{CmdArgOpt.to_assert_str(self, after_val).split(':', 3)[3]}") - else: - retn.append(f"{preface} (After Cmd):{CmdArgOpt.to_assert_str(self, after_val).split(':', 2)[2]}") - if not cleanup_val is False: - if cleanup_val is None: - retn.append(f"{preface} (CleanUp Cmd):{CmdArgOpt.to_assert_str(self, cleanup_val).split(':', 3)[3]}") - else: - retn.append(f"{preface} (CleanUp Cmd):{CmdArgOpt.to_assert_str(self, cleanup_val).split(':', 2)[2]}") - return retn - -class ExtensionDrivers: - exts_workout_cfg = aux_cmds_dir.joinpath("exts_workout_cfg.toml") - exts_workout_toml = aux_cmds_dir.joinpath("exts_workout.toml") - pl_ext_stacking_from_aux_cfg = aux_cmds_dir.joinpath("pl_ext_stacking_from_aux_cfg.toml") - pl_ext_stacking_from_aux_toml = aux_cmds_dir.joinpath("pl_ext_stacking_from_aux.toml") - core_cmd_exts_cfg = aux_cmds_dir.joinpath("core_cmd_exts_cfg.toml") - core_cmd_exts_toml = aux_cmds_dir.joinpath("core_cmd_exts.toml") - exts = { - "plugin.python_plugin.plugin_test_args": { - "exts": CmdExtOpt.from_src( - "exts_workout", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "flag_extension", - help="Single flag extension", - sn="f", - ln="flag_ext", - ), - CmdExtOpt( - "single_val_opt", - takes_value=True, - sn="s", - help="Extended opt taking a single value", - ), - CmdExtOpt( - "multi_val_opt", - ln="multi", - sn_aliases=["m"], - ln_aliases=["multi_non_delim"], - multi=True, - value_name="MULTI_VAL", - help="Extended opt taking a multiple, non-delimited values", - ), - CmdExtOpt( - "multi_val_delim_opt", - ln_aliases=["multi_delim"], - multi=True, - use_delimiter=True, - help="Extended opt taking a multiple, delimited values", - ), - CmdExtOpt( - "exts_workout_action", - takes_value=True, - required=True, - multi=True, - help="Additional actions for testing purposes", - ), - CmdExtOpt( - "hidden_opt", - hidden=True, - help="Hidden extended opt", - ), - ), - "toml": exts_workout_toml, - }, - "plugin.python_plugin.plugin_test_args.subc": { - "exts": CmdExtOpt.from_src( - "exts_workout", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "exts_workout_action", - multi=True, - help="Action for the extended opt", - ln="action", - ), - ), - "toml": exts_workout_toml, - }, - "plugin.python_plugin.plugin_test_ext_stacking": { - "exts": [ - *CmdExtOpt.from_src( - "exts_workout", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "ext_action", - multi=True, - help="Action for the extended opt", - ln="action", - ), - ), - *CmdExtOpt.from_src( - "pl_ext_stacking_from_aux", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "pl_ext_stacking_action", - multi=True, - help="Action from pl_ext_stacking aux cmds", - ), - CmdExtOpt( - "pl_ext_stacking_flag", - help="Flag from pl_ext_stacking aux cmds", - ), - ), - *CmdExtOpt.from_src( - "python_plugin_the_second", - cli.cmd.SrcTypes.PLUGIN, - CmdExtOpt( - "pl_the_2nd_ext_action", - help="Action from pl_the_2nd plugin", - multi=True, - ), - CmdExtOpt( - "pl_the_2nd_ext_flag", - help="Flag from pl_the_2nd plugin", - ), - ) - ] - }, - "plugin.python_plugin.plugin_test_ext_stacking.subc": { - "exts": [ - *CmdExtOpt.from_src( - "exts_workout", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "ext_action_subc", - multi=True, - help="Action for the extended opt subc", - ln="action", - ), - ), - *CmdExtOpt.from_src( - "pl_ext_stacking_from_aux", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "pl_ext_stacking_action_subc", - multi=True, - help="Action from pl_ext_stacking aux cmds subc", - ), - CmdExtOpt( - "pl_ext_stacking_flag_subc", - help="Flag from pl_ext_stacking aux cmds subc", - ), - ), - *CmdExtOpt.from_src( - "python_plugin_the_second", - cli.cmd.SrcTypes.PLUGIN, - CmdExtOpt( - "pl_the_2nd_ext_action_subc", - help="Action from pl_the_2nd plugin subc", - multi=True, - ), - CmdExtOpt( - "pl_the_2nd_ext_flag_subc", - help="Flag from pl_the_2nd plugin subc", - ), - ) - ] - }, - "aux.dummy_cmds.dummy_cmd": { - "exts": [ - *CmdExtOpt.from_src( - "exts_workout", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "exts_workout_action", - multi=True, - help="Action for the extended opt", - ln="action", - ), - CmdExtOpt( - "exts_workout_flag", - help="Flag for the extended opt", - ), - ), - *CmdExtOpt.from_src( - "pl_ext_stacking_from_aux", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "pl_ext_stacking_action", - multi=True, - help="Action from pl_ext_stacking aux cmds", - ), - CmdExtOpt( - "pl_ext_stacking_from_aux_flag", - help="Flag from pl_ext_stacking aux cmds", - ), - ), - *CmdExtOpt.from_src( - "python_plugin", - cli.cmd.SrcTypes.PLUGIN, - CmdExtOpt( - "python_plugin_action", - help="Action from python_plugin", - multi=True, - ), - CmdExtOpt( - "python_plugin_flag", - help="Flag from python_plugin", - ), - ), - *CmdExtOpt.from_src( - "python_plugin_the_second", - cli.cmd.SrcTypes.PLUGIN, - CmdExtOpt( - "python_plugin_the_second_action", - help="Action from pl_the_2nd plugin", - multi=True, - ), - CmdExtOpt( - "python_plugin_the_second_flag", - help="Flag from pl_the_2nd plugin", - ), - ), - ], - }, - "aux.dummy_cmds.dummy_cmd.subc": { - "exts": [ - *CmdExtOpt.from_src( - "exts_workout", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "exts_workout_action", - multi=True, - help="Action for the extended opt subc", - ln="action", - ), - CmdExtOpt( - "exts_workout_flag_subc", - help="Flag for the extended opt subc", - ), - ), - *CmdExtOpt.from_src( - "pl_ext_stacking_from_aux", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "pl_ext_stacking_from_aux_action_subc", - multi=True, - help="Action from pl_ext_stacking aux cmds subc", - ), - CmdExtOpt( - "pl_ext_stacking_from_aux_flag_subc", - help="Flag from pl_ext_stacking aux cmds subc", - ), - ), - *CmdExtOpt.from_src( - "python_plugin", - cli.cmd.SrcTypes.PLUGIN, - CmdExtOpt( - "python_plugin_action_subc", - help="Action from python_plugin subc", - multi=True, - ), - CmdExtOpt( - "python_plugin_flag_subc", - help="Flag from python_plugin subc", - ), - ), - *CmdExtOpt.from_src( - "python_plugin_the_second", - cli.cmd.SrcTypes.PLUGIN, - CmdExtOpt( - "python_plugin_the_second_action_subc", - help="Action from pl_the_2nd plugin subc", - multi=True, - ), - CmdExtOpt( - "python_plugin_the_second_flag_subc", - help="Flag from pl_the_2nd plugin subc", - ), - ), - ] - }, - "generic_core_ext": { - "exts": [ - *CmdExtOpt.from_src( - "pl_ext_cmds", - cli.cmd.SrcTypes.PLUGIN, - CmdExtOpt( - "pl_ext_cmds_generic_ext", - help="Generic ext from pl_ext_cmds plugin", - ), - ), - *CmdExtOpt.from_src( - "core_cmd_exts", - cli.cmd.SrcTypes.AUX, - CmdExtOpt( - "core_cmd_exts_generic_core_ext", - help="Generic core ext from aux commands", - ), - ), - ] - } - } - -class PlExtCmds(cli.CLI): - def __init__(self): - self.name = "pl_ext_cmds" - -class PythonPlugin(cli.CLI): - Cmd = Cmd - - def __init__(self): - self.name = "python_plugin" - self.python_plugin = self.pl_cmd( - self.name - ) - self.echo = self.pl_sub_cmd( - self.name, - "echo", - help="Echos the input", - args=[CmdArg( - name="input", - help="Input to echo", - use_delimiter=True, - )], - opts=[CmdOpt( - name="repeat", - help="Echo again (repeat)", - ln="repeat", - sn="r", - )], - ) - self.plugin_says_hi = self.pl_sub_cmd( - self.name, - "plugin_says_hi", - help="Say 'hi' from the python plugin", - opts=[ - CmdOpt( - name="times", - help="Number of times for the python plugin to say", - value_name="TIMES", - ln="times", - sn="t" - ), - CmdOpt( - name="loudly", - help="LOUDLY say hi", - ln="loudly", - sn="l" - ), - CmdOpt( - name="to", - help="Specify who should be greeted", - multi=True, - ) - ] - ) - self.plugin_test_args = self.pl_sub_cmd( - self.name, - "plugin_test_args", - help="Test command for a plugin", - args=[ - CmdArg( - name="single_arg", - help="Single Arg", - ), - CmdArg( - name="multi_arg", - help="Multi Arg", - multi=True, - ), - ], - opts=[ - CmdOpt( - name="opt_taking_value", - help="Opt taking a single value", - ln="opt", - ), - CmdOpt( - name="flag_opt", - help="Flag Opt", - ln="flag", - ), - ], - subcmds=[ - Cmd( - "subc", - help="Test Subcommand for plugin_test_args", - args=[ - CmdArg( - name="single_arg", - help="Single Arg For Subcommand", - ), - ], - opts=[ - CmdOpt( - name="flag_opt", - help="Flag Opt For Subcommand", - ), - ] - ) - ] - ) - self.plugin_test_ext_stacking = self.pl_sub_cmd( - self.name, - "plugin_test_ext_stacking", - help="Test ext stacking for plugin command", - args=[ - CmdArg( - name="single_arg", - help="Single Arg", - ), - ], - opts=[ - CmdOpt( - name="flag_opt", - help="Flag Opt", - ), - ], - subcmds=[ - Cmd( - "subc", - help="Test Subcommand for ext stacking", - args=[ - CmdArg( - name="single_arg", - help="Single Arg", - ), - ], - opts=[ - CmdOpt( - name="flag_opt", - help="Flag Opt", - ), - ], - ) - ] - ) - - @property - def base_cmd(self): - return self.python_plugin - - @property - def ordered_subcmds(self): - return [ - self.echo, - "help", - self.plugin_says_hi, - self.plugin_test_args, - self.plugin_test_ext_stacking - ] - -class PythonPluginNoCmds(cli.CLI): - def __init__(self): - self.name = "python_plugin_no_cmds" - self.python_plugin_no_cmds = self.pl_cmd( - self.name - ) - - @property - def base_cmd(self): - return self.python_plugin_no_cmds - -class PythonPluginTheSecond(cli.CLI): - def __init__(self): - self.name = "python_plugin_the_second" - self.python_plugin_the_second = self.pl_cmd( - self.name - ) - - @property - def base_cmd(self): - return self.python_plugin_the_second - -class TestAppsSharedTestHelpers(cli.CLI): - def __init__(self): - self.name = "test_apps_shared_test_helpers" - self.test_apps_shared_test_helpers = self.pl_cmd( - self.name - ) - - @property - def base_cmd(self): - return self.test_apps_shared_test_helpers - -class Plugins: - def __init__(self): - self.plugins = { - "pl_ext_cmds": PlExtCmds(), - "python_plugin": PythonPlugin(), - "python_plugin_no_cmds": PythonPluginNoCmds(), - "python_plugin_the_second": PythonPluginTheSecond(), - "test_apps_shared_test_helpers": TestAppsSharedTestHelpers() - } - - @property - def python_no_app_collected_pl_names(self): - return list(self.plugins.keys()) - - @property - def python_no_app_config_pl_names(self): - return [ - 'python_plugin', - 'python_plugin_the_second', - 'python_plugin_no_cmds' - ] - - def __getattr__(self, name): - if name in self.plugins: - return self.plugins[name] - else: - super - -class AuxCmdsFromCliDir(cli.CLI): - Cmd = Cmd - - def __init__(self): - self.name = "aux_cmds_from_cli_dir" - self.aux_cmds_from_cli_dir = self.aux_cmd( - self.name, - help="Aux Commands from the Origen CLI directory", - subcmds = [ - Cmd("cli_dir_says_hi") - ], - ) - - @property - def base_cmd(self): - return self.aux_cmds_from_cli_dir - -class AddAuxCmds(cli.CLI): - Cmd = Cmd - - def __init__(self): - self.name = "add_aux_cmd" - self.add_aux_cmd = self.aux_cmd( - self.name, - help=None, - ) - - @property - def base_cmd(self): - return self.add_aux_cmd - -class CmdTesters(cli.CLI): - Cmd = Cmd - # cfg_toml - - def __init__(self): - self.name = "cmd_testers" - self.cmd_testers = self.aux_cmd( - self.name, - help="Commands to assist in testing aux commands when no app is present", - subcmds=[ - Cmd( - "error_cases", - help="Commands to test error messages and improper command configuration", - subcmds=[ - Cmd( - "missing_impl_dir", - subcmds=[ - Cmd("missing_impl_dir_subc") - ] - ), - Cmd("missing_impl_file"), - Cmd("test_missing_run_function"), - Cmd("test_exception_in_run"), - ] - ), - Cmd("python_no_app_tests", help="Test commands for python-no-app workspace"), - Cmd( - "test_arguments", - help="Test various argument and option schemes from commands", - subcmds=[ - Cmd("display_verbosity_opts"), - Cmd( - "no_args_or_opts", - help="Command taking no arguments or options" - ), - Cmd( - "optional_arg", - help="Command taking a single, optional argument", - args=[CmdArg("single_val", "Single value")], - ), - Cmd( - "required_arg", - help="Command taking a required and optional arg", - args=[ - CmdArg("required_val", "Single required value", required=True), - CmdArg("optional_val", "Single optional value") - ], - ), - Cmd( - "multi_arg", - help="Command taking a multi-arg", - args=[ - CmdArg("multi_arg", "Multi-arg value", True) - ], - ), - Cmd( - "delim_multi_arg", - help="Command taking a delimited multi-arg", - args=[ - CmdArg("delim_m_arg", "Delimited Multi-arg value ('multiple' implied)", True) - ], - ), - Cmd( - "single_and_multi_arg", - help="Command taking a single and multi-arg", - args=[ - CmdArg("single_val", "Single value"), - CmdArg("multi_arg", "Multi-arg value", True) - ], - ), - Cmd( - "args_with_value_names", - help="Single and multi arg with value custom value names", - args=[ - CmdArg("s_arg", "Single value arg with custom value name", value_name="Single Arg Val"), - CmdArg("m_arg", "Multi value arg with custom value name", True, value_name="Multi Arg Val") - ], - ), - Cmd( - "single_value_optional_opt", - help="Command taking optional, single option", - opts=[ - CmdOpt( - name="implicit_single_val", - help='Implicit non-required single value', - takes_value=True, - required=False, - ), - CmdOpt( - name="explicit_single_val", - help='Explicit non-required single value', - takes_value=True, - required=False, - ), - ] - ), - Cmd( - "single_value_required_opt", - help="Command with single-value optional and required options", - opts=[ - CmdOpt( - name="non_req_val", - help="Non-required single value", - takes_value=True, - ), - CmdOpt( - name="req_val", - help="Required single value", - takes_value=True, - required=True, - ), - ] - ), - Cmd( - "multi_opts", - help="Command with multi-value optional and required options", - opts=[ - CmdOpt( - name="m_opt", - help="Opt with multiple values", - multi=True, - ), - CmdOpt( - name="im_m_opt", - help="Opt accepting multiple values were 'takes value' is implied", - multi=True, - ), - CmdOpt( - name="req_m_opt", - help="Required opt accepting multiple values", - multi=True, - required=True, - ), - CmdOpt( - name="d_m_opt", - help="Delimited multi opt", - multi=True, - ), - CmdOpt( - name="d_im_m_opt", - help="Delimited opt where 'multi' and 'takes value' is implied", - multi=True, - ), - ] - ), - Cmd( - "flag_opts", - help="Command with flag-style options only", - opts=[ - CmdOpt( - name="im_f_opt", - help="Stackable flag opt with 'takes value=false' implied", - ), - CmdOpt( - name="ex_f_opt", - help="Stackable flag opt with 'takes value=false' set", - ), - ] - ), - Cmd( - "opts_with_value_names", - help="Command with single/multi-opts with custom value names", - opts=[ - CmdOpt( - name="s_opt_nv_im_tv", - help="Single opt with value name, implying 'takes_value'=true", - value_name="s_val_impl", - ), - CmdOpt( - name="s_opt_nv_ex_tv", - help="Single opt with value name and explicit 'takes_value'=true", - value_name="s_val_expl", - takes_value=True, - ), - CmdOpt( - name="m_opt_named_val", - help="Multi-opt with value name", - value_name="m_val", - multi=True, - ), - CmdOpt( - name="s_opt_ln_nv", - help="Single opt with long name and value name", - value_name="ln_nv", - ), - ] - ), - Cmd( - "opts_with_aliases", - help="Command with option aliasing, custom long, and short names", - opts=[ - CmdOpt( - name="single_opt", - help="Single opt with long/short name", - takes_value=True, - ln="s_opt", - sn="s" - ), - CmdOpt( - name="multi_opt", - help="Multi-opt with long/short name", - takes_value=True, - multi=True, - ln="m_opt", - sn="m" - ), - CmdOpt( - name="occurrence_counter", - help="Flag opt with long/short name", - ln="cnt", - sn="o", - ), - CmdOpt( - name="flag_opt_short_name", - help="Flag opt with short name only", - sn="f" - ), - CmdOpt( - name="flag_opt_long_name", - help="Flag opt with long name only", - ln="ln_f_opt" - ), - CmdOpt( - name="flag_opt_dupl_ln_sn", - help="Flag opt with ln matching another's sn", - ln="f" - ), - CmdOpt( - name="fo_sn_aliases", - help="Flag opt with short aliases", - sn_aliases=['a', 'b'] - ), - CmdOpt( - name="fo_sn_and_aliases", - help="Flag opt with short name and short aliases", - sn="c", - sn_aliases=['d', 'e'] - ), - CmdOpt( - name="fo_ln_aliases", - help="Flag opt with long aliases", - ln_aliases=['fa', 'fb'] - ), - CmdOpt( - name="fo_ln_and_aliases", - help="Flag opt with long name and long aliases", - ln="fc", - ln_aliases=['fd', 'fe'] - ), - CmdOpt( - name="fo_sn_ln_aliases", - help="Flag opt with long and short aliases", - ln_aliases=['sn_ln_1', 'sn_ln_2'], - sn_aliases=['z'], - ), - ] - ), - Cmd( - "hidden_opt", - help="Command with a hidden opt", - opts=[ - CmdOpt( - name="hidden_opt", - help="Hidden opt", - hidden=True, - ), - CmdOpt( - # name="non_hidden_opt", - name="visible_opt", - help="Visible, non-hidden, opt", - ), - ] - ), - ] - ), - Cmd("test_current_command", help="Tests origen.current_command"), - Cmd( - "test_nested_level_1", - help="Tests origen.current_command L1", - subcmds=[ - Cmd( - "test_nested_level_2", - help="Tests origen.current_command L2", - subcmds=[ - Cmd("test_nested_level_3_a", help="Tests origen.current_command L3a"), - Cmd("test_nested_level_3_b", help="Tests origen.current_command L3b"), - ] - ) - ] - ), - ] - ) - # self.test_arguments = self.aux_sub_cmd( - # self.name, - # "test_arguments", - # ) - # self.error_cases = self.aux_sub_cmd( - # self.name, - # "error_cases" - # ) - # self.display_cc_verbosity = self.aux_sub_cmd( - # self.name, - # "display_cc_verbosity" - # ) - - @property - def base_cmd(self): - return self.cmd_testers - - @property - def test_args(self): - return self.base_cmd.test_arguments - - @property - def display_v(self): - return self.test_args.display_verbosity_opts - - @property - def error_cases(self): - return self.base_cmd.error_cases - - @property - def subc_l1(self): - return self.base_cmd.test_nested_level_1 - - @property - def subc_l2(self): - return self.subc_l1.test_nested_level_2 - - @property - def subc_l3_a(self): - return self.subc_l2.test_nested_level_3_a - - @property - def subc_l3_b(self): - return self.subc_l2.test_nested_level_3_b - - -class DummyCmds(cli.CLI): - Cmd = Cmd - cfg_toml = aux_cmds_dir.joinpath("dummy_cmds_cfg.toml") - - def __init__(self): - self.name = "dummy_cmds" - self.dummy_cmd = self.aux_sub_cmd( - self.name, - "dummy_cmd", - help="Dummy Aux Command", - args=[ - CmdArg( - name="action_arg", - help="Dummy Aux Action", - multi=True, - ), - ], - subcmds=[ - Cmd( - "subc", - help="Dummy Aux Subcommand", - args=[ - CmdArg( - name="action_arg", - help="Dummy Aux Subc Action", - multi=True, - ), - ], - opts=[ - CmdOpt( - name="flag_opt", - help="Dummy Aux Subc Flag", - ), - ], - ) - ], - from_config=self.cfg_toml - ) - -class PythonNoAppAuxCmds(cli.CLI): - Cmd = Cmd - - def __init__(self): - self.name = "python_no_app_aux_cmds" - self.python_no_app_aux_cmds = self.aux_sub_cmd( - self.name, - "python_no_app_aux_cmds" - ) - - @property - def base_cmd(self): - return self.python_no_app_aux_cmds - -class AuxNamespaces: - def __init__(self) -> None: - self.dummy_cmds = DummyCmds() - self.cmd_testers = CmdTesters() - self.python_no_app_aux_cmds = PythonNoAppAuxCmds() - self.aux_cmds_from_cli_dir = AuxCmdsFromCliDir() - self.add_aux_cmd = AddAuxCmds() - -class Aux: - namespaces = AuxNamespaces() - ns = namespaces - class CLIShared(cli.CLI): Cmd = Cmd diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py new file mode 100644 index 00000000..d976deff --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py @@ -0,0 +1,141 @@ +from origen.helpers.regressions import cli + +class Cmd(cli.cmd.Cmd): + def assert_args(self, output, *vals): + ext_args = {} + args = [] + exp_ext_vals = {} + cmd_args = [] + if vals[0] is None: + vals = () + + for v in vals: + opts = v[1] if isinstance(v[1], dict) else {} + opts = v[2] if len(v) > 2 else {} + + if isinstance(v[0], CmdExtOpt): + ext = ext_args.setdefault(v[0].src_name, {}) + if opts.get("Before", True): + before = ext.setdefault("Before Cmd", []) + if not (("Before" in opts and opts["Before"] is None) or v[1] is None): + before.append(v[0].name) + if opts.get("After", True): + after = ext.setdefault("After Cmd", []) + if not (("After" in opts and opts["After"] is None) or v[1] is None): + after.append(v[0].name) + if opts.get("CleanUp", True): + clean_up = ext.setdefault("CleanUp Cmd", []) + if not (("CleanUp" in opts and opts["CleanUp"] is None) or v[1] is None): + clean_up.append(v[0].name) + else: + args.append(v[0]) + expected = v[0].to_assert_str(v[1], **opts) + if isinstance(expected, str): + expected = [expected] + + if isinstance(v[0], CmdExtOpt): + vals = exp_ext_vals.setdefault(v[0].src_name, [(v[0], None)]) + if not (v[1] is None and ("Before" not in opts and "After" not in opts and "CleanUp" not in opts)): + if vals[0][1] is None: + exp_ext_vals[v[0].src_name] = [] + vals = exp_ext_vals[v[0].src_name] + vals.append((v[0], expected)) + else: + if v[1] is not None: + cmd_args.append(expected) + if len(cmd_args) == 0: + e = "All Keys: (CMD): []" + print(f"expecting: {e}") + assert e in output + + e = "Arg: (CMD): No args or opts given!" + print(f"expecting: {e}") + assert e in output + else: + for exp in cmd_args: + for e in exp: + print(f"expecting: {e}") + assert e in output + for ns, opt in exp_ext_vals.items(): + if len(opt) == 1 and opt[0][1] is None: + for e in opt[0][0].to_assert_str(None): + print(f"expecting: {e}") + assert e in output + else: + for exp in opt: + for e in exp[1]: + print(f"expecting: {e}") + assert e in output + + actual = self.parse_arg_keys(output) + assert len(actual) == len(args) + actual = self.parse_ext_keys(output) + print(actual) + print(ext_args) + assert actual == ext_args + + @classmethod + def parse_arg_keys(cls, cmd_output): + return eval(cmd_output.split("All Keys: (CMD):", 1)[1].split("\n")[0]) + + @classmethod + def parse_ext_keys(cls, cmd_output): + arg_lines = cmd_output.split("All Keys: (Ext) ") + retn = {} + for a in arg_lines[1:]: + a = a.split("\n")[0] + n, keys = a.split(":", 1) + n, phase = n.split(") (") + retn.setdefault(n[1:], {})[phase[0:-1]] = eval(keys) + return retn + +class CmdArgOpt(cli.cmd.CmdArgOpt): + def to_assert_str(self, vals, **opts): + if vals is None: + return f"Arg: (CMD): {self.name}: No args or opts given!" + elif self.multi: + c = list + if self.use_delimiter: + vals = [x for v in vals for x in v.split(',')] + elif isinstance(vals, int): + c = int + else: + c = str + return f"Arg: (CMD): {self.name} ({c}): {vals}" + + def assert_present(self, vals, in_str, **opts): + for e in self.to_assert_str(vals, **opts): + assert e in in_str + +class CmdArg(cli.cmd.CmdArg, CmdArgOpt): + pass + +class CmdOpt(cli.cmd.CmdOpt, CmdArgOpt): + pass + +class CmdExtOpt(cli.cmd.CmdExtOpt, CmdArgOpt): + def to_assert_str(self, vals, **opts): + if isinstance(vals, dict): + opts = vals + preface = f"Arg: (Ext) ({self.src_name})" + + retn = [] + before_val = opts["Before"] if "Before" in opts else vals + after_val = opts["After"] if "After" in opts else vals + cleanup_val = opts["CleanUp"] if "CleanUp" in opts else vals + if not before_val is False: + if before_val is None: + retn.append(f"{preface} (Before Cmd):{CmdArgOpt.to_assert_str(self, before_val).split(':', 3)[3]}") + else: + retn.append(f"{preface} (Before Cmd):{CmdArgOpt.to_assert_str(self, before_val).split(':', 2)[2]}") + if not after_val is False: + if after_val is None: + retn.append(f"{preface} (After Cmd):{CmdArgOpt.to_assert_str(self, after_val).split(':', 3)[3]}") + else: + retn.append(f"{preface} (After Cmd):{CmdArgOpt.to_assert_str(self, after_val).split(':', 2)[2]}") + if not cleanup_val is False: + if cleanup_val is None: + retn.append(f"{preface} (CleanUp Cmd):{CmdArgOpt.to_assert_str(self, cleanup_val).split(':', 3)[3]}") + else: + retn.append(f"{preface} (CleanUp Cmd):{CmdArgOpt.to_assert_str(self, cleanup_val).split(':', 2)[2]}") + return retn \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/aux.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/aux.py new file mode 100644 index 00000000..b47dac24 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/aux.py @@ -0,0 +1,426 @@ +from pathlib import Path +from origen.helpers.regressions import cli +from . import Cmd, CmdArg, CmdOpt + +aux_cmds_dir = Path(__file__).parent.parent.parent.joinpath("aux_cmds") + +class AuxCmdsFromCliDir(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "aux_cmds_from_cli_dir" + self.aux_cmds_from_cli_dir = self.aux_cmd( + self.name, + help="Aux Commands from the Origen CLI directory", + subcmds = [ + Cmd("cli_dir_says_hi") + ], + ) + + @property + def base_cmd(self): + return self.aux_cmds_from_cli_dir + +class AddAuxCmds(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "add_aux_cmd" + self.add_aux_cmd = self.aux_cmd( + self.name, + help=None, + ) + + @property + def base_cmd(self): + return self.add_aux_cmd + +class CmdTesters(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "cmd_testers" + self.cmd_testers = self.aux_cmd( + self.name, + help="Commands to assist in testing aux commands when no app is present", + subcmds=[ + Cmd( + "error_cases", + help="Commands to test error messages and improper command configuration", + subcmds=[ + Cmd( + "missing_impl_dir", + subcmds=[ + Cmd("missing_impl_dir_subc") + ] + ), + Cmd("missing_impl_file"), + Cmd("test_missing_run_function"), + Cmd("test_exception_in_run"), + ] + ), + Cmd("python_no_app_tests", help="Test commands for python-no-app workspace"), + Cmd( + "test_arguments", + help="Test various argument and option schemes from commands", + subcmds=[ + Cmd("display_verbosity_opts"), + Cmd( + "no_args_or_opts", + help="Command taking no arguments or options" + ), + Cmd( + "optional_arg", + help="Command taking a single, optional argument", + args=[CmdArg("single_val", "Single value")], + ), + Cmd( + "required_arg", + help="Command taking a required and optional arg", + args=[ + CmdArg("required_val", "Single required value", required=True), + CmdArg("optional_val", "Single optional value") + ], + ), + Cmd( + "multi_arg", + help="Command taking a multi-arg", + args=[ + CmdArg("multi_arg", "Multi-arg value", True) + ], + ), + Cmd( + "delim_multi_arg", + help="Command taking a delimited multi-arg", + args=[ + CmdArg("delim_m_arg", "Delimited Multi-arg value ('multiple' implied)", True) + ], + ), + Cmd( + "single_and_multi_arg", + help="Command taking a single and multi-arg", + args=[ + CmdArg("single_val", "Single value"), + CmdArg("multi_arg", "Multi-arg value", True) + ], + ), + Cmd( + "args_with_value_names", + help="Single and multi arg with value custom value names", + args=[ + CmdArg("s_arg", "Single value arg with custom value name", value_name="Single Arg Val"), + CmdArg("m_arg", "Multi value arg with custom value name", True, value_name="Multi Arg Val") + ], + ), + Cmd( + "single_value_optional_opt", + help="Command taking optional, single option", + opts=[ + CmdOpt( + name="implicit_single_val", + help='Implicit non-required single value', + takes_value=True, + required=False, + ), + CmdOpt( + name="explicit_single_val", + help='Explicit non-required single value', + takes_value=True, + required=False, + ), + ] + ), + Cmd( + "single_value_required_opt", + help="Command with single-value optional and required options", + opts=[ + CmdOpt( + name="non_req_val", + help="Non-required single value", + takes_value=True, + ), + CmdOpt( + name="req_val", + help="Required single value", + takes_value=True, + required=True, + ), + ] + ), + Cmd( + "multi_opts", + help="Command with multi-value optional and required options", + opts=[ + CmdOpt( + name="m_opt", + help="Opt with multiple values", + multi=True, + ), + CmdOpt( + name="im_m_opt", + help="Opt accepting multiple values were 'takes value' is implied", + multi=True, + ), + CmdOpt( + name="req_m_opt", + help="Required opt accepting multiple values", + multi=True, + required=True, + ), + CmdOpt( + name="d_m_opt", + help="Delimited multi opt", + multi=True, + ), + CmdOpt( + name="d_im_m_opt", + help="Delimited opt where 'multi' and 'takes value' is implied", + multi=True, + ), + ] + ), + Cmd( + "flag_opts", + help="Command with flag-style options only", + opts=[ + CmdOpt( + name="im_f_opt", + help="Stackable flag opt with 'takes value=false' implied", + ), + CmdOpt( + name="ex_f_opt", + help="Stackable flag opt with 'takes value=false' set", + ), + ] + ), + Cmd( + "opts_with_value_names", + help="Command with single/multi-opts with custom value names", + opts=[ + CmdOpt( + name="s_opt_nv_im_tv", + help="Single opt with value name, implying 'takes_value'=true", + value_name="s_val_impl", + ), + CmdOpt( + name="s_opt_nv_ex_tv", + help="Single opt with value name and explicit 'takes_value'=true", + value_name="s_val_expl", + takes_value=True, + ), + CmdOpt( + name="m_opt_named_val", + help="Multi-opt with value name", + value_name="m_val", + multi=True, + ), + CmdOpt( + name="s_opt_ln_nv", + help="Single opt with long name and value name", + value_name="ln_nv", + ), + ] + ), + Cmd( + "opts_with_aliases", + help="Command with option aliasing, custom long, and short names", + opts=[ + CmdOpt( + name="single_opt", + help="Single opt with long/short name", + takes_value=True, + ln="s_opt", + sn="s" + ), + CmdOpt( + name="multi_opt", + help="Multi-opt with long/short name", + takes_value=True, + multi=True, + ln="m_opt", + sn="m" + ), + CmdOpt( + name="occurrence_counter", + help="Flag opt with long/short name", + ln="cnt", + sn="o", + ), + CmdOpt( + name="flag_opt_short_name", + help="Flag opt with short name only", + sn="f" + ), + CmdOpt( + name="flag_opt_long_name", + help="Flag opt with long name only", + ln="ln_f_opt" + ), + CmdOpt( + name="flag_opt_dupl_ln_sn", + help="Flag opt with ln matching another's sn", + ln="f" + ), + CmdOpt( + name="fo_sn_aliases", + help="Flag opt with short aliases", + sn_aliases=['a', 'b'] + ), + CmdOpt( + name="fo_sn_and_aliases", + help="Flag opt with short name and short aliases", + sn="c", + sn_aliases=['d', 'e'] + ), + CmdOpt( + name="fo_ln_aliases", + help="Flag opt with long aliases", + ln_aliases=['fa', 'fb'] + ), + CmdOpt( + name="fo_ln_and_aliases", + help="Flag opt with long name and long aliases", + ln="fc", + ln_aliases=['fd', 'fe'] + ), + CmdOpt( + name="fo_sn_ln_aliases", + help="Flag opt with long and short aliases", + ln_aliases=['sn_ln_1', 'sn_ln_2'], + sn_aliases=['z'], + ), + ] + ), + Cmd( + "hidden_opt", + help="Command with a hidden opt", + opts=[ + CmdOpt( + name="hidden_opt", + help="Hidden opt", + hidden=True, + ), + CmdOpt( + # name="non_hidden_opt", + name="visible_opt", + help="Visible, non-hidden, opt", + ), + ] + ), + ] + ), + Cmd("test_current_command", help="Tests origen.current_command"), + Cmd( + "test_nested_level_1", + help="Tests origen.current_command L1", + subcmds=[ + Cmd( + "test_nested_level_2", + help="Tests origen.current_command L2", + subcmds=[ + Cmd("test_nested_level_3_a", help="Tests origen.current_command L3a"), + Cmd("test_nested_level_3_b", help="Tests origen.current_command L3b"), + ] + ) + ] + ), + ] + ) + + @property + def base_cmd(self): + return self.cmd_testers + + @property + def test_args(self): + return self.base_cmd.test_arguments + + @property + def display_v(self): + return self.test_args.display_verbosity_opts + + @property + def error_cases(self): + return self.base_cmd.error_cases + + @property + def subc_l1(self): + return self.base_cmd.test_nested_level_1 + + @property + def subc_l2(self): + return self.subc_l1.test_nested_level_2 + + @property + def subc_l3_a(self): + return self.subc_l2.test_nested_level_3_a + + @property + def subc_l3_b(self): + return self.subc_l2.test_nested_level_3_b + + +class DummyCmds(cli.CLI): + Cmd = Cmd + cfg_toml = aux_cmds_dir.joinpath("dummy_cmds_cfg.toml") + + def __init__(self): + self.name = "dummy_cmds" + self.dummy_cmd = self.aux_sub_cmd( + self.name, + "dummy_cmd", + help="Dummy Aux Command", + args=[ + CmdArg( + name="action_arg", + help="Dummy Aux Action", + multi=True, + ), + ], + subcmds=[ + Cmd( + "subc", + help="Dummy Aux Subcommand", + args=[ + CmdArg( + name="action_arg", + help="Dummy Aux Subc Action", + multi=True, + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Dummy Aux Subc Flag", + ), + ], + ) + ], + from_config=self.cfg_toml + ) + +class PythonNoAppAuxCmds(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "python_no_app_aux_cmds" + self.python_no_app_aux_cmds = self.aux_sub_cmd( + self.name, + "python_no_app_aux_cmds" + ) + + @property + def base_cmd(self): + return self.python_no_app_aux_cmds + +class AuxNamespaces: + def __init__(self) -> None: + self.dummy_cmds = DummyCmds() + self.cmd_testers = CmdTesters() + self.python_no_app_aux_cmds = PythonNoAppAuxCmds() + self.aux_cmds_from_cli_dir = AuxCmdsFromCliDir() + self.add_aux_cmd = AddAuxCmds() + +class Aux: + namespaces = AuxNamespaces() + ns = namespaces diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py new file mode 100644 index 00000000..a48dce4b --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py @@ -0,0 +1,287 @@ +from origen.helpers.regressions import cli +from . import CmdExtOpt +from .aux import aux_cmds_dir + +class ExtensionDrivers: + exts_workout_cfg = aux_cmds_dir.joinpath("exts_workout_cfg.toml") + exts_workout_toml = aux_cmds_dir.joinpath("exts_workout.toml") + pl_ext_stacking_from_aux_cfg = aux_cmds_dir.joinpath("pl_ext_stacking_from_aux_cfg.toml") + pl_ext_stacking_from_aux_toml = aux_cmds_dir.joinpath("pl_ext_stacking_from_aux.toml") + core_cmd_exts_cfg = aux_cmds_dir.joinpath("core_cmd_exts_cfg.toml") + core_cmd_exts_toml = aux_cmds_dir.joinpath("core_cmd_exts.toml") + exts = { + "plugin.python_plugin.plugin_test_args": { + "exts": CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "flag_extension", + help="Single flag extension", + sn="f", + ln="flag_ext", + ), + CmdExtOpt( + "single_val_opt", + takes_value=True, + sn="s", + help="Extended opt taking a single value", + ), + CmdExtOpt( + "multi_val_opt", + ln="multi", + sn_aliases=["m"], + ln_aliases=["multi_non_delim"], + multi=True, + value_name="MULTI_VAL", + help="Extended opt taking a multiple, non-delimited values", + ), + CmdExtOpt( + "multi_val_delim_opt", + ln_aliases=["multi_delim"], + multi=True, + use_delimiter=True, + help="Extended opt taking a multiple, delimited values", + ), + CmdExtOpt( + "exts_workout_action", + takes_value=True, + required=True, + multi=True, + help="Additional actions for testing purposes", + ), + CmdExtOpt( + "hidden_opt", + hidden=True, + help="Hidden extended opt", + ), + ), + "toml": exts_workout_toml, + }, + "plugin.python_plugin.plugin_test_args.subc": { + "exts": CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "exts_workout_action", + multi=True, + help="Action for the extended opt", + ln="action", + ), + ), + "toml": exts_workout_toml, + }, + "plugin.python_plugin.plugin_test_ext_stacking": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ext_action", + multi=True, + help="Action for the extended opt", + ln="action", + ), + ), + *CmdExtOpt.from_src( + "pl_ext_stacking_from_aux", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "pl_ext_stacking_action", + multi=True, + help="Action from pl_ext_stacking aux cmds", + ), + CmdExtOpt( + "pl_ext_stacking_flag", + help="Flag from pl_ext_stacking aux cmds", + ), + ), + *CmdExtOpt.from_src( + "python_plugin_the_second", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pl_the_2nd_ext_action", + help="Action from pl_the_2nd plugin", + multi=True, + ), + CmdExtOpt( + "pl_the_2nd_ext_flag", + help="Flag from pl_the_2nd plugin", + ), + ) + ] + }, + "plugin.python_plugin.plugin_test_ext_stacking.subc": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ext_action_subc", + multi=True, + help="Action for the extended opt subc", + ln="action", + ), + ), + *CmdExtOpt.from_src( + "pl_ext_stacking_from_aux", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "pl_ext_stacking_action_subc", + multi=True, + help="Action from pl_ext_stacking aux cmds subc", + ), + CmdExtOpt( + "pl_ext_stacking_flag_subc", + help="Flag from pl_ext_stacking aux cmds subc", + ), + ), + *CmdExtOpt.from_src( + "python_plugin_the_second", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pl_the_2nd_ext_action_subc", + help="Action from pl_the_2nd plugin subc", + multi=True, + ), + CmdExtOpt( + "pl_the_2nd_ext_flag_subc", + help="Flag from pl_the_2nd plugin subc", + ), + ) + ] + }, + "aux.dummy_cmds.dummy_cmd": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "exts_workout_action", + multi=True, + help="Action for the extended opt", + ln="action", + ), + CmdExtOpt( + "exts_workout_flag", + help="Flag for the extended opt", + ), + ), + *CmdExtOpt.from_src( + "pl_ext_stacking_from_aux", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "pl_ext_stacking_action", + multi=True, + help="Action from pl_ext_stacking aux cmds", + ), + CmdExtOpt( + "pl_ext_stacking_from_aux_flag", + help="Flag from pl_ext_stacking aux cmds", + ), + ), + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "python_plugin_action", + help="Action from python_plugin", + multi=True, + ), + CmdExtOpt( + "python_plugin_flag", + help="Flag from python_plugin", + ), + ), + *CmdExtOpt.from_src( + "python_plugin_the_second", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "python_plugin_the_second_action", + help="Action from pl_the_2nd plugin", + multi=True, + ), + CmdExtOpt( + "python_plugin_the_second_flag", + help="Flag from pl_the_2nd plugin", + ), + ), + ], + }, + "aux.dummy_cmds.dummy_cmd.subc": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "exts_workout_action", + multi=True, + help="Action for the extended opt subc", + ln="action", + ), + CmdExtOpt( + "exts_workout_flag_subc", + help="Flag for the extended opt subc", + ), + ), + *CmdExtOpt.from_src( + "pl_ext_stacking_from_aux", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "pl_ext_stacking_from_aux_action_subc", + multi=True, + help="Action from pl_ext_stacking aux cmds subc", + ), + CmdExtOpt( + "pl_ext_stacking_from_aux_flag_subc", + help="Flag from pl_ext_stacking aux cmds subc", + ), + ), + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "python_plugin_action_subc", + help="Action from python_plugin subc", + multi=True, + ), + CmdExtOpt( + "python_plugin_flag_subc", + help="Flag from python_plugin subc", + ), + ), + *CmdExtOpt.from_src( + "python_plugin_the_second", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "python_plugin_the_second_action_subc", + help="Action from pl_the_2nd plugin subc", + multi=True, + ), + CmdExtOpt( + "python_plugin_the_second_flag_subc", + help="Flag from pl_the_2nd plugin subc", + ), + ), + ] + }, + "generic_core_ext": { + "exts": [ + *CmdExtOpt.from_src( + "pl_ext_cmds", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pl_ext_cmds_generic_ext", + help="Generic ext from pl_ext_cmds plugin", + ), + ), + *CmdExtOpt.from_src( + "core_cmd_exts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "core_cmd_exts_generic_core_ext", + help="Generic core ext from aux commands", + ), + ), + ] + } + } \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py new file mode 100644 index 00000000..67ed5513 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py @@ -0,0 +1,212 @@ +from origen.helpers.regressions import cli +from . import Cmd, CmdArg, CmdOpt + +class PlExtCmds(cli.CLI): + def __init__(self): + self.name = "pl_ext_cmds" + +class PythonPlugin(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "python_plugin" + self.python_plugin = self.pl_cmd( + self.name + ) + self.echo = self.pl_sub_cmd( + self.name, + "echo", + help="Echos the input", + args=[CmdArg( + name="input", + help="Input to echo", + use_delimiter=True, + )], + opts=[CmdOpt( + name="repeat", + help="Echo again (repeat)", + ln="repeat", + sn="r", + )], + ) + self.plugin_says_hi = self.pl_sub_cmd( + self.name, + "plugin_says_hi", + help="Say 'hi' from the python plugin", + opts=[ + CmdOpt( + name="times", + help="Number of times for the python plugin to say", + value_name="TIMES", + ln="times", + sn="t" + ), + CmdOpt( + name="loudly", + help="LOUDLY say hi", + ln="loudly", + sn="l" + ), + CmdOpt( + name="to", + help="Specify who should be greeted", + multi=True, + ) + ] + ) + self.plugin_test_args = self.pl_sub_cmd( + self.name, + "plugin_test_args", + help="Test command for a plugin", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + CmdArg( + name="multi_arg", + help="Multi Arg", + multi=True, + ), + ], + opts=[ + CmdOpt( + name="opt_taking_value", + help="Opt taking a single value", + ln="opt", + ), + CmdOpt( + name="flag_opt", + help="Flag Opt", + ln="flag", + ), + ], + subcmds=[ + Cmd( + "subc", + help="Test Subcommand for plugin_test_args", + args=[ + CmdArg( + name="single_arg", + help="Single Arg For Subcommand", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt For Subcommand", + ), + ] + ) + ] + ) + self.plugin_test_ext_stacking = self.pl_sub_cmd( + self.name, + "plugin_test_ext_stacking", + help="Test ext stacking for plugin command", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt", + ), + ], + subcmds=[ + Cmd( + "subc", + help="Test Subcommand for ext stacking", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt", + ), + ], + ) + ] + ) + + @property + def base_cmd(self): + return self.python_plugin + + @property + def ordered_subcmds(self): + return [ + self.echo, + "help", + self.plugin_says_hi, + self.plugin_test_args, + self.plugin_test_ext_stacking + ] + +class PythonPluginNoCmds(cli.CLI): + def __init__(self): + self.name = "python_plugin_no_cmds" + self.python_plugin_no_cmds = self.pl_cmd( + self.name + ) + + @property + def base_cmd(self): + return self.python_plugin_no_cmds + +class PythonPluginTheSecond(cli.CLI): + def __init__(self): + self.name = "python_plugin_the_second" + self.python_plugin_the_second = self.pl_cmd( + self.name + ) + + @property + def base_cmd(self): + return self.python_plugin_the_second + +class TestAppsSharedTestHelpers(cli.CLI): + def __init__(self): + self.name = "test_apps_shared_test_helpers" + self.test_apps_shared_test_helpers = self.pl_cmd( + self.name + ) + + @property + def base_cmd(self): + return self.test_apps_shared_test_helpers + +class Plugins: + def __init__(self): + self.plugins = { + "pl_ext_cmds": PlExtCmds(), + "python_plugin": PythonPlugin(), + "python_plugin_no_cmds": PythonPluginNoCmds(), + "python_plugin_the_second": PythonPluginTheSecond(), + "test_apps_shared_test_helpers": TestAppsSharedTestHelpers() + } + + @property + def python_no_app_collected_pl_names(self): + return list(self.plugins.keys()) + + @property + def python_no_app_config_pl_names(self): + return [ + 'python_plugin', + 'python_plugin_the_second', + 'python_plugin_no_cmds' + ] + + def __getattr__(self, name): + if name in self.plugins: + return self.plugins[name] + else: + super diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py index 8d387c22..0ecfd20f 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py @@ -1,4 +1,3 @@ -# FOR_PR clean up import origen def extract_args_flag(action): @@ -32,13 +31,6 @@ def do_action(actions, phase): if actions: for action in actions: print(f"Start Action {phase} CMD: {action}") - # if action == "update_cmd_args": - # if phase == "Before": - # origen.command.args["single_arg"] = "updated" - # if action == "clear_cmd_args": - # origen.command.args["single_val"] = None - # if action == "before_cmd_exception": - # raise RuntimeError("'before_cmd_exception' encountered!") if action.startswith("inc_flag__"): if phase == "Before": _, is_cmd, f = action.split("__", 2) @@ -85,8 +77,4 @@ def do_action(actions, phase): pass else: raise RuntimeError(f"No action '{action}' is known!") - # if action == "update_aux_ext": - # fail - # if action == "current_command_BIST": - # fail print(f"End Action {phase} CMD: {action}") \ No newline at end of file From 6f10098ff529f35a757c29576efc25017739879a Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 3 Jan 2023 07:19:34 -0600 Subject: [PATCH 015/200] Fix reserved windows path. --- .../test_apps_shared_test_helpers/cli/__init__.py | 2 +- .../cli/cmd_models/{aux.py => auxs.py} | 0 .../test_apps_shared_test_helpers/cli/cmd_models/exts.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/{aux.py => auxs.py} (100%) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index 3c2bae0b..90c4afb4 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -4,7 +4,7 @@ import re from .cmd_models import Cmd, CmdArg, CmdOpt, CmdExtOpt -from .cmd_models.aux import Aux +from .cmd_models.auxs import Aux from .cmd_models.exts import ExtensionDrivers from .cmd_models.plugins import Plugins diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/aux.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py similarity index 100% rename from test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/aux.py rename to test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py index a48dce4b..e4b94e8c 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py @@ -1,6 +1,6 @@ from origen.helpers.regressions import cli from . import CmdExtOpt -from .aux import aux_cmds_dir +from .auxs import aux_cmds_dir class ExtensionDrivers: exts_workout_cfg = aux_cmds_dir.joinpath("exts_workout_cfg.toml") From 143aed9c544a84e050f83da36601378e3bcef8e5 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 16 Jan 2023 18:06:22 -0600 Subject: [PATCH 016/200] Continue cleanup and add more tests. --- python/origen/origen/boot.py | 112 +- .../origen/helpers/regressions/cli/command.py | 8 +- .../helpers/regressions/cli/help_msg.py | 56 +- .../origen/helpers/regressions/cli/origen.py | 127 +- rust/origen/cli/src/bin.rs | 93 +- rust/origen/cli/src/commands/app.rs | 2 +- rust/origen/cli/src/commands/credentials.rs | 5 - rust/origen/cli/src/commands/env.rs | 2 +- rust/origen/cli/src/commands/eval.rs | 7 - rust/origen/cli/src/commands/interactive.rs | 42 +- rust/origen/cli/src/commands/mod.rs | 32 +- rust/origen/cli/src/framework/app_cmds.rs | 14 +- rust/origen/cli/src/framework/aux_cmds.rs | 20 +- rust/origen/cli/src/framework/core_cmds.rs | 33 +- rust/origen/cli/src/framework/extensions.rs | 99 +- rust/origen/cli/src/framework/helps.rs | 12 +- rust/origen/cli/src/framework/mod.rs | 109 +- rust/origen/cli/src/framework/plugins.rs | 281 +-- rust/origen/cli/src/python.rs | 14 +- rust/pyapi/src/extensions.rs | 20 +- test_apps/python_app/config/commands.toml | 138 ++ test_apps/python_app/config/origen.toml | 5 +- .../example/commands/extensions/__init__.py | 12 + .../extensions/aux_ns.dummy_cmds.dummy_cmd.py | 6 + .../aux_ns/dummy_cmds/dummy_cmd/subc.py | 6 + .../example/commands/extensions/core.eval.py | 6 + .../python_plugin/plugin_test_ext_stacking.py | 6 + .../plugin_test_ext_stacking.subc.py | 6 + ..._cmds.nested_l1.nested_l2_a.nested_l3_b.py | 4 + .../nested_app_cmds.nested_l1.nested_l2_a.py | 4 + .../example/commands/nested_app_cmds.py | 5 + .../nested_app_cmds/nested_l1.nested_l2_b.py | 4 + .../commands/nested_app_cmds/nested_l1.py | 4 + .../nested_l1/nested_l2_a/nested_l3_a.py | 4 + .../nested_l1/nested_l2_b.nested_l3_b.py | 4 + .../nested_l1/nested_l2_b/nested_l3_a.py | 4 + test_apps/python_app/poetry.lock | 1812 ++++++++++------- test_apps/python_app/tests/cli_test.py | 527 ++++- test_apps/python_app/tests/conftest.py | 1 + .../cmd_building/tests__loading_aux_cmds.py | 13 +- .../configs/suppress_plugin_collecting.toml | 1 + test_apps/python_no_app/tests/misc_test.py | 76 +- .../python_plugin/python_plugin/commands.toml | 33 +- .../aux_ns.dummy_cmds.dummy_cmd.subc.py | 1 + .../aux_cmds/exts_workout.toml | 14 - .../python_plugin/plugin_test_ext_stacking.py | 2 +- .../aux_cmds/pl_ext_stacking_from_aux.toml | 10 +- ....python_plugin.plugin_test_ext_stacking.py | 18 +- .../cli/__init__.py | 13 +- .../cli/cmd_models/__init__.py | 4 +- .../cli/cmd_models/exts.py | 65 +- .../configs/suppress_plugin_collecting.toml | 3 + .../commands.toml | 2 - .../python_plugin/plugin_test_ext_stacking.py | 6 + .../plugin_test_ext_stacking.subc.py | 6 + 55 files changed, 2326 insertions(+), 1587 deletions(-) create mode 100644 test_apps/python_app/example/commands/extensions/__init__.py create mode 100644 test_apps/python_app/example/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py create mode 100644 test_apps/python_app/example/commands/extensions/aux_ns/dummy_cmds/dummy_cmd/subc.py create mode 100644 test_apps/python_app/example/commands/extensions/core.eval.py create mode 100644 test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.py create mode 100644 test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.subc.py create mode 100644 test_apps/python_app/example/commands/nested_app_cmds.nested_l1.nested_l2_a.nested_l3_b.py create mode 100644 test_apps/python_app/example/commands/nested_app_cmds.nested_l1.nested_l2_a.py create mode 100644 test_apps/python_app/example/commands/nested_app_cmds.py create mode 100644 test_apps/python_app/example/commands/nested_app_cmds/nested_l1.nested_l2_b.py create mode 100644 test_apps/python_app/example/commands/nested_app_cmds/nested_l1.py create mode 100644 test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_a/nested_l3_a.py create mode 100644 test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_b.nested_l3_b.py create mode 100644 test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_b/nested_l3_a.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/suppress_plugin_collecting.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.subc.py diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index f22a446d..6ec171b9 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -1,3 +1,4 @@ +# FOR_PR need to clean up print statemnents import pathlib from builtins import exit as exit_proc @@ -49,7 +50,6 @@ def run_cmd(command, import origen.application import origen.target - # FOR_PR make these constants if command == dispatch_plugin_cmd: cmd_src = "plugin" elif command == dispatch_aux_cmd: @@ -73,42 +73,46 @@ def mod_from_modulized_path(root, sub_parts): if not path.exists(): paths = [path] modulized_path = pathlib.Path(root) - for i, sub in enumerate(sub_parts[:-1]): - modulized_path = modulized_path.joinpath(sub) - if modulized_path.exists(): - path = pathlib.Path(f"{modulized_path}/{'.'.join(sub_parts[(i+1):])}.py") - if path.exists(): - return wrap_mod_from_file(path) + if len(sub_parts) > 1: + for i, sub in enumerate(sub_parts[:-1]): + modulized_path = modulized_path.joinpath(sub) + if modulized_path.exists(): + path = pathlib.Path(f"{modulized_path}/{'.'.join(sub_parts[(i+1):])}.py") + if path.exists(): + return wrap_mod_from_file(path) + else: + paths.append(path) else: - paths.append(path) - else: - return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] - path = pathlib.Path(f"{modulized_path}/{sub_parts[-1]}.py") - if not path.exists(): - paths.append(path) + return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] + else: + path = pathlib.Path(f"{modulized_path}/{sub_parts[-1]}.py") + if not path.exists(): + paths.append(path) + return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] return wrap_mod_from_file(path) def call_user_cmd(cmd_type): print(f"dispatch_root: {dispatch_root}") - path = pathlib.Path(f"{pathlib.Path(dispatch_root).joinpath('/'.join(subcmds))}.py") - if not path.exists(): - modulized_path = pathlib.Path(f"{pathlib.Path(dispatch_root).joinpath('.'.join(subcmds))}.py") - if modulized_path.exists(): - path = modulized_path + m = mod_from_modulized_path(dispatch_root, subcmds) + + if isinstance(m, list): + if isinstance(m[1], Exception): + origen.log.error(f"Could not load {cmd_type} command implementation from '{('.').join(subcmds)}' ({m[0]})") + origen.log.error(f"Received exception:\n{m[1]}") else: - cmd = (' ').join(subcmds) - origen.logger.error(f"Could not find implementation for {cmd_type} command '{cmd}' at '{path}' or '{modulized_path}'") - exit(1) + origen.log.error(f"Could not find implementation for {cmd_type} command '{('.').join(subcmds)}'") + for msg in m: + origen.log.error(f" {msg}") + exit_proc(1) - m = origen.helpers.mod_from_file(path) if hasattr(m, 'run'): print("found run") - print(path) + print(m.__file__) m.run(**(args or {})) else: - origen.logger.error(f"Could not find 'run' function in module '{path}'") - exit(1) + origen.logger.error(f"Could not find 'run' function in module '{m.__file__}'") + exit_proc(1) def is_subcmd(*subcs): return list(subcs) == subcmds @@ -118,7 +122,7 @@ def unsupported_subcmd(subcmd=None): print(f"Unsupported sub-command '{subcmds.join(' -> ')}' for base command '{command}'") else: print(f"Unsupported sub-command '{subcmd}' for '{command}'") - exit(1) + exit_proc(1) if mode == None: if _origen.is_app_present(): @@ -176,17 +180,26 @@ def clean_up(func): setattr(origen.boot, "clean_up", clean_up) def on_load(func): - current_ext["on_load"] = func.__name__ + if current_ext: + current_ext["on_load"] = func.__name__ + else: + dispatch['on_load'] = func return func setattr(origen.boot, "on_load", on_load) + dispatch = {} + def run(func): + dispatch['run_func'] = func + return func + setattr(origen.boot, "run", run) + # FOR_PR need to test with app subcmds for ext in extensions: current_ext = ext m = mod_from_modulized_path(ext['root'], [cmd_src, command if cmd_src == "core" else dispatch_src, *subcmds]) if isinstance(m, list): - if isinstance(m[1], Exception): + if len(m) == 2 and isinstance(m[1], Exception): origen.log.error(f"Could not load {ext['source']} extension implementation from '{ext['name']}' ({m[0]})") origen.log.error(f"Received exception:\n{m[1]}") else: @@ -199,12 +212,28 @@ def on_load(func): if "on_load" in ext: getattr((ext["mod"]), ext["on_load"])(ext["mod"]) + current_ext = None _origen.current_command.set_command(command, subcmds, args, ext_args, extensions) - try: + def run_ext(phase, continue_on_fail=False): for ext in extensions: - if "before_cmd" in ext: - getattr(ext["mod"], ext["before_cmd"])(**ext_args[ext['source']][ext['name']]) + if phase in ext: + if ext['source'] == "app": + this_ext_args = ext_args["app"] + else: + this_ext_args = ext_args[ext['source']][ext['name']] + + try: + getattr(ext["mod"], ext[phase])(**this_ext_args) + except Exception as e: + if continue_on_fail: + origen.log.error(f"Error running {ext['source']} extension{'' if ext['source'] == 'app' else ' ' + ext['name']}") + origen.log.error(e) + else: + raise(e) + + try: + run_ext("before_cmd") # The generate command handles patterns and flows. # Future: Add options to generate patterns concurrently, or send them off to LSF. @@ -430,32 +459,23 @@ def tabify(message): print(tabify(repr(e))) - elif command == "_dispatch_app_cmd_": - # TODO fix this upstream + elif command == dispatch_app_cmd: + # FOR_PR fix this upstream subcmds = subcmds[1:] call_user_cmd("app") - elif command == "_plugin_dispatch_": + elif command == dispatch_plugin_cmd: call_user_cmd("plugin") - elif command == "_dispatch_aux_cmd_": + elif command == dispatch_aux_cmd: call_user_cmd("aux") else: unsupported_command(command) - if extensions: - for ext in extensions: - if "after_cmd" in ext: - getattr(ext["mod"], ext["after_cmd"])(**ext_args[ext['source']][ext['name']]) + run_ext("after_cmd") finally: - for ext in extensions: - try: - if "clean_up" in ext: - getattr(ext["mod"], ext["clean_up"])(**ext_args[ext['source']][ext['name']]) - except Exception as clean_up_e: - print(clean_up_e) - + run_ext("clean_up", continue_on_fail=True) if exit is None: if origen.boot.exit: diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py index 8f94484f..3a21f7f3 100644 --- a/python/origen/origen/helpers/regressions/cli/command.py +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -100,13 +100,14 @@ def assert_present(self, in_str): assert e in in_str class Cmd: - def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds = None, use_configs = None, with_env=None, demos=None, global_demos=None, app_demos=None, parent=None): + def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds = None, use_configs = None, with_env=None, demos=None, global_demos=None, app_demos=None, parent=None, aliases=None): self.name = name self.cmd_path = cmd_path or [] self.help = help self.args = dict([[arg.name, arg] for arg in (args or [])]) self.opts = dict([[opt.name, opt] for opt in (opts or [])]) self.subcmds = dict([[subcmd.name, subcmd] for subcmd in (subcmds or [])]) + self.aliases = aliases self.exts = None self.with_env = with_env self.parent = parent @@ -150,7 +151,8 @@ def extend(self, exts, with_env=None, from_configs=None): self.global_demos.values(), self.app_demos.values(), ) - dup.exts = dict([[ext.name, ext] for ext in (exts or [])]) + dup.exts = dict(self.exts) if self.exts else {} + dup.exts.update(dict([[ext.name, ext] for ext in (exts or [])])) if from_configs: if isinstance(from_configs, str): from_configs = [from_configs] @@ -233,8 +235,6 @@ def num_opts(self): return len(self.visible_opts) + 3 # 3 for standard opts (-h, -v, --vk) def global_demo(self, name): - print(self.demos) - print(self.global_demos) if name in self.global_demos: return self.global_demos[name] elif name in self.demos: diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index f9867b19..13fc1a1f 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -135,6 +135,7 @@ def __init__(self, help_str): opt = self.opts[-1] if ('help' in opt) and (opt['help'] is not None): import re + app_ext_substring = "[Extended from the app]" if re.search(r"\[Extended from aux namespace: .*\]", opt['help']): split = opt['help'].split("[Extended from aux namespace: '", 1) @@ -154,6 +155,11 @@ def __init__(self, help_str): opt['help'] = (split[0] + inner_split[1]).strip() from .command import SrcTypes opt['ext_type'] = SrcTypes.PLUGIN + elif app_ext_substring in opt["help"]: + opt["help"] = opt["help"].replace(app_ext_substring, '').strip() + from .command import SrcTypes + opt['extended_from'] = SrcTypes.APP + opt['ext_type'] = SrcTypes.APP if re.search(r"\[aliases: .*\]", opt['help']): print(f"splitting aliases!!: {opt['help']}") @@ -185,6 +191,14 @@ def __init__(self, help_str): "name": n, "help": (s[1].strip() if len(s) > 1 else None) }) + for subc in self.subcmds: + if subc["help"]: + if re.search(r"\[aliases: .*\]", subc['help']): + split = subc['help'].split("[aliases: ", 1) + subc['aliases'] = [a.strip() for a in split[1].split(']', 1)[0].split(',')] + subc['help'] = (split[0] + split[1].split(']', 1)[1]).strip() + continue + subc["aliases"] = None if "app_cmd_shortcuts" in sects: self.app_cmd_shortcuts = {} @@ -219,9 +233,10 @@ def __init__(self, help_str): self.pl_exts = None if "extensions" in sects: for l in sects["extensions"]: - if l == "- the App": - self.apps_exts = True - + if l.strip() == "- the App": + self.app_exts = True + next + split = l.split("- Aux Namespaces: ", 1) if len(split) == 2: self.aux_exts = [s[1:-1] for s in split[1].split(", ")] @@ -281,12 +296,6 @@ def _assert_opt_params_(self, o, opt): if opt.takes_value: assert o["value_name"] == opt.to_vn() assert o["multiple_values"] == opt.multi - # if opt.value_name is None: - # assert o["value_name"] is None - # assert o["multiple_values"] is None - # else: - # assert o["value_name"] == opt.value_name - # assert o["multiple_values"] == opt.multi if opt.help is not False: assert o["help"] ==opt.help if opt.sn_aliases is not False: @@ -304,11 +313,18 @@ def assert_opt_at(self, expected_index, opt): def assert_bare_opts(self): return self.assert_opts("help", "vk", "v") + def assert_bare_app_opts(self): + return self.assert_opts("help", "vk", "mode", "no_targets", "targets", "v") + def assert_ext_at(self, expected_index, ext): o = self.opts[expected_index] self._assert_opt_params_(o, ext) if ext.src_name is not False: - assert o["extended_from"] == ext.src_name + from .command import SrcTypes + if ext.src_type == SrcTypes.APP: + assert o["extended_from"] == SrcTypes.APP + else: + assert o["extended_from"] == ext.src_name if ext.src_type is not False: assert o["ext_type"] == ext.src_type return True @@ -324,6 +340,12 @@ def assert_opts(self, *expected_opts): self.assert_help_opt_at(i) elif o == "vk": self.assert_vk_opt_at(i) + elif o == "mode": + self.assert_mode_opt_at(i) + elif o == "no_targets": + self.assert_no_targets_opt_at(i) + elif o == "targets": + self.assert_targets_opt_at(i) elif o == "v": self.assert_v_opt_at(i) else: @@ -337,6 +359,8 @@ def assert_subcmd_at(self, expected_index, subc): assert s['name'] == subc.name if subc.help is not False: assert s['help'] == subc.help + if subc.aliases is not False: + assert s['aliases'] == subc.aliases return True def assert_subcmds(self, *expected_subcmds): @@ -369,6 +393,18 @@ def assert_vk_opt_at(self, expected_index): from .origen import CoreOpts return self.assert_opt_at(expected_index, CoreOpts.vk) + def assert_mode_opt_at(self, expected_index): + from .origen import InAppOpts + return self.assert_opt_at(expected_index, InAppOpts.mode) + + def assert_no_targets_opt_at(self, expected_index): + from .origen import InAppOpts + return self.assert_opt_at(expected_index, InAppOpts.no_targets) + + def assert_targets_opt_at(self, expected_index): + from .origen import InAppOpts + return self.assert_opt_at(expected_index, InAppOpts.targets) + def assert_summary(self, msg): assert self.help == msg return True \ No newline at end of file diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 66269d86..9bbb59db 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -15,6 +15,52 @@ class _CommonNames: fmt = "fmt" i = "interactive" + @classmethod + def eval_cmd(cls, add_opts=None): + return Cmd( + cls.eval, + help="Evaluates statements in an Origen context", + args=[ + CmdArg("code", "Statements to evaluate", multi=True, required=True) + ], + opts=add_opts, + demos=[ + CmdDemo( + "minimal", + args=["print( 'hello from eval cmd!' )"], + expected_output="hello from eval cmd" + ), + CmdDemo( + "multi_statement_single_arg", + args=["h = 'hi!'; print( origen.version ); print( h ); print( h )"], + expected_output=f"{origen.version}\nhi!\nhi!" + ), + CmdDemo( + "multi_statement_multi_args", + args=[ + "h = 'hello!'", + "print( origen.version )", + "print( h )", + "print( h )" + ], + expected_output=f"{origen.version}\nhello!\nhello!" + ), + CmdDemo( + "gen_name_error", + args=["print( missing )"], + expected_output=["Traceback (most recent call last):", "NameError: name 'missing' is not defined"] + ) + ] + ) + + @classmethod + def interactive_cmd(cls, add_opts=None): + return Cmd( + cls.i, + help="Start an Origen console to interact with the DUT", + aliases=['i'], + ) + # Use this to mimic: # @classmethod # @property @@ -56,47 +102,14 @@ class Names: build = _CommonNames.build names = Names() - eval = Cmd( - names.eval, - help="Evaluates statements in an Origen context", - args=[ - CmdArg("code", "Statements to evaluate", multi=True, required=True) - ], - demos=[ - CmdDemo( - "minimal", - args=["print( 'hello from eval cmd!' )"], - expected_output="hello from eval cmd" - ), - CmdDemo( - "multi_statement_single_arg", - args=["h = 'hi!'; print( origen.version ); print( h ); print( h )"], - expected_output=f"{origen.version}\nhi!\nhi!" - ), - CmdDemo( - "multi_statement_multi_args", - args=[ - "h = 'hello!'", - "print( origen.version )", - "print( h )", - "print( h )" - ], - expected_output=f"{origen.version}\nhello!\nhello!" - ), - CmdDemo( - "gen_name_error", - args=["print( missing )"], - expected_output=["Traceback (most recent call last):", "NameError: name 'missing' is not defined"] - ) - ] - ) + eval = _CommonNames.eval_cmd() aux_cmds = Cmd(names.aux_cmds, help="Interface with auxillary commands") pls = Cmd(names.pls) pl = Cmd(names.pl) proj = Cmd(names.proj) new = Cmd(names.new) creds = Cmd(names.creds) - i = Cmd(names.i) + i = _CommonNames.interactive_cmd() fmt = Cmd(names.fmt) build = Cmd(names.build) @@ -108,7 +121,47 @@ class Names: origen = Cmd("") +class InAppOpts: + targets = CmdOpt( + "targets", + help="Override the targets currently set by the workspace for this command", + takes_value=True, + multi=True, + use_delimiter=True, + ln="targets", + ln_aliases=["target"], + sn="t", + ) + no_targets = CmdOpt( + "no_targets", + help="Clear any targets currently set by the workspace for this command", + takes_value=False, + ln_aliases=["no_target"], + ) + mode = CmdOpt( + "mode", + help="Override the default mode currently set by the workspace for this command", + takes_value=True, + multi=False, + ln="mode", + sn="m", + ) + + @classmethod + def all(cls): + return [cls.targets, cls.no_targets, cls.mode] + + @classmethod + def standard_opts(self): + return [CoreOpts.help, CoreOpts.vk, self.mode, self.no_targets, self.targets, CoreOpts.verbosity] + class InAppCommands(CoreCommands): + in_app_opts = InAppOpts() + + @classmethod + def standard_opts(self): + return self.in_app_opts.standard_opts() + class Names: app = "app" aux_cmds = _CommonNames.aux_cmds @@ -137,11 +190,11 @@ class Names: compile = Cmd(names.compile) creds = Cmd(names.creds) env = Cmd(names.env) - eval = Cmd(names.eval) + eval = _CommonNames.eval_cmd(add_opts=in_app_opts.all()) exec = Cmd(names.exec) fmt = Cmd(names.fmt) generate = Cmd(names.generate) - i = Cmd(names.i) + i = _CommonNames.interactive_cmd(add_opts=in_app_opts.all()) mailer = Cmd(names.mailer) mode = Cmd(names.mode) new = Cmd(names.new) diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index 09af7595..fa47f98a 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -14,9 +14,7 @@ use indexmap::map::IndexMap; use origen::{Result, LOGGER, STATUS}; use origen_metal as om; use std::iter::FromIterator; -use std::path::Path; use std::process::exit; -use std::collections::HashMap; use framework::{Extensions, Plugins, AuxCmds, AppCmds, CmdHelps}; use framework::plugins::{PL_MGR_CMD_NAME, PL_CMD_NAME, run_pl_mgr, run_pl}; use clap::error::ErrorKind as ClapErrorKind; @@ -32,18 +30,6 @@ pub struct CommandHelp { shortcut: Option, } -impl CommandHelp { - fn render(&self, width: usize) -> String { - let mut msg = "".to_string(); - msg += &format!("{:width$} {}", self.name, self.help, width = width + 3); - if let Some(a) = &self.shortcut { - msg += &format!(" [aliases: {}]", a); - } - msg += "\n"; - msg - } -} - pub mod built_info { // The file has been placed there by the build script. include!(concat!(env!("OUT_DIR"), "/built.rs")); @@ -133,10 +119,9 @@ fn main() -> Result<()> { // When a command is added below it must also be added to these vectors. let mut origen_commands: Vec = vec![]; let mut helps = CmdHelps::new(); - let mut app_cmds: Option; - let mut plugin_commands: IndexMap> = IndexMap::new(); + let app_cmds: Option; let mut extensions = Extensions::new(); - let mut aux_cmds = AuxCmds::new(&mut extensions)?; + let aux_cmds = AuxCmds::new(&mut extensions)?; let plugins = match Plugins::new(&mut extensions) { Ok(pl) => pl, @@ -345,6 +330,7 @@ fn main() -> Result<()> { framework::aux_cmds::add_helps(&mut helps, &aux_cmds); commands::eval::add_helps(&mut helps); commands::credentials::add_helps(&mut helps); + commands::interactive::add_helps(&mut helps); if STATUS.is_app_present { commands::app::add_helps(&mut helps, app_cmds.as_ref().unwrap()); @@ -359,7 +345,7 @@ fn main() -> Result<()> { // app = mailer::add_commands(app, &mut origen_commands)?; app = commands::credentials::add_commands(app, &helps, &extensions)?; app = commands::eval::add_commands(app, &helps, &extensions)?; - app = commands::interactive::add_commands(app, &mut origen_commands)?; + app = commands::interactive::add_commands(app, &helps, &extensions)?; app = framework::plugins::add_commands(app, &helps, plugins.as_ref(), &extensions)?; app = framework::aux_cmds::add_commands(app, &helps, &aux_cmds, &extensions)?; @@ -943,41 +929,6 @@ Examples: ); } - // This is used to justify the command names in the help - let mut name_width = origen_commands - .iter() - .map(|c| c.name.chars().count()) - .max() - .unwrap(); - - - // Clap is great, but its generated help doesn't give the flexibility needed to handle things - // like app and plugin command additions, so we make our own - - let mut help_message = format!( - "Origen, The Semiconductor Developer's Kit - -{} - -USAGE: - origen [FLAGS] [COMMAND] -FLAGS: - -h, --help Prints help information - -v {} - -vk, --verbosity_keywords {} - -CORE COMMANDS: -", - version, VERBOSITY_HELP_STR, VERBOSITY_KEYWORD_HELP_STR - ); - - for command in &origen_commands { - help_message += &command.render(name_width); - } - - help_message += "\nSee 'origen -h' for more information on a specific command."; - - let h = &*Box::leak(help_message.into_boxed_str()); let mut all_cmds_and_aliases = vec![]; for subc in app.get_subcommands() { all_cmds_and_aliases.push(subc.get_name().to_string()); @@ -996,10 +947,10 @@ CORE COMMANDS: }, Err(e) => { match e.kind { - (ClapErrorKind::DisplayHelp | + ClapErrorKind::DisplayHelp | ClapErrorKind::DisplayHelpOnMissingArgumentOrSubcommand | ClapErrorKind::DisplayVersion | - ClapErrorKind::UnknownArgument) => { + ClapErrorKind::UnknownArgument => { top_app_cmd_aliases.insert(top_cmd.to_string(), vec!(top_cmd.to_string())); top_app_replacements.push(["app", "commands", top_cmd]); }, @@ -1019,10 +970,10 @@ CORE COMMANDS: }, Err(e) => { match e.kind { - (ClapErrorKind::DisplayHelp | + ClapErrorKind::DisplayHelp | ClapErrorKind::DisplayHelpOnMissingArgumentOrSubcommand | ClapErrorKind::DisplayVersion | - ClapErrorKind::UnknownArgument) => { + ClapErrorKind::UnknownArgument => { if let Some(aliases) = top_app_cmd_aliases.get_mut(top_cmd) { aliases.push(a.to_string()); } else { @@ -1101,9 +1052,7 @@ CORE COMMANDS: let mut len = 0; for (pln, pl_aliases) in top_pl_cmd_aliases.iter() { for (cmdn, cmda) in pl_aliases { - for a in cmda.iter() { - top_pl_replacements.push(["plugin", pln, cmdn]); - } + top_pl_replacements.push(["plugin", pln, cmdn]); let s = cmda.join(", "); let l = s.len(); @@ -1163,9 +1112,7 @@ CORE COMMANDS: let mut len = 0; for (auxn, aux_aliases) in top_aux_cmd_aliases.iter() { for (cmdn, cmda) in aux_aliases { - for a in cmda.iter() { - top_aux_replacements.push(["auxillary_commands", auxn, cmdn]); - } + top_aux_replacements.push(["auxillary_commands", auxn, cmdn]); let s = cmda.join(", "); let l = s.len(); @@ -1391,9 +1338,15 @@ CORE COMMANDS: let matches = matches.subcommand_matches("save_ref").unwrap(); commands::save_ref::run(matches); } - // To get here means the user has typed "origen -v", which officially means - // verbosity level 1 with no command, but this is what they really mean + Some(PL_MGR_CMD_NAME) => run_pl_mgr(matches.subcommand_matches(PL_MGR_CMD_NAME).unwrap(), plugins.as_ref())?, + Some(PL_CMD_NAME) => run_pl(matches.subcommand_matches(PL_CMD_NAME).unwrap(), &app, &extensions, plugins.as_ref())?, + Some(invalid_cmd) => { + // This case shouldn't happen as clap should've previously kicked out on any invalid command + unreachable!("Uncaught invalid command encountered: '{}'", invalid_cmd); + } None => { + // To get here means the user has typed "origen -v", which officially means + // verbosity level 1 with no command, but this is what they really mean let mut max_len = 0; let mut versions: IndexMap = IndexMap::new(); if STATUS.is_app_present { @@ -1529,16 +1482,6 @@ CORE COMMANDS: } } } - Some(PL_MGR_CMD_NAME) => run_pl_mgr(matches.subcommand_matches(PL_MGR_CMD_NAME).unwrap(), plugins.as_ref())?, - Some(PL_CMD_NAME) => run_pl(matches.subcommand_matches(PL_CMD_NAME).unwrap(), &app, &extensions, plugins.as_ref())?, - Some(invalid_cmd) => { - // This case shouldn't happen as clap should've previously kicked out on any invalid command - unreachable!("Uncaught invalid command encountered: '{}'", invalid_cmd); - } - None => { - // This case shouldn't happen as clap should've previously kicked out on any invalid command - unreachable!("Uncaught invalid command encountered!"); - } } Ok(()) } diff --git a/rust/origen/cli/src/commands/app.rs b/rust/origen/cli/src/commands/app.rs index 22e475e1..2dafc485 100644 --- a/rust/origen/cli/src/commands/app.rs +++ b/rust/origen/cli/src/commands/app.rs @@ -13,7 +13,7 @@ pub (crate) fn add_helps(helps: &mut CmdHelps, app_cmds: &AppCmds) { add_app_cmd_helps(helps, app_cmds); } -pub (crate) fn add_commands<'a>(mut app: App<'a>, helps: &'a CmdHelps, app_cmds: &'a AppCmds, exts: &'a Extensions, ) -> Result> { +pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, app_cmds: &'a AppCmds, exts: &'a Extensions, ) -> Result> { let mut app_subc = helps.core_cmd(CMD_NAME) .arg_required_else_help(true) .subcommand( diff --git a/rust/origen/cli/src/commands/credentials.rs b/rust/origen/cli/src/commands/credentials.rs index 10b69e50..ed7719ab 100644 --- a/rust/origen/cli/src/commands/credentials.rs +++ b/rust/origen/cli/src/commands/credentials.rs @@ -1,8 +1,3 @@ -use clap::{App, AppSettings, Arg, ArgMatches, Command}; -use origen::Result; -use super::super::CommandHelp; -use indexmap::IndexMap; -use super::launch_simple; use super::_prelude::*; pub const BASE_CMD: &'static str = "credentials"; diff --git a/rust/origen/cli/src/commands/env.rs b/rust/origen/cli/src/commands/env.rs index eee2238e..0e2501c0 100644 --- a/rust/origen/cli/src/commands/env.rs +++ b/rust/origen/cli/src/commands/env.rs @@ -14,7 +14,7 @@ use semver::VersionReq; use std::process::Command; static MINIMUM_PIP_VERSION: &str = "22.0.4"; -static MINIMUM_POETRY_VERSION: &str = "1.1.14"; +static MINIMUM_POETRY_VERSION: &str = "1.3.2"; pub fn run(matches: &ArgMatches) { match matches.subcommand_name() { diff --git a/rust/origen/cli/src/commands/eval.rs b/rust/origen/cli/src/commands/eval.rs index 7fb01a88..2704e011 100644 --- a/rust/origen/cli/src/commands/eval.rs +++ b/rust/origen/cli/src/commands/eval.rs @@ -1,12 +1,5 @@ -use clap::{App, AppSettings, Arg, Command, ArgMatches}; use super::_prelude::*; -use origen::Result; -use super::super::CommandHelp; -use indexmap::IndexMap; -use super::launch2; -use crate::{Extensions, Plugins}; -pub const CMD_NAME: &'static str = "eval"; pub const BASE_CMD: &'static str = "eval"; gen_core_cmd_funcs!( diff --git a/rust/origen/cli/src/commands/interactive.rs b/rust/origen/cli/src/commands/interactive.rs index c2c8aefe..476cee0d 100644 --- a/rust/origen/cli/src/commands/interactive.rs +++ b/rust/origen/cli/src/commands/interactive.rs @@ -1,41 +1,13 @@ -// FOR_PR clean up and switch to macros to generate use crate::commands::_prelude::*; -use origen::STATUS; -use std::fs; pub const BASE_CMD: &'static str = "interactive"; -pub const CMD_NAME: &'static str = "interactive"; -pub (crate) fn add_commands<'a>(app: App<'a>, origen_commands: &mut Vec) -> Result> { - let i_help = "Start an Origen console to interact with the DUT"; - origen_commands.push(CommandHelp { - name: "interactive".to_string(), - help: i_help.to_string(), - shortcut: Some("i".to_string()), - }); - let mut subc = Command::new("interactive").about(i_help).visible_alias("i"); - if STATUS.is_app_present { - subc = subc.arg( - Arg::new("target") - .short('t') - .long("target") - .help("Override the default target currently set by the workspace") - .action(AppendArgs) - .use_delimiter(true) - .multiple(true) - .number_of_values(1) - .value_name("TARGET"), - ) - .arg( - Arg::new("mode") - .short('m') - .long("mode") - .help("Override the default execution mode currently set by the workspace") - .action(SetArg) - .value_name("MODE"), - ); - } - Ok(app.subcommand(subc)) -} +gen_core_cmd_funcs!( + BASE_CMD, + "Start an Origen console to interact with the DUT", + { |cmd: App<'a>| { + cmd.visible_alias("i") + }} +); crate::gen_simple_run_func!(); diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index abb112e0..f7bf19ab 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -16,16 +16,12 @@ pub mod eval; pub mod aux_cmds; pub mod _prelude; -pub use eval::CMD_NAME as EVAL_CMD_NAME; - -#[macro_use] use crate::python; -use crate::vks_to_cmd; +use crate::{vks_to_cmd, strs_to_cli_arr}; use indexmap::map::IndexMap; -use origen::{clean_mode, LOGGER}; +use origen::{clean_mode, LOGGER, STATUS}; use std::process::exit; -use origen::Result; use _prelude::{SetArgTrue, CountArgs}; use clap::{App, ArgMatches}; @@ -37,7 +33,7 @@ use std::collections::HashMap; #[macro_export] macro_rules! gen_simple_run_func { ($base_cmd: expr) => { - pub(crate) fn run(mut invocation: &clap::ArgMatches, mut cmd_def: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>) -> Result<()> { + pub(crate) fn run(mut invocation: &clap::ArgMatches, mut cmd_def: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>) -> origen::Result<()> { // let mut matches = cmd; let mut path_pieces: Vec = vec!(); // let mut overrides = IndexMap::new(); @@ -144,6 +140,8 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } println!("ext names: {:?}", opt_names); + let mut targets = None; + for arg in cmd_def.get_arguments() { println!("Arg: {}", arg.get_id()); let arg_n= arg.get_id(); @@ -156,6 +154,14 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation // // ext_opts.push(e.) // } if invocation.contains_id(arg_n) { + if arg_n == "targets" { + targets = Some(invocation.get_many::(arg_n).unwrap()); + continue; + } else if arg_n == "mode" { + // FOR_PR + todo!(); + } + let arg_str: String; if arg.is_takes_value_set() { if arg.is_multiple_values_set() { @@ -228,20 +234,16 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation match ext.0 { ExtensionSource::App => { app_ext_str = ext.1.join(", "); - todo!() }, ExtensionSource::Plugin(ref pl_name) => { pl_ext_str += &format!(", '{}': {{{}}}", pl_name, ext.1.join(", ")); // pl_ext_args.push(format!("")); }, - ExtensionSource::Aux(ref ns, ref path) => { + ExtensionSource::Aux(ref ns, _) => { aux_ext_str += &format!(", '{}': {{{}}}", ns, ext.1.join(", ")); }, } } - // if !app_ext_str.is_empty() { - // app_ext_str = app_ext_str[2..].to_string(); - // } if !pl_ext_str.is_empty() { pl_ext_str = pl_ext_str[2..].to_string(); } @@ -266,7 +268,7 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation let mut ext_setup = "{".to_string(); match ext.source { ExtensionSource::App => { - ext_setup += "'source': 'app'" + ext_setup += &format!("'source': 'app', 'root': r'{}', 'name': None", origen::app().unwrap().root.join(format!("{}/commands/extensions/", STATUS.app.as_ref().unwrap().name())).display()); }, ExtensionSource::Plugin(ref pl_name) => { ext_setup += &format!( @@ -314,13 +316,15 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } } + if let Some(targs) = targets { + cmd += &format!(", {}", strs_to_cli_arr!("targets", targs)); + } cmd += &format!(", verbosity={}", LOGGER.verbosity()); cmd += &format!(", {}", vks_to_cmd!()); cmd += ");"; log_debug!("Launching Python: '{}'", &cmd); println!("CMD: {}", cmd); - // println!("Launching Python: '{}'", &cmd); match python::run(&cmd) { Err(e) => { diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index 6a096901..7187feb1 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -1,14 +1,12 @@ -use origen::{Result, STATUS, ORIGEN_CONFIG}; +use origen::{Result, STATUS}; use indexmap::IndexMap; use std::fs; use std::path::PathBuf; use crate::commands::_prelude::*; -use super::{build_commands}; +use super::build_commands; use origen::core::application::Application; -use clap::Command as ClapCommand; - -use super::{Command, CommandsToml, CommandTOML, Extensions, Arg, build_path}; +use super::{Command, CommandsToml, CommandTOML, Extensions}; // pub const CMD_NAME: &'static str = "commands"; pub const APP_COMMANDS: [&'static str; 2] = [crate::commands::app::CMD_NAME, "commands"]; @@ -64,21 +62,19 @@ impl AppCmds { // TODO error on help given? // slf.help = command_config.help.to_owned(); - if let Some(mut commands) = command_config.command { + if let Some(commands) = command_config.command { for mut cmd in commands { slf.top_commands.push(cmd.name.to_owned()); Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); } } - // } - if let Some(mut extensions) = command_config.extension { + if let Some(extensions) = command_config.extension { for ext in extensions { match exts.add_from_app_toml(ext) { Ok(_) => {}, Err(e) => log_error!("Failed to add extensions from application from '{}': {}", &commands_toml.display(), e) } - // slf.extensions.push(Extension::from_extension_toml(ExtensionSource::Plugin(slf.name.to_string()), ext)?); } } } diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index 5666b3e8..f0a1d273 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -1,24 +1,15 @@ use origen::{Result, ORIGEN_CONFIG, origen_config_metadata}; use crate::commands::_prelude::*; -// use crate::app_commands::Command as CommandTOML; - -use super::{Command, Arg, build_commands}; - -// use crate::app_commands::Command as AppCommand; +use super::{Command, build_commands}; use std::fs; use std::path::PathBuf; use origen::core::config::AuxillaryCommandsTOML; use super::extensions::ExtensionTOML; use super::{CommandTOML}; - -use clap; +use clap::Command as ClapCommand; pub const CMD_NAME: &'static str = "auxillary_commands"; -// pub struct AuxCmdsTOML { -// Vec, @@ -119,15 +110,14 @@ impl AuxCmdNamespace { }; slf.help = command_config.help.to_owned(); - if let Some(mut commands) = command_config.command { + if let Some(commands) = command_config.command { for mut cmd in commands { slf.top_commands.push(cmd.name.to_owned()); Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); } } - // TODO extensions? - if let Some(mut extensions) = command_config.extension { + if let Some(extensions) = command_config.extension { for ext in extensions { match exts.add_from_aux_toml(&slf, ext) { Ok(_) => {}, @@ -189,7 +179,7 @@ pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: // .arg("show_sources") for (ns, cmds) in aux_commands.namespaces.iter() { - let mut aux_sub_sub = clap::Command::new(ns).setting(AppSettings::ArgRequiredElseHelp); + let mut aux_sub_sub = ClapCommand::new(ns).setting(AppSettings::ArgRequiredElseHelp); if let Some(h) = cmds.help.as_ref() { aux_sub_sub = aux_sub_sub.about(h.as_str()); } diff --git a/rust/origen/cli/src/framework/core_cmds.rs b/rust/origen/cli/src/framework/core_cmds.rs index 38f57399..b4773f19 100644 --- a/rust/origen/cli/src/framework/core_cmds.rs +++ b/rust/origen/cli/src/framework/core_cmds.rs @@ -12,7 +12,7 @@ pub fn add_core_subc_helps(helps: &mut CmdHelps, base_name: &str, cmd: &str, cmd pub fn add_core_subcs<'a>(helps: &'a CmdHelps, exts: &'a Extensions, cmd: Command<'a>, base: Vec<&str>, subcmd: &SubCmd) -> Result> { let mut n = base.clone(); - n.push((subcmd.name)); + n.push(subcmd.name); let mut subc = helps.core_subc(&n); for s in subcmd.subcmds { subc = add_core_subcs(helps, exts, subc, n.clone(), s)?; @@ -20,6 +20,9 @@ pub fn add_core_subcs<'a>(helps: &'a CmdHelps, exts: &'a Extensions, cmd: Comman if let Some(setup) = subcmd.proc { subc = setup(subc); } + if subcmd.include_app_opts { + subc = super::add_all_app_opts(subc); + } // add exts subc = exts.apply_to_core_cmd(&n.join("."), subc); Ok(cmd.subcommand(subc)) @@ -30,16 +33,24 @@ pub struct SubCmd<'a> { pub help: &'static str, pub subcmds: &'a [SubCmd<'a>], pub proc: Option<&'a dyn Fn(Command) -> Command>, + pub include_app_opts: bool, } - #[macro_export] macro_rules! core_subcmd { - ($name:expr, $help:expr, $proc:tt) => {{ + ($($args:tt)+) => { + $crate::_core_subcmd!(true, $($args)*); + } +} + +#[macro_export] +macro_rules! _core_subcmd { + ($include_app_opts:expr, $name:expr, $help:expr, $proc:tt) => {{ $crate::framework::core_cmds::SubCmd { name: $name, help: $help, subcmds: &[], proc: Some(&$proc), + include_app_opts: true, } }}; @@ -49,6 +60,7 @@ macro_rules! core_subcmd { help: $help, subcmds: &[$($subcmd),*], proc: Some(&$proc), + include_app_opts: true, } }}; @@ -58,6 +70,7 @@ macro_rules! core_subcmd { help: $help, subcmds: &[], proc: None, + include_app_opts: true, } }}; @@ -67,25 +80,25 @@ macro_rules! core_subcmd { help: $help, subcmds: &[$($subcmd),*], proc: None, + include_app_opts: true, } }}; } +// TODO if needed +// #[macro_export] +// macro_rules! core_subcmd_without_app_opts { +// } + #[macro_export] macro_rules! gen_core_cmd_funcs { ($base_name:expr, $cmd_help:expr, $proc:tt) => { gen_core_cmd_funcs!($base_name, $cmd_help, $proc,); }; ($base_name:expr, $cmd_help:expr, $proc:tt, $($subcmd:expr ), *) => { - // ($base_name:expr, $cmd_help:expr, $subcmds:expr) => { - // let mut cmd = helps.core_cmd(CMD_NAME); pub (crate) fn add_helps(helps: &mut $crate::CmdHelps) { helps.add_core_cmd($base_name).set_help_msg($cmd_help); - // for subc in $subcmds { - // add_core_cmd_int!(helps, $base_name, $subcmd.0, $subcmd.1, $subcmd.2); - // } $( - // add_core_cmd_int!(helps, $base_name, $subcmd.0, $subcmd.1, $subcmd.2); $crate::framework::core_cmds::add_core_subc_helps(helps, $base_name, $subcmd.name, $subcmd.help, $subcmd.subcmds); )* } @@ -94,9 +107,9 @@ macro_rules! gen_core_cmd_funcs { let mut cmd = helps.core_cmd($base_name); cmd = $proc(cmd); $( - // add_core_cmd_int!(helps, $base_name, $subcmd.0, $subcmd.1, $subcmd.2); cmd = $crate::framework::core_cmds::add_core_subcs(helps, exts, cmd, vec!($base_name), &$subcmd)?; )* + cmd = crate::framework::add_all_app_opts(cmd); cmd = exts.apply_to_core_cmd($base_name, cmd); Ok(app.subcommand(cmd)) } diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs index 656129da..b89d8b1a 100644 --- a/rust/origen/cli/src/framework/extensions.rs +++ b/rust/origen/cli/src/framework/extensions.rs @@ -1,7 +1,6 @@ use std::collections::HashMap; -use origen::{Result, in_app_invocation, in_global_invocation}; -// use crate::app_commands::{CommandsToml}; -use super::plugins::{Plugins, Plugin}; +use origen::{Result, in_app_invocation}; +use super::plugins::Plugin; use super::aux_cmds::{AuxCmdNamespace}; use clap::Command as ClapCommand; use super::{ArgTOML, Arg, OptTOML, Opt, CmdSrc}; @@ -116,19 +115,19 @@ impl Extensions { // todo!() // } - pub fn apply_to_core_cmd<'a>(&'a self, cmd: &str, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + pub fn apply_to_core_cmd<'a>(&'a self, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { self.apply_to(&ExtensionTarget::Core(cmd.to_string()), app) } - pub fn apply_to_app_cmd<'a>(&'a self, cmd: &str, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + pub fn apply_to_app_cmd<'a>(&'a self, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { self.apply_to(&ExtensionTarget::App(cmd.to_string()), app) } - pub fn apply_to_pl_cmd<'a>(&'a self, pl: &str, cmd: &str, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + pub fn apply_to_pl_cmd<'a>(&'a self, pl: &str, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { self.apply_to(&ExtensionTarget::Plugin(pl.to_string(), cmd.to_string()), app) } - pub fn apply_to_aux_cmd<'a>(&'a self, ns: &str, cmd: &str, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + pub fn apply_to_aux_cmd<'a>(&'a self, ns: &str, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { self.apply_to(&ExtensionTarget::Aux(ns.to_string(), cmd.to_string()), app) } @@ -168,87 +167,17 @@ impl Extensions { pub fn get_aux_ext(&self, ns: &str, cmd_path: &str) -> Option<&Vec> { self.extensions.get(&ExtensionTarget::Aux(ns.to_string(), cmd_path.to_string())) } - - // pub fn apply<'a>(&self, plugins: &Option, mut app: ClapCommand<'a>) -> ClapCommand<'a> { - // for (target, ext) in self.extensions.iter() { - // match target { - // ExtensionTarget::Core(cmd) => { - // // todo!() - // let mut split = cmd.split('.'); - // let mut sub = app.find_subcommand_mut(split.next().unwrap()).unwrap(); - // // let mut sub = app.find_subcommand_mut(split.next().unwrap()).unwrap(); // ok_or(format!("Cannot find core command '{}'", target))?; - // // while let Some(s) = split.next() { - // // sub = sub.find_subcommand_mut(split.next().unwrap()).unwrap(); // ok_or(format!("Cannot find core command '{}'", target))?; - // // } - // // sub.mut_subcommand(split.next().unwrap(), |subc| subc.disable_help_flag(true)); - // // sub.subcommand("hi"); - // }, - // ExtensionTarget::App(cmd) => { - // // todo!() - // }, - // ExtensionTarget::Plugin(pl, cmd) => { - // // todo!() - // } - // } - // } - // app - // } } -// #[derive(Debug, Hash, Eq, PartialEq)] -// pub enum ExtensionTarget { -// Core(String), // Extend a core command -// App(String), // Extend an app command -// Plugin(String, String), // Extend a plugin command -// Aux(String, String), // Extend an auxillary command -// } - -// impl PartialEq for ExtensionTarget { -// fn eq(&self, other: &ExtensionTarget) -> bool { -// match self { -// Self::Core(cmd) => match other { -// Self::Core(other_cmd) => cmd == other_cmd, -// _ => false -// }, -// Self::Plugin(pl, cmd) => match other { -// Self::Plugin(other_pl, other_cmd) => (pl == other_pl) && (cmd == other_cmd), -// _ => false, -// }, -// _=> false -// } -// } -// } - -// impl Eq for ExtensionTarget {} - -// impl ExtensionTarget { -// pub fn new(target: &str) -> Result { -// let (scope, t) = target.split_once('.').ok_or_else(|| format!("Could not discern scope from '{}'", target))?; -// Ok(match scope { -// "origen" => Self::Core(t.to_string()), -// "app" => Self::App(t.to_string()), -// "plugin" => { -// let (pl_name, pl_t) = t.split_once('.').ok_or_else(|| format!("Could not discern plugin from '{}'", t))?; -// Self::Plugin(pl_name.to_string(), pl_t.to_string()) -// } -// "aux" => { -// let (ns_name, aux_t) = t.split_once('.').ok_or_else(|| format!("Could not discern auxillary command namespace from '{}'", t))?; -// Self::Plugin(ns_name.to_string(), aux_t.to_string()) -// } -// _ => bail!("Unknown target scope '{}'. Expected 'origen', 'app', 'aux', or 'plugin'", scope) -// }) -// } -// } - -#[derive(Debug, Deserialize)] //, Deserialize, Clone)] +#[derive(Debug, Deserialize)] pub struct ExtensionTOML { pub extend: String, // Command to extend - // pub target: Option, pub in_global_context: Option, // Extend in the global context pub in_app_context: Option, // Extend in application context pub on_env: Option>, pub arg: Option>, pub opt: Option>, + // TODO see about supporting some of these in the future? // pub name: String, // pub help: String, // pub alias: Option, @@ -287,10 +216,6 @@ pub struct Extension { } impl Extension { - // pub fn add_extension(extensions: &mut Extensions, ext_source: ExtensionSource, ext: ExtensionTOML) -> Result { - // self.extensions.insert() - // } - pub fn from_extension_toml(ext_source: ExtensionSource, ext: ExtensionTOML) -> Result { let mut slf = Self { extends: ext.extend, @@ -335,7 +260,6 @@ impl Extension { let mut s = e.splitn(1, '='); let e_name= s.next().ok_or_else( || format!("Failed to parse 'on_env' '{}', extending '{}', for {}", e, self.extends, self.source))?.trim(); let e_val = s.next(); - // return Ok(true) match env::var(e_name) { Ok(val) => { if let Some(v) = e_val { @@ -353,13 +277,6 @@ impl Extension { } } } - // let v = e.ok_or_else(|err| match err { - // std::env::VarError::NotPresent { - // return false - // }, - // _ => return Err(err) - // }) - // let s = } Ok(false) } else { diff --git a/rust/origen/cli/src/framework/helps.rs b/rust/origen/cli/src/framework/helps.rs index e9c61b9e..7f0fc09b 100644 --- a/rust/origen/cli/src/framework/helps.rs +++ b/rust/origen/cli/src/framework/helps.rs @@ -1,5 +1,4 @@ use std::collections::HashMap; -use super::Plugin; use crate::commands::_prelude::*; use std::fmt; use super::extensions::ExtensionSource; @@ -49,11 +48,11 @@ impl CmdHelps { self.helps.entry(CmdSrc::Aux(ns.to_string(), cmd_name.to_string())).or_default() } - pub fn apply_core_cmd_helps<'a>(&'a self, cmd_name: &str, mut app: Command<'a>) -> Command<'a> { + pub fn apply_core_cmd_helps<'a>(&'a self, cmd_name: &str, app: Command<'a>) -> Command<'a> { self.apply_helps(&CmdSrc::Core(cmd_name.to_string()), app) } - pub fn apply_core_subc_helps<'a>(&'a self, cmd_path: &[&str], mut app: Command<'a>) -> Command<'a> { + pub fn apply_core_subc_helps<'a>(&'a self, cmd_path: &[&str], app: Command<'a>) -> Command<'a> { self.apply_helps(&CmdSrc::Core(cmd_path.join(".")), app) } @@ -141,13 +140,6 @@ impl CmdHelp { } } - -#[derive(Debug, Hash, Eq, PartialEq)] -pub enum Invocation { - Global, - App, -} - #[derive(Debug, Hash, Eq, PartialEq)] pub enum CmdSrc { Core(String), // Core command diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index e4e20077..c2cb3673 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -4,7 +4,6 @@ pub mod extensions; pub mod plugins; pub mod aux_cmds; pub mod app_cmds; -#[macro_use] pub mod core_cmds; pub use extensions::{Extensions, ExtensionTOML}; @@ -569,68 +568,56 @@ pub fn build_path<'a>(mut matches: &'a clap::ArgMatches) -> Result { let n = matches.subcommand_name().unwrap(); matches = matches.subcommand_matches(&n).unwrap(); path_pieces.push(n); - // if path.is_empty() { - // path = name.to_string(); - // } else { - // path = format!("{}.{}", path, name); - // } + } + Ok(path_pieces.join(".")) +} - // if let Some(cmd) = current_cmd { - // current_cmd = - // } +pub const target_opt_name: &str = "targets"; +pub const no_target_opt_name: &str = "no_targets"; +// pub const target_opt_name: &str = "output_dir"; +// pub const target_opt_name: &str = "reference_dir"; +pub const mode_opt_name: &str = "mode"; +// pub const target_opt_name: &str = "debug"; + +macro_rules! add_mode_opt { + ($cmd:expr) => { + $cmd.arg(clap::Arg::new(crate::framework::mode_opt_name) + .short('m') + .long("mode") + .value_name("MODE") + .help("Override the default mode currently set by the workspace for this command") + .action(crate::framework::SetArg) + ) + } +} - // if let Some(cmd) = self.commands.get(&path) { - // // println!("Found command at {}", path); - // // if let Some(args) = &cmd.arg { - // // for arg in args { - // // if arg.multiple.is_some() && arg.multiple.unwrap() { - // // if let Some(v) = matches.values_of(&arg.name) { - // // let vals: Vec = v.map(|v| v.to_string()).collect(); - // // given_args.insert(arg.name.to_string(), vals); - // // } - // // } else { - // // if let Some(v) = matches.value_of(&arg.name) { - // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); - // // } - // // } - // // } - // // } - // if let Some(args) = &cmd.arg { - // for arg in args { - // if arg.multiple.is_some() && arg.multiple.unwrap() { - // if let Some(v) = matches.values_of(&arg.name) { - // // let vals: Vec = v.map(|v| v.to_string()).collect(); - // // given_args.insert(arg.name.to_string(), vals); - // args_str += &format!(", r'{}': [{}]", &arg.name, v.map(|v| format!("r'{}'", v)).collect::>().join(",")); - // } - // } else { - // if let Some(v) = matches.value_of(&arg.name) { - // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); - // args_str += &format!(", r'{}': r'{}'", &arg.name, v); - // } else if matches.contains_id(&arg.name) { - // args_str += &format!(", r'{}': True", &arg.name); - // } - // } - // } - // } - // } - // commands.push(name.to_string()); +macro_rules! add_target_opt { + ($cmd:expr) => { + $cmd.arg(clap::Arg::new(crate::framework::target_opt_name) + .short('t') + .long(crate::framework::target_opt_name) + .visible_alias("target") + .help("Override the targets currently set by the workspace for this command") + .action(crate::commands::_prelude::AppendArgs) + .use_value_delimiter(true) + .multiple_values(true) + .value_name("TARGETS") + .conflicts_with(crate::framework::no_target_opt_name) + // .number_of_values(1) + ).arg(clap::Arg::new(crate::framework::no_target_opt_name) + .long(crate::framework::no_target_opt_name) + .visible_alias("no_target") + .help("Clear any targets currently set by the workspace for this command") + .action(crate::commands::_prelude::SetArgTrue) + ) } - Ok(path_pieces.join(".")) } -// pub fn get_cmd_def<'a>(mut matches: &clap::ArgMatches, mut app: &'a App<'a>) -> &'a App<'a> { -// while matches.subcommand_name().is_some() { -// let n = matches.subcommand_name().unwrap(); -// matches = matches.subcommand_matches(&n).unwrap(); -// app = app.find_subcommand(n).unwrap(); -// } -// app - -// // for (n, pl) in self.plugins.iter() { -// // if let Some(cmd) = pl.find_command(matches) { -// // return Some(cmd); -// // } -// // } -// // None -// } + +pub fn add_all_app_opts(cmd: ClapCommand) -> ClapCommand { + if origen::in_app_invocation() { + add_mode_opt!(add_target_opt!(cmd)) + } else { + cmd + } +} diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index d1eb2619..b0df02ad 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -2,14 +2,9 @@ use origen::{Result, ORIGEN_CONFIG}; use crate::{python, CommandHelp}; use std::path::PathBuf; use indexmap::IndexMap; -// use crate::app_commands::{CommandsToml}; -// use crate::app_commands::Command as AppCommand; use std::fs; -use clap::ArgMatches; -use std::collections::HashMap; use crate::commands::_prelude::*; -use std::process::exit; -use super::{ClapCommand, Command, CommandsToml, CommandTOML, Extensions, Arg, build_path}; +use super::{ClapCommand, Command, CommandsToml, CommandTOML, Extensions, build_path}; use crate::commands::launch_as; pub const PL_MGR_CMD_NAME: &'static str = "plugins"; @@ -19,12 +14,11 @@ pub const PL_MGR_LIST_CMD: [&'static str; 2] = [PL_MGR_CMD_NAME, "list"]; pub fn run_pl_mgr(cmd: RunInput, plugins: Option<&Plugins>) -> Result<()> { if let Some(subcmd) = cmd.subcommand() { - let sub = subcmd.1; match subcmd.0 { "list" => { if let Some(pls) = plugins { displayln!("Available plugins:\n"); - for (name, pl) in pls.plugins.iter() { + for (name, _) in pls.plugins.iter() { displayln!("{}", name); } } else { @@ -37,7 +31,7 @@ pub fn run_pl_mgr(cmd: RunInput, plugins: Option<&Plugins>) -> Result<()> { Ok(()) } -pub fn run_pl(cmd: RunInput, mut app: &clap::App, exts: &crate::Extensions, plugins: Option<&Plugins>) -> Result<()> { +pub fn run_pl(cmd: RunInput, app: &clap::App, exts: &crate::Extensions, plugins: Option<&Plugins>) -> Result<()> { if let Some(subcmd) = cmd.subcommand() { let sub = subcmd.1; plugins.unwrap().plugins.get(subcmd.0).unwrap().dispatch(sub, app, exts, plugins) @@ -212,15 +206,6 @@ impl Plugins { Ok(None) } } - - pub fn find_command(&self, mut matches: &ArgMatches) -> Option<&Command> { - for (n, pl) in self.plugins.iter() { - if let Some(cmd) = pl.find_command(matches) { - return Some(cmd); - } - } - None - } } pub struct Plugin { @@ -285,7 +270,7 @@ impl Plugin { } }; - if let Some(mut commands) = command_config.command { + if let Some(commands) = command_config.command { for mut cmd in commands { slf.top_commands.push(cmd.name.to_owned()); Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); @@ -301,7 +286,7 @@ impl Plugin { // } } - if let Some(mut extensions) = command_config.extension { + if let Some(extensions) = command_config.extension { for ext in extensions { match exts.add_from_pl_toml(&slf, ext) { Ok(_) => {}, @@ -327,85 +312,8 @@ impl Plugin { helps } - // pub fn with_command(&self) -> Option> { - - // } - - pub fn get_mut_command(&mut self, path: &str) -> Option<&mut Command> { - todo!(); - // let retn_cmd = None; - // let split = path.split('.').collect::>(); - // if let Some(mut cmd) = self.commands.get_mut(split.pop().unwrap()) { - // while true { - // if let Some(s) = split.pop() { - // if let Some(c) = cmd.subcommand.as_ref().unwrap().iter_mut().find(|c| c.name == s) { - // cmd = c; - // retn_cmd = Some(c); - // } else { - // return None; - // } - // } else { - // break; - // } - // } - // } - // retn_cmd - } - - pub fn find_command(&self, mut matches: &ArgMatches) -> Option<&Command> { - todo!(); - // let mut commands: Vec<&Command> = vec![]; - // let mut given_args: HashMap> = HashMap::new(); - // let mut name; - // let mut command: Option<&Command> = None; - - // while matches.subcommand_name().is_some() { - // // Don't need to worry about not finding here, clap has already pre-screened the given values - // name = matches.subcommand_name().unwrap(); - - // if let Some(cmd) = command { - // command = cmd - // .subcommand - // .as_ref() - // .unwrap() - // .iter() - // .find(|c| c.name == name); - // } else { - // command = self.commands.iter().find(|c| c.name == name); - // } - - // // matches = matches.subcommand_matches(&name).unwrap(); - - // if let Some(cmd) = command { - // // if let Some(args) = &cmd.arg { - // // for arg in args { - // // if arg.multiple.is_some() && arg.multiple.unwrap() { - // // if let Some(v) = matches.values_of(&arg.name) { - // // let vals: Vec = v.map(|v| v.to_string()).collect(); - // // given_args.insert(arg.name.to_string(), vals); - // // } - // // } else { - // // if let Some(v) = matches.value_of(&arg.name) { - // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); - // // } - // // } - // // } - // // } - // commands.push(cmd); - // } - - // // commands.push(name.to_string()); - // } - // commands.last().map( |c| *c) - // // if commands.is_empty() { - // // None - // // } else { - // // Some(commands.last()) - // // } - } - pub fn dispatch(&self, cmd: &clap::ArgMatches, mut app: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>) -> Result<()> { - if let Some(subc) = cmd.subcommand() { + if cmd.subcommand().is_some() { let path = build_path(&cmd)?; let mut matches = cmd; @@ -416,192 +324,23 @@ impl Plugin { let n = matches.subcommand_name().unwrap(); matches = matches.subcommand_matches(&n).unwrap(); app = app.find_subcommand(n).unwrap(); - // path_pieces.push(format!("r'{}'", n)); path_pieces.push(n.to_string()); } - // println!("dis: {} {}", subc.0, &path); launch_as("_plugin_dispatch_", Some(&path_pieces), matches, app, exts.get_pl_ext(&self.name, &path), plugins, Some( { overrides.insert("dispatch_root".to_string(), Some(format!("r'{}/commands'", &self.root.display()))); overrides.insert("dispatch_src".to_string(), Some(format!("r'{}'", &self.name))); - // overrides.insert("dispatch_cmds".to_string(), Some(format!("[r'{}', {}]", &self.name, path_pieces.join(", ")))); overrides } ), None); Ok(()) } else { - // FOR_PR get message from aux/app - todo!() + // This case shouldn't happen as any non-valid command should be + // caught previously by clap and a non-command invocation should + // print the help message. + unreachable!("Expected a plugin name but none was found!"); } - - // let mut commands: Vec = vec![]; - // let mut given_args: HashMap> = HashMap::new(); - // let mut name; - // let mut path: String = "".to_string(); - // let mut current_cmd: Option<&Command> = None; - // let mut args_str: String = "".to_string(); - - // while matches.subcommand_name().is_some() { - // name = matches.subcommand_name().unwrap(); - // if path.is_empty() { - // path = name.to_string(); - // } else { - // path = format!("{}.{}", path, name); - // } - - // // if let Some(cmd) = current_cmd { - // // current_cmd = - // // } - - // matches = matches.subcommand_matches(&name).unwrap(); - // if let Some(cmd) = self.commands.get(&path) { - // // println!("Found command at {}", path); - // // if let Some(args) = &cmd.arg { - // // for arg in args { - // // if arg.multiple.is_some() && arg.multiple.unwrap() { - // // if let Some(v) = matches.values_of(&arg.name) { - // // let vals: Vec = v.map(|v| v.to_string()).collect(); - // // given_args.insert(arg.name.to_string(), vals); - // // } - // // } else { - // // if let Some(v) = matches.value_of(&arg.name) { - // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); - // // } - // // } - // // } - // // } - // if let Some(args) = &cmd.args { - // for arg in args { - // if arg.multiple.is_some() && arg.multiple.unwrap() { - // if let Some(v) = matches.values_of(&arg.name) { - // // let vals: Vec = v.map(|v| v.to_string()).collect(); - // // given_args.insert(arg.name.to_string(), vals); - // args_str += &format!(", r'{}': [{}]", &arg.name, v.map(|v| format!("r'{}'", v)).collect::>().join(",")); - // } - // } else { - // if let Some(v) = matches.value_of(&arg.name) { - // // given_args.insert(arg.name.to_string(), vec![v.to_string()]); - // args_str += &format!(", r'{}': r'{}'", &arg.name, v); - // } else if matches.contains_id(&arg.name) { - // args_str += &format!(", r'{}': True", &arg.name); - // } - // } - // } - // } - // } - - // commands.push(name.to_string()); - // } - // // println!("Final command {:?}", commands); - - // // Build the dispatch command - // let mut cmd = "from origen.boot import run_cmd; run_cmd('_plugin_dispatch_', ".to_string(); - - // cmd += &format!( - // "commands=[r'{}', {}]", - // &self.name, - // &commands - // .iter() - // .map(|s| format!("r'{}'", s)) - // .collect::>() - // .join(",") - // ); - - // cmd += ", args={"; - // if !args_str.is_empty() { - // cmd += &args_str[2..args_str.len()]; - // } - // // let mut first = true; - // // for (k, v) in given_args { - // // if !first { - // // cmd += ", "; - // // } - // // cmd += &format!( - // // "r'{}': [{}]", - // // &k, - // // v.iter() - // // .map(|s| format!("r'{}'", s)) - // // .collect::>() - // // .join(",") - // // ); - // // first = false; - // // } - // cmd += "});"; - - // log_debug!("Launching Python: '{}'", &cmd); - // println!("Launching Python: '{}'", &cmd); - - // match python::run(&cmd) { - // Err(e) => { - // log_error!("{}", &e); - // exit(1); - // } - // Ok(exit_status) => { - // if exit_status.success() { - // exit(0); - // } else { - // exit(exit_status.code().unwrap_or(1)); - // } - // } - // } - - // // Unnecessary with exists - // Ok(()) } } - -// #[derive(Debug, Deserialize)] -// pub struct PluginConfigTOML { -// pub commands: Option>, -// } - -// pub(crate) fn collect_plugin_commands(pl_cmds: &mut IndexMap>) -> Result<()> { -// if ORIGEN_CONFIG.should_collect_plugins() { -// python::run_with_callbacks( -// "import _origen; _origen._plugin_roots()", -// Some(&mut |line| { -// if let Some((status, result)) = line.split_once('|') { -// match status { -// "success" => { -// if let Some((name, path)) = result.split_once('|') { -// //let pl_config = PluginConfig::from_path(path) -// // pl_cmds.insert(name, PathBuf::from(path)); -// match Plugin::new(name, PathBuf::from(path)) { -// Ok(pl) => self.plugins.insert(name.to_string(), pl), -// Err(e) => { -// log_error!("{}", e); -// log_error!("Unable to collect plugin {}", path) -// } -// } -// } else { -// log_error!("Malformed out when collecting plugin roots (post status): {}", result) -// } -// }, -// _ => log_error!("Unknown status when collecting plugin roots: {}", status) -// } -// } else { -// log_error!("Malformed output encountered when collecting plugin roots: {}", line); -// } -// // output_lines += &format!("{}\n", line); -// // println!("{}", line); -// }), -// None, -// )?; -// } -// Ok(()) -// } - -// if let Some(pl_config) = origen::CONFIG.plugins.as_ref() { -// python::run_with_callbacks("import _origen; _origen._plugin_roots()", -// Some(&mut |line| { -// // output_lines += &format!("{}\n", line); -// println!("{}", line); -// }), -// None, -// )?; -// if pl_config.discover_plugins() { -// python::get_plugin_roots()?; -// } -// } diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index d41afa94..8ed4dd0c 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -13,10 +13,10 @@ const PYTHONS: &[&str] = &[ "python3.9", "python3.8", "python3.7", - "python3.6", ]; pub const MIN_PYTHON_VERSION: &str = "3.6.0"; +// FOR_PR use more generic macro below #[macro_export] macro_rules! vks_to_cmd { () => { @@ -27,6 +27,17 @@ macro_rules! vks_to_cmd { } } +#[macro_export] +macro_rules! strs_to_cli_arr { + ($name:expr, $strs:expr) => {{ + format!( + "{}=[{}]", + $name, + $strs.map(|t| format!("r'{}'", t)).collect::>().join(", ") + ) + }} +} + lazy_static! { pub static ref PYTHON_CONFIG: Config = Config::default(); } @@ -168,6 +179,7 @@ pub fn run(code: &str) -> Result { cmd.arg(&PYTHON_CONFIG.command); cmd.arg("-c"); cmd.arg(&code); + // FOR_PR are these needed? cmd.arg("-"); cmd.arg(&format!("verbosity={}", origen::LOGGER.verbosity())); cmd.arg(&vks_to_cmd!()); diff --git a/rust/pyapi/src/extensions.rs b/rust/pyapi/src/extensions.rs index 3858eaab..0eba52b1 100644 --- a/rust/pyapi/src/extensions.rs +++ b/rust/pyapi/src/extensions.rs @@ -127,13 +127,25 @@ impl Extensions { for ext in exts.iter() { let ext_cfg = ext.extract::<&PyDict>()?; let source = PyAny::get_item(ext_cfg, "source")?.extract::()?; - let ext_name = PyAny::get_item(ext_cfg, "name")?.extract::()?; - let ext_path = format!("{}.{}", source, ext_name); - + let ext_name; + let ext_path; + if source == "app" { + ext_name = "app".to_string(); + ext_path = "app".to_string(); + } else { + ext_name = PyAny::get_item(ext_cfg, "name")?.extract::()?; + ext_path = format!("{}.{}", source, ext_name); + } let src_ext_args = PyAny::get_item(ext_args.as_ref(py), &source)?.extract::<&PyDict>()?; let py_ext = Extension { - args: PyAny::get_item(src_ext_args, &ext_name)?.extract::>()?, + args: { + if source == "app" { + src_ext_args.into() + } else { + PyAny::get_item(src_ext_args, &ext_name)?.extract::>()? + } + }, name: ext_name, source: ext_path.clone(), }; diff --git a/test_apps/python_app/config/commands.toml b/test_apps/python_app/config/commands.toml index 3e5f4192..34f2c42e 100644 --- a/test_apps/python_app/config/commands.toml +++ b/test_apps/python_app/config/commands.toml @@ -86,3 +86,141 @@ help = "Hidden flag opt" long = "hidden" hidden = true + +[[command]] +name = "nested_app_cmds" +help = "Nested app cmds" + + [[command.subcommand]] + name = "nested_l1" + help = "Nested app cmds level 1" + + [[command.subcommand.subcommand]] + name = "nested_l2_a" + help = "Nested app cmds level 2 (A)" + + [[command.subcommand.subcommand.subcommand]] + name = "nested_l3_a" + help = "Nested app cmds level 3 (A-A)" + + [[command.subcommand.subcommand.subcommand]] + name = "nested_l3_b" + help = "Nested app cmds level 3 (A-B)" + + [[command.subcommand.subcommand]] + name = "nested_l2_b" + help = "Nested app cmds level 2 (B)" + + [[command.subcommand.subcommand.subcommand]] + name = "nested_l3_a" + help = "Nested app cmds level 3 (B-A)" + + [[command.subcommand.subcommand.subcommand]] + name = "nested_l3_b" + help = "Nested app cmds level 3 (B-B)" + +# Command disabling standard app opts +[[command]] +name = "disabling_app_opts" +help = "Command disabling standard app opts" + + [[command.subcommand]] + name = "disable_targets_opt" + help = "Disable the targets and no-targets opt" + disable_target_opt = true + + [[command.subcommand]] + name = "disable_mode_opt" + help = "Disable the mode opt" + disable_mode_opt = true + + [[command.subcommand]] + name = "disable_app_opts" + help = "Disable all app opts" + disable_target_opt = true + disable_mode_opt = true + +# Extend core command +[[extension]] +extend = "origen.eval" +on_env = ["ORIGEN_APP_EXTEND_CORE_CMDS"] + + [[extension.opt]] + name = "generic_app_ext_action" + multiple = true + help = "Action from the app" + + [[extension.opt]] + name = "generic_app_ext_flag" + help = "Flag ext from the app" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_args" +on_env = ["ORIGEN_APP_PL_CMD_MISSING_EXT_IMPL"] + + [[extension.opt]] + name = "app_ext_missing_impl" + help = "App extension missing the implementation" + +# Extend plugin command +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking" +on_env = ["ORIGEN_APP_EXT_PL_TEST_EXT_STACKING"] + + [[extension.opt]] + name = "generic_app_ext_action" + multiple = true + help = "Action from the app" + + [[extension.opt]] + name = "generic_app_ext_flag" + help = "Flag ext from the app" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" +on_env = ["ORIGEN_APP_EXT_PL_TEST_EXT_STACKING"] + + [[extension.opt]] + name = "generic_app_ext_action" + multiple = true + help = "Action from the app" + + [[extension.opt]] + name = "generic_app_ext_flag" + help = "Flag ext from the app" + +# Extend aux command +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd" +on_env = ["ORIGEN_DUMMY_AUX_CMDS"] + + [[extension.opt]] + name = "generic_app_ext_action" + multiple = true + help = "Action from the app" + + [[extension.opt]] + name = "generic_app_ext_flag" + help = "Flag ext from the app" + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd.subc" +on_env = ["ORIGEN_DUMMY_AUX_CMDS"] + + [[extension.opt]] + name = "generic_app_ext_action" + multiple = true + help = "Action from the app" + + [[extension.opt]] + name = "generic_app_ext_flag" + help = "Flag ext from the app" + +# Missing extension +[[extension]] +extend = "origen.eval" +on_env = ["ORIGEN_APP_MISSING_CORE_EXT"] + +[[extension]] +extend = "aux.dummy_cmds.dummy_cmd" +on_env = ["ORIGEN_APP_MISSING_AUX_EXT"] diff --git a/test_apps/python_app/config/origen.toml b/test_apps/python_app/config/origen.toml index 6d6bc997..43972d56 100644 --- a/test_apps/python_app/config/origen.toml +++ b/test_apps/python_app/config/origen.toml @@ -73,5 +73,6 @@ domain = "origen.org" user = "dummy_ldap_read_only" timeout = 120 -[[auxillary_commands]] - path = "../tests/cli/cmd_testers" +# FOR_PR test adding aux commands from app? +# [[auxillary_commands]] +# path = "../tests/cli/cmd_testers" diff --git a/test_apps/python_app/example/commands/extensions/__init__.py b/test_apps/python_app/example/commands/extensions/__init__.py new file mode 100644 index 00000000..5c0fdf4c --- /dev/null +++ b/test_apps/python_app/example/commands/extensions/__init__.py @@ -0,0 +1,12 @@ +# from origen.boot import on_load +# from test_apps_shared_test_helpers import get_ext_name + +# def apply_generic_ext(self): + # from origen.boot import before_cmd, after_cmd, clean_up + # n = get_ext_name() + + # def before(**args): + # print(before_cmd_ext_args_str(args, ext_name=n)) + # do_action(args.get(f"{n}_action", None), "Before") + # mod.before = before + # before_cmd(mod.before) diff --git a/test_apps/python_app/example/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py b/test_apps/python_app/example/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/python_app/example/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_app/example/commands/extensions/aux_ns/dummy_cmds/dummy_cmd/subc.py b/test_apps/python_app/example/commands/extensions/aux_ns/dummy_cmds/dummy_cmd/subc.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/python_app/example/commands/extensions/aux_ns/dummy_cmds/dummy_cmd/subc.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_app/example/commands/extensions/core.eval.py b/test_apps/python_app/example/commands/extensions/core.eval.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/python_app/example/commands/extensions/core.eval.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.py b/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.py new file mode 100644 index 00000000..eb4549b1 --- /dev/null +++ b/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) diff --git a/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.subc.py b/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.subc.py new file mode 100644 index 00000000..eb4549b1 --- /dev/null +++ b/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.subc.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) diff --git a/test_apps/python_app/example/commands/nested_app_cmds.nested_l1.nested_l2_a.nested_l3_b.py b/test_apps/python_app/example/commands/nested_app_cmds.nested_l1.nested_l2_a.nested_l3_b.py new file mode 100644 index 00000000..a93d11d2 --- /dev/null +++ b/test_apps/python_app/example/commands/nested_app_cmds.nested_l1.nested_l2_a.nested_l3_b.py @@ -0,0 +1,4 @@ +from example.commands.nested_app_cmds import say_hi + +def run(**args): + say_hi("3 (A-B)") \ No newline at end of file diff --git a/test_apps/python_app/example/commands/nested_app_cmds.nested_l1.nested_l2_a.py b/test_apps/python_app/example/commands/nested_app_cmds.nested_l1.nested_l2_a.py new file mode 100644 index 00000000..b3908b3e --- /dev/null +++ b/test_apps/python_app/example/commands/nested_app_cmds.nested_l1.nested_l2_a.py @@ -0,0 +1,4 @@ +from example.commands.nested_app_cmds import say_hi + +def run(**args): + say_hi("2 (A)") \ No newline at end of file diff --git a/test_apps/python_app/example/commands/nested_app_cmds.py b/test_apps/python_app/example/commands/nested_app_cmds.py new file mode 100644 index 00000000..221ef27d --- /dev/null +++ b/test_apps/python_app/example/commands/nested_app_cmds.py @@ -0,0 +1,5 @@ +def say_hi(lvl): + print(f"Hi from 'nested_app_cmds' level {lvl}!") + +def run(**args): + say_hi(0) \ No newline at end of file diff --git a/test_apps/python_app/example/commands/nested_app_cmds/nested_l1.nested_l2_b.py b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1.nested_l2_b.py new file mode 100644 index 00000000..b0b89b6b --- /dev/null +++ b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1.nested_l2_b.py @@ -0,0 +1,4 @@ +from example.commands.nested_app_cmds import say_hi + +def run(**args): + say_hi("2 (B)") \ No newline at end of file diff --git a/test_apps/python_app/example/commands/nested_app_cmds/nested_l1.py b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1.py new file mode 100644 index 00000000..8c80ad8f --- /dev/null +++ b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1.py @@ -0,0 +1,4 @@ +from example.commands.nested_app_cmds import say_hi + +def run(**args): + say_hi(1) \ No newline at end of file diff --git a/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_a/nested_l3_a.py b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_a/nested_l3_a.py new file mode 100644 index 00000000..6fb4a7b1 --- /dev/null +++ b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_a/nested_l3_a.py @@ -0,0 +1,4 @@ +from example.commands.nested_app_cmds import say_hi + +def run(**args): + say_hi("3 (A-A)") \ No newline at end of file diff --git a/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_b.nested_l3_b.py b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_b.nested_l3_b.py new file mode 100644 index 00000000..64bc91f9 --- /dev/null +++ b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_b.nested_l3_b.py @@ -0,0 +1,4 @@ +from example.commands.nested_app_cmds import say_hi + +def run(**args): + say_hi("3 (B-B)") \ No newline at end of file diff --git a/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_b/nested_l3_a.py b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_b/nested_l3_a.py new file mode 100644 index 00000000..1c9aefca --- /dev/null +++ b/test_apps/python_app/example/commands/nested_app_cmds/nested_l1/nested_l2_b/nested_l3_a.py @@ -0,0 +1,4 @@ +from example.commands.nested_app_cmds import say_hi + +def run(**args): + say_hi("3 (B-A)") \ No newline at end of file diff --git a/test_apps/python_app/poetry.lock b/test_apps/python_app/poetry.lock index 36db9342..87a3b599 100644 --- a/test_apps/python_app/poetry.lock +++ b/test_apps/python_app/poetry.lock @@ -1,10 +1,16 @@ +# This file is automatically @generated by Poetry and should not be changed by hand. + [[package]] name = "alabaster" -version = "0.7.12" +version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.6" +files = [ + {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, + {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, +] [[package]] name = "atomicwrites" @@ -13,39 +19,55 @@ description = "Atomic file writes." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] [[package]] name = "attrs" -version = "22.1.0" +version = "22.2.0" description = "Classes Without Boilerplate" category = "main" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" +files = [ + {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, + {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, +] [package.extras] -tests_no_zope = ["cloudpickle", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] -tests = ["cloudpickle", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] -docs = ["sphinx-notfound-page", "zope.interface", "sphinx", "furo"] -dev = ["cloudpickle", "pre-commit", "sphinx-notfound-page", "sphinx", "furo", "zope.interface", "pytest-mypy-plugins", "mypy (>=0.900,!=0.940)", "pytest (>=4.3.0)", "pympler", "hypothesis", "coverage[toml] (>=5.0.2)"] +cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] +tests = ["attrs[tests-no-zope]", "zope.interface"] +tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] [[package]] name = "babel" -version = "2.10.3" +version = "2.11.0" description = "Internationalization utilities" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "Babel-2.11.0-py3-none-any.whl", hash = "sha256:1ad3eca1c885218f6dce2ab67291178944f810a10a9b5f3cb8382a5a232b64fe"}, + {file = "Babel-2.11.0.tar.gz", hash = "sha256:5ef4b3226b0180dedded4229651c8b0e1a3a6a2837d45a073272f313e4cf97f6"}, +] [package.dependencies] pytz = ">=2015.7" [[package]] -name = "backports.cached-property" +name = "backports-cached-property" version = "1.0.2" description = "cached_property() - computed once per instance, cached as attribute" category = "main" optional = false python-versions = ">=3.6.0" +files = [ + {file = "backports.cached-property-1.0.2.tar.gz", hash = "sha256:9306f9eed6ec55fd156ace6bc1094e2c86fae5fb2bf07b6a9c00745c656e75dd"}, + {file = "backports.cached_property-1.0.2-py3-none-any.whl", hash = "sha256:baeb28e1cd619a3c9ab8941431fe34e8490861fb998c6c4590693d50171db0cc"}, +] [[package]] name = "beautifulsoup4" @@ -54,6 +76,11 @@ description = "Screen-scraping library" category = "main" optional = false python-versions = "*" +files = [ + {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, + {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, + {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, +] [package.dependencies] soupsieve = ">=1.2" @@ -69,47 +96,45 @@ description = "Dummy package for Beautiful Soup" category = "main" optional = false python-versions = "*" +files = [ + {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, +] [package.dependencies] beautifulsoup4 = "*" [[package]] name = "cachecontrol" -version = "0.12.12" +version = "0.12.11" description = "httplib2 caching for requests" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, + {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, +] [package.dependencies] -filelock = {version = ">=3.8.0", optional = true, markers = "extra == \"filecache\""} +lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} msgpack = ">=0.5.2" requests = "*" [package.extras] -filecache = ["filelock (>=3.8.0)"] +filecache = ["lockfile (>=0.9)"] redis = ["redis (>=2.10.5)"] -[[package]] -name = "cachy" -version = "0.3.0" -description = "Cachy provides a simple yet effective caching library." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.extras] -redis = ["redis (>=3.3.6,<4.0.0)"] -memcached = ["python-memcached (>=1.59,<2.0)"] -msgpack = ["msgpack-python (>=0.5,<0.6)"] - [[package]] name = "certifi" -version = "2022.9.24" +version = "2022.12.7" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, + {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, +] [[package]] name = "cffi" @@ -118,40 +143,201 @@ description = "Foreign Function Interface for Python calling C code." category = "main" optional = false python-versions = "*" +files = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] [package.dependencies] pycparser = "*" [[package]] name = "charset-normalizer" -version = "2.1.1" +version = "3.0.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false -python-versions = ">=3.6.0" - -[package.extras] -unicode_backport = ["unicodedata2"] +python-versions = "*" +files = [ + {file = "charset-normalizer-3.0.1.tar.gz", hash = "sha256:ebea339af930f8ca5d7a699b921106c6e29c617fe9606fa7baa043c1cdae326f"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88600c72ef7587fe1708fd242b385b6ed4b8904976d5da0893e31df8b3480cb6"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c75ffc45f25324e68ab238cb4b5c0a38cd1c3d7f1fb1f72b5541de469e2247db"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:db72b07027db150f468fbada4d85b3b2729a3db39178abf5c543b784c1254539"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62595ab75873d50d57323a91dd03e6966eb79c41fa834b7a1661ed043b2d404d"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ff6f3db31555657f3163b15a6b7c6938d08df7adbfc9dd13d9d19edad678f1e8"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:772b87914ff1152b92a197ef4ea40efe27a378606c39446ded52c8f80f79702e"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70990b9c51340e4044cfc394a81f614f3f90d41397104d226f21e66de668730d"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:292d5e8ba896bbfd6334b096e34bffb56161c81408d6d036a7dfa6929cff8783"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2edb64ee7bf1ed524a1da60cdcd2e1f6e2b4f66ef7c077680739f1641f62f555"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:31a9ddf4718d10ae04d9b18801bd776693487cbb57d74cc3458a7673f6f34639"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:44ba614de5361b3e5278e1241fda3dc1838deed864b50a10d7ce92983797fa76"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:12db3b2c533c23ab812c2b25934f60383361f8a376ae272665f8e48b88e8e1c6"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c512accbd6ff0270939b9ac214b84fb5ada5f0409c44298361b2f5e13f9aed9e"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-win32.whl", hash = "sha256:502218f52498a36d6bf5ea77081844017bf7982cdbe521ad85e64cabee1b608b"}, + {file = "charset_normalizer-3.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:601f36512f9e28f029d9481bdaf8e89e5148ac5d89cffd3b05cd533eeb423b59"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0298eafff88c99982a4cf66ba2efa1128e4ddaca0b05eec4c456bbc7db691d8d"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a8d0fc946c784ff7f7c3742310cc8a57c5c6dc31631269876a88b809dbeff3d3"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:87701167f2a5c930b403e9756fab1d31d4d4da52856143b609e30a1ce7160f3c"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14e76c0f23218b8f46c4d87018ca2e441535aed3632ca134b10239dfb6dadd6b"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c0a590235ccd933d9892c627dec5bc7511ce6ad6c1011fdf5b11363022746c1"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c7fe7afa480e3e82eed58e0ca89f751cd14d767638e2550c77a92a9e749c317"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79909e27e8e4fcc9db4addea88aa63f6423ebb171db091fb4373e3312cb6d603"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8ac7b6a045b814cf0c47f3623d21ebd88b3e8cf216a14790b455ea7ff0135d18"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:72966d1b297c741541ca8cf1223ff262a6febe52481af742036a0b296e35fa5a"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f9d0c5c045a3ca9bedfc35dca8526798eb91a07aa7a2c0fee134c6c6f321cbd7"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:5995f0164fa7df59db4746112fec3f49c461dd6b31b841873443bdb077c13cfc"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4a8fcf28c05c1f6d7e177a9a46a1c52798bfe2ad80681d275b10dcf317deaf0b"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:761e8904c07ad053d285670f36dd94e1b6ab7f16ce62b9805c475b7aa1cffde6"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-win32.whl", hash = "sha256:71140351489970dfe5e60fc621ada3e0f41104a5eddaca47a7acb3c1b851d6d3"}, + {file = "charset_normalizer-3.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:9ab77acb98eba3fd2a85cd160851816bfce6871d944d885febf012713f06659c"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:84c3990934bae40ea69a82034912ffe5a62c60bbf6ec5bc9691419641d7d5c9a"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74292fc76c905c0ef095fe11e188a32ebd03bc38f3f3e9bcb85e4e6db177b7ea"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c95a03c79bbe30eec3ec2b7f076074f4281526724c8685a42872974ef4d36b72"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4c39b0e3eac288fedc2b43055cfc2ca7a60362d0e5e87a637beac5d801ef478"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df2c707231459e8a4028eabcd3cfc827befd635b3ef72eada84ab13b52e1574d"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93ad6d87ac18e2a90b0fe89df7c65263b9a99a0eb98f0a3d2e079f12a0735837"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:59e5686dd847347e55dffcc191a96622f016bc0ad89105e24c14e0d6305acbc6"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:cd6056167405314a4dc3c173943f11249fa0f1b204f8b51ed4bde1a9cd1834dc"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:083c8d17153ecb403e5e1eb76a7ef4babfc2c48d58899c98fcaa04833e7a2f9a"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:f5057856d21e7586765171eac8b9fc3f7d44ef39425f85dbcccb13b3ebea806c"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:7eb33a30d75562222b64f569c642ff3dc6689e09adda43a082208397f016c39a"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-win32.whl", hash = "sha256:95dea361dd73757c6f1c0a1480ac499952c16ac83f7f5f4f84f0658a01b8ef41"}, + {file = "charset_normalizer-3.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:eaa379fcd227ca235d04152ca6704c7cb55564116f8bc52545ff357628e10602"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3e45867f1f2ab0711d60c6c71746ac53537f1684baa699f4f668d4c6f6ce8e14"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cadaeaba78750d58d3cc6ac4d1fd867da6fc73c88156b7a3212a3cd4819d679d"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:911d8a40b2bef5b8bbae2e36a0b103f142ac53557ab421dc16ac4aafee6f53dc"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:503e65837c71b875ecdd733877d852adbc465bd82c768a067badd953bf1bc5a3"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a60332922359f920193b1d4826953c507a877b523b2395ad7bc716ddd386d866"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:16a8663d6e281208d78806dbe14ee9903715361cf81f6d4309944e4d1e59ac5b"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:a16418ecf1329f71df119e8a65f3aa68004a3f9383821edcb20f0702934d8087"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9d9153257a3f70d5f69edf2325357251ed20f772b12e593f3b3377b5f78e7ef8"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:02a51034802cbf38db3f89c66fb5d2ec57e6fe7ef2f4a44d070a593c3688667b"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:2e396d70bc4ef5325b72b593a72c8979999aa52fb8bcf03f701c1b03e1166918"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:11b53acf2411c3b09e6af37e4b9005cba376c872503c8f28218c7243582df45d"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-win32.whl", hash = "sha256:0bf2dae5291758b6f84cf923bfaa285632816007db0330002fa1de38bfcb7154"}, + {file = "charset_normalizer-3.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:2c03cc56021a4bd59be889c2b9257dae13bf55041a3372d3295416f86b295fb5"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:024e606be3ed92216e2b6952ed859d86b4cfa52cd5bc5f050e7dc28f9b43ec42"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4b0d02d7102dd0f997580b51edc4cebcf2ab6397a7edf89f1c73b586c614272c"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:358a7c4cb8ba9b46c453b1dd8d9e431452d5249072e4f56cfda3149f6ab1405e"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81d6741ab457d14fdedc215516665050f3822d3e56508921cc7239f8c8e66a58"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8b8af03d2e37866d023ad0ddea594edefc31e827fee64f8de5611a1dbc373174"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9cf4e8ad252f7c38dd1f676b46514f92dc0ebeb0db5552f5f403509705e24753"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e696f0dd336161fca9adbb846875d40752e6eba585843c768935ba5c9960722b"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c22d3fe05ce11d3671297dc8973267daa0f938b93ec716e12e0f6dee81591dc1"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:109487860ef6a328f3eec66f2bf78b0b72400280d8f8ea05f69c51644ba6521a"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:37f8febc8ec50c14f3ec9637505f28e58d4f66752207ea177c1d67df25da5aed"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:f97e83fa6c25693c7a35de154681fcc257c1c41b38beb0304b9c4d2d9e164479"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a152f5f33d64a6be73f1d30c9cc82dfc73cec6477ec268e7c6e4c7d23c2d2291"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:39049da0ffb96c8cbb65cbf5c5f3ca3168990adf3551bd1dee10c48fce8ae820"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-win32.whl", hash = "sha256:4457ea6774b5611f4bed5eaa5df55f70abde42364d498c5134b7ef4c6958e20e"}, + {file = "charset_normalizer-3.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:e62164b50f84e20601c1ff8eb55620d2ad25fb81b59e3cd776a1902527a788af"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8eade758719add78ec36dc13201483f8e9b5d940329285edcd5f70c0a9edbd7f"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8499ca8f4502af841f68135133d8258f7b32a53a1d594aa98cc52013fff55678"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3fc1c4a2ffd64890aebdb3f97e1278b0cc72579a08ca4de8cd2c04799a3a22be"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00d3ffdaafe92a5dc603cb9bd5111aaa36dfa187c8285c543be562e61b755f6b"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2ac1b08635a8cd4e0cbeaf6f5e922085908d48eb05d44c5ae9eabab148512ca"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f6f45710b4459401609ebebdbcfb34515da4fc2aa886f95107f556ac69a9147e"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ae1de54a77dc0d6d5fcf623290af4266412a7c4be0b1ff7444394f03f5c54e3"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3b590df687e3c5ee0deef9fc8c547d81986d9a1b56073d82de008744452d6541"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab5de034a886f616a5668aa5d098af2b5385ed70142090e2a31bcbd0af0fdb3d"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9cb3032517f1627cc012dbc80a8ec976ae76d93ea2b5feaa9d2a5b8882597579"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:608862a7bf6957f2333fc54ab4399e405baad0163dc9f8d99cb236816db169d4"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0f438ae3532723fb6ead77e7c604be7c8374094ef4ee2c5e03a3a17f1fca256c"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:356541bf4381fa35856dafa6a965916e54bed415ad8a24ee6de6e37deccf2786"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-win32.whl", hash = "sha256:39cf9ed17fe3b1bc81f33c9ceb6ce67683ee7526e65fde1447c772afc54a1bb8"}, + {file = "charset_normalizer-3.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:0a11e971ed097d24c534c037d298ad32c6ce81a45736d31e0ff0ad37ab437d59"}, + {file = "charset_normalizer-3.0.1-py3-none-any.whl", hash = "sha256:7e189e2e1d3ed2f4aebabd2d5b0f931e883676e51c7624826e0a4e5fe8a0bf24"}, +] [[package]] name = "cleo" -version = "1.0.0a5" +version = "2.0.1" description = "Cleo allows you to create beautiful and testable command-line interfaces." category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "cleo-2.0.1-py3-none-any.whl", hash = "sha256:6eb133670a3ed1f3b052d53789017b6e50fca66d1287e6e6696285f4cb8ea448"}, + {file = "cleo-2.0.1.tar.gz", hash = "sha256:eb4b2e1f3063c11085cebe489a6e9124163c226575a3c3be69b2e51af4a15ec5"}, +] [package.dependencies] -crashtest = ">=0.3.1,<0.4.0" -pylev = ">=1.3.0,<2.0.0" +crashtest = ">=0.4.1,<0.5.0" +rapidfuzz = ">=2.2.0,<3.0.0" [[package]] name = "colorama" -version = "0.4.5" +version = "0.4.6" description = "Cross-platform colored terminal text." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] [[package]] name = "commonmark" @@ -160,36 +346,69 @@ description = "Python parser for the CommonMark Markdown spec" category = "main" optional = false python-versions = "*" +files = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] [package.extras] test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] [[package]] name = "crashtest" -version = "0.3.1" +version = "0.4.1" description = "Manage Python errors with ease" category = "main" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.7,<4.0" +files = [ + {file = "crashtest-0.4.1-py3-none-any.whl", hash = "sha256:8d23eac5fa660409f57472e3851dab7ac18aba459a8d19cbbba86d3d5aecd2a5"}, + {file = "crashtest-0.4.1.tar.gz", hash = "sha256:80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce"}, +] [[package]] name = "cryptography" -version = "38.0.2" +version = "39.0.0" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "cryptography-39.0.0-cp36-abi3-macosx_10_12_universal2.whl", hash = "sha256:c52a1a6f81e738d07f43dab57831c29e57d21c81a942f4602fac7ee21b27f288"}, + {file = "cryptography-39.0.0-cp36-abi3-macosx_10_12_x86_64.whl", hash = "sha256:80ee674c08aaef194bc4627b7f2956e5ba7ef29c3cc3ca488cf15854838a8f72"}, + {file = "cryptography-39.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:887cbc1ea60786e534b00ba8b04d1095f4272d380ebd5f7a7eb4cc274710fad9"}, + {file = "cryptography-39.0.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6f97109336df5c178ee7c9c711b264c502b905c2d2a29ace99ed761533a3460f"}, + {file = "cryptography-39.0.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a6915075c6d3a5e1215eab5d99bcec0da26036ff2102a1038401d6ef5bef25b"}, + {file = "cryptography-39.0.0-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:76c24dd4fd196a80f9f2f5405a778a8ca132f16b10af113474005635fe7e066c"}, + {file = "cryptography-39.0.0-cp36-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:bae6c7f4a36a25291b619ad064a30a07110a805d08dc89984f4f441f6c1f3f96"}, + {file = "cryptography-39.0.0-cp36-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:875aea1039d78557c7c6b4db2fe0e9d2413439f4676310a5f269dd342ca7a717"}, + {file = "cryptography-39.0.0-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:f6c0db08d81ead9576c4d94bbb27aed8d7a430fa27890f39084c2d0e2ec6b0df"}, + {file = "cryptography-39.0.0-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:f3ed2d864a2fa1666e749fe52fb8e23d8e06b8012e8bd8147c73797c506e86f1"}, + {file = "cryptography-39.0.0-cp36-abi3-win32.whl", hash = "sha256:f671c1bb0d6088e94d61d80c606d65baacc0d374e67bf895148883461cd848de"}, + {file = "cryptography-39.0.0-cp36-abi3-win_amd64.whl", hash = "sha256:e324de6972b151f99dc078defe8fb1b0a82c6498e37bff335f5bc6b1e3ab5a1e"}, + {file = "cryptography-39.0.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:754978da4d0457e7ca176f58c57b1f9de6556591c19b25b8bcce3c77d314f5eb"}, + {file = "cryptography-39.0.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ee1fd0de9851ff32dbbb9362a4d833b579b4a6cc96883e8e6d2ff2a6bc7104f"}, + {file = "cryptography-39.0.0-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:fec8b932f51ae245121c4671b4bbc030880f363354b2f0e0bd1366017d891458"}, + {file = "cryptography-39.0.0-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:407cec680e811b4fc829de966f88a7c62a596faa250fc1a4b520a0355b9bc190"}, + {file = "cryptography-39.0.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:7dacfdeee048814563eaaec7c4743c8aea529fe3dd53127313a792f0dadc1773"}, + {file = "cryptography-39.0.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ad04f413436b0781f20c52a661660f1e23bcd89a0e9bb1d6d20822d048cf2856"}, + {file = "cryptography-39.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50386acb40fbabbceeb2986332f0287f50f29ccf1497bae31cf5c3e7b4f4b34f"}, + {file = "cryptography-39.0.0-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:e5d71c5d5bd5b5c3eebcf7c5c2bb332d62ec68921a8c593bea8c394911a005ce"}, + {file = "cryptography-39.0.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:844ad4d7c3850081dffba91cdd91950038ee4ac525c575509a42d3fc806b83c8"}, + {file = "cryptography-39.0.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e0a05aee6a82d944f9b4edd6a001178787d1546ec7c6223ee9a848a7ade92e39"}, + {file = "cryptography-39.0.0.tar.gz", hash = "sha256:f964c7dcf7802d133e8dbd1565914fa0194f9d683d82411989889ecd701e8adf"}, +] [package.dependencies] cffi = ">=1.12" [package.extras] -docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] -docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] -pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1,!=5.2.0,!=5.2.0.post0)", "sphinx-rtd-theme"] +docstest = ["pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"] +pep8test = ["black", "ruff"] sdist = ["setuptools-rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test = ["hypothesis (>=1.11.4,!=3.79.2)", "iso8601", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pytz"] [[package]] name = "distlib" @@ -198,6 +417,10 @@ description = "Distribution utilities" category = "main" optional = false python-versions = "*" +files = [ + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, +] [[package]] name = "docutils" @@ -206,14 +429,83 @@ description = "Docutils -- Python Documentation Utilities" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, +] [[package]] name = "dulwich" -version = "0.20.46" +version = "0.20.50" description = "Python Git Library" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:97f02f8d500d4af08dc022d697c56e8539171acc3f575c2fe9acf3b078e5c8c9"}, + {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7301773e5cc16d521bc6490e73772a86a4d1d0263de506f08b54678cc4e2f061"}, + {file = "dulwich-0.20.50-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b70106580ed11f45f4c32d2831d0c9c9f359bc2415fff4a6be443e3a36811398"}, + {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f9c4f2455f966cad94648278fa9972e4695b35d04f82792fa58e1ea15dd83f0"}, + {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9163fbb021a8ad9c35a0814a5eedf45a8eb3a0b764b865d7016d901fc5a947fc"}, + {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:322ff8ff6aa4d6d36294cd36de1c84767eb1903c7db3e7b4475ad091febf5363"}, + {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5d3290a45651c8e534f8e83ae2e30322aefdd162f0f338bae2e79a6ee5a87513"}, + {file = "dulwich-0.20.50-cp310-cp310-win32.whl", hash = "sha256:80ab07131a6e68594441f5c4767e9e44e87fceafc3e347e541c928a18c679bd8"}, + {file = "dulwich-0.20.50-cp310-cp310-win_amd64.whl", hash = "sha256:eefe786a6010f8546baac4912113eeed4e397ddb8c433a345b548a04d4176496"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:df3562dde3079d57287c233d45b790bc967c5aae975c9a7b07ca30e60e055512"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e1ae18d5805f0c0c5dac65795f8d48660437166b12ee2c0ffea95bfdbf9c1051"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d2f7df39bd1378d3b0bfb3e7fc930fd0191924af1f0ef587bcd9946afe076c06"}, + {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:731e7f319b34251fadeb362ada1d52cc932369d9cdfa25c0e41150cda28773d0"}, + {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d11d44176e5d2fa8271fc86ad1e0a8731b9ad8f77df64c12846b30e16135eb"}, + {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7aaabb8e4beadd53f75f853a981caaadef3ef130e5645c902705704eaf136daa"}, + {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3dc9f97ec8d3db08d9723b9fd06f3e52c15b84c800d153cfb59b0a3dc8b8d40"}, + {file = "dulwich-0.20.50-cp311-cp311-win32.whl", hash = "sha256:3b1964fa80cafd5a1fd71615b0313daf6f3295c6ab05656ea0c1d2423539904a"}, + {file = "dulwich-0.20.50-cp311-cp311-win_amd64.whl", hash = "sha256:a24a3893108f3b97beb958670d5f3f2a3bec73a1fe18637a572a85abd949a1c4"}, + {file = "dulwich-0.20.50-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6d409a282f8848fd6c8d7c7545ad2f75c16de5d5977de202642f1d50fdaac554"}, + {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5411d0f1092152e1c0bb916ae490fe181953ae1b8d13f4e68661253e10b78dbb"}, + {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6343569f998ce429e2a5d813c56768ac51b496522401db950f0aa44240bfa901"}, + {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a405cd236766060894411614a272cfb86fe86cde5ca73ef264fc4fa5a715fff4"}, + {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:ee0f9b02019c0ea84cdd31c00a0c283669b771c85612997a911715cf84e33d99"}, + {file = "dulwich-0.20.50-cp36-cp36m-win32.whl", hash = "sha256:2644466270267270f2157ea6f1c0aa224f6f3bf06a307fc39954e6b4b3d82bae"}, + {file = "dulwich-0.20.50-cp36-cp36m-win_amd64.whl", hash = "sha256:d4629635a97e3af1b5da48071e00c8e70fad85f3266fadabe1f5a8f49172c507"}, + {file = "dulwich-0.20.50-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0e4862f318d99cc8a500e3622a89613a88c07d957a0f628cdc2ed86addff790f"}, + {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c96e3fb9d48c0454dc242c7accc7819780c9a7f29e441a9eff12361ed0fa35f9"}, + {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc6092a4f0bbbff2e553e87a9c6325955b64ea43fca21297c8182e19ae8a43c"}, + {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:519b627d49d273e2fd01c79d09e578675ca6cd05193c1787e9ef165c9a1d66ea"}, + {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a75cab01b909c4c683c2083e060e378bc01701b7366b5a7d9846ef6d3b9e3d5"}, + {file = "dulwich-0.20.50-cp37-cp37m-win32.whl", hash = "sha256:ea8ffe26d91dbcd5580dbd5a07270a12ea57b091604d77184da0a0d9fad50ed3"}, + {file = "dulwich-0.20.50-cp37-cp37m-win_amd64.whl", hash = "sha256:8f3af857f94021cae1322d86925bfc0dd31e501e885ab5db275473bfac0bb39d"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3fb35cedb1243bc420d885ef5b4afd642c6ac8f07ddfc7fdbca1becf9948bf7e"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4bb23a9cec63e16c0e432335f068169b73dd44fa9318dd7cd7a4ca83607ff367"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5267619b34ddaf8d9a6b841492cd17a971fd25bf9a5657f2de928385c3a08b94"}, + {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9091f1d53a3c0747cbf0bd127c64e7f09b770264d8fb53e284383fcdf69154e7"}, + {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6ec7c8fea2b44187a3b545e6c11ab9947ffb122647b07abcdb7cc3aaa770c0e"}, + {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:11b180b80363b4fc70664197028181a17ae4c52df9965a29b62a6c52e40c2dbe"}, + {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c83e7840d9d0a94d7033bc109efe0c22dfcdcd816bcd4469085e42809e3bf5ba"}, + {file = "dulwich-0.20.50-cp38-cp38-win32.whl", hash = "sha256:c075f69c2de19d9fd97e3b70832d2b42c6a4a5d909b3ffd1963b67d86029f95f"}, + {file = "dulwich-0.20.50-cp38-cp38-win_amd64.whl", hash = "sha256:06775c5713cfeda778c7c67d4422b5e7554d3a7f644f1dde646cdf486a30285a"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:49f66f1c057c18d7d60363f461f4ab8329320fbe1f02a7a33c255864a7d3c942"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4e541cd690a5e3d55082ed51732d755917e933cddeb4b0204f2a5ec5d5d7b60b"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:80e8750ee2fa0ab2784a095956077758e5f6107de27f637c4b9d18406652c22c"}, + {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbb6368f18451dc44c95c55e1a609d1a01d3821f7ed480b22b2aea1baca0f4a7"}, + {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3ee45001411b638641819b7b3b33f31f13467c84066e432256580fcab7d8815"}, + {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4842e22ed863a776b36ef8ffe9ed7b772eb452b42c8d02975c29d27e3bc50ab4"}, + {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:790e4a641284a7fb4d56ebdaf8b324a5826fbbb9c54307c06f586f9f6a5e56db"}, + {file = "dulwich-0.20.50-cp39-cp39-win32.whl", hash = "sha256:f08406b6b789dea5c95ba1130a0801d8748a67f18be940fe7486a8b481fde875"}, + {file = "dulwich-0.20.50-cp39-cp39-win_amd64.whl", hash = "sha256:78c388ad421199000fb7b5ed5f0c7b509b3e31bd7cad303786a4d0bf89b82f60"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:cb194c53109131bcbcd1ca430fcd437cdaf2d33e204e45fbe121c47eaa43e9af"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7542a72c5640dd0620862d6df8688f02a6c336359b5af9b3fcfe11b7fa6652f"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4aa1d0861517ebbbe0e0084cc9ab4f7ab720624a3eda2bd10e45f774ab858db8"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:583c6bbc27f13fe2e41a19f6987a42681c6e4f6959beae0a6e5bb033b8b081a8"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0c61c193d02c0e1e0d758cdd57ae76685c368d09a01f00d704ba88bd96767cfe"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2edbff3053251985f10702adfafbee118298d383ef5b5b432a5f22d1f1915df"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a344230cadfc5d315752add6ce9d4cfcfc6c85e36bbf57fce9444bcc7c6ea8fb"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:57bff9bde0b6b05b00c6acbb1a94357caddb2908ed7026a48c715ff50d220335"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e29a3c2037761fa816aa556e78364dfc8e3f44b873db2d17aed96f9b06ac83a3"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2aa2a4a84029625bf9c63771f8a628db1f3be2d2ea3cb8b17942cd4317797152"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd9fa00971ecf059bb358085a942ecac5be4ff71acdf299f44c8cbc45c18659f"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:af4adac92fb95671ea3a24f2f8e5e5e8f638711ce9c33a3ca6cd68bf1ff7d99f"}, + {file = "dulwich-0.20.50.tar.gz", hash = "sha256:50a941796b2c675be39be728d540c16b5b7ce77eb9e1b3f855650ece6832d2be"}, +] [package.dependencies] urllib3 = ">=1.25" @@ -226,15 +518,19 @@ pgp = ["gpg"] [[package]] name = "filelock" -version = "3.8.0" +version = "3.9.0" description = "A platform independent file lock." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, + {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, +] [package.extras] -testing = ["pytest-timeout (>=2.1)", "pytest-cov (>=3)", "pytest (>=7.1.2)", "coverage (>=6.4.2)", "covdefaults (>=2.2)"] -docs = ["sphinx-autodoc-typehints (>=1.19.1)", "sphinx (>=5.1.1)", "furo (>=2022.6.21)"] +docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] [[package]] name = "html5lib" @@ -243,13 +539,17 @@ description = "HTML parser based on the WHATWG HTML specification" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, + {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, +] [package.dependencies] six = ">=1.9" webencodings = "*" [package.extras] -all = ["genshi", "chardet (>=2.2)", "lxml"] +all = ["chardet (>=2.2)", "genshi", "lxml"] chardet = ["chardet (>=2.2)"] genshi = ["genshi"] lxml = ["lxml"] @@ -261,6 +561,10 @@ description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] [[package]] name = "imagesize" @@ -269,6 +573,10 @@ description = "Getting image size from png/jpeg/jpeg2000/gif file" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] [[package]] name = "importlib-metadata" @@ -277,53 +585,69 @@ description = "Read metadata from Python packages" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, + {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, +] [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] +testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] [[package]] name = "importlib-resources" -version = "5.10.0" +version = "5.10.2" description = "Read resources from Python packages" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "importlib_resources-5.10.2-py3-none-any.whl", hash = "sha256:7d543798b0beca10b6a01ac7cafda9f822c54db9e8376a6bf57e0cbd74d486b6"}, + {file = "importlib_resources-5.10.2.tar.gz", hash = "sha256:e4a96c8cc0339647ff9a5e0550d9f276fc5a01ffa276012b58ec108cfd7b8484"}, +] [package.dependencies] zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [[package]] name = "iniconfig" -version = "1.1.1" -description = "iniconfig: brain-dead simple config-ini parsing" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] [[package]] -name = "jaraco.classes" +name = "jaraco-classes" version = "3.2.3" description = "Utility functions for Python class constructs" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "jaraco.classes-3.2.3-py3-none-any.whl", hash = "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158"}, + {file = "jaraco.classes-3.2.3.tar.gz", hash = "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a"}, +] [package.dependencies] more-itertools = "*" [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [[package]] name = "jeepney" @@ -332,10 +656,14 @@ description = "Low-level, pure Python DBus protocol wrapper." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, +] [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] -trio = ["trio", "async-generator"] +test = ["async-timeout", "pytest", "pytest-asyncio (>=0.17)", "pytest-trio", "testpath", "trio"] +trio = ["async_generator", "trio"] [[package]] name = "jinja2" @@ -344,6 +672,10 @@ description = "A very fast and expressive template engine." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] [package.dependencies] MarkupSafe = ">=2.0" @@ -353,11 +685,15 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "jsonschema" -version = "4.16.0" +version = "4.17.3" description = "An implementation of JSON Schema validation for Python" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "jsonschema-4.17.3-py3-none-any.whl", hash = "sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6"}, + {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, +] [package.dependencies] attrs = ">=17.4.0" @@ -373,22 +709,40 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- [[package]] name = "keyring" -version = "23.9.3" +version = "23.13.1" description = "Store and access your passwords safely." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "keyring-23.13.1-py3-none-any.whl", hash = "sha256:771ed2a91909389ed6148631de678f82ddc73737d85a927f382a8a1b157898cd"}, + {file = "keyring-23.13.1.tar.gz", hash = "sha256:ba2e15a9b35e21908d0aaf4e0a47acc52d6ae33444df0da2b49d41a46ef6d678"}, +] [package.dependencies] -importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""} +importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} +importlib-resources = {version = "*", markers = "python_version < \"3.9\""} "jaraco.classes" = "*" jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} -pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +pywin32-ctypes = {version = ">=0.2.0", markers = "sys_platform == \"win32\""} SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +completion = ["shtab"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[[package]] +name = "lockfile" +version = "0.12.2" +description = "Platform-independent file locking module" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, + {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +] [[package]] name = "mako" @@ -397,6 +751,9 @@ description = "A super-fast templating language that borrows the best ideas fro category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, +] [package.dependencies] MarkupSafe = ">=0.9.2" @@ -408,6 +765,48 @@ description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] [[package]] name = "more-itertools" @@ -416,6 +815,10 @@ description = "More routines for operating on iterables, beyond itertools" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "more-itertools-9.0.0.tar.gz", hash = "sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab"}, + {file = "more_itertools-9.0.0-py3-none-any.whl", hash = "sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41"}, +] [[package]] name = "msgpack" @@ -424,6 +827,60 @@ description = "MessagePack serializer" category = "main" optional = false python-versions = "*" +files = [ + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, +] [[package]] name = "origen" @@ -432,6 +889,7 @@ description = "Semiconductor Developer's Kit" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -461,6 +919,10 @@ description = "Automatic API reference documentation generation for Sphinx inspi category = "main" optional = false python-versions = "*" +files = [ + {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, + {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, +] [package.dependencies] sphinx = "*" @@ -472,6 +934,7 @@ description = "Bare metal APIs for the Origen SDK" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -485,14 +948,15 @@ url = "../../python/origen_metal" [[package]] name = "packaging" -version = "21.3" +version = "23.0" description = "Core utilities for Python packages" category = "main" optional = false -python-versions = ">=3.6" - -[package.dependencies] -pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" +python-versions = ">=3.7" +files = [ + {file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"}, + {file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"}, +] [[package]] name = "pexpect" @@ -501,20 +965,28 @@ description = "Pexpect allows easy control of interactive console applications." category = "main" optional = false python-versions = "*" +files = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] [package.dependencies] ptyprocess = ">=0.5" [[package]] name = "pkginfo" -version = "1.8.3" -description = "Query metadatdata from sdists / bdists / installed packages." +version = "1.9.6" +description = "Query metadata from sdists / bdists / installed packages." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.6" +files = [ + {file = "pkginfo-1.9.6-py3-none-any.whl", hash = "sha256:4b7a555a6d5a22169fcc9cf7bfd78d296b0361adad412a346c1226849af5e546"}, + {file = "pkginfo-1.9.6.tar.gz", hash = "sha256:8fd5896e8718a4372f0ea9cc9d96f6417c9b986e23a4d116dda26b62cc29d046"}, +] [package.extras] -testing = ["nose", "coverage"] +testing = ["pytest", "pytest-cov"] [[package]] name = "pkgutil-resolve-name" @@ -523,18 +995,47 @@ description = "Resolve a name to an object." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, + {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, +] + +[[package]] +name = "pl-ext-cmds" +version = "0.1.0" +description = "Plugin Extending Cmds" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +files = [] +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} + +[package.source] +type = "directory" +url = "../pl_ext_cmds" [[package]] name = "platformdirs" -version = "2.5.2" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "2.6.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, + {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} [package.extras] -docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] -test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" @@ -543,6 +1044,10 @@ description = "plugin and hook calling mechanisms for python" category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} @@ -553,59 +1058,77 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poetry" -version = "1.2.2" +version = "1.3.2" description = "Python dependency management and packaging made easy." category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry-1.3.2-py3-none-any.whl", hash = "sha256:41980d557954b1418fa503de7a8fb25f19c03c0223a171666b305f05a45fc206"}, + {file = "poetry-1.3.2.tar.gz", hash = "sha256:26ded25f0cf67943243ca4f0aafd47ec4668bdb62845dbb8c2b0e3d9cd280bf4"}, +] [package.dependencies] "backports.cached-property" = {version = ">=1.0.2,<2.0.0", markers = "python_version < \"3.8\""} cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"]} -cachy = ">=0.3.0,<0.4.0" -cleo = ">=1.0.0a5,<2.0.0" -crashtest = ">=0.3.0,<0.4.0" +cleo = ">=2.0.0,<3.0.0" +crashtest = ">=0.4.1,<0.5.0" dulwich = ">=0.20.46,<0.21.0" +filelock = ">=3.8.0,<4.0.0" html5lib = ">=1.0,<2.0" importlib-metadata = {version = ">=4.4,<5.0", markers = "python_version < \"3.10\""} jsonschema = ">=4.10.0,<5.0.0" -keyring = ">=21.2.0" +keyring = ">=23.9.0,<24.0.0" +lockfile = ">=0.12.2,<0.13.0" packaging = ">=20.4" pexpect = ">=4.7.0,<5.0.0" pkginfo = ">=1.5,<2.0" platformdirs = ">=2.5.2,<3.0.0" -poetry-core = "1.3.2" -poetry-plugin-export = ">=1.1.2,<2.0.0" +poetry-core = "1.4.0" +poetry-plugin-export = ">=1.2.0,<2.0.0" requests = ">=2.18,<3.0" -requests-toolbelt = ">=0.9.1,<0.10.0" +requests-toolbelt = ">=0.9.1,<0.11.0" shellingham = ">=1.5,<2.0" +tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} tomlkit = ">=0.11.1,<0.11.2 || >0.11.2,<0.11.3 || >0.11.3,<1.0.0" +trove-classifiers = ">=2022.5.19" urllib3 = ">=1.26.0,<2.0.0" -virtualenv = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6" -xattr = {version = ">=0.9.7,<0.10.0", markers = "sys_platform == \"darwin\""} +virtualenv = [ + {version = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6,<21.0.0", markers = "sys_platform != \"win32\" or python_version != \"3.9\""}, + {version = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6,<20.16.6", markers = "sys_platform == \"win32\" and python_version == \"3.9\""}, +] +xattr = {version = ">=0.10.0,<0.11.0", markers = "sys_platform == \"darwin\""} [[package]] name = "poetry-core" -version = "1.3.2" +version = "1.4.0" description = "Poetry PEP 517 Build Backend" category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry_core-1.4.0-py3-none-any.whl", hash = "sha256:5559ab80384ac021db329ef317086417e140ee1176bcfcb3a3838b544e213c8e"}, + {file = "poetry_core-1.4.0.tar.gz", hash = "sha256:514bd33c30e0bf56b0ed44ee15e120d7e47b61ad908b2b1011da68c48a84ada9"}, +] [package.dependencies] importlib-metadata = {version = ">=1.7.0", markers = "python_version < \"3.8\""} [[package]] name = "poetry-plugin-export" -version = "1.1.2" +version = "1.2.0" description = "Poetry plugin to export the dependencies to various formats" category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry_plugin_export-1.2.0-py3-none-any.whl", hash = "sha256:109fb43ebfd0e79d8be2e7f9d43ba2ae357c4975a18dfc0cfdd9597dd086790e"}, + {file = "poetry_plugin_export-1.2.0.tar.gz", hash = "sha256:9a1dd42765408931d7831738749022651d43a2968b67c988db1b7a567dfe41ef"}, +] [package.dependencies] -poetry = ">=1.2.0,<2.0.0" -poetry-core = ">=1.1.0,<2.0.0" +poetry = ">=1.2.2,<2.0.0" +poetry-core = ">=1.3.0,<2.0.0" [[package]] name = "ptyprocess" @@ -614,6 +1137,10 @@ description = "Run a subprocess in a pseudo terminal" category = "main" optional = false python-versions = "*" +files = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] [[package]] name = "py" @@ -622,6 +1149,10 @@ description = "library with cross-python path, ini-parsing, io, code, log facili category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] [[package]] name = "pycparser" @@ -630,37 +1161,26 @@ description = "C parser in Python" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] [[package]] name = "pygments" -version = "2.13.0" +version = "2.14.0" description = "Pygments is a syntax highlighting package written in Python." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "Pygments-2.14.0-py3-none-any.whl", hash = "sha256:fa7bd7bd2771287c0de303af8bfdfc731f51bd2c6a47ab69d117138893b82717"}, + {file = "Pygments-2.14.0.tar.gz", hash = "sha256:b3ed06a9e8ac9a9aae5a6f5dbe78a8a58655d17b43b93c078f094ddc476ae297"}, +] [package.extras] plugins = ["importlib-metadata"] -[[package]] -name = "pylev" -version = "1.4.0" -description = "A pure Python Levenshtein implementation that's not freaking GPL'd." -category = "main" -optional = false -python-versions = "*" - -[[package]] -name = "pyparsing" -version = "3.0.9" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "main" -optional = false -python-versions = ">=3.6.8" - -[package.extras] -diagrams = ["railroad-diagrams", "jinja2"] - [[package]] name = "pyreadline3" version = "3.4.1" @@ -668,14 +1188,47 @@ description = "A python implementation of GNU readline." category = "main" optional = false python-versions = "*" +files = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] [[package]] name = "pyrsistent" -version = "0.18.1" +version = "0.19.3" description = "Persistent/Functional/Immutable data structures" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "pyrsistent-0.19.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:20460ac0ea439a3e79caa1dbd560344b64ed75e85d8703943e0b66c2a6150e4a"}, + {file = "pyrsistent-0.19.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c18264cb84b5e68e7085a43723f9e4c1fd1d935ab240ce02c0324a8e01ccb64"}, + {file = "pyrsistent-0.19.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b774f9288dda8d425adb6544e5903f1fb6c273ab3128a355c6b972b7df39dcf"}, + {file = "pyrsistent-0.19.3-cp310-cp310-win32.whl", hash = "sha256:5a474fb80f5e0d6c9394d8db0fc19e90fa540b82ee52dba7d246a7791712f74a"}, + {file = "pyrsistent-0.19.3-cp310-cp310-win_amd64.whl", hash = "sha256:49c32f216c17148695ca0e02a5c521e28a4ee6c5089f97e34fe24163113722da"}, + {file = "pyrsistent-0.19.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f0774bf48631f3a20471dd7c5989657b639fd2d285b861237ea9e82c36a415a9"}, + {file = "pyrsistent-0.19.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ab2204234c0ecd8b9368dbd6a53e83c3d4f3cab10ecaf6d0e772f456c442393"}, + {file = "pyrsistent-0.19.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e42296a09e83028b3476f7073fcb69ffebac0e66dbbfd1bd847d61f74db30f19"}, + {file = "pyrsistent-0.19.3-cp311-cp311-win32.whl", hash = "sha256:64220c429e42a7150f4bfd280f6f4bb2850f95956bde93c6fda1b70507af6ef3"}, + {file = "pyrsistent-0.19.3-cp311-cp311-win_amd64.whl", hash = "sha256:016ad1afadf318eb7911baa24b049909f7f3bb2c5b1ed7b6a8f21db21ea3faa8"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4db1bd596fefd66b296a3d5d943c94f4fac5bcd13e99bffe2ba6a759d959a28"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aeda827381f5e5d65cced3024126529ddc4289d944f75e090572c77ceb19adbf"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42ac0b2f44607eb92ae88609eda931a4f0dfa03038c44c772e07f43e738bcac9"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-win32.whl", hash = "sha256:e8f2b814a3dc6225964fa03d8582c6e0b6650d68a232df41e3cc1b66a5d2f8d1"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-win_amd64.whl", hash = "sha256:c9bb60a40a0ab9aba40a59f68214eed5a29c6274c83b2cc206a359c4a89fa41b"}, + {file = "pyrsistent-0.19.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a2471f3f8693101975b1ff85ffd19bb7ca7dd7c38f8a81701f67d6b4f97b87d8"}, + {file = "pyrsistent-0.19.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc5d149f31706762c1f8bda2e8c4f8fead6e80312e3692619a75301d3dbb819a"}, + {file = "pyrsistent-0.19.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3311cb4237a341aa52ab8448c27e3a9931e2ee09561ad150ba94e4cfd3fc888c"}, + {file = "pyrsistent-0.19.3-cp38-cp38-win32.whl", hash = "sha256:f0e7c4b2f77593871e918be000b96c8107da48444d57005b6a6bc61fb4331b2c"}, + {file = "pyrsistent-0.19.3-cp38-cp38-win_amd64.whl", hash = "sha256:c147257a92374fde8498491f53ffa8f4822cd70c0d85037e09028e478cababb7"}, + {file = "pyrsistent-0.19.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b735e538f74ec31378f5a1e3886a26d2ca6351106b4dfde376a26fc32a044edc"}, + {file = "pyrsistent-0.19.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99abb85579e2165bd8522f0c0138864da97847875ecbd45f3e7e2af569bfc6f2"}, + {file = "pyrsistent-0.19.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a8cb235fa6d3fd7aae6a4f1429bbb1fec1577d978098da1252f0489937786f3"}, + {file = "pyrsistent-0.19.3-cp39-cp39-win32.whl", hash = "sha256:c74bed51f9b41c48366a286395c67f4e894374306b197e62810e0fdaf2364da2"}, + {file = "pyrsistent-0.19.3-cp39-cp39-win_amd64.whl", hash = "sha256:878433581fc23e906d947a6814336eee031a00e6defba224234169ae3d3d6a98"}, + {file = "pyrsistent-0.19.3-py3-none-any.whl", hash = "sha256:ccf0d6bd208f8111179f0c26fdf84ed7c3891982f2edaeae7422575f47e66b64"}, + {file = "pyrsistent-0.19.3.tar.gz", hash = "sha256:1a2994773706bbb4995c31a97bc94f1418314923bd1048c6d964837040376440"}, +] [[package]] name = "pytest" @@ -684,6 +1237,10 @@ description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, +] [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} @@ -706,11 +1263,11 @@ description = "Example Origen Plugin" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} -origen_metal = {path = "../../python/origen_metal", develop = true} [package.source] type = "directory" @@ -718,11 +1275,15 @@ url = "../python_plugin" [[package]] name = "pytz" -version = "2022.5" +version = "2022.7" description = "World timezone definitions, modern and historical" category = "main" optional = false python-versions = "*" +files = [ + {file = "pytz-2022.7-py2.py3-none-any.whl", hash = "sha256:93007def75ae22f7cd991c84e02d434876818661f8df9ad5df9e950ff4e52cfd"}, + {file = "pytz-2022.7.tar.gz", hash = "sha256:7ccfae7b4b2c067464a6733c6261673fdb8fd1be905460396b97a073e9fa683a"}, +] [[package]] name = "pywin32-ctypes" @@ -731,6 +1292,112 @@ description = "" category = "main" optional = false python-versions = "*" +files = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] + +[[package]] +name = "rapidfuzz" +version = "2.13.7" +description = "rapid fuzzy string matching" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b75dd0928ce8e216f88660ab3d5c5ffe990f4dd682fd1709dba29d5dafdde6de"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:24d3fea10680d085fd0a4d76e581bfb2b1074e66e78fd5964d4559e1fcd2a2d4"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8109e0324d21993d5b2d111742bf5958f3516bf8c59f297c5d1cc25a2342eb66"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5f705652360d520c2de52bee11100c92f59b3e3daca308ebb150cbc58aecdad"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7496e8779905b02abc0ab4ba2a848e802ab99a6e20756ffc967a0de4900bd3da"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:24eb6b843492bdc63c79ee4b2f104059b7a2201fef17f25177f585d3be03405a"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:467c1505362823a5af12b10234cb1c4771ccf124c00e3fc9a43696512bd52293"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53dcae85956853b787c27c1cb06f18bb450e22cf57a4ad3444cf03b8ff31724a"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:46b9b8aa09998bc48dd800854e8d9b74bc534d7922c1d6e1bbf783e7fa6ac29c"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:1fbad8fb28d98980f5bff33c7842efef0315d42f0cd59082108482a7e6b61410"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:43fb8cb030f888c3f076d40d428ed5eb4331f5dd6cf1796cfa39c67bf0f0fc1e"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:b6bad92de071cbffa2acd4239c1779f66851b60ffbbda0e4f4e8a2e9b17e7eef"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d00df2e4a81ffa56a6b1ec4d2bc29afdcb7f565e0b8cd3092fece2290c4c7a79"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-win32.whl", hash = "sha256:2c836f0f2d33d4614c3fbaf9a1eb5407c0fe23f8876f47fd15b90f78daa64c34"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-win_amd64.whl", hash = "sha256:c36fd260084bb636b9400bb92016c6bd81fd80e59ed47f2466f85eda1fc9f782"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b34e8c0e492949ecdd5da46a1cfc856a342e2f0389b379b1a45a3cdcd3176a6e"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:875d51b3497439a72e2d76183e1cb5468f3f979ab2ddfc1d1f7dde3b1ecfb42f"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ae33a72336059213996fe4baca4e0e4860913905c2efb7c991eab33b95a98a0a"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5585189b3d90d81ccd62d4f18530d5ac8972021f0aaaa1ffc6af387ff1dce75"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42085d4b154a8232767de8296ac39c8af5bccee6b823b0507de35f51c9cbc2d7"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:585206112c294e335d84de5d5f179c0f932837752d7420e3de21db7fdc476278"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f891b98f8bc6c9d521785816085e9657212621e93f223917fb8e32f318b2957e"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08590905a95ccfa43f4df353dcc5d28c15d70664299c64abcad8721d89adce4f"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b5dd713a1734574c2850c566ac4286594bacbc2d60b9170b795bee4b68656625"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:988f8f6abfba7ee79449f8b50687c174733b079521c3cc121d65ad2d38831846"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b3210869161a864f3831635bb13d24f4708c0aa7208ef5baac1ac4d46e9b4208"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:f6fe570e20e293eb50491ae14ddeef71a6a7e5f59d7e791393ffa99b13f1f8c2"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6120f2995f5154057454c5de99d86b4ef3b38397899b5da1265467e8980b2f60"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-win32.whl", hash = "sha256:b20141fa6cee041917801de0bab503447196d372d4c7ee9a03721b0a8edf5337"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-win_amd64.whl", hash = "sha256:ec55a81ac2b0f41b8d6fb29aad16e55417036c7563bad5568686931aa4ff08f7"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7d005e058d86f2a968a8d28ca6f2052fab1f124a39035aa0523261d6baf21e1f"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe59a0c21a032024edb0c8e43f5dee5623fef0b65a1e3c1281836d9ce199af3b"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cdfc04f7647c29fb48da7a04082c34cdb16f878d3c6d098d62d5715c0ad3000c"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:68a89bb06d5a331511961f4d3fa7606f8e21237467ba9997cae6f67a1c2c2b9e"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:effe182767d102cb65dfbbf74192237dbd22d4191928d59415aa7d7c861d8c88"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25b4cedf2aa19fb7212894ce5f5219010cce611b60350e9a0a4d492122e7b351"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3a9bd02e1679c0fd2ecf69b72d0652dbe2a9844eaf04a36ddf4adfbd70010e95"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5e2b3d020219baa75f82a4e24b7c8adcb598c62f0e54e763c39361a9e5bad510"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:cf62dacb3f9234f3fddd74e178e6d25c68f2067fde765f1d95f87b1381248f58"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:fa263135b892686e11d5b84f6a1892523123a00b7e5882eff4fbdabb38667347"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:fa4c598ed77f74ec973247ca776341200b0f93ec3883e34c222907ce72cb92a4"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-win32.whl", hash = "sha256:c2523f8180ebd9796c18d809e9a19075a1060b1a170fde3799e83db940c1b6d5"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-win_amd64.whl", hash = "sha256:5ada0a14c67452358c1ee52ad14b80517a87b944897aaec3e875279371a9cb96"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ca8a23097c1f50e0fdb4de9e427537ca122a18df2eead06ed39c3a0bef6d9d3a"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9be02162af0376d64b840f2fc8ee3366794fc149f1e06d095a6a1d42447d97c5"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:af4f7c3c904ca709493eb66ca9080b44190c38e9ecb3b48b96d38825d5672559"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f50d1227e6e2a0e3ae1fb1c9a2e1c59577d3051af72c7cab2bcc430cb5e18da"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c71d9d512b76f05fa00282227c2ae884abb60e09f08b5ca3132b7e7431ac7f0d"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b52ac2626945cd21a2487aeefed794c14ee31514c8ae69b7599170418211e6f6"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca00fafd2756bc9649bf80f1cf72c647dce38635f0695d7ce804bc0f759aa756"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d248a109699ce9992304e79c1f8735c82cc4c1386cd8e27027329c0549f248a2"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c88adbcb933f6b8612f6c593384bf824e562bb35fc8a0f55fac690ab5b3486e5"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c8601a66fbfc0052bb7860d2eacd303fcde3c14e87fdde409eceff516d659e77"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:27be9c63215d302ede7d654142a2e21f0d34ea6acba512a4ae4cfd52bbaa5b59"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:3dcffe1f3cbda0dc32133a2ae2255526561ca594f15f9644384549037b355245"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8450d15f7765482e86ef9be2ad1a05683cd826f59ad236ef7b9fb606464a56aa"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-win32.whl", hash = "sha256:460853983ab88f873173e27cc601c5276d469388e6ad6e08c4fd57b2a86f1064"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-win_amd64.whl", hash = "sha256:424f82c35dbe4f83bdc3b490d7d696a1dc6423b3d911460f5493b7ffae999fd2"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c3fbe449d869ea4d0909fc9d862007fb39a584fb0b73349a6aab336f0d90eaed"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:16080c05a63d6042643ae9b6cfec1aefd3e61cef53d0abe0df3069b9d4b72077"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dbcf5371ea704759fcce772c66a07647751d1f5dbdec7818331c9b31ae996c77"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:114810491efb25464016fd554fdf1e20d390309cecef62587494fc474d4b926f"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99a84ab9ac9a823e7e93b4414f86344052a5f3e23b23aa365cda01393ad895bd"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:81642a24798851b118f82884205fc1bd9ff70b655c04018c467824b6ecc1fabc"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3741cb0bf9794783028e8b0cf23dab917fa5e37a6093b94c4c2f805f8e36b9f"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:759a3361711586a29bc753d3d1bdb862983bd9b9f37fbd7f6216c24f7c972554"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1333fb3d603d6b1040e365dca4892ba72c7e896df77a54eae27dc07db90906e3"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:916bc2e6cf492c77ad6deb7bcd088f0ce9c607aaeabc543edeb703e1fbc43e31"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:23524635840500ce6f4d25005c9529a97621689c85d2f727c52eed1782839a6a"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:ebe303cd9839af69dd1f7942acaa80b1ba90bacef2e7ded9347fbed4f1654672"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:fe56659ccadbee97908132135de4b875543353351e0c92e736b7c57aee298b5a"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-win32.whl", hash = "sha256:3f11a7eff7bc6301cd6a5d43f309e22a815af07e1f08eeb2182892fca04c86cb"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-win_amd64.whl", hash = "sha256:e8914dad106dacb0775718e54bf15e528055c4e92fb2677842996f2d52da5069"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7f7930adf84301797c3f09c94b9c5a9ed90a9e8b8ed19b41d2384937e0f9f5bd"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c31022d9970177f6affc6d5dd757ed22e44a10890212032fabab903fdee3bfe7"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f42b82f268689f429def9ecfb86fa65ceea0eaf3fed408b570fe113311bf5ce7"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b477b43ced896301665183a5e0faec0f5aea2373005648da8bdcb3c4b73f280"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:d63def9bbc6b35aef4d76dc740301a4185867e8870cbb8719ec9de672212fca8"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:c66546e30addb04a16cd864f10f5821272a1bfe6462ee5605613b4f1cb6f7b48"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f799d1d6c33d81e983d3682571cc7d993ae7ff772c19b3aabb767039c33f6d1e"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d82f20c0060ffdaadaf642b88ab0aa52365b56dffae812e188e5bdb998043588"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:042644133244bfa7b20de635d500eb9f46af7097f3d90b1724f94866f17cb55e"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75c45dcd595f8178412367e302fd022860ea025dc4a78b197b35428081ed33d5"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3d8b081988d0a49c486e4e845a547565fee7c6e7ad8be57ff29c3d7c14c6894c"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16ffad751f43ab61001187b3fb4a9447ec2d1aedeff7c5bac86d3b95f9980cc3"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:020858dd89b60ce38811cd6e37875c4c3c8d7fcd8bc20a0ad2ed1f464b34dc4e"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cda1e2f66bb4ba7261a0f4c2d052d5d909798fca557cbff68f8a79a87d66a18f"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b6389c50d8d214c9cd11a77f6d501529cb23279a9c9cafe519a3a4b503b5f72a"}, + {file = "rapidfuzz-2.13.7.tar.gz", hash = "sha256:8d3e252d4127c79b4d7c2ae47271636cbaca905c8bb46d80c7930ab906cf4b5c"}, +] + +[package.extras] +full = ["numpy"] [[package]] name = "recommonmark" @@ -739,6 +1406,10 @@ description = "A docutils-compatibility bridge to CommonMark, enabling you to wr category = "main" optional = false python-versions = "*" +files = [ + {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, + {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, +] [package.dependencies] commonmark = ">=0.8.1" @@ -747,29 +1418,37 @@ sphinx = ">=1.3.1" [[package]] name = "requests" -version = "2.28.1" +version = "2.28.2" description = "Python HTTP for Humans." category = "main" optional = false python-versions = ">=3.7, <4" +files = [ + {file = "requests-2.28.2-py3-none-any.whl", hash = "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa"}, + {file = "requests-2.28.2.tar.gz", hash = "sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf"}, +] [package.dependencies] certifi = ">=2017.4.17" -charset-normalizer = ">=2,<3" +charset-normalizer = ">=2,<4" idna = ">=2.5,<4" urllib3 = ">=1.21.1,<1.27" [package.extras] socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "requests-toolbelt" -version = "0.9.1" +version = "0.10.1" description = "A utility belt for advanced users of python-requests" category = "main" optional = false -python-versions = "*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "requests-toolbelt-0.10.1.tar.gz", hash = "sha256:62e09f7ff5ccbda92772a29f394a49c3ad6cb181d568b1337626b2abb628a63d"}, + {file = "requests_toolbelt-0.10.1-py2.py3-none-any.whl", hash = "sha256:18565aa58116d9951ac39baa288d3adb5b3ff975c4f25eee78555d89e8f247f7"}, +] [package.dependencies] requests = ">=2.0.1,<3.0.0" @@ -781,18 +1460,43 @@ description = "Python bindings to FreeDesktop.org Secret Service API" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] [package.dependencies] cryptography = ">=2.0" jeepney = ">=0.6" +[[package]] +name = "setuptools" +version = "65.7.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "setuptools-65.7.0-py3-none-any.whl", hash = "sha256:8ab4f1dbf2b4a65f7eec5ad0c620e84c34111a68d3349833494b9088212214dd"}, + {file = "setuptools-65.7.0.tar.gz", hash = "sha256:4d3c92fac8f1118bb77a22181355e29c239cabfe2b9effdaa665c66b711136d7"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + [[package]] name = "shellingham" -version = "1.5.0" +version = "1.5.0.post1" description = "Tool to Detect Surrounding Shell" category = "main" optional = false -python-versions = ">=3.4" +python-versions = ">=3.7" +files = [ + {file = "shellingham-1.5.0.post1-py2.py3-none-any.whl", hash = "sha256:368bf8c00754fd4f55afb7bbb86e272df77e4dc76ac29dbcbb81a59e9fc15744"}, + {file = "shellingham-1.5.0.post1.tar.gz", hash = "sha256:823bc5fb5c34d60f285b624e7264f4dda254bc803a3774a147bf99c0e3004a28"}, +] [[package]] name = "six" @@ -801,6 +1505,10 @@ description = "Python 2 and 3 compatibility utilities" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] [[package]] name = "snowballstemmer" @@ -809,6 +1517,10 @@ description = "This package provides 29 stemmers for 28 languages generated from category = "main" optional = false python-versions = "*" +files = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] [[package]] name = "soupsieve" @@ -817,6 +1529,10 @@ description = "A modern CSS selector implementation for Beautiful Soup." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, +] [[package]] name = "sphinx" @@ -825,6 +1541,10 @@ description = "Python documentation generator" category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, + {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, +] [package.dependencies] alabaster = ">=0.7,<0.8" @@ -836,6 +1556,7 @@ Jinja2 = ">=2.3" packaging = "*" Pygments = ">=2.0" requests = ">=2.5.0" +setuptools = "*" snowballstemmer = ">=1.1" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" @@ -846,8 +1567,8 @@ sphinxcontrib-serializinghtml = "*" [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-stubs"] -test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] +lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)"] +test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] [[package]] name = "sphinxbootstrap4theme" @@ -856,6 +1577,9 @@ description = "Sphinx Bootstrap4 Theme" category = "main" optional = false python-versions = "*" +files = [ + {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, +] [[package]] name = "sphinxcontrib-applehelp" @@ -864,9 +1588,13 @@ description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -876,9 +1604,13 @@ description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -888,10 +1620,14 @@ description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML h category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest", "html5lib"] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["html5lib", "pytest"] [[package]] name = "sphinxcontrib-jsmath" @@ -900,9 +1636,13 @@ description = "A sphinx extension which renders display math in HTML via JavaScr category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] [package.extras] -test = ["pytest", "flake8", "mypy"] +test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" @@ -911,9 +1651,13 @@ description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp d category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -923,21 +1667,29 @@ description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "termcolor" -version = "2.0.1" +version = "2.2.0" description = "ANSI color formatting for output in terminal" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "termcolor-2.2.0-py3-none-any.whl", hash = "sha256:91ddd848e7251200eac969846cbae2dacd7d71c2871e92733289e7e3666f48e7"}, + {file = "termcolor-2.2.0.tar.gz", hash = "sha256:dfc8ac3f350788f23b2947b3e6cfa5a53b630b612e6cd8965a015a776020b99a"}, +] [package.extras] -tests = ["pytest-cov", "pytest"] +tests = ["pytest", "pytest-cov"] [[package]] name = "test-apps-shared-test-helpers" @@ -946,11 +1698,12 @@ description = "Shared Regression Test Helpers for Test Apps" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} -origen_metal = {path = "../../python/origen_metal", develop = true} +pl_ext_cmds = {path = "../pl_ext_cmds", develop = true} [package.source] type = "directory" @@ -963,14 +1716,46 @@ description = "Python Library for Tom's Obvious, Minimal Language" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] [[package]] name = "tomlkit" -version = "0.11.5" +version = "0.11.6" description = "Style preserving TOML library" category = "main" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.6" +files = [ + {file = "tomlkit-0.11.6-py3-none-any.whl", hash = "sha256:07de26b0d8cfc18f871aec595fda24d95b08fef89d147caa861939f37230bf4b"}, + {file = "tomlkit-0.11.6.tar.gz", hash = "sha256:71b952e5721688937fb02cf9d354dbcf0785066149d2855e44531ebdd2b65d73"}, +] + +[[package]] +name = "trove-classifiers" +version = "2023.1.12" +description = "Canonical source for classifiers on PyPI (pypi.org)." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "trove-classifiers-2023.1.12.tar.gz", hash = "sha256:eba460d83260fcf3648d7c8acbf2204344fd785f890fbaecb6864a7fb9f0692e"}, + {file = "trove_classifiers-2023.1.12-py3-none-any.whl", hash = "sha256:b10b3cbdefc342fbce9aa5b49907c7df4b33b14252a8e0ee4122cbf918a5cab4"}, +] [[package]] name = "typing-extensions" @@ -979,18 +1764,26 @@ description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, + {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, +] [[package]] name = "urllib3" -version = "1.26.12" +version = "1.26.14" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + {file = "urllib3-1.26.14-py2.py3-none-any.whl", hash = "sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"}, + {file = "urllib3-1.26.14.tar.gz", hash = "sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72"}, +] [package.extras] -brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] @@ -1000,17 +1793,42 @@ description = "Virtual Python Environment builder" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "virtualenv-20.16.5-py3-none-any.whl", hash = "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27"}, + {file = "virtualenv-20.16.5.tar.gz", hash = "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da"}, +] [package.dependencies] distlib = ">=0.3.5,<1" filelock = ">=3.4.1,<4" -importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.8\""} platformdirs = ">=2.4,<3" [package.extras] docs = ["proselint (>=0.13)", "sphinx (>=5.1.1)", "sphinx-argparse (>=0.3.1)", "sphinx-rtd-theme (>=1)", "towncrier (>=21.9)"] testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] +[[package]] +name = "virtualenv" +version = "20.17.1" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, + {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, +] + +[package.dependencies] +distlib = ">=0.3.6,<1" +filelock = ">=3.4.1,<4" +importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.8\""} +platformdirs = ">=2.4,<3" + +[package.extras] +docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] +testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] + [[package]] name = "webencodings" version = "0.5.1" @@ -1018,14 +1836,92 @@ description = "Character encoding aliases for legacy web content" category = "main" optional = false python-versions = "*" +files = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] [[package]] name = "xattr" -version = "0.9.9" +version = "0.10.1" description = "Python wrapper for extended filesystem attributes" category = "main" optional = false python-versions = "*" +files = [ + {file = "xattr-0.10.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:16a660a883e703b311d1bbbcafc74fa877585ec081cd96e8dd9302c028408ab1"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:1e2973e72faa87ca29d61c23b58c3c89fe102d1b68e091848b0e21a104123503"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:13279fe8f7982e3cdb0e088d5cb340ce9cbe5ef92504b1fd80a0d3591d662f68"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:1dc9b9f580ef4b8ac5e2c04c16b4d5086a611889ac14ecb2e7e87170623a0b75"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:485539262c2b1f5acd6b6ea56e0da2bc281a51f74335c351ea609c23d82c9a79"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:295b3ab335fcd06ca0a9114439b34120968732e3f5e9d16f456d5ec4fa47a0a2"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:a126eb38e14a2f273d584a692fe36cff760395bf7fc061ef059224efdb4eb62c"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:b0e919c24f5b74428afa91507b15e7d2ef63aba98e704ad13d33bed1288dca81"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:e31d062cfe1aaeab6ba3db6bd255f012d105271018e647645941d6609376af18"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:209fb84c09b41c2e4cf16dd2f481bb4a6e2e81f659a47a60091b9bcb2e388840"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c4120090dac33eddffc27e487f9c8f16b29ff3f3f8bcb2251b2c6c3f974ca1e1"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3e739d624491267ec5bb740f4eada93491de429d38d2fcdfb97b25efe1288eca"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2677d40b95636f3482bdaf64ed9138fb4d8376fb7933f434614744780e46e42d"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40039f1532c4456fd0f4c54e9d4e01eb8201248c321c6c6856262d87e9a99593"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:148466e5bb168aba98f80850cf976e931469a3c6eb11e9880d9f6f8b1e66bd06"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0aedf55b116beb6427e6f7958ccd80a8cbc80e82f87a4cd975ccb61a8d27b2ee"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c3024a9ff157247c8190dd0eb54db4a64277f21361b2f756319d9d3cf20e475f"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f1be6e733e9698f645dbb98565bb8df9b75e80e15a21eb52787d7d96800e823b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7880c8a54c18bc091a4ce0adc5c6d81da1c748aec2fe7ac586d204d6ec7eca5b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:89c93b42c3ba8aedbc29da759f152731196c2492a2154371c0aae3ef8ba8301b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6b905e808df61b677eb972f915f8a751960284358b520d0601c8cbc476ba2df6"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1ef954d0655f93a34d07d0cc7e02765ec779ff0b59dc898ee08c6326ad614d5"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:199b20301b6acc9022661412346714ce764d322068ef387c4de38062474db76c"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec0956a8ab0f0d3f9011ba480f1e1271b703d11542375ef73eb8695a6bd4b78b"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ffcb57ca1be338d69edad93cf59aac7c6bb4dbb92fd7bf8d456c69ea42f7e6d2"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1f0563196ee54756fe2047627d316977dc77d11acd7a07970336e1a711e934db"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc354f086f926a1c7f04886f97880fed1a26d20e3bc338d0d965fd161dbdb8ab"}, + {file = "xattr-0.10.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c0cd2d02ef2fb45ecf2b0da066a58472d54682c6d4f0452dfe7ae2f3a76a42ea"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:49626096ddd72dcc1654aadd84b103577d8424f26524a48d199847b5d55612d0"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ceaa26bef8fcb17eb59d92a7481c2d15d20211e217772fb43c08c859b01afc6a"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8c014c371391f28f8cd27d73ea59f42b30772cd640b5a2538ad4f440fd9190b"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:46c32cd605673606b9388a313b0050ee7877a0640d7561eea243ace4fa2cc5a6"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:772b22c4ff791fe5816a7c2a1c9fcba83f9ab9bea138eb44d4d70f34676232b4"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:183ad611a2d70b5a3f5f7aadef0fcef604ea33dcf508228765fd4ddac2c7321d"}, + {file = "xattr-0.10.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8068df3ebdfa9411e58d5ae4a05d807ec5994645bb01af66ec9f6da718b65c5b"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bc40570155beb85e963ae45300a530223d9822edfdf09991b880e69625ba38a"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:436e1aaf23c07e15bed63115f1712d2097e207214fc6bcde147c1efede37e2c5"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7298455ccf3a922d403339781b10299b858bb5ec76435445f2da46fb768e31a5"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:986c2305c6c1a08f78611eb38ef9f1f47682774ce954efb5a4f3715e8da00d5f"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5dc6099e76e33fa3082a905fe59df766b196534c705cf7a2e3ad9bed2b8a180e"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:042ad818cda6013162c0bfd3816f6b74b7700e73c908cde6768da824686885f8"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9d4c306828a45b41b76ca17adc26ac3dc00a80e01a5ba85d71df2a3e948828f2"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a606280b0c9071ef52572434ecd3648407b20df3d27af02c6592e84486b05894"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5b49d591cf34cda2079fd7a5cb2a7a1519f54dc2e62abe3e0720036f6ed41a85"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b8705ac6791426559c1a5c2b88bb2f0e83dc5616a09b4500899bfff6a929302"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a5ea974930e876bc5c146f54ac0f85bb39b7b5de2b6fc63f90364712ae368ebe"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f55a2dd73a12a1ae5113c5d9cd4b4ab6bf7950f4d76d0a1a0c0c4264d50da61d"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:475c38da0d3614cc5564467c4efece1e38bd0705a4dbecf8deeb0564a86fb010"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:925284a4a28e369459b2b7481ea22840eed3e0573a4a4c06b6b0614ecd27d0a7"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa32f1b45fed9122bed911de0fcc654da349e1f04fa4a9c8ef9b53e1cc98b91e"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c5d3d0e728bace64b74c475eb4da6148cd172b2d23021a1dcd055d92f17619ac"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8faaacf311e2b5cc67c030c999167a78a9906073e6abf08eaa8cf05b0416515c"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cc6b8d5ca452674e1a96e246a3d2db5f477aecbc7c945c73f890f56323e75203"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3725746a6502f40f72ef27e0c7bfc31052a239503ff3eefa807d6b02a249be22"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:789bd406d1aad6735e97b20c6d6a1701e1c0661136be9be862e6a04564da771f"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9a7a807ab538210ff8532220d8fc5e2d51c212681f63dbd4e7ede32543b070f"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3e5825b5fc99ecdd493b0cc09ec35391e7a451394fdf623a88b24726011c950d"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:80638d1ce7189dc52f26c234cee3522f060fadab6a8bc3562fe0ddcbe11ba5a4"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3ff0dbe4a6ce2ce065c6de08f415bcb270ecfd7bf1655a633ddeac695ce8b250"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5267e5f9435c840d2674194150b511bef929fa7d3bc942a4a75b9eddef18d8d8"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b27dfc13b193cb290d5d9e62f806bb9a99b00cd73bb6370d556116ad7bb5dc12"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:636ebdde0277bce4d12d2ef2550885804834418fee0eb456b69be928e604ecc4"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d60c27922ec80310b45574351f71e0dd3a139c5295e8f8b19d19c0010196544f"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b34df5aad035d0343bd740a95ca30db99b776e2630dca9cc1ba8e682c9cc25ea"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f24a7c04ff666d0fe905dfee0a84bc899d624aeb6dccd1ea86b5c347f15c20c1"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3878e1aff8eca64badad8f6d896cb98c52984b1e9cd9668a3ab70294d1ef92d"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4abef557028c551d59cf2fb3bf63f2a0c89f00d77e54c1c15282ecdd56943496"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0e14bd5965d3db173d6983abdc1241c22219385c22df8b0eb8f1846c15ce1fee"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f9be588a4b6043b03777d50654c6079af3da60cc37527dbb80d36ec98842b1e"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bc4ae264aa679aacf964abf3ea88e147eb4a22aea6af8c6d03ebdebd64cfd6"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:827b5a97673b9997067fde383a7f7dc67342403093b94ea3c24ae0f4f1fec649"}, + {file = "xattr-0.10.1.tar.gz", hash = "sha256:c12e7d81ffaa0605b3ac8c22c2994a8e18a9cf1c59287a1b7722a2289c952ec5"}, +] [package.dependencies] cffi = ">=1.0" @@ -1037,630 +1933,28 @@ description = "A formatter for Python code." category = "main" optional = false python-versions = "*" +files = [ + {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, + {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, +] [[package]] name = "zipp" -version = "3.10.0" +version = "3.11.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"}, + {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"}, +] [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "jaraco.functools", "more-itertools", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [metadata] -lock-version = "1.1" +lock-version = "2.0" python-versions = ">=3.7,<3.11" content-hash = "f1f014490864b5d619ae08b69574f6ed6d2c50121f8c787e03583ec5f12a379e" - -[metadata.files] -alabaster = [ - {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, - {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, -] -atomicwrites = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] -attrs = [ - {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, - {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, -] -babel = [ - {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, - {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, -] -"backports.cached-property" = [ - {file = "backports.cached-property-1.0.2.tar.gz", hash = "sha256:9306f9eed6ec55fd156ace6bc1094e2c86fae5fb2bf07b6a9c00745c656e75dd"}, - {file = "backports.cached_property-1.0.2-py3-none-any.whl", hash = "sha256:baeb28e1cd619a3c9ab8941431fe34e8490861fb998c6c4590693d50171db0cc"}, -] -beautifulsoup4 = [ - {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, - {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, - {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, -] -bs4 = [ - {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, -] -cachecontrol = [ - {file = "CacheControl-0.12.12-py2.py3-none-any.whl", hash = "sha256:5986a16897cd296bdb7b86b42e0403c4ca30b9875f0e0c7c8e509b50cff115b7"}, - {file = "CacheControl-0.12.12.tar.gz", hash = "sha256:9c2e5208ea76ebd9921176569743ddf6d7f3bb4188dbf61806f0f8fc48ecad38"}, -] -cachy = [ - {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, - {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, -] -certifi = [ - {file = "certifi-2022.9.24-py3-none-any.whl", hash = "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382"}, - {file = "certifi-2022.9.24.tar.gz", hash = "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14"}, -] -cffi = [ - {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, - {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, - {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, - {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, - {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, - {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, - {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, - {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, - {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, - {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, - {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, - {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, - {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, - {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, - {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, - {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, - {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, - {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, - {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, - {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, -] -cleo = [ - {file = "cleo-1.0.0a5-py3-none-any.whl", hash = "sha256:ff53056589300976e960f75afb792dfbfc9c78dcbb5a448e207a17b643826360"}, - {file = "cleo-1.0.0a5.tar.gz", hash = "sha256:097c9d0e0332fd53cc89fc11eb0a6ba0309e6a3933c08f7b38558555486925d3"}, -] -colorama = [ - {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, - {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, -] -commonmark = [ - {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, - {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, -] -crashtest = [ - {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, - {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, -] -cryptography = [ - {file = "cryptography-38.0.2-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:6635b89790a616913ae95977dcd756582a3c5a298a0b8f4071a35ec8809e1cab"}, - {file = "cryptography-38.0.2-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:d14f7e1e6726046c8afd240673cb31828dbd434d710d4ecb2060982e5c76df75"}, - {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:bd6ca1f5541420f13250b3335228dc7eb6102761a107442cbfba5de4ccc99891"}, - {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:32f4ab6652f0630884cc902154f1f26a3a5d8495404250019172dca6fd4abf70"}, - {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b99713109d76ad35736dcc4e47d54fbaa36cce761adc0333db75e86621fa68c"}, - {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:e03aaa0bb3783302ea23f0f483222d918f148c65e0f953d1c8d82f5e509a7fab"}, - {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:eb603f1809dd095d07a426d81457f4b8236ff4d7a67a976f9da47e13977d427e"}, - {file = "cryptography-38.0.2-cp36-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:55974e634712f7d054886a754a10c67b58e6a9d1c6c3d0d1181919e7fb336d0e"}, - {file = "cryptography-38.0.2-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:74ccc297d7cd013ca7faf640afaedb305b265420b342ab32d5fa07ddd19f24a1"}, - {file = "cryptography-38.0.2-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:8c6987de4b656f4d8d70ce422b5e275deedf9bf28d99e0470d50706a1470822c"}, - {file = "cryptography-38.0.2-cp36-abi3-win32.whl", hash = "sha256:dc8d465c2cf489f12f1168670a4eb90e68701916b15f5a1c6a1dd0f9c0b02e92"}, - {file = "cryptography-38.0.2-cp36-abi3-win_amd64.whl", hash = "sha256:ab4d517e2dc08d862493e727a4411ce6caab8a7ac2089b99a059d938ced5aa8b"}, - {file = "cryptography-38.0.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc7852c5f61c62df783bccdef935d5d64ca0dac7e6ace07f9937eff31690ce20"}, - {file = "cryptography-38.0.2-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:0d631744fdd965a6ca7e94106046c62ca26cd55a13c47aa76f9d07aa30806b8b"}, - {file = "cryptography-38.0.2-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:a25c5e86d34ec43ea59848afc44ec941da0c6d126fcc9ace72a1360e096e528b"}, - {file = "cryptography-38.0.2-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6ea4cbf5d8e8678dcd87fdb1bb5386d6a91cc8d738866f815c6839751221818c"}, - {file = "cryptography-38.0.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b4c782b5f47751983f5acd29344210d4de36524b78fa4fc96e9e47d31e44654"}, - {file = "cryptography-38.0.2-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:24cb9cb0ea0bc860250cb494ce59bb8d021c00de3a8ead140c0bb198bd0922ca"}, - {file = "cryptography-38.0.2-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:ca99f9c7599a02cddb878c64a2c81bbe0ffef7424c202acef47dd7c069b7469a"}, - {file = "cryptography-38.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:e553175c49ae31db579342d342e649db36cd91f457f3a90eed47698451479890"}, - {file = "cryptography-38.0.2-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7e3040ec05cff2ec32719d2b6428d9c022463c3a97735b7ba524e0283a48c8b4"}, - {file = "cryptography-38.0.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e90261b616c0805f0147c50fc69f758d7e321f5c446eea291618f2aa6742c5f3"}, - {file = "cryptography-38.0.2-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:8526fb97be3bae2977bdd8896a552c9149d04b6b77b36b7dfe026b16136061b2"}, - {file = "cryptography-38.0.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:407148dbe633d6f0bb3c6d4c0807d33a50d8dadfb1ca40b368fe72fcac4b2116"}, - {file = "cryptography-38.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:8fa734b9a7cf555fecddd4ba23e2c5524719bacdd63fd61544166c1352fa5e48"}, - {file = "cryptography-38.0.2.tar.gz", hash = "sha256:7a022ec87c7a8bdad99f516a4ee6ffcb3a2bc31487577f9eccbc9b2edb1a8fd4"}, -] -distlib = [ - {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, - {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, -] -docutils = [ - {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, - {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, -] -dulwich = [ - {file = "dulwich-0.20.46-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:6676196e9cf377cde62aa2f5d741e93207437343e0c62368bd0d784c322a3c49"}, - {file = "dulwich-0.20.46-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a1ca555a3eafe7388d6cb81bb08f34608a1592500f0bd4c26734c91d208a546"}, - {file = "dulwich-0.20.46-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:769442c9657b10fc35ac625beeaf440540c9288c96fcfaba3e58adf745c5cafd"}, - {file = "dulwich-0.20.46-cp310-cp310-win32.whl", hash = "sha256:de22a54f68c6c4e97f9b924abd46da4618536d7934b9849066be9fc5cd31205d"}, - {file = "dulwich-0.20.46-cp310-cp310-win_amd64.whl", hash = "sha256:42fa5a68908556eb6c40f231a67caf6a4660588aad707a9d6b334fa1d8f04bf7"}, - {file = "dulwich-0.20.46-cp311-cp311-macosx_10_15_x86_64.whl", hash = "sha256:3e16376031466848e44aabf3489fafb054482143744b21167dbd168731041c74"}, - {file = "dulwich-0.20.46-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:153c7512587384a290c60fef330f1ab397a59559e19e8b02a0169ff21b4c69fb"}, - {file = "dulwich-0.20.46-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a5b68bd815cd2769c75e5a78708eb0440612df19b370a977aa9e01a056baa9ed"}, - {file = "dulwich-0.20.46-cp311-cp311-win32.whl", hash = "sha256:b1339bca70764eb8e780d80c72e7c1cb4651201dc9e43ec5d616bf51eb3bb3a6"}, - {file = "dulwich-0.20.46-cp311-cp311-win_amd64.whl", hash = "sha256:1162fdafb2abdfe66649617061f3853cb26384fade1f6884f6fe6e9c570a7552"}, - {file = "dulwich-0.20.46-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:6826512f778eaa47e2e8c0a46cdc555958f9f5286771490b8642b4b508ea5d25"}, - {file = "dulwich-0.20.46-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:100d39bc18196a07c521fd5f60f78f397493303daa0b8690216864bbc621cd5d"}, - {file = "dulwich-0.20.46-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4cd2cd7baa81246bdc8c5272d4e9224e2255da7a0618a220aab5e07b9888e9b"}, - {file = "dulwich-0.20.46-cp36-cp36m-win32.whl", hash = "sha256:6eed5a3194d64112605fc0f638f4fa91771495e8674fa3e6d6b33bf150d297d5"}, - {file = "dulwich-0.20.46-cp36-cp36m-win_amd64.whl", hash = "sha256:9ca4d73987f5b0e2e843497876f9bb39a47384a2e50597a85542285f5c890293"}, - {file = "dulwich-0.20.46-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:b9f49de83911eed7adbe83136229837ef9d102e42dbe6aacb1a18be45c997ace"}, - {file = "dulwich-0.20.46-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d38be7d3a78d608ecab3348f7920d6b9002e7972dd245206dc8075cfdb91621d"}, - {file = "dulwich-0.20.46-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f4b7a7feb966a4669c254b18385fe0b3c639f3b1f5ddef0d9e083364cc762847"}, - {file = "dulwich-0.20.46-cp37-cp37m-win32.whl", hash = "sha256:f9552ac246bceab1c5cdd1ec3cfe9446fe76b9853eaf59d3244df03eb27fd3fe"}, - {file = "dulwich-0.20.46-cp37-cp37m-win_amd64.whl", hash = "sha256:90a075aeb0fdbad7e18b9db3af161e3d635e2b7697b7a4b467e6844a13b0b210"}, - {file = "dulwich-0.20.46-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:8d6fee82cedb2362942d9ef94061901f7e07d7d8674e4c7b6fceeef7822ae275"}, - {file = "dulwich-0.20.46-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:669c6b3d82996518a7fec4604771bd285e23f0860f41f565fef5987265d431d9"}, - {file = "dulwich-0.20.46-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd3eac228117487a959ac8f49ea2787eac34acc69999fe7adae70b23e3c3571c"}, - {file = "dulwich-0.20.46-cp38-cp38-win32.whl", hash = "sha256:92024f572d32680e021219f77015c8b443c38022e502b7f51ad7cf51a6285a36"}, - {file = "dulwich-0.20.46-cp38-cp38-win_amd64.whl", hash = "sha256:d928de1eba0326a2a8a52ed94c9bf7c315ff4db606a1aa3ae688d39574f93267"}, - {file = "dulwich-0.20.46-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:a5d1b7a3a7d84a5dedbb90092e00097357106b9642ac08a96c2ae89ccd8afd9a"}, - {file = "dulwich-0.20.46-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b739d759c10e2af7c964dcc97fd4e5dc49e8567d080eed8906fc422c79b7fdcf"}, - {file = "dulwich-0.20.46-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fc7a4f633f5468453d5dd84a753cd99d4433f0397437229a0a8b10347935591"}, - {file = "dulwich-0.20.46-cp39-cp39-win32.whl", hash = "sha256:525115c4d1fbf60a5fe98f340b4ca597ba47b2c75d9c5ec750dd0e9115ef8ec6"}, - {file = "dulwich-0.20.46-cp39-cp39-win_amd64.whl", hash = "sha256:73e2585a9fcf1f8cdad8597a0c384c0b365b2e8346463130c96d9ea1478587ae"}, - {file = "dulwich-0.20.46.tar.gz", hash = "sha256:4f0e88ffff5db1523d93d92f1525fe5fa161318ffbaad502c1b9b3be7a067172"}, -] -filelock = [ - {file = "filelock-3.8.0-py3-none-any.whl", hash = "sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4"}, - {file = "filelock-3.8.0.tar.gz", hash = "sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc"}, -] -html5lib = [ - {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, - {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, -] -idna = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] -imagesize = [ - {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, - {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, -] -importlib-metadata = [ - {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, - {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, -] -importlib-resources = [ - {file = "importlib_resources-5.10.0-py3-none-any.whl", hash = "sha256:ee17ec648f85480d523596ce49eae8ead87d5631ae1551f913c0100b5edd3437"}, - {file = "importlib_resources-5.10.0.tar.gz", hash = "sha256:c01b1b94210d9849f286b86bb51bcea7cd56dde0600d8db721d7b81330711668"}, -] -iniconfig = [ - {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, - {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, -] -"jaraco.classes" = [ - {file = "jaraco.classes-3.2.3-py3-none-any.whl", hash = "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158"}, - {file = "jaraco.classes-3.2.3.tar.gz", hash = "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a"}, -] -jeepney = [ - {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, - {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, -] -jinja2 = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, -] -jsonschema = [ - {file = "jsonschema-4.16.0-py3-none-any.whl", hash = "sha256:9e74b8f9738d6a946d70705dc692b74b5429cd0960d58e79ffecfc43b2221eb9"}, - {file = "jsonschema-4.16.0.tar.gz", hash = "sha256:165059f076eff6971bae5b742fc029a7b4ef3f9bcf04c14e4776a7605de14b23"}, -] -keyring = [ - {file = "keyring-23.9.3-py3-none-any.whl", hash = "sha256:69732a15cb1433bdfbc3b980a8a36a04878a6cfd7cb99f497b573f31618001c0"}, - {file = "keyring-23.9.3.tar.gz", hash = "sha256:69b01dd83c42f590250fe7a1f503fc229b14de83857314b1933a3ddbf595c4a5"}, -] -mako = [ - {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, -] -markupsafe = [ - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, - {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, -] -more-itertools = [ - {file = "more-itertools-9.0.0.tar.gz", hash = "sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab"}, - {file = "more_itertools-9.0.0-py3-none-any.whl", hash = "sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41"}, -] -msgpack = [ - {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, - {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, - {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, - {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, - {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, - {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, - {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, - {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, - {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, - {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, - {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, - {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, - {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, - {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, - {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, - {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, -] -origen = [] -origen-autoapi = [ - {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, - {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, -] -origen-metal = [] -packaging = [ - {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, - {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, -] -pexpect = [ - {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, - {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, -] -pkginfo = [ - {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, - {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, -] -pkgutil-resolve-name = [ - {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, - {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, -] -platformdirs = [ - {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, - {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, -] -pluggy = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] -poetry = [ - {file = "poetry-1.2.2-py3-none-any.whl", hash = "sha256:93ea3c4a622485c2a7b7249f1e34e4ac84f8229ded76153b67506313201b154f"}, - {file = "poetry-1.2.2.tar.gz", hash = "sha256:6d9ed0b1b826a0a79190f2078d7d78483fa24bf2494f3b170e354eaa5e7b5ea1"}, -] -poetry-core = [ - {file = "poetry-core-1.3.2.tar.gz", hash = "sha256:0ab006a40cb38d6a38b97264f6835da2f08a96912f2728ce668e9ac6a34f686f"}, - {file = "poetry_core-1.3.2-py3-none-any.whl", hash = "sha256:ea0f5a90b339cde132b4e43cff78a1b440cd928db864bb67cfc97fdfcefe7218"}, -] -poetry-plugin-export = [ - {file = "poetry-plugin-export-1.1.2.tar.gz", hash = "sha256:5e92525dd63f38ce74a51ed68ea91d753523f21ce5f9ef8d3b793e2a4b2222ef"}, - {file = "poetry_plugin_export-1.1.2-py3-none-any.whl", hash = "sha256:946e3313b3d00c18fb9a50522e9d5e6a7e111beaba8d6ae33297662fc2070ac1"}, -] -ptyprocess = [ - {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, - {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, -] -py = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] -pycparser = [ - {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, - {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, -] -pygments = [ - {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, - {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, -] -pylev = [ - {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, - {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, -] -pyparsing = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, -] -pyreadline3 = [ - {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, - {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, -] -pyrsistent = [ - {file = "pyrsistent-0.18.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:df46c854f490f81210870e509818b729db4488e1f30f2a1ce1698b2295a878d1"}, - {file = "pyrsistent-0.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d45866ececf4a5fff8742c25722da6d4c9e180daa7b405dc0a2a2790d668c26"}, - {file = "pyrsistent-0.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4ed6784ceac462a7d6fcb7e9b663e93b9a6fb373b7f43594f9ff68875788e01e"}, - {file = "pyrsistent-0.18.1-cp310-cp310-win32.whl", hash = "sha256:e4f3149fd5eb9b285d6bfb54d2e5173f6a116fe19172686797c056672689daf6"}, - {file = "pyrsistent-0.18.1-cp310-cp310-win_amd64.whl", hash = "sha256:636ce2dc235046ccd3d8c56a7ad54e99d5c1cd0ef07d9ae847306c91d11b5fec"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e92a52c166426efbe0d1ec1332ee9119b6d32fc1f0bbfd55d5c1088070e7fc1b"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7a096646eab884bf8bed965bad63ea327e0d0c38989fc83c5ea7b8a87037bfc"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cdfd2c361b8a8e5d9499b9082b501c452ade8bbf42aef97ea04854f4a3f43b22"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-win32.whl", hash = "sha256:7ec335fc998faa4febe75cc5268a9eac0478b3f681602c1f27befaf2a1abe1d8"}, - {file = "pyrsistent-0.18.1-cp37-cp37m-win_amd64.whl", hash = "sha256:6455fc599df93d1f60e1c5c4fe471499f08d190d57eca040c0ea182301321286"}, - {file = "pyrsistent-0.18.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:fd8da6d0124efa2f67d86fa70c851022f87c98e205f0594e1fae044e7119a5a6"}, - {file = "pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bfe2388663fd18bd8ce7db2c91c7400bf3e1a9e8bd7d63bf7e77d39051b85ec"}, - {file = "pyrsistent-0.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0e3e1fcc45199df76053026a51cc59ab2ea3fc7c094c6627e93b7b44cdae2c8c"}, - {file = "pyrsistent-0.18.1-cp38-cp38-win32.whl", hash = "sha256:b568f35ad53a7b07ed9b1b2bae09eb15cdd671a5ba5d2c66caee40dbf91c68ca"}, - {file = "pyrsistent-0.18.1-cp38-cp38-win_amd64.whl", hash = "sha256:d1b96547410f76078eaf66d282ddca2e4baae8964364abb4f4dcdde855cd123a"}, - {file = "pyrsistent-0.18.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f87cc2863ef33c709e237d4b5f4502a62a00fab450c9e020892e8e2ede5847f5"}, - {file = "pyrsistent-0.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc66318fb7ee012071b2792024564973ecc80e9522842eb4e17743604b5e045"}, - {file = "pyrsistent-0.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:914474c9f1d93080338ace89cb2acee74f4f666fb0424896fcfb8d86058bf17c"}, - {file = "pyrsistent-0.18.1-cp39-cp39-win32.whl", hash = "sha256:1b34eedd6812bf4d33814fca1b66005805d3640ce53140ab8bbb1e2651b0d9bc"}, - {file = "pyrsistent-0.18.1-cp39-cp39-win_amd64.whl", hash = "sha256:e24a828f57e0c337c8d8bb9f6b12f09dfdf0273da25fda9e314f0b684b415a07"}, - {file = "pyrsistent-0.18.1.tar.gz", hash = "sha256:d4d61f8b993a7255ba714df3aca52700f8125289f84f704cf80916517c46eb96"}, -] -pytest = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, -] -python-plugin = [] -pytz = [ - {file = "pytz-2022.5-py2.py3-none-any.whl", hash = "sha256:335ab46900b1465e714b4fda4963d87363264eb662aab5e65da039c25f1f5b22"}, - {file = "pytz-2022.5.tar.gz", hash = "sha256:c4d88f472f54d615e9cd582a5004d1e5f624854a6a27a6211591c251f22a6914"}, -] -pywin32-ctypes = [ - {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, - {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, -] -recommonmark = [ - {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, - {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, -] -requests = [ - {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, - {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, -] -requests-toolbelt = [ - {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, - {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, -] -secretstorage = [ - {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, - {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, -] -shellingham = [ - {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, - {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, -] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -snowballstemmer = [ - {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, - {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, -] -soupsieve = [ - {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, - {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, -] -sphinx = [ - {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, - {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, -] -sphinxbootstrap4theme = [ - {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, -] -sphinxcontrib-applehelp = [ - {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, - {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, -] -sphinxcontrib-devhelp = [ - {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, - {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, -] -sphinxcontrib-htmlhelp = [ - {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, - {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, -] -sphinxcontrib-jsmath = [ - {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, - {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, -] -sphinxcontrib-qthelp = [ - {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, - {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, -] -sphinxcontrib-serializinghtml = [ - {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, - {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, -] -termcolor = [ - {file = "termcolor-2.0.1-py3-none-any.whl", hash = "sha256:7e597f9de8e001a3208c4132938597413b9da45382b6f1d150cff8d062b7aaa3"}, - {file = "termcolor-2.0.1.tar.gz", hash = "sha256:6b2cf769e93364a2676e1de56a7c0cff2cf5bd07f37e9cc80b0dd6320ebfe388"}, -] -test-apps-shared-test-helpers = [] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -tomlkit = [ - {file = "tomlkit-0.11.5-py3-none-any.whl", hash = "sha256:f2ef9da9cef846ee027947dc99a45d6b68a63b0ebc21944649505bf2e8bc5fe7"}, - {file = "tomlkit-0.11.5.tar.gz", hash = "sha256:571854ebbb5eac89abcb4a2e47d7ea27b89bf29e09c35395da6f03dd4ae23d1c"}, -] -typing-extensions = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, -] -urllib3 = [ - {file = "urllib3-1.26.12-py2.py3-none-any.whl", hash = "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"}, - {file = "urllib3-1.26.12.tar.gz", hash = "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e"}, -] -virtualenv = [ - {file = "virtualenv-20.16.5-py3-none-any.whl", hash = "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27"}, - {file = "virtualenv-20.16.5.tar.gz", hash = "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da"}, -] -webencodings = [ - {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, - {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, -] -xattr = [ - {file = "xattr-0.9.9-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:58a9fb4fd19b467e88f4b75b5243706caa57e312d3aee757b53b57c7fd0f4ba9"}, - {file = "xattr-0.9.9-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e71efca59705c7abde5b7f76323ebe00ed2977f10cba4204b9421dada036b5ca"}, - {file = "xattr-0.9.9-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:1aad96b6603961c3d1ca1aaa8369b1a8d684a7b37357b2428087c286bf0e561c"}, - {file = "xattr-0.9.9-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:46cb74f98d31d9d70f975ec3e6554360a9bdcbb4b9fb50a69fabe54f9f928c97"}, - {file = "xattr-0.9.9-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:80c2db56058a687d7439be041f916cbeb2943fbe2623e53d5da721a4552d8991"}, - {file = "xattr-0.9.9-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:c360d1cc42e885b64d84f64de3c501dd7bce576248327ef583b4625ee63aa023"}, - {file = "xattr-0.9.9-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:debd87afe6bdf88c3689bde52eecf2b166388b13ef7388259d23223374db417d"}, - {file = "xattr-0.9.9-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:4280c9f33a8678828f1bbc3d3dc8b823b5e4a113ee5ecb0fb98bff60cc2b9ad1"}, - {file = "xattr-0.9.9-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:e0916ec1656d2071cd3139d1f52426825985d8ed076f981ef7f0bc13dfa8e96c"}, - {file = "xattr-0.9.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a517916fbf2f58a3222bb2048fe1eeff4e23e07a4ce6228a27de004c80bf53ab"}, - {file = "xattr-0.9.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e886c882b3b28c7a684c3e3daf46347da5428a46b88bc6d62c4867d574b90c54"}, - {file = "xattr-0.9.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:373e3d1fd9258438fc38d1438142d3659f36743f374a20457346ef26741ed441"}, - {file = "xattr-0.9.9-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a7beeb54ca140273b2f6320bb98b701ec30628af2ebe4eb30f7051419eb4ef3"}, - {file = "xattr-0.9.9-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef3ca29cdaae9c47c625d84bb6c9046f7275cccde0ea805caa23ca58d3671f3f"}, - {file = "xattr-0.9.9-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c381d890931cd18b137ce3fb5c5f08b672c3c61e2e47b1a7442ee46e827abfe"}, - {file = "xattr-0.9.9-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:59c5783ccf57cf2700ce57d51a92134900ed26f6ab20d209f383fb898903fea6"}, - {file = "xattr-0.9.9-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:966b885b69d95362e2a12d39f84889cf857090e57263b5ac33409498aa00c160"}, - {file = "xattr-0.9.9-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efaaf0cb1ea8e9febb7baad301ae8cc9ad7a96fdfc5c6399d165e7a19e3e61ce"}, - {file = "xattr-0.9.9-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f19fa75ed1e9db86354efab29869cb2be6976d456bd7c89e67b118d5384a1d98"}, - {file = "xattr-0.9.9-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7ca28ad06828244b315214ee35388f57e81e90aac2ceac3f32e42ae394e31b9c"}, - {file = "xattr-0.9.9-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:532c7f1656dd2fe937116b9e210229f716d7fc7ac142f9cdace7da92266d32e8"}, - {file = "xattr-0.9.9-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11c28033c17e98c67e0def9d6ebd415ad3c006a7bc3fee6bad79c5e52d0dff49"}, - {file = "xattr-0.9.9-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:473cabb30e544ea08c8c01c1ef18053147cdc8552d443ac97815e46fbb13c7d4"}, - {file = "xattr-0.9.9-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:c4a308522b444d090fbd66a385c9519b6b977818226921b0d2fc403667c93564"}, - {file = "xattr-0.9.9-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:82493434488aca72d88b5129dac8f212e7b8bdca7ceffe7bb977c850f2452e4e"}, - {file = "xattr-0.9.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e41d289706c7e8940f4d08e865da6a8ae988123e40a44f9a97ddc09e67795d7d"}, - {file = "xattr-0.9.9-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef08698e360cf43688dca3db3421b156b29948a714d5d089348073f463c11646"}, - {file = "xattr-0.9.9-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4eb10ac16ca8d534c0395425d52121e0c1981f808e1b3f577f6a5ec33d3853e4"}, - {file = "xattr-0.9.9-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5605fec07b0e964bd980cc70ec335b9eb1b7ac7c6f314c7c2d8f54b09104fe4c"}, - {file = "xattr-0.9.9-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:974e7d577ddb15e4552fb0ec10a4cfe09bdf6267365aa2b8394bb04637785aad"}, - {file = "xattr-0.9.9-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:ad6777de922c638bfa87a0d7faebc5722ddef04a1210b2a8909289b58b769af0"}, - {file = "xattr-0.9.9-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:3887e70873ebf0efbde32f9929ec1c7e45ec0013561743e2cc0406a91e51113b"}, - {file = "xattr-0.9.9-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:83caa8e93a45a0f25f91b92d9b45f490c87bff74f02555df6312efeba0dacc31"}, - {file = "xattr-0.9.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e33ec0a1d913d946d1ab7509f37ee37306c45af735347f13b963df34ffe6e029"}, - {file = "xattr-0.9.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:263c58dca83372260c5c195e0b59959e38e1f107f0b7350de82e3db38479036c"}, - {file = "xattr-0.9.9-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:125dfb9905428162349d3b8b825d9a18280893f0cb0db2a2467d5ef253fa6ce2"}, - {file = "xattr-0.9.9-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e243524e0dde16d7a2e1b52512ad2c6964df2143dd1c79b820dcb4c6c0822c20"}, - {file = "xattr-0.9.9-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01ec07d24a14406bdc6a123041c63a88e1c4a3f820e4a7d30f7609d57311b499"}, - {file = "xattr-0.9.9-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:85c1df5f1d209345ea96de137419e886a27bb55076b3ae01faacf35aafcf3a61"}, - {file = "xattr-0.9.9-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ca74d3eff92d6dc16e271fbad9cbab547fb9a0c983189c4031c3ff3d150dd871"}, - {file = "xattr-0.9.9-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7d17505e49ac70c0e71939c5aac96417a863583fb30a2d6304d5ac881230548f"}, - {file = "xattr-0.9.9-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1ae47a6398d3c04623fa386a4aa2f66e5cd3cdb1a7e69d1bfaeb8c73983bf271"}, - {file = "xattr-0.9.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:809e2537d0aff9fca97dacf3245cbbaf711bbced5d1b0235a8d1906b04e26114"}, - {file = "xattr-0.9.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:de3af84364f06d67b3662ccf7c1a73e1d389d8d274394e952651e7bf1bbd2718"}, - {file = "xattr-0.9.9-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b62cdad232d2d2dedd39b543701db8e3883444ec0d57ce3fab8f75e5f8b0301"}, - {file = "xattr-0.9.9-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6b11d2eda397d47f7075743409683c233519ca52aa1dac109b413a4d8c15b740"}, - {file = "xattr-0.9.9-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:661c0a939aefdf071887121f534bb10588d69c7b2dfca5c486af2fc81a0786e8"}, - {file = "xattr-0.9.9-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5db7c2db320a8d5264d437d71f1eb7270a7e4a6545296e7766161d17752590b7"}, - {file = "xattr-0.9.9-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:83203e60cbaca9536d297e5039b285a600ff84e6e9e8536fe2d521825eeeb437"}, - {file = "xattr-0.9.9-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:42bfb4e4da06477e739770ac6942edbdc71e9fc3b497b67db5fba712fa8109c2"}, - {file = "xattr-0.9.9-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:67047d04d1c56ad4f0f5886085e91b0077238ab3faaec6492c3c21920c6566eb"}, - {file = "xattr-0.9.9-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:885782bc82ded1a3f684d54a1af259ae9fcc347fa54b5a05b8aad82b8a42044c"}, - {file = "xattr-0.9.9-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5bc84ccec618b5aa089e7cee8b07fcc92d4069aac4053da604c8143a0d6b1381"}, - {file = "xattr-0.9.9-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baeff3e5dda8ea7e9424cfaee51829f46afe3836c30d02f343f9049c685681ca"}, - {file = "xattr-0.9.9.tar.gz", hash = "sha256:09cb7e1efb3aa1b4991d6be4eb25b73dc518b4fe894f0915f5b0dcede972f346"}, -] -yapf = [ - {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, - {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, -] -zipp = [ - {file = "zipp-3.10.0-py3-none-any.whl", hash = "sha256:4fcb6f278987a6605757302a6e40e896257570d11c51628968ccb2a47e80c6c1"}, - {file = "zipp-3.10.0.tar.gz", hash = "sha256:7a7262fd930bd3e36c50b9a64897aec3fafff3dfdeec9623ae22b40e93f99bb8"}, -] diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 75d8842b..51f7008e 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -1,9 +1,12 @@ +# FOR_PR convert assert args import pytest, pathlib import subprocess -import os +import os, re import origen from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg +Cmd = CLIShared.Cmd + origen_cli = os.getenv('TRAVIS_ORIGEN_CLI') or 'origen' def test_origen_v(): @@ -104,6 +107,8 @@ def cmd_shortcuts__app(self): "examples": "examples", "playground": "playground", "y": "playground", + "nested_app_cmds": "nested_app_cmds", + "disabling_app_opts": "disabling_app_opts", } def test_app_workspace_help_message(self): @@ -148,6 +153,46 @@ class TestAppCommandBuilding(CLIShared): CmdOpt("hidden_flag_opt", hidden=True, ln="hidden", help="Hidden flag opt"), ] ) + nested_cmds = CLIShared.app_sub_cmd( + "nested_app_cmds", + help="Nested app cmds", + subcmds=[ + Cmd( + "nested_l1", + help="Nested app cmds level 1", + subcmds=[ + Cmd( + "nested_l2_a", + help="Nested app cmds level 2 (A)", + subcmds=[ + Cmd( + "nested_l3_a", + help="Nested app cmds level 3 (A-A)" + ), + Cmd( + "nested_l3_b", + help="Nested app cmds level 3 (A-B)" + ), + ] + ), + Cmd( + "nested_l2_b", + help="Nested app cmds level 2 (B)", + subcmds=[ + Cmd( + "nested_l3_a", + help="Nested app cmds level 3 (B-A)" + ), + Cmd( + "nested_l3_b", + help="Nested app cmds level 3 (B-B)" + ), + ] + ) + ] + ) + ] + ) def test_app_command_args_and_opts(self): cmd = self.warmup_cmd @@ -213,6 +258,30 @@ def test_app_command_args_and_opts(self): out = cmd.gen_error() assert self.err_msgs.missing_required_arg(cmd.first) in out + nested_cmd_testcases = [ + (nested_cmds, 0, None), + (nested_cmds.nested_l1, 1, None), + (nested_cmds.nested_l1.nested_l2_a, 2, 'A'), + (nested_cmds.nested_l1.nested_l2_a.nested_l3_a, 3, 'A-A'), + (nested_cmds.nested_l1.nested_l2_a.nested_l3_b, 3, 'A-B'), + (nested_cmds.nested_l1.nested_l2_b, 2, 'B'), + (nested_cmds.nested_l1.nested_l2_b.nested_l3_a, 3, 'B-A'), + (nested_cmds.nested_l1.nested_l2_b.nested_l3_b, 3, 'B-B'), + ] + nested_cmd_ids = [f"{cmd[0].name} {'Base' if cmd[2] is None else cmd[2]}" for cmd in nested_cmd_testcases] + @pytest.mark.parametrize("cmd,lvl,sublvl", nested_cmd_testcases, ids=nested_cmd_ids) + def test_nested_cmds(self, cmd, lvl, sublvl): + help = cmd.get_help_msg() + subcs = list(cmd.subcmds.values()) + if len(subcs) == 0: + help.assert_subcmds(None) + else: + subcs.insert(0, "help") + help.assert_subcmds(*subcs) + + out = cmd.run() + assert f"Hi from 'nested_app_cmds' level {lvl}{ ' (' + sublvl + ')' if sublvl else ''}!" in out + class TestErrorCases(CLIShared): @pytest.mark.skip def test_invalid_cmd_toml(self): @@ -227,9 +296,11 @@ def test_invalid_cmd_toml(self): def test_error_global_and_in_app_setting_used(self): fail +@pytest.mark.skip class TestPluginCommandsAreAdded: ... +@pytest.mark.skip class TestAuxCommandsAreAdded: ... @@ -244,13 +315,459 @@ def test_app_cmd_overrides_aux_cmd(self): # def test_extending_app_cmds(self): # fail -@pytest.mark.skip -class TestExtendingFromAppCommands: +from origen.helpers.regressions.cli.command import SrcTypes #, CmdExtOpt +from test_apps_shared_test_helpers.cli import CmdExtOpt, Cmd + +class TestExtendingFromAppCommands(CLIShared): + extend_core_cmds_env = {"ORIGEN_APP_EXTEND_CORE_CMDS": "1"} + extend_pl_test_ext_stacking = {"ORIGEN_APP_EXT_PL_TEST_EXT_STACKING": "1"} + exts = CmdExtOpt.from_src( + "example", + SrcTypes.APP, + CmdExtOpt( + "generic_app_ext_action", + help="Action from the app", + multi=True, + ), + CmdExtOpt( + "generic_app_ext_flag", + help="Flag ext from the app", + ), + ) + generic_app_ext_action = exts[0] + generic_app_ext_flag = exts[1] + core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( + exts, + with_env=extend_core_cmds_env, + from_configs=CLIShared.configs.suppress_plugin_collecting_config, + ) + stacked_core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( + [ + *CLIShared.exts.exts["generic_core_ext"]["exts"], + *exts + ], + from_configs=[CLIShared.exts.core_cmd_exts_cfg], + with_env=extend_core_cmds_env, + ) + py_pl_cmd = CLIShared.python_plugin.plugin_test_ext_stacking.extend( + [ + *CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking"]["exts"][1:3], + *CLIShared.exts.test_apps_shared_generic_exts, + *exts + ], + from_configs=[CLIShared.exts.pl_ext_stacking_from_aux_cfg], + with_env=extend_pl_test_ext_stacking, + ) + py_pl_subc = CLIShared.python_plugin.plugin_test_ext_stacking.subc.extend( + [ + *CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking.subc"]["exts"][1:3], + *CLIShared.exts.test_apps_shared_generic_exts, + *exts + ], + from_configs=[CLIShared.exts.pl_ext_stacking_from_aux_cfg], + with_env=extend_pl_test_ext_stacking, + ) + aux_cmd = CLIShared.aux.ns.dummy_cmds.dummy_cmd.extend( + [ + *CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["exts"][2:6], + *exts + ], + from_configs=[CLIShared.exts.pl_ext_stacking_from_aux_cfg], + with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] + ) + aux_subc = CLIShared.aux.ns.dummy_cmds.dummy_cmd.subc.extend( + [ + *CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd.subc"]["exts"][2:6], + *exts + ], + from_configs=[CLIShared.exts.pl_ext_stacking_from_aux_cfg], + with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] + ) + na = "no_action" + + missing_ext_impl_cmd = CLIShared.python_plugin.plugin_test_args.extend( + CmdExtOpt.from_src( + "example", + SrcTypes.APP, + CmdExtOpt( + "app_ext_missing_impl", + help="App extension missing the implementation", + ), + ), + with_env={"ORIGEN_APP_PL_CMD_MISSING_EXT_IMPL": "1"} + ) + def test_extending_global_cmds(self): + cmd = self.core_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.code) + help.assert_opts( + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + *self.in_app_cmds.standard_opts() + ) + + assert help.aux_exts == None + assert help.pl_exts == None + assert help.app_exts == True + + d = cmd.demos["minimal"] + out = d.run() + cmd.generic_app_ext_flag.assert_present(None, out) + d.assert_present(out) + + out = d.run(add_args=[cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()]) + cmd.generic_app_ext_action.assert_present([self.na], out) + cmd.generic_app_ext_flag.assert_present(1, out) + d.assert_present(out) + + def test_stacking_pl_aux_and_app_ext(self): + cmd = self.stacked_core_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.code) + help.assert_opts( + cmd.core_cmd_exts_generic_core_ext, + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "vk", "mode", "no_targets", + cmd.pl_ext_cmds_generic_ext, + "targets", "v" + ) + assert help.aux_exts == ['core_cmd_exts'] + assert help.pl_exts == ['pl_ext_cmds'] + assert help.app_exts == True + + d = cmd.demos["minimal"] + out = d.run(add_args=[ + cmd.generic_app_ext_action.ln_to_cli(), self.na, + cmd.generic_app_ext_flag.ln_to_cli(), + cmd.pl_ext_cmds_generic_ext.ln_to_cli(), + cmd.core_cmd_exts_generic_core_ext.ln_to_cli(), + ]) + cmd.generic_app_ext_action.assert_present([self.na], out) + cmd.generic_app_ext_flag.assert_present(1, out) + cmd.pl_ext_cmds_generic_ext.assert_present(1, out) + cmd.core_cmd_exts_generic_core_ext.assert_present(1, out) + d.assert_present(out) + + def test_extending_pl_cmd(self): + cmd = self.py_pl_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.single_arg) + help.assert_opts( + cmd.flag_opt, + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "vk", + cmd.pl_ext_stacking_from_aux_action, + cmd.pl_ext_stacking_from_aux_flag, + cmd.test_apps_shared_ext_action, + cmd.test_apps_shared_ext_flag, + "v", + ) + help.assert_subcmds("help", cmd.subc) + + assert help.aux_exts == ['pl_ext_stacking_from_aux'] + assert help.pl_exts == ['test_apps_shared_test_helpers'] + assert help.app_exts == True + + out = cmd.run() + cmd.assert_args( + out, + (cmd.single_arg, None), + (cmd.pl_ext_stacking_from_aux_action, None), + (cmd.test_apps_shared_ext_action, None), + (cmd.generic_app_ext_flag, None), + ) + + sa_v = "single_arg_val" + out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) + cmd.assert_args( + out, + (cmd.single_arg, sa_v), + (cmd.pl_ext_stacking_from_aux_action, None), + (cmd.test_apps_shared_ext_action, None), + (cmd.generic_app_ext_action, [self.na]), + (cmd.generic_app_ext_flag, 1), + ) + + def test_extending_pl_subc(self): + cmd = self.py_pl_subc + help = cmd.get_help_msg() + help.assert_args(cmd.single_arg) + help.assert_opts( + cmd.flag_opt, + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "vk", + cmd.pl_ext_stacking_from_aux_action_subc, + cmd.pl_ext_stacking_from_aux_flag_subc, + cmd.test_apps_shared_ext_action, + cmd.test_apps_shared_ext_flag, + "v", + ) + help.assert_subcmds(None) + + out = cmd.run() + cmd.assert_args( + out, + (cmd.single_arg, None), + (cmd.pl_ext_stacking_from_aux_action_subc, None), + (cmd.test_apps_shared_ext_action, None), + (cmd.generic_app_ext_action, None), + (cmd.generic_app_ext_flag, None), + ) + + sa_v = "single_arg_val" + out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) + cmd.assert_args( + out, + (cmd.single_arg, sa_v), + (cmd.pl_ext_stacking_from_aux_action_subc, None), + (cmd.test_apps_shared_ext_action, None), + (cmd.generic_app_ext_action, [self.na]), + (cmd.generic_app_ext_flag, 1), + ) + + def test_extending_aux_cmd(self): + cmd = self.aux_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.action_arg) + help.assert_opts( + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "vk", + cmd.pl_ext_stacking_from_aux_action, + cmd.pl_ext_stacking_from_aux_flag, + cmd.python_plugin_action, + cmd.python_plugin_flag, + "v", + ) + help.assert_subcmds("help", cmd.subc) + + out = cmd.run() + cmd.assert_args( + out, + (cmd.action_arg, None), + (cmd.pl_ext_stacking_from_aux_action, None), + (cmd.python_plugin_action, None), + (cmd.generic_app_ext_action, None), + (cmd.generic_app_ext_flag, None), + ) + + sa_v = "single_arg_val" + out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) + cmd.assert_args( + out, + (cmd.action_arg, [sa_v]), + (cmd.pl_ext_stacking_from_aux_action, None), + (cmd.python_plugin_action, None), + (cmd.generic_app_ext_action, [self.na]), + (cmd.generic_app_ext_flag, 1), + ) + + def test_extending_aux_subc(self): + cmd = self.aux_subc + help = cmd.get_help_msg() + help.assert_args(cmd.action_arg) + help.assert_opts( + cmd.flag_opt, + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "vk", + cmd.pl_ext_stacking_from_aux_action_subc, + cmd.pl_ext_stacking_from_aux_flag_subc, + cmd.python_plugin_action_subc, + cmd.python_plugin_flag_subc, + "v", + ) + help.assert_subcmds(None) + + out = cmd.run() + cmd.assert_args( + out, + (cmd.action_arg, None), + (cmd.pl_ext_stacking_from_aux_action_subc, None), + (cmd.python_plugin_action_subc, None), + (cmd.generic_app_ext_action, None), + (cmd.generic_app_ext_flag, None), + ) + + sa_v = "single_arg_val" + out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) + cmd.assert_args( + out, + (cmd.action_arg, [sa_v]), + (cmd.pl_ext_stacking_from_aux_action_subc, None), + (cmd.python_plugin_action_subc, None), + (cmd.generic_app_ext_action, [self.na]), + (cmd.generic_app_ext_flag, 1), + ) + + def test_error_msg_on_missing_implementation(self): + cmd = self.missing_ext_impl_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.single_arg, cmd.multi_arg) + help.assert_opts( + cmd.app_ext_missing_impl, + cmd.flag_opt, + "help", + "vk", + cmd.opt_taking_value, + "v" + ) + + assert help.aux_exts == None + assert help.pl_exts == None + assert help.app_exts == True + + out = cmd.run() + assert "Could not find implementation for app extension 'None'" in out + assert re.search("From root .*test_apps/python_app/example/commands/extensions", out) + + @pytest.mark.skip + def error_msg_on_extending_unknown_cmd(self): fail - def test_extending_plugin_cmds(self): + @pytest.mark.skip + def test_error_in_before(self): fail - def test_extending_aux_cmds(self): + @pytest.mark.skip + def test_error_in_after(self): + fail + + @pytest.mark.skip + def test_error_in_cleanup(self): + fail + +class DisablingAppOpts(): + @pytest.mark.skip + def test_app_opts_are_added_by_default(self): + cmd = self.disabling_app_opts + help = cmd.get_help_msg() + help.assert_args(None) + help.assert_opts( + cmd.app_ext_missing_impl, + cmd.flag_opt, + "help", + "vk", + cmd.opt_taking_value, + "v" + ) + + @pytest.mark.skip + def test_target_is_not_loaded_by_default(self): + cmd = self.disabling_app_opts + cmd.get_help_msg() + + @pytest.mark.skip + def test_disabling_app_opts(self): fail + + @pytest.mark.skip + def test_disabling_app_opts_individually(self): + fail + +@pytest.mark.skip +class PluginCmdsInApp(): + def test_app_opts_are_added_by_default(self): + fail + + def test_disabling_app_opts(self): + fail + + def test_disabling_app_opts_individually(self): + fail + +@pytest.mark.skip +class AuxCmdsInApp(): + def test_app_opts_are_added_by_default(self): + fail + + def test_disabling_app_opts(self): + fail + + def test_disabling_app_opts_individually(self): + fail + + +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg + +class CLICommon(CLIShared): + _no_config_run_opts = { + "with_configs": CLIShared.configs.suppress_plugin_collecting_config, + "bypass_config_lookup": True + } + + @pytest.fixture + def no_config_run_opts(self): + return self._no_config_run_opts + +class TestEval(CLICommon): + _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.eval + + def test_help_msg(self, cmd, no_config_run_opts): + help = cmd.get_help_msg(run_opts=no_config_run_opts) + help.assert_summary(cmd.help) + help.assert_args(cmd.code) + help.assert_bare_app_opts() + + def test_basic_eval(self, cmd, no_config_run_opts): + d = cmd.demos["multi_statement_single_arg"] + out = d.run(run_opts=no_config_run_opts) + d.assert_present(out) + +class TestInteractive(CLICommon): + _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.i + + def test_help_msg(self, cmd, no_config_run_opts): + help = cmd.get_help_msg(run_opts=no_config_run_opts) + help.assert_summary(cmd.help) + help.assert_args(None) + help.assert_bare_app_opts() + + @pytest.mark.skip + def test_interactive(self, cmd, no_config_run_opts): + # TODO try to get an interactive test that just starts/stops + proc = subprocess.Popen(["poetry", "run", "origen", "i"], universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + try: + proc.stdin.flush() + #proc.stdout.flush() + m = 'print("hi from interactive!")' + import time + # time.sleep(10) + assert proc.poll() is None + # proc.stdin.write(f"{m}\n".encode()) + assert proc.poll() is None + # lines = proc.stdout.readlines() + # print(lines) + # assert lines[-1] == m + + m = "print('hi again!')" + # proc.stdin.write(f"{m}\n".encode()) + assert proc.poll() is None + # lines = proc.stdout.readlines() + # assert lines[0] == m + + proc.stdin.write("exit()\n") + assert proc.wait(3) == 0 + lines = proc.stdout.readline() + print(lines) + finally: + if proc.poll() is None: + proc.kill() + # print(proc.stdout.readline()) + # print(proc.stdout.readline()) + # print(proc.stdout.readline()) + # print(proc.stdout.readline()) + for l in proc.stdout: + # lines = proc.stdout.readlines() + if "CMD" in l: + break + print(l) + fail + +# class TestCredentials(CLICommon): +# def test_credentials(self): +# ? diff --git a/test_apps/python_app/tests/conftest.py b/test_apps/python_app/tests/conftest.py index 77e9f3e4..63b9a9fb 100644 --- a/test_apps/python_app/tests/conftest.py +++ b/test_apps/python_app/tests/conftest.py @@ -2,6 +2,7 @@ from ._shared import tmp_dir pytest.register_assert_rewrite("origen.helpers.regressions") +pytest.register_assert_rewrite("test_apps_shared_test_helpers") # Move the session store into a local test directory os.environ['origen_session__user_root'] = str(tmp_dir()) diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py index 02cf888a..f933f62b 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py @@ -108,15 +108,16 @@ def test_invalid_aux_path(self): def test_missing_aux_cmd_impl_dir(self): out = self.cmd_testers.error_cases.gen_error("missing_impl_dir", "missing_impl_dir_subc", return_stdout=True) - f = self.cmd_testers_root.joinpath('error_cases/missing_impl_dir/missing_impl_dir_subc.py') - f2 = self.cmd_testers_root.joinpath('error_cases.missing_impl_dir.missing_impl_dir_subc.py') - assert f"Could not find implementation for aux command 'error_cases missing_impl_dir missing_impl_dir_subc' at '{f}' or '{f2}'" in out + assert "Could not find implementation for aux command 'error_cases.missing_impl_dir.missing_impl_dir_subc'" in out + assert f"From root '{self.cmd_testers_root}', searched:" in out + assert "error_cases.missing_impl_dir.missing_impl_dir_subc.py" in out + assert "error_cases/missing_impl_dir.missing_impl_dir_subc.py" in out def test_missing_aux_cmd_impl_file(self): out = self.cmd_testers.error_cases.gen_error("missing_impl_file", return_stdout=True) - f = self.cmd_testers_root.joinpath('error_cases/missing_impl_file.py') - f2 = self.cmd_testers_root.joinpath('error_cases.missing_impl_file.py') - assert f"Could not find implementation for aux command 'error_cases missing_impl_file' at '{f}' or '{f2}'" in out + assert "Could not find implementation for aux command 'error_cases.missing_impl_file'" in out + assert "error_cases.missing_impl_file.py" in out + assert "error_cases/missing_impl_file.py" in out def test_missing_run_function(self): out = self.cmd_testers.error_cases.gen_error("test_missing_run_function", return_stdout=True) diff --git a/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml b/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml index a962ef67..e28ff97c 100644 --- a/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml +++ b/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml @@ -1,2 +1,3 @@ +# FOR_PR use shared one [plugins] collect = false diff --git a/test_apps/python_no_app/tests/misc_test.py b/test_apps/python_no_app/tests/misc_test.py index 66bb0080..535ceaa6 100644 --- a/test_apps/python_no_app/tests/misc_test.py +++ b/test_apps/python_no_app/tests/misc_test.py @@ -313,8 +313,8 @@ def test_ext_stacking_help_msg(self): cmd.flag_opt, "help", "vk", - cmd.pl_ext_stacking_action, - cmd.pl_ext_stacking_flag, + cmd.pl_ext_stacking_from_aux_action, + cmd.pl_ext_stacking_from_aux_flag, cmd.pl_the_2nd_ext_action, cmd.pl_the_2nd_ext_flag, "v", @@ -327,14 +327,13 @@ def test_ext_stacking_help_msg(self): def test_ext_stacking(self): cmd = self.cmd - # actions = ["show_cmd_args"] - actions = ["none"] + actions = [self.na] out = cmd.run( self.sv, cmd.flag_opt.ln_to_cli(), cmd.ext_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_flag.ln_to_cli(), cmd.pl_ext_stacking_flag.ln_to_cli(), + cmd.pl_ext_stacking_from_aux_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, cmd.pl_the_2nd_ext_flag.ln_to_cli(), ) @@ -344,23 +343,20 @@ def test_ext_stacking(self): (cmd.single_arg, self.sv), (cmd.flag_opt, 1), (cmd.ext_action, actions), - (cmd.pl_ext_stacking_action, actions), - (cmd.pl_ext_stacking_flag, 2), + (cmd.pl_ext_stacking_from_aux_action, actions), + (cmd.pl_ext_stacking_from_aux_flag, 2), (cmd.pl_the_2nd_ext_action, actions), (cmd.pl_the_2nd_ext_flag, 1), ) def test_manipulating_other_ext_args(self): cmd = self.cmd - # actions = ["show_cmd_args"] actions = ["update_flag_opts"] out = cmd.run( self.sv, cmd.flag_opt.ln_to_cli(), cmd.ext_action.ln_to_cli(), *actions, - # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_flag.ln_to_cli(), cmd.pl_ext_stacking_flag.ln_to_cli(), - # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_the_2nd_ext_flag.ln_to_cli(), ) print(out) @@ -369,24 +365,21 @@ def test_manipulating_other_ext_args(self): (cmd.single_arg, self.sv), (cmd.flag_opt, 2), (cmd.ext_action, actions), - # (cmd.pl_ext_stacking_action, actions), - (cmd.pl_ext_stacking_flag, 3, {"Before": 2}), - # (cmd.pl_the_2nd_ext_action, actions), + (cmd.pl_ext_stacking_from_aux_flag, 3, {"Before": 2}), (cmd.pl_the_2nd_ext_flag, 2), ) def test_subc_ext_stacking_help_msg(self): subc = self.subc help = subc.get_help_msg() - # help.assert_num_opts(9) help.assert_args(subc.single_arg) help.assert_opts( subc.ext_action_subc, subc.flag_opt, "help", "vk", - subc.pl_ext_stacking_action_subc, - subc.pl_ext_stacking_flag_subc, + subc.pl_ext_stacking_from_aux_action_subc, + subc.pl_ext_stacking_from_aux_flag_subc, subc.pl_the_2nd_ext_action_subc, subc.pl_the_2nd_ext_flag_subc, "v", @@ -398,26 +391,21 @@ def test_subc_ext_stacking_help_msg(self): assert help.app_exts == False def test_subc_ext_stacking(self): - actions = ["none"] + actions = [self.na] subc = self.subc out = subc.run( self.sv, subc.flag_opt.ln_to_cli(), subc.ext_action_subc.ln_to_cli(), *actions, - # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, - subc.pl_ext_stacking_flag_subc.ln_to_cli(), subc.pl_ext_stacking_flag_subc.ln_to_cli(), - # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + subc.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), subc.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), subc.pl_the_2nd_ext_flag_subc.ln_to_cli(), ) - print(out) subc.assert_args( out, (subc.single_arg, self.sv), (subc.flag_opt, 1), (subc.ext_action_subc, actions), - # (subc.pl_ext_stacking_action_subc, actions), - (subc.pl_ext_stacking_flag_subc, 2), - # (subc.pl_the_2nd_ext_action_subc, actions), + (subc.pl_ext_stacking_from_aux_flag_subc, 2), (subc.pl_the_2nd_ext_flag_subc, 1), ) @@ -428,7 +416,7 @@ class TestExtendingAuxCmds(Common): CLIShared.exts.exts_workout_cfg, CLIShared.exts.pl_ext_stacking_from_aux_cfg ], - with_env={"ORIGEN_DUMMY_AUX_CMDS": "1"} + with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] ) subc = CLIShared.aux.ns.dummy_cmds.dummy_cmd.subc.extend( CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd.subc"]["exts"], @@ -436,7 +424,7 @@ class TestExtendingAuxCmds(Common): CLIShared.exts.exts_workout_cfg, CLIShared.exts.pl_ext_stacking_from_aux_cfg ], - with_env={"ORIGEN_DUMMY_AUX_CMDS": "1"} + with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] ) @property @@ -452,7 +440,7 @@ def test_extending_aux_cmd_help_msg(self): cmd.exts_workout_flag, "help", "vk", - cmd.pl_ext_stacking_action, + cmd.pl_ext_stacking_from_aux_action, cmd.pl_ext_stacking_from_aux_flag, cmd.python_plugin_action, cmd.python_plugin_flag, @@ -468,33 +456,23 @@ def test_extending_aux_cmd_help_msg(self): def test_extending_aux_cmd(self): cmd = self.cmd - # actions = ["show_cmd_args"] - # actions = ["update_flag_opts"] out = cmd.run( self.na, - # cmd.flag_opt.ln_to_cli(), - # cmd.ext_action.ln_to_cli(), - # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), - # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, cmd.python_plugin_the_second_flag.ln_to_cli(), cmd.python_plugin_flag.ln_to_cli(), ) cmd.assert_args( out, (cmd.action_arg, [self.na]), - # (cmd.flag_opt, 1), (cmd.exts_workout_action, None), - # (cmd.pl_ext_stacking_action, actions), (cmd.pl_ext_stacking_from_aux_flag, 2), - # (cmd.pl_the_2nd_ext_action, actions), (cmd.python_plugin_the_second_flag, 1), (cmd.python_plugin_flag, 1), ) def test_manipulating_args_from_aux_exts(self): cmd = self.cmd - # actions = ["show_cmd_args"] actions = [ "inc_flag__aux_ext__pl_ext_stacking_from_aux_flag", "inc_flag__plugin_ext__python_plugin_the_second_flag", @@ -503,9 +481,7 @@ def test_manipulating_args_from_aux_exts(self): out = cmd.run( self.na, cmd.exts_workout_action.ln_to_cli(), *actions, - # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), - # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, cmd.python_plugin_the_second_flag.ln_to_cli(), ) print(out) @@ -514,9 +490,7 @@ def test_manipulating_args_from_aux_exts(self): (cmd.action_arg, [self.na]), (cmd.exts_workout_action, actions), (cmd.python_plugin_flag, -1), - # (cmd.pl_ext_stacking_action, actions), (cmd.pl_ext_stacking_from_aux_flag, 3, {"Before": 2}), - # (cmd.pl_the_2nd_ext_action, actions), (cmd.python_plugin_the_second_flag, 2), ) @@ -546,17 +520,13 @@ def test_extending_aux_cmd_help_msg_subc(self): def test_extending_aux_subcmd(self): cmd = self.subc - # actions = ["show_cmd_args"] - # actions = ["update_flag_opts"] actions = ["no_action"] out = cmd.run( self.na, cmd.flag_opt.ln_to_cli(), cmd.exts_workout_action.ln_to_cli(), *actions, - # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), - # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, cmd.python_plugin_the_second_flag_subc.ln_to_cli(), cmd.python_plugin_flag_subc.ln_to_cli(), ) @@ -567,9 +537,7 @@ def test_extending_aux_subcmd(self): (cmd.flag_opt, 1), (cmd.exts_workout_action, actions), (cmd.exts_workout_flag_subc, None), - # (cmd.pl_ext_stacking_action, actions), (cmd.pl_ext_stacking_from_aux_flag_subc, 2), - # (cmd.pl_the_2nd_ext_action, actions), (cmd.python_plugin_the_second_flag_subc, 1), (cmd.python_plugin_flag_subc, 1), ) @@ -587,10 +555,8 @@ def test_manipulating_args_from_aux_subcmd(self): self.na, cmd.flag_opt.ln_to_cli(), cmd.exts_workout_action.ln_to_cli(), *actions, - # cmd.pl_ext_stacking_action.ln_to_cli(), *actions, cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), - # cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, cmd.python_plugin_the_second_flag_subc.ln_to_cli(), cmd.python_plugin_flag_subc.ln_to_cli(), ) @@ -601,9 +567,7 @@ def test_manipulating_args_from_aux_subcmd(self): (cmd.flag_opt, 2), (cmd.exts_workout_action, actions), (cmd.exts_workout_flag_subc, None), - # (cmd.pl_ext_stacking_action, actions), (cmd.pl_ext_stacking_from_aux_flag_subc, 3, {"Before": 2}), - # (cmd.pl_the_2nd_ext_action, actions), (cmd.python_plugin_the_second_flag_subc, 2), (cmd.python_plugin_flag_subc, 2), ) @@ -615,13 +579,12 @@ def test_hidden_exts_full_name(self): # @pytest.mark.parameterize() def test_extending_origen_cmd_from_plugin(self): ''' Test each global command is extendable''' - cmd = self.global_cmds.eval # origen.helpers.regressions.origen + cmd = self.global_cmds.eval cmd = cmd.extend( CLIShared.exts.exts["generic_core_ext"]["exts"], from_configs=[CLIShared.exts.core_cmd_exts_cfg] ) - # help = cmd.get_help_msg(with_config=[self.exts_from_aux, self.exts_from_pl]) help = cmd.get_help_msg() help.assert_args(cmd.code) help.assert_opts( @@ -636,7 +599,6 @@ def test_extending_origen_cmd_from_plugin(self): assert help.pl_exts == ['pl_ext_cmds'] assert help.app_exts == False - # out = cmd.run(with_config=[self.exts_from_aux, self.exts_from_pl]) d = cmd.global_demo("minimal") out = d.run(add_args=[ cmd.core_cmd_exts_generic_core_ext.ln_to_cli(), @@ -680,7 +642,7 @@ def test_exception_in_after_cmd(self): fail def test_exception_in_cmd(self): - actions = ["none"] + actions = [self.na] out = self.cmd.gen_error( "gen_error", self.ext_action.ln_to_cli(), *actions, diff --git a/test_apps/python_plugin/python_plugin/commands.toml b/test_apps/python_plugin/python_plugin/commands.toml index 0383f16e..2dac29c3 100644 --- a/test_apps/python_plugin/python_plugin/commands.toml +++ b/test_apps/python_plugin/python_plugin/commands.toml @@ -131,12 +131,33 @@ help = "Echos the input" short = "a" help = "Have the plugin say hi after evaluating" -# FOR_PR -#[[extension]] -# # Extend eval command only in an application context -# extend = "origen.eval" -# in_global_context = false -# in_app_context = true +# FOR_PR swap these for actions? +# Or is this even used? +[[extension]] + # Extend eval command only in an application context + extend = "origen.eval" + in_global_context = false + in_app_context = true + + [[extension.opt]] + name = "say_hi_before_eval" + short = "y" + help = "Have the plugin say hi before evaluating (app)" + + [[extension.opt]] + name = "say_hi_after_eval" + short = "z" + help = "Have the plugin say hi after evaluating (app)" + +[[extension]] + # Extend eval command in both contexts + extend = "origen.eval" + in_global_context = true + in_app_context = true + + [[extension.opt]] + name = "say_hi_during_cleanup" + help = "Have the plugin say hi during cleanup" [[extension]] # Extend an application's 'playground' commmand diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py index bc7b4dd2..40c4bed6 100644 --- a/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py +++ b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py @@ -1,3 +1,4 @@ +# FOR_PR switch to shared stuff from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str from origen.boot import before_cmd, after_cmd, clean_up diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml index dc05e3fd..94bd48ca 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml @@ -13,8 +13,6 @@ help = "Extend plugin command from aux command" short = "s" takes_value = true help = "Extended opt taking a single value" - # short = "a" - # help = "Have the plugin say hi after evaluating" [[extension.opt]] name = "multi_val_opt" @@ -30,12 +28,6 @@ help = "Extend plugin command from aux command" use_delimiter = true help = "Extended opt taking a multiple, delimited values" - # [[extension.opt]] - # name = "required_opt" - # takes_value = true - # required = true - # help = "Required opt taking a single value" - [[extension.opt]] name = "exts_workout_action" takes_value = true @@ -101,9 +93,3 @@ extend = "aux.dummy_cmds.dummy_cmd.subc" [[extension.opt]] name = "exts_workout_flag_subc" help = "Flag for the extended opt subc" - -# [[extension]] -# extend = "aux.cmd_testers" - -# [[extension]] -# extend = "aux.cmd_testers.args" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py index 5386136a..bdbd3813 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py @@ -40,7 +40,7 @@ def do_action(actions, phase): if phase == "Before": origen.current_command.args["flag_opt"] += 1 # origen.current_command.exts["aux.exts_workout"].args["flag_extension"] += 1 - origen.current_command.exts["aux.pl_ext_stacking_from_aux"].args["pl_ext_stacking_flag"] += 1 + origen.current_command.exts["aux.pl_ext_stacking_from_aux"].args["pl_ext_stacking_from_aux_flag"] += 1 origen.current_command.exts["plugin.python_plugin_the_second"].args["pl_the_2nd_ext_flag"] += 1 if action == "show_exts": diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux.toml index 722f5729..056676e9 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux.toml @@ -2,31 +2,31 @@ extend = "plugin.python_plugin.plugin_test_ext_stacking" [[extension.opt]] - name = "pl_ext_stacking_action" + name = "pl_ext_stacking_from_aux_action" multiple = true help = "Action from pl_ext_stacking aux cmds" [[extension.opt]] - name = "pl_ext_stacking_flag" + name = "pl_ext_stacking_from_aux_flag" help = "Flag from pl_ext_stacking aux cmds" [[extension]] extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" [[extension.opt]] - name = "pl_ext_stacking_action_subc" + name = "pl_ext_stacking_from_aux_action_subc" multiple = true help = "Action from pl_ext_stacking aux cmds subc" [[extension.opt]] - name = "pl_ext_stacking_flag_subc" + name = "pl_ext_stacking_from_aux_flag_subc" help = "Flag from pl_ext_stacking aux cmds subc" [[extension]] extend = "aux.dummy_cmds.dummy_cmd" [[extension.opt]] - name = "pl_ext_stacking_action" + name = "pl_ext_stacking_from_aux_action" multiple = true help = "Action from pl_ext_stacking aux cmds" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.py index bc7b4dd2..e8bce0ef 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.py @@ -1,14 +1,6 @@ -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str -from origen.boot import before_cmd, after_cmd, clean_up +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load -@before_cmd -def before(**args): - print(before_cmd_ext_args_str(args)) - -@after_cmd -def after(**args): - print(after_cmd_ext_args_str(args)) - -@clean_up -def clean_up(**args): - print(clean_up_ext_args_str(args)) +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index 90c4afb4..d3505855 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -1,7 +1,7 @@ from origen.helpers.regressions import cli from origen.helpers import calling_filename from pathlib import Path, PurePosixPath -import re +import pytest, re from .cmd_models import Cmd, CmdArg, CmdOpt, CmdExtOpt from .cmd_models.auxs import Aux @@ -69,8 +69,17 @@ def clean_up_ext_args_str(ext_args, ext_name=None): ext_name = get_ext_name() return output_args(f"(Ext) ({ext_name}) (CleanUp Cmd)", ext_args) +class Configs: + configs_dir = Path(__file__).parent.joinpath("configs") + suppress_plugin_collecting_config = configs_dir.joinpath("suppress_plugin_collecting.toml") + class CLIShared(cli.CLI): Cmd = Cmd + na = "no_action" + + @pytest.fixture + def cmd(self): + return self._cmd pln__python_plugin = "python_plugin" @@ -86,3 +95,5 @@ class CLIShared(cli.CLI): python_plugin = plugins.python_plugin cmd_testers = aux.namespaces.cmd_testers cmd_testers_cmd = cmd_testers.cmd_testers + + configs = Configs() \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py index d976deff..71459ce3 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py @@ -28,7 +28,9 @@ def assert_args(self, output, *vals): if not (("CleanUp" in opts and opts["CleanUp"] is None) or v[1] is None): clean_up.append(v[0].name) else: - args.append(v[0]) + # TODO support args/opts (not extension) with options + if v[1] is not None: + args.append(v[0]) expected = v[0].to_assert_str(v[1], **opts) if isinstance(expected, str): expected = [expected] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py index e4b94e8c..610fabb7 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py @@ -9,7 +9,53 @@ class ExtensionDrivers: pl_ext_stacking_from_aux_toml = aux_cmds_dir.joinpath("pl_ext_stacking_from_aux.toml") core_cmd_exts_cfg = aux_cmds_dir.joinpath("core_cmd_exts_cfg.toml") core_cmd_exts_toml = aux_cmds_dir.joinpath("core_cmd_exts.toml") + enable_dummy_cmds_exts_env = {"ORIGEN_DUMMY_AUX_CMDS": "1"} + + test_apps_shared_generic_exts = CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "test_apps_shared_ext_action", + help="Action from test_apps_shared_test_helpers plugin", + multi=True, + ), + CmdExtOpt( + "test_apps_shared_ext_flag", + help="Flag from test_apps_shared_test_helpers plugin", + ), + ) + exts = { + "core.eval": { + "exts": [ + *CmdExtOpt.from_src( + "exts_workout", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ext_action", + multi=True, + help="Action for the extended opt", + ln="action", + ), + ), + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "say_hi_before_eval", + help="Have the plugin say hi before evaluating (app)", + ), + CmdExtOpt( + "say_hi_after_eval", + help="Have the plugin say hi after evaluating (app)", + ), + CmdExtOpt( + "say_hi_during_cleanup", + help="Have the plugin say hi during cleanup", + ), + ), + ] + }, "plugin.python_plugin.plugin_test_args": { "exts": CmdExtOpt.from_src( "exts_workout", @@ -86,12 +132,12 @@ class ExtensionDrivers: "pl_ext_stacking_from_aux", cli.cmd.SrcTypes.AUX, CmdExtOpt( - "pl_ext_stacking_action", + "pl_ext_stacking_from_aux_action", multi=True, help="Action from pl_ext_stacking aux cmds", ), CmdExtOpt( - "pl_ext_stacking_flag", + "pl_ext_stacking_from_aux_flag", help="Flag from pl_ext_stacking aux cmds", ), ), @@ -126,12 +172,12 @@ class ExtensionDrivers: "pl_ext_stacking_from_aux", cli.cmd.SrcTypes.AUX, CmdExtOpt( - "pl_ext_stacking_action_subc", + "pl_ext_stacking_from_aux_action_subc", multi=True, help="Action from pl_ext_stacking aux cmds subc", ), CmdExtOpt( - "pl_ext_stacking_flag_subc", + "pl_ext_stacking_from_aux_flag_subc", help="Flag from pl_ext_stacking aux cmds subc", ), ), @@ -147,8 +193,9 @@ class ExtensionDrivers: "pl_the_2nd_ext_flag_subc", help="Flag from pl_the_2nd plugin subc", ), - ) - ] + ), + *test_apps_shared_generic_exts + ], }, "aux.dummy_cmds.dummy_cmd": { "exts": [ @@ -170,7 +217,7 @@ class ExtensionDrivers: "pl_ext_stacking_from_aux", cli.cmd.SrcTypes.AUX, CmdExtOpt( - "pl_ext_stacking_action", + "pl_ext_stacking_from_aux_action", multi=True, help="Action from pl_ext_stacking aux cmds", ), @@ -206,6 +253,7 @@ class ExtensionDrivers: ), ), ], + "env": enable_dummy_cmds_exts_env }, "aux.dummy_cmds.dummy_cmd.subc": { "exts": [ @@ -262,7 +310,8 @@ class ExtensionDrivers: help="Flag from pl_the_2nd plugin subc", ), ), - ] + ], + "env": enable_dummy_cmds_exts_env }, "generic_core_ext": { "exts": [ diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/suppress_plugin_collecting.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/suppress_plugin_collecting.toml new file mode 100644 index 00000000..e28ff97c --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/suppress_plugin_collecting.toml @@ -0,0 +1,3 @@ +# FOR_PR use shared one +[plugins] +collect = false diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml index 8233ce6b..743e3856 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml @@ -8,7 +8,6 @@ extend = "plugin.python_plugin.plugin_test_ext_stacking" [[extension.opt]] name = "test_apps_shared_ext_flag" - multiple = true help = "Flag from test_apps_shared_test_helpers plugin" [[extension]] @@ -21,5 +20,4 @@ extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" [[extension.opt]] name = "test_apps_shared_ext_flag" - multiple = true help = "Flag from test_apps_shared_test_helpers plugin" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.subc.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_ext_stacking.subc.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file From 0fc4efa9df99351793d0f90296bc7820d3cdc998 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 28 Jan 2023 21:29:03 -0600 Subject: [PATCH 017/200] Add support for target, no target, and mode opts for custom commands (mode doesn't work yet, but option is there). Handle conflicts with these opts. Other clean up and continue to add tests. --- python/origen/origen/boot.py | 2 +- python/origen/origen/helpers/env.py | 9 +- .../helpers/regressions/cli/__init__.py | 9 + .../origen/helpers/regressions/cli/command.py | 96 +++- .../helpers/regressions/cli/help_msg.py | 14 +- .../origen/helpers/regressions/cli/origen.py | 37 +- python/origen/origen/target.py | 44 +- rust/origen/cli/src/bin.rs | 11 +- rust/origen/cli/src/commands/mod.rs | 30 +- rust/origen/cli/src/framework/app_cmds.rs | 52 +- rust/origen/cli/src/framework/aux_cmds.rs | 154 +---- rust/origen/cli/src/framework/extensions.rs | 137 +---- rust/origen/cli/src/framework/mod.rs | 524 ++++++++---------- rust/origen/cli/src/framework/plugins.rs | 47 +- test_apps/python_app/config/commands.toml | 154 +++++ .../example/commands/extensions/__init__.py | 12 - .../commands/reserved_opt_error_gen.py | 1 + .../multiple_conflicting_opts.py | 1 + .../multiple_conflicting_opts.subc.py | 1 + .../multiple_conflicting_opts.subc.subc.py | 1 + .../single_conflicting_opt.py | 1 + test_apps/python_app/tests/cli_test.py | 523 ++++++++++++++--- test_apps/python_no_app/tests/cli/__init__.py | 0 .../tests/cli/tests__global_cmds.py | 9 +- .../tests/cmd_building/__init__.py | 0 .../cmd_building/cmd_testers/__init__.py | 0 .../cmd_building/tests__loading_aux_cmds.py | 4 +- .../tests__loading_plugin_cmds.py | 23 +- .../tests/cmd_building/tests__opt_building.py | 16 +- .../cmd_building/tests__standard_opts.py | 6 +- test_apps/python_no_app/tests/misc_test.py | 14 +- .../python_plugin/python_plugin/commands.toml | 9 +- .../cli/cmd_models/__init__.py | 6 +- .../cli/cmd_models/plugins.py | 2 +- 34 files changed, 1139 insertions(+), 810 deletions(-) delete mode 100644 test_apps/python_app/example/commands/extensions/__init__.py create mode 100644 test_apps/python_app/example/commands/reserved_opt_error_gen.py create mode 100644 test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.py create mode 100644 test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.subc.py create mode 100644 test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.subc.subc.py create mode 100644 test_apps/python_app/example/commands/reserved_opt_error_gen/single_conflicting_opt.py delete mode 100644 test_apps/python_no_app/tests/cli/__init__.py delete mode 100644 test_apps/python_no_app/tests/cmd_building/__init__.py delete mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/__init__.py diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 6ec171b9..959e2709 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -152,7 +152,7 @@ def unsupported_subcmd(subcmd=None): from_origen_cli(plugins) if _origen.is_app_present(): - origen.target.setup(targets=targets) + origen.target.setup(targets=([] if targets is False else targets)) if args is None: args = {} diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index b83c8a17..b9d10ef2 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -12,7 +12,7 @@ def in_new_origen_proc(func=None, mod=None, *, func_kwargs=None, with_configs=No return in_new_proc(func, mod, func_kwargs=func_kwargs) # TODO support options -def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=False, input=None, expect_fail=False, return_details=False, shell=None): +def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=False, input=None, expect_fail=False, return_details=False, shell=None, targets=None): if isinstance(cmd, str): cmd = ["origen", cmd] else: @@ -33,6 +33,13 @@ def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=F if shell is None: shell = running_on_windows + if targets is False: + cmd.append("--no_targets") + elif targets: + if isinstance(targets, str): + targets = [targets] + cmd += ["-t", *targets] + if expect_fail: result = subprocess.run(cmd, shell=shell, capture_output=True, text=True, input=input, env=subp_env) if result.returncode == 0: diff --git a/python/origen/origen/helpers/regressions/cli/__init__.py b/python/origen/origen/helpers/regressions/cli/__init__.py index 1bcbc7fb..7abd5f22 100644 --- a/python/origen/origen/helpers/regressions/cli/__init__.py +++ b/python/origen/origen/helpers/regressions/cli/__init__.py @@ -53,5 +53,14 @@ def aux_sub_cmd(cls, namespace, name, *args, cmd_path=None, from_config=None, ** def app_sub_cmd(cls, *args, cmd_path=None, **kwargs): return cls.Cmd(cmd_path=[*cls.app_sub_cmd_path, *(cmd_path or [])], *args, **kwargs) + @classmethod + def eval(cls, *code, **kwargs): + from .... import origen + if origen.app: + cmd = InAppCommands.eval + else: + cmd = GlobalCommands.eval + return cmd.run(*code, **kwargs) + error_messages = CoreErrorMessages() err_msgs = error_messages diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py index 3a21f7f3..a7ddaace 100644 --- a/python/origen/origen/helpers/regressions/cli/command.py +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -62,6 +62,9 @@ def ln_to_cli(self): def sn_to_cli(self): return f"-{self.sn}" + def sna_to_cli(self, a=0): + return f"-{self.sn_aliases[a]}" + class SrcTypes(enum.Enum): CORE = enum.auto() APP = enum.auto() @@ -80,14 +83,32 @@ def __init__(self, *args, src_name=None, src_type=None, **kwargs): CmdOpt.__init__(self, *args, **kwargs) self.src_name = src_name self.src_type = src_type + + @property + def provided_by_app(self): + return self.src_type == SrcTypes.APP + + @property + def provided_by(self): + if self.provided_by_app: + return "the App" + else: + return self.src_name class CmdDemo: def __init__(self, name, args=None, expected_output=None) -> None: self.name = name self.args = args - self.expected_output = expected_output + self.expected_output = [expected_output] if isinstance(expected_output, str) else expected_output self.parent = None + def copy(self): + return self.__class__( + self.name, + list(self.args), + (self.expected_output) if self.expected_output else None, + ) + def run(self, add_args=None, **kwargs): return self.parent.run(*(self.args + (add_args or [])), **kwargs) @@ -95,12 +116,11 @@ def gen_error(self, add_args=None, **kwargs): return self.parent.gen_error(*(self.args + (add_args or [])), **kwargs) def assert_present(self, in_str): - expected = [self.expected_output] if isinstance(self.expected_output, str) else self.expected_output - for e in expected: + for e in self.expected_output: assert e in in_str class Cmd: - def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds = None, use_configs = None, with_env=None, demos=None, global_demos=None, app_demos=None, parent=None, aliases=None): + def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds = None, use_configs = None, with_env=None, demos=None, global_demos=None, app_demos=None, parent=None, aliases=None, src_type=None): self.name = name self.cmd_path = cmd_path or [] self.help = help @@ -111,6 +131,7 @@ def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds self.exts = None self.with_env = with_env self.parent = parent + self.src_type = src_type if use_configs: if not isinstance(use_configs, list): use_configs = [use_configs] @@ -120,10 +141,9 @@ def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds for subcmd in self.subcmds.values(): subcmd.parent = self subcmd.cmd_path = self.cmd_path + [self.name] - subcmd.use_configs = [*self.use_configs] if self.use_configs else None if self.parent is None: - self.update_cmd_paths() + self.update_subc() self.demos = dict([[d.name, d] for d in (demos or [])]) for d in self.demos.values(): d.parent = self @@ -132,10 +152,18 @@ def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds self.app_demos = dict([[d.name, d] for d in (app_demos or [])]) for d in self.app_demos.values(): d.parent = self - def update_cmd_paths(self): + def update_subc(self): for subcmd in self.subcmds.values(): subcmd.cmd_path = self.cmd_path + [self.name] - subcmd.update_cmd_paths() + subcmd.use_configs = [ + *(self.use_configs or []), + *(subcmd.use_configs or []) + ] + subcmd.with_env = { + **(self.with_env or {}), + **(subcmd.with_env or {}) + } + subcmd.update_subc() def extend(self, exts, with_env=None, from_configs=None): dup = self.__class__( @@ -146,10 +174,12 @@ def extend(self, exts, with_env=None, from_configs=None): self.opts.values(), self.subcmds.values(), [*self.use_configs] if self.use_configs else None, - self.with_env.copy() if self.with_env else None, - self.demos.values(), - self.global_demos.values(), - self.app_demos.values(), + dict(self.with_env) if self.with_env else None, + [d.copy() for d in self.demos.values()], + [d.copy() for d in self.global_demos.values()], + [d.copy() for d in self.app_demos.values()], + self.aliases, + self.src_type, ) dup.exts = dict(self.exts) if self.exts else {} dup.exts.update(dict([[ext.name, ext] for ext in (exts or [])])) @@ -239,3 +269,45 @@ def global_demo(self, name): return self.global_demos[name] elif name in self.demos: return self.demos[name] + + @property + def is_app_cmd(self): + return (self.cmd_path[0] == "app") if len(self.cmd_path) > 0 else False + + @property + def is_pl_cmd(self): + return (self.cmd_path[0] == "plugin") if len(self.cmd_path) > 0 else False + + @property + def is_aux_cmd(self): + return (self.cmd_path[0] == "aux") if len(self.cmd_path) > 0 else False + + @property + def is_core_cmd(self): + return not (self.is_app_cmd or self.is_pl_cmd or self.is_aux_cmd) + + @property + def full_name(self): + if self.is_app_cmd: + cp = ('.' + '.'.join(self.cmd_path[2:])) if len(self.cmd_path) > 2 else '' + return f"app{cp}.{self.name}" + elif self.is_core_cmd: + return '.'.join(["origen", *self.cmd_path, self.name]) + else: + return f"{'.'.join(self.cmd_path)}.{self.name}" + + def reserved_opt_ln_conflict_msg(self, opt, name): + from .origen import CoreErrorMessages + return CoreErrorMessages.reserved_opt_ln_conflict_msg(self, opt, name) + + def reserved_opt_lna_conflict_msg(self, opt, name): + from .origen import CoreErrorMessages + return CoreErrorMessages.reserved_opt_lna_conflict_msg(self, opt, name) + + def reserved_opt_sn_conflict_msg(self, opt, name): + from .origen import CoreErrorMessages + return CoreErrorMessages.reserved_opt_sn_conflict_msg(self, opt, name) + + def reserved_opt_sna_conflict_msg(self, opt, name): + from .origen import CoreErrorMessages + return CoreErrorMessages.reserved_opt_sna_conflict_msg(self, opt, name) diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index 13fc1a1f..4afe420e 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -1,6 +1,6 @@ class HelpMsg: def __init__(self, help_str): - print(help_str) + self.text = help_str sections = help_str.split("\n\n") if sections[0] == "Origen, The Semiconductor Developer's Kit": self.version_str = sections.pop(1).strip() @@ -311,10 +311,10 @@ def assert_opt_at(self, expected_index, opt): return True def assert_bare_opts(self): - return self.assert_opts("help", "vk", "v") + return self.assert_opts("help", "v", 'vk') def assert_bare_app_opts(self): - return self.assert_opts("help", "vk", "mode", "no_targets", "targets", "v") + return self.assert_opts("help", "mode", "no_targets", "targets", "v", 'vk') def assert_ext_at(self, expected_index, ext): o = self.opts[expected_index] @@ -336,15 +336,15 @@ def assert_opts(self, *expected_opts): if isinstance(o, CmdExtOpt): self.assert_ext_at(i, o) elif isinstance(o, str): - if o == "help": + if o in ["help", 'h']: self.assert_help_opt_at(i) elif o == "vk": self.assert_vk_opt_at(i) - elif o == "mode": + elif o in ["mode", "m"]: self.assert_mode_opt_at(i) - elif o == "no_targets": + elif o in ["no_targets", "nt"]: self.assert_no_targets_opt_at(i) - elif o == "targets": + elif o in ["targets", "t"]: self.assert_targets_opt_at(i) elif o == "v": self.assert_v_opt_at(i) diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 9bbb59db..0ecd2046 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -1,5 +1,5 @@ import origen -from .command import CmdOpt, Cmd, CmdArg, CmdDemo +from .command import CmdOpt, Cmd, CmdArg, CmdDemo, CmdExtOpt def help_subcmd(): return Cmd("help", help="Print this message or the help of the given subcommand(s)") @@ -144,7 +144,6 @@ class InAppOpts: takes_value=True, multi=False, ln="mode", - sn="m", ) @classmethod @@ -153,7 +152,7 @@ def all(cls): @classmethod def standard_opts(self): - return [CoreOpts.help, CoreOpts.vk, self.mode, self.no_targets, self.targets, CoreOpts.verbosity] + return [CoreOpts.help, self.mode, self.no_targets, self.targets, CoreOpts.verbosity, CoreOpts.vk ] class InAppCommands(CoreCommands): in_app_opts = InAppOpts() @@ -213,8 +212,8 @@ class Names: class CoreOpts: help = CmdOpt('help', "Print help information", sn="h", ln="help") - verbosity = CmdOpt('verbosity', "Terminal verbosity level e.g. -v, -vv, -vvv", sn="v") - vk= CmdOpt("verbosity_keywords", "Keywords for verbose listeners", value_name= "verbosity_keywords", takes_value=True, multi=True, sn="k") + verbosity = CmdOpt('verbosity', "Terminal verbosity level e.g. -v, -vv, -vvv", ln="verbosity", sn="v") + vk= CmdOpt("verbosity_keywords", "Keywords for verbose listeners", value_name= "verbosity_keywords", takes_value=True, multi=True, ln_aliases=["vk"]) class CoreErrorMessages: @classmethod @@ -244,3 +243,31 @@ def missing_required_arg(cls, *vals): else: mapped_vals.append(f"<{v.to_vn()}>") return "The following required arguments were not provided:" + "\n " + " \n".join(mapped_vals) + + @classmethod + def conflict_msg(cls, cmd, opt, conflict, conflict_type): + if conflict_type in ['long name', 'long name alias']: + hyphens = "--" + else: + hyphens = "-" + + if isinstance(opt, CmdExtOpt): + return f"Option '{opt.name}' extended from '{opt.provided_by}' for command '{cmd.full_name}' tried to use reserved option {conflict_type} '{conflict}' and will not be available as '{hyphens}{conflict}'" + else: + return f"Option '{opt.name}' from command '{cmd.full_name}' tried to use reserved option {conflict_type} '{conflict}' and will not be available as '{hyphens}{conflict}'" + + @classmethod + def reserved_opt_ln_conflict_msg(cls, cmd, opt, conflict): + return cls.conflict_msg(cmd, opt, conflict, "long name") + + @classmethod + def reserved_opt_sn_conflict_msg(cls, cmd, opt, conflict): + return cls.conflict_msg(cmd, opt, conflict, "short name") + + @classmethod + def reserved_opt_lna_conflict_msg(cls, cmd, opt, conflict): + return cls.conflict_msg(cmd, opt, conflict, "long name alias") + + @classmethod + def reserved_opt_sna_conflict_msg(cls, cmd, opt, conflict): + return cls.conflict_msg(cmd, opt, conflict, "short name alias") diff --git a/python/origen/origen/target.py b/python/origen/origen/target.py index 852f1f4e..370246e0 100644 --- a/python/origen/origen/target.py +++ b/python/origen/origen/target.py @@ -1,41 +1,51 @@ import origen import _origen -current_targets = [] +current_targets = None first_load_done = False +setup_pending = False +def __getattr__(name: str): + if name == "current": + return current_targets + else: + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") # Setup the targets to be applied at future calls to target.load, but without # actually loading them at this time def setup(targets=None): - global current_targets - if targets == None: + global current_targets, setup_pending + + if targets is None: targets = _origen.app_config()["target"] - if targets == None: + if targets is None: current_targets = [] return None - if not isinstance(targets, list): + if isinstance(targets, str): targets = [targets] + setup_pending = True current_targets = targets - # Load the target(s) previously registered by setup or as given -def load(targets=None): - global first_load_done - if targets is not None: +def load(*targets): + global first_load_done, setup_pending, current_targets + + if len(targets) > 0: setup(targets) - first_load_done = True + if not first_load_done and not setup_pending: + setup(targets or None) origen.dut = None origen._target_loading = True _origen.prepare_for_target_load() - if current_targets != None: - for t in current_targets: - if callable(t): - t() - else: - if t is not None: - origen.load_file(_origen.target_file(t, "targets")) + for t in current_targets: + if callable(t): + t() + else: + if t is not None: + origen.load_file(_origen.target_file(t, "targets")) origen._target_loading = False + first_load_done = True + setup_pending = False # Load the target(s) previously registered by setup but only if they diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index fa47f98a..6605b8c1 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -17,6 +17,10 @@ use std::iter::FromIterator; use std::process::exit; use framework::{Extensions, Plugins, AuxCmds, AppCmds, CmdHelps}; use framework::plugins::{PL_MGR_CMD_NAME, PL_CMD_NAME, run_pl_mgr, run_pl}; +use framework::{ + VERBOSITY_OPT_NAME, VERBOSITY_OPT_SHORT_NAME, + VERBOSITY_KEYWORDS_OPT_NAME, VERBOSITY_KEYWORDS_OPT_LONG_NAME +}; use clap::error::ErrorKind as ClapErrorKind; use commands::_prelude::clap_arg_actions::*; @@ -156,14 +160,17 @@ fn main() -> Result<()> { .version(&*version) .arg( Arg::new("verbose") - .short('v') + .long(VERBOSITY_OPT_NAME) + .short(VERBOSITY_OPT_SHORT_NAME) .action(clap::builder::ArgAction::Count) .global(true) .help(VERBOSITY_HELP_STR), ) .arg( Arg::new("verbosity_keywords") - .short('k') + .long(VERBOSITY_KEYWORDS_OPT_NAME) + .visible_alias(VERBOSITY_KEYWORDS_OPT_LONG_NAME) + // .short('k') .multiple(true) .action(AppendArgs) .global(true) diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index f7bf19ab..17eae521 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -117,10 +117,6 @@ pub fn launch2(invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec, subcmds: Option<&Vec>, invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>, overrides: Option>>, arg_overrides: Option>>) { - // let mut args = "{".to_string(); - // let mut ext_args = "{".to_string(); - // let mut arg_str: String; - // let mut first_arg = true; let mut args: Vec = vec!(); // println!("exts from launch: {:?}", cmd_exts); @@ -149,17 +145,19 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation continue; } - // let ext_opts = HashSet::new(); - // for e in cmd_exts.iter() { - // // ext_opts.push(e.) - // } if invocation.contains_id(arg_n) { if arg_n == "targets" { targets = Some(invocation.get_many::(arg_n).unwrap()); continue; + } else if arg_n == "no_targets" { + if *invocation.get_one::(arg_n).unwrap() { + targets = Some(clap::parser::ValuesRef::default()); + } + continue; } else if arg_n == "mode" { // FOR_PR todo!(); + continue; } let arg_str: String; @@ -195,13 +193,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } } } - // if first_arg { - // args += &arg_str; - // first_arg = false; - // } else { - // args += ", "; - // args += &arg_str; - // } if let Some(ext_src) = opt_names.get(arg_n) { ext_args.get_mut(ext_src).unwrap().push(arg_str); } else { @@ -210,9 +201,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } } println!("ext args: {:?}", ext_args); - // args += "}"; - // ext_args += "}"; - // println!("args: {}", args); let mut cmd = format!("from origen.boot import run_cmd; run_cmd('{}'", base_cmd.unwrap_or_else(|| cmd_def.get_name())); if let Some(subs) = subcmds.as_ref() { @@ -317,7 +305,11 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } if let Some(targs) = targets { - cmd += &format!(", {}", strs_to_cli_arr!("targets", targs)); + if targs.clone().count() == 0 { + cmd += ", targets=False" + } else { + cmd += &format!(", {}", strs_to_cli_arr!("targets", targs)); + } } cmd += &format!(", verbosity={}", LOGGER.verbosity()); cmd += &format!(", {}", vks_to_cmd!()); diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index 7187feb1..4ea0889e 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -18,22 +18,18 @@ pub struct AppCmds { } impl AppCmds { - fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) { - // let mut sub_commands: Option>; - // { - // build_upcase_names(current_cmd); - // } - if let Some(ref mut sub_cmds) = current_cmd.subcommand { - // sub_commands = Some(vec![]); - for mut sub in sub_cmds { - // sub_commands.as_mut().push(sub.name.to_string()); - Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub); + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) -> Result { + if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::App(current_path.to_string()))? { + if let Some(ref mut sub_cmds) = current_cmd.subcommand { + for mut sub in sub_cmds { + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub)?; + } } + slf.commands.insert(current_path.clone(), c); + Ok(true) } else { - // sub_commands = None; + Ok(false) } - // println!("PATH: {}", current_path); - slf.commands.insert(current_path.clone(), Command::from_toml_cmd(current_cmd, ¤t_path)); } pub fn new(app: &Application, exts: &mut Extensions) -> Result { @@ -43,9 +39,7 @@ impl AppCmds { commands: IndexMap::new(), }; - // let commands_toml = slf.root.join("config").join("commands.toml"); for commands_toml in app.config().cmd_paths() { - // if commands_toml.exists() { let content = match fs::read_to_string(&commands_toml) { Ok(x) => x, Err(e) => { @@ -59,13 +53,14 @@ impl AppCmds { bail!("Malformed commands.toml: {}", e); } }; - // TODO error on help given? + // FOR_PR error on help given? // slf.help = command_config.help.to_owned(); if let Some(commands) = command_config.command { for mut cmd in commands { - slf.top_commands.push(cmd.name.to_owned()); - Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); + if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd)? { + slf.top_commands.push(cmd.name.to_owned()); + } } } @@ -97,32 +92,11 @@ pub (crate) fn add_helps(helps: &mut CmdHelps, app_cmds: &AppCmds) { } pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, app_commands: &'a AppCmds, exts: &'a Extensions) -> Result> { - // let help = "Interface with commands added by the application"; - // origen_commands.push(CommandHelp { - // name: CMD_NAME.to_string(), - // help: help.to_string(), - // shortcut: None, - // }); - let mut app_cmds_cmd = helps.core_subc(&APP_COMMANDS) - // ClapCommand::new(CMD_NAME) - // .about(help) - // .setting(AppSettings::ArgRequiredElseHelp) .visible_alias("cmds") - // .setting(AppSettings::ArgRequiredElseHelp) .arg_required_else_help(true); - // .subcommand( - // ClapCommand::new("list") - // .about("List the available plugins") - // .visible_alias("ls") - // ); for top_cmd_name in app_commands.top_commands.iter() { - // app_cmds_cmd = app_cmds_cmd.subcommand(build_commands(cmds).unwrap(), &|cmd| { - // cmds.commands.get(cmd).unwrap() - // }); - - app_cmds_cmd = app_cmds_cmd.subcommand(build_commands( &app_commands.commands.get(top_cmd_name).unwrap(), &|cmd, app| { diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index f0a1d273..1f554061 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -44,7 +44,6 @@ impl AuxCmds { config.path().display(), origen_config_metadata().aux_cmd_sources[i].display() ); - // log_error!("Unable to add auxillary commands from config '{}'. The following error was met:", config.path); log_error!("{}", e); } } @@ -60,25 +59,21 @@ pub struct AuxCmdNamespace { index: usize, // path: PathBuf, help: Option, - // name: Option, } impl AuxCmdNamespace { - fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) { - // let mut sub_commands: Option>; - // { - // build_upcase_names(current_cmd); - // } - if let Some(ref mut sub_cmds) = current_cmd.subcommand { - // sub_commands = Some(vec![]); - for mut sub in sub_cmds { - // sub_commands.as_mut().push(sub.name.to_string()); - Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub); + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) -> Result { + if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::Aux(slf.namespace(), current_path.to_string()))? { + if let Some(ref mut sub_cmds) = current_cmd.subcommand { + for mut sub in sub_cmds { + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub)?; + } } + slf.commands.insert(current_path.clone(), c); + Ok(true) } else { - // sub_commands = None; + Ok(false) } - slf.commands.insert(current_path.clone(), Command::from_toml_cmd(current_cmd, ¤t_path)); } pub fn new(index: usize, config: &AuxillaryCommandsTOML, exts: &mut Extensions) -> Result { @@ -112,8 +107,9 @@ impl AuxCmdNamespace { if let Some(commands) = command_config.command { for mut cmd in commands { - slf.top_commands.push(cmd.name.to_owned()); - Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); + if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd)? { + slf.top_commands.push(cmd.name.to_owned()); + } } } @@ -171,12 +167,8 @@ pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: // }); let mut aux_sub = helps.core_cmd(CMD_NAME) - // .about(help) .visible_alias("aux_cmds") .arg_required_else_help(true); - // .setting(AppSettings::ArgRequiredElseHelp); - // .arg("details") - // .arg("show_sources") for (ns, cmds) in aux_commands.namespaces.iter() { let mut aux_sub_sub = ClapCommand::new(ns).setting(AppSettings::ArgRequiredElseHelp); @@ -184,11 +176,6 @@ pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: aux_sub_sub = aux_sub_sub.about(h.as_str()); } for top_cmd_name in cmds.top_commands.iter() { - // aux_sub_sub = aux_sub_sub.subcommand(super::build_commands(&c, &pls)); - // aux_sub_sub = aux_sub_sub.subcommand(super::build_commands(&c, Box::new(|namespace, cmd| aux_commands.namespaces.get(namespace).unwrap().commands.get(cmd).unwrap()))); - // let c = cmds.get(top_cmd_name).unwrap(); - // println!("N {}", top_cmd_name); - // println!("C {}", c.name); aux_sub_sub = aux_sub_sub.subcommand(build_commands( &cmds.commands.get(top_cmd_name).unwrap(), &|cmd, app| { @@ -201,125 +188,8 @@ pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: helps.apply_helps(&CmdSrc::Aux(ns.to_string(), cmd.to_string()), app) } )); - // aux_sub_sub = aux_sub_sub.subcommand(super::build_commands(&c, aux_commands::temp)); } aux_sub = aux_sub.subcommand(aux_sub_sub); } Ok(app.subcommand(aux_sub)) - - // if let Some(aux_cmds_configs) = ORIGEN_CONFIG.auxillary_commands.as_ref() { - // for (aux_cmds_config) in aux_cmds_configs.iter() { - // println!("Aux commands from {}", aux_cmds_config.path); - - // let mut commands_toml = PathBuf::from(aux_cmds); - // if commands_toml.extension.is_none() { - // commands_toml.push(".toml"); - // } - - // if commands_toml.exists() { - // let content = match fs::read_to_string(&commands_toml) { - // Ok(x) => x, - // Err(e) => { - // bail!("{}", e); - // } - // }; - - // let command_config: CommandsToml = match toml::from_str(&content) { - // Ok(x) => x, - // Err(e) => { - // bail!("Malformed commands.toml: {}", e); - // } - // }; - - // if let Some(mut commands) = command_config.command { - // let aux_namespace = SubCommand::with_name() - // for mut cmd in commands { - // // for (n, c) in pl.commands.iter() { - // aux_namespace = aux_namespace.subcommand(crate::build_command(&cmd)); - // // } - // // Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); - // } - // // for mut command in commands { - // // slf.command_helps.push(CommandHelp { - // // name: command.name.clone(), - // // help: command.help.clone(), - // // shortcut: command.alias.clone(), - // // }); - // // build_upcase_names(&mut command); - // // slf.commands.push(command); - // // } - // } - - // // if let Some(mut extensions) = command_config.extension { - // // for ext in extensions { - // // match exts.add_from_pl_toml(&slf, ext) { - // // Ok(_) => {}, - // // Err(e) => log_error!("Failed to add extensions from plugin '{}': {}", slf.name, e) - // // } - // // // slf.extensions.push(Extension::from_extension_toml(ExtensionSource::Plugin(slf.name.to_string()), ext)?); - // // } - // // } - // } else { - // bail!("Could not find auxillary commands file at {}", commands_toml.display()); - // } - - - // } - // } - - // let updated = app.subcommand( - // SubCommand::with_name(CMD_NAME) - // // .subcommand( - // // SubCommand::with_name("list") - // // .about("List the available plugins") - // // .visible_alias("ls") - // // // .arg( - // // // Arg::new("all") - // // // .help("Set the password for all datasets") - // // // .takes_value(false) - // // // .required(false) - // // // .long("all") - // // // .short('a'), - // // // ) - // // ) - // ); - - // let help = "Access added commands from individual plugins"; - // origen_commands.push(CommandHelp { - // name: PL_CMD_NAME.to_string(), - // help: help.to_string(), - // shortcut: None, - // }); - // let mut pl_sub = SubCommand::with_name(PL_CMD_NAME) - // .about(help) - // .visible_alias("pl"); - // if let Some(pls) = plugins { - // for (pl_name, pl) in pls.plugins.iter() { - // let mut pl_sub_sub = SubCommand::with_name(pl_name).setting(AppSettings::ArgRequiredElseHelp); - // // if let Some(pl_cmds) = pl.commands { - // // for (n, c) in pl_cmds { - // for (n, c) in pl.commands.iter() { - // pl_sub_sub = pl_sub_sub.subcommand(crate::build_pl_commands(&c, &pls)); - // } - // pl_sub = pl_sub.subcommand(pl_sub_sub); - // // } - // } - // } - // let updated = updated.subcommand(pl_sub); - // // let updated = app.subcommand( - // // SubCommand::with_name(PL_CMD_NAME) - // // .about(help) - // // // .setting(AppSettings::ArgRequiredElseHelp) - // // .visible_alias("pl") - // // // .arg( - // // // Arg::new("code") - // // // .help("Set the password for all datasets") - // // // .takes_value(true) - // // // .value_name("CODE") - // // // .multiple(true) - // // // .required(true) - // // // ) - // // ); - - // Ok(updated) } \ No newline at end of file diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs index b89d8b1a..321b1918 100644 --- a/rust/origen/cli/src/framework/extensions.rs +++ b/rust/origen/cli/src/framework/extensions.rs @@ -3,7 +3,7 @@ use origen::{Result, in_app_invocation}; use super::plugins::Plugin; use super::aux_cmds::{AuxCmdNamespace}; use clap::Command as ClapCommand; -use super::{ArgTOML, Arg, OptTOML, Opt, CmdSrc}; +use super::{ArgTOML, Arg, OptTOML, Opt, CmdSrc, Applies}; use crate::{from_toml_args, from_toml_opts}; use std::path::PathBuf; use std::{fmt, env}; @@ -11,14 +11,6 @@ use std::{fmt, env}; // TODO refactor this use super::helps::CmdSrc as ExtensionTarget; -// macro_rules! core_cmd { -// // ($src: expr) => { crate::ExtensionSource::Core($src) } -// // ($src: expr) => { crate::ExtensionSource::Plugin($src) } -// // ($src: expr, $app: expr) => { -// // let mut split = cmd.split('.'); -// // let mut sub = app.find_subcommand_mut(split.next().unwrap()).unwrap(); -// // } -// } #[derive(Debug)] pub struct Extensions { @@ -37,84 +29,30 @@ impl Extensions { } fn add_ext(&mut self, t: ExtensionTOML, f: F) -> Result - where F: Fn(ExtensionTOML) -> Result + where F: Fn(ExtensionTOML) -> Result> { let c = CmdSrc::new(&t.extend)?; - let e = f(t)?; - if !e.should_extend_in_env()? { - return Ok(false); - } - if in_app_invocation() { - // App is present - if !e.should_extend_app_context() { - return Ok(false) - } + if let Some(e) = f(t)? { + self.extensions.entry(c).or_default().push(e); + Ok(true) } else { - if c.is_app_cmd() { - // Outside of an app but extending an app command - implicitly skip these - return Ok(false) - } else { - if !e.should_extend_global_context() { - return Ok(false) - } - } + // Extension doesn't apply in this context/env. + Ok(false) } - self.extensions.entry(c).or_default().push(e); - Ok(true) } pub fn add_from_app_toml(&mut self, ext_toml: ExtensionTOML) -> Result { - // println!("Extending"); - // let t = ExtensionTarget::new(&ext_toml.extend)?; - // let e = Extension::from_extension_toml(ExtensionSource::App, ext_toml)?; self.add_ext(ext_toml, |t| Extension::from_extension_toml(ExtensionSource::App, t)) - - // self.extensions.entry(ExtensionTarget::new(&ext_toml.extend)?).or_default().push( - // Extension::from_extension_toml(ExtensionSource::App, ext_toml)? - // ); - // println!("Ext: {:?}", self.extensions.keys().collect::>()); - // Ok(()) } pub fn add_from_pl_toml(&mut self, pl: &Plugin, ext_toml: ExtensionTOML) -> Result { - // println!("Extending"); - // let t = ExtensionTarget::new(&ext_toml.extend)?; - // let e = Extension::from_extension_toml(ExtensionSource::Plugin(pl.name.to_owned()), ext_toml)?; self.add_ext(ext_toml, |t| Extension::from_extension_toml(ExtensionSource::Plugin(pl.name.to_owned()), t)) - // if self.should_add_ext(t, e) { - // // if !app_present!() && (t.is_app_cmd() || e.extend_in_app_context_only()) { - // // return Ok(()) - // // } - // self.extensions.entry(t).or_default().push(e); - // } - // // println!("Ext: {:?}", self.extensions.keys().collect::>()); - // Ok(()) } pub fn add_from_aux_toml(&mut self, ns: &AuxCmdNamespace, ext_toml: ExtensionTOML) -> Result { - // println!("Extending"); - // let t = ExtensionTarget::new(&ext_toml.extend)?; - // let e = Extension::from_extension_toml(ExtensionSource::Aux(ns.namespace(), ns.root()), ext_toml)?; self.add_ext(ext_toml, |t| Extension::from_extension_toml(ExtensionSource::Aux(ns.namespace(), ns.root()), t)) - // if self.should_add_ext(t, e) { - // self.extensions.entry(t).or_default().push(e); - // } - - // self.extensions.entry(ExtensionTarget::new(&ext_toml.extend)?).or_default().push( - // Extension::from_extension_toml(ExtensionSource::Aux(ns.namespace(), ns.root()), ext_toml)? - // ); - // println!("Ext: {:?}", self.extensions.keys().collect::>()); - // Ok(()) } - // pub fn add_from_app_toml(&mut self, ExtensionSource, ExtensionTOML) -> Result<()> { - // ? - // } - - // pub fn add_from_toml(&mut self, src: ExtensionSource, ext_toml: ExtensionTOML) -> Result<()> { - // todo!() - // } - pub fn apply_to_core_cmd<'a>(&'a self, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { self.apply_to(&ExtensionTarget::Core(cmd.to_string()), app) } @@ -143,7 +81,7 @@ impl Extensions { } } else { // println!("No extension found for {:?}", cmd); - // TODO + // FOR_PR } app } @@ -216,16 +154,21 @@ pub struct Extension { } impl Extension { - pub fn from_extension_toml(ext_source: ExtensionSource, ext: ExtensionTOML) -> Result { + pub fn from_extension_toml(ext_source: ExtensionSource, ext: ExtensionTOML) -> Result> { let mut slf = Self { - extends: ext.extend, in_global_context: ext.in_global_context, in_app_context: ext.in_app_context, on_env: ext.on_env, - args: from_toml_args!(ext.arg), - opts: from_toml_opts!(ext.opt), + args: None, + opts: None, source: ext_source, + extends: ext.extend, }; + if !slf.applies()? { + return Ok(None) + } + slf.args = from_toml_args!(ext.arg); + slf.opts = from_toml_opts!(ext.opt, &slf.extends, &slf.source, Some(&slf.extends)); if let Some(opts) = slf.opts.as_mut() { for opt in opts { opt.help += &format!(" [Extended from {}]", @@ -243,44 +186,24 @@ impl Extension { ); } } - Ok(slf) + Ok(Some(slf)) } +} - pub fn should_extend_global_context(&self) -> bool { - self.in_global_context.unwrap_or(true) +impl Applies for Extension { + fn in_global_context(&self) -> Option { + self.in_global_context } - pub fn should_extend_app_context(&self) -> bool { - self.in_app_context.unwrap_or(true) + fn in_app_context(&self) -> Option { + self.in_app_context } - pub fn should_extend_in_env(&self) -> Result { - if let Some(envs) = self.on_env.as_ref() { - for e in envs { - let mut s = e.splitn(1, '='); - let e_name= s.next().ok_or_else( || format!("Failed to parse 'on_env' '{}', extending '{}', for {}", e, self.extends, self.source))?.trim(); - let e_val = s.next(); - match env::var(e_name) { - Ok(val) => { - if let Some(v) = e_val { - if v == val { - return Ok(true); - } - } else { - return Ok(true); - } - }, - Err(err) => match err { - env::VarError::NotPresent => {}, - _ => { - return Err(err.into()); - } - } - } - } - Ok(false) - } else { - Ok(true) - } + fn on_env(&self) -> Option<&Vec> { + self.on_env.as_ref() + } + + fn on_env_error_msg(&self, e: &String) -> String { + format!("Failed to parse 'on_env' '{}', extending '{}', for {}", e, self.extends, self.source) } } diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index c2cb3673..61e44268 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -11,10 +11,11 @@ pub use plugins::{Plugins, Plugin}; pub use aux_cmds::AuxCmds; pub use app_cmds::AppCmds; pub use helps::{CmdHelps, CmdHelp, CmdSrc}; +use std::{env}; use clap::{App}; use clap::Command as ClapCommand; -use origen::Result; +use origen::{Result, in_app_invocation}; use crate::commands::_prelude::clap_arg_actions::*; #[macro_export] @@ -29,14 +30,74 @@ macro_rules! from_toml_args { #[macro_export] macro_rules! from_toml_opts { - ($toml_opts: expr) => { + ($toml_opts: expr, $cmd_path: expr, $parent: expr) => { + crate::from_toml_opts!($toml_opts, $cmd_path, $parent, None) + }; + ($toml_opts: expr, $cmd_path: expr, $parent: expr, $ext: expr) => { $toml_opts.as_ref() .map(|opts| opts.iter() - .map( |o| crate::framework::Opt::from_toml(o)) + .map( |o| crate::framework::Opt::from_toml(o, $cmd_path, $parent, $ext)) .collect::>()) } } +pub trait Applies { + fn in_app_context(&self) -> Option; + fn in_global_context(&self) -> Option; + fn on_env(&self) -> Option<&Vec>; + fn on_env_error_msg(&self, e: &String) -> String; + + fn applies(&self) -> Result { + Ok(self.applies_with_env()? && self.applies_in_context()?) + } + + fn applies_in_app_context(&self) -> Result { + Ok(self.in_app_context().unwrap_or(true)) + } + + fn applies_in_global_context(&self) -> Result { + Ok(self.in_global_context().unwrap_or(true)) + } + + fn applies_in_context(&self) -> Result { + if in_app_invocation() { + self.applies_in_app_context() + } else { + self.applies_in_global_context() + } + } + + fn applies_with_env(&self) -> Result { + if let Some(envs) = self.on_env() { + for e in envs { + let mut s = e.splitn(1, '='); + let e_name= s.next().ok_or_else( || self.on_env_error_msg(e))?.trim(); + let e_val = s.next(); + match env::var(e_name) { + Ok(val) => { + if let Some(v) = e_val { + if v == val { + return Ok(true); + } + } else { + return Ok(true); + } + }, + Err(err) => match err { + env::VarError::NotPresent => {}, + _ => { + return Err(err.into()); + } + } + } + } + Ok(false) + } else { + Ok(true) + } + } +} + #[derive(Debug, Deserialize)] pub (crate) struct CommandsToml { pub command: Option>, @@ -51,8 +112,11 @@ pub struct CommandTOML { pub arg: Option>, pub opt: Option>, pub subcommand: Option>, - // pub consolidate_subc_run_funcs: Option, - // pub run_func: Option, + pub add_target_opt: Option, + pub add_mode_opt: Option, + pub in_global_context: Option, + pub in_app_context: Option, + pub on_env: Option>, } #[derive(Debug)] @@ -64,27 +128,66 @@ pub struct Command { pub opts: Option>, pub subcommands: Option>, pub full_name: String, - // pub consolidate_subc_run_funcs: Option, - // pub run_func: Option, + pub add_mode_opt: Option, + pub add_target_opt: Option, + pub parent: CmdSrc, + pub in_global_context: Option, + pub in_app_context: Option, + pub on_env: Option>, } impl Command { - pub fn from_toml_cmd(cmd: &CommandTOML, cmd_path: &str) -> Self { - Self { + pub fn from_toml_cmd(cmd: &CommandTOML, cmd_path: &str, parent: CmdSrc) -> Result> { + let mut slf = Self { name: cmd.name.to_owned(), help: cmd.help.to_owned(), alias: cmd.alias.to_owned(), - // args: cmd.arg.to_owned(), - args: from_toml_args!(cmd.arg), - opts: from_toml_opts!(cmd.opt), - // opts: cmd.opt.as_ref().map(|opts| opts.iter().map( |o| Opt::from_toml(o)).collect::>()), - subcommands: cmd.subcommand.as_ref() - .map(|sub_cmds| sub_cmds.iter() - .map(|c| format!("{}.{}", cmd_path, &c.name.to_string())) - .collect::>() - ), + args: None, + opts: None, + subcommands: None, full_name: cmd_path.to_string(), + add_mode_opt: cmd.add_mode_opt, + add_target_opt: cmd.add_target_opt, + parent: parent, + in_global_context: cmd.in_global_context, + in_app_context: cmd.in_app_context, + on_env: cmd.on_env.to_owned(), + }; + if !slf.applies()? { + return Ok(None) } + slf.args = from_toml_args!(cmd.arg); + slf.opts = from_toml_opts!(cmd.opt, cmd_path, &slf.parent); + slf.subcommands = cmd.subcommand.as_ref().map(|sub_cmds| + sub_cmds.iter().map(|c| format!("{}.{}", cmd_path, &c.name.to_string())).collect::>() + ); + Ok(Some(slf)) + } + + pub fn add_mode_opt(&self) -> bool { + self.add_mode_opt.unwrap_or(true) + } + + pub fn add_target_opt(&self) -> bool { + self.add_target_opt.unwrap_or(true) + } +} + +impl Applies for Command { + fn in_global_context(&self) -> Option { + self.in_global_context + } + + fn in_app_context(&self) -> Option { + self.in_app_context + } + + fn on_env(&self) -> Option<&Vec> { + self.on_env.as_ref() + } + + fn on_env_error_msg(&self, e: &String) -> String { + format!("Failed to parse 'on_env' '{}', for command {}", e, self.full_name) } } @@ -162,20 +265,84 @@ pub struct Opt { pub upcased_name: Option, } +use core::fmt::Display; impl Opt { - fn from_toml(opt: &OptTOML) -> Self { + fn from_toml(opt: &OptTOML, cmd_path: &str, parent: &dyn Display, ext: Option<&str>) -> Self { + let err_prefix; + if let Some(e) = ext { + err_prefix = format!("Option '{}' extended from '{}' for command '{}' tried to use reserved option", opt.name, parent, e); + } else { + err_prefix = format!("Option '{}' from command '{}' tried to use reserved option", opt.name, parent); + } + Self { name: opt.name.to_owned(), help: opt.help.to_owned(), - short: opt.short, - long: opt.long.to_owned(), + short: { + opt.short.as_ref().and_then ( |sn| { + if RESERVED_OPT_SHORT_NAMES.contains(sn) { + log_error!( + "{} short name '{}' and will not be available as '-{}'", + err_prefix, + sn, + sn + ); + None + } else { + Some(*sn) + } + }) + }, + long: { + opt.long.as_ref().and_then ( |ln| { + if RESERVED_OPT_NAMES.contains(&ln.as_str()) { + log_error!( + "{} long name '{}' and will not be available as '--{}'", + err_prefix, + ln, + ln + ); + None + } else { + Some(ln.to_owned()) + } + }) + }, takes_value: opt.takes_value, multiple: opt.multiple, required: opt.required, value_name: opt.value_name.to_owned(), use_delimiter: opt.use_delimiter, - short_aliases: opt.short_aliases.to_owned(), - long_aliases: opt.long_aliases.to_owned(), + short_aliases: { + opt.short_aliases.as_ref().map (|sns| sns.iter().filter_map( |sn| { + if RESERVED_OPT_SHORT_NAMES.contains(sn) { + log_error!( + "{} short name alias '{}' and will not be available as '-{}'", + err_prefix, + sn, + sn + ); + None + } else { + Some(*sn) + } + }).collect()) + }, + long_aliases: { + opt.long_aliases.as_ref().map( |lns| lns.iter().filter_map( |ln| { + if RESERVED_OPT_NAMES.contains(&ln.as_str()) { + log_error!( + "{} long name alias '{}' and will not be available as '--{}'", + err_prefix, + ln, + ln + ); + None + } else { + Some(ln.to_owned()) + } + }).collect()) + }, hidden: opt.hidden, upcased_name: { if opt.value_name.is_some() { @@ -188,169 +355,31 @@ impl Opt { } } -// pub (crate) fn build_upcase_names(command: &mut CommandTOML) { -// if let Some(args) = &mut command.arg { -// for arg in args { -// arg.upcased_name = Some(arg.name.to_uppercase()); -// } -// } -// if let Some(subcommands) = &mut command.subcommand { -// for mut subcmd in subcommands { -// build_upcase_names(&mut subcmd); -// } -// } -// } -// helps: &'a mut CmdHelps, pub (crate) fn build_commands<'a, F, G, H>(cmd_def: &'a Command, exts: &G, cmd_container: &F, apply_helps: &H) -> App<'a> where F: Fn(&str) -> &'a Command, G: Fn(&str, App<'a>) -> App<'a>, H: Fn(&str, App<'a>) -> App<'a> { - let mut cmd = ClapCommand::new(&cmd_def.name); // .about(cmd_def.help.as_str()); + let mut cmd = ClapCommand::new(&cmd_def.name); + + cmd = add_app_opts(cmd, cmd_def.add_mode_opt(), cmd_def.add_target_opt()); + // TODO need test case for cmd alias if cmd_def.alias.is_some() { cmd = cmd.visible_alias(cmd_def.alias.as_ref().unwrap().as_str()); } if let Some(args) = cmd_def.args.as_ref() { - // let mut req_arg_index = 0; cmd = apply_args(args, cmd); - // for arg_def in args.iter() { - // let mut arg = clap::Arg::new(arg_def.name.as_str()) - // .takes_value(true) - // .help(arg_def.help.as_str()); - - // if let Some(vn) = arg_def.value_name.as_ref() { - // arg = arg.value_name(vn); - // } else { - // arg = arg.value_name(arg_def.upcased_name.as_ref().unwrap()); - // } - - // if let Some(d) = arg_def.use_delimiter { - // arg = arg.use_value_delimiter(d); - // arg = arg.multiple_values(true); - // } - // if let Some(m) = arg_def.multiple { - // arg = arg.multiple_values(m); - // } - - // if let Some(r) = arg_def.required { - // arg = arg.required(r); - // } - - // cmd = cmd.arg(arg); - // } } if let Some(opts) = cmd_def.opts.as_ref() { - // For each arg - // for j in 0..cmd_def.args.len() { cmd = apply_opts(opts, cmd); - // for opt_def in opts.iter() { - // let opt_def = &cmd_def.opts.as_ref().unwrap()[j]; - // println!("opt name: {}", opt_def.name); - // let mut opt = clap::Arg::new(opt_def.name.as_str()).help(opt_def.help.as_str()); - - // if let Some(ud) = opt_def.use_delimiter { - // opt = opt.use_value_delimiter(ud); - // opt = opt.multiple_values(true); - // opt = opt.takes_value(true); - // } - // if let Some(m) = opt_def.multiple { - // opt = opt.multiple(m); - // opt = opt.takes_value(true); - // } - // if let Some(val_name) = opt_def.value_name.as_ref() { - // opt = opt.value_name(val_name); - // opt = opt.takes_value(true); - // } - // if let Some(tv) = opt_def.takes_value { - // opt = opt.takes_value(tv); - // } - - // if !opt.is_takes_value_set() { - // opt = opt.action(clap::ArgAction::Count); - // } - - // // if let Some(s) = opt_def.stack.or(true) { - // // if !arg.is_takes_value_set { - // // arg.action(clap::ArgAction::Count); - // // // arg = arg.multiple_occurrences(s); - // // } - // // } - // if let Some(ln) = opt_def.long.as_ref() { - // opt = opt.long(ln); - // } else { - // if !opt_def.short.is_some() { - // opt = opt.long(&opt_def.name); - // } - // } - // if let Some(sn) = opt_def.short { - // opt = opt.short(sn); - // // let chars = n.chars(); - // // if let Some(c) = chars.next() { - // // arg = arg.short(c); - // // } - // // if let Some(c) = chars.next() { - // // bail! - // // } - // // arg = arg.short(opt_def.short.as_ref().unwrap().chars().next().unwrap()) - // } - - - // // // If this is an arg without a switch - // // if arg_def.switch.is_some() && !arg_def.switch.unwrap() { - // // // Do nothing? - // // } else { - // // if arg_def.long.is_some() { - // // arg = arg.long(&arg_def.long.as_ref().unwrap()); - // // } else { - // // arg = arg.long(&arg_def.name); - // // } - // // if arg_def.short.is_some() { - // // arg = arg.short(arg_def.short.as_ref().unwrap().chars().next().unwrap()) - // // // arg = arg.short(arg_def.short.as_ref().unwrap()) - // // } - // // } - - // if let Some(r) = opt_def.required { - // opt = opt.required(r); - // } - - // if let Some(h) = opt_def.hidden { - // opt = opt.hidden(h); - // } - - // // if opt_def.takes_value.unwrap_or(false) || opt_def.value_name.is_some() || opt_def.multiple.is_some() { - // if opt.is_takes_value_set() && opt_def.value_name.is_none() { - // opt = opt.value_name(opt_def.upcased_name.as_ref().unwrap()); - // // if let Some(val_name) = opt_def.value_name.as_ref() { - // // opt = opt.value_name(val_name); - // // } else { - // // opt = opt.value_name(opt_def.upcased_name.as_ref().unwrap()); - // // } - // } - - // if let Some(lns) = opt_def.long_aliases.as_ref() { - // let v = lns.iter().map( |s| s.as_str() ).collect::>(); - // opt = opt.visible_aliases(&v[..]); - // } - - // if let Some(sns) = opt_def.short_aliases.as_ref() { - // // let v = sns.iter().map( |s| s.as_str() ).collect::>(); - // opt = opt.visible_short_aliases(&sns[..]); - // } - - // cmd = cmd.arg(opt); - // } } if let Some(subcommands) = &cmd_def.subcommands { for c in subcommands { - // let subcmd = build_command(&c); - // let split = c.split_once('.').unwrap(); - // let subcmd = build_pl_commands(plugins.plugins.get(split.0).unwrap().commands.get(split.1).unwrap(), plugins); let subcmd = build_commands( cmd_container(c), exts, @@ -362,15 +391,12 @@ where } cmd = exts(&cmd_def.full_name, cmd); cmd = apply_helps(&cmd_def.full_name, cmd); - // cmd = cmd.about(helps.first().as_ref().unwrap().help.as_ref().unwrap().as_str()); cmd } pub (crate) fn apply_args<'a>(args: &'a Vec, mut cmd: App<'a>) -> App<'a> { for arg_def in args { - // let arg_def = &cmd_def.arg.as_ref().unwrap()[j]; - // let mut arg = clap::Arg::new(arg_def.name.as_str()).help(arg_def.help.as_str()); let mut arg = clap::Arg::new(arg_def.name.as_str()) .action(SetArg) .help(arg_def.help.as_str()); @@ -393,58 +419,10 @@ pub (crate) fn apply_args<'a>(args: &'a Vec, mut cmd: App<'a>) -> App<'a> { arg = arg.required(r); } - // if let Some(ln) = arg_def.long.as_ref() { - // arg = arg.long(ln); - // } else { - // arg = arg.long(&arg_def.name); - // } - - // if arg_def.short.is_some() { - // // TODO add error handling - // // arg = arg.short(arg_def.short.as_ref().unwrap().chars().next().unwrap()) - // // arg = arg.short(arg_def.short.as_ref().unwrap()) - // } - - // If this is an arg without a switch - // if arg_def.switch.is_some() && !arg_def.switch.unwrap() { - // // Do nothing? - // } else { - // if arg_def.long.is_some() { - // arg = arg.long(&arg_def.long.as_ref().unwrap()); - // } else { - // arg = arg.long(&arg_def.name); - // } - // if arg_def.short.is_some() { - // arg = arg.short(arg_def.short.as_ref().unwrap().chars().next().unwrap()) - // // arg = arg.short(arg_def.short.as_ref().unwrap()) - // } - // } - - // if let Some(tv) = arg_def.takes_value.as_ref() { - // arg = arg.takes_value(*tv); - // } - - // if arg_def.multiple.is_some() { - // arg = arg.multiple(arg_def.multiple.unwrap()) - // } - // if arg_def.required.is_some() { - // arg = arg.required(arg_def.required.unwrap()); - // } - // if arg_def.use_delimiter.is_some() { - // arg = arg.use_delimiter(arg_def.use_delimiter.unwrap()) - // } + // FOR_PR is hidden arg a thing? // if arg_def.hidden.is_some() { // arg = arg.hidden(arg_def.hidden.unwrap()) // } - - // if arg_def.takes_value.unwrap_or(false) || arg_def.value_name.is_some() || arg_def.multiple.is_some() { - // if arg_def.value_name.is_some() { - // arg = arg.value_name(arg_def.value_name.as_ref().unwrap()) - // } else { - // arg = arg.value_name(arg_def.upcased_name.as_ref().unwrap()) - // } - // } - cmd = cmd.arg(arg); } cmd @@ -456,11 +434,9 @@ pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { if let Some(val_name) = opt_def.value_name.as_ref() { opt = opt.value_name(val_name).action(SetArg); - // opt = opt.takes_value(true); } if let Some(tv) = opt_def.takes_value { if tv { - // opt = opt.takes_value(tv); opt = opt.action(AppendArgs); } } @@ -469,7 +445,7 @@ pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { opt = opt.use_value_delimiter(ud); } opt = opt.multiple_values(true); - opt = opt.action(AppendArgs); // takes_value(true); + opt = opt.action(AppendArgs); } if let Some(m) = opt_def.multiple { if m { @@ -477,23 +453,8 @@ pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { } else { opt = opt.multiple(m).action(SetArg); } - // opt = opt.takes_value(true); } - // if !opt.is_takes_value_set() { - // opt = opt.action(clap::ArgAction::Count); - // } - // println!("action {:?} {}", opt.get_action(), opt.get_action().takes_values()); - // if !opt.get_action().takes_values() { - // opt = opt.action(CountArgs); - // } - - // if let Some(s) = opt_def.stack.or(true) { - // if !arg.is_takes_value_set { - // arg.action(clap::ArgAction::Count); - // // arg = arg.multiple_occurrences(s); - // } - // } if let Some(ln) = opt_def.long.as_ref() { opt = opt.long(ln); } else { @@ -503,32 +464,8 @@ pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { } if let Some(sn) = opt_def.short { opt = opt.short(sn); - // let chars = n.chars(); - // if let Some(c) = chars.next() { - // arg = arg.short(c); - // } - // if let Some(c) = chars.next() { - // bail! - // } - // arg = arg.short(opt_def.short.as_ref().unwrap().chars().next().unwrap()) } - - // // If this is an arg without a switch - // if arg_def.switch.is_some() && !arg_def.switch.unwrap() { - // // Do nothing? - // } else { - // if arg_def.long.is_some() { - // arg = arg.long(&arg_def.long.as_ref().unwrap()); - // } else { - // arg = arg.long(&arg_def.name); - // } - // if arg_def.short.is_some() { - // arg = arg.short(arg_def.short.as_ref().unwrap().chars().next().unwrap()) - // // arg = arg.short(arg_def.short.as_ref().unwrap()) - // } - // } - if let Some(r) = opt_def.required { opt = opt.required(r); } @@ -537,14 +474,8 @@ pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { opt = opt.hidden(h); } - // if opt_def.takes_value.unwrap_or(false) || opt_def.value_name.is_some() || opt_def.multiple.is_some() { if opt.get_action().takes_values() && opt_def.value_name.is_none() { opt = opt.value_name(opt_def.upcased_name.as_ref().unwrap().as_str()); - // if let Some(val_name) = opt_def.value_name.as_ref() { - // opt = opt.value_name(val_name); - // } else { - // opt = opt.value_name(opt_def.upcased_name.as_ref().unwrap()); - // } } if let Some(lns) = opt_def.long_aliases.as_ref() { @@ -553,7 +484,6 @@ pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { } if let Some(sns) = opt_def.short_aliases.as_ref() { - // let v = sns.iter().map( |s| s.as_str() ).collect::>(); opt = opt.visible_short_aliases(&sns[..].iter().map(|a| *a).collect::>()); } @@ -572,17 +502,35 @@ pub fn build_path<'a>(mut matches: &'a clap::ArgMatches) -> Result { Ok(path_pieces.join(".")) } -pub const target_opt_name: &str = "targets"; -pub const no_target_opt_name: &str = "no_targets"; -// pub const target_opt_name: &str = "output_dir"; -// pub const target_opt_name: &str = "reference_dir"; -pub const mode_opt_name: &str = "mode"; -// pub const target_opt_name: &str = "debug"; +pub const HELP_OPT_NAME: &str = "help"; +pub const HELP_OPT_SHORT_NAME: char = 'h'; +pub const VERBOSITY_KEYWORDS_OPT_NAME: &str = "verbosity_keywords"; +pub const VERBOSITY_KEYWORDS_OPT_LONG_NAME: &str = "vk"; +pub const VERBOSITY_OPT_NAME: &str = "verbosity"; +pub const VERBOSITY_OPT_SHORT_NAME: char = 'v'; +pub const TARGET_OPT_NAME: &str = "targets"; +pub const TARGET_OPT_ALIAS: &str = "target"; +pub const TARGET_OPT_SN: char = 't'; +pub const NO_TARGET_OPT_NAME: &str = "no_targets"; +pub const NO_TARGET_OPT_ALIAS: &str = "no_target"; +pub const MODE_OPT_NAME: &str = "mode"; + +pub const RESERVED_OPT_NAMES: &[&str] = &[ + HELP_OPT_NAME, + VERBOSITY_KEYWORDS_OPT_NAME, VERBOSITY_KEYWORDS_OPT_LONG_NAME, + TARGET_OPT_NAME, TARGET_OPT_ALIAS, + NO_TARGET_OPT_NAME, NO_TARGET_OPT_ALIAS, + MODE_OPT_NAME, + VERBOSITY_OPT_NAME +]; + +pub const RESERVED_OPT_SHORT_NAMES: &[char] = &[ + HELP_OPT_SHORT_NAME, TARGET_OPT_SN, VERBOSITY_OPT_SHORT_NAME +]; macro_rules! add_mode_opt { ($cmd:expr) => { - $cmd.arg(clap::Arg::new(crate::framework::mode_opt_name) - .short('m') + $cmd.arg(clap::Arg::new(crate::framework::MODE_OPT_NAME) .long("mode") .value_name("MODE") .help("Override the default mode currently set by the workspace for this command") @@ -593,29 +541,39 @@ macro_rules! add_mode_opt { macro_rules! add_target_opt { ($cmd:expr) => { - $cmd.arg(clap::Arg::new(crate::framework::target_opt_name) + $cmd.arg(clap::Arg::new(crate::framework::TARGET_OPT_NAME) .short('t') - .long(crate::framework::target_opt_name) - .visible_alias("target") + .long(crate::framework::TARGET_OPT_NAME) + .visible_alias(TARGET_OPT_ALIAS) .help("Override the targets currently set by the workspace for this command") .action(crate::commands::_prelude::AppendArgs) .use_value_delimiter(true) .multiple_values(true) .value_name("TARGETS") - .conflicts_with(crate::framework::no_target_opt_name) - // .number_of_values(1) - ).arg(clap::Arg::new(crate::framework::no_target_opt_name) - .long(crate::framework::no_target_opt_name) - .visible_alias("no_target") + .conflicts_with(crate::framework::NO_TARGET_OPT_NAME) + ).arg(clap::Arg::new(crate::framework::NO_TARGET_OPT_NAME) + .long(crate::framework::NO_TARGET_OPT_NAME) + .visible_alias(NO_TARGET_OPT_ALIAS) .help("Clear any targets currently set by the workspace for this command") .action(crate::commands::_prelude::SetArgTrue) ) } } +pub fn add_app_opts(mut cmd: ClapCommand, add_mode_opt: bool, add_target_opt: bool) -> ClapCommand { + if in_app_invocation() { + if add_target_opt { + cmd = add_mode_opt!(cmd); + } + if add_mode_opt { + cmd = add_target_opt!(cmd); + } + } + cmd +} pub fn add_all_app_opts(cmd: ClapCommand) -> ClapCommand { - if origen::in_app_invocation() { + if in_app_invocation() { add_mode_opt!(add_target_opt!(cmd)) } else { cmd diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index b0df02ad..3d9f33ec 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -213,44 +213,30 @@ pub struct Plugin { pub root: PathBuf, // TODO see about making this indices instead of duplicating string pub top_commands: Vec, - // pub command_helps: Vec, - // pub commands: Vec, pub commands: IndexMap::, - // pub extensions: Vec, } impl Plugin { - fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) { - // let mut sub_commands: Option>; - // { - // build_upcase_names(current_cmd); - // } - if let Some(ref mut sub_cmds) = current_cmd.subcommand { - // sub_commands = Some(vec![]); - for mut sub in sub_cmds { - // sub_commands.as_mut().push(sub.name.to_string()); - Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub); + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) -> Result { + if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::Plugin(slf.name.to_owned(), current_path.to_string()))? { + if let Some(ref mut sub_cmds) = current_cmd.subcommand { + for mut sub in sub_cmds { + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub)?; + } } + slf.commands.insert(current_path.clone(), c); + Ok(true) } else { - // sub_commands = None; + Ok(false) } - // println!("PATH: {}", current_path); - slf.commands.insert(current_path.clone(), Command::from_toml_cmd(current_cmd, ¤t_path)); } pub fn new(name: &str, path: PathBuf, exts: &mut Extensions) -> Result { - // fn add_command(current_cmd, current_path, plugins) { - // plugins.insert() - // } - let mut slf = Self { name: name.to_string(), root: path, top_commands: vec!(), commands: IndexMap::new(), - // extensions: vec!(), - // command_helps: vec![], - // commands: vec![], }; let commands_toml = slf.root.join("commands.toml"); @@ -272,18 +258,10 @@ impl Plugin { if let Some(commands) = command_config.command { for mut cmd in commands { - slf.top_commands.push(cmd.name.to_owned()); - Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd); + if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd)? { + slf.top_commands.push(cmd.name.to_owned()); + } } - // for mut command in commands { - // slf.command_helps.push(CommandHelp { - // name: command.name.clone(), - // help: command.help.clone(), - // shortcut: command.alias.clone(), - // }); - // build_upcase_names(&mut command); - // slf.commands.push(command); - // } } if let Some(extensions) = command_config.extension { @@ -292,7 +270,6 @@ impl Plugin { Ok(_) => {}, Err(e) => log_error!("Failed to add extensions from plugin '{}': {}", slf.name, e) } - // slf.extensions.push(Extension::from_extension_toml(ExtensionSource::Plugin(slf.name.to_string()), ext)?); } } } diff --git a/test_apps/python_app/config/commands.toml b/test_apps/python_app/config/commands.toml index 34f2c42e..4ff131cb 100644 --- a/test_apps/python_app/config/commands.toml +++ b/test_apps/python_app/config/commands.toml @@ -140,6 +140,118 @@ help = "Command disabling standard app opts" disable_target_opt = true disable_mode_opt = true +[[command]] +name = "reserved_opt_error_gen" +help = "Generate error messages when reserved opts are used" +on_env = ["ORIGEN_APP_TEST_RESERVED_OPT_ERRORS"] + + [[command.opt]] + name = "conflicting_help" + short = "h" + help = "Conflicting Opt" + + [[command.opt]] + name = "conflicting_target" + short = "t" + long = "target" + help = "Conflicting Opt" + + [[command.opt]] + name = "non_conflicting" + long = "non_conflicting" + short = "n" + help = "Non-Conflicting Opt" + + [[command.subcommand]] + name = "single_conflicting_opt" + help = "Generate error messages for reserved opts" + + [[command.subcommand.opt]] + name = "non_conflicting" + long = "non_conflicting" + help = "Non-Conflicting Opt" + + [[command.subcommand.opt]] + name = "conflicting_target" + long = "target" + help = "Conflicting Opt" + + [[command.subcommand]] + name = "multiple_conflicting_opts" + help = "Generate error messages for reserved opts" + + [[command.subcommand.opt]] + name = "conflicting_target" + short = "t" + help = "Conflicting Opt" + + [[command.subcommand.opt]] + name = "conflicting_mode" + long_aliases = ["mode"] + help = "Conflicting Opt" + + [[command.subcommand.opt]] + name = "not_conflicting" + short = "n" + help = "Non-Conflicting Opt" + + [[command.subcommand.opt]] + name = "conflicting_no_targets" + long_aliases = ["no_targets", "no_target"] + help = "Conflicting Opt" + + [[command.subcommand.opt]] + name = "conflicting_target_again" + long = "target" + long_aliases = ["targets"] + short = "t" + help = "Conflicting Opt" + + [[command.subcommand.opt]] + name = "conflicting_v" + short = "v" + long = "verbosity" + help = "Conflicting Opt" + + [[command.subcommand.opt]] + name = "conflicting_vk" + long = "vk" + long_aliases = ["verbosity_keywords"] + help = "Conflicting Opt" + + [[command.subcommand.opt]] + name = "conflicting_help" + short = "h" + long = "help" + short_aliases = ["g", "i"] + long_aliases = ["help_alias"] + help = "Conflicting Opt" + + [[command.subcommand.subcommand]] + name = "subc" + help = "Generate error messages for reserved opts - subc" + + [[command.subcommand.subcommand.opt]] + name = "conflicting_help" + short = "h" + help = "Conflicting Opt" + + [[command.subcommand.subcommand.subcommand]] + name = "subc" + help = "Generate error messages for reserved opts - subc - subc" + + [[command.subcommand.subcommand.subcommand.opt]] + name = "conflicting_help" + long_aliases = ["help", "help2", "help3"] + help = "Conflicting Opt" + + [[command.subcommand.subcommand.subcommand.opt]] + name = "conflicting_v" + short = "c" + short_aliases = ["v"] + long = "verbosity" + help = "Conflicting Opt" + # Extend core command [[extension]] extend = "origen.eval" @@ -224,3 +336,45 @@ on_env = ["ORIGEN_APP_MISSING_CORE_EXT"] [[extension]] extend = "aux.dummy_cmds.dummy_cmd" on_env = ["ORIGEN_APP_MISSING_AUX_EXT"] + +[[extension]] +extend = "origen.eval" +on_env = ["ORIGEN_APP_EXT_TEST_RESERVED_OPT_ERRORS"] + + [[extension.opt]] + name = "conflicting_target" + help = "Conflicting Core Extension" + long = "target" + short = "t" + + [[extension.opt]] + name = "conflicting_no_target" + help = "Conflicting Core Extension" + long_aliases=["no_target", "no_targets"] + short="n" + + [[extension.opt]] + name = "conflicting_mode" + help = "Conflicting Core Extension" + long="mode_conflict" + short_aliases=["m"] + long_aliases=["mode"] + + [[extension.opt]] + name = "conflicting_help" + help = "Conflicting Core Extension" + short = "h" + long = "help_conflict" + long_aliases=["help", "help1"] + + [[extension.opt]] + name = "conflicting_v" + help = "Conflicting Core Extension" + short="v" + short_aliases=["w"] + long="verbosity" + + [[extension.opt]] + name = "conflicting_vk" + help = "Conflicting Core Extension" + long_aliases=["verbosity_keywords", "vk"] diff --git a/test_apps/python_app/example/commands/extensions/__init__.py b/test_apps/python_app/example/commands/extensions/__init__.py deleted file mode 100644 index 5c0fdf4c..00000000 --- a/test_apps/python_app/example/commands/extensions/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# from origen.boot import on_load -# from test_apps_shared_test_helpers import get_ext_name - -# def apply_generic_ext(self): - # from origen.boot import before_cmd, after_cmd, clean_up - # n = get_ext_name() - - # def before(**args): - # print(before_cmd_ext_args_str(args, ext_name=n)) - # do_action(args.get(f"{n}_action", None), "Before") - # mod.before = before - # before_cmd(mod.before) diff --git a/test_apps/python_app/example/commands/reserved_opt_error_gen.py b/test_apps/python_app/example/commands/reserved_opt_error_gen.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/reserved_opt_error_gen.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.py b/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.subc.py b/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.subc.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.subc.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.subc.subc.py b/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.subc.subc.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/reserved_opt_error_gen/multiple_conflicting_opts.subc.subc.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/example/commands/reserved_opt_error_gen/single_conflicting_opt.py b/test_apps/python_app/example/commands/reserved_opt_error_gen/single_conflicting_opt.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/reserved_opt_error_gen/single_conflicting_opt.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 51f7008e..3ec10bf8 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -1,16 +1,42 @@ # FOR_PR convert assert args import pytest, pathlib import subprocess -import os, re +import os import origen from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg +class CLICommon(CLIShared): + _no_config_run_opts = { + "with_configs": CLIShared.configs.suppress_plugin_collecting_config, + "bypass_config_lookup": True + } + + @pytest.fixture + def no_config_run_opts(self): + return self._no_config_run_opts + + def show_per_cmd_targets(self, targets=None, **kwargs): + prefix = "Current Targets: " + if targets is not None: + kwargs.setdefault("run_opts", {})["targets"] = targets + out = self.eval(f"print( f'{prefix}{{origen.target.current_targets}}' )", **kwargs) + out = out.split("\n") + return eval(next(t.replace(prefix, '') for t in out if t.startswith(prefix))) + + class Targets: + hawk = "hawk" + falcon = "falcon" + eagle = "eagle" + uflex = "uflex" + + targets = Targets() + + Cmd = CLIShared.Cmd origen_cli = os.getenv('TRAVIS_ORIGEN_CLI') or 'origen' def test_origen_v(): - #import pdb; pdb.set_trace() process = subprocess.Popen([f'{origen_cli}', '-v'], stdout=subprocess.PIPE, universal_newlines=True) @@ -116,17 +142,18 @@ def test_app_workspace_help_message(self): assert help.root_cmd is True assert "Origen CLI: 2." in help.version_str + # FOR_PR assert len(help.opts) == 3 help.assert_help_opt_at(0) - help.assert_vk_opt_at(1) - help.assert_v_opt_at(2) + help.assert_v_opt_at(1) + help.assert_vk_opt_at(2) assert set(help.subcmd_names) == set(self.in_app_cmds.all_names_add_help) print(help.app_cmd_shortcuts) assert help.app_cmd_shortcuts == self.cmd_shortcuts__app - # TODO plugin commands + # FOR_PR plugin commands # assert help.pl_cmd_shortcuts == self.cmd_shortcuts__default_plugins - # TODO Aux commands + # FOR_PR Aux commands # assert help.pl_cmd_shortcuts == { # "plugin_says_hi": ("python_plugin", "plugin_says_hi"), # "echo": ("python_plugin", "echo"), @@ -197,17 +224,16 @@ class TestAppCommandBuilding(CLIShared): def test_app_command_args_and_opts(self): cmd = self.warmup_cmd help = cmd.get_help_msg() - help.assert_num_args(cmd.num_args) - help.assert_num_opts(cmd.num_opts) - help.assert_arg_at(0, cmd.first) - help.assert_arg_at(1, cmd.second) - - help.assert_opt_at(0, cmd.flag_opt) - help.assert_help_opt_at(1) - help.assert_vk_opt_at(2) - help.assert_opt_at(3, cmd.multi_opt) - help.assert_opt_at(4, cmd.single_opt) - help.assert_v_opt_at(5) + help.assert_args(cmd.first, cmd.second) + help.assert_opts( + cmd.flag_opt, + 'h', 'm', + cmd.multi_opt, + 'nt', + cmd.single_opt, + 't', 'v', 'vk' + ) + help.assert_subcmds(None) rv = "req_arg" m0 = "m0" @@ -220,40 +246,33 @@ def test_app_command_args_and_opts(self): out = cmd.run( rv, m0, m12, - "-f", - "-s", sv, - "-m", mo0, mo12, - "--m_opt", mo4, - "--hidden" - ) - assert cmd.first.to_assert_str(rv) in out - assert cmd.second.to_assert_str([m0, m12]) in out - assert cmd.flag_opt.to_assert_str(1) in out - assert cmd.single_opt.to_assert_str(sv) in out - assert cmd.multi_opt.to_assert_str([mo0, mo12, mo4]) in out - assert cmd.hidden_flag_opt.to_assert_str(1) in out - assert cmd.parse_arg_keys(out) == [ - cmd.first.name, - cmd.second.name, - cmd.flag_opt.name, - cmd.single_opt.name, - cmd.multi_opt.name, - cmd.hidden_flag_opt.name, - ] + cmd.flag_opt.sn_to_cli(), + cmd.single_opt.sna_to_cli(), sv, + cmd.multi_opt.sna_to_cli(), mo0, mo12, + cmd.multi_opt.ln_to_cli(), mo4, + cmd.hidden_flag_opt.ln_to_cli(), + ) + cmd.assert_args( + out, + (cmd.first, rv), + (cmd.second, [m0, m12]), + (cmd.flag_opt, 1), + (cmd.single_opt, sv), + (cmd.multi_opt, [mo0, mo12, mo4]), + (cmd.hidden_flag_opt, 1) + ) out = cmd.run( rv, - "-f", "-f", - "-m", mo0, mo12, - ) - assert cmd.first.to_assert_str(rv) in out - assert cmd.flag_opt.to_assert_str(2) in out - assert cmd.multi_opt.to_assert_str([mo0, mo12]) in out - assert cmd.parse_arg_keys(out) == [ - cmd.first.name, - cmd.flag_opt.name, - cmd.multi_opt.name, - ] + cmd.flag_opt.sn_to_cli(), cmd.flag_opt.sn_to_cli(), + cmd.multi_opt.sna_to_cli(), mo0, mo12, + ) + cmd.assert_args( + out, + (cmd.first, rv), + (cmd.flag_opt, 2), + (cmd.multi_opt, [mo0, mo12]) + ) out = cmd.gen_error() assert self.err_msgs.missing_required_arg(cmd.first) in out @@ -334,8 +353,6 @@ class TestExtendingFromAppCommands(CLIShared): help="Flag ext from the app", ), ) - generic_app_ext_action = exts[0] - generic_app_ext_flag = exts[1] core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( exts, with_env=extend_core_cmds_env, @@ -429,9 +446,9 @@ def test_stacking_pl_aux_and_app_ext(self): cmd.core_cmd_exts_generic_core_ext, cmd.generic_app_ext_action, cmd.generic_app_ext_flag, - "help", "vk", "mode", "no_targets", + "help", "mode", "no_targets", cmd.pl_ext_cmds_generic_ext, - "targets", "v" + "targets", "v", 'vk' ) assert help.aux_exts == ['core_cmd_exts'] assert help.pl_exts == ['pl_ext_cmds'] @@ -458,12 +475,13 @@ def test_extending_pl_cmd(self): cmd.flag_opt, cmd.generic_app_ext_action, cmd.generic_app_ext_flag, - "help", "vk", + "help", "m", "nt", cmd.pl_ext_stacking_from_aux_action, cmd.pl_ext_stacking_from_aux_flag, + "t", cmd.test_apps_shared_ext_action, cmd.test_apps_shared_ext_flag, - "v", + "v", 'vk', ) help.assert_subcmds("help", cmd.subc) @@ -499,12 +517,13 @@ def test_extending_pl_subc(self): cmd.flag_opt, cmd.generic_app_ext_action, cmd.generic_app_ext_flag, - "help", "vk", + "help", "m", "nt", cmd.pl_ext_stacking_from_aux_action_subc, cmd.pl_ext_stacking_from_aux_flag_subc, + "t", cmd.test_apps_shared_ext_action, cmd.test_apps_shared_ext_flag, - "v", + "v", 'vk', ) help.assert_subcmds(None) @@ -536,12 +555,12 @@ def test_extending_aux_cmd(self): help.assert_opts( cmd.generic_app_ext_action, cmd.generic_app_ext_flag, - "help", "vk", + "help", "m", "nt", cmd.pl_ext_stacking_from_aux_action, cmd.pl_ext_stacking_from_aux_flag, cmd.python_plugin_action, cmd.python_plugin_flag, - "v", + "t", "v", 'vk', ) help.assert_subcmds("help", cmd.subc) @@ -574,12 +593,12 @@ def test_extending_aux_subc(self): cmd.flag_opt, cmd.generic_app_ext_action, cmd.generic_app_ext_flag, - "help", "vk", + "help", "m", "nt", cmd.pl_ext_stacking_from_aux_action_subc, cmd.pl_ext_stacking_from_aux_flag_subc, cmd.python_plugin_action_subc, cmd.python_plugin_flag_subc, - "v", + "t", "v", 'vk', ) help.assert_subcmds(None) @@ -611,10 +630,9 @@ def test_error_msg_on_missing_implementation(self): help.assert_opts( cmd.app_ext_missing_impl, cmd.flag_opt, - "help", - "vk", + "help", "m", "nt", cmd.opt_taking_value, - "v" + "t", "v", 'vk' ) assert help.aux_exts == None @@ -622,8 +640,12 @@ def test_error_msg_on_missing_implementation(self): assert help.app_exts == True out = cmd.run() + r = origen.app.root.joinpath('example/commands/extensions') assert "Could not find implementation for app extension 'None'" in out - assert re.search("From root .*test_apps/python_app/example/commands/extensions", out) + assert f"From root '{r}', searched:" in out + assert f"plugin.python_plugin.plugin_test_args.py" in out + assert f"plugin{os.sep}python_plugin.plugin_test_args.py" in out + assert f"plugin{os.sep}python_plugin{os.sep}plugin_test_args.py" in out @pytest.mark.skip def error_msg_on_extending_unknown_cmd(self): @@ -641,6 +663,357 @@ def test_error_in_after(self): def test_error_in_cleanup(self): fail +class TestReservedOpts(CLICommon): + cmd = CLIShared.app_sub_cmd( + "reserved_opt_error_gen", + help = "Generate error messages when reserved opts are used", + opts=[ + CmdOpt("conflicting_help", help="Conflicting Opt"), + CmdOpt("conflicting_target", help="Conflicting Opt"), + CmdOpt("non_conflicting", help="Non-Conflicting Opt", ln="non_conflicting", sn="n"), + ], + subcmds=[ + Cmd( + "single_conflicting_opt", + help="Generate error messages for reserved opts", + opts=[ + CmdOpt("non_conflicting", help="Non-Conflicting Opt"), + CmdOpt("conflicting_target", help="Conflicting Opt"), + ], + ), + Cmd( + "multiple_conflicting_opts", + help="Generate error messages for reserved opts", + opts=[ + CmdOpt("conflicting_target", help="Conflicting Opt"), + CmdOpt("conflicting_mode", help="Conflicting Opt"), + CmdOpt("not_conflicting", help="Non-Conflicting Opt", sn='n'), + CmdOpt("conflicting_no_targets", help="Conflicting Opt"), + CmdOpt("conflicting_target_again", help="Conflicting Opt"), + CmdOpt("conflicting_v", help="Conflicting Opt"), + CmdOpt("conflicting_vk", help="Conflicting Opt"), + CmdOpt("conflicting_help", help="Conflicting Opt", ln_aliases=["help_alias"], sn_aliases=["g", "i"]), + ], + subcmds=[ + Cmd( + "subc", + help="Generate error messages for reserved opts - subc", + opts=[ + CmdOpt("conflicting_help", help="Conflicting Opt"), + ], + subcmds=[ + Cmd( + "subc", + help="Generate error messages for reserved opts - subc - subc", + opts=[ + CmdOpt("conflicting_help", help="Conflicting Opt", ln_aliases=["help2", "help3"]), + CmdOpt("conflicting_v", help="Conflicting Opt", sn="c"), + ], + ), + ] + ) + ] + ) + ], + with_env={"ORIGEN_APP_TEST_RESERVED_OPT_ERRORS": "1"}, + ) + + @classmethod + def setup_class(cls): + if not hasattr(cls, "base_cmd_help"): + cls.base_cmd_help = cls.cmd.get_help_msg() + if not hasattr(cls, "ext_cmd_help"): + cls.ext_cmd_help = cls.ext_cmd.get_help_msg() + + @classmethod + def teardown_class(cls): + delattr(cls, "base_cmd_help") + delattr(cls, "ext_cmd_help") + + def test_opts_are_added_with_respect_to_errors(self): + help = self.base_cmd_help + help.assert_args(None) + help.assert_opts( + self.cmd.conflicting_help, + self.cmd.conflicting_target, + "h", "m", + self.cmd.non_conflicting, + "nt", "t", "v", "vk" + ) + help.assert_subcmds("help", self.cmd.multiple_conflicting_opts, self.cmd.single_conflicting_opt) + + cmd = self.cmd.single_conflicting_opt + help = cmd.get_help_msg() + help.assert_opts( + cmd.conflicting_target, + "h", "m", "nt", + cmd.non_conflicting, + "t", "v", "vk" + ) + + cmd = self.cmd.multiple_conflicting_opts + help = cmd.get_help_msg() + help.assert_opts( + cmd.conflicting_help, + cmd.conflicting_mode, + cmd.conflicting_no_targets, + cmd.conflicting_target, + cmd.conflicting_target_again, + cmd.conflicting_v, + cmd.conflicting_vk, + "h", "m", + cmd.not_conflicting, + "nt", "t", "v", "vk" + ) + + cmd = cmd.subc + help = cmd.get_help_msg() + help.assert_opts( + cmd.conflicting_help, + "h", "m", "nt", "t", "v", "vk" + ) + + cmd = cmd.subc + help = cmd.get_help_msg() + help.assert_opts( + cmd.conflicting_v, + cmd.conflicting_help, + "h", "m", "nt", "t", "v", "vk" + ) + + errors = [ + (cmd, cmd.conflicting_help, [("sn", "h")]), + (cmd, cmd.conflicting_target, [("sn", "t"), ("ln", "target")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_help, [("ln", "help"), ("sn", "h")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_vk, [("lna", "verbosity_keywords"), ("ln", "vk")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_v, [("ln", "verbosity"), ("sn", "v")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_no_targets, [("lna", "no_targets"), ("lna", "no_target")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_target_again, [("lna", "targets"), ("ln", "target"), ("sn", "t")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_mode, [("lna", "mode")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_target, [("sn", "t")]), + (cmd.multiple_conflicting_opts.subc, cmd.multiple_conflicting_opts.subc.conflicting_help, [("sn", "h")]), + (cmd.multiple_conflicting_opts.subc.subc, cmd.multiple_conflicting_opts.subc.subc.conflicting_v, [("sna", "v"), ("ln", "verbosity")]), + (cmd.multiple_conflicting_opts.subc.subc, cmd.multiple_conflicting_opts.subc.subc.conflicting_help, [("lna", "help")]), + (cmd.single_conflicting_opt, cmd.single_conflicting_opt.conflicting_target, [("ln", "target")]), + ] + @pytest.mark.parametrize( + "cmd,opt,type,name", + [(o[0], o[1], inner[0], inner[1]) for o in errors for inner in o[2]], + ids=[f"{o[0].name}-{o[1].name}-{inner[0]}-{inner[1]}" for o in errors for inner in o[2]], + ) + def test_error_msg_using_reserved_opts(self, cmd, opt, type, name): + if type == "sn": + assert cmd.reserved_opt_sn_conflict_msg(opt, name) in self.base_cmd_help.text + elif type == "sna": + assert cmd.reserved_opt_sna_conflict_msg(opt, name) in self.base_cmd_help.text + elif type == "ln": + assert cmd.reserved_opt_ln_conflict_msg(opt, name) in self.base_cmd_help.text + elif type == "lna": + assert cmd.reserved_opt_lna_conflict_msg(opt, name) in self.base_cmd_help.text + else: + raise RuntimeError(f"Unknown type {type}") + + def test_opts_are_still_available_under_non_reserved_names(self): + cmd = self.cmd + out = cmd.run("--conflicting_help", "--conflicting_target", "--non_conflicting", "-n") + cmd.assert_args( + out, + (cmd.conflicting_help, 1), + (cmd.conflicting_target, 1), + (cmd.non_conflicting, 2) + ) + + cmd = self.cmd.single_conflicting_opt + out = cmd.run("--non_conflicting", "--conflicting_target") + cmd.assert_args( + out, + (cmd.conflicting_target, 1), + (cmd.non_conflicting, 1) + ) + + cmd = self.cmd.multiple_conflicting_opts + out = cmd.run( + "--conflicting_target", + "--conflicting_mode", + "-n", + "--conflicting_no_targets", + "--conflicting_target_again", + "--conflicting_v", + "--conflicting_vk", + "--conflicting_help", "-g", "-i", "--help_alias", + ) + cmd.assert_args( + out, + (cmd.conflicting_target, 1), + (cmd.conflicting_mode, 1), + (cmd.not_conflicting, 1), + (cmd.conflicting_no_targets, 1), + (cmd.conflicting_target_again, 1), + (cmd.conflicting_v, 1), + (cmd.conflicting_vk, 1), + (cmd.conflicting_help, 4), + ) + + cmd = cmd.subc + out = cmd.run("--conflicting_help") + cmd.assert_args(out, (cmd.conflicting_help, 1)) + + cmd = cmd.subc + out = cmd.run( + "--conflicting_help", "--help2", "--help3", + "-c", + ) + cmd.assert_args( + out, + (cmd.conflicting_help, 3), + (cmd.conflicting_v, 1) + ) + + ext_error_msgs_env = {"ORIGEN_APP_EXT_TEST_RESERVED_OPT_ERRORS": "1", "origen_bypass_config_lookup": "1"} + ext_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( + CmdExtOpt.from_src( + "example", + SrcTypes.APP, + CmdExtOpt( + "conflicting_target", + help="Conflicting Core Extension" + ), + CmdExtOpt( + "conflicting_no_target", + help="Conflicting Core Extension", + sn="n", + ), + CmdExtOpt( + "conflicting_mode", + help="Conflicting Core Extension", + ln="mode_conflict", + sn_aliases=["m"] + ), + CmdExtOpt( + "conflicting_help", + help="Conflicting Core Extension", + ln="help_conflict", + ln_aliases=["help1"] + ), + CmdExtOpt( + "conflicting_v", + help="Conflicting Core Extension", + sn_aliases=["w"] + ), + CmdExtOpt( + "conflicting_vk", + help="Conflicting Core Extension" + ), + ), + with_env=ext_error_msgs_env, + from_configs=CLIShared.configs.suppress_plugin_collecting_config, + ) + + def test_ext_opts_are_added_with_respect_to_errors(self): + cmd = self.ext_cmd + help = self.ext_cmd_help + help.assert_args(cmd.code) + help.assert_opts( + cmd.conflicting_target, + cmd.conflicting_v, + cmd.conflicting_vk, + "h", + cmd.conflicting_help, + "m", + cmd.conflicting_mode, + cmd.conflicting_no_target, + "nt", "t", "v", "vk" + ) + help.assert_subcmds(None) + + ext_errors = [ + (ext_cmd, ext_cmd.conflicting_target, [("ln", "target"), ("sn", "t")]), + (ext_cmd, ext_cmd.conflicting_no_target, [("lna", "no_target"), ("lna", "no_targets")]), + (ext_cmd, ext_cmd.conflicting_help, [("sn", "h"), ("lna", "help")]), + (ext_cmd, ext_cmd.conflicting_mode, [("lna", "mode")]), + (ext_cmd, ext_cmd.conflicting_v, [("ln", "verbosity"), ("sn", "v")]), + (ext_cmd, ext_cmd.conflicting_vk, [("lna", "verbosity_keywords"), ("lna", "vk")]), + ] + @pytest.mark.parametrize( + "cmd,opt,type,name", + [(o[0], o[1], inner[0], inner[1]) for o in ext_errors for inner in o[2]], + ids=[f"{o[0].name}-{o[1].name}-{inner[0]}-{inner[1]}" for o in ext_errors for inner in o[2]], + ) + def test_ext_error_msg_using_reserved_opts(self, cmd, opt, type, name): + if type == "sn": + assert cmd.reserved_opt_sn_conflict_msg(opt, name) in self.ext_cmd_help.text + elif type == "sna": + assert cmd.reserved_opt_sna_conflict_msg(opt, name) in self.ext_cmd_help.text + elif type == "ln": + assert cmd.reserved_opt_ln_conflict_msg(opt, name) in self.ext_cmd_help.text + elif type == "lna": + assert cmd.reserved_opt_lna_conflict_msg(opt, name) in self.ext_cmd_help.text + else: + raise RuntimeError(f"Unknown type {type}") + + def test_ext_opts_are_still_available_under_non_reserved_names(self): + cmd = self.ext_cmd + out = cmd.run( + "from test_apps_shared_test_helpers.aux_cmds import run; run()", + "--conflicting_target", + "-n", + "--mode_conflict", "-m", + "--help_conflict", "--help1", + "--conflicting_v", "-w", + "--conflicting_vk", + ) + self.Cmd.assert_args( + cmd, + out, + (cmd.conflicting_target, 1), + (cmd.conflicting_no_target, 1), + (cmd.conflicting_mode, 2), + (cmd.conflicting_help, 2), + (cmd.conflicting_v, 2), + (cmd.conflicting_vk, 1), + ) + +# from tests.proc_funcs import target_proc_funcs +# from origen.helpers.env import in_new_origen_proc + +@pytest.mark.skip +class TestTarget(CLICommon): + def test_loading_targets_set_by_app(self): + retn = in_new_origen_proc(mod=target_proc_funcs) + assert retn['target_pre_load'] == None + assert retn['tester_pre_load'] == [] + assert retn['dut_pre_load'] == None + assert retn['first_load_done_pre_load'] == False + assert retn['target_post_load'] == [self.targets.falcon] + assert retn['tester_post_load'] == [self.targets.uflex] + assert retn['dut_post_load'] == [self.targets.eagle] + assert retn['first_load_done_post_load'] == True + + def test_getting_the_current_target(self): + fail + +@pytest.mark.skip +class TestTargetOpts(CLICommon): + def test_target_can_be_set(self): + targets = self.show_per_cmd_targets(targets=self.targets.eagle) + assert targets == [self.targets.eagle] + + targets = self.show_per_cmd_targets(targets=[self.targets.hawk, self.targets.uflex]) + assert targets == [self.targets.hawk, self.targets.uflex] + + def test_no_target_can_be_used_per_command(self): + targets = self.show_per_cmd_targets() + assert len(targets) != 0 + + targets = self.show_per_cmd_targets(targets=False) + assert len(targets) == 0 + +@pytest.mark.skip +class TestModeOpts(): + def test_(): + fail + + class DisablingAppOpts(): @pytest.mark.skip def test_app_opts_are_added_by_default(self): @@ -651,9 +1024,9 @@ def test_app_opts_are_added_by_default(self): cmd.app_ext_missing_impl, cmd.flag_opt, "help", - "vk", cmd.opt_taking_value, - "v" + "v", + 'vk' ) @pytest.mark.skip @@ -691,19 +1064,6 @@ def test_disabling_app_opts(self): def test_disabling_app_opts_individually(self): fail - -from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg - -class CLICommon(CLIShared): - _no_config_run_opts = { - "with_configs": CLIShared.configs.suppress_plugin_collecting_config, - "bypass_config_lookup": True - } - - @pytest.fixture - def no_config_run_opts(self): - return self._no_config_run_opts - class TestEval(CLICommon): _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.eval @@ -718,6 +1078,11 @@ def test_basic_eval(self, cmd, no_config_run_opts): out = d.run(run_opts=no_config_run_opts) d.assert_present(out) +@pytest.mark.skip +class TestTargetCmd(CLICommon): + def test_fail(): + fail + class TestInteractive(CLICommon): _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.i diff --git a/test_apps/python_no_app/tests/cli/__init__.py b/test_apps/python_no_app/tests/cli/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/test_apps/python_no_app/tests/cli/tests__global_cmds.py b/test_apps/python_no_app/tests/cli/tests__global_cmds.py index bb631072..7a56498f 100644 --- a/test_apps/python_no_app/tests/cli/tests__global_cmds.py +++ b/test_apps/python_no_app/tests/cli/tests__global_cmds.py @@ -15,11 +15,8 @@ def test_global_help_message_core_commands(self): help = CmdTestersCommon.HelpMsg(out) assert help.root_cmd is True assert "Origen: 2." in help.version_str + help.assert_bare_opts() - assert len(help.opts) == 3 - help.assert_help_opt_at(0) - help.assert_vk_opt_at(1) - help.assert_v_opt_at(2) # TODO check order? assert set(s["name"] for s in help.subcmds) == set(self.global_cmds.all_names_add_help) @@ -44,4 +41,6 @@ def test_global_help_message_core_commands(self): def test_core_commands_are_available(self, cmd): ''' Just testing that "-h" doesn't crash for all core commands ''' help = cmd.get_help_msg() - assert len(help.opts) >= 3 \ No newline at end of file + assert len(help.opts) >= 3 + # FOR_PR + # help.assert_bare_opts_present() \ No newline at end of file diff --git a/test_apps/python_no_app/tests/cmd_building/__init__.py b/test_apps/python_no_app/tests/cmd_building/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/__init__.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py index f933f62b..d05c53d7 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py @@ -111,13 +111,13 @@ def test_missing_aux_cmd_impl_dir(self): assert "Could not find implementation for aux command 'error_cases.missing_impl_dir.missing_impl_dir_subc'" in out assert f"From root '{self.cmd_testers_root}', searched:" in out assert "error_cases.missing_impl_dir.missing_impl_dir_subc.py" in out - assert "error_cases/missing_impl_dir.missing_impl_dir_subc.py" in out + assert f"error_cases{os.sep}missing_impl_dir.missing_impl_dir_subc.py" in out def test_missing_aux_cmd_impl_file(self): out = self.cmd_testers.error_cases.gen_error("missing_impl_file", return_stdout=True) assert "Could not find implementation for aux command 'error_cases.missing_impl_file'" in out assert "error_cases.missing_impl_file.py" in out - assert "error_cases/missing_impl_file.py" in out + assert f"error_cases{os.sep}missing_impl_file.py" in out def test_missing_run_function(self): out = self.cmd_testers.error_cases.gen_error("test_missing_run_function", return_stdout=True) diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py index a138e6de..198b4587 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py @@ -51,24 +51,19 @@ def echo_msg(cls, *input): def test_help_msg(self, root_cmd): help = root_cmd.get_help_msg() - print(help.opts) - assert len(help.opts) == 3 - help.assert_help_opt_at(0) - help.assert_vk_opt_at(1) - help.assert_v_opt_at(2) + help.assert_bare_opts() help.assert_args(None) help.assert_subcmds(*self.python_plugin.ordered_subcmds) def test_hi_help_cmd(self, hi_cmd): help = hi_cmd.get_help_msg() - assert len(help.opts) == 6 - help.assert_help_opt_at(0) - help.assert_vk_opt_at(1) - help.assert_opt_at(2, hi_cmd.loudly) - help.assert_opt_at(3, hi_cmd.times) - help.assert_opt_at(4, hi_cmd.to) - help.assert_v_opt_at(5) + help.assert_opts( + "h", + hi_cmd.loudly, hi_cmd.to, + "v", "vk", + hi_cmd.times, + ) def test_py_plugin_says_hi(self, hi_cmd): out = hi_cmd.run() @@ -89,7 +84,6 @@ def test_py_plugin_says_hi_loudy_to(self, hi_cmd): def test_py_plugin_echo(self, echo_cmd): s = "hello" out = echo_cmd.run(s) - print(out) assert out.count(self.echo_msg(s)) == 1 def test_py_plugin_echo_multi(self, echo_cmd): @@ -104,7 +98,6 @@ def test_py_plugin_echo_multi(self, echo_cmd): def test_py_plugin_echo_delimited(self, echo_cmd): s = ["hello", "there", "delimited"] out = echo_cmd.run(','.join(s), "--repeat") - print(out) assert out.count(self.echo_msg(*s)) == 2 @pytest.mark.skip @@ -119,5 +112,5 @@ def root_cmd(self): def test_no_cmds_present_only_has_help_subcmd(self, root_cmd): help = root_cmd.get_help_msg() help.assert_args(None) - assert len(help.opts) == 3 + help.assert_bare_opts() help.assert_subcmds(None) diff --git a/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py b/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py index 81280597..df26f1c9 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__opt_building.py @@ -27,7 +27,7 @@ def iv(self): def test_help_msg(self, cmd, e_opt, i_opt): help = cmd.get_help_msg() - help.assert_opts(e_opt, "help", i_opt, "vk", "v") + help.assert_opts(e_opt, "help", i_opt, "v", "vk") def test_expl_sv_opt(self, cmd, e_opt, ev): out = cmd.run(e_opt.ln_to_cli(), ev) @@ -71,7 +71,7 @@ def rv(self): def test_help_msg(self, cmd, o_opt, r_opt): help = cmd.get_help_msg() - help.assert_opts("help", "vk", o_opt, r_opt, "v") + help.assert_opts("help", o_opt, r_opt, "v", "vk") def test_req_opt_given(self, cmd, r_opt, rv): out = cmd.run(r_opt.ln_to_cli(), rv) @@ -154,7 +154,7 @@ def d_im_m_opt_v_dlim(self): def test_help_msg(self, cmd, m_opt, im_m_opt, req_m_opt, d_m_opt, d_im_m_opt): help = cmd.get_help_msg() - help.assert_opts(d_im_m_opt, d_m_opt, "help", im_m_opt, "vk", m_opt, req_m_opt, "v") + help.assert_opts(d_im_m_opt, d_m_opt, "help", im_m_opt, m_opt, req_m_opt, "v", "vk") def test_all_multi_val_opts_given(self, cmd, m_opt, im_m_opt, req_m_opt, d_m_opt, d_im_m_opt, @@ -227,7 +227,7 @@ def i_opt(self, cmd): def test_help_msg(self, cmd, e_opt, i_opt): help = cmd.get_help_msg() - help.assert_opts(e_opt, "help", i_opt, "vk", "v") + help.assert_opts(e_opt, "help", i_opt, "v", "vk") def test_no_flag_opts_given(self, cmd): out = cmd.run() @@ -289,7 +289,7 @@ def mv(self): def test_help_msg(self, cmd, e_s_opt, i_s_opt, m_opt, ln_s_opt): help = cmd.get_help_msg() - help.assert_opts("help", "vk", m_opt, ln_s_opt, e_s_opt, i_s_opt, "v") + help.assert_opts("help", m_opt, ln_s_opt, e_s_opt, i_s_opt, "v", "vk") def test_single_value_opt_with_value_name(self, cmd, e_s_opt, i_s_opt, sv_e, sv_i): out = cmd.run(i_s_opt.ln_to_cli(), sv_i, e_s_opt.ln_to_cli(), sv_e) @@ -370,12 +370,12 @@ def test_help_msg(self, cmd, f_sn_al_opt, f_ln_sn_al_opt, "help", - "vk", f_ln_opt, m_opt, oc_opt, s_opt, - "v" + "v", + "vk" ) def test_single_val_opt_as_long_name(self, cmd, s_opt, tv): @@ -516,7 +516,7 @@ def v_opt(self, cmd): def test_help_msg(self, cmd, v_opt): help = cmd.get_help_msg() help.assert_args(None) - help.assert_opts("help", "vk", "v", v_opt) + help.assert_opts("help", "v", "vk", v_opt) def test_hidden_opt_is_available(self, cmd, h_opt): out = cmd.run(h_opt.ln_to_cli()) diff --git a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py index f9ea9a06..a4685b87 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py @@ -27,13 +27,11 @@ def test_empty_verbosity_keywords_are_accessible(self): assert "keywords: []" in out def test_verbosity_keywords_are_accessible(self): - out = self.cmd_testers.display_v.run("-k", "t1", "t2", "-v") + out = self.cmd_testers.display_v.run("--vk", "t1", "t2", "-v") assert r'Args: {}' in out assert "keywords: ['t1', 't2']" in out assert "verbosity: 1" in out def test_verbosity_help(self): help = self.cmd_testers.display_v.get_help_msg() - help.assert_help_opt_at(0) - help.assert_vk_opt_at(1) - help.assert_v_opt_at(2) + help.assert_bare_opts() diff --git a/test_apps/python_no_app/tests/misc_test.py b/test_apps/python_no_app/tests/misc_test.py index 535ceaa6..fcc9e190 100644 --- a/test_apps/python_no_app/tests/misc_test.py +++ b/test_apps/python_no_app/tests/misc_test.py @@ -94,12 +94,12 @@ def test_help_msg(self): self.ext_flag, self.f_opt, "help", - "vk", self.ext_ma, self.ext_ma_delim, self.sv_opt, self.ext_sa, "v", + "vk", ) help.assert_subcmds("help", self.cmd.subc) @@ -273,8 +273,8 @@ def test_subc_help_msg(self): subc.exts_workout_action, subc.flag_opt, "help", - "vk", "v", + "vk", ) help.assert_subcmds(None) @@ -312,12 +312,12 @@ def test_ext_stacking_help_msg(self): cmd.ext_action, cmd.flag_opt, "help", - "vk", cmd.pl_ext_stacking_from_aux_action, cmd.pl_ext_stacking_from_aux_flag, cmd.pl_the_2nd_ext_action, cmd.pl_the_2nd_ext_flag, "v", + "vk", ) help.assert_subcmds("help", self.subc) @@ -377,12 +377,12 @@ def test_subc_ext_stacking_help_msg(self): subc.ext_action_subc, subc.flag_opt, "help", - "vk", subc.pl_ext_stacking_from_aux_action_subc, subc.pl_ext_stacking_from_aux_flag_subc, subc.pl_the_2nd_ext_action_subc, subc.pl_the_2nd_ext_flag_subc, "v", + "vk", ) help.assert_subcmds(None) @@ -439,7 +439,6 @@ def test_extending_aux_cmd_help_msg(self): cmd.exts_workout_action, cmd.exts_workout_flag, "help", - "vk", cmd.pl_ext_stacking_from_aux_action, cmd.pl_ext_stacking_from_aux_flag, cmd.python_plugin_action, @@ -447,6 +446,7 @@ def test_extending_aux_cmd_help_msg(self): cmd.python_plugin_the_second_action, cmd.python_plugin_the_second_flag, "v", + "vk", ) help.assert_subcmds("help", cmd.subc) @@ -503,7 +503,6 @@ def test_extending_aux_cmd_help_msg_subc(self): cmd.exts_workout_flag_subc, cmd.flag_opt, "help", - "vk", cmd.pl_ext_stacking_from_aux_action_subc, cmd.pl_ext_stacking_from_aux_flag_subc, cmd.python_plugin_action_subc, @@ -511,6 +510,7 @@ def test_extending_aux_cmd_help_msg_subc(self): cmd.python_plugin_the_second_action_subc, cmd.python_plugin_the_second_flag_subc, "v", + "vk", ) help.assert_subcmds(None) @@ -590,9 +590,9 @@ def test_extending_origen_cmd_from_plugin(self): help.assert_opts( cmd.core_cmd_exts_generic_core_ext, "help", - "vk", cmd.pl_ext_cmds_generic_ext, "v", + "vk", ) help.assert_subcmds(None) assert help.aux_exts == ['core_cmd_exts'] diff --git a/test_apps/python_plugin/python_plugin/commands.toml b/test_apps/python_plugin/python_plugin/commands.toml index 2dac29c3..ca0144fd 100644 --- a/test_apps/python_plugin/python_plugin/commands.toml +++ b/test_apps/python_plugin/python_plugin/commands.toml @@ -5,7 +5,7 @@ [[command.opt]] name = "times" takes_value = true - short = "t" + short = "x" long = "times" help = "Number of times for the python plugin to say" value_name = "TIMES" @@ -159,9 +159,10 @@ help = "Echos the input" name = "say_hi_during_cleanup" help = "Have the plugin say hi during cleanup" -[[extension]] - # Extend an application's 'playground' commmand - extend = "app.playground" +# FOR_PR +# [[extension]] +# # Extend an application's 'playground' commmand +# extend = "app.playground" [[extension]] extend = "aux.dummy_cmds.dummy_cmd" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py index 71459ce3..c00da4ab 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py @@ -69,9 +69,9 @@ def assert_args(self, output, *vals): print(f"expecting: {e}") assert e in output - actual = self.parse_arg_keys(output) + actual = Cmd.parse_arg_keys(output) assert len(actual) == len(args) - actual = self.parse_ext_keys(output) + actual = Cmd.parse_ext_keys(output) print(actual) print(ext_args) assert actual == ext_args @@ -106,7 +106,7 @@ def to_assert_str(self, vals, **opts): return f"Arg: (CMD): {self.name} ({c}): {vals}" def assert_present(self, vals, in_str, **opts): - for e in self.to_assert_str(vals, **opts): + for e in CmdArgOpt.to_assert_str(self, vals, **opts): assert e in in_str class CmdArg(cli.cmd.CmdArg, CmdArgOpt): diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py index 67ed5513..027f1e91 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py @@ -39,7 +39,7 @@ def __init__(self): help="Number of times for the python plugin to say", value_name="TIMES", ln="times", - sn="t" + sn="x" ), CmdOpt( name="loudly", From cb957aee867eb07665f12a9b617a7641438adc07 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 12 Feb 2023 20:27:49 -0600 Subject: [PATCH 018/200] use target command as guinea pig for a non-frontend command. Add structure to make adding these easier. Add tests for target command. --- python/origen/origen/__init__.py | 7 +- python/origen/origen/helpers/env.py | 7 +- .../helpers/regressions/cli/__init__.py | 10 +- .../origen/helpers/regressions/cli/command.py | 11 +- .../helpers/regressions/cli/help_msg.py | 15 +- .../origen/helpers/regressions/cli/origen.py | 76 +- python/origen/origen/target.py | 2 + rust/origen/cli/src/bin.rs | 131 +- rust/origen/cli/src/commands/_prelude/mod.rs | 7 +- rust/origen/cli/src/commands/app.rs | 8 +- rust/origen/cli/src/commands/aux_cmds.rs | 4 +- rust/origen/cli/src/commands/interactive.rs | 2 +- rust/origen/cli/src/commands/mod.rs | 7 + rust/origen/cli/src/commands/target.rs | 124 +- rust/origen/cli/src/framework/app_cmds.rs | 2 +- rust/origen/cli/src/framework/aux_cmds.rs | 6 +- rust/origen/cli/src/framework/core_cmds.rs | 53 +- rust/origen/cli/src/framework/extensions.rs | 4 +- rust/origen/src/core/application/config.rs | 134 ++- rust/origen/src/core/application/target.rs | 154 ++- rust/pyapi/src/lib.rs | 4 +- test_apps/python_app/targets/readme.md | 1 + .../python_app/tests/cli/core_cmds/target.py | 309 +++++ test_apps/python_app/tests/cli/shared.py | 26 + .../tests/cli/tests__app_cmd_building.py | 180 +++ .../tests/cli/tests__cmd_exts_from_app.py | 329 +++++ .../python_app/tests/cli/tests__core_cmds.py | 109 ++ .../tests/cli/tests__reserved_opts.py | 313 +++++ test_apps/python_app/tests/cli_test.py | 1060 +---------------- .../configs/target/bad_default_targets.toml | 1 + .../configs/target/empty_default_targets.toml | 1 + test_apps/python_app/tests/configs_test.py | 49 + test_apps/python_app/tests/conftest.py | 1 + .../tests/proc_funcs/target_proc_funcs.py | 96 ++ test_apps/python_app/tests/shared/__init__.py | 105 ++ test_apps/python_app/tests/target_test.py | 106 ++ .../tests/cli/tests__cmd__credentials.py | 4 + .../tests/cli/tests__cmd__eval.py | 2 +- 38 files changed, 2139 insertions(+), 1321 deletions(-) create mode 100644 test_apps/python_app/targets/readme.md create mode 100644 test_apps/python_app/tests/cli/core_cmds/target.py create mode 100644 test_apps/python_app/tests/cli/shared.py create mode 100644 test_apps/python_app/tests/cli/tests__app_cmd_building.py create mode 100644 test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py create mode 100644 test_apps/python_app/tests/cli/tests__core_cmds.py create mode 100644 test_apps/python_app/tests/cli/tests__reserved_opts.py create mode 100644 test_apps/python_app/tests/configs/target/bad_default_targets.toml create mode 100644 test_apps/python_app/tests/configs/target/empty_default_targets.toml create mode 100644 test_apps/python_app/tests/configs_test.py create mode 100644 test_apps/python_app/tests/proc_funcs/target_proc_funcs.py create mode 100644 test_apps/python_app/tests/target_test.py diff --git a/python/origen/origen/__init__.py b/python/origen/origen/__init__.py index 06d835cc..5ba00177 100644 --- a/python/origen/origen/__init__.py +++ b/python/origen/origen/__init__.py @@ -75,6 +75,7 @@ def __getattr__(name: str): from origen.producer import Producer import origen.target +targets = origen.target config = _origen.config() ''' Dictionary of configurable workspace settings. @@ -261,7 +262,11 @@ def __getattr__(name: str): sys.path.insert(0, status["root"]) a = importlib.import_module(f'{_origen.app_config()["name"]}.application') app = a.Application() - + in_app_context = True + in_global_context = False +else: + in_app_context = False + in_global_context = True def set_mode(val: str) -> None: """ Sets the current mode """ diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index b9d10ef2..17071271 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -3,13 +3,13 @@ from origen_metal._helpers import in_new_proc from origen import running_on_windows -def in_new_origen_proc(func=None, mod=None, *, func_kwargs=None, with_configs=None, bypass_config_lookup=False): +def in_new_origen_proc(func=None, mod=None, *, func_kwargs=None, with_configs=None, expect_fail=None, bypass_config_lookup=False): if isinstance(with_configs, str) or isinstance(with_configs, pathlib.Path): with_configs=[with_configs] if func is None: func = getattr(mod, inspect.stack()[1].function) - return in_new_proc(func, mod, func_kwargs=func_kwargs) + return in_new_proc(func, mod, func_kwargs=func_kwargs, expect_fail=expect_fail) # TODO support options def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=False, input=None, expect_fail=False, return_details=False, shell=None, targets=None): @@ -53,9 +53,6 @@ def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=F print(result.stderr) if return_details: return { - # FOR_PR take these out - # "stderr": result.stderr.decode("utf-8"), - # "stdout": result.stdout.decode("utf-8"), "stderr": result.stderr, "stdout": result.stdout, "returncode": result.returncode diff --git a/python/origen/origen/helpers/regressions/cli/__init__.py b/python/origen/origen/helpers/regressions/cli/__init__.py index 7abd5f22..ed40f1e0 100644 --- a/python/origen/origen/helpers/regressions/cli/__init__.py +++ b/python/origen/origen/helpers/regressions/cli/__init__.py @@ -3,6 +3,7 @@ from .command import Cmd, CmdArg, CmdOpt from .help_msg import HelpMsg from .origen import _CommonNames, GlobalCommands, InAppCommands, CoreOpts, CoreErrorMessages +from .... import origen as o cmd = command @@ -55,12 +56,17 @@ def app_sub_cmd(cls, *args, cmd_path=None, **kwargs): @classmethod def eval(cls, *code, **kwargs): - from .... import origen - if origen.app: + if o.app: cmd = InAppCommands.eval else: cmd = GlobalCommands.eval return cmd.run(*code, **kwargs) + if o.in_app_context: + cmds = in_app_cmds + else: + cmds = global_cmds + + error_messages = CoreErrorMessages() err_msgs = error_messages diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py index a7ddaace..ba9260d2 100644 --- a/python/origen/origen/helpers/regressions/cli/command.py +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -65,6 +65,12 @@ def sn_to_cli(self): def sna_to_cli(self, a=0): return f"-{self.sn_aliases[a]}" + def to_cli(self): + if self.sn: + return self.sn_to_cli() + else: + return self.ln_to_cli() + class SrcTypes(enum.Enum): CORE = enum.auto() APP = enum.auto() @@ -217,9 +223,10 @@ def get_help_msg(self, with_configs=None, bypass_config_lookup=None, run_opts=No return HelpMsg(self.get_help_msg_str(with_configs=with_configs, run_opts=run_opts)) def run(self, *args, with_env=None, with_configs=None, expect_fail=False, run_opts=None): - run_opts = run_opts or {} + run_opts = dict(run_opts) if run_opts else {} + a = list(args) return run_cli_cmd( - [*self.cmd_path, *([self.name] if self.name else []), *args], + [*self.cmd_path, *([self.name] if self.name else []), *[(a.to_cli() if isinstance(a, CmdOpt) else a) for a in args]], with_env=run_opts.pop("with_env", None) or with_env or self.with_env, with_configs=run_opts.pop("with_configs", None) or self._with_configs_(with_configs), expect_fail=run_opts.pop("expect_fail", None) or expect_fail, diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index 4afe420e..6fb7aa8c 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -279,6 +279,8 @@ def assert_arg_at(self, expected_index, arg): def assert_args(self, *expected): if expected == (None,): expected = [] + elif len(expected) == 1 and isinstance(expected[0], dict): + expected = list(expected[0].values()) self.assert_num_args(len(expected)) for i, a in enumerate(expected): self.assert_arg_at(i, a) @@ -363,12 +365,21 @@ def assert_subcmd_at(self, expected_index, subc): assert s['aliases'] == subc.aliases return True - def assert_subcmds(self, *expected_subcmds): + def assert_subcmds(self, *expected_subcmds, help=None): if expected_subcmds == (None,): expected_subcmds = [] + elif len(expected_subcmds) == 1 and isinstance(expected_subcmds[0], dict): + expected_subcmds = expected_subcmds[0].values() + expected_subcmds = list(expected_subcmds) + if help is not None: + expected_subcmds.insert(help, "h") assert len(expected_subcmds) == len(self.subcmds) for i, o in enumerate(expected_subcmds): - if isinstance(o, str): + if help is not None and help == i: + self.assert_help_subcmd_at(i) + elif isinstance(o, tuple): + self.assert_subcmd_at(i, o[1]) + elif isinstance(o, str): if o == "help": self.assert_help_subcmd_at(i) else: diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 0ecd2046..106bbe4f 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -14,6 +14,7 @@ class _CommonNames: eval = "eval" fmt = "fmt" i = "interactive" + v = "-v" @classmethod def eval_cmd(cls, add_opts=None): @@ -61,6 +62,10 @@ def interactive_cmd(cls, add_opts=None): aliases=['i'], ) + @classmethod + def v_cmd(cls): + return Cmd(cls.v) + # Use this to mimic: # @classmethod # @property @@ -112,6 +117,7 @@ class Names: i = _CommonNames.interactive_cmd() fmt = Cmd(names.fmt) build = Cmd(names.build) + v = _CommonNames.v_cmd() commands = [ proj, new, creds, eval, i, @@ -183,6 +189,28 @@ class Names: web = "web" names = Names() + class _TargetCmd_: + @classmethod + def full_path_opt(cls): + return CmdOpt( + "full_paths", + "Display targets' full paths", + ln="full-paths", + sn="f", + ln_aliases=["full_paths"] + ) + + @classmethod + def targets_arg(cls, help): + return CmdArg( + "targets", + help=help, + multi=True, + required=True, + # FOR_PR + # use_delimiter=True + ) + app = Cmd(names.app, subcmds=[Cmd("commands")]) aux_cmds = Cmd(names.aux_cmds) build = Cmd(names.build) @@ -200,8 +228,54 @@ class Names: pl = Cmd(names.pl) pls = Cmd(names.pls) save_ref = Cmd(names.save_ref) - target = Cmd(names.target) + target = Cmd( + names.target, + help="Set/view the default target", + opts=[_TargetCmd_.full_path_opt()], + subcmds=[ + Cmd( + "add", + help="Activates the given target(s)", + args=[_TargetCmd_.targets_arg("Targets to be activated")], + opts=[_TargetCmd_.full_path_opt()], + aliases=["a"], + ), + Cmd( + "clear", + help="Deactivates any and all current targets", + aliases=["c"], + ), + Cmd( + "default", + help="Activates the default target(s) while deactivating all others", + opts=[_TargetCmd_.full_path_opt()], + aliases=["d"], + ), + Cmd( + "remove", + help="Deactivates the given target(s)", + args=[_TargetCmd_.targets_arg("Targets to be deactivated")], + opts=[_TargetCmd_.full_path_opt()], + aliases=["r"], + ), + Cmd( + "set", + help="Activates the given target(s) while deactivating all others", + args=[_TargetCmd_.targets_arg("Targets to be set")], + opts=[_TargetCmd_.full_path_opt()], + aliases=["s"], + ), + Cmd( + "view", + help="Views the currently activated target(s)", + opts=[_TargetCmd_.full_path_opt()], + aliases=["v"], + ), + ], + aliases=["w"], + ) web = Cmd(names.web) + v = _CommonNames.v_cmd() commands = [ app, aux_cmds, build, compile, creds, env, eval, exec, fmt, generate, i, mailer, mode, new, pl, pls, save_ref, target, web diff --git a/python/origen/origen/target.py b/python/origen/origen/target.py index 370246e0..b5eb124b 100644 --- a/python/origen/origen/target.py +++ b/python/origen/origen/target.py @@ -23,6 +23,8 @@ def setup(targets=None): return None if isinstance(targets, str): targets = [targets] + elif not isinstance(targets, list): + targets = list(targets) setup_pending = True current_targets = targets diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index 6605b8c1..ea286b4b 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -112,11 +112,6 @@ fn main() -> Result<()> { true => format!("Origen CLI: {}", STATUS.origen_version.to_string()), false => format!("Origen: {}", STATUS.origen_version.to_string()), }; - if STATUS.app.is_some() { - origen::core::application::config::Config::check_defaults( - &STATUS.app.as_ref().unwrap().root, - ); - } // The main help message is going to be automatically generated to allow us to handle and clearly // separate commands added by the app and plugins. @@ -341,6 +336,7 @@ fn main() -> Result<()> { if STATUS.is_app_present { commands::app::add_helps(&mut helps, app_cmds.as_ref().unwrap()); + commands::target::add_helps(&mut helps); } helps.apply_exts(&extensions); @@ -566,109 +562,7 @@ Examples: ), ); - /************************************************************************************/ - let t_help = "Set/view the default target"; - origen_commands.push(CommandHelp { - name: "target".to_string(), - help: t_help.to_string(), - shortcut: Some("t".to_string()), - }); - app = app.subcommand( - Command::new("target") - .about(t_help) - .visible_alias("t") - .arg( - Arg::new("full-paths") - .long("full-paths") - .short('f') - .help("Display targets' full paths") - .action(SetArgTrue), - ) - .subcommand( - Command::new("add") - .about("Activates the given target(s)") - .visible_alias("a") - .arg( - Arg::new("targets") - .help("Targets to be activated") - .action(AppendArgs) - .value_name("TARGETS") - .multiple(true) - .required(true), - ) - .arg( - Arg::new("full-paths") - .long("full-paths") - .short('f') - .help("Display targets' full paths") - .action(SetArgTrue), - ), - ) - .subcommand( - Command::new("remove") - .about("Deactivates the given target(s)") - .visible_alias("r") - .arg( - Arg::new("targets") - .help("Targets to be deactivated") - .action(AppendArgs) - .value_name("TARGETS") - .multiple(true) - .required(true), - ) - .arg( - Arg::new("full-paths") - .long("full-paths") - .short('f') - .help("Display targets' full paths") - .action(SetArgTrue), - ), - ) - .subcommand( - Command::new("set") - .about("Activates the given target(s) while deactivating all others") - .visible_alias("s") - .arg( - Arg::new("targets") - .help("Targets to be set") - .action(AppendArgs) - .value_name("TARGETS") - .multiple(true) - .required(true), - ) - .arg( - Arg::new("full-paths") - .long("full-paths") - .short('f') - .help("Display targets' full paths") - .action(SetArgTrue), - ), - ) - .subcommand( - Command::new("default") - .about("Activates the default target(s) while deactivating all others") - .visible_alias("d") - .arg( - Arg::new("full-paths") - .long("full-paths") - .short('f') - .help("Display targets' full paths") - .action(SetArgTrue), - ), - ) - .subcommand( - Command::new("view") - .about("Views the currently activated target(s)") - .visible_alias("v") - .arg( - Arg::new("full-paths") - .long("full-paths") - .short('f') - .help("Display targets' full paths") - .action(SetArgTrue), - ), - ), - ); + app = commands::target::add_commands(app, &helps, &extensions)?; /************************************************************************************/ let t_help = "Create, Build, and View Web Documentation"; @@ -1161,7 +1055,7 @@ Examples: } match matches.subcommand_name() { - Some(commands::app::CMD_NAME) => commands::app::run(matches.subcommand_matches(commands::app::CMD_NAME).unwrap(), &app, &extensions, plugins.as_ref(), &app_cmds.as_ref().unwrap())?, + Some(commands::app::BASE_CMD) => commands::app::run(matches.subcommand_matches(commands::app::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &app_cmds.as_ref().unwrap())?, Some("env") => commands::env::run(matches.subcommand_matches("env").unwrap()), Some("fmt") => commands::fmt::run()?, Some("new") => commands::new::run(matches.subcommand_matches("new").unwrap()), @@ -1169,7 +1063,7 @@ Examples: Some("proj") => commands::proj::run(matches.subcommand_matches("proj").unwrap()), Some(commands::eval::BASE_CMD) => run_cmd_match_case!(eval), Some(commands::interactive::BASE_CMD) => run_cmd_match_case!(interactive), - Some(commands::aux_cmds::CMD_NAME) => commands::aux_cmds::run(matches.subcommand_matches(commands::aux_cmds::CMD_NAME).unwrap(), &app, &extensions, plugins.as_ref(), &aux_cmds)?, + Some(commands::aux_cmds::BASE_CMD) => commands::aux_cmds::run(matches.subcommand_matches(commands::aux_cmds::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &aux_cmds)?, Some("generate") => { let m = matches.subcommand_matches("generate").unwrap(); commands::launch( @@ -1204,22 +1098,7 @@ Examples: None, ); } - Some("target") => { - let m = matches.subcommand_matches("target").unwrap(); - if let Some(subm) = m.subcommand() { - let s = subm.1; - commands::target::run( - Some(subm.0), - match s.get_many::("targets") { - Some(targets) => Some(targets.map(|t| t.as_str()).collect()), - None => None, - }, - s.contains_id("full-paths"), - ) - } else { - commands::target::run(None, None, m.contains_id("full-paths")); - } - } + Some(commands::target::BASE_CMD) => commands::target::run(matches.subcommand_matches(commands::target::BASE_CMD).unwrap())?, Some("web") => { let cmd = matches.subcommand_matches("web").unwrap(); let subcmd = cmd.subcommand().unwrap(); diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index 907ef461..8570ae4a 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -12,4 +12,9 @@ pub use crate::framework::{CmdHelps, CmdHelp, CmdSrc}; pub type RunInput<'a> = &'a clap::ArgMatches; pub use clap_arg_actions::*; -pub use crate::{gen_core_cmd_funcs, core_subcmd, gen_simple_run_func}; \ No newline at end of file +pub use crate::{ + gen_core_cmd_funcs, gen_core_cmd_funcs__no_exts__no_app_opts, + core_subcmd, core_subcmd__no_app_opts, + gen_simple_run_func, + print_subcmds_available_msg, +}; \ No newline at end of file diff --git a/rust/origen/cli/src/commands/app.rs b/rust/origen/cli/src/commands/app.rs index 2dafc485..bb5c0c67 100644 --- a/rust/origen/cli/src/commands/app.rs +++ b/rust/origen/cli/src/commands/app.rs @@ -6,15 +6,15 @@ use crate::framework::app_cmds::add_commands as add_app_user_commands; use crate::framework::app_cmds::add_helps as add_app_cmd_helps; use crate::framework::build_path; -pub const CMD_NAME: &'static str = "app"; +pub const BASE_CMD: &'static str = "app"; pub (crate) fn add_helps(helps: &mut CmdHelps, app_cmds: &AppCmds) { - helps.add_core_cmd(CMD_NAME).set_help_msg("Manage and interface with the application"); + helps.add_core_cmd(BASE_CMD).set_help_msg("Manage and interface with the application"); add_app_cmd_helps(helps, app_cmds); } pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, app_cmds: &'a AppCmds, exts: &'a Extensions, ) -> Result> { - let mut app_subc = helps.core_cmd(CMD_NAME) + let mut app_subc = helps.core_cmd(BASE_CMD) .arg_required_else_help(true) .subcommand( Command::new("init") @@ -197,7 +197,7 @@ pub(crate) fn run(cmd: &ArgMatches, mut app: &App, exts: &Extensions, plugins: O let mut matches = cmd; let mut path_pieces: Vec = vec!(); - app = app.find_subcommand(CMD_NAME).unwrap(); + app = app.find_subcommand(BASE_CMD).unwrap(); // app = app.find_subcommand(subc.0).unwrap(); while matches.subcommand_name().is_some() { let n = matches.subcommand_name().unwrap(); diff --git a/rust/origen/cli/src/commands/aux_cmds.rs b/rust/origen/cli/src/commands/aux_cmds.rs index 5232ed53..5549f676 100644 --- a/rust/origen/cli/src/commands/aux_cmds.rs +++ b/rust/origen/cli/src/commands/aux_cmds.rs @@ -1,4 +1,4 @@ -pub use crate::framework::aux_cmds::CMD_NAME; +pub use crate::framework::aux_cmds::BASE_CMD; use super::launch_as; use crate::framework::build_path; use indexmap::IndexMap; @@ -12,7 +12,7 @@ pub(crate) fn run(cmd: &clap::ArgMatches, mut app: &clap::App, exts: &crate::Ext let mut matches = subc.1; let mut path_pieces: Vec = vec!(); - app = app.find_subcommand(CMD_NAME).unwrap(); + app = app.find_subcommand(BASE_CMD).unwrap(); app = app.find_subcommand(subc.0).unwrap(); while matches.subcommand_name().is_some() { let n = matches.subcommand_name().unwrap(); diff --git a/rust/origen/cli/src/commands/interactive.rs b/rust/origen/cli/src/commands/interactive.rs index 476cee0d..2b8f6d16 100644 --- a/rust/origen/cli/src/commands/interactive.rs +++ b/rust/origen/cli/src/commands/interactive.rs @@ -10,4 +10,4 @@ gen_core_cmd_funcs!( }} ); -crate::gen_simple_run_func!(); +gen_simple_run_func!(); diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 17eae521..992dd586 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -30,6 +30,13 @@ use crate::framework::extensions::{Extension, ExtensionSource}; use crate::Plugins; use std::collections::HashMap; +#[macro_export] +macro_rules! print_subcmds_available_msg { + () => {{ + println!("Run with 'help' or '-h' to see available subcommands"); + }} +} + #[macro_export] macro_rules! gen_simple_run_func { ($base_cmd: expr) => { diff --git a/rust/origen/cli/src/commands/target.rs b/rust/origen/cli/src/commands/target.rs index 0f62ae0c..da0283d7 100644 --- a/rust/origen/cli/src/commands/target.rs +++ b/rust/origen/cli/src/commands/target.rs @@ -1,43 +1,121 @@ use origen::core::application::target; +use super::_prelude::*; -pub fn run(subcmd: Option<&str>, tnames: Option>, full_paths: bool) { - if let Some(cmd) = subcmd { - match cmd { +pub const BASE_CMD: &'static str = "target"; +pub const FULL_PATHS_OPT: &'static str = "full-paths"; +pub const TARGETS_OPT: &'static str = "targets"; + +macro_rules! full_paths_opt { + () => { + Arg::new(FULL_PATHS_OPT) + .long(FULL_PATHS_OPT) + .visible_alias("full_paths") + .short('f') + .help("Display targets' full paths") + .action(SetArgTrue) + } +} + +macro_rules! targets_arg { + ($help:expr) => { + Arg::new(TARGETS_OPT) + .help($help) + .action(AppendArgs) + .value_name("TARGETS") + .multiple(true) + .required(true) + } +} + +macro_rules! tnames { + ($cmd:expr) => { + $cmd.get_many::(TARGETS_OPT).unwrap().map(|t| t.as_str()).collect::>() + } +} + +gen_core_cmd_funcs__no_exts__no_app_opts!( + BASE_CMD, + "Set/view the default target", + { |cmd: App<'a>| { cmd.arg(full_paths_opt!()).visible_alias("t") }}, + core_subcmd__no_app_opts!("add", "Activates the given target(s)", { |cmd: App| { + cmd.visible_alias("a") + .arg(targets_arg!("Targets to be activated")) + .arg(full_paths_opt!()) + }}), + core_subcmd__no_app_opts!("clear", "Deactivates any and all current targets", { |cmd: App| { + cmd.visible_alias("c") + }}), + core_subcmd__no_app_opts!("remove", "Deactivates the given target(s)", { |cmd: App| { + cmd.visible_alias("r") + .arg(targets_arg!("Targets to be deactivated")) + .arg(full_paths_opt!()) + }}), + core_subcmd__no_app_opts!("set", "Activates the given target(s) while deactivating all others", { |cmd: App| { + cmd.visible_alias("s") + .arg(targets_arg!("Targets to be set")) + .arg(full_paths_opt!()) + }}), + core_subcmd__no_app_opts!("default", "Activates the default target(s) while deactivating all others", { |cmd: App| { + cmd.visible_alias("d") + .arg(full_paths_opt!()) + }}), + core_subcmd__no_app_opts!("view", "Views the currently activated target(s)", { |cmd: App| { + cmd.visible_alias("v") + .arg(full_paths_opt!()) + }}) +); + +macro_rules! view { + ($invocation:expr) => { + view_targets(*$invocation.get_one::(FULL_PATHS_OPT).unwrap()) + } +} + +fn view_targets(fp: bool) -> Result<()> { + if let Some(targets) = target::get(fp) { + println!("The targets currently enabled are:"); + println!("{}", targets.join("\n")) + } else { + println!("No targets have been enabled and this workspace does not enable any default targets") + } + Ok(()) +} + +pub(crate) fn run(mut invocation: &clap::ArgMatches) -> origen::Result<()> { + if let Some((n, subcmd)) = invocation.subcommand() { + match n { "add" => { - target::add(backend_expect!( - tnames, - "No targets given to 'target add' cmd!" - )); + target::add(tnames!(subcmd)); + } + "clear" => { + target::clear(); + view_targets(false)?; + return Ok(()) } "default" => { target::reset(); } "remove" => { - target::remove(backend_expect!( - tnames, - "No targets given to 'target add' cmd!" - )); + target::remove(tnames!(subcmd)); } "set" => { - target::set(backend_expect!( - tnames, - "No targets given to 'target set' cmd!" - )); + target::set(tnames!(subcmd)); } "view" => { - if let Some(targets) = target::get(full_paths) { - println!("The targets currently enabled are:"); - println!("{}", targets.join("\n")) - } else { - println!("No targets have been enabled and this workspace does not enable any default targets") - } - return (); + view!(subcmd)?; + return Ok(()); } _ => { // Shouldn't hit this. Should be caught by clap before getting here backend_fail!("Unknown subcommand in target processor"); } } + // Show the effect after running the command + view!(subcmd) + } else { + view!(invocation)?; + println!(); + print_subcmds_available_msg!(); + Ok(()) } - run(Some("view"), None, full_paths) } diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index 4ea0889e..0b10da5e 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -9,7 +9,7 @@ use origen::core::application::Application; use super::{Command, CommandsToml, CommandTOML, Extensions}; // pub const CMD_NAME: &'static str = "commands"; -pub const APP_COMMANDS: [&'static str; 2] = [crate::commands::app::CMD_NAME, "commands"]; +pub const APP_COMMANDS: [&'static str; 2] = [crate::commands::app::BASE_CMD, "commands"]; pub struct AppCmds { pub root: PathBuf, diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index 1f554061..e820ef1e 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -8,7 +8,7 @@ use super::extensions::ExtensionTOML; use super::{CommandTOML}; use clap::Command as ClapCommand; -pub const CMD_NAME: &'static str = "auxillary_commands"; +pub const BASE_CMD: &'static str = "auxillary_commands"; #[derive(Debug, Deserialize)] pub (crate) struct CommandsToml { @@ -150,7 +150,7 @@ impl AuxCmdNamespace { } pub (crate) fn add_helps(helps: &mut CmdHelps, aux_cmds: &AuxCmds) { - helps.add_core_cmd(CMD_NAME).set_help_msg("Interface with auxillary commands"); + helps.add_core_cmd(BASE_CMD).set_help_msg("Interface with auxillary commands"); for (ns, cmds) in aux_cmds.namespaces.iter() { for (n, c) in cmds.commands.iter() { helps.add_aux_cmd(ns, n).set_help_msg(&c.help); @@ -166,7 +166,7 @@ pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: // shortcut: None, // }); - let mut aux_sub = helps.core_cmd(CMD_NAME) + let mut aux_sub = helps.core_cmd(BASE_CMD) .visible_alias("aux_cmds") .arg_required_else_help(true); diff --git a/rust/origen/cli/src/framework/core_cmds.rs b/rust/origen/cli/src/framework/core_cmds.rs index b4773f19..6190092f 100644 --- a/rust/origen/cli/src/framework/core_cmds.rs +++ b/rust/origen/cli/src/framework/core_cmds.rs @@ -10,7 +10,7 @@ pub fn add_core_subc_helps(helps: &mut CmdHelps, base_name: &str, cmd: &str, cmd } } -pub fn add_core_subcs<'a>(helps: &'a CmdHelps, exts: &'a Extensions, cmd: Command<'a>, base: Vec<&str>, subcmd: &SubCmd) -> Result> { +pub fn add_core_subcs<'a>(helps: &'a CmdHelps, exts: Option<&'a Extensions>, cmd: Command<'a>, base: Vec<&str>, subcmd: &SubCmd) -> Result> { let mut n = base.clone(); n.push(subcmd.name); let mut subc = helps.core_subc(&n); @@ -24,7 +24,9 @@ pub fn add_core_subcs<'a>(helps: &'a CmdHelps, exts: &'a Extensions, cmd: Comman subc = super::add_all_app_opts(subc); } // add exts - subc = exts.apply_to_core_cmd(&n.join("."), subc); + if let Some(e) = exts { + subc = e.apply_to_core_cmd(&n.join("."), subc); + } Ok(cmd.subcommand(subc)) } @@ -37,9 +39,9 @@ pub struct SubCmd<'a> { } #[macro_export] macro_rules! core_subcmd { - ($($args:tt)+) => { - $crate::_core_subcmd!(true, $($args)*); - } + ($($args:tt)+) => {{ + $crate::_core_subcmd!(true, $($args)*) + }} } #[macro_export] @@ -50,7 +52,7 @@ macro_rules! _core_subcmd { help: $help, subcmds: &[], proc: Some(&$proc), - include_app_opts: true, + include_app_opts: $include_app_opts, } }}; @@ -60,7 +62,7 @@ macro_rules! _core_subcmd { help: $help, subcmds: &[$($subcmd),*], proc: Some(&$proc), - include_app_opts: true, + include_app_opts: $include_app_opts, } }}; @@ -70,7 +72,7 @@ macro_rules! _core_subcmd { help: $help, subcmds: &[], proc: None, - include_app_opts: true, + include_app_opts: $include_app_opts, } }}; @@ -80,15 +82,17 @@ macro_rules! _core_subcmd { help: $help, subcmds: &[$($subcmd),*], proc: None, - include_app_opts: true, + include_app_opts: $include_app_opts, } }}; } -// TODO if needed -// #[macro_export] -// macro_rules! core_subcmd_without_app_opts { -// } +#[macro_export] +macro_rules! core_subcmd__no_app_opts { + ($($args:tt)+) => {{ + $crate::_core_subcmd!(false, $($args)*) + }} +} #[macro_export] macro_rules! gen_core_cmd_funcs { @@ -107,11 +111,32 @@ macro_rules! gen_core_cmd_funcs { let mut cmd = helps.core_cmd($base_name); cmd = $proc(cmd); $( - cmd = $crate::framework::core_cmds::add_core_subcs(helps, exts, cmd, vec!($base_name), &$subcmd)?; + cmd = $crate::framework::core_cmds::add_core_subcs(helps, Some(exts), cmd, vec!($base_name), &$subcmd)?; )* cmd = crate::framework::add_all_app_opts(cmd); cmd = exts.apply_to_core_cmd($base_name, cmd); Ok(app.subcommand(cmd)) } }; +} + +#[macro_export] +macro_rules! gen_core_cmd_funcs__no_exts__no_app_opts { + ($base_name:expr, $cmd_help:expr, $proc:tt, $($subcmd:expr ), *) => { + pub (crate) fn add_helps(helps: &mut $crate::CmdHelps) { + helps.add_core_cmd($base_name).set_help_msg($cmd_help); + $( + $crate::framework::core_cmds::add_core_subc_helps(helps, $base_name, $subcmd.name, $subcmd.help, $subcmd.subcmds); + )* + } + + pub (crate) fn add_commands<'a>(app: clap::Command<'a>, helps: &'a $crate::CmdHelps, exts: &'a $crate::Extensions) -> origen::Result> { + let mut cmd = helps.core_cmd($base_name); + cmd = $proc(cmd); + $( + cmd = $crate::framework::core_cmds::add_core_subcs(helps, None, cmd, vec!($base_name), &$subcmd)?; + )* + Ok(app.subcommand(cmd)) + } + }; } \ No newline at end of file diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs index 321b1918..90f978d5 100644 --- a/rust/origen/cli/src/framework/extensions.rs +++ b/rust/origen/cli/src/framework/extensions.rs @@ -1,12 +1,12 @@ use std::collections::HashMap; -use origen::{Result, in_app_invocation}; +use origen::Result; use super::plugins::Plugin; use super::aux_cmds::{AuxCmdNamespace}; use clap::Command as ClapCommand; use super::{ArgTOML, Arg, OptTOML, Opt, CmdSrc, Applies}; use crate::{from_toml_args, from_toml_opts}; use std::path::PathBuf; -use std::{fmt, env}; +use std::fmt; // TODO refactor this use super::helps::CmdSrc as ExtensionTarget; diff --git a/rust/origen/src/core/application/config.rs b/rust/origen/src/core/application/config.rs index 5c41c0ce..03400b57 100644 --- a/rust/origen/src/core/application/config.rs +++ b/rust/origen/src/core/application/config.rs @@ -1,4 +1,3 @@ -use crate::core::application::target::matches; use crate::utility::location::Location; use crate::exit_on_bad_config; use origen_metal::config; @@ -6,8 +5,54 @@ use origen_metal::config::{Environment, File}; use std::collections::HashMap; use std::path::{Path, PathBuf}; use crate::om::glob::glob; +use std::process::exit; +use super::target; const PUBLISHER_OPTIONS: &[&str] = &["system", "package_app", "upload_app"]; +const BYPASS_APP_CONFIG_ENV_VAR: &str = "origen_app_bypass_config_lookup"; +const APP_CONFIG_PATHS: &str = "origen_app_config_paths"; + +macro_rules! use_app_config { + () => {{ + !std::env::var_os($crate::core::application::config::BYPASS_APP_CONFIG_ENV_VAR).is_some() + }} +} + +#[derive(Debug, Deserialize)] +pub struct CurrentState { + pub target: Option> +} + +impl CurrentState { + pub fn build(root: &PathBuf) -> Self { + let file = root.join(".origen").join("application.toml"); + let mut s = config::Config::builder().set_default("target", None::>).unwrap(); + if file.exists() { + s = s.add_source(File::with_name(&format!("{}", file.display()))); + } + let cb = exit_on_bad_config!(s.build()); + let slf: Self = exit_on_bad_config!(cb.try_deserialize()); + slf + } + + pub fn apply_to(&mut self, config: &mut Config) { + if let Some(t) = self.target.as_ref() { + config.target = Some(t.to_owned()) + } else { + if let Some(t) = &config.target { + let clean_defaults = target::set_at_root(t.iter().map( |s| s.as_str() ).collect(), config.root.as_ref().unwrap()); + self.target = Some(clean_defaults); + } + } + } + + pub fn build_and_apply(config: &mut Config) { + if use_app_config!() { + let mut slf = Self::build(config.root.as_ref().unwrap()); + slf.apply_to(config); + } + } +} #[derive(Debug, Deserialize)] // If you add an attribute to this you must also update: @@ -58,27 +103,6 @@ impl Config { self.commands = latest.commands; } - pub fn check_defaults(root: &Path) { - let defaults = Self::build(root, true); - - // Do some quick default checks here: - // * Target - tl;dr: have a better error message on invalid default targets. - // If the default target moves or is otherwise invalid, the app won't boot. - // This isn't necessarily bad (having an invalid default target is bad) but it may not be obvious, - // especially to newer users, as to why the app all of a sudden doesn't boot. - // This can be overcome by setting the target (or fixing the default), but add, remove, etc., the commands - // users will probably go to when encountering target problems, won't work. - // * Stack up others as needed. - if let Some(targets) = defaults.target { - for t in targets.iter() { - let m = matches(t, "targets"); - if m.len() != 1 { - log_error!("Error present in default target '{}' (in config/application.toml)", t); - } - } - } - } - /// Builds a new config from all application.toml files found at the given app root pub fn build(root: &Path, default_only: bool) -> Config { log_trace!("Building app config"); @@ -102,18 +126,56 @@ impl Config { .set_default("commands", None::>) .unwrap(); - let file = root.join("config").join("application.toml"); - if file.exists() { - s = s.add_source(File::with_name(&format!("{}", file.display()))); - } + let mut files: Vec = Vec::new(); + if let Some(paths) = std::env::var_os(APP_CONFIG_PATHS) { + log_trace!("Found custom config paths: {:?}", paths); + for path in std::env::split_paths(&paths) { + log_trace!("Looking for Origen app config file at '{}'", path.display()); + if path.is_file() { + if let Some(ext) = path.extension() { + if ext == "toml" { + files.push(path); + } else { + log_error!( + "Expected file {} to have extension '.toml'. Found '{}'", + path.display(), + ext.to_string_lossy() + ) + } + } else { + // accept a file without an extension. will be interpreted as a .toml + files.push(path); + } + } else if path.is_dir() { + let f = path.join("application.toml"); + if f.exists() { + files.push(f); + } + } else { + log_error!( + "Config path {} either does not exists or is not accessible", + path.display() + ); + exit(1); + } + } + } - if !default_only { - let file = root.join(".origen").join("application.toml"); + if use_app_config!() { + let file = root.join("config").join("application.toml"); if file.exists() { - s = s.add_source(File::with_name(&format!("{}", file.display()))); + files.push(file); } + } else { + // Bypass Origen's default configuration lookup - use only the enumerated configs + log_trace!("Bypassing Origen's App Config Lookup"); } - s = s.add_source(Environment::with_prefix("origen_app").list_separator(",").with_list_parse_key("commands").try_parsing(true)); + + for f in files.iter().rev() { + log_trace!("Loading Origen config file from '{}'", f.display()); + s = s.add_source(File::with_name(&format!("{}", f.display()))); + } + s = s.add_source(Environment::with_prefix("origen_app").list_separator(",").with_list_parse_key("target").with_list_parse_key("commands").try_parsing(true)); let cb = exit_on_bad_config!(s.build()); let mut c: Self = exit_on_bad_config!(cb.try_deserialize()); @@ -124,12 +186,24 @@ impl Config { // } log_trace!("Completed building app config"); c.validate_options(); + if !default_only { + CurrentState::build_and_apply(&mut c); + } c } pub fn validate_options(&self) { log_trace!("Validating available options..."); + + if let Some(targets) = self.target.as_ref() { + log_trace!("\tValidating default target..."); + for t in targets { + target::clean_name(t, "targets", true, self.root.as_ref().unwrap()); + } + log_trace!("\tValidating default target!"); + } + log_trace!("\tValidating publisher options..."); for unknown in self.validate_publisher_options() { log_warning!("Unknown Publisher Option '{}'", unknown); diff --git a/rust/origen/src/core/application/target.rs b/rust/origen/src/core/application/target.rs index 71143114..06bee5a0 100644 --- a/rust/origen/src/core/application/target.rs +++ b/rust/origen/src/core/application/target.rs @@ -15,12 +15,27 @@ use walkdir::WalkDir; use pathdiff::diff_paths; use regex::{escape, Regex}; use std::fs; +use std::process::exit; +use std::collections::HashSet; + +#[macro_export] +macro_rules! clean_target { + ($name:expr, $dir:expr, $return_file:expr) => {{ + $crate::core::application::target::clean_name($name, $dir, $return_file, &$crate::app().unwrap().root) + }} +} + +macro_rules! toml { + ($root:expr) => {{ + $root.join(".origen").join("application.toml") + }} +} /// Sanitizes the given target/env name and returns it, but will exit the process if it does /// not uniquely identify a single target/env file. /// Set the last arg to true to return the path to the matching target instead. -pub fn clean_name(name: &str, dir: &str, return_file: bool) -> String { - let matches = matches(name, dir); +pub fn clean_name(name: &str, dir: &str, return_file: bool, root: &PathBuf) -> String { + let matches = matches(name, dir, root); let t = dir.trim_end_matches("s"); if matches.len() == 0 { @@ -28,10 +43,10 @@ pub fn clean_name(name: &str, dir: &str, return_file: bool) -> String { "No matching {} '{}' found, here are the available {}s:", t, name, t ); - for file in all(dir).iter() { + for file in all(&root.join(dir)).iter() { println!( " {}", - diff_paths(&file, &app().unwrap().root.join(dir)) + diff_paths(&file, &root.join(dir)) .unwrap() .display() ); @@ -44,7 +59,7 @@ pub fn clean_name(name: &str, dir: &str, return_file: bool) -> String { for file in matches.iter() { println!( " {}", - diff_paths(&file, &app().unwrap().root.join(dir)) + diff_paths(&file, &root.join(dir)) .unwrap() .display() ); @@ -55,27 +70,27 @@ pub fn clean_name(name: &str, dir: &str, return_file: bool) -> String { } else { let clean = format!( "{}", - diff_paths(&matches[0], &app().unwrap().root.join(dir)) + diff_paths(&matches[0], &root.join(dir)) .unwrap() .display() ); return clean; } } - std::process::exit(1); + exit(1); } /// Returns an array of possible target/environment files that match the given name/snippet // TODO: look into updating this to use the PathBuf PartialEq Trait to compare instead string compare which is prone to bugs due to OS differences -pub fn matches(name: &str, dir: &str) -> Vec { +pub fn matches(name: &str, dir: &str, root: &PathBuf) -> Vec { let mut files: Vec = Vec::new(); - for file in WalkDir::new(format!("{}", app().unwrap().root.join(dir).display())) { + for file in WalkDir::new(format!("{}", root.join(dir).display())) { let path = file.unwrap().into_path(); if path.is_file() { let mut path_str = format!( "{}", - diff_paths(&path, &app().unwrap().root.join(dir)) + diff_paths(&path, &root.join(dir)) .unwrap() .display() ); @@ -118,7 +133,7 @@ pub fn get(full_paths: bool) -> Option> { Some(targets) => Ok(Some( targets .iter() - .map(|t| clean_name(t, "targets", full_paths)) + .map(|t| clean_target!(t, "targets", full_paths)) .collect::>() .clone(), )), @@ -129,12 +144,22 @@ pub fn get(full_paths: bool) -> Option> { } /// Sets the targets, overriding any that may be present -pub fn set(targets: Vec<&str>) { - let clean_targets: Vec = targets - .iter() - .map(|t| clean_name(t, "targets", true)) - .collect(); - set_workspace_array("target", clean_targets) +pub fn set(targets: Vec<&str>) -> Vec { + set_at_root(targets, &app().unwrap().root) +} + +pub fn set_at_root(targets: Vec<&str>, root: &PathBuf) -> Vec { + let mut to_set = vec!(); + for t in targets.iter() { + let cn = clean_name(t, "targets", true, root); + if to_set.contains(&cn) { + log_error!("Target '{}' appears multiple times in the TARGETS list ({})", t, cn); + exit(1); + } + to_set.push(cn.clone()); + } + set_workspace_array_at_root("target", to_set.clone(), root); + to_set } /// Resets (deletes) the target back to its default value @@ -142,6 +167,11 @@ pub fn reset() { delete_val("target") } +pub fn clear() { + delete_val("target"); + set_workspace_array("target", vec!()) +} + /// Enables additional targets in the workspace pub fn add(targets: Vec<&str>) { let mut current: Vec = app() @@ -152,21 +182,28 @@ pub fn add(targets: Vec<&str>) { None => vec![], } .iter() - .map(|t| clean_name(t, "targets", true)) + .map(|t| clean_target!(t, "targets", true)) .collect(); Ok(c) }) .unwrap(); + let mut added = Vec::new(); for t in targets.iter() { // Check that the targets to add are valid - let clean_t = clean_name(t, "targets", true); + let clean_t = clean_target!(t, "targets", true); // If the target is already added, remove it from its current position and reapply it in the order // given here current.retain(|c| *c != clean_t); - current.push(clean_t); + + if added.contains(&clean_t) { + log_error!("Target '{}' appears multiple times in the TARGETS list ({})", t, clean_t); + exit(1); + } + added.push(clean_t); } + current.extend(added); set_workspace_array("target", current); } @@ -181,17 +218,30 @@ pub fn remove(targets: Vec<&str>) { None => vec![], } .iter() - .map(|t| clean_name(t, "targets", true)) + .map(|t| clean_target!(t, "targets", true)) .collect(); Ok(c) }) .unwrap(); + let mut removed = HashSet::new(); + let mut len = current.len(); for t in targets.iter() { - let clean_t = clean_name(t, "targets", true); + let clean_t = clean_target!(t, "targets", true); + + if removed.contains(&clean_t) { + log_error!("Target '{}' appears multiple times in the TARGETS list ({})", t, clean_t); + exit(1); + } - // Remove the target, if present current.retain(|c| *c != clean_t); + let new_len = current.len(); + if new_len == len { + log_error!("Tried to remove non-activated target '{}' ({})", t, clean_t); + exit(1); + } + len = new_len; + removed.insert(clean_t); } if current.len() == 0 { @@ -203,12 +253,12 @@ pub fn remove(targets: Vec<&str>) { } /// Returns all files from the given directory -pub fn all(dir: &str) -> Vec { +pub fn all(dir: &PathBuf) -> Vec { let mut files: Vec = Vec::new(); - for file in WalkDir::new(format!("{}", app().unwrap().root.join(dir).display())) { + for file in WalkDir::new(dir) { let path = file.unwrap().into_path(); - if path.is_file() { + if path.is_file() && path.extension().unwrap_or("".as_ref()) == "py" { files.push(path); } } @@ -225,22 +275,26 @@ pub fn set_workspace(key: &str, val: &str) { /// Sets an Array-of-Strings workspace variable pub fn set_workspace_array(key: &str, vals: Vec) { - ensure_app_dot_toml(); - delete_val(key); - add_val_array(key, vals); + set_workspace_array_at_root(key, vals, &app().unwrap().root) +} + +pub fn set_workspace_array_at_root(key: &str, vals: Vec, root: &PathBuf) { + ensure_app_dot_toml_at_root(root); + delete_val_at_root(key, root); + add_val_array_at_root(key, vals, root); } /// Deletes the given key (and its val) from .origen/application.toml if it exists pub fn delete_val(key: &str) { - let path = app().unwrap().root.join(".origen").join("application.toml"); - let data = fs::read_to_string(path).expect("Unable to read file .origen/application.toml"); + delete_val_at_root(key, &app().unwrap().root); +} + +pub fn delete_val_at_root(key: &str, root: &PathBuf) { + let path = toml!(root); + let data = fs::read_to_string(&path).expect(&format!("Unable to read file {}", &path.display())); let re = Regex::new(format!(r#"{}\s?=.*(\r\n|\n)?"#, escape(key)).as_str()).unwrap(); let new_data: String = re.replace_all(&data, "").into(); - fs::write( - app().unwrap().root.join(".origen").join("application.toml"), - new_data, - ) - .expect("Unable to write file .origen/application.toml!"); + fs::write(&path, new_data).expect(&format!("Unable to write file {}", &path.display())); } /// Appends the given key/val pair to the end of .origen/application.toml @@ -256,9 +310,13 @@ fn add_val(key: &str, val: &str) { } /// Appends the given key/val pair to the end of .origen/application.toml -fn add_val_array(key: &str, vals: Vec) { - let path = app().unwrap().root.join(".origen").join("application.toml"); - let data = fs::read_to_string(path).expect("Unable to read file .origen/application.toml"); +// fn add_val_array(key: &str, vals: Vec) { +// add_val_array_at_root(key, vals, &app().unwrap().root); +// } + +fn add_val_array_at_root(key: &str, vals: Vec, root: &PathBuf) { + let path = toml!(root); + let data = fs::read_to_string(&path).expect(&format!("Unable to read file {}", &path.display())); // Note: use string literals here to account for Windows paths let new_data = format!( @@ -270,16 +328,16 @@ fn add_val_array(key: &str, vals: Vec) { .collect::>() .join(", ") ); - fs::write( - app().unwrap().root.join(".origen").join("application.toml"), - new_data, - ) - .expect("Unable to write file .origen/application.toml!"); + fs::write(&path, new_data).expect(&format!("Unable to write file {}", &path.display())); } /// Verifies that .origen/application.toml exists and if not creates one fn ensure_app_dot_toml() { - let path = app().unwrap().root.join(".origen"); + ensure_app_dot_toml_at_root( &app().unwrap().root) +} + +fn ensure_app_dot_toml_at_root(root: &PathBuf) { + let path = root.join(".origen"); if !path.exists() { fs::create_dir(&path).expect("Unable to create directory .origen!"); } @@ -287,10 +345,6 @@ fn ensure_app_dot_toml() { if !path.exists() { let data = "# This file is generated by Origen and should not be checked into revision control"; - fs::write( - app().unwrap().root.join(".origen").join("application.toml"), - data, - ) - .expect("Unable to write file .origen/application.toml!"); + fs::write(&path, data).expect(&format!("Unable to write file {}", &path.display())); } } diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index accc903d..f78560b5 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -36,7 +36,7 @@ mod plugins; use crate::registers::bit_collection::BitCollection; use num_bigint::BigUint; use om::lazy_static::lazy_static; -use origen::{Dut, Error, Operation, Result, Value, FLOW, ORIGEN_CONFIG, STATUS, TEST}; +use origen::{Dut, Error, Operation, Result, Value, FLOW, ORIGEN_CONFIG, STATUS, TEST, clean_target}; use origen_metal as om; use pyapi_metal::{runtime_error, pypath}; use pyo3::conversion::AsPyPointer; @@ -613,7 +613,7 @@ fn clean_mode(name: &str) -> PyResult { /// Sanitizes the given target/env name and returns the matching file, but will exit the process /// if it does not uniquely identify a single target/env file. fn target_file(name: &str, dir: &str) -> PyResult { - let c = origen::core::application::target::clean_name(name, dir, true); + let c = clean_target!(name, dir, true); Ok(c) } diff --git a/test_apps/python_app/targets/readme.md b/test_apps/python_app/targets/readme.md new file mode 100644 index 00000000..582d9bbb --- /dev/null +++ b/test_apps/python_app/targets/readme.md @@ -0,0 +1 @@ +Test targets for `python_app` \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/core_cmds/target.py b/test_apps/python_app/tests/cli/core_cmds/target.py new file mode 100644 index 00000000..a72d35df --- /dev/null +++ b/test_apps/python_app/tests/cli/core_cmds/target.py @@ -0,0 +1,309 @@ +import pytest, origen +from ..shared import CLICommon +from tests.shared import Targets +from tests.proc_funcs import target_proc_funcs +from origen.helpers.env import in_new_origen_proc + +class TargetCLI(CLICommon, Targets.TargetFixtures): + target_cmd = CLICommon.in_app_commands.target + + @classmethod + def clear_targets_cli(cls): + return cls.target_cmd.run("clear") + + @classmethod + def check_targets(cls, *targets, func_kwargs=None): + retn = in_new_origen_proc(func=target_proc_funcs.show_target_setup, func_kwargs=func_kwargs) + if len(targets) == 1 and targets[0] is None: + targets = [] + assert retn['targets'] == [t.fp for t in targets] + + @pytest.fixture + def set_eagle(self, eagle): + # Add an initial target + out = self.target_cmd.set.run(eagle.name) + self.assert_out(out, eagle) + self.check_targets(eagle) + + @classmethod + def assert_out(cls, out, *targets, full_paths=False): + t = out.split("The targets currently enabled are:\n")[1].split("\n") + t = t[:t.index('')] + if len(targets) == 1 and targets[0] is None: + targets = [] + else: + if full_paths: + targets = [t.fp for t in targets] + else: + targets = [t.rp for t in targets] + assert targets == t + + # Unknown target name + utn = "unknown" + unknown_err_msg = ("\n").join([ + f"No matching target '{utn}' found, here are the available targets:", + *[f" {t}" for t in CLICommon.targets.all_rp], + ]) + + no_set_or_default_targets_msg = "No targets have been enabled and this workspace does not enable any default targets" + all_targets_removed_msg = "All targets were removed. Resetting to the default target." + + empty_default_env = {"origen_app_config_paths": str(CLICommon.to_config_path("target/empty_default_targets.toml"))} + empty_default_run_opts = {"with_env": empty_default_env} + bad_default_run_opts = {"with_env": {"origen_app_config_paths": str(CLICommon.to_config_path("target/bad_default_targets.toml"))}} + + @classmethod + def duplicate_err_msg(cls, t): + return f"Target '{t.name}' appears multiple times in the TARGETS list ({t.fp})" + + @classmethod + def rm_non_active_target_err_msg(cls, t): + return f"Tried to remove non-activated target '{t.name}' ({t.fp})" + + @pytest.fixture + def clear_targets(self): + self.clear_targets_cli() + +class T_Target(TargetCLI): + cmd = TargetCLI.target_cmd + + @classmethod + def setup_class(cls): + cls.clear_targets_cli() + + @pytest.mark.parametrize("cmd", [cmd, *cmd.subcmds.values()], ids=[cmd.name, *cmd.subcmds.keys()]) + def test_help_msg(self, cmd): + help = cmd.get_help_msg() + help.assert_summary(cmd.help) + help.assert_args(cmd.args) + if not cmd.name == "clear": + help.assert_opts(cmd.full_paths, "h", "v", "vk") + else: + help.assert_bare_opts() + if cmd.name == "target": + help.assert_subcmds(cmd.subcmds, help=3) + else: + help.assert_subcmds(None) + + def test_adding_targets(self, clear_targets, eagle, uflex, smt7, smt8): + add = self.cmd.add + out = add.run(eagle.name) + self.assert_out(out, eagle) + self.check_targets(eagle) + + out = add.run(uflex.name, add.full_paths) + self.assert_out(out, eagle, uflex, full_paths=True) + self.check_targets(eagle, uflex) + + out = add.run(smt7.name, smt8.name) + self.assert_out(out, eagle, uflex, smt7, smt8) + self.check_targets(eagle, uflex, smt7, smt8) + + def test_error_adding_unknown_targets(self, set_eagle, eagle, j750, uflex): + add = self.cmd.add + + r = add.gen_error("unknown", return_full=True) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.unknown_err_msg in r["stdout"] + + # Targets should remain the same + self.check_targets(eagle) + + # Try with some valid, some unknown + r = add.gen_error(j750.name, "unknown", uflex.name, return_full=True) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.unknown_err_msg in r["stdout"] + + # Targets should remain the same + self.check_targets(eagle) + + def test_adding_duplicate_target(self, set_eagle, eagle, j750, falcon): + r = self.cmd.add.gen_error(j750.name, falcon.name, j750.name, return_full=True) + self.check_targets(eagle) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.duplicate_err_msg(j750) in r["stdout"] + + def test_adding_already_added_targets(self, set_eagle, eagle, j750): + add = self.cmd.add + self.check_targets(eagle) + + out = add.run(eagle.name) + self.assert_out(out, eagle) + self.check_targets(eagle) + + out = add.run(j750.name) + self.assert_out(out, eagle, j750) + self.check_targets(eagle, j750) + + # Re-adding target shifts its position + out = add.run(eagle.name) + self.assert_out(out, j750, eagle) + self.check_targets(j750, eagle) + + def test_setting_targets(self, clear_targets, eagle, falcon, j750, smt7, hawk): + set = self.cmd.set + out = set.run(eagle.name) + self.assert_out(out, eagle) + self.check_targets(eagle) + + out = set.run(falcon.name, j750.name, smt7.name) + self.assert_out(out, falcon, j750, smt7) + self.check_targets(falcon, j750, smt7) + + out = set.run(hawk.name, set.full_paths) + self.assert_out(out, hawk, full_paths=True) + self.check_targets(hawk) + + def test_error_setting_unknown_targets(self, set_eagle, eagle, j750, uflex): + set = self.cmd.set + r = set.gen_error("unknown", return_full=True) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.unknown_err_msg in r["stdout"] + + # Targets should remain the same + self.check_targets(eagle) + + # Try with some valid, some unknown + r = set.gen_error(j750.name, "unknown", uflex.name, return_full=True) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.unknown_err_msg in r["stdout"] + + # Targets should remain the same + self.check_targets(eagle) + + def test_setting_duplicate_targets(self, set_eagle, eagle, j750, falcon): + r = self.cmd.set.gen_error(j750.name, falcon.name, j750.name, return_full=True) + self.check_targets(eagle) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.duplicate_err_msg(j750) in r["stdout"] + + def test_removing_targets(self, eagle, uflex, j750, smt7, smt8): + self.cmd.set.run(eagle.name, uflex.name, j750.name, smt7.name, smt8.name) + + rm = self.cmd.remove + out = rm.run(eagle.name, smt7.name) + self.assert_out(out, uflex, j750, smt8) + self.check_targets(uflex, j750, smt8) + + out = rm.run(smt8.name, rm.full_paths) + self.assert_out(out, uflex, j750, full_paths=True) + self.check_targets(uflex, j750) + + def test_error_removing_unset_or_unknown_targets(self, set_eagle, eagle, j750): + rm = self.cmd.remove + + r = rm.gen_error(j750.name, return_full=True) + self.check_targets(eagle) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.rm_non_active_target_err_msg(j750) in r["stdout"] + + r = rm.gen_error(eagle.name, j750.name, return_full=True) + self.check_targets(eagle) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.rm_non_active_target_err_msg(j750) in r["stdout"] + + def test_removing_duplicate_targets(self, set_eagle, eagle): + r = self.cmd.remove.gen_error(eagle.name, eagle.name, return_full=True) + self.check_targets(eagle) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.duplicate_err_msg(eagle) in r["stdout"] + + def test_removing_all_targets_restores_default(self, set_eagle, eagle, falcon): + out = self.cmd.remove.run(eagle.name) + assert self.all_targets_removed_msg in out + self.assert_out(out, falcon) + self.check_targets(falcon) + + def test_restoring_default_targets(self, set_eagle, falcon): + out = self.cmd.default.run() + self.assert_out(out, falcon) + self.check_targets(falcon) + + def test_restoring_empty_default_targets(self, set_eagle): + out = self.cmd.default.run(with_env=self.empty_default_env) + self.assert_out(out, None) + self.check_targets(None, func_kwargs=self.empty_default_run_opts) + + def test_clearing_all_targets(self): + out = self.cmd.clear.run() + self.assert_out(out, None) + self.check_targets(None) + + def test_viewing_targets(self, set_eagle, eagle, j750): + v = self.cmd.view + out = v.run() + self.assert_out(out, eagle) + self.check_targets(eagle) + + self.cmd.add.run(j750.name) + out = v.run(v.full_paths) + self.assert_out(out, eagle, j750, full_paths=True) + self.check_targets(eagle, j750) + + self.cmd.clear.run() + out = v.run(v.full_paths) + self.assert_out(out, None, full_paths=True) + self.check_targets(None) + + def test_base_cmd_acts_as_view(self, set_eagle, eagle, j750): + h = "Run with 'help' or '-h' to see available subcommands" + b = self.cmd + + out = b.run() + self.assert_out(out, eagle) + self.check_targets(eagle) + assert h in out + + self.cmd.add.run(j750.name) + out = b.run(b.full_paths) + self.assert_out(out, eagle, j750, full_paths=True) + self.check_targets(eagle, j750) + assert h in out + + self.cmd.clear.run() + out = b.run(b.full_paths) + self.assert_out(out, None, full_paths=True) + self.check_targets(None) + assert h in out + + def test_no_default_set(self, eagle): + e = self.bypass_origen_app_lookup_env + + out = self.cmd.view.run(with_env=e) + assert self.no_set_or_default_targets_msg in out + + self.cmd.set.run(eagle.name) + out = self.cmd.view.run() + self.assert_out(out, eagle) + + out = self.cmd.default.run(with_env=e) + assert self.no_set_or_default_targets_msg in out + self.check_targets(None, func_kwargs={"with_env": e}) + + def test_invalid_default_target(self, clear_targets, eagle, capfd): + r = self.cmd.default.gen_error(run_opts=self.bad_default_run_opts, return_full=True) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.unknown_err_msg in r["stdout"] + assert self.unknown_err_msg not in capfd.readouterr().out + in_new_origen_proc(func=target_proc_funcs.show_target_setup, func_kwargs=self.bad_default_run_opts, expect_fail=True) + assert self.unknown_err_msg in capfd.readouterr().out + + self.cmd.set.run(eagle.name) + r = self.cmd.default.gen_error(run_opts=self.bad_default_run_opts, return_full=True) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert self.unknown_err_msg in r["stdout"] + + out = self.cmd.view.run() + self.assert_out(out, eagle) + self.check_targets(eagle) diff --git a/test_apps/python_app/tests/cli/shared.py b/test_apps/python_app/tests/cli/shared.py new file mode 100644 index 00000000..cf952bbe --- /dev/null +++ b/test_apps/python_app/tests/cli/shared.py @@ -0,0 +1,26 @@ +import pytest, pathlib + +from tests.shared import PythonAppCommon +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg, CmdExtOpt + +Cmd = CLIShared.Cmd + +class CLICommon(CLIShared, PythonAppCommon): + _no_config_run_opts = { + "with_configs": CLIShared.configs.suppress_plugin_collecting_config, + "bypass_config_lookup": True + } + + @pytest.fixture + def no_config_run_opts(self): + return self._no_config_run_opts + + @classmethod + def no_config_run_opts_plus_config(cls, add_configs): + return { + "with_configs": [ + CLIShared.configs.suppress_plugin_collecting_config, + *([add_configs] if isinstance(add_configs, str) or isinstance(add_configs, pathlib.Path) else add_configs) + ], + "bypass_config_lookup": True + } \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/tests__app_cmd_building.py b/test_apps/python_app/tests/cli/tests__app_cmd_building.py new file mode 100644 index 00000000..46cc4a62 --- /dev/null +++ b/test_apps/python_app/tests/cli/tests__app_cmd_building.py @@ -0,0 +1,180 @@ +import pytest +from .shared import CLICommon, Cmd, CmdOpt, CmdArg + +class T_AppCmdBuilding(CLICommon): + warmup_cmd = CLICommon.app_sub_cmd( + "arg_opt_warmup", + help = "Gross test command demonstrating args/opts from app commands", + args=[ + CmdArg("first", help="First Argument - Required", required=True), + CmdArg("second", help="Second Multi-Argument - Not Required", use_delimiter=True, multi=True), + ], + opts=[ + CmdOpt("flag_opt", sn="f", help="Flag opt"), + CmdOpt("single_opt", sn_aliases=["s"], takes_value=True, help="Single-value non-required opt"), + CmdOpt("multi_opt", sn_aliases=["m"], ln_aliases=["m_opt"], multi=True, help="Multi-value non-required opt"), + CmdOpt("hidden_flag_opt", hidden=True, ln="hidden", help="Hidden flag opt"), + ] + ) + nested_cmds = CLICommon.app_sub_cmd( + "nested_app_cmds", + help="Nested app cmds", + subcmds=[ + Cmd( + "nested_l1", + help="Nested app cmds level 1", + subcmds=[ + Cmd( + "nested_l2_a", + help="Nested app cmds level 2 (A)", + subcmds=[ + Cmd( + "nested_l3_a", + help="Nested app cmds level 3 (A-A)" + ), + Cmd( + "nested_l3_b", + help="Nested app cmds level 3 (A-B)" + ), + ] + ), + Cmd( + "nested_l2_b", + help="Nested app cmds level 2 (B)", + subcmds=[ + Cmd( + "nested_l3_a", + help="Nested app cmds level 3 (B-A)" + ), + Cmd( + "nested_l3_b", + help="Nested app cmds level 3 (B-B)" + ), + ] + ) + ] + ) + ] + ) + + def test_app_command_args_and_opts(self): + cmd = self.warmup_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.first, cmd.second) + help.assert_opts( + cmd.flag_opt, + 'h', 'm', + cmd.multi_opt, + 'nt', + cmd.single_opt, + 't', 'v', 'vk' + ) + help.assert_subcmds(None) + + rv = "req_arg" + m0 = "m0" + m12 = "m1,m2" + mo0 = "mo0" + mo12 = "m01,m02" + mo4 = "mo4" + sv = "s_opt" + + out = cmd.run( + rv, + m0, m12, + cmd.flag_opt.sn_to_cli(), + cmd.single_opt.sna_to_cli(), sv, + cmd.multi_opt.sna_to_cli(), mo0, mo12, + cmd.multi_opt.ln_to_cli(), mo4, + cmd.hidden_flag_opt.ln_to_cli(), + ) + cmd.assert_args( + out, + (cmd.first, rv), + (cmd.second, [m0, m12]), + (cmd.flag_opt, 1), + (cmd.single_opt, sv), + (cmd.multi_opt, [mo0, mo12, mo4]), + (cmd.hidden_flag_opt, 1) + ) + + out = cmd.run( + rv, + cmd.flag_opt.sn_to_cli(), cmd.flag_opt.sn_to_cli(), + cmd.multi_opt.sna_to_cli(), mo0, mo12, + ) + cmd.assert_args( + out, + (cmd.first, rv), + (cmd.flag_opt, 2), + (cmd.multi_opt, [mo0, mo12]) + ) + + out = cmd.gen_error() + assert self.err_msgs.missing_required_arg(cmd.first) in out + + nested_cmd_testcases = [ + (nested_cmds, 0, None), + (nested_cmds.nested_l1, 1, None), + (nested_cmds.nested_l1.nested_l2_a, 2, 'A'), + (nested_cmds.nested_l1.nested_l2_a.nested_l3_a, 3, 'A-A'), + (nested_cmds.nested_l1.nested_l2_a.nested_l3_b, 3, 'A-B'), + (nested_cmds.nested_l1.nested_l2_b, 2, 'B'), + (nested_cmds.nested_l1.nested_l2_b.nested_l3_a, 3, 'B-A'), + (nested_cmds.nested_l1.nested_l2_b.nested_l3_b, 3, 'B-B'), + ] + nested_cmd_ids = [f"{cmd[0].name} {'Base' if cmd[2] is None else cmd[2]}" for cmd in nested_cmd_testcases] + @pytest.mark.parametrize("cmd,lvl,sublvl", nested_cmd_testcases, ids=nested_cmd_ids) + def test_nested_cmds(self, cmd, lvl, sublvl): + help = cmd.get_help_msg() + subcs = list(cmd.subcmds.values()) + if len(subcs) == 0: + help.assert_subcmds(None) + else: + subcs.insert(0, "help") + help.assert_subcmds(*subcs) + + out = cmd.run() + assert f"Hi from 'nested_app_cmds' level {lvl}{ ' (' + sublvl + ')' if sublvl else ''}!" in out + + class DisablingAppOpts(): + @pytest.mark.skip + def test_app_opts_are_added_by_default(self): + cmd = self.disabling_app_opts + help = cmd.get_help_msg() + help.assert_args(None) + help.assert_opts( + cmd.app_ext_missing_impl, + cmd.flag_opt, + "help", + cmd.opt_taking_value, + "v", + 'vk' + ) + + @pytest.mark.skip + def test_target_is_not_loaded_by_default(self): + cmd = self.disabling_app_opts + cmd.get_help_msg() + + @pytest.mark.skip + def test_disabling_app_opts(self): + fail + + @pytest.mark.skip + def test_disabling_app_opts_individually(self): + fail + + class TestErrorCases(CLICommon): + @pytest.mark.skip + def test_invalid_cmd_toml(self): + # FOR_PR need to make app specific + out = self.in_app_cmds.origen.run(with_env={"ORIGEN_APP_COMMANDS": "test_case_cmds/invalid.toml,test_case_cmds/error_cases.toml"}) # run_cli_cmd(["-h"]) #.split("\n\n") + print(out) + help = self.HelpMsg(out) + assert list(help.subcmds.keys()) == ["add_aux_cmd", "cmd_testers", "help", "python_no_app_aux_cmds"] + assert f"Unable to add auxillary commands at '{self.aux_cmd_configs_dir}{os.sep}./invalid_aux_cmd_path.toml' from config '{self.aux_cmd_configs_dir}{os.sep}invalid_aux_cmd_path_config.toml'. The following error was met" in out + + @pytest.mark.skip + def test_error_global_and_in_app_setting_used(self): + fail diff --git a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py new file mode 100644 index 00000000..70e8c08a --- /dev/null +++ b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py @@ -0,0 +1,329 @@ +import pytest, os, origen +from origen.helpers.regressions.cli.command import SrcTypes #, CmdExtOpt +from .shared import CLICommon, CmdExtOpt + +class T_ExtendingFromAppCmds(CLICommon): + extend_core_cmds_env = {"ORIGEN_APP_EXTEND_CORE_CMDS": "1"} + extend_pl_test_ext_stacking = {"ORIGEN_APP_EXT_PL_TEST_EXT_STACKING": "1"} + exts = CmdExtOpt.from_src( + "example", + SrcTypes.APP, + CmdExtOpt( + "generic_app_ext_action", + help="Action from the app", + multi=True, + ), + CmdExtOpt( + "generic_app_ext_flag", + help="Flag ext from the app", + ), + ) + core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( + exts, + with_env=extend_core_cmds_env, + from_configs=CLICommon.configs.suppress_plugin_collecting_config, + ) + stacked_core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( + [ + *CLICommon.exts.exts["generic_core_ext"]["exts"], + *exts + ], + from_configs=[CLICommon.exts.core_cmd_exts_cfg], + with_env=extend_core_cmds_env, + ) + py_pl_cmd = CLICommon.python_plugin.plugin_test_ext_stacking.extend( + [ + *CLICommon.exts.exts["plugin.python_plugin.plugin_test_ext_stacking"]["exts"][1:3], + *CLICommon.exts.test_apps_shared_generic_exts, + *exts + ], + from_configs=[CLICommon.exts.pl_ext_stacking_from_aux_cfg], + with_env=extend_pl_test_ext_stacking, + ) + py_pl_subc = CLICommon.python_plugin.plugin_test_ext_stacking.subc.extend( + [ + *CLICommon.exts.exts["plugin.python_plugin.plugin_test_ext_stacking.subc"]["exts"][1:3], + *CLICommon.exts.test_apps_shared_generic_exts, + *exts + ], + from_configs=[CLICommon.exts.pl_ext_stacking_from_aux_cfg], + with_env=extend_pl_test_ext_stacking, + ) + aux_cmd = CLICommon.aux.ns.dummy_cmds.dummy_cmd.extend( + [ + *CLICommon.exts.exts["aux.dummy_cmds.dummy_cmd"]["exts"][2:6], + *exts + ], + from_configs=[CLICommon.exts.pl_ext_stacking_from_aux_cfg], + with_env=CLICommon.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] + ) + aux_subc = CLICommon.aux.ns.dummy_cmds.dummy_cmd.subc.extend( + [ + *CLICommon.exts.exts["aux.dummy_cmds.dummy_cmd.subc"]["exts"][2:6], + *exts + ], + from_configs=[CLICommon.exts.pl_ext_stacking_from_aux_cfg], + with_env=CLICommon.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] + ) + na = "no_action" + + missing_ext_impl_cmd = CLICommon.python_plugin.plugin_test_args.extend( + CmdExtOpt.from_src( + "example", + SrcTypes.APP, + CmdExtOpt( + "app_ext_missing_impl", + help="App extension missing the implementation", + ), + ), + with_env={"ORIGEN_APP_PL_CMD_MISSING_EXT_IMPL": "1"} + ) + + def test_extending_global_cmds(self): + cmd = self.core_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.code) + help.assert_opts( + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + *self.in_app_cmds.standard_opts() + ) + + assert help.aux_exts == None + assert help.pl_exts == None + assert help.app_exts == True + + d = cmd.demos["minimal"] + out = d.run() + cmd.generic_app_ext_flag.assert_present(None, out) + d.assert_present(out) + + out = d.run(add_args=[cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()]) + cmd.generic_app_ext_action.assert_present([self.na], out) + cmd.generic_app_ext_flag.assert_present(1, out) + d.assert_present(out) + + def test_stacking_pl_aux_and_app_ext(self): + cmd = self.stacked_core_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.code) + help.assert_opts( + cmd.core_cmd_exts_generic_core_ext, + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "mode", "no_targets", + cmd.pl_ext_cmds_generic_ext, + "targets", "v", 'vk' + ) + assert help.aux_exts == ['core_cmd_exts'] + assert help.pl_exts == ['pl_ext_cmds'] + assert help.app_exts == True + + d = cmd.demos["minimal"] + out = d.run(add_args=[ + cmd.generic_app_ext_action.ln_to_cli(), self.na, + cmd.generic_app_ext_flag.ln_to_cli(), + cmd.pl_ext_cmds_generic_ext.ln_to_cli(), + cmd.core_cmd_exts_generic_core_ext.ln_to_cli(), + ]) + cmd.generic_app_ext_action.assert_present([self.na], out) + cmd.generic_app_ext_flag.assert_present(1, out) + cmd.pl_ext_cmds_generic_ext.assert_present(1, out) + cmd.core_cmd_exts_generic_core_ext.assert_present(1, out) + d.assert_present(out) + + def test_extending_pl_cmd(self): + cmd = self.py_pl_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.single_arg) + help.assert_opts( + cmd.flag_opt, + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "m", "nt", + cmd.pl_ext_stacking_from_aux_action, + cmd.pl_ext_stacking_from_aux_flag, + "t", + cmd.test_apps_shared_ext_action, + cmd.test_apps_shared_ext_flag, + "v", 'vk', + ) + help.assert_subcmds("help", cmd.subc) + + assert help.aux_exts == ['pl_ext_stacking_from_aux'] + assert help.pl_exts == ['test_apps_shared_test_helpers'] + assert help.app_exts == True + + out = cmd.run() + cmd.assert_args( + out, + (cmd.single_arg, None), + (cmd.pl_ext_stacking_from_aux_action, None), + (cmd.test_apps_shared_ext_action, None), + (cmd.generic_app_ext_flag, None), + ) + + sa_v = "single_arg_val" + out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) + cmd.assert_args( + out, + (cmd.single_arg, sa_v), + (cmd.pl_ext_stacking_from_aux_action, None), + (cmd.test_apps_shared_ext_action, None), + (cmd.generic_app_ext_action, [self.na]), + (cmd.generic_app_ext_flag, 1), + ) + + def test_extending_pl_subc(self): + cmd = self.py_pl_subc + help = cmd.get_help_msg() + help.assert_args(cmd.single_arg) + help.assert_opts( + cmd.flag_opt, + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "m", "nt", + cmd.pl_ext_stacking_from_aux_action_subc, + cmd.pl_ext_stacking_from_aux_flag_subc, + "t", + cmd.test_apps_shared_ext_action, + cmd.test_apps_shared_ext_flag, + "v", 'vk', + ) + help.assert_subcmds(None) + + out = cmd.run() + cmd.assert_args( + out, + (cmd.single_arg, None), + (cmd.pl_ext_stacking_from_aux_action_subc, None), + (cmd.test_apps_shared_ext_action, None), + (cmd.generic_app_ext_action, None), + (cmd.generic_app_ext_flag, None), + ) + + sa_v = "single_arg_val" + out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) + cmd.assert_args( + out, + (cmd.single_arg, sa_v), + (cmd.pl_ext_stacking_from_aux_action_subc, None), + (cmd.test_apps_shared_ext_action, None), + (cmd.generic_app_ext_action, [self.na]), + (cmd.generic_app_ext_flag, 1), + ) + + def test_extending_aux_cmd(self): + cmd = self.aux_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.action_arg) + help.assert_opts( + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "m", "nt", + cmd.pl_ext_stacking_from_aux_action, + cmd.pl_ext_stacking_from_aux_flag, + cmd.python_plugin_action, + cmd.python_plugin_flag, + "t", "v", 'vk', + ) + help.assert_subcmds("help", cmd.subc) + + out = cmd.run() + cmd.assert_args( + out, + (cmd.action_arg, None), + (cmd.pl_ext_stacking_from_aux_action, None), + (cmd.python_plugin_action, None), + (cmd.generic_app_ext_action, None), + (cmd.generic_app_ext_flag, None), + ) + + sa_v = "single_arg_val" + out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) + cmd.assert_args( + out, + (cmd.action_arg, [sa_v]), + (cmd.pl_ext_stacking_from_aux_action, None), + (cmd.python_plugin_action, None), + (cmd.generic_app_ext_action, [self.na]), + (cmd.generic_app_ext_flag, 1), + ) + + def test_extending_aux_subc(self): + cmd = self.aux_subc + help = cmd.get_help_msg() + help.assert_args(cmd.action_arg) + help.assert_opts( + cmd.flag_opt, + cmd.generic_app_ext_action, + cmd.generic_app_ext_flag, + "help", "m", "nt", + cmd.pl_ext_stacking_from_aux_action_subc, + cmd.pl_ext_stacking_from_aux_flag_subc, + cmd.python_plugin_action_subc, + cmd.python_plugin_flag_subc, + "t", "v", 'vk', + ) + help.assert_subcmds(None) + + out = cmd.run() + cmd.assert_args( + out, + (cmd.action_arg, None), + (cmd.pl_ext_stacking_from_aux_action_subc, None), + (cmd.python_plugin_action_subc, None), + (cmd.generic_app_ext_action, None), + (cmd.generic_app_ext_flag, None), + ) + + sa_v = "single_arg_val" + out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) + cmd.assert_args( + out, + (cmd.action_arg, [sa_v]), + (cmd.pl_ext_stacking_from_aux_action_subc, None), + (cmd.python_plugin_action_subc, None), + (cmd.generic_app_ext_action, [self.na]), + (cmd.generic_app_ext_flag, 1), + ) + + def test_error_msg_on_missing_implementation(self): + cmd = self.missing_ext_impl_cmd + help = cmd.get_help_msg() + help.assert_args(cmd.single_arg, cmd.multi_arg) + help.assert_opts( + cmd.app_ext_missing_impl, + cmd.flag_opt, + "help", "m", "nt", + cmd.opt_taking_value, + "t", "v", 'vk' + ) + + assert help.aux_exts == None + assert help.pl_exts == None + assert help.app_exts == True + + out = cmd.run() + r = origen.app.root.joinpath('example/commands/extensions') + assert "Could not find implementation for app extension 'None'" in out + assert f"From root '{r}', searched:" in out + assert f"plugin.python_plugin.plugin_test_args.py" in out + assert f"plugin{os.sep}python_plugin.plugin_test_args.py" in out + assert f"plugin{os.sep}python_plugin{os.sep}plugin_test_args.py" in out + + @pytest.mark.skip + def error_msg_on_extending_unknown_cmd(self): + fail + + @pytest.mark.skip + def test_error_in_before(self): + fail + + @pytest.mark.skip + def test_error_in_after(self): + fail + + @pytest.mark.skip + def test_error_in_cleanup(self): + fail \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/tests__core_cmds.py b/test_apps/python_app/tests/cli/tests__core_cmds.py new file mode 100644 index 00000000..30394729 --- /dev/null +++ b/test_apps/python_app/tests/cli/tests__core_cmds.py @@ -0,0 +1,109 @@ +import pytest, origen +from .shared import CLICommon +from .core_cmds.target import T_Target + +class T_AppWorkspaceCoreCommands(CLICommon): + @property + def cmd_shortcuts__app(self): + return { + 'arg_opt_warmup': 'arg_opt_warmup', + "examples": "examples", + "playground": "playground", + "y": "playground", + "nested_app_cmds": "nested_app_cmds", + "disabling_app_opts": "disabling_app_opts", + } + + def test_app_workspace_help_message(self): + help = self.in_app_cmds.origen.get_help_msg() + assert help.root_cmd is True + assert "Origen CLI: 2." in help.version_str + help.assert_bare_opts() + + assert set(help.subcmd_names) == set(self.in_app_cmds.all_names_add_help) + assert help.app_cmd_shortcuts == self.cmd_shortcuts__app + # FOR_PR plugin commands + # assert help.pl_cmd_shortcuts == self.cmd_shortcuts__default_plugins + # FOR_PR Aux commands + # assert help.pl_cmd_shortcuts == { + # "plugin_says_hi": ("python_plugin", "plugin_says_hi"), + # "echo": ("python_plugin", "echo"), + # } + + @pytest.mark.parametrize("cmd", CLICommon.in_app_cmds.cmds, ids=CLICommon.in_app_cmds.all_names) + def test_core_commands_are_available(self, cmd): + ''' Just testing that "-h" doesn't crash for all core commands ''' + help = cmd.get_help_msg() + assert len(help.opts) >= 3 + # FOR_PR add check for app opts when applicable + + class TestEval(CLICommon): + _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.eval + + def test_help_msg(self, cmd, no_config_run_opts): + help = cmd.get_help_msg(run_opts=no_config_run_opts) + help.assert_summary(cmd.help) + help.assert_args(cmd.code) + help.assert_bare_app_opts() + + def test_basic_eval(self, cmd, no_config_run_opts): + d = cmd.demos["multi_statement_single_arg"] + out = d.run(run_opts=no_config_run_opts) + d.assert_present(out) + + class TestTarget(T_Target): + pass + + class TestInteractive(CLICommon): + _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.i + + def test_help_msg(self, cmd, no_config_run_opts): + help = cmd.get_help_msg(run_opts=no_config_run_opts) + help.assert_summary(cmd.help) + help.assert_args(None) + help.assert_bare_app_opts() + + @pytest.mark.skip + def test_interactive(self, cmd, no_config_run_opts): + # TODO try to get an interactive test that just starts/stops + proc = subprocess.Popen(["poetry", "run", "origen", "i"], universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + try: + proc.stdin.flush() + #proc.stdout.flush() + m = 'print("hi from interactive!")' + import time + # time.sleep(10) + assert proc.poll() is None + # proc.stdin.write(f"{m}\n".encode()) + assert proc.poll() is None + # lines = proc.stdout.readlines() + # print(lines) + # assert lines[-1] == m + + m = "print('hi again!')" + # proc.stdin.write(f"{m}\n".encode()) + assert proc.poll() is None + # lines = proc.stdout.readlines() + # assert lines[0] == m + + proc.stdin.write("exit()\n") + assert proc.wait(3) == 0 + lines = proc.stdout.readline() + print(lines) + finally: + if proc.poll() is None: + proc.kill() + # print(proc.stdout.readline()) + # print(proc.stdout.readline()) + # print(proc.stdout.readline()) + # print(proc.stdout.readline()) + for l in proc.stdout: + # lines = proc.stdout.readlines() + if "CMD" in l: + break + print(l) + fail + + # class TestCredentials(CLICommon): + # def test_credentials(self): + # ? diff --git a/test_apps/python_app/tests/cli/tests__reserved_opts.py b/test_apps/python_app/tests/cli/tests__reserved_opts.py new file mode 100644 index 00000000..73f7edbd --- /dev/null +++ b/test_apps/python_app/tests/cli/tests__reserved_opts.py @@ -0,0 +1,313 @@ +import pytest, origen +from .shared import CLICommon, Cmd, CmdOpt, CmdExtOpt +from origen.helpers.regressions.cli.command import SrcTypes + +class T_ReservedOpts(CLICommon): + cmd = CLICommon.app_sub_cmd( + "reserved_opt_error_gen", + help = "Generate error messages when reserved opts are used", + opts=[ + CmdOpt("conflicting_help", help="Conflicting Opt"), + CmdOpt("conflicting_target", help="Conflicting Opt"), + CmdOpt("non_conflicting", help="Non-Conflicting Opt", ln="non_conflicting", sn="n"), + ], + subcmds=[ + Cmd( + "single_conflicting_opt", + help="Generate error messages for reserved opts", + opts=[ + CmdOpt("non_conflicting", help="Non-Conflicting Opt"), + CmdOpt("conflicting_target", help="Conflicting Opt"), + ], + ), + Cmd( + "multiple_conflicting_opts", + help="Generate error messages for reserved opts", + opts=[ + CmdOpt("conflicting_target", help="Conflicting Opt"), + CmdOpt("conflicting_mode", help="Conflicting Opt"), + CmdOpt("not_conflicting", help="Non-Conflicting Opt", sn='n'), + CmdOpt("conflicting_no_targets", help="Conflicting Opt"), + CmdOpt("conflicting_target_again", help="Conflicting Opt"), + CmdOpt("conflicting_v", help="Conflicting Opt"), + CmdOpt("conflicting_vk", help="Conflicting Opt"), + CmdOpt("conflicting_help", help="Conflicting Opt", ln_aliases=["help_alias"], sn_aliases=["g", "i"]), + ], + subcmds=[ + Cmd( + "subc", + help="Generate error messages for reserved opts - subc", + opts=[ + CmdOpt("conflicting_help", help="Conflicting Opt"), + ], + subcmds=[ + Cmd( + "subc", + help="Generate error messages for reserved opts - subc - subc", + opts=[ + CmdOpt("conflicting_help", help="Conflicting Opt", ln_aliases=["help2", "help3"]), + CmdOpt("conflicting_v", help="Conflicting Opt", sn="c"), + ], + ), + ] + ) + ] + ) + ], + with_env={"ORIGEN_APP_TEST_RESERVED_OPT_ERRORS": "1"}, + ) + + @classmethod + def setup_class(cls): + if not hasattr(cls, "base_cmd_help"): + cls.base_cmd_help = cls.cmd.get_help_msg() + if not hasattr(cls, "ext_cmd_help"): + cls.ext_cmd_help = cls.ext_cmd.get_help_msg() + + @classmethod + def teardown_class(cls): + delattr(cls, "base_cmd_help") + delattr(cls, "ext_cmd_help") + + def test_opts_are_added_with_respect_to_errors(self): + help = self.base_cmd_help + help.assert_args(None) + help.assert_opts( + self.cmd.conflicting_help, + self.cmd.conflicting_target, + "h", "m", + self.cmd.non_conflicting, + "nt", "t", "v", "vk" + ) + help.assert_subcmds("help", self.cmd.multiple_conflicting_opts, self.cmd.single_conflicting_opt) + + cmd = self.cmd.single_conflicting_opt + help = cmd.get_help_msg() + help.assert_opts( + cmd.conflicting_target, + "h", "m", "nt", + cmd.non_conflicting, + "t", "v", "vk" + ) + + cmd = self.cmd.multiple_conflicting_opts + help = cmd.get_help_msg() + help.assert_opts( + cmd.conflicting_help, + cmd.conflicting_mode, + cmd.conflicting_no_targets, + cmd.conflicting_target, + cmd.conflicting_target_again, + cmd.conflicting_v, + cmd.conflicting_vk, + "h", "m", + cmd.not_conflicting, + "nt", "t", "v", "vk" + ) + + cmd = cmd.subc + help = cmd.get_help_msg() + help.assert_opts( + cmd.conflicting_help, + "h", "m", "nt", "t", "v", "vk" + ) + + cmd = cmd.subc + help = cmd.get_help_msg() + help.assert_opts( + cmd.conflicting_v, + cmd.conflicting_help, + "h", "m", "nt", "t", "v", "vk" + ) + + errors = [ + (cmd, cmd.conflicting_help, [("sn", "h")]), + (cmd, cmd.conflicting_target, [("sn", "t"), ("ln", "target")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_help, [("ln", "help"), ("sn", "h")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_vk, [("lna", "verbosity_keywords"), ("ln", "vk")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_v, [("ln", "verbosity"), ("sn", "v")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_no_targets, [("lna", "no_targets"), ("lna", "no_target")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_target_again, [("lna", "targets"), ("ln", "target"), ("sn", "t")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_mode, [("lna", "mode")]), + (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_target, [("sn", "t")]), + (cmd.multiple_conflicting_opts.subc, cmd.multiple_conflicting_opts.subc.conflicting_help, [("sn", "h")]), + (cmd.multiple_conflicting_opts.subc.subc, cmd.multiple_conflicting_opts.subc.subc.conflicting_v, [("sna", "v"), ("ln", "verbosity")]), + (cmd.multiple_conflicting_opts.subc.subc, cmd.multiple_conflicting_opts.subc.subc.conflicting_help, [("lna", "help")]), + (cmd.single_conflicting_opt, cmd.single_conflicting_opt.conflicting_target, [("ln", "target")]), + ] + @pytest.mark.parametrize( + "cmd,opt,type,name", + [(o[0], o[1], inner[0], inner[1]) for o in errors for inner in o[2]], + ids=[f"{o[0].name}-{o[1].name}-{inner[0]}-{inner[1]}" for o in errors for inner in o[2]], + ) + def test_error_msg_using_reserved_opts(self, cmd, opt, type, name): + if type == "sn": + assert cmd.reserved_opt_sn_conflict_msg(opt, name) in self.base_cmd_help.text + elif type == "sna": + assert cmd.reserved_opt_sna_conflict_msg(opt, name) in self.base_cmd_help.text + elif type == "ln": + assert cmd.reserved_opt_ln_conflict_msg(opt, name) in self.base_cmd_help.text + elif type == "lna": + assert cmd.reserved_opt_lna_conflict_msg(opt, name) in self.base_cmd_help.text + else: + raise RuntimeError(f"Unknown type {type}") + + def test_opts_are_still_available_under_non_reserved_names(self): + cmd = self.cmd + out = cmd.run("--conflicting_help", "--conflicting_target", "--non_conflicting", "-n") + cmd.assert_args( + out, + (cmd.conflicting_help, 1), + (cmd.conflicting_target, 1), + (cmd.non_conflicting, 2) + ) + + cmd = self.cmd.single_conflicting_opt + out = cmd.run("--non_conflicting", "--conflicting_target") + cmd.assert_args( + out, + (cmd.conflicting_target, 1), + (cmd.non_conflicting, 1) + ) + + cmd = self.cmd.multiple_conflicting_opts + out = cmd.run( + "--conflicting_target", + "--conflicting_mode", + "-n", + "--conflicting_no_targets", + "--conflicting_target_again", + "--conflicting_v", + "--conflicting_vk", + "--conflicting_help", "-g", "-i", "--help_alias", + ) + cmd.assert_args( + out, + (cmd.conflicting_target, 1), + (cmd.conflicting_mode, 1), + (cmd.not_conflicting, 1), + (cmd.conflicting_no_targets, 1), + (cmd.conflicting_target_again, 1), + (cmd.conflicting_v, 1), + (cmd.conflicting_vk, 1), + (cmd.conflicting_help, 4), + ) + + cmd = cmd.subc + out = cmd.run("--conflicting_help") + cmd.assert_args(out, (cmd.conflicting_help, 1)) + + cmd = cmd.subc + out = cmd.run( + "--conflicting_help", "--help2", "--help3", + "-c", + ) + cmd.assert_args( + out, + (cmd.conflicting_help, 3), + (cmd.conflicting_v, 1) + ) + + ext_error_msgs_env = {"ORIGEN_APP_EXT_TEST_RESERVED_OPT_ERRORS": "1", "origen_bypass_config_lookup": "1"} + ext_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( + CmdExtOpt.from_src( + "example", + SrcTypes.APP, + CmdExtOpt( + "conflicting_target", + help="Conflicting Core Extension" + ), + CmdExtOpt( + "conflicting_no_target", + help="Conflicting Core Extension", + sn="n", + ), + CmdExtOpt( + "conflicting_mode", + help="Conflicting Core Extension", + ln="mode_conflict", + sn_aliases=["m"] + ), + CmdExtOpt( + "conflicting_help", + help="Conflicting Core Extension", + ln="help_conflict", + ln_aliases=["help1"] + ), + CmdExtOpt( + "conflicting_v", + help="Conflicting Core Extension", + sn_aliases=["w"] + ), + CmdExtOpt( + "conflicting_vk", + help="Conflicting Core Extension" + ), + ), + with_env=ext_error_msgs_env, + from_configs=CLICommon.configs.suppress_plugin_collecting_config, + ) + + def test_ext_opts_are_added_with_respect_to_errors(self): + cmd = self.ext_cmd + help = self.ext_cmd_help + help.assert_args(cmd.code) + help.assert_opts( + cmd.conflicting_target, + cmd.conflicting_v, + cmd.conflicting_vk, + "h", + cmd.conflicting_help, + "m", + cmd.conflicting_mode, + cmd.conflicting_no_target, + "nt", "t", "v", "vk" + ) + help.assert_subcmds(None) + + ext_errors = [ + (ext_cmd, ext_cmd.conflicting_target, [("ln", "target"), ("sn", "t")]), + (ext_cmd, ext_cmd.conflicting_no_target, [("lna", "no_target"), ("lna", "no_targets")]), + (ext_cmd, ext_cmd.conflicting_help, [("sn", "h"), ("lna", "help")]), + (ext_cmd, ext_cmd.conflicting_mode, [("lna", "mode")]), + (ext_cmd, ext_cmd.conflicting_v, [("ln", "verbosity"), ("sn", "v")]), + (ext_cmd, ext_cmd.conflicting_vk, [("lna", "verbosity_keywords"), ("lna", "vk")]), + ] + @pytest.mark.parametrize( + "cmd,opt,type,name", + [(o[0], o[1], inner[0], inner[1]) for o in ext_errors for inner in o[2]], + ids=[f"{o[0].name}-{o[1].name}-{inner[0]}-{inner[1]}" for o in ext_errors for inner in o[2]], + ) + def test_ext_error_msg_using_reserved_opts(self, cmd, opt, type, name): + if type == "sn": + assert cmd.reserved_opt_sn_conflict_msg(opt, name) in self.ext_cmd_help.text + elif type == "sna": + assert cmd.reserved_opt_sna_conflict_msg(opt, name) in self.ext_cmd_help.text + elif type == "ln": + assert cmd.reserved_opt_ln_conflict_msg(opt, name) in self.ext_cmd_help.text + elif type == "lna": + assert cmd.reserved_opt_lna_conflict_msg(opt, name) in self.ext_cmd_help.text + else: + raise RuntimeError(f"Unknown type {type}") + + def test_ext_opts_are_still_available_under_non_reserved_names(self): + cmd = self.ext_cmd + out = cmd.run( + "from test_apps_shared_test_helpers.aux_cmds import run; run()", + "--conflicting_target", + "-n", + "--mode_conflict", "-m", + "--help_conflict", "--help1", + "--conflicting_v", "-w", + "--conflicting_vk", + ) + self.Cmd.assert_args( + cmd, + out, + (cmd.conflicting_target, 1), + (cmd.conflicting_no_target, 1), + (cmd.conflicting_mode, 2), + (cmd.conflicting_help, 2), + (cmd.conflicting_v, 2), + (cmd.conflicting_vk, 1), + ) diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 3ec10bf8..77831f33 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -3,36 +3,23 @@ import subprocess import os import origen -from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg -class CLICommon(CLIShared): - _no_config_run_opts = { - "with_configs": CLIShared.configs.suppress_plugin_collecting_config, - "bypass_config_lookup": True - } +from cli.tests__app_cmd_building import T_AppCmdBuilding +from cli.tests__core_cmds import T_AppWorkspaceCoreCommands +from cli.tests__cmd_exts_from_app import T_ExtendingFromAppCmds +from cli.tests__reserved_opts import T_ReservedOpts - @pytest.fixture - def no_config_run_opts(self): - return self._no_config_run_opts +class TestAppCmdBuilding(T_AppCmdBuilding): + pass - def show_per_cmd_targets(self, targets=None, **kwargs): - prefix = "Current Targets: " - if targets is not None: - kwargs.setdefault("run_opts", {})["targets"] = targets - out = self.eval(f"print( f'{prefix}{{origen.target.current_targets}}' )", **kwargs) - out = out.split("\n") - return eval(next(t.replace(prefix, '') for t in out if t.startswith(prefix))) - - class Targets: - hawk = "hawk" - falcon = "falcon" - eagle = "eagle" - uflex = "uflex" - - targets = Targets() +class TestExtendingFromAppCommands(T_ExtendingFromAppCmds): + pass +class TestAppWorkspaceCoreCommands(T_AppWorkspaceCoreCommands): + pass -Cmd = CLIShared.Cmd +class TestReservedOpts(T_ReservedOpts): + pass origen_cli = os.getenv('TRAVIS_ORIGEN_CLI') or 'origen' @@ -67,254 +54,6 @@ def test_origen_g(): universal_newlines=True) assert process.wait() == 0 -class TestBadConfigs: - @property - def bad_config_env(self): - return { - **os.environ, - "origen_bypass_config_lookup": "1", - "origen_config_paths": str( - pathlib.Path(__file__).parent.joinpath("origen_utilities/configs/ldap/test_bad_ldap_config.toml").absolute() - ) - } - - def test_origen_v(self): - r = subprocess.run( - [origen_cli, '-v'], - capture_output=True, - env=self.bad_config_env - ) - assert r.returncode == 1 - out = r.stdout.decode("utf-8").strip() - err = r.stderr.decode("utf-8").strip() - p = pathlib.Path("tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml") - # TODO should this kill the process? - # assert "Couldn't boot app to determine the in-application Origen version" in out - assert f"invalid type: string \"hi\", expected an integer for key `ldaps.bad.timeout` in {str(p)}" in out - assert err == "" - - def test_origen_cmd(self): - r = subprocess.run( - [origen_cli, 'g', r'./example/patterns/toggle.py', '-t', r'./targets/eagle_with_smt7.py'], - capture_output=True, - env=self.bad_config_env - ) - assert r.returncode == 1 - out = r.stdout.decode("utf-8").strip() - err = r.stderr.decode("utf-8").strip() - p = pathlib.Path("tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml") - assert f"invalid type: string \"hi\", expected an integer for key `ldaps.bad.timeout` in {str(p)}" in out - assert err == "" - - def test_bad_config_path(self): - r = subprocess.run( - [origen_cli, '-v'], - capture_output=True, - env={ - **self.bad_config_env, - **{ - "origen_config_paths": str(pathlib.Path(__file__).parent.joinpath("missing.toml").absolute()) - } - } - ) - assert r.returncode == 1 - out = r.stdout.decode("utf-8").strip() - err = r.stderr.decode("utf-8").strip() - # TODO should this kill the process? - # assert "Couldn't boot app to determine the in-application Origen version" in out - assert "missing.toml either does not exists or is not accessible" in out - assert err == "" - -class TestAppWorkspaceCoreCommands(CLIShared): - @property - def cmd_shortcuts__app(self): - return { - 'arg_opt_warmup': 'arg_opt_warmup', - "examples": "examples", - "playground": "playground", - "y": "playground", - "nested_app_cmds": "nested_app_cmds", - "disabling_app_opts": "disabling_app_opts", - } - - def test_app_workspace_help_message(self): - help = self.in_app_cmds.origen.get_help_msg() - assert help.root_cmd is True - assert "Origen CLI: 2." in help.version_str - - # FOR_PR - assert len(help.opts) == 3 - help.assert_help_opt_at(0) - help.assert_v_opt_at(1) - help.assert_vk_opt_at(2) - - assert set(help.subcmd_names) == set(self.in_app_cmds.all_names_add_help) - print(help.app_cmd_shortcuts) - assert help.app_cmd_shortcuts == self.cmd_shortcuts__app - # FOR_PR plugin commands - # assert help.pl_cmd_shortcuts == self.cmd_shortcuts__default_plugins - # FOR_PR Aux commands - # assert help.pl_cmd_shortcuts == { - # "plugin_says_hi": ("python_plugin", "plugin_says_hi"), - # "echo": ("python_plugin", "echo"), - # } - - @pytest.mark.parametrize("cmd", CLIShared.in_app_cmds.cmds, ids=CLIShared.in_app_cmds.all_names) - def test_core_commands_are_available(self, cmd): - ''' Just testing that "-h" doesn't crash for all core commands ''' - help = cmd.get_help_msg() - assert len(help.opts) >= 3 - -class TestAppCommandBuilding(CLIShared): - warmup_cmd = CLIShared.app_sub_cmd( - "arg_opt_warmup", - help = "Gross test command demonstrating args/opts from app commands", - args=[ - CmdArg("first", help="First Argument - Required", required=True), - CmdArg("second", help="Second Multi-Argument - Not Required", use_delimiter=True, multi=True), - ], - opts=[ - CmdOpt("flag_opt", sn="f", help="Flag opt"), - CmdOpt("single_opt", sn_aliases=["s"], takes_value=True, help="Single-value non-required opt"), - CmdOpt("multi_opt", sn_aliases=["m"], ln_aliases=["m_opt"], multi=True, help="Multi-value non-required opt"), - CmdOpt("hidden_flag_opt", hidden=True, ln="hidden", help="Hidden flag opt"), - ] - ) - nested_cmds = CLIShared.app_sub_cmd( - "nested_app_cmds", - help="Nested app cmds", - subcmds=[ - Cmd( - "nested_l1", - help="Nested app cmds level 1", - subcmds=[ - Cmd( - "nested_l2_a", - help="Nested app cmds level 2 (A)", - subcmds=[ - Cmd( - "nested_l3_a", - help="Nested app cmds level 3 (A-A)" - ), - Cmd( - "nested_l3_b", - help="Nested app cmds level 3 (A-B)" - ), - ] - ), - Cmd( - "nested_l2_b", - help="Nested app cmds level 2 (B)", - subcmds=[ - Cmd( - "nested_l3_a", - help="Nested app cmds level 3 (B-A)" - ), - Cmd( - "nested_l3_b", - help="Nested app cmds level 3 (B-B)" - ), - ] - ) - ] - ) - ] - ) - - def test_app_command_args_and_opts(self): - cmd = self.warmup_cmd - help = cmd.get_help_msg() - help.assert_args(cmd.first, cmd.second) - help.assert_opts( - cmd.flag_opt, - 'h', 'm', - cmd.multi_opt, - 'nt', - cmd.single_opt, - 't', 'v', 'vk' - ) - help.assert_subcmds(None) - - rv = "req_arg" - m0 = "m0" - m12 = "m1,m2" - mo0 = "mo0" - mo12 = "m01,m02" - mo4 = "mo4" - sv = "s_opt" - - out = cmd.run( - rv, - m0, m12, - cmd.flag_opt.sn_to_cli(), - cmd.single_opt.sna_to_cli(), sv, - cmd.multi_opt.sna_to_cli(), mo0, mo12, - cmd.multi_opt.ln_to_cli(), mo4, - cmd.hidden_flag_opt.ln_to_cli(), - ) - cmd.assert_args( - out, - (cmd.first, rv), - (cmd.second, [m0, m12]), - (cmd.flag_opt, 1), - (cmd.single_opt, sv), - (cmd.multi_opt, [mo0, mo12, mo4]), - (cmd.hidden_flag_opt, 1) - ) - - out = cmd.run( - rv, - cmd.flag_opt.sn_to_cli(), cmd.flag_opt.sn_to_cli(), - cmd.multi_opt.sna_to_cli(), mo0, mo12, - ) - cmd.assert_args( - out, - (cmd.first, rv), - (cmd.flag_opt, 2), - (cmd.multi_opt, [mo0, mo12]) - ) - - out = cmd.gen_error() - assert self.err_msgs.missing_required_arg(cmd.first) in out - - nested_cmd_testcases = [ - (nested_cmds, 0, None), - (nested_cmds.nested_l1, 1, None), - (nested_cmds.nested_l1.nested_l2_a, 2, 'A'), - (nested_cmds.nested_l1.nested_l2_a.nested_l3_a, 3, 'A-A'), - (nested_cmds.nested_l1.nested_l2_a.nested_l3_b, 3, 'A-B'), - (nested_cmds.nested_l1.nested_l2_b, 2, 'B'), - (nested_cmds.nested_l1.nested_l2_b.nested_l3_a, 3, 'B-A'), - (nested_cmds.nested_l1.nested_l2_b.nested_l3_b, 3, 'B-B'), - ] - nested_cmd_ids = [f"{cmd[0].name} {'Base' if cmd[2] is None else cmd[2]}" for cmd in nested_cmd_testcases] - @pytest.mark.parametrize("cmd,lvl,sublvl", nested_cmd_testcases, ids=nested_cmd_ids) - def test_nested_cmds(self, cmd, lvl, sublvl): - help = cmd.get_help_msg() - subcs = list(cmd.subcmds.values()) - if len(subcs) == 0: - help.assert_subcmds(None) - else: - subcs.insert(0, "help") - help.assert_subcmds(*subcs) - - out = cmd.run() - assert f"Hi from 'nested_app_cmds' level {lvl}{ ' (' + sublvl + ')' if sublvl else ''}!" in out - -class TestErrorCases(CLIShared): - @pytest.mark.skip - def test_invalid_cmd_toml(self): - # FOR_PR need to make app specific - out = self.in_app_cmds.origen.run(with_env={"ORIGEN_APP_COMMANDS": "test_case_cmds/invalid.toml,test_case_cmds/error_cases.toml"}) # run_cli_cmd(["-h"]) #.split("\n\n") - print(out) - help = self.HelpMsg(out) - assert list(help.subcmds.keys()) == ["add_aux_cmd", "cmd_testers", "help", "python_no_app_aux_cmds"] - assert f"Unable to add auxillary commands at '{self.aux_cmd_configs_dir}{os.sep}./invalid_aux_cmd_path.toml' from config '{self.aux_cmd_configs_dir}{os.sep}invalid_aux_cmd_path_config.toml'. The following error was met" in out - - @pytest.mark.skip - def test_error_global_and_in_app_setting_used(self): - fail - @pytest.mark.skip class TestPluginCommandsAreAdded: ... @@ -334,714 +73,12 @@ def test_app_cmd_overrides_aux_cmd(self): # def test_extending_app_cmds(self): # fail -from origen.helpers.regressions.cli.command import SrcTypes #, CmdExtOpt -from test_apps_shared_test_helpers.cli import CmdExtOpt, Cmd - -class TestExtendingFromAppCommands(CLIShared): - extend_core_cmds_env = {"ORIGEN_APP_EXTEND_CORE_CMDS": "1"} - extend_pl_test_ext_stacking = {"ORIGEN_APP_EXT_PL_TEST_EXT_STACKING": "1"} - exts = CmdExtOpt.from_src( - "example", - SrcTypes.APP, - CmdExtOpt( - "generic_app_ext_action", - help="Action from the app", - multi=True, - ), - CmdExtOpt( - "generic_app_ext_flag", - help="Flag ext from the app", - ), - ) - core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( - exts, - with_env=extend_core_cmds_env, - from_configs=CLIShared.configs.suppress_plugin_collecting_config, - ) - stacked_core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( - [ - *CLIShared.exts.exts["generic_core_ext"]["exts"], - *exts - ], - from_configs=[CLIShared.exts.core_cmd_exts_cfg], - with_env=extend_core_cmds_env, - ) - py_pl_cmd = CLIShared.python_plugin.plugin_test_ext_stacking.extend( - [ - *CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking"]["exts"][1:3], - *CLIShared.exts.test_apps_shared_generic_exts, - *exts - ], - from_configs=[CLIShared.exts.pl_ext_stacking_from_aux_cfg], - with_env=extend_pl_test_ext_stacking, - ) - py_pl_subc = CLIShared.python_plugin.plugin_test_ext_stacking.subc.extend( - [ - *CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking.subc"]["exts"][1:3], - *CLIShared.exts.test_apps_shared_generic_exts, - *exts - ], - from_configs=[CLIShared.exts.pl_ext_stacking_from_aux_cfg], - with_env=extend_pl_test_ext_stacking, - ) - aux_cmd = CLIShared.aux.ns.dummy_cmds.dummy_cmd.extend( - [ - *CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["exts"][2:6], - *exts - ], - from_configs=[CLIShared.exts.pl_ext_stacking_from_aux_cfg], - with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] - ) - aux_subc = CLIShared.aux.ns.dummy_cmds.dummy_cmd.subc.extend( - [ - *CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd.subc"]["exts"][2:6], - *exts - ], - from_configs=[CLIShared.exts.pl_ext_stacking_from_aux_cfg], - with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] - ) - na = "no_action" - - missing_ext_impl_cmd = CLIShared.python_plugin.plugin_test_args.extend( - CmdExtOpt.from_src( - "example", - SrcTypes.APP, - CmdExtOpt( - "app_ext_missing_impl", - help="App extension missing the implementation", - ), - ), - with_env={"ORIGEN_APP_PL_CMD_MISSING_EXT_IMPL": "1"} - ) - - def test_extending_global_cmds(self): - cmd = self.core_cmd - help = cmd.get_help_msg() - help.assert_args(cmd.code) - help.assert_opts( - cmd.generic_app_ext_action, - cmd.generic_app_ext_flag, - *self.in_app_cmds.standard_opts() - ) - - assert help.aux_exts == None - assert help.pl_exts == None - assert help.app_exts == True - - d = cmd.demos["minimal"] - out = d.run() - cmd.generic_app_ext_flag.assert_present(None, out) - d.assert_present(out) - - out = d.run(add_args=[cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()]) - cmd.generic_app_ext_action.assert_present([self.na], out) - cmd.generic_app_ext_flag.assert_present(1, out) - d.assert_present(out) - - def test_stacking_pl_aux_and_app_ext(self): - cmd = self.stacked_core_cmd - help = cmd.get_help_msg() - help.assert_args(cmd.code) - help.assert_opts( - cmd.core_cmd_exts_generic_core_ext, - cmd.generic_app_ext_action, - cmd.generic_app_ext_flag, - "help", "mode", "no_targets", - cmd.pl_ext_cmds_generic_ext, - "targets", "v", 'vk' - ) - assert help.aux_exts == ['core_cmd_exts'] - assert help.pl_exts == ['pl_ext_cmds'] - assert help.app_exts == True - - d = cmd.demos["minimal"] - out = d.run(add_args=[ - cmd.generic_app_ext_action.ln_to_cli(), self.na, - cmd.generic_app_ext_flag.ln_to_cli(), - cmd.pl_ext_cmds_generic_ext.ln_to_cli(), - cmd.core_cmd_exts_generic_core_ext.ln_to_cli(), - ]) - cmd.generic_app_ext_action.assert_present([self.na], out) - cmd.generic_app_ext_flag.assert_present(1, out) - cmd.pl_ext_cmds_generic_ext.assert_present(1, out) - cmd.core_cmd_exts_generic_core_ext.assert_present(1, out) - d.assert_present(out) - - def test_extending_pl_cmd(self): - cmd = self.py_pl_cmd - help = cmd.get_help_msg() - help.assert_args(cmd.single_arg) - help.assert_opts( - cmd.flag_opt, - cmd.generic_app_ext_action, - cmd.generic_app_ext_flag, - "help", "m", "nt", - cmd.pl_ext_stacking_from_aux_action, - cmd.pl_ext_stacking_from_aux_flag, - "t", - cmd.test_apps_shared_ext_action, - cmd.test_apps_shared_ext_flag, - "v", 'vk', - ) - help.assert_subcmds("help", cmd.subc) - - assert help.aux_exts == ['pl_ext_stacking_from_aux'] - assert help.pl_exts == ['test_apps_shared_test_helpers'] - assert help.app_exts == True - - out = cmd.run() - cmd.assert_args( - out, - (cmd.single_arg, None), - (cmd.pl_ext_stacking_from_aux_action, None), - (cmd.test_apps_shared_ext_action, None), - (cmd.generic_app_ext_flag, None), - ) - - sa_v = "single_arg_val" - out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) - cmd.assert_args( - out, - (cmd.single_arg, sa_v), - (cmd.pl_ext_stacking_from_aux_action, None), - (cmd.test_apps_shared_ext_action, None), - (cmd.generic_app_ext_action, [self.na]), - (cmd.generic_app_ext_flag, 1), - ) - - def test_extending_pl_subc(self): - cmd = self.py_pl_subc - help = cmd.get_help_msg() - help.assert_args(cmd.single_arg) - help.assert_opts( - cmd.flag_opt, - cmd.generic_app_ext_action, - cmd.generic_app_ext_flag, - "help", "m", "nt", - cmd.pl_ext_stacking_from_aux_action_subc, - cmd.pl_ext_stacking_from_aux_flag_subc, - "t", - cmd.test_apps_shared_ext_action, - cmd.test_apps_shared_ext_flag, - "v", 'vk', - ) - help.assert_subcmds(None) - - out = cmd.run() - cmd.assert_args( - out, - (cmd.single_arg, None), - (cmd.pl_ext_stacking_from_aux_action_subc, None), - (cmd.test_apps_shared_ext_action, None), - (cmd.generic_app_ext_action, None), - (cmd.generic_app_ext_flag, None), - ) - - sa_v = "single_arg_val" - out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) - cmd.assert_args( - out, - (cmd.single_arg, sa_v), - (cmd.pl_ext_stacking_from_aux_action_subc, None), - (cmd.test_apps_shared_ext_action, None), - (cmd.generic_app_ext_action, [self.na]), - (cmd.generic_app_ext_flag, 1), - ) - - def test_extending_aux_cmd(self): - cmd = self.aux_cmd - help = cmd.get_help_msg() - help.assert_args(cmd.action_arg) - help.assert_opts( - cmd.generic_app_ext_action, - cmd.generic_app_ext_flag, - "help", "m", "nt", - cmd.pl_ext_stacking_from_aux_action, - cmd.pl_ext_stacking_from_aux_flag, - cmd.python_plugin_action, - cmd.python_plugin_flag, - "t", "v", 'vk', - ) - help.assert_subcmds("help", cmd.subc) - - out = cmd.run() - cmd.assert_args( - out, - (cmd.action_arg, None), - (cmd.pl_ext_stacking_from_aux_action, None), - (cmd.python_plugin_action, None), - (cmd.generic_app_ext_action, None), - (cmd.generic_app_ext_flag, None), - ) - - sa_v = "single_arg_val" - out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) - cmd.assert_args( - out, - (cmd.action_arg, [sa_v]), - (cmd.pl_ext_stacking_from_aux_action, None), - (cmd.python_plugin_action, None), - (cmd.generic_app_ext_action, [self.na]), - (cmd.generic_app_ext_flag, 1), - ) - - def test_extending_aux_subc(self): - cmd = self.aux_subc - help = cmd.get_help_msg() - help.assert_args(cmd.action_arg) - help.assert_opts( - cmd.flag_opt, - cmd.generic_app_ext_action, - cmd.generic_app_ext_flag, - "help", "m", "nt", - cmd.pl_ext_stacking_from_aux_action_subc, - cmd.pl_ext_stacking_from_aux_flag_subc, - cmd.python_plugin_action_subc, - cmd.python_plugin_flag_subc, - "t", "v", 'vk', - ) - help.assert_subcmds(None) - - out = cmd.run() - cmd.assert_args( - out, - (cmd.action_arg, None), - (cmd.pl_ext_stacking_from_aux_action_subc, None), - (cmd.python_plugin_action_subc, None), - (cmd.generic_app_ext_action, None), - (cmd.generic_app_ext_flag, None), - ) - - sa_v = "single_arg_val" - out = cmd.run(sa_v, cmd.generic_app_ext_action.ln_to_cli(), self.na, cmd.generic_app_ext_flag.ln_to_cli()) - cmd.assert_args( - out, - (cmd.action_arg, [sa_v]), - (cmd.pl_ext_stacking_from_aux_action_subc, None), - (cmd.python_plugin_action_subc, None), - (cmd.generic_app_ext_action, [self.na]), - (cmd.generic_app_ext_flag, 1), - ) - - def test_error_msg_on_missing_implementation(self): - cmd = self.missing_ext_impl_cmd - help = cmd.get_help_msg() - help.assert_args(cmd.single_arg, cmd.multi_arg) - help.assert_opts( - cmd.app_ext_missing_impl, - cmd.flag_opt, - "help", "m", "nt", - cmd.opt_taking_value, - "t", "v", 'vk' - ) - - assert help.aux_exts == None - assert help.pl_exts == None - assert help.app_exts == True - - out = cmd.run() - r = origen.app.root.joinpath('example/commands/extensions') - assert "Could not find implementation for app extension 'None'" in out - assert f"From root '{r}', searched:" in out - assert f"plugin.python_plugin.plugin_test_args.py" in out - assert f"plugin{os.sep}python_plugin.plugin_test_args.py" in out - assert f"plugin{os.sep}python_plugin{os.sep}plugin_test_args.py" in out - - @pytest.mark.skip - def error_msg_on_extending_unknown_cmd(self): - fail - - @pytest.mark.skip - def test_error_in_before(self): - fail - - @pytest.mark.skip - def test_error_in_after(self): - fail - - @pytest.mark.skip - def test_error_in_cleanup(self): - fail - -class TestReservedOpts(CLICommon): - cmd = CLIShared.app_sub_cmd( - "reserved_opt_error_gen", - help = "Generate error messages when reserved opts are used", - opts=[ - CmdOpt("conflicting_help", help="Conflicting Opt"), - CmdOpt("conflicting_target", help="Conflicting Opt"), - CmdOpt("non_conflicting", help="Non-Conflicting Opt", ln="non_conflicting", sn="n"), - ], - subcmds=[ - Cmd( - "single_conflicting_opt", - help="Generate error messages for reserved opts", - opts=[ - CmdOpt("non_conflicting", help="Non-Conflicting Opt"), - CmdOpt("conflicting_target", help="Conflicting Opt"), - ], - ), - Cmd( - "multiple_conflicting_opts", - help="Generate error messages for reserved opts", - opts=[ - CmdOpt("conflicting_target", help="Conflicting Opt"), - CmdOpt("conflicting_mode", help="Conflicting Opt"), - CmdOpt("not_conflicting", help="Non-Conflicting Opt", sn='n'), - CmdOpt("conflicting_no_targets", help="Conflicting Opt"), - CmdOpt("conflicting_target_again", help="Conflicting Opt"), - CmdOpt("conflicting_v", help="Conflicting Opt"), - CmdOpt("conflicting_vk", help="Conflicting Opt"), - CmdOpt("conflicting_help", help="Conflicting Opt", ln_aliases=["help_alias"], sn_aliases=["g", "i"]), - ], - subcmds=[ - Cmd( - "subc", - help="Generate error messages for reserved opts - subc", - opts=[ - CmdOpt("conflicting_help", help="Conflicting Opt"), - ], - subcmds=[ - Cmd( - "subc", - help="Generate error messages for reserved opts - subc - subc", - opts=[ - CmdOpt("conflicting_help", help="Conflicting Opt", ln_aliases=["help2", "help3"]), - CmdOpt("conflicting_v", help="Conflicting Opt", sn="c"), - ], - ), - ] - ) - ] - ) - ], - with_env={"ORIGEN_APP_TEST_RESERVED_OPT_ERRORS": "1"}, - ) - - @classmethod - def setup_class(cls): - if not hasattr(cls, "base_cmd_help"): - cls.base_cmd_help = cls.cmd.get_help_msg() - if not hasattr(cls, "ext_cmd_help"): - cls.ext_cmd_help = cls.ext_cmd.get_help_msg() - - @classmethod - def teardown_class(cls): - delattr(cls, "base_cmd_help") - delattr(cls, "ext_cmd_help") - - def test_opts_are_added_with_respect_to_errors(self): - help = self.base_cmd_help - help.assert_args(None) - help.assert_opts( - self.cmd.conflicting_help, - self.cmd.conflicting_target, - "h", "m", - self.cmd.non_conflicting, - "nt", "t", "v", "vk" - ) - help.assert_subcmds("help", self.cmd.multiple_conflicting_opts, self.cmd.single_conflicting_opt) - - cmd = self.cmd.single_conflicting_opt - help = cmd.get_help_msg() - help.assert_opts( - cmd.conflicting_target, - "h", "m", "nt", - cmd.non_conflicting, - "t", "v", "vk" - ) - - cmd = self.cmd.multiple_conflicting_opts - help = cmd.get_help_msg() - help.assert_opts( - cmd.conflicting_help, - cmd.conflicting_mode, - cmd.conflicting_no_targets, - cmd.conflicting_target, - cmd.conflicting_target_again, - cmd.conflicting_v, - cmd.conflicting_vk, - "h", "m", - cmd.not_conflicting, - "nt", "t", "v", "vk" - ) - - cmd = cmd.subc - help = cmd.get_help_msg() - help.assert_opts( - cmd.conflicting_help, - "h", "m", "nt", "t", "v", "vk" - ) - - cmd = cmd.subc - help = cmd.get_help_msg() - help.assert_opts( - cmd.conflicting_v, - cmd.conflicting_help, - "h", "m", "nt", "t", "v", "vk" - ) - - errors = [ - (cmd, cmd.conflicting_help, [("sn", "h")]), - (cmd, cmd.conflicting_target, [("sn", "t"), ("ln", "target")]), - (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_help, [("ln", "help"), ("sn", "h")]), - (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_vk, [("lna", "verbosity_keywords"), ("ln", "vk")]), - (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_v, [("ln", "verbosity"), ("sn", "v")]), - (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_no_targets, [("lna", "no_targets"), ("lna", "no_target")]), - (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_target_again, [("lna", "targets"), ("ln", "target"), ("sn", "t")]), - (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_mode, [("lna", "mode")]), - (cmd.multiple_conflicting_opts, cmd.multiple_conflicting_opts.conflicting_target, [("sn", "t")]), - (cmd.multiple_conflicting_opts.subc, cmd.multiple_conflicting_opts.subc.conflicting_help, [("sn", "h")]), - (cmd.multiple_conflicting_opts.subc.subc, cmd.multiple_conflicting_opts.subc.subc.conflicting_v, [("sna", "v"), ("ln", "verbosity")]), - (cmd.multiple_conflicting_opts.subc.subc, cmd.multiple_conflicting_opts.subc.subc.conflicting_help, [("lna", "help")]), - (cmd.single_conflicting_opt, cmd.single_conflicting_opt.conflicting_target, [("ln", "target")]), - ] - @pytest.mark.parametrize( - "cmd,opt,type,name", - [(o[0], o[1], inner[0], inner[1]) for o in errors for inner in o[2]], - ids=[f"{o[0].name}-{o[1].name}-{inner[0]}-{inner[1]}" for o in errors for inner in o[2]], - ) - def test_error_msg_using_reserved_opts(self, cmd, opt, type, name): - if type == "sn": - assert cmd.reserved_opt_sn_conflict_msg(opt, name) in self.base_cmd_help.text - elif type == "sna": - assert cmd.reserved_opt_sna_conflict_msg(opt, name) in self.base_cmd_help.text - elif type == "ln": - assert cmd.reserved_opt_ln_conflict_msg(opt, name) in self.base_cmd_help.text - elif type == "lna": - assert cmd.reserved_opt_lna_conflict_msg(opt, name) in self.base_cmd_help.text - else: - raise RuntimeError(f"Unknown type {type}") - - def test_opts_are_still_available_under_non_reserved_names(self): - cmd = self.cmd - out = cmd.run("--conflicting_help", "--conflicting_target", "--non_conflicting", "-n") - cmd.assert_args( - out, - (cmd.conflicting_help, 1), - (cmd.conflicting_target, 1), - (cmd.non_conflicting, 2) - ) - - cmd = self.cmd.single_conflicting_opt - out = cmd.run("--non_conflicting", "--conflicting_target") - cmd.assert_args( - out, - (cmd.conflicting_target, 1), - (cmd.non_conflicting, 1) - ) - - cmd = self.cmd.multiple_conflicting_opts - out = cmd.run( - "--conflicting_target", - "--conflicting_mode", - "-n", - "--conflicting_no_targets", - "--conflicting_target_again", - "--conflicting_v", - "--conflicting_vk", - "--conflicting_help", "-g", "-i", "--help_alias", - ) - cmd.assert_args( - out, - (cmd.conflicting_target, 1), - (cmd.conflicting_mode, 1), - (cmd.not_conflicting, 1), - (cmd.conflicting_no_targets, 1), - (cmd.conflicting_target_again, 1), - (cmd.conflicting_v, 1), - (cmd.conflicting_vk, 1), - (cmd.conflicting_help, 4), - ) - - cmd = cmd.subc - out = cmd.run("--conflicting_help") - cmd.assert_args(out, (cmd.conflicting_help, 1)) - - cmd = cmd.subc - out = cmd.run( - "--conflicting_help", "--help2", "--help3", - "-c", - ) - cmd.assert_args( - out, - (cmd.conflicting_help, 3), - (cmd.conflicting_v, 1) - ) - - ext_error_msgs_env = {"ORIGEN_APP_EXT_TEST_RESERVED_OPT_ERRORS": "1", "origen_bypass_config_lookup": "1"} - ext_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( - CmdExtOpt.from_src( - "example", - SrcTypes.APP, - CmdExtOpt( - "conflicting_target", - help="Conflicting Core Extension" - ), - CmdExtOpt( - "conflicting_no_target", - help="Conflicting Core Extension", - sn="n", - ), - CmdExtOpt( - "conflicting_mode", - help="Conflicting Core Extension", - ln="mode_conflict", - sn_aliases=["m"] - ), - CmdExtOpt( - "conflicting_help", - help="Conflicting Core Extension", - ln="help_conflict", - ln_aliases=["help1"] - ), - CmdExtOpt( - "conflicting_v", - help="Conflicting Core Extension", - sn_aliases=["w"] - ), - CmdExtOpt( - "conflicting_vk", - help="Conflicting Core Extension" - ), - ), - with_env=ext_error_msgs_env, - from_configs=CLIShared.configs.suppress_plugin_collecting_config, - ) - - def test_ext_opts_are_added_with_respect_to_errors(self): - cmd = self.ext_cmd - help = self.ext_cmd_help - help.assert_args(cmd.code) - help.assert_opts( - cmd.conflicting_target, - cmd.conflicting_v, - cmd.conflicting_vk, - "h", - cmd.conflicting_help, - "m", - cmd.conflicting_mode, - cmd.conflicting_no_target, - "nt", "t", "v", "vk" - ) - help.assert_subcmds(None) - - ext_errors = [ - (ext_cmd, ext_cmd.conflicting_target, [("ln", "target"), ("sn", "t")]), - (ext_cmd, ext_cmd.conflicting_no_target, [("lna", "no_target"), ("lna", "no_targets")]), - (ext_cmd, ext_cmd.conflicting_help, [("sn", "h"), ("lna", "help")]), - (ext_cmd, ext_cmd.conflicting_mode, [("lna", "mode")]), - (ext_cmd, ext_cmd.conflicting_v, [("ln", "verbosity"), ("sn", "v")]), - (ext_cmd, ext_cmd.conflicting_vk, [("lna", "verbosity_keywords"), ("lna", "vk")]), - ] - @pytest.mark.parametrize( - "cmd,opt,type,name", - [(o[0], o[1], inner[0], inner[1]) for o in ext_errors for inner in o[2]], - ids=[f"{o[0].name}-{o[1].name}-{inner[0]}-{inner[1]}" for o in ext_errors for inner in o[2]], - ) - def test_ext_error_msg_using_reserved_opts(self, cmd, opt, type, name): - if type == "sn": - assert cmd.reserved_opt_sn_conflict_msg(opt, name) in self.ext_cmd_help.text - elif type == "sna": - assert cmd.reserved_opt_sna_conflict_msg(opt, name) in self.ext_cmd_help.text - elif type == "ln": - assert cmd.reserved_opt_ln_conflict_msg(opt, name) in self.ext_cmd_help.text - elif type == "lna": - assert cmd.reserved_opt_lna_conflict_msg(opt, name) in self.ext_cmd_help.text - else: - raise RuntimeError(f"Unknown type {type}") - - def test_ext_opts_are_still_available_under_non_reserved_names(self): - cmd = self.ext_cmd - out = cmd.run( - "from test_apps_shared_test_helpers.aux_cmds import run; run()", - "--conflicting_target", - "-n", - "--mode_conflict", "-m", - "--help_conflict", "--help1", - "--conflicting_v", "-w", - "--conflicting_vk", - ) - self.Cmd.assert_args( - cmd, - out, - (cmd.conflicting_target, 1), - (cmd.conflicting_no_target, 1), - (cmd.conflicting_mode, 2), - (cmd.conflicting_help, 2), - (cmd.conflicting_v, 2), - (cmd.conflicting_vk, 1), - ) - -# from tests.proc_funcs import target_proc_funcs -# from origen.helpers.env import in_new_origen_proc - -@pytest.mark.skip -class TestTarget(CLICommon): - def test_loading_targets_set_by_app(self): - retn = in_new_origen_proc(mod=target_proc_funcs) - assert retn['target_pre_load'] == None - assert retn['tester_pre_load'] == [] - assert retn['dut_pre_load'] == None - assert retn['first_load_done_pre_load'] == False - assert retn['target_post_load'] == [self.targets.falcon] - assert retn['tester_post_load'] == [self.targets.uflex] - assert retn['dut_post_load'] == [self.targets.eagle] - assert retn['first_load_done_post_load'] == True - - def test_getting_the_current_target(self): - fail - -@pytest.mark.skip -class TestTargetOpts(CLICommon): - def test_target_can_be_set(self): - targets = self.show_per_cmd_targets(targets=self.targets.eagle) - assert targets == [self.targets.eagle] - - targets = self.show_per_cmd_targets(targets=[self.targets.hawk, self.targets.uflex]) - assert targets == [self.targets.hawk, self.targets.uflex] - - def test_no_target_can_be_used_per_command(self): - targets = self.show_per_cmd_targets() - assert len(targets) != 0 - - targets = self.show_per_cmd_targets(targets=False) - assert len(targets) == 0 @pytest.mark.skip class TestModeOpts(): def test_(): fail - -class DisablingAppOpts(): - @pytest.mark.skip - def test_app_opts_are_added_by_default(self): - cmd = self.disabling_app_opts - help = cmd.get_help_msg() - help.assert_args(None) - help.assert_opts( - cmd.app_ext_missing_impl, - cmd.flag_opt, - "help", - cmd.opt_taking_value, - "v", - 'vk' - ) - - @pytest.mark.skip - def test_target_is_not_loaded_by_default(self): - cmd = self.disabling_app_opts - cmd.get_help_msg() - - @pytest.mark.skip - def test_disabling_app_opts(self): - fail - - @pytest.mark.skip - def test_disabling_app_opts_individually(self): - fail - @pytest.mark.skip class PluginCmdsInApp(): def test_app_opts_are_added_by_default(self): @@ -1063,76 +100,3 @@ def test_disabling_app_opts(self): def test_disabling_app_opts_individually(self): fail - -class TestEval(CLICommon): - _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.eval - - def test_help_msg(self, cmd, no_config_run_opts): - help = cmd.get_help_msg(run_opts=no_config_run_opts) - help.assert_summary(cmd.help) - help.assert_args(cmd.code) - help.assert_bare_app_opts() - - def test_basic_eval(self, cmd, no_config_run_opts): - d = cmd.demos["multi_statement_single_arg"] - out = d.run(run_opts=no_config_run_opts) - d.assert_present(out) - -@pytest.mark.skip -class TestTargetCmd(CLICommon): - def test_fail(): - fail - -class TestInteractive(CLICommon): - _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.i - - def test_help_msg(self, cmd, no_config_run_opts): - help = cmd.get_help_msg(run_opts=no_config_run_opts) - help.assert_summary(cmd.help) - help.assert_args(None) - help.assert_bare_app_opts() - - @pytest.mark.skip - def test_interactive(self, cmd, no_config_run_opts): - # TODO try to get an interactive test that just starts/stops - proc = subprocess.Popen(["poetry", "run", "origen", "i"], universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - try: - proc.stdin.flush() - #proc.stdout.flush() - m = 'print("hi from interactive!")' - import time - # time.sleep(10) - assert proc.poll() is None - # proc.stdin.write(f"{m}\n".encode()) - assert proc.poll() is None - # lines = proc.stdout.readlines() - # print(lines) - # assert lines[-1] == m - - m = "print('hi again!')" - # proc.stdin.write(f"{m}\n".encode()) - assert proc.poll() is None - # lines = proc.stdout.readlines() - # assert lines[0] == m - - proc.stdin.write("exit()\n") - assert proc.wait(3) == 0 - lines = proc.stdout.readline() - print(lines) - finally: - if proc.poll() is None: - proc.kill() - # print(proc.stdout.readline()) - # print(proc.stdout.readline()) - # print(proc.stdout.readline()) - # print(proc.stdout.readline()) - for l in proc.stdout: - # lines = proc.stdout.readlines() - if "CMD" in l: - break - print(l) - fail - -# class TestCredentials(CLICommon): -# def test_credentials(self): -# ? diff --git a/test_apps/python_app/tests/configs/target/bad_default_targets.toml b/test_apps/python_app/tests/configs/target/bad_default_targets.toml new file mode 100644 index 00000000..c5a61317 --- /dev/null +++ b/test_apps/python_app/tests/configs/target/bad_default_targets.toml @@ -0,0 +1 @@ +target = ["eagle", "unknown"] diff --git a/test_apps/python_app/tests/configs/target/empty_default_targets.toml b/test_apps/python_app/tests/configs/target/empty_default_targets.toml new file mode 100644 index 00000000..2bd1c12b --- /dev/null +++ b/test_apps/python_app/tests/configs/target/empty_default_targets.toml @@ -0,0 +1 @@ +target = [] diff --git a/test_apps/python_app/tests/configs_test.py b/test_apps/python_app/tests/configs_test.py new file mode 100644 index 00000000..fd81aa7a --- /dev/null +++ b/test_apps/python_app/tests/configs_test.py @@ -0,0 +1,49 @@ +import pathlib +from cli.shared import CLICommon + +class TestBadConfigs(CLICommon): + @property + def bad_ldap_config_path(self): + # TODO use a shared method for LDAP config path + return pathlib.Path(__file__).parent.joinpath("origen_utilities/configs/ldap/test_bad_ldap_config.toml").absolute() + + @property + def missing_toml(self): + return self.to_config_path("missing.toml").absolute() + + @property + def eval_m(self): + return "hello from eval" + + def test_origen_v(self): + err = self.cmds.v.gen_error( + return_full=True, + run_opts=self.no_config_run_opts_plus_config(self.bad_ldap_config_path) + ) + assert err["returncode"] == 1 + p = pathlib.Path("tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml") + assert f"invalid type: string \"hi\", expected an integer for key `ldaps.bad.timeout` in {str(p)}" in err["stdout"] + assert err["stderr"] == "" + + def test_origen_cmd(self): + err = self.cmds.eval.gen_error( + f"print( '{self.eval_m}' )", + return_full=True, + run_opts=self.no_config_run_opts_plus_config(self.bad_ldap_config_path) + ) + assert err["returncode"] == 1 + p = pathlib.Path("tests/origen_utilities/configs/ldap/test_bad_ldap_config.toml") + assert f"invalid type: string \"hi\", expected an integer for key `ldaps.bad.timeout` in {str(p)}" in err["stdout"] + assert self.eval_m not in err["stdout"] + assert err["stderr"] == "" + + def test_bad_config_path(self): + err = self.cmds.eval.gen_error( + f"print( '{self.eval_m}' )", + return_full=True, + run_opts=self.no_config_run_opts_plus_config(self.missing_toml) + ) + assert err["returncode"] == 1 + assert "missing.toml either does not exists or is not accessible" in err["stdout"] + assert self.eval_m not in err["stdout"] + assert err["stderr"] == "" diff --git a/test_apps/python_app/tests/conftest.py b/test_apps/python_app/tests/conftest.py index 63b9a9fb..e9053a24 100644 --- a/test_apps/python_app/tests/conftest.py +++ b/test_apps/python_app/tests/conftest.py @@ -3,6 +3,7 @@ pytest.register_assert_rewrite("origen.helpers.regressions") pytest.register_assert_rewrite("test_apps_shared_test_helpers") +pytest.register_assert_rewrite("cli.tests__core_cmds") # Move the session store into a local test directory os.environ['origen_session__user_root'] = str(tmp_dir()) diff --git a/test_apps/python_app/tests/proc_funcs/target_proc_funcs.py b/test_apps/python_app/tests/proc_funcs/target_proc_funcs.py new file mode 100644 index 00000000..8faf67c9 --- /dev/null +++ b/test_apps/python_app/tests/proc_funcs/target_proc_funcs.py @@ -0,0 +1,96 @@ +def show_target_setup(q, options): + if options and "with_env" in options: + import os + os.environ.update(options["with_env"]) + import origen + origen.target.setup() + q.put(('targets', origen.targets.current)) + +def put_target(origen, q, name): + q.put((f'target_{name}', origen.target.current)) + q.put((f'tester_{name}', origen.tester.target())) + if origen.dut is None: + q.put((f'dut_{name}', origen.dut)) + else: + q.put((f'dut_{name}', origen.dut.name)) + q.put((f'first_load_done_{name}', origen.target.first_load_done)) + q.put((f'setup_pending_{name}', origen.target.setup_pending)) + +def test_loading_targets_set_by_app(q, options): + import origen + put_target(origen, q, "pre_load") + + origen.target.load() + put_target(origen, q, "post_load") + +def test_getting_the_current_target(q, options): + import origen + origen.target.load() + q.put(('current_targets', origen.target.current)) + q.put(('current', origen.target.current)) + +def test_setup_and_load(q, options): + from tests.shared import Targets + + import origen + put_target(origen, q, "pre_setup") + + origen.target.setup([Targets.eagle.name, Targets.uflex.name]) + put_target(origen, q, "post_setup_1") + + origen.target.setup([Targets.falcon.name, Targets.sim.name, Targets.smt7.name]) + put_target(origen, q, "post_setup_2") + + origen.target.load() + put_target(origen, q, "post_load_1_2") + + origen.target.setup([Targets.eagle.name, Targets.sim.name, Targets.uflex.name]) + put_target(origen, q, "post_setup_3") + + origen.target.load() + put_target(origen, q, "post_load_3") + +def test_loading_targets_explicitly(q, options): + from tests.shared import Targets + + import origen + put_target(origen, q, "pre_load") + + origen.target.load(Targets.eagle.name, Targets.smt7.name) + put_target(origen, q, "post_load") + +def test_reloading_targets(q, options): + from tests.shared import Targets + r = "creg0" + + import origen + origen.target.load(Targets.eagle.name, Targets.j750.name) + put_target(origen, q, "pre_config") + q.put(("ast_size_pre_config", len(origen.test_ast()["children"]))) + q.put(("reg_data_pre_config", origen.dut.reg(r).data())) + q.put(("timeset_pre_config", origen.tester.timeset)) + + origen.tester.set_timeset("simple") + origen.dut.arm_debug.switch_to_swd() + origen.dut.reg(r).write(0xC) + + q.put(("ast_size_post_config", len(origen.test_ast()["children"]))) + q.put(("reg_data_post_config", origen.dut.reg(r).data())) + q.put(("timeset_post_config", origen.tester.timeset.name)) + + origen.target.load() + put_target(origen, q, "post_reload") + q.put(("ast_size_post_reload", len(origen.test_ast()["children"]))) + q.put(("reg_data_post_reload", origen.dut.reg(r).data())) + q.put(("timeset_post_reload", origen.tester.timeset)) + +def test_invalid_target(q, options): + from tests.shared import Targets + from tests.cli.core_cmds.target import TargetCLI + import origen + put_target(origen, q, "pre_setup") + + origen.target.setup([Targets.falcon.name, TargetCLI.utn]) + put_target(origen, q, "post_setup") + + origen.target.load() \ No newline at end of file diff --git a/test_apps/python_app/tests/shared/__init__.py b/test_apps/python_app/tests/shared/__init__.py index a1dbbf33..8c906137 100644 --- a/test_apps/python_app/tests/shared/__init__.py +++ b/test_apps/python_app/tests/shared/__init__.py @@ -99,3 +99,108 @@ def in_new_origen_proc(func=None, mod=None, options=None, expect_fail=False): def instantiate_dut(name): origen.target.load(lambda: origen.app.instantiate_dut(name)) + +class Targets: + class Target: + def __init__(self, name, offset, tester_name=None): + self.name = name + if offset: + self.relative_path = f"{offset}/{name}.py" + else: + self.relative_path = f"{name}.py" + self.full_path = str(origen.app.root.joinpath("targets").joinpath(self.rp)) + if tester_name: + self.tester_name = tester_name + + @property + def rp(self): + return self.relative_path + + @property + def fp(self): + return self.full_path + + hawk = Target("hawk", "dut") + falcon = Target("falcon", "dut") + eagle = Target("eagle", "dut") + o1_dut0 = Target("o1_dut0", "dut") + uflex = Target("uflex", "tester", tester_name="ULTRAFLEX") + j750 = Target("j750", "tester", tester_name="J750") + smt7 = Target("v93k_smt7", "tester", tester_name="V93KSMT7") + smt8 = Target("v93k_smt8", "tester", tester_name="V93KSMT8") + sim = Target("sim", "tester", tester_name="SIMULATOR") + eagle_with_smt7 = Target("eagle_with_smt7", None) + eagle_with_simulator = Target("eagle_with_simulator", None) + + def show_per_cmd_targets(self, targets=None, **kwargs): + from tests.cli.shared import CLICommon + prefix = "Current Targets: " + if targets is not None: + if targets is not False: + if not isinstance(targets, list): + targets = [targets] + targets = [(t.name if isinstance(t, Targets.Target) else t) for t in targets] + kwargs.setdefault("run_opts", {})["targets"] = targets + out = CLICommon.eval(f"print( f'{prefix}{{origen.target.current_targets}}' )", **kwargs) + print(out) + out = out.split("\n") + return eval(next(t.replace(prefix, '') for t in out if t.startswith(prefix))) + + all = [ + eagle_with_smt7, + j750, smt8, smt7, uflex, sim, + o1_dut0, falcon, hawk, eagle, + eagle_with_simulator, + ] + + all_rp = [t.rp for t in all] + + class TargetFixtures: + @pytest.fixture + def hawk(self): + return Targets.hawk + + @pytest.fixture + def falcon(self): + return Targets.falcon + + @pytest.fixture + def eagle(self): + return Targets.eagle + + @pytest.fixture + def uflex(self): + return Targets.uflex + + @pytest.fixture + def j750(self): + return Targets.j750 + + @pytest.fixture + def smt7(self): + return Targets.smt7 + + @pytest.fixture + def smt8(self): + return Targets.smt8 + + @pytest.fixture + def sim(self): + return Targets.sim + + @pytest.fixture + def eagle_with_smt7(self): + return Targets.eagle_with_smt7 + + @pytest.fixture + def eagle_with_simulator(self): + return Targets.eagle_with_simulator + +class PythonAppCommon: + targets = Targets() + bypass_origen_app_lookup_env = {"origen_app_bypass_config_lookup": "1", "origen_app_name": "example"} + configs_dir = pathlib.Path(__file__).parent.parent.joinpath("configs") + + @classmethod + def to_config_path(cls, config): + return cls.configs_dir.joinpath(config) \ No newline at end of file diff --git a/test_apps/python_app/tests/target_test.py b/test_apps/python_app/tests/target_test.py new file mode 100644 index 00000000..3361535c --- /dev/null +++ b/test_apps/python_app/tests/target_test.py @@ -0,0 +1,106 @@ +import pytest, origen +from tests.proc_funcs import target_proc_funcs +from origen.helpers.env import in_new_origen_proc +from shared import PythonAppCommon, Targets +from cli.core_cmds.target import TargetCLI + +class TestTarget(PythonAppCommon, Targets.TargetFixtures): + @classmethod + def assert_retn(cls, retn, name, target, tester, dut, first_load_done, setup_pending): + assert retn[f"target_{name}"] == target + assert retn[f"tester_{name}"] == tester + assert retn[f"dut_{name}"] == dut + assert retn[f"first_load_done_{name}"] == first_load_done + assert retn[f"setup_pending_{name}"] == setup_pending + + @classmethod + def assert_pre_setup_retn(cls, retn, name): + assert retn[f"target_{name}"] == None + assert retn[f"tester_{name}"] == [] + assert retn[f"dut_{name}"] == None + assert retn[f"first_load_done_{name}"] == False + assert retn[f"setup_pending_{name}"] == False + + def test_loading_targets_set_by_app(self, eagle_with_smt7, smt7): + TargetCLI.target_cmd.set.run(eagle_with_smt7.name) + retn = in_new_origen_proc(mod=target_proc_funcs) + self.assert_pre_setup_retn(retn, "pre_load") + self.assert_retn(retn, "post_load", [eagle_with_smt7.fp], [smt7.tester_name], "dut", True, False) + + def test_multiple_targets_set_by_app(self, eagle, uflex, j750, sim): + TargetCLI.target_cmd.set.run(eagle.name, uflex.name, j750.name, sim.name) + retn = in_new_origen_proc(func=target_proc_funcs.test_loading_targets_set_by_app) + self.assert_pre_setup_retn(retn, "pre_load") + self.assert_retn( + retn, + "post_load", + [eagle.fp, uflex.fp, j750.fp, sim.fp], + [uflex.tester_name, j750.tester_name, sim.tester_name], + "dut", + True, + False + ) + + def test_getting_the_current_target(self, eagle): + TargetCLI.target_cmd.set.run(eagle.name) + retn = in_new_origen_proc(mod=target_proc_funcs) + t = [eagle.fp] + assert retn['current_targets'] == t + assert retn['current'] == t + assert origen.target == origen.targets + + def test_setup_and_load(self, eagle, uflex, falcon, sim, smt7): + retn = in_new_origen_proc(mod=target_proc_funcs) + self.assert_pre_setup_retn(retn, "pre_setup") + self.assert_retn(retn, "post_setup_1", [eagle.name, uflex.name], [], None, False, True) + self.assert_retn(retn, "post_setup_2", [falcon.name, sim.name, smt7.name], [], None, False, True) + self.assert_retn(retn, "post_load_1_2", [falcon.name, sim.name, smt7.name], [sim.tester_name, smt7.tester_name], "dut", True, False) + self.assert_retn(retn, "post_setup_3", [eagle.name, sim.name, uflex.name], [sim.tester_name, smt7.tester_name], "dut", True, True) + self.assert_retn(retn, "post_load_3", [eagle.name, sim.name, uflex.name], [sim.tester_name, uflex.tester_name], "dut", True, False) + + def test_loading_targets_explicitly(self, eagle, smt7): + retn = in_new_origen_proc(mod=target_proc_funcs) + self.assert_pre_setup_retn(retn, "pre_load") + self.assert_retn(retn, "post_load", [eagle.name, smt7.name], [smt7.tester_name], "dut", True, False) + + def test_reloading_targets(self, eagle, j750): + retn = in_new_origen_proc(mod=target_proc_funcs) + + n = "pre_config" + self.assert_retn(retn, n, [eagle.name, j750.name], [j750.tester_name], "dut", True, False) + assert retn[f"ast_size_{n}"] == 0 + assert retn[f"reg_data_{n}"] == 0 + assert retn[f"timeset_{n}"] is None + + n = "post_config" + assert retn[f"ast_size_{n}"] == 3 + assert retn[f"reg_data_{n}"] == 0xC + assert retn[f"timeset_{n}"] == "simple" + + # AST should remain but DUT and tester are reset + n = "post_reload" + assert retn[f"ast_size_{n}"] == 3 + assert retn[f"reg_data_{n}"] == 0 + assert retn[f"timeset_{n}"] is None + + def test_invalid_target(self, capfd, falcon): + retn = in_new_origen_proc(mod=target_proc_funcs, expect_fail=True) + self.assert_pre_setup_retn(retn, "pre_setup") + self.assert_retn(retn, "post_setup", [falcon.name, TargetCLI.utn], [], None, False, True) + assert TargetCLI.unknown_err_msg in capfd.readouterr().out + + +class TestTargetOpts(PythonAppCommon): + def test_target_can_be_set(self): + targets = self.targets.show_per_cmd_targets(targets=self.targets.eagle) + assert targets == [self.targets.eagle.name] + + targets = self.targets.show_per_cmd_targets(targets=[self.targets.hawk, self.targets.uflex]) + assert targets == [self.targets.hawk.name, self.targets.uflex.name] + + def test_no_target_can_be_used_per_command(self): + targets = self.targets.show_per_cmd_targets() + assert len(targets) != 0 + + targets = self.targets.show_per_cmd_targets(targets=False) + assert len(targets) == 0 diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py index 8d0adb46..583ee3cc 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py @@ -3,6 +3,10 @@ from .shared import CLICommon class T_Credentials(CLICommon): + @pytest.mark.skip + def test_help_msg(self): + fail + @pytest.mark.skip def test_set_passwords(self, monkeypatch): # import io diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py index c23549c7..3ffaec23 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py @@ -39,7 +39,7 @@ def test_error_in_statements(self, cmd, no_config_run_opts): # FOR_PR @pytest.mark.skip - def test_error_in_statements_stil_runs_cleanup(self, cmd, no_config_run_opts): + def test_error_in_statements_still_runs_cleanup(self, cmd, no_config_run_opts): d = cmd.demos["gen_name_error"] out = d.gen_error(return_full=True) d.assert_present(out["stderr"]) From 66264f1137c86c616c5e95e3988f099fd4bd4c17 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 13 Feb 2023 08:04:09 -0600 Subject: [PATCH 019/200] Make 'all targets' deterministic. Remove some debug statements. Add a test for invalid target during CLI behavior. Try fix for Windows paths. --- rust/origen/cli/src/commands/mod.rs | 8 ++++---- rust/origen/src/core/application/target.rs | 2 +- test_apps/python_app/tests/shared/__init__.py | 9 ++++----- test_apps/python_app/tests/target_test.py | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 992dd586..1b068039 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -141,12 +141,12 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } } } - println!("ext names: {:?}", opt_names); + // println!("ext names: {:?}", opt_names); let mut targets = None; for arg in cmd_def.get_arguments() { - println!("Arg: {}", arg.get_id()); + // println!("Arg: {}", arg.get_id()); let arg_n= arg.get_id(); if arg_n == "verbose" || arg_n == "verbosity_keywords" { continue; @@ -207,7 +207,7 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } } } - println!("ext args: {:?}", ext_args); + // println!("ext args: {:?}", ext_args); let mut cmd = format!("from origen.boot import run_cmd; run_cmd('{}'", base_cmd.unwrap_or_else(|| cmd_def.get_name())); if let Some(subs) = subcmds.as_ref() { @@ -323,7 +323,7 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation cmd += ");"; log_debug!("Launching Python: '{}'", &cmd); - println!("CMD: {}", cmd); + // println!("CMD: {}", cmd); match python::run(&cmd) { Err(e) => { diff --git a/rust/origen/src/core/application/target.rs b/rust/origen/src/core/application/target.rs index 06bee5a0..8f3d8fba 100644 --- a/rust/origen/src/core/application/target.rs +++ b/rust/origen/src/core/application/target.rs @@ -256,7 +256,7 @@ pub fn remove(targets: Vec<&str>) { pub fn all(dir: &PathBuf) -> Vec { let mut files: Vec = Vec::new(); - for file in WalkDir::new(dir) { + for file in WalkDir::new(dir).sort_by_file_name() { let path = file.unwrap().into_path(); if path.is_file() && path.extension().unwrap_or("".as_ref()) == "py" { files.push(path); diff --git a/test_apps/python_app/tests/shared/__init__.py b/test_apps/python_app/tests/shared/__init__.py index 8c906137..b5e95943 100644 --- a/test_apps/python_app/tests/shared/__init__.py +++ b/test_apps/python_app/tests/shared/__init__.py @@ -105,7 +105,7 @@ class Target: def __init__(self, name, offset, tester_name=None): self.name = name if offset: - self.relative_path = f"{offset}/{name}.py" + self.relative_path = str(pathlib.Path(offset).joinpath(f"{name}.py")) else: self.relative_path = f"{name}.py" self.full_path = str(origen.app.root.joinpath("targets").joinpath(self.rp)) @@ -147,10 +147,9 @@ def show_per_cmd_targets(self, targets=None, **kwargs): return eval(next(t.replace(prefix, '') for t in out if t.startswith(prefix))) all = [ - eagle_with_smt7, - j750, smt8, smt7, uflex, sim, - o1_dut0, falcon, hawk, eagle, - eagle_with_simulator, + eagle, falcon, hawk, o1_dut0, + eagle_with_simulator, eagle_with_smt7, + j750, sim, uflex, smt7, smt8, ] all_rp = [t.rp for t in all] diff --git a/test_apps/python_app/tests/target_test.py b/test_apps/python_app/tests/target_test.py index 3361535c..d96c1d59 100644 --- a/test_apps/python_app/tests/target_test.py +++ b/test_apps/python_app/tests/target_test.py @@ -104,3 +104,21 @@ def test_no_target_can_be_used_per_command(self): targets = self.targets.show_per_cmd_targets(targets=False) assert len(targets) == 0 + + def test_invalid_target_per_command(self): + u = TargetCLI.utn + t = [self.targets.eagle.name, u] + m = "Should_not_see_from_test_invalid_target_per_command" + # Invalid targets are not an issue until loading + targets = self.targets.show_per_cmd_targets(targets=t) + assert targets == t + + r = TargetCLI.in_app_commands.eval.gen_error( + f"origen.target.load(); print( f'{m}' )", + run_opts={"targets": t}, + return_full=True + ) + assert r["returncode"] == 1 + assert r["stderr"] == '' + assert TargetCLI.unknown_err_msg in r["stdout"] + assert m not in r["stdout"] From 5543e54162d82c7fa44ca9df9bf60f8bb2ead6ec Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 13 Feb 2023 17:04:10 -0600 Subject: [PATCH 020/200] Allow assert present to receive str or list of strs. --- .../test_apps_shared_test_helpers/cli/cmd_models/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py index c00da4ab..d4a28a86 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py @@ -106,7 +106,10 @@ def to_assert_str(self, vals, **opts): return f"Arg: (CMD): {self.name} ({c}): {vals}" def assert_present(self, vals, in_str, **opts): - for e in CmdArgOpt.to_assert_str(self, vals, **opts): + exp = self.__class__.to_assert_str(self, vals, **opts) + if isinstance(exp, str): + exp = [exp] + for e in exp: assert e in in_str class CmdArg(cli.cmd.CmdArg, CmdArgOpt): From 716cc7d1a15af413842d189e6d0b7f123804553f Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 15 Feb 2023 20:08:19 -0600 Subject: [PATCH 021/200] Support app opts i n plugin/aux commands. Support disabling. Add tests. Minor cleanup. --- rust/origen/cli/src/framework/app_cmds.rs | 8 +- rust/origen/cli/src/framework/aux_cmds.rs | 8 +- rust/origen/cli/src/framework/mod.rs | 22 +- rust/origen/cli/src/framework/plugins.rs | 8 +- test_apps/python_app/config/commands.toml | 38 ++- .../python_app/tests/cli/cmd_testers.toml | 242 ------------------ test_apps/python_app/tests/cli/shared.py | 89 +++++++ .../tests/cli/tests__app_cmd_building.py | 84 +----- .../tests/cli/tests__cmd_integration.py | 45 ++++ .../python_plugin/python_plugin/commands.toml | 50 ++++ .../aux_cmds/python_app_aux_cmds.toml | 48 ++++ .../aux_cmds/python_app_aux_cmds_cfg.toml | 2 + .../cli/cmd_models/auxs.py | 44 ++++ .../cli/cmd_models/plugins.py | 33 ++- 14 files changed, 374 insertions(+), 347 deletions(-) delete mode 100644 test_apps/python_app/tests/cli/cmd_testers.toml create mode 100644 test_apps/python_app/tests/cli/tests__cmd_integration.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_aux_cmds.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_aux_cmds_cfg.toml diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index 0b10da5e..7f7d90c9 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -18,11 +18,11 @@ pub struct AppCmds { } impl AppCmds { - fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) -> Result { - if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::App(current_path.to_string()))? { + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML, parent_cmd: Option<&Command>) -> Result { + if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::App(current_path.to_string()), parent_cmd)? { if let Some(ref mut sub_cmds) = current_cmd.subcommand { for mut sub in sub_cmds { - Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub)?; + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub, Some(&c))?; } } slf.commands.insert(current_path.clone(), c); @@ -58,7 +58,7 @@ impl AppCmds { if let Some(commands) = command_config.command { for mut cmd in commands { - if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd)? { + if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd, None)? { slf.top_commands.push(cmd.name.to_owned()); } } diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index e820ef1e..ed00cf7f 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -62,11 +62,11 @@ pub struct AuxCmdNamespace { } impl AuxCmdNamespace { - fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) -> Result { - if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::Aux(slf.namespace(), current_path.to_string()))? { + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML, parent_cmd: Option<&Command>) -> Result { + if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::Aux(slf.namespace(), current_path.to_string()), parent_cmd)? { if let Some(ref mut sub_cmds) = current_cmd.subcommand { for mut sub in sub_cmds { - Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub)?; + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub, Some(&c))?; } } slf.commands.insert(current_path.clone(), c); @@ -107,7 +107,7 @@ impl AuxCmdNamespace { if let Some(commands) = command_config.command { for mut cmd in commands { - if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd)? { + if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd, None)? { slf.top_commands.push(cmd.name.to_owned()); } } diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index 61e44268..c98fd914 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -137,7 +137,7 @@ pub struct Command { } impl Command { - pub fn from_toml_cmd(cmd: &CommandTOML, cmd_path: &str, parent: CmdSrc) -> Result> { + pub fn from_toml_cmd(cmd: &CommandTOML, cmd_path: &str, parent: CmdSrc, parent_cmd: Option<&Self>) -> Result> { let mut slf = Self { name: cmd.name.to_owned(), help: cmd.help.to_owned(), @@ -146,8 +146,20 @@ impl Command { opts: None, subcommands: None, full_name: cmd_path.to_string(), - add_mode_opt: cmd.add_mode_opt, - add_target_opt: cmd.add_target_opt, + add_mode_opt: cmd.add_mode_opt.or_else(|| { + if let Some(p) = parent_cmd { + p.add_mode_opt.to_owned() + } else { + None + } + }), + add_target_opt: cmd.add_target_opt.or_else(|| { + if let Some(p) = parent_cmd { + p.add_target_opt.to_owned() + } else { + None + } + }), parent: parent, in_global_context: cmd.in_global_context, in_app_context: cmd.in_app_context, @@ -563,10 +575,10 @@ macro_rules! add_target_opt { pub fn add_app_opts(mut cmd: ClapCommand, add_mode_opt: bool, add_target_opt: bool) -> ClapCommand { if in_app_invocation() { if add_target_opt { - cmd = add_mode_opt!(cmd); + cmd = add_target_opt!(cmd); } if add_mode_opt { - cmd = add_target_opt!(cmd); + cmd = add_mode_opt!(cmd); } } cmd diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index 3d9f33ec..bc54bc2e 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -217,11 +217,11 @@ pub struct Plugin { } impl Plugin { - fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML) -> Result { - if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::Plugin(slf.name.to_owned(), current_path.to_string()))? { + fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML, parent_cmd: Option<&Command>) -> Result { + if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::Plugin(slf.name.to_owned(), current_path.to_string()), parent_cmd)? { if let Some(ref mut sub_cmds) = current_cmd.subcommand { for mut sub in sub_cmds { - Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub)?; + Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub, Some(&c))?; } } slf.commands.insert(current_path.clone(), c); @@ -258,7 +258,7 @@ impl Plugin { if let Some(commands) = command_config.command { for mut cmd in commands { - if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd)? { + if Self::_add_cmd(&mut slf, cmd.name.to_owned(), &mut cmd, None)? { slf.top_commands.push(cmd.name.to_owned()); } } diff --git a/test_apps/python_app/config/commands.toml b/test_apps/python_app/config/commands.toml index 4ff131cb..63041dca 100644 --- a/test_apps/python_app/config/commands.toml +++ b/test_apps/python_app/config/commands.toml @@ -122,23 +122,51 @@ help = "Nested app cmds" # Command disabling standard app opts [[command]] name = "disabling_app_opts" -help = "Command disabling standard app opts" +help = "Test disabling standard app opts" [[command.subcommand]] name = "disable_targets_opt" help = "Disable the targets and no-targets opt" - disable_target_opt = true + add_target_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_target_opt = true [[command.subcommand]] name = "disable_mode_opt" help = "Disable the mode opt" - disable_mode_opt = true + add_mode_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_mode_opt = true [[command.subcommand]] name = "disable_app_opts" help = "Disable all app opts" - disable_target_opt = true - disable_mode_opt = true + add_target_opt = false + add_mode_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_target_opt = true + add_mode_opt = true [[command]] name = "reserved_opt_error_gen" diff --git a/test_apps/python_app/tests/cli/cmd_testers.toml b/test_apps/python_app/tests/cli/cmd_testers.toml deleted file mode 100644 index 44296091..00000000 --- a/test_apps/python_app/tests/cli/cmd_testers.toml +++ /dev/null @@ -1,242 +0,0 @@ -help = "Commands to assisted in testing aux commands when no app is present" - -[[command]] -name = "python_no_app_tests" -help = "Test commands for python-no-app workspace" - -[[command]] -name = "test_current_command" -help = "Tests origen.current_command" - -[[command]] -name = "test_nested_level_1" -help = "Tests origen.current_command L1" - - [[command.subcommand]] - name = "test_nested_level_2" - help = "Tests origen.current_command L2" - - [[command.subcommand.subcommand]] - name = "test_nested_level_3_a" - help = "Tests origen.current_command L3a" - - [[command.subcommand.subcommand]] - name = "test_nested_level_3_b" - help = "Tests origen.current_command L3b" - -[[command]] -name = "test_arguments" -help = "Test various argument schemes from commands" - - # Very simple subcommands that only support a small piece of the options at a time - [[command.subcommand]] - name = "single_value_optional_arg" - help = "Command taking optional, single arguments" - - # Default setting for an arg is not required - [[command.subcommand.arg]] - name = "implicit_single_val" - takes_value = true - help = "Implicit non-required single value" - - [[command.subcommand.arg]] - name = "explicit_single_val" - takes_value = true - required = false - help = "Explicit non-required single value" - - [[command.subcommand]] - name = "single_value_required_arg" - help = "Command with single-value optional and required arguments" - - # Default setting is arg is not required - [[command.subcommand.arg]] - name = "non_req_val" - takes_value = true - help = "Non-required single value" - - [[command.subcommand.arg]] - name = "req_val" - takes_value = true - required = true - help = "Required single value" - - [[command.subcommand]] - name = "multi_val_args" - help = "Command with multi-value optional and required arguments" - - [[command.subcommand.arg]] - name = "m_arg" - takes_value = true - multiple = true - help = "Arg with multiple values" - - # Takes value should be implied with multiple - [[command.subcommand.arg]] - name = "im_m_arg" - multiple = true - help = "Arg accepting multiple values were 'takes value' is implied" - - [[command.subcommand.arg]] - name = "req_m_arg" - multiple = true - required = true - help = "Required arg accepting multiple values" - - [[command.subcommand.arg]] - name = "d_m_arg" - multiple = true - use_delimiter = true - help = "Delimited multi arg" - - [[command.subcommand.arg]] - name = "d_im_m_arg" - use_delimiter = true - help = "Delimited arg where 'multi' and 'takes value' is implied" - - [[command.subcommand]] - name = "flag_args" - help = "Command with flag-style arguments only" - - [[command.subcommand.arg]] - name = "im_f_arg" - help = "Stackable flag arg with 'takes value=false' implied" - - [[command.subcommand.arg]] - name = "ex_f_arg" - takes_value = false - help = "Stackable flag arg with 'takes value=false' set" - - [[command.subcommand]] - name = "args_with_explicit_value_name" - help = "Command with single/multi-args with custom value names" - - [[command.subcommand.arg]] - name = "s_arg_nv_im_tv" - value_name = "s_val_impl" - help = "Single arg with value name, implying 'takes_value'=true" - - [[command.subcommand.arg]] - name = "s_arg_nv_ex_tv" - value_name = "s_val_expl" - takes_value = true - help = "Single arg with value name and explicit 'takes_value'=true" - - [[command.subcommand.arg]] - name = "m_arg_named_val" - value_name = "m_val" - multiple = true - help = "Multi-arg with value name" - - [[command.subcommand.arg]] - name = "s_arg_ln_nv" - value_name = "ln_nv" - help = "Single arg with long name and value name" - - [[command.subcommand]] - name = "arg_with_aliases" - help = "Command with argument aliasing, custom long, and short names" - - [[command.subcommand.arg]] - name = "single_arg" - takes_value = true - long = "s_arg" - short = "s" - help = "Single arg with long/short name" - - [[command.subcommand.arg]] - name = "multi_arg" - takes_value = true - multiple = true - long = "m_arg" - short = "m" - help = "Multi-arg with long/short name" - - [[command.subcommand.arg]] - name = "occurrence_counter" - long = "cnt" - short = "o" - help = "Flag arg with long/short name" - - [[command.subcommand.arg]] - name = "flag_arg_short_name" - short = "f" - help = "Flag arg with short name only" - - [[command.subcommand.arg]] - name = "flag_arg_long_name" - long = "ln_f_arg" - help = "Flag arg with long name only" - - [[command.subcommand.arg]] - name = "flag_arg_dupl_ln_sn" - long = "f" - help = "Flag arg with ln matching another's sn" - - [[command.subcommand.arg]] - name = "fa_sn_aliases" - short_aliases = ['a', 'b'] - help = "Flag arg with short aliases" - - [[command.subcommand.arg]] - name = "fa_sn_and_aliases" - short = "c" - short_aliases = ['d', 'e'] - help = "Flag arg with short name and short aliases" - - [[command.subcommand.arg]] - name = "fa_ln_aliases" - long_aliases = ['fa', 'fb'] - help = "Flag arg with long aliases" - - [[command.subcommand.arg]] - name = "fa_ln_and_aliases" - long = "fc" - long_aliases = ['fd', 'fe'] - help = "Flag arg with long name and long aliases" - - [[command.subcommand.arg]] - name = "fa_sn_ln_aliases" - long_aliases = ['sn_ln_1', 'sn_ln_2'] - short_aliases = ['z'] - help = "Flag arg with long and short aliases" - - [[command.subcommand]] - name = "hidden_arg" - help = "Command with a hidden arg" - - [[command.subcommand.arg]] - name = "non_hidden_arg" - hidden = false - takes_value = true - help = "Non-hidden arg" - - [[command.subcommand.arg]] - name = "hidden_arg" - hidden = true - takes_value = true - help = "Hidden arg" - -[[command]] -name = "error_cases" -help = "Commands to test error messages and improper command configuration" - - [[command.subcommand]] - name = "missing_impl_dir" - help = "Parent to test missing implementation directory" - - [[command.subcommand.subcommand]] - name = "missing_impl_dir_subc" - help = "Generate error for missing implementation directory" - - [[command.subcommand]] - name = "missing_impl_file" - help = "Generate error for implementation module file" - - [[command.subcommand]] - name = "test_missing_run_function" - help = "Generate error for a missing run function" - - [[command.subcommand]] - name = "test_exception_in_run" - help = "Generate error for an exception during execution" diff --git a/test_apps/python_app/tests/cli/shared.py b/test_apps/python_app/tests/cli/shared.py index cf952bbe..51c6a572 100644 --- a/test_apps/python_app/tests/cli/shared.py +++ b/test_apps/python_app/tests/cli/shared.py @@ -6,6 +6,95 @@ Cmd = CLIShared.Cmd class CLICommon(CLIShared, PythonAppCommon): + class AppCmds: + def __init__(self): + self.warmup_cmd = CLIShared.app_sub_cmd( + "arg_opt_warmup", + help = "Gross test command demonstrating args/opts from app commands", + args=[ + CmdArg("first", help="First Argument - Required", required=True), + CmdArg("second", help="Second Multi-Argument - Not Required", use_delimiter=True, multi=True), + ], + opts=[ + CmdOpt("flag_opt", sn="f", help="Flag opt"), + CmdOpt("single_opt", sn_aliases=["s"], takes_value=True, help="Single-value non-required opt"), + CmdOpt("multi_opt", sn_aliases=["m"], ln_aliases=["m_opt"], multi=True, help="Multi-value non-required opt"), + CmdOpt("hidden_flag_opt", hidden=True, ln="hidden", help="Hidden flag opt"), + ] + ) + self.nested_cmds = CLIShared.app_sub_cmd( + "nested_app_cmds", + help="Nested app cmds", + subcmds=[ + Cmd( + "nested_l1", + help="Nested app cmds level 1", + subcmds=[ + Cmd( + "nested_l2_a", + help="Nested app cmds level 2 (A)", + subcmds=[ + Cmd( + "nested_l3_a", + help="Nested app cmds level 3 (A-A)" + ), + Cmd( + "nested_l3_b", + help="Nested app cmds level 3 (A-B)" + ), + ] + ), + Cmd( + "nested_l2_b", + help="Nested app cmds level 2 (B)", + subcmds=[ + Cmd( + "nested_l3_a", + help="Nested app cmds level 3 (B-A)" + ), + Cmd( + "nested_l3_b", + help="Nested app cmds level 3 (B-B)" + ), + ] + ) + ] + ) + ] + ) + self.disabling_app_opts = CLIShared.app_sub_cmd( + "disabling_app_opts", + help="Test disabling standard app opts", + subcmds=[ + Cmd( + "disable_targets_opt", + help="Disable the targets and no-targets opt", + subcmds=[ + Cmd("disable_subc", help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ), + Cmd( + "disable_mode_opt", + help="Disable the mode opt", + subcmds=[ + Cmd("disable_subc",help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ), + Cmd( + "disable_app_opts", + help="Disable all app opts", + subcmds=[ + Cmd("disable_subc",help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ) + ] + ) + app_cmds = AppCmds() + app_commands = app_cmds + _no_config_run_opts = { "with_configs": CLIShared.configs.suppress_plugin_collecting_config, "bypass_config_lookup": True diff --git a/test_apps/python_app/tests/cli/tests__app_cmd_building.py b/test_apps/python_app/tests/cli/tests__app_cmd_building.py index 46cc4a62..578e0cdf 100644 --- a/test_apps/python_app/tests/cli/tests__app_cmd_building.py +++ b/test_apps/python_app/tests/cli/tests__app_cmd_building.py @@ -2,60 +2,8 @@ from .shared import CLICommon, Cmd, CmdOpt, CmdArg class T_AppCmdBuilding(CLICommon): - warmup_cmd = CLICommon.app_sub_cmd( - "arg_opt_warmup", - help = "Gross test command demonstrating args/opts from app commands", - args=[ - CmdArg("first", help="First Argument - Required", required=True), - CmdArg("second", help="Second Multi-Argument - Not Required", use_delimiter=True, multi=True), - ], - opts=[ - CmdOpt("flag_opt", sn="f", help="Flag opt"), - CmdOpt("single_opt", sn_aliases=["s"], takes_value=True, help="Single-value non-required opt"), - CmdOpt("multi_opt", sn_aliases=["m"], ln_aliases=["m_opt"], multi=True, help="Multi-value non-required opt"), - CmdOpt("hidden_flag_opt", hidden=True, ln="hidden", help="Hidden flag opt"), - ] - ) - nested_cmds = CLICommon.app_sub_cmd( - "nested_app_cmds", - help="Nested app cmds", - subcmds=[ - Cmd( - "nested_l1", - help="Nested app cmds level 1", - subcmds=[ - Cmd( - "nested_l2_a", - help="Nested app cmds level 2 (A)", - subcmds=[ - Cmd( - "nested_l3_a", - help="Nested app cmds level 3 (A-A)" - ), - Cmd( - "nested_l3_b", - help="Nested app cmds level 3 (A-B)" - ), - ] - ), - Cmd( - "nested_l2_b", - help="Nested app cmds level 2 (B)", - subcmds=[ - Cmd( - "nested_l3_a", - help="Nested app cmds level 3 (B-A)" - ), - Cmd( - "nested_l3_b", - help="Nested app cmds level 3 (B-B)" - ), - ] - ) - ] - ) - ] - ) + warmup_cmd = CLICommon.app_cmds.warmup_cmd + nested_cmds = CLICommon.app_cmds.nested_cmds def test_app_command_args_and_opts(self): cmd = self.warmup_cmd @@ -137,34 +85,6 @@ def test_nested_cmds(self, cmd, lvl, sublvl): out = cmd.run() assert f"Hi from 'nested_app_cmds' level {lvl}{ ' (' + sublvl + ')' if sublvl else ''}!" in out - class DisablingAppOpts(): - @pytest.mark.skip - def test_app_opts_are_added_by_default(self): - cmd = self.disabling_app_opts - help = cmd.get_help_msg() - help.assert_args(None) - help.assert_opts( - cmd.app_ext_missing_impl, - cmd.flag_opt, - "help", - cmd.opt_taking_value, - "v", - 'vk' - ) - - @pytest.mark.skip - def test_target_is_not_loaded_by_default(self): - cmd = self.disabling_app_opts - cmd.get_help_msg() - - @pytest.mark.skip - def test_disabling_app_opts(self): - fail - - @pytest.mark.skip - def test_disabling_app_opts_individually(self): - fail - class TestErrorCases(CLICommon): @pytest.mark.skip def test_invalid_cmd_toml(self): diff --git a/test_apps/python_app/tests/cli/tests__cmd_integration.py b/test_apps/python_app/tests/cli/tests__cmd_integration.py new file mode 100644 index 00000000..bb99f026 --- /dev/null +++ b/test_apps/python_app/tests/cli/tests__cmd_integration.py @@ -0,0 +1,45 @@ +import pytest +from .shared import CLICommon, Cmd, CmdOpt, CmdArg + +class T_CommandIntegration(CLICommon): + class TestDisablingAppOpts(CLICommon): + disabling_app_opts = CLICommon.app_cmds.disabling_app_opts + disabling_app_opts_from_pl = CLICommon.plugins.python_plugin.disabling_app_opts_from_pl + disabling_app_opts_from_aux = CLICommon.aux.ns.python_app_aux_cmds.disabling_app_opts_from_aux + no_app_opts = ["h", "v", "vk"] + no_target_opts = ["h", "m", "v", "vk"] + no_mode_opts = ["h", 'nt', "t", "v", "vk"] + + def test_app_opts_are_added_by_default(self): + help = self.disabling_app_opts.get_help_msg() + help.assert_args(None) + help.assert_bare_app_opts() + + cmds = [ + (disabling_app_opts.disable_targets_opt, no_target_opts), + (disabling_app_opts.disable_mode_opt, no_mode_opts), + (disabling_app_opts.disable_app_opts, no_app_opts), + (disabling_app_opts_from_pl.disable_targets_opt, no_target_opts), + (disabling_app_opts_from_pl.disable_mode_opt, no_mode_opts), + (disabling_app_opts_from_pl.disable_app_opts, no_app_opts), + (disabling_app_opts_from_aux.disable_targets_opt, no_target_opts), + (disabling_app_opts_from_aux.disable_mode_opt, no_mode_opts), + (disabling_app_opts_from_aux.disable_app_opts, no_app_opts), + ] + ids = [f"{cmd[0].parent.name}.{cmd[0].name}" for cmd in cmds] + @pytest.mark.parametrize("cmd,opts", cmds, ids=ids) + def test_disabling_app_opts(self, cmd, opts): + help = cmd.get_help_msg() + help.assert_opts(*opts) + + @pytest.mark.parametrize("cmd,opts", cmds, ids=ids) + def test_app_opt_disables_are_inherited(self, cmd, opts): + cmd = cmd.disable_subc + help = cmd.get_help_msg() + help.assert_opts(*opts) + + @pytest.mark.parametrize("cmd,opts", cmds, ids=ids) + def test_inherited_app_opt_disables_can_be_overridden(self, cmd, opts): + cmd = cmd.override_subc + help = cmd.get_help_msg() + help.assert_bare_app_opts() \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands.toml b/test_apps/python_plugin/python_plugin/commands.toml index ca0144fd..b587d807 100644 --- a/test_apps/python_plugin/python_plugin/commands.toml +++ b/test_apps/python_plugin/python_plugin/commands.toml @@ -101,6 +101,56 @@ help = "Echos the input" long = "repeat" short = "r" +# Command disabling standard app opts +[[command]] +name = "disabling_app_opts_from_pl" +help = "Test disabling standard app opts from plugin commands" +in_global_context = false + + [[command.subcommand]] + name = "disable_targets_opt" + help = "Disable the targets and no-targets opt" + add_target_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_target_opt = true + + [[command.subcommand]] + name = "disable_mode_opt" + help = "Disable the mode opt" + add_mode_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_mode_opt = true + + [[command.subcommand]] + name = "disable_app_opts" + help = "Disable all app opts" + add_target_opt = false + add_mode_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_target_opt = true + add_mode_opt = true + # TODO add this and test # FOR_PR # [[extension]] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_aux_cmds.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_aux_cmds.toml new file mode 100644 index 00000000..0c76bc61 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_aux_cmds.toml @@ -0,0 +1,48 @@ +[[command]] +name = "disabling_app_opts_from_aux" +help = "Test disabling standard app opts from aux commands" +in_global_context = false + + [[command.subcommand]] + name = "disable_targets_opt" + help = "Disable the targets and no-targets opt" + add_target_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_target_opt = true + + [[command.subcommand]] + name = "disable_mode_opt" + help = "Disable the mode opt" + add_mode_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_mode_opt = true + + [[command.subcommand]] + name = "disable_app_opts" + help = "Disable all app opts" + add_target_opt = false + add_mode_opt = false + + [[command.subcommand.subcommand]] + name = "disable_subc" + help = "Disables inherited from parent" + + [[command.subcommand.subcommand]] + name = "override_subc" + help = "Overrides disable inherited from parent" + add_target_opt = true + add_mode_opt = true \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_aux_cmds_cfg.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_aux_cmds_cfg.toml new file mode 100644 index 00000000..6a736033 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_aux_cmds_cfg.toml @@ -0,0 +1,2 @@ +[[auxillary_commands]] +path = "./python_app_aux_cmds.toml" \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py index b47dac24..223ecf5e 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py @@ -413,11 +413,55 @@ def __init__(self): def base_cmd(self): return self.python_no_app_aux_cmds +class PythonAppAuxCmds(cli.CLI): + Cmd = Cmd + + def __init__(self): + self.name = "python_app_aux_cmds" + self.config_toml = aux_cmds_dir.joinpath(f"{self.name}_cfg.toml") + self.disabling_app_opts_from_aux = self.aux_sub_cmd( + self.name, + "disabling_app_opts_from_aux", + help="Test disabling standard app opts from plugin commands", + from_config=self.config_toml, + subcmds=[ + Cmd( + "disable_targets_opt", + help="Disable the targets and no-targets opt", + subcmds=[ + Cmd("disable_subc", help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ), + Cmd( + "disable_mode_opt", + help="Disable the mode opt", + subcmds=[ + Cmd("disable_subc",help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ), + Cmd( + "disable_app_opts", + help="Disable all app opts", + subcmds=[ + Cmd("disable_subc",help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ) + ] + ) + + @property + def base_cmd(self): + return self.python_app_aux_cmds + class AuxNamespaces: def __init__(self) -> None: self.dummy_cmds = DummyCmds() self.cmd_testers = CmdTesters() self.python_no_app_aux_cmds = PythonNoAppAuxCmds() + self.python_app_aux_cmds = PythonAppAuxCmds() self.aux_cmds_from_cli_dir = AuxCmdsFromCliDir() self.add_aux_cmd = AddAuxCmds() diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py index 027f1e91..fe3ae52d 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py @@ -135,6 +135,37 @@ def __init__(self): ) ] ) + self.disabling_app_opts_from_pl = self.pl_sub_cmd( + self.name, + "disabling_app_opts_from_pl", + help="Test disabling standard app opts from plugin commands", + subcmds=[ + Cmd( + "disable_targets_opt", + help="Disable the targets and no-targets opt", + subcmds=[ + Cmd("disable_subc", help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ), + Cmd( + "disable_mode_opt", + help="Disable the mode opt", + subcmds=[ + Cmd("disable_subc",help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ), + Cmd( + "disable_app_opts", + help="Disable all app opts", + subcmds=[ + Cmd("disable_subc",help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ) + ] + ) @property def base_cmd(self): @@ -147,7 +178,7 @@ def ordered_subcmds(self): "help", self.plugin_says_hi, self.plugin_test_args, - self.plugin_test_ext_stacking + self.plugin_test_ext_stacking, ] class PythonPluginNoCmds(cli.CLI): From 5a51c3bdba6e6f9febcb5c8682f1a24e25418373 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 15 Feb 2023 20:08:48 -0600 Subject: [PATCH 022/200] Forgot a file --- test_apps/python_app/tests/cli_test.py | 32 ++++++++------------------ 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 77831f33..65c8cb27 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -8,6 +8,7 @@ from cli.tests__core_cmds import T_AppWorkspaceCoreCommands from cli.tests__cmd_exts_from_app import T_ExtendingFromAppCmds from cli.tests__reserved_opts import T_ReservedOpts +from cli.tests__cmd_integration import T_CommandIntegration class TestAppCmdBuilding(T_AppCmdBuilding): pass @@ -21,6 +22,9 @@ class TestAppWorkspaceCoreCommands(T_AppWorkspaceCoreCommands): class TestReservedOpts(T_ReservedOpts): pass +class TestCommandIntegration(T_CommandIntegration): + pass + origen_cli = os.getenv('TRAVIS_ORIGEN_CLI') or 'origen' def test_origen_v(): @@ -64,6 +68,12 @@ class TestAuxCommandsAreAdded: @pytest.mark.skip class TestAppPluginAndAuxCommandClashing: + # core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( + # exts, + # with_env=extend_core_cmds_env, + # from_configs=CLICommon.configs.suppress_plugin_collecting_config, + # ) + def test_app_cmd_overrides_pl_cmd(self): fail @@ -78,25 +88,3 @@ def test_app_cmd_overrides_aux_cmd(self): class TestModeOpts(): def test_(): fail - -@pytest.mark.skip -class PluginCmdsInApp(): - def test_app_opts_are_added_by_default(self): - fail - - def test_disabling_app_opts(self): - fail - - def test_disabling_app_opts_individually(self): - fail - -@pytest.mark.skip -class AuxCmdsInApp(): - def test_app_opts_are_added_by_default(self): - fail - - def test_disabling_app_opts(self): - fail - - def test_disabling_app_opts_individually(self): - fail From 208bb226937111964d711cbe780bf4dca4e1d0f5 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 29 Mar 2023 20:05:24 -0500 Subject: [PATCH 023/200] Handle inter and intra opt exts. Add many tests but still some placeholders. Add some intra-cmd cases as well. --- python/origen/origen/boot.py | 16 +- .../origen/helpers/regressions/cli/command.py | 42 +- .../helpers/regressions/cli/help_msg.py | 6 +- .../origen/helpers/regressions/cli/origen.py | 66 +- rust/origen/cli/src/bin.rs | 3 +- rust/origen/cli/src/commands/app.rs | 15 +- rust/origen/cli/src/commands/mod.rs | 22 +- rust/origen/cli/src/framework/app_cmds.rs | 4 +- rust/origen/cli/src/framework/aux_cmds.rs | 4 +- rust/origen/cli/src/framework/extensions.rs | 51 +- rust/origen/cli/src/framework/helps.rs | 9 +- rust/origen/cli/src/framework/mod.rs | 574 ++++++++++++++--- rust/origen/cli/src/framework/plugins.rs | 4 +- test_apps/python_app/config/commands.toml | 160 ++++- .../plugin/python_plugin/plugin_test_args.py | 6 + .../intra_cmd_conflicts.conflicts_subc.py | 1 + .../example/commands/intra_cmd_conflicts.py | 1 + .../example/commands/nested_app_cmds.py | 8 +- test_apps/python_app/tests/cli/shared.py | 298 +++++++++ .../tests/cli/tests__cmd_exts_from_app.py | 138 +++- .../tests/cli/tests__extending_app_cmds.py | 336 ++++++++++ .../tests/cli/tests__intra_cmd_conflicts.py | 111 ++++ test_apps/python_app/tests/cli_test.py | 30 +- .../tests/cmd_building/cmd_testers.toml | 4 +- .../tests__intra_cmd_conflicts.py | 106 +++ .../tests/cmd_exts/tests__ext_conflicts.py | 333 ++++++++++ .../tests/cmd_exts/tests__extending_cmds.py | 545 ++++++++++++++++ test_apps/python_no_app/tests/misc_test.py | 609 ------------------ .../python_no_app/tests/test_cmd_building.py | 6 +- .../python_no_app/tests/test_cmd_exts.py | 8 + .../python_plugin/python_plugin/commands.toml | 232 ++++++- .../commands/extensions/app.arg_opt_warmup.py | 6 + ..._cmds.nested_l1.nested_l2_b.nested_l3_a.py | 6 + .../app.nested_app_cmds.nested_l1.py | 6 + .../intra_cmd_conflicts.conflicts_subc.py | 1 + .../commands/intra_cmd_conflicts.py | 1 + .../aux_cmds/ext_conflicts.toml | 215 +++++++ .../ext_conflicts/app.arg_opt_warmup.py | 6 + .../plugin.python_plugin.plugin_test_args.py | 6 + ...gin.python_plugin.plugin_test_args.subc.py | 6 + .../aux_cmds/ext_conflicts_cfg.toml | 9 + .../aux_cmds/exts_workout.py | 103 --- .../python_plugin/plugin_test_ext_stacking.py | 7 - .../aux_cmds/python_app_exts.toml | 43 ++ .../python_app_exts/app.arg_opt_warmup.py | 6 + ..._cmds.nested_l1.nested_l2_b.nested_l3_a.py | 6 + .../app.nested_app_cmds.nested_l1.py | 6 + .../aux_cmds/python_app_exts_cfg.toml | 9 + .../cli/__init__.py | 125 +++- .../cli/cmd_models/__init__.py | 4 +- .../cli/cmd_models/auxs.py | 3 + .../cli/cmd_models/exts.py | 384 ++++++++++- .../cli/cmd_models/plugins.py | 166 +++++ .../commands.toml | 164 +++++ .../commands/extensions/app/arg_opt_warmup.py | 6 + ..._cmds.nested_l1.nested_l2_b.nested_l3_a.py | 6 + .../app/nested_app_cmds.nested_l1.py | 6 + .../plugin/python_plugin/plugin_test_args.py | 6 + .../python_plugin/plugin_test_args.subc.py | 6 + 59 files changed, 4157 insertions(+), 909 deletions(-) create mode 100644 test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_args.py create mode 100644 test_apps/python_app/example/commands/intra_cmd_conflicts.conflicts_subc.py create mode 100644 test_apps/python_app/example/commands/intra_cmd_conflicts.py create mode 100644 test_apps/python_app/tests/cli/tests__extending_app_cmds.py create mode 100644 test_apps/python_app/tests/cli/tests__intra_cmd_conflicts.py create mode 100644 test_apps/python_no_app/tests/cmd_building/tests__intra_cmd_conflicts.py create mode 100644 test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py create mode 100644 test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py create mode 100644 test_apps/python_no_app/tests/test_cmd_exts.py create mode 100644 test_apps/python_plugin/python_plugin/commands/extensions/app.arg_opt_warmup.py create mode 100644 test_apps/python_plugin/python_plugin/commands/extensions/app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py create mode 100644 test_apps/python_plugin/python_plugin/commands/extensions/app.nested_app_cmds.nested_l1.py create mode 100644 test_apps/python_plugin/python_plugin/commands/intra_cmd_conflicts.conflicts_subc.py create mode 100644 test_apps/python_plugin/python_plugin/commands/intra_cmd_conflicts.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/app.arg_opt_warmup.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/plugin.python_plugin.plugin_test_args.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/plugin.python_plugin.plugin_test_args.subc.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts_cfg.toml delete mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.arg_opt_warmup.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.nested_app_cmds.nested_l1.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts_cfg.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/arg_opt_warmup.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/nested_app_cmds.nested_l1.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_args.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_args.subc.py diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 959e2709..1408184e 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -197,13 +197,23 @@ def run(func): for ext in extensions: current_ext = ext - m = mod_from_modulized_path(ext['root'], [cmd_src, command if cmd_src == "core" else dispatch_src, *subcmds]) + if cmd_src == "core": + _dispatch_src = [command] + elif cmd_src == "app": + _dispatch_src = [] + else: + _dispatch_src = [dispatch_src] + m = mod_from_modulized_path(ext['root'], [cmd_src, *_dispatch_src, *subcmds]) if isinstance(m, list): if len(m) == 2 and isinstance(m[1], Exception): origen.log.error(f"Could not load {ext['source']} extension implementation from '{ext['name']}' ({m[0]})") origen.log.error(f"Received exception:\n{m[1]}") else: - origen.log.error(f"Could not find implementation for {ext['source']} extension '{ext['name']}'") + if ext['source'] == "app": + n = '' + else: + n = f"'{ext['name']}'" + origen.log.error(f"Could not find implementation for {ext['source']} extension{n}") for msg in m: origen.log.error(f" {msg}") ext['mod'] = None @@ -460,8 +470,6 @@ def tabify(message): elif command == dispatch_app_cmd: - # FOR_PR fix this upstream - subcmds = subcmds[1:] call_user_cmd("app") elif command == dispatch_plugin_cmd: diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py index ba9260d2..5748289e 100644 --- a/python/origen/origen/helpers/regressions/cli/command.py +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -23,6 +23,9 @@ def __init__( self.required = required self.value_name = value_name self.use_delimiter = use_delimiter + self.is_ext = False + self.is_opt = False + self.is_arg = True class CmdOpt(CmdArgOpt): def __init__( @@ -38,7 +41,9 @@ def __init__( ln_aliases=None, value_name=None, hidden = False, - use_delimiter=None + use_delimiter=None, + full_name=None, + access_with_full_name=False, ): self.name = name self.help = help @@ -52,9 +57,17 @@ def __init__( self.value_name = value_name self.hidden = hidden self.use_delimiter = use_delimiter + self.full_name = full_name + self.access_with_full_name = access_with_full_name + self.is_ext = False + self.is_opt = True + self.is_arg = False def to_ln(self): - return self.ln or self.name + if self.access_with_full_name: + return self.full_name + else: + return self.ln or self.name def ln_to_cli(self): return f"--{self.to_ln()}" @@ -77,16 +90,32 @@ class SrcTypes(enum.Enum): PLUGIN = enum.auto() AUX = enum.auto() + def __str__(self) -> str: + if self == self.CORE: + return "origen" + elif self == self.APP: + return "app" + elif self == self.PLUGIN: + return "plugin" + elif self == self.AUX: + return "aux" + class CmdExtOpt(CmdOpt): @classmethod def from_src(cls, src_name, src_type, *args): for a in args: a.src_name = src_name a.src_type = src_type + if src_type == SrcTypes.APP: + src_n = "" + else: + src_n = f".{src_name}" + a.full_name = f"ext_opt.{src_type}{src_n}.{a.name}" return args def __init__(self, *args, src_name=None, src_type=None, **kwargs): CmdOpt.__init__(self, *args, **kwargs) + self.is_ext = True self.src_name = src_name self.src_type = src_type @@ -101,6 +130,15 @@ def provided_by(self): else: return self.src_name + @property + def displayed(self): + if self.provided_by_app: + return "the App" + elif self.src_type == SrcTypes.PLUGIN: + return f"plugin '{self.src_name}'" + elif self.src_type == SrcTypes.AUX: + return f"aux namespace '{self.src_name}'" + class CmdDemo: def __init__(self, name, args=None, expected_output=None) -> None: self.name = name diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index 6fb7aa8c..9ceae40d 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -418,4 +418,8 @@ def assert_targets_opt_at(self, expected_index): def assert_summary(self, msg): assert self.help == msg - return True \ No newline at end of file + return True + + @property + def logged_errors(self): + return list(filter(lambda l: "[ERROR] (" in l, self.text.split("\n"))) \ No newline at end of file diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 106bbe4f..41e1a6fb 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -54,12 +54,66 @@ def eval_cmd(cls, add_opts=None): ] ) + @classmethod + def creds_cmd(cls, add_opts=None): + return Cmd( + cls.creds, + help="Set or clear user credentials", + subcmds=[ + Cmd( + "set", + help="Set the current user's password", + opts=(add_opts or []) + [ + CmdOpt( + "all", + help="Set the password for all datasets", + ln="all", + sn="a", + takes_value=False, + required=False, + ), + CmdOpt( + "datasets", + help="Specify the dataset to set the password for", + ln="datasets", + sn="d", + multi=True, + required=False, + ), + ] + ), + Cmd( + "clear", + help="Clear the user's password", + opts=(add_opts or []) + [ + CmdOpt( + "all", + help="Clear the password for all datasets", + ln="all", + sn="a", + takes_value=False, + required=False, + ), + CmdOpt( + "datasets", + help="Specify the dataset to clear the password for", + ln="datasets", + sn="d", + multi=True, + required=False, + ), + ] + ) + ] + ) + @classmethod def interactive_cmd(cls, add_opts=None): return Cmd( cls.i, help="Start an Origen console to interact with the DUT", aliases=['i'], + opts=add_opts, ) @classmethod @@ -113,7 +167,7 @@ class Names: pl = Cmd(names.pl) proj = Cmd(names.proj) new = Cmd(names.new) - creds = Cmd(names.creds) + creds = _CommonNames.creds_cmd() i = _CommonNames.interactive_cmd() fmt = Cmd(names.fmt) build = Cmd(names.build) @@ -215,7 +269,7 @@ def targets_arg(cls, help): aux_cmds = Cmd(names.aux_cmds) build = Cmd(names.build) compile = Cmd(names.compile) - creds = Cmd(names.creds) + creds = _CommonNames.creds_cmd(add_opts=in_app_opts.all()) env = Cmd(names.env) eval = _CommonNames.eval_cmd(add_opts=in_app_opts.all()) exec = Cmd(names.exec) @@ -318,6 +372,10 @@ def missing_required_arg(cls, *vals): mapped_vals.append(f"<{v.to_vn()}>") return "The following required arguments were not provided:" + "\n " + " \n".join(mapped_vals) + @classmethod + def cmd_building_err_prefix(cls, cmd): + return f"When processing command '{cmd.full_name}':" + @classmethod def conflict_msg(cls, cmd, opt, conflict, conflict_type): if conflict_type in ['long name', 'long name alias']: @@ -326,9 +384,9 @@ def conflict_msg(cls, cmd, opt, conflict, conflict_type): hyphens = "-" if isinstance(opt, CmdExtOpt): - return f"Option '{opt.name}' extended from '{opt.provided_by}' for command '{cmd.full_name}' tried to use reserved option {conflict_type} '{conflict}' and will not be available as '{hyphens}{conflict}'" + return f"{cls.cmd_building_err_prefix(cmd)} Option '{opt.name}' extended from {opt.provided_by} tried to use reserved option {conflict_type} '{conflict}' and will not be available as '{hyphens}{conflict}'" else: - return f"Option '{opt.name}' from command '{cmd.full_name}' tried to use reserved option {conflict_type} '{conflict}' and will not be available as '{hyphens}{conflict}'" + return f"{cls.cmd_building_err_prefix(cmd)} Option '{opt.name}' tried to use reserved option {conflict_type} '{conflict}' and will not be available as '{hyphens}{conflict}'" @classmethod def reserved_opt_ln_conflict_msg(cls, cmd, opt, conflict): diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index ea286b4b..3224913c 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -120,8 +120,6 @@ fn main() -> Result<()> { let mut helps = CmdHelps::new(); let app_cmds: Option; let mut extensions = Extensions::new(); - let aux_cmds = AuxCmds::new(&mut extensions)?; - let plugins = match Plugins::new(&mut extensions) { Ok(pl) => pl, Err(e) => { @@ -129,6 +127,7 @@ fn main() -> Result<()> { None } }; + let aux_cmds = AuxCmds::new(&mut extensions)?; if let Some(app) = &STATUS.app.as_ref() { app_cmds = Some(AppCmds::new(app, &mut extensions)?); diff --git a/rust/origen/cli/src/commands/app.rs b/rust/origen/cli/src/commands/app.rs index bb5c0c67..137ff75b 100644 --- a/rust/origen/cli/src/commands/app.rs +++ b/rust/origen/cli/src/commands/app.rs @@ -189,30 +189,23 @@ pub(crate) fn run(cmd: &ArgMatches, mut app: &App, exts: &Extensions, plugins: O } "commands" => { if let Some(subc) = cmd.subcommand() { - // FOR_PR clean up - // let ns_ins = aux_cmds.namespaces.get(subc.0).expect(&format!("Expected auxillary command namespace '{}' to be present, but was not found", subc.0)); - let path = build_path(&cmd)?; - let mut overrides = IndexMap::new(); let mut matches = cmd; let mut path_pieces: Vec = vec!(); app = app.find_subcommand(BASE_CMD).unwrap(); - // app = app.find_subcommand(subc.0).unwrap(); + matches = matches.subcommand_matches("commands").unwrap(); + app = app.find_subcommand("commands").unwrap(); while matches.subcommand_name().is_some() { let n = matches.subcommand_name().unwrap(); matches = matches.subcommand_matches(&n).unwrap(); app = app.find_subcommand(n).unwrap(); - // path_pieces.push(format!("r'{}'", n)); path_pieces.push(n.to_string()); } - - // let mut cmd_def = get_cmd_def(cmd, app); // app.find_subcommand(); - // TODO app isn't right here - needs to be subcommand - launch_as("_dispatch_app_cmd_", Some(&path_pieces), matches, app, exts.get_aux_ext(subc.0, &path), plugins, Some( + let path = path_pieces.join("."); + launch_as("_dispatch_app_cmd_", Some(&path_pieces), matches, app, exts.get_app_ext(&path), plugins, Some( { overrides.insert("dispatch_root".to_string(), Some(format!("r'{}'", app_cmds.cmds_root()?.display()))); - // overrides.insert("dispatch_cmds".to_string(), Some(format!("[{}]", path_pieces.join(", ")))); overrides } ), None); diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 1b068039..2ea62d6e 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -124,6 +124,16 @@ pub fn launch2(invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec, subcmds: Option<&Vec>, invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>, overrides: Option>>, arg_overrides: Option>>) { + macro_rules! as_name { + ($arg_name:expr) => {{ + if $arg_name.starts_with(crate::framework::extensions::EXT_BASE_NAME) { + $arg_name.splitn(4, ".").last().unwrap() + } else { + $arg_name + } + }} + } + let mut args: Vec = vec!(); // println!("exts from launch: {:?}", cmd_exts); @@ -133,7 +143,7 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation for ext in exts { if let Some(opts) = ext.opts.as_ref() { for opt in opts { - opt_names.insert(opt.name.as_str(), &ext.source); + opt_names.insert(opt.full_name.as_ref().unwrap().as_str(), &ext.source); if !ext_args.contains_key(&ext.source) { ext_args.insert(&ext.source, vec!()); } @@ -172,16 +182,16 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation if arg.is_multiple_values_set() { // Give to Python as an array of string values let r = invocation.get_many::(arg_n).unwrap().map(|x| format!("\"{}\"", x)).collect::>(); - arg_str = format!("r'{}': [{}]", arg_n, r.join(", ")); + arg_str = format!("r'{}': [{}]", as_name!(arg_n), r.join(", ")); } else { // Give to Python a single string value - arg_str = format!("r'{}': r'{}'", arg_n, invocation.get_one::(arg_n).unwrap()); + arg_str = format!("r'{}': r'{}'", as_name!(arg_n), invocation.get_one::(arg_n).unwrap()); } } else { match arg.get_action() { SetArgTrue => { if *(invocation.get_one::(arg_n).unwrap()) { - arg_str = format!("r'{}': True", arg_n); + arg_str = format!("r'{}': True", as_name!(arg_n)); } else { continue; } @@ -189,13 +199,13 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation CountArgs => { let count = *(invocation.get_one::(arg_n).unwrap()); if count > 0 { - arg_str = format!("r'{}': {}", arg_n, count); + arg_str = format!("r'{}': {}", as_name!(arg_n), count); } else { continue; } }, _ => { - log_error!("Unsupported action '{:#?}' for arg '{}'", arg.get_action(), arg_n); //arg_str = format!("r'{}': True", arg_n) + log_error!("Unsupported action '{:#?}' for arg '{}'", arg.get_action(), as_name!(arg_n)); //arg_str = format!("r'{}': True", arg_n) exit(1); } } diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index 7f7d90c9..5486a46d 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -99,8 +99,8 @@ pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, app_commands: for top_cmd_name in app_commands.top_commands.iter() { app_cmds_cmd = app_cmds_cmd.subcommand(build_commands( &app_commands.commands.get(top_cmd_name).unwrap(), - &|cmd, app| { - exts.apply_to_app_cmd(cmd, app) + &|cmd, app, opt_cache| { + exts.apply_to_app_cmd(cmd, app, opt_cache) }, &|cmd| { app_commands.commands.get(cmd).unwrap() diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index ed00cf7f..4b7f9bc5 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -178,8 +178,8 @@ pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: for top_cmd_name in cmds.top_commands.iter() { aux_sub_sub = aux_sub_sub.subcommand(build_commands( &cmds.commands.get(top_cmd_name).unwrap(), - &|cmd, app| { - exts.apply_to_aux_cmd(&ns, cmd, app) + &|cmd, app, opt_cache| { + exts.apply_to_aux_cmd(&ns, cmd, app, opt_cache) }, &|cmd| { cmds.commands.get(cmd).unwrap() diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs index 90f978d5..e037d815 100644 --- a/rust/origen/cli/src/framework/extensions.rs +++ b/rust/origen/cli/src/framework/extensions.rs @@ -3,11 +3,20 @@ use origen::Result; use super::plugins::Plugin; use super::aux_cmds::{AuxCmdNamespace}; use clap::Command as ClapCommand; -use super::{ArgTOML, Arg, OptTOML, Opt, CmdSrc, Applies}; +use super::{ArgTOML, Arg, OptTOML, Opt, CmdSrc, Applies, CmdOptCache}; use crate::{from_toml_args, from_toml_opts}; use std::path::PathBuf; use std::fmt; +macro_rules! ext_opt { + () => { + "ext_opt" + } +} + +pub const EXT_BASE_NAME: &'static str = ext_opt!(); +pub const EXT_BASE_PREFIX: &'static str = concat!(ext_opt!(), "."); + // TODO refactor this use super::helps::CmdSrc as ExtensionTarget; @@ -54,29 +63,28 @@ impl Extensions { } pub fn apply_to_core_cmd<'a>(&'a self, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { - self.apply_to(&ExtensionTarget::Core(cmd.to_string()), app) + let e = ExtensionTarget::Core(cmd.to_string()); + let mut cache = CmdOptCache::unchecked_populated(&app, e.to_string()); + self.apply_to(&e, app, &mut cache) } - pub fn apply_to_app_cmd<'a>(&'a self, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { - self.apply_to(&ExtensionTarget::App(cmd.to_string()), app) + pub fn apply_to_app_cmd<'a>(&'a self, cmd: &str, app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { + self.apply_to(&ExtensionTarget::App(cmd.to_string()), app, cache) } - pub fn apply_to_pl_cmd<'a>(&'a self, pl: &str, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { - self.apply_to(&ExtensionTarget::Plugin(pl.to_string(), cmd.to_string()), app) + pub fn apply_to_pl_cmd<'a>(&'a self, pl: &str, cmd: &str, app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { + self.apply_to(&ExtensionTarget::Plugin(pl.to_string(), cmd.to_string()), app, cache) } - pub fn apply_to_aux_cmd<'a>(&'a self, ns: &str, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { - self.apply_to(&ExtensionTarget::Aux(ns.to_string(), cmd.to_string()), app) + pub fn apply_to_aux_cmd<'a>(&'a self, ns: &str, cmd: &str, app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { + self.apply_to(&ExtensionTarget::Aux(ns.to_string(), cmd.to_string()), app, cache) } - pub fn apply_to<'a>(&'a self, cmd: &ExtensionTarget, mut app: ClapCommand<'a>) -> ClapCommand<'a> { + pub fn apply_to<'a>(&'a self, cmd: &ExtensionTarget, mut app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { if let Some(exts) = self.extensions.get(cmd) { for ext in exts { - if let Some(args) = ext.args.as_ref() { - app = super::apply_args(args, app); - } if let Some(opts) = ext.opts.as_ref() { - app = super::apply_opts(opts, app); + app = super::apply_opts(opts, app, cache, Some(ext)); } } } else { @@ -113,7 +121,6 @@ pub struct ExtensionTOML { pub in_global_context: Option, // Extend in the global context pub in_app_context: Option, // Extend in application context pub on_env: Option>, - pub arg: Option>, pub opt: Option>, // TODO see about supporting some of these in the future? // pub name: String, @@ -124,13 +131,23 @@ pub struct ExtensionTOML { // pub full_name: String, } -#[derive(Debug, Hash, Eq, PartialEq)] +#[derive(Debug, Hash, Eq, PartialEq, Clone)] pub enum ExtensionSource { App, Plugin(String), Aux(String, PathBuf), } +impl ExtensionSource { + pub fn to_path(&self) -> String { + match self { + Self::App => "app".to_string(), + Self::Plugin(pl_name) => format!("plugin.{pl_name}"), + Self::Aux(ns, _) => format!("aux.{ns}") + } + } +} + impl fmt::Display for ExtensionSource { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { @@ -147,7 +164,6 @@ pub struct Extension { pub in_global_context: Option, pub in_app_context: Option, pub on_env: Option>, - pub args: Option>, pub opts: Option>, pub source: ExtensionSource, @@ -159,7 +175,6 @@ impl Extension { in_global_context: ext.in_global_context, in_app_context: ext.in_app_context, on_env: ext.on_env, - args: None, opts: None, source: ext_source, extends: ext.extend, @@ -167,7 +182,6 @@ impl Extension { if !slf.applies()? { return Ok(None) } - slf.args = from_toml_args!(ext.arg); slf.opts = from_toml_opts!(ext.opt, &slf.extends, &slf.source, Some(&slf.extends)); if let Some(opts) = slf.opts.as_mut() { for opt in opts { @@ -184,6 +198,7 @@ impl Extension { } } ); + opt.full_name = Some(format!("{}.{}.{}", EXT_BASE_NAME, slf.source.to_path(), opt.name)); } } Ok(Some(slf)) diff --git a/rust/origen/cli/src/framework/helps.rs b/rust/origen/cli/src/framework/helps.rs index 7f0fc09b..98174d23 100644 --- a/rust/origen/cli/src/framework/helps.rs +++ b/rust/origen/cli/src/framework/helps.rs @@ -2,6 +2,7 @@ use std::collections::HashMap; use crate::commands::_prelude::*; use std::fmt; use super::extensions::ExtensionSource; +use origen_metal::indexmap::IndexSet; #[derive(Debug)] pub struct CmdHelps { @@ -77,13 +78,13 @@ impl CmdHelps { for (target, exts) in extensions.exts() { if let Some(help) = self.helps.get_mut(&target) { let mut extended_from_app = false; - let mut pls: Vec<&str> = vec!(); - let mut nspaces: Vec<&str> = vec!(); + let mut pls: IndexSet<&str> = IndexSet::new(); + let mut nspaces: IndexSet<&str> = IndexSet::new(); for ext in exts.iter() { match ext.source { ExtensionSource::App => extended_from_app = true, - ExtensionSource::Plugin(ref n) => pls.push(n), - ExtensionSource::Aux(ref n, _) => nspaces.push(n), + ExtensionSource::Plugin(ref n) => { pls.insert(n); }, + ExtensionSource::Aux(ref n, _) => { nspaces.insert(n); }, } } let mut msg = "This command is extended from:".to_string(); diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index c98fd914..46116b23 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -6,7 +6,7 @@ pub mod aux_cmds; pub mod app_cmds; pub mod core_cmds; -pub use extensions::{Extensions, ExtensionTOML}; +pub use extensions::{Extensions, ExtensionTOML, Extension}; pub use plugins::{Plugins, Plugin}; pub use aux_cmds::AuxCmds; pub use app_cmds::AppCmds; @@ -18,27 +18,116 @@ use clap::Command as ClapCommand; use origen::{Result, in_app_invocation}; use crate::commands::_prelude::clap_arg_actions::*; +#[macro_export] +macro_rules! uses_reserved_prefix { + ($q:expr) => {{ + $q.starts_with(crate::framework::extensions::EXT_BASE_PREFIX) + }} +} + +#[macro_export] +macro_rules! err_processing_cmd_preface { + ($func:ident, $cmd_path:expr, $msg:expr, $($arg:expr),* $(,)?) => {{ + $func!(concat!("When processing command '{}': ", $msg), $cmd_path, $($arg),*) + }} +} + +#[macro_export] +macro_rules! log_err_processing_cmd { + ($cmd_path:expr, $msg:expr, $($arg:expr),* $(,)?) => {{ + crate::err_processing_cmd_preface!(log_error, $cmd_path, $msg, $($arg),*) + }}; +} + #[macro_export] macro_rules! from_toml_args { - ($toml_args: expr) => { + ($toml_args: expr, $cmd_path: expr) => {{ + let mut current_names: Vec> = vec!(); $toml_args.as_ref() .map(|args| args.iter() - .map( |a| crate::framework::Arg::from_toml(a)) + .filter_map( |a| { + if let Some(i) = current_names.iter().position( |n| *n == Some(&a.name)) { + crate::log_err_processing_cmd!( + $cmd_path, + "Argument '{}' is already present. Subsequent occurrences will be skipped (first occurrence at index {})", + &a.name, + i + ); + current_names.push(None); + None + } else if crate::uses_reserved_prefix!(a.name) { // a.name.starts_with(crate::framework::extensions::EXT_BASE_NAME) { + crate::log_err_processing_cmd!( + $cmd_path, + "Argument '{}' uses reserved prefix '{}'. This option will not be available.", + &a.name, + crate::framework::extensions::EXT_BASE_NAME + ); + current_names.push(None); + None + } else { + current_names.push(Some(&a.name)); + Some(crate::framework::Arg::from_toml(a)) + } + }) .collect::>()) - } + }} } #[macro_export] macro_rules! from_toml_opts { ($toml_opts: expr, $cmd_path: expr, $parent: expr) => { - crate::from_toml_opts!($toml_opts, $cmd_path, $parent, None) + crate::from_toml_opts!($toml_opts, $cmd_path, $parent, None::<&str>) }; - ($toml_opts: expr, $cmd_path: expr, $parent: expr, $ext: expr) => { + ($toml_opts: expr, $cmd_path: expr, $parent: expr, $ext: expr) => {{ + let mut current_names: Vec> = vec!(); $toml_opts.as_ref() .map(|opts| opts.iter() - .map( |o| crate::framework::Opt::from_toml(o, $cmd_path, $parent, $ext)) + .filter_map( |o| { + if let Some(i) = current_names.iter().position( |n| *n == Some(&o.name)) { + if $ext.is_some() { + crate::log_err_processing_cmd!( + $cmd_path, + "Option '{}' extended from {} is already present. Subsequent occurrences will be skipped (first occurrence at index {})", + &o.name, + $parent, + i + ); + } else { + crate::log_err_processing_cmd!( + $cmd_path, + "Option '{}' is already present. Subsequent occurrences will be skipped (first occurrence at index {})", + &o.name, + i + ); + } + current_names.push(None); + None + } else if crate::uses_reserved_prefix!(o.name) { // o.name.starts_with(crate::framework::extensions::EXT_BASE_NAME) { + if $ext.is_some() { + crate::log_err_processing_cmd!( + $cmd_path, + "Option '{}' extended from {} uses reserved prefix '{}'. This option will not be available", + &o.name, + $parent, + crate::framework::extensions::EXT_BASE_NAME + ); + } else { + crate::log_err_processing_cmd!( + $cmd_path, + "Option '{}' uses reserved prefix '{}'. This option will not be available", + &o.name, + crate::framework::extensions::EXT_BASE_NAME + ); + } + current_names.push(None); + None + } else { + current_names.push(Some(&o.name)); + Some(crate::framework::Opt::from_toml(o, $cmd_path, $parent, $ext)) + } + }) .collect::>()) - } + }} } pub trait Applies { @@ -127,9 +216,11 @@ pub struct Command { pub args: Option>, pub opts: Option>, pub subcommands: Option>, + // Name offset from the command type (e.g., cmd.subc, instead of origen.cmd.subc, or plugin.pl.cmd.subc) pub full_name: String, pub add_mode_opt: Option, pub add_target_opt: Option, + // FOR_PR seems src not parent pub parent: CmdSrc, pub in_global_context: Option, pub in_app_context: Option, @@ -168,8 +259,26 @@ impl Command { if !slf.applies()? { return Ok(None) } - slf.args = from_toml_args!(cmd.arg); - slf.opts = from_toml_opts!(cmd.opt, cmd_path, &slf.parent); + let fp = slf.parent.to_string(); + slf.args = from_toml_args!(cmd.arg, &fp); + slf.opts = from_toml_opts!(cmd.opt, &fp, &slf.parent); + if let Some(args) = slf.args.as_ref() { + if let Some(opts) = slf.opts.as_mut() { + opts.retain(|o| { + if let Some(idx) = args.iter().position(|a| a.name == o.name) { + crate::log_err_processing_cmd!( + &fp, + "Option '{}' conflicts with Arg of the same name (Arg #{})", + o.name, + idx, + ); + false + } else { + true + } + }); + } + } slf.subcommands = cmd.subcommand.as_ref().map(|sub_cmds| sub_cmds.iter().map(|c| format!("{}.{}", cmd_path, &c.name.to_string())).collect::>() ); @@ -203,6 +312,228 @@ impl Applies for Command { } } +use std::collections::{HashSet, HashMap}; +use origen_metal::indexmap::IndexMap; +#[derive(Debug)] +pub struct CmdOptCache { + opt_names: Vec, + lns: HashMap, + ilns: HashMap, + ln_aliases: HashMap, + sns: HashMap, + sn_aliases: HashMap, + ext_opt_names: IndexMap, + exts: Vec, + cmd_path: String, + last_needs_visible_full_name: bool, + current: String, + +} + +macro_rules! processing_exts { + ($slf:expr) => {{ + $slf.exts.len() > 0 + }} +} + +macro_rules! conflict_err_msg { + ($self:expr, $conflict:expr, $name:expr, $conflict_type:expr, $with_type:expr) => {{ + if processing_exts!($self) { + if $conflict.0 { + // Conflict with the command itself + log_err_processing_cmd!( + $self.cmd_path, + concat!($conflict_type, " '{}' for extension option '{}', from {}, conflicts with ", $with_type, " from command option '{}'"), + $name, + $self.current, + $self.exts.last().unwrap(), + $self.opt_names[$conflict.1] + ); + } else { + // Conflict with an extension + let e = $self.ext_opt_names.get_index($conflict.1).unwrap(); + log_err_processing_cmd!( + $self.cmd_path, + concat!($conflict_type, " '{}' for extension option '{}', from {}, conflicts with ", $with_type, " for extension '{}' provided by {}"), + $name, + $self.current, + $self.exts.last().unwrap(), + e.0, + $self.exts[*e.1] + ); + } + } else { + log_err_processing_cmd!( + $self.cmd_path, + concat!($conflict_type, " '{}' for command option '{}' conflicts with ", $with_type, " from option '{}'"), + $name, + $self.current, + $self.opt_names[$conflict.1] + ); + } + }} +} + +macro_rules! cache { + ($slf:expr, $cache:ident, $to_cache:expr) => {{ + $slf.$cache.insert($to_cache, { + if processing_exts!($slf) { + (false, $slf.ext_opt_names.len() - 1) + } else { + (true, $slf.opt_names.len() - 1) + } + }); + }} +} + +impl CmdOptCache { + pub fn new(cmd_path: String) -> Self { + let mut slf = Self { + opt_names: Vec::new(), + lns: HashMap::new(), + ilns: HashMap::new(), + ln_aliases: HashMap::new(), + sns: HashMap::new(), + sn_aliases: HashMap::new(), + ext_opt_names: IndexMap::new(), + exts: Vec::new(), + cmd_path: cmd_path, + last_needs_visible_full_name: true, + current: "".to_string(), + }; + slf + } + + pub fn unchecked_populated(cmd: &App, cmd_path: String) -> Self { + let mut slf = Self::new(cmd_path); + for (i, arg) in cmd.get_arguments().enumerate() { + let mut push_arg = false; + if let Some(ln) = arg.get_long() { + slf.lns.insert(ln.to_string(), (true, i)); + push_arg = true; + } + if let Some(lns) = arg.get_all_aliases() { + slf.ln_aliases.extend(lns.iter().map( |ln| (ln.to_string(), (true, i))).collect::>()); + push_arg = true; + } + if let Some(sn) = arg.get_short() { + slf.sns.insert(sn, (true, i)); + push_arg = true; + } + if let Some(sns) = arg.get_all_short_aliases() { + slf.sn_aliases.extend(sns.iter().map( |sn| (*sn, (true, i))).collect::>()); + push_arg = true; + } + + if push_arg { + slf.opt_names.push(arg.get_id().to_string()); + } + } + slf + } + + pub fn register(&mut self, name: &String, ext: Option<&Extension>) -> bool { + // TODO name conflict. Probably a better way to deal with this but just skip for now + self.current = name.to_string(); + if let Some(e) = ext { + self.exts.push(e.source.to_string()); + if !self.ext_opt_names.contains_key(name) { + self.ext_opt_names.insert(name.to_string(), self.exts.len() - 1); + } + } else { + self.opt_names.push(name.to_string()); + } + true + } + + pub fn iln_conflicts(&mut self, iln: &String) -> bool { + if let Some(conflict) = self.ln_aliases.get(iln) { + conflict_err_msg!(self, conflict, iln, "Inferred long name", "long name alias"); + true + } else if let Some(conflict) = self.lns.get(iln) { + conflict_err_msg!(self, conflict, iln, "Inferred long name", "long name"); + true + } else if let Some(conflict) = self.ilns.get(iln) { + conflict_err_msg!(self, conflict, iln, "Inferred long name", "inferred long name"); + true + } else { + cache!(self, ilns, iln.to_owned()); + self.last_needs_visible_full_name = false; + false + } + } + + pub fn ln_conflicts(&mut self, ln: &String) -> bool { + if let Some(conflict) = self.ln_aliases.get(ln) { + conflict_err_msg!(self, conflict, ln, "Long name", "long name alias"); + true + } else if let Some(conflict) = self.lns.get(ln) { + conflict_err_msg!(self, conflict, ln, "Long name", "long name"); + true + } else if let Some(conflict) = self.ilns.get(ln) { + conflict_err_msg!(self, conflict, ln, "Long name", "inferred long name"); + true + } else { + cache!(self, lns, ln.to_owned()); + self.last_needs_visible_full_name = false; + false + } + } + + pub fn sn_conflicts(&mut self, sn: char) -> bool { + if let Some(conflict) = self.sn_aliases.get(&sn) { + conflict_err_msg!(self, conflict, sn, "Short name", "short name alias"); + true + } else if let Some(conflict) = self.sns.get(&sn) { + conflict_err_msg!(self, conflict, sn, "Short name", "short name"); + true + } else { + cache!(self, sns, sn); + self.last_needs_visible_full_name = false; + false + } + } + + pub fn non_conflicting_snas(&mut self, snas: &Vec) -> Vec { + snas.iter().filter_map( |sna| { + if let Some(conflict) = self.sn_aliases.get(sna) { + conflict_err_msg!(self, conflict, sna, "Short name alias", "short name alias"); + None + } else if let Some(conflict) = self.sns.get(sna) { + conflict_err_msg!(self, conflict, sna, "Short name alias", "short name"); + None + } else { + cache!(self, sn_aliases, *sna); + Some(*sna) + } + }).collect::>() + } + + pub fn non_conflicting_lnas<'a>(&mut self, lnas: &'a Vec) -> Vec<&'a str> { + lnas.iter().filter_map( |lna| { + if let Some(conflict) = self.ln_aliases.get(lna) { + conflict_err_msg!(self, conflict, lna, "Long name alias", "long name alias"); + None + } else if let Some(conflict) = self.lns.get(lna) { + conflict_err_msg!(self, conflict, lna, "Long name alias", "long name"); + None + } else if let Some(conflict) = self.ilns.get(lna) { + conflict_err_msg!(self, conflict, lna, "Long name alias", "inferred long name"); + None + } else { + cache!(self, ln_aliases, lna.to_owned()); + Some(lna.as_str()) + } + }).collect::>() + } + + pub fn needs_visible_full_name(&mut self) -> bool { + let retn = self.last_needs_visible_full_name; + self.last_needs_visible_full_name = true; + retn + } +} + #[derive(Debug, Deserialize, Clone)] pub struct ArgTOML { pub name: String, @@ -275,86 +606,126 @@ pub struct Opt { pub long_aliases: Option>, pub hidden: Option, pub upcased_name: Option, + pub full_name: Option, } use core::fmt::Display; impl Opt { + // FOR_PR is cmd_path/parent the same here? fn from_toml(opt: &OptTOML, cmd_path: &str, parent: &dyn Display, ext: Option<&str>) -> Self { - let err_prefix; - if let Some(e) = ext { - err_prefix = format!("Option '{}' extended from '{}' for command '{}' tried to use reserved option", opt.name, parent, e); - } else { - err_prefix = format!("Option '{}' from command '{}' tried to use reserved option", opt.name, parent); + macro_rules! gen_err { + ($msg:tt $(,)? $($arg:expr),*) => {{ + if let Some(e) = ext { + log_err_processing_cmd!(cmd_path, concat!("Option '{}' extended from {} ", $msg), opt.name, parent, $($arg),*); + } else { + log_err_processing_cmd!(cmd_path, concat!("Option '{}' ", $msg), opt.name, $($arg),*); + } + }} + } + + macro_rules! res_opt_ln_msg { + ($conflict:expr, $name:expr) => { + gen_err!( + "tried to use reserved option {} '{}' and will not be available as '--{}'", + $conflict, + $name, + $name + ); + } + } + macro_rules! res_opt_sn_msg { + ($conflict:expr, $name:expr) => { + gen_err!( + "tried to use reserved option {} '{}' and will not be available as '-{}'", + $conflict, + $name, + $name + ) + } + } + macro_rules! res_prefix_msg { + ($conflict:expr, $name:expr) => { + gen_err!( + "uses reserved prefix '{}' in {} '{}' and will not be available as '--{}'", + crate::framework::extensions::EXT_BASE_NAME, + $conflict, + $name, + $name + ) + } } + let ln = opt.long.as_ref().and_then ( |ln| { + if RESERVED_OPT_NAMES.contains(&ln.as_str()) { + res_opt_ln_msg!("long name", ln); + None + } else if uses_reserved_prefix!(ln) { + res_prefix_msg!("long name", ln); + None + } else { + Some(ln.to_owned()) + } + }); + + let sn = opt.short.as_ref().and_then ( |sn| { + if RESERVED_OPT_SHORT_NAMES.contains(sn) { + res_opt_sn_msg!("short name", sn); + None + } else { + Some(*sn) + } + }); + Self { name: opt.name.to_owned(), help: opt.help.to_owned(), - short: { - opt.short.as_ref().and_then ( |sn| { - if RESERVED_OPT_SHORT_NAMES.contains(sn) { - log_error!( - "{} short name '{}' and will not be available as '-{}'", - err_prefix, - sn, - sn - ); - None - } else { - Some(*sn) - } - }) - }, - long: { - opt.long.as_ref().and_then ( |ln| { - if RESERVED_OPT_NAMES.contains(&ln.as_str()) { - log_error!( - "{} long name '{}' and will not be available as '--{}'", - err_prefix, - ln, - ln - ); - None - } else { - Some(ln.to_owned()) - } - }) - }, takes_value: opt.takes_value, multiple: opt.multiple, required: opt.required, value_name: opt.value_name.to_owned(), use_delimiter: opt.use_delimiter, short_aliases: { - opt.short_aliases.as_ref().map (|sns| sns.iter().filter_map( |sn| { - if RESERVED_OPT_SHORT_NAMES.contains(sn) { - log_error!( - "{} short name alias '{}' and will not be available as '-{}'", - err_prefix, - sn, - sn - ); - None - } else { - Some(*sn) + let mut snas: HashMap<&char, usize> = HashMap::new(); + opt.short_aliases.as_ref().map( |sns| sns.iter().enumerate().filter_map( |(i, sna)| { + if RESERVED_OPT_SHORT_NAMES.contains(sna) { + res_opt_sn_msg!("short name alias", sna); + return None; + } else if sn.is_some() && (sn.as_ref().unwrap() == sna) { + gen_err!("specifies short name alias '{}' but it conflicts with the option's short name", sna); + return None; + } else if let Some(idx) = snas.get(sna) { + gen_err!("repeats short name alias '{}' (first occurrence at index {})", sna, idx); + return None; } + snas.insert(sna, i); + Some(*sna) }).collect()) }, + short: sn, long_aliases: { - opt.long_aliases.as_ref().map( |lns| lns.iter().filter_map( |ln| { - if RESERVED_OPT_NAMES.contains(&ln.as_str()) { - log_error!( - "{} long name alias '{}' and will not be available as '--{}'", - err_prefix, - ln, - ln - ); - None - } else { - Some(ln.to_owned()) + let mut lnas: HashMap<&String, usize> = HashMap::new(); + opt.long_aliases.as_ref().map( |lns| lns.iter().enumerate().filter_map( |(i, lna)| { + if RESERVED_OPT_NAMES.contains(&lna.as_str()) { + res_opt_ln_msg!("long name alias", lna); + return None + } else if uses_reserved_prefix!(lna) { + res_prefix_msg!("long name alias", lna); + return None + } else if ln.is_some() && (ln.as_ref().unwrap() == lna) { + gen_err!("specifies long name alias '{}' but it conflicts with the option's long name", lna); + return None + } else if (&opt.name == lna) && ln.is_none() { + gen_err!("specifies long name alias '{}' but it conflicts with the option's inferred long name. If this is intentional, please set this as the option's long name", lna); + return None + } else if let Some(idx) = lnas.get(lna) { // lnas.contains(&lna.as_str()) { + gen_err!("repeats long name alias '{}' (first occurrence at index {})", lna, idx); + return None } + lnas.insert(lna, i); + Some(lna.to_owned()) }).collect()) }, + long: ln, hidden: opt.hidden, upcased_name: { if opt.value_name.is_some() { @@ -363,6 +734,15 @@ impl Opt { Some(opt.name.to_uppercase()) } }, + full_name: None, + } + } + + pub fn id(&self) -> &str { + if let Some(fname) = self.full_name.as_ref() { + fname.as_str() + } else { + self.name.as_str() } } } @@ -370,7 +750,7 @@ impl Opt { pub (crate) fn build_commands<'a, F, G, H>(cmd_def: &'a Command, exts: &G, cmd_container: &F, apply_helps: &H) -> App<'a> where F: Fn(&str) -> &'a Command, - G: Fn(&str, App<'a>) -> App<'a>, + G: Fn(&str, App<'a>, &mut CmdOptCache) -> App<'a>, H: Fn(&str, App<'a>) -> App<'a> { let mut cmd = ClapCommand::new(&cmd_def.name); @@ -386,8 +766,9 @@ where cmd = apply_args(args, cmd); } + let mut cache = CmdOptCache::new(cmd_def.parent.to_string()); if let Some(opts) = cmd_def.opts.as_ref() { - cmd = apply_opts(opts, cmd); + cmd = apply_opts(opts, cmd, &mut cache, None); } if let Some(subcommands) = &cmd_def.subcommands { @@ -401,7 +782,7 @@ where cmd = cmd.subcommand(subcmd); } } - cmd = exts(&cmd_def.full_name, cmd); + cmd = exts(&cmd_def.full_name, cmd, &mut cache); cmd = apply_helps(&cmd_def.full_name, cmd); cmd @@ -440,9 +821,10 @@ pub (crate) fn apply_args<'a>(args: &'a Vec, mut cmd: App<'a>) -> App<'a> { cmd } -pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { +pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>, cache: &mut CmdOptCache, from_ext: Option<&Extension>) -> App<'a> { for opt_def in opts { - let mut opt = clap::Arg::new(opt_def.name.as_str()).action(CountArgs).help(opt_def.help.as_str()); + cache.register(&opt_def.name, from_ext); + let mut opt = clap::Arg::new(opt_def.id()).action(CountArgs).help(opt_def.help.as_str()); if let Some(val_name) = opt_def.value_name.as_ref() { opt = opt.value_name(val_name).action(SetArg); @@ -468,14 +850,31 @@ pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { } if let Some(ln) = opt_def.long.as_ref() { - opt = opt.long(ln); + if cache.ln_conflicts(ln) { + // long name clashes - try inferred long name + if !cache.iln_conflicts(&opt_def.name) { + opt = opt.long(&opt_def.name); + } + } else { + opt = opt.long(ln); + } } else { if !opt_def.short.is_some() { - opt = opt.long(&opt_def.name); + if !cache.iln_conflicts(&opt_def.name) { + opt = opt.long(&opt_def.name); + } } } if let Some(sn) = opt_def.short { - opt = opt.short(sn); + if !cache.sn_conflicts(sn) { + opt = opt.short(sn); + } else { + if !opt.get_long().is_some() { + if !cache.iln_conflicts(&opt_def.name) { + opt = opt.long(&opt_def.name); + } + } + } } if let Some(r) = opt_def.required { @@ -491,12 +890,33 @@ pub (crate) fn apply_opts<'a>(opts: &'a Vec, mut cmd: App<'a>) -> App<'a> { } if let Some(lns) = opt_def.long_aliases.as_ref() { - let v = lns.iter().map( |s| s.as_str() ).collect::>(); + let v; + v = cache.non_conflicting_lnas(lns); opt = opt.visible_aliases(&v[..]); } if let Some(sns) = opt_def.short_aliases.as_ref() { - opt = opt.visible_short_aliases(&sns[..].iter().map(|a| *a).collect::>()); + let to_add; + to_add = cache.non_conflicting_snas(sns); + opt = opt.visible_short_aliases(&to_add[..]); + } + + if from_ext.is_some() { + let full_name = opt_def.full_name.as_ref().unwrap(); + if cache.needs_visible_full_name() { + opt = opt.long(full_name); + } else { + opt = opt.alias(full_name.as_str()); + } + } else { + if cache.needs_visible_full_name() { + log_err_processing_cmd!( + cache.cmd_path, + "Unable to place unique long name, short name, or inferred long name for command option '{}'. Please resolve any previous conflicts regarding this option or add/update this option's name, long name, or short name", + opt_def.name + ); + continue; + } } cmd = cmd.arg(opt); diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index bc54bc2e..acb7199b 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -113,10 +113,10 @@ pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, plugins: Opti // c, // &cmds.commands.get(top_cmd_name).unwrap(), &pl.commands.get(n).unwrap(), // cmd_helps, - &|cmd, app| { + &|cmd, app, opt_cache| { // println!("cmd... {}", cmd); // println!("pl name.. {}", pl_name); - exts.apply_to_pl_cmd(&pl_name, cmd, app) + exts.apply_to_pl_cmd(&pl_name, cmd, app, opt_cache) }, &|cmd| { // let split = cmd.split_once('.').unwrap(); diff --git a/test_apps/python_app/config/commands.toml b/test_apps/python_app/config/commands.toml index 63041dca..403e2071 100644 --- a/test_apps/python_app/config/commands.toml +++ b/test_apps/python_app/config/commands.toml @@ -280,6 +280,138 @@ on_env = ["ORIGEN_APP_TEST_RESERVED_OPT_ERRORS"] long = "verbosity" help = "Conflicting Opt" +[[command]] +name = "intra_cmd_conflicts" +help = "App cmd with conflicting args and opts within the cmd" +on_env=["ORIGEN_APP_INTRA_CMD_CONFLICTS"] + + [[command.arg]] + name = "arg0" + help = "Arg 0" + + [[command.arg]] + name = "arg0" + help = "Duplicate: Arg 0" + + [[command.arg]] + name = "arg1" + help = "Arg 1" + + [[command.arg]] + name = "arg2" + help = "Arg 2" + + [[command.arg]] + name = "arg1" + help = "Duplicate: Arg 1" + + [[command.arg]] + name = "ext_opt.arg" + help = "Arg with reserved prefix" + + [[command.opt]] + name = "opt" + help = "Opt 0" + long_aliases=["opt0"] + + [[command.opt]] + name = "opt" + help = "Duplicate: Opt 0" + + [[command.opt]] + name = "ext_opt.opt" + help = "Reserved Prefix" + + [[command.opt]] + name = "arg0" + help = "Arg-Opt clash" + + [[command.opt]] + name = "arg_clash" + help = "Arg-Opt clash in ln/lna (okay)" + long = "arg0" + long_aliases = ["arg1"] + + [[command.opt]] + name= "reserved_prefix_in_ln_lna" + help = "Reserved prefix in ln and lna" + long = "ext_opt.ln" + long_aliases = ["ext_opt.lna", "ext_opt_lna"] + + [[command.opt]] + name= "intra_opt_conflicts" + help = "Various intra-opt conflicts" + long = "intra_opt_cons" + short = "c" + long_aliases = ["intra_opt_conflicts", "intra_opt_cons", "intra_opt_cons2", "intra_opt_cons2"] + short_aliases = ["a", "b", "c", "b", "c", "e", "e"] + + [[command.opt]] + name= "inter_opt_conflicts" + help = "Various inter-opt conflicts" + long = "intra_opt_conflicts" + short = "a" + long_aliases = ["intra_opt_cons", "ext_opt_lna", "reserved_prefix_in_ln_lna"] + short_aliases = ["b", "c", "d"] + + [[command.opt]] + name = "opt0" + help = "Inferred long name clash" + + [[command.subcommand]] + name = "conflicts_subc" + help = "Subcommand with conflicts" + + [[command.subcommand.arg]] + name = "arg0" + help = "Arg 0" + + [[command.subcommand.arg]] + name = "sub_arg_1" + help = "Subc Arg 1" + + [[command.subcommand.arg]] + name = "sub_arg_1" + help = "Duplicate" + + [[command.subcommand.arg]] + name = "ext_opt.subc_arg" + help = "Arg with reserved prefix" + + [[command.subcommand.opt]] + name = "ext_opt.subc_opt" + help = "Reserved opt prefix" + short = "r" + + [[command.subcommand.opt]] + name = "opt" + help = "Opt 0" + long_aliases=["subc_opt", "ext_opt.subc_opt_lna"] + + [[command.subcommand.opt]] + name = "intra_subc_conflicts" + help = "Intra-opt conflicts for subc" + long = "intra_subc_conflicts" + short = "r" + long_aliases=["intra_subc_conflicts"] + short_aliases=["r"] + + [[command.subcommand.opt]] + name = "intra_subc_lna_iln_conflict" + help = "Intra-opt iln conflict" + long_aliases=["intra_subc_lna_iln_conflict"] + + [[command.subcommand.opt]] + name = "inter_subc_conflicts" + help = "Inter-opt conflicts for subc" + long = "opt" + long_aliases=["intra_subc_conflicts"] + short_aliases=["r"] + + [[command.subcommand.opt]] + name = "intra_subc_conflicts" + help = "Duplicate Opt" + # Extend core command [[extension]] extend = "origen.eval" @@ -295,13 +427,39 @@ on_env = ["ORIGEN_APP_EXTEND_CORE_CMDS"] help = "Flag ext from the app" [[extension]] -extend = "plugin.python_plugin.plugin_test_args" +extend = "plugin.python_plugin.plugin_says_hi" on_env = ["ORIGEN_APP_PL_CMD_MISSING_EXT_IMPL"] [[extension.opt]] name = "app_ext_missing_impl" help = "App extension missing the implementation" +[[extension]] +extend = "plugin.python_plugin.plugin_test_args" +on_env = ["ORIGEN_APP_PL_CMD_CONFLICTS"] + + [[extension.opt]] + name = "app_opt" + help = "Conflict with cmd/aux/plugin opts" + long = "app" + short = "a" + long_aliases=["app_opt", "tas", "flag", "app_flag", "ext_opt.res"] + short_aliases=["c", "d", "g", "g"] + + [[extension.opt]] + name = "tas_iln" + help = "Conflict iln from App" + + [[extension.opt]] + name = "app_opt" + help = "App opt repeat" + + [[extension.opt]] + name = "ext_opt.res_app_opt" + long = "res_opt_opt" + help = "App opt reserved name" + + # Extend plugin command [[extension]] extend = "plugin.python_plugin.plugin_test_ext_stacking" diff --git a/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_args.py b/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_args.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/python_app/example/commands/extensions/plugin/python_plugin/plugin_test_args.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_app/example/commands/intra_cmd_conflicts.conflicts_subc.py b/test_apps/python_app/example/commands/intra_cmd_conflicts.conflicts_subc.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/intra_cmd_conflicts.conflicts_subc.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/example/commands/intra_cmd_conflicts.py b/test_apps/python_app/example/commands/intra_cmd_conflicts.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/intra_cmd_conflicts.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/example/commands/nested_app_cmds.py b/test_apps/python_app/example/commands/nested_app_cmds.py index 221ef27d..4d241ecc 100644 --- a/test_apps/python_app/example/commands/nested_app_cmds.py +++ b/test_apps/python_app/example/commands/nested_app_cmds.py @@ -1,5 +1,11 @@ +from test_apps_shared_test_helpers.aux_cmds import run as output_exts + def say_hi(lvl): - print(f"Hi from 'nested_app_cmds' level {lvl}!") + import os + if os.environ.get("ORIGEN_APP_EXT_NESTED") == "1": + output_exts() + else: + print(f"Hi from 'nested_app_cmds' level {lvl}!") def run(**args): say_hi(0) \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/shared.py b/test_apps/python_app/tests/cli/shared.py index 51c6a572..b88ad79e 100644 --- a/test_apps/python_app/tests/cli/shared.py +++ b/test_apps/python_app/tests/cli/shared.py @@ -1,4 +1,5 @@ import pytest, pathlib +from origen.helpers.regressions import cli from tests.shared import PythonAppCommon from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg, CmdExtOpt @@ -92,6 +93,303 @@ def __init__(self): ) ] ) + self.intra_cmd_conflicts = CLIShared.app_sub_cmd( + "intra_cmd_conflicts", + help="Test intra app cmd conflicts", + with_env={"ORIGEN_APP_INTRA_CMD_CONFLICTS": "1"}, + **CLIShared.python_plugin.intra_cmd_conflicts_args_opts_subcs(), + ) + self.exts = { + "app.arg_opt_warmup": { + "exts": [ + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pypl_single_opt", + help="Single opt from PYPL", + takes_value=True, + ), + CmdExtOpt( + "pypl_multi_opt", + help="Multi opt from PYPL", + ln_aliases=["PYPL"], + multi=True, + ), + CmdExtOpt( + "pypl_hidden", + help="Hidden opt from PYPL", + hidden=True, + sn="p", + ln="pypl_h_opt" + ), + ), + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "tas_single_opt", + help="Single opt from TAS", + ln="tas_sv", + takes_value=True, + ), + CmdExtOpt( + "tas_multi_opt", + help="Multi opt from TAS", + ln="tas_multi_opt", + ln_aliases=["tas_multi", "TAS"], + sn_aliases=["a"], + multi=True, + ), + CmdExtOpt( + "tas_hidden", + help="Hidden opt from TAS", + hidden=True, + ), + ), + *CmdExtOpt.from_src( + "python_app_exts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ec_single_opt", + help="Single opt from EC", + takes_value=True, + ), + CmdExtOpt( + "ec_multi_opt", + help="Multi opt from EC", + ln="ec_multi_opt", + ln_aliases=["ec_multi", "EC"], + sn="e", + multi=True, + ), + CmdExtOpt( + "ec_hidden", + ln="ec_h_opt", + help="Hidden opt from EC", + hidden=True, + ), + ), + ], + "env": {"ORIGEN_APP_EXT_ARG_OPT_WARMUP": "1"}, + "cfg": CLIShared.aux.ns.python_app_aux_cmds.exts_cfg, + }, + "app.nested_app_cmds.nested_l1": { + "exts": [ + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pypl_single_opt_shallow", + help="Single opt from PYPL", + sn="p", + takes_value=True, + ), + CmdExtOpt( + "pypl_flag_opt_shallow", + help="Flag opt from PYPL", + ), + ), + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "tas_multi_opt_shallow", + help="Multi opt from TAS", + ln_aliases=["tas_m_opt", "tas_shallow"], + multi=True, + ), + CmdExtOpt( + "tas_flag_opt_shallow", + help="Flag opt from TAS", + ln="tas_f", + sn="f" + ), + ), + *CmdExtOpt.from_src( + "python_app_exts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ec_single_opt_shallow", + help="Single opt from EC", + takes_value=True, + ), + CmdExtOpt( + "ec_flag_opt_shallow", + help="Flag opt from EC", + ln="ec_f", + ), + ), + ], + "env": {"ORIGEN_APP_EXT_NESTED": "1"}, + "cfg": CLIShared.aux.ns.python_app_aux_cmds.exts_cfg, + }, + "app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a": { + "exts": [ + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pypl_single_opt_deep", + help="Single opt from PYPL", + sn="q", + takes_value=True, + ), + CmdExtOpt( + "pypl_flag_opt_deep", + help="Flag opt from PYPL", + ln="py_f", + sn="f", + ), + ), + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "tas_multi_opt_deep", + help="Multi opt from TAS", + ln="tas_opt", + multi=True, + ), + CmdExtOpt( + "tas_flag_opt_deep", + help="Flag opt from TAS", + ) + ), + *CmdExtOpt.from_src( + "python_app_exts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ec_single_opt_deep", + help="Single opt from EC", + ln="ec_opt", + ln_aliases=["ec_deep"], + takes_value=True, + ), + CmdExtOpt( + "ec_flag_opt_deep", + help="Flag opt from EC", + ln="ec_df", + sn="c" + ), + ), + ], + "env": {"ORIGEN_APP_EXT_NESTED": "1"}, + "cfg": CLIShared.aux.ns.python_app_aux_cmds.exts_cfg, + }, + } + self.conflict_exts = { + "app.arg_opt_warmup": { + "exts": [ + *CmdExtOpt.from_src( + "python_plugin", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "flag_opt", + help="Flag opt from Python Plugin", + ), + CmdExtOpt( + "conflicts_from_python_plugin", + help="Some conflicts from Python Plugin", + ln_aliases=["python_plugin_conflicts"], + sn_aliases=["a"], + ), + ), + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "flag_opt", + help="Conflict with flag opt from TAS", + access_with_full_name=True, + ), + CmdExtOpt( + "conflicts_from_test_apps_shared", + help="Some conflicts from Test Apps Shared PL", + ln="TAS", + sn_aliases=["b"], + ), + ), + *CmdExtOpt.from_src( + "ext_conflicts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "flag_opt", + help="Conflict with flag opt from ext_conflicts AUX", + access_with_full_name=True, + ), + CmdExtOpt( + "conflicts_from_ext_conflicts", + help="Some conflicts from ext_conflicts AUX", + ln_aliases=["EX_Conflicts"], + sn_aliases=["c"], + ), + ), + ], + "env": {"ORIGEN_APP_EXT_CONFLICTS_ARG_OPT_WARMUP": "1"}, + "cfg": CLIShared.aux.aux_cmds_dir.joinpath("ext_conflicts_cfg.toml"), + }, + "python_plugin.plugin_test_args": { + "exts": [ + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "tas_opt", + help="Opt from TAS", + ln="tas", + sn="z", + ln_aliases=["t_opt"], + sn_aliases=["c"], + ), + CmdExtOpt( + "tas_iln", + help="ILN from TAS", + ), + ), + *CmdExtOpt.from_src( + "ext_conflicts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "ec_opt", + help="Opt from EC", + ln="ec", + sn="e", + ln_aliases=["e_opt"], + sn_aliases=["d"], + ), + CmdExtOpt( + "tas_iln", + help="More conflicts", + access_with_full_name=True, + ), + ), + *CmdExtOpt.from_src( + "example", + cli.cmd.SrcTypes.APP, + CmdExtOpt( + "app_opt", + help="Conflict with cmd/aux/plugin opts", + ln="app", + ln_aliases=["app_opt", "app_flag"], + sn_aliases=["g"], + ), + CmdExtOpt( + "tas_iln", + help="Conflict iln from App", + access_with_full_name=True, + ), + ), + ], + "env": {"ORIGEN_APP_PL_CMD_CONFLICTS": "1"}, + "cfg": CLIShared.aux.aux_cmds_dir.joinpath("ext_conflicts_cfg.toml"), + } + } + + @property + def arg_opt_warmup(self): + return self.warmup_cmd + app_cmds = AppCmds() app_commands = app_cmds diff --git a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py index 70e8c08a..dd72314a 100644 --- a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py +++ b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py @@ -1,5 +1,5 @@ import pytest, os, origen -from origen.helpers.regressions.cli.command import SrcTypes #, CmdExtOpt +from origen.helpers.regressions.cli.command import SrcTypes from .shared import CLICommon, CmdExtOpt class T_ExtendingFromAppCmds(CLICommon): @@ -67,7 +67,7 @@ class T_ExtendingFromAppCmds(CLICommon): ) na = "no_action" - missing_ext_impl_cmd = CLICommon.python_plugin.plugin_test_args.extend( + missing_ext_impl_cmd = CLICommon.python_plugin.plugin_says_hi.extend( CmdExtOpt.from_src( "example", SrcTypes.APP, @@ -291,13 +291,15 @@ def test_extending_aux_subc(self): def test_error_msg_on_missing_implementation(self): cmd = self.missing_ext_impl_cmd help = cmd.get_help_msg() - help.assert_args(cmd.single_arg, cmd.multi_arg) + help.assert_args() help.assert_opts( cmd.app_ext_missing_impl, - cmd.flag_opt, - "help", "m", "nt", - cmd.opt_taking_value, - "t", "v", 'vk' + "help", + cmd.loudly, + "m", "nt", "t", + cmd.to, + "v", 'vk', + cmd.times, ) assert help.aux_exts == None @@ -306,11 +308,11 @@ def test_error_msg_on_missing_implementation(self): out = cmd.run() r = origen.app.root.joinpath('example/commands/extensions') - assert "Could not find implementation for app extension 'None'" in out + assert "Could not find implementation for app extension" in out assert f"From root '{r}', searched:" in out - assert f"plugin.python_plugin.plugin_test_args.py" in out - assert f"plugin{os.sep}python_plugin.plugin_test_args.py" in out - assert f"plugin{os.sep}python_plugin{os.sep}plugin_test_args.py" in out + assert f"plugin.python_plugin.plugin_says_hi.py" in out + assert f"plugin{os.sep}python_plugin.plugin_says_hi.py" in out + assert f"plugin{os.sep}python_plugin{os.sep}plugin_says_hi.py" in out @pytest.mark.skip def error_msg_on_extending_unknown_cmd(self): @@ -326,4 +328,116 @@ def test_error_in_after(self): @pytest.mark.skip def test_error_in_cleanup(self): - fail \ No newline at end of file + fail + + class TestAppExtConflicts(CLICommon): + ''' Test what happens when app/plugin/aux extensions conflict + Only need a subset to ensure app messaging is okay ''' + config = CLICommon.app_cmds.conflict_exts["python_plugin.plugin_test_args"] + cmd = CLICommon.python_plugin.plugin_test_args.extend( + config["exts"], + from_configs=[config["cfg"]], + with_env=config["env"] + ) + _exts = CLICommon.exts.partition_exts(config["exts"]) + + @pytest.fixture + def exts(self): + return self._exts + + @pytest.fixture + def cmd_help(self): + if not hasattr(self, "_cmd_help"): + self._cmd_help = self.cmd.get_help_msg() + return self._cmd_help + + def test_help_msg(self, exts, cmd_help): + cmd = self.cmd + help = cmd_help + help.assert_args(cmd.single_arg, cmd.multi_arg) + help.assert_opts( + exts.app.app_opt, + exts.ec.ec_opt, + exts.app.tas_iln, + exts.ec.tas_iln, + cmd.flag_opt, + "h", "m", + cmd.sn_only, + "nt", + cmd.opt_taking_value, + cmd.opt_with_aliases, + "t", + exts.tas.tas_iln, + "v", "vk", + exts.tas.tas_opt, + ) + help.assert_subcmds("help", cmd.subc) + + assert help.aux_exts == ["ext_conflicts"] + assert help.pl_exts == ["test_apps_shared_test_helpers"] + assert help.app_exts == True + + def test_conflict_msgs(self, exts, cmd_help): + cmd = self.cmd + cmd_conflicts = cmd_help.logged_errors + conflicts = [ + ["repeated_sna", exts.app.app_opt, "g", 2], + ["reserved_prefix_lna", exts.app.app_opt, "ext_opt.res"], + ["duplicate", exts.app.app_opt, 0], + ["reserved_prefix_opt_name", "ext_opt.res_app_opt", exts.app.app_opt.displayed], + + ["sna", "sna", exts.tas.tas_opt, cmd.opt_with_aliases, "b"], + + ["sna", "sna", exts.ec.ec_opt, cmd.opt_with_aliases, "a"], + ["sna", "sna", exts.ec.ec_opt, cmd.opt_with_aliases, "b"], + ["sna", "sna", exts.ec.ec_opt, exts.tas.tas_opt, "c"], + ["sn", "sn", exts.ec.tas_iln, cmd.sn_only, "n"], + ["iln", "iln", exts.ec.tas_iln, exts.tas.tas_iln], + ["lna", "lna", exts.ec.tas_iln, exts.tas.tas_opt, "t_opt"], + + ["sn", "sna", exts.app.app_opt, cmd.opt_with_aliases, "a"], + ["lna", "ln", exts.app.app_opt, exts.tas.tas_opt, "tas"], + ["lna", "ln", exts.app.app_opt, cmd.flag_opt, "flag"], + ["sna", "sna", exts.app.app_opt, exts.tas.tas_opt, "c"], + ["sna", "sna", exts.app.app_opt, exts.ec.ec_opt, "d"], + ["iln", "iln", exts.app.tas_iln, exts.tas.tas_iln], + ] + for c in reversed(conflicts): + m = cmd_conflicts.pop() + print(m) + assert self.to_conflict_msg(cmd, c) in m + + def test_exts(self, exts): + cmd = self.cmd + sa = "sa_val" + ma = ["a", "b", "c"] + opt = "opt_val" + out = cmd.run( + sa, *ma, + "--app", "--app_flag", "-g", "-g", "--app_flag", "-g", + "-e", "--ec", "-d", + "--ext_opt.app.tas_iln", + "--ext_opt.aux.ext_conflicts.tas_iln", "--ext_opt.aux.ext_conflicts.tas_iln", + "--flag", "--flag", "--flag", + "-n", "-n", "-n", "-n", + "--opt", opt, + "--opt_alias", "-a", "-b", "-a", "-b", + "--tas_iln", "--tas_iln", "--tas_iln", + "--tas", "-z", "-c", "--tas", "-z", "-c", "--t_opt", + ) + cmd.assert_args( + out, + (cmd.single_arg, sa), + (cmd.multi_arg, ma), + (cmd.flag_opt, 3), + (cmd.sn_only, 4), + (cmd.opt_taking_value, opt), + (cmd.opt_with_aliases, 5), + + (exts.app.app_opt, 6), + (exts.app.tas_iln, 1), + (exts.ec.ec_opt, 3), + (exts.ec.tas_iln, 2), + (exts.tas.tas_opt, 7), + (exts.tas.tas_iln, 3), + ) diff --git a/test_apps/python_app/tests/cli/tests__extending_app_cmds.py b/test_apps/python_app/tests/cli/tests__extending_app_cmds.py new file mode 100644 index 00000000..06830af8 --- /dev/null +++ b/test_apps/python_app/tests/cli/tests__extending_app_cmds.py @@ -0,0 +1,336 @@ +import pytest +from .shared import CLICommon + +class T_ExtendingAppCmds(CLICommon): + class TestExtendingAppCmds(CLICommon): + config = CLICommon.app_cmds.exts["app.arg_opt_warmup"] + cmd = CLICommon.app_cmds.arg_opt_warmup.extend( + config["exts"], + from_configs=[config["cfg"]], + with_env=config["env"], + ) + + config_shallow_subc = CLICommon.app_cmds.exts["app.nested_app_cmds.nested_l1"] + shallow_subc = CLICommon.app_cmds.nested_cmds.nested_l1.extend( + config_shallow_subc["exts"], + from_configs=[config_shallow_subc["cfg"]], + with_env=config_shallow_subc["env"], + ) + + config_deep_subc = CLICommon.app_cmds.exts["app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a"] + deep_subc = CLICommon.app_cmds.nested_cmds.nested_l1.nested_l2_b.nested_l3_a.extend( + config_deep_subc["exts"], + from_configs=[config_deep_subc["cfg"]], + with_env=config_deep_subc["env"], + ) + + @pytest.fixture + def first(self): + return "1st" + + @pytest.fixture + def second(self): + return ["2nd", "second"] + + @pytest.fixture + def sv(self): + return "sv" + + @pytest.fixture + def mv(self): + return ["mv0", "mv1"] + + @pytest.fixture + def pypl_sv(self): + return "pypl_sv" + + @pytest.fixture + def pypl_mv(self): + return ["pypl_mv_0", "pypl_mv_1", "pypl_mv_2"] + + @pytest.fixture + def tas_sv(self): + return "tas_sv" + + @pytest.fixture + def tas_mv(self): + return ["tas_mv_0", "tas_mv_1", "tas_mv_2"] + + @pytest.fixture + def ec_sv(self): + return "ec_sv" + + @pytest.fixture + def ec_mv(self): + return ["ec_mv_0", "ec_mv_1"] + + def test_help_msg(self): + cmd = self.cmd + help = cmd.get_help_msg() + help.assert_args(cmd.first, cmd.second) + help.assert_opts( + cmd.ec_multi_opt, + cmd.ec_single_opt, + cmd.flag_opt, + "help", + "m", + cmd.multi_opt, + "nt", + cmd.pypl_multi_opt, + cmd.pypl_single_opt, + cmd.single_opt, + "t", + cmd.tas_multi_opt, + cmd.tas_single_opt, + "v", "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ["python_app_exts"] + assert help.pl_exts == ["python_plugin", "test_apps_shared_test_helpers"] + assert help.app_exts == False + + def test_exts(self, first, second, sv, mv, pypl_sv, pypl_mv, tas_sv, tas_mv, ec_sv, ec_mv): + cmd = self.cmd + out = cmd.run( + first, second[0], second[1], + "--single_opt", sv, + "--m_opt", mv[0], mv[1], + "-f", "--hidden", + + "--pypl_single_opt", pypl_sv, + "--PYPL", pypl_mv[0], "--pypl_multi_opt", pypl_mv[1], pypl_mv[2], + "-p", "--pypl_h_opt", "-p", '--pypl_h_opt', + + "--tas_sv", tas_sv, + "-a", tas_mv[0], "--TAS", tas_mv[1], "--tas_multi_opt", tas_mv[2], + "--tas_hidden", "--tas_hidden", + + "--ec_single_opt", ec_sv, + "--ec_multi_opt", ec_mv[0], "-e", ec_mv[1], + "--ec_h_opt", "--ec_h_opt", "--ec_h_opt", + ) + cmd.assert_args( + out, + (cmd.first, first), + (cmd.second, second), + (cmd.single_opt, sv), + (cmd.multi_opt, mv), + (cmd.flag_opt, 1), + (cmd.hidden_flag_opt, 1), + + (cmd.pypl_single_opt, pypl_sv), + (cmd.pypl_multi_opt, pypl_mv), + (cmd.pypl_hidden, 4), + + (cmd.tas_single_opt, tas_sv), + (cmd.tas_multi_opt, tas_mv), + (cmd.tas_hidden, 2), + + (cmd.ec_single_opt, ec_sv), + (cmd.ec_multi_opt, ec_mv), + (cmd.ec_hidden, 3), + ) + + def test_shallow_subc_help_msg(self): + cmd = self.shallow_subc + help = cmd.get_help_msg() + help.assert_opts( + cmd.ec_flag_opt_shallow, + cmd.ec_single_opt_shallow, + cmd.tas_flag_opt_shallow, + "help", "m", "nt", + cmd.pypl_single_opt_shallow, + cmd.pypl_flag_opt_shallow, + "t", + cmd.tas_multi_opt_shallow, + "v", "vk", + ) + help.assert_subcmds("help", cmd.nested_l2_a, cmd.nested_l2_b) + + assert help.aux_exts == ["python_app_exts"] + assert help.pl_exts == ["python_plugin", "test_apps_shared_test_helpers"] + assert help.app_exts == False + + def test_shallow_subc_exts(self, pypl_sv, tas_sv, tas_mv, ec_sv): + cmd = self.shallow_subc + out = cmd.run( + "-p", pypl_sv, + "--pypl_flag_opt_shallow", + "--tas_shallow", tas_mv[0], tas_mv[1], "--tas_m_opt", tas_mv[2], tas_sv, + "-f", "--tas_f", + "--ec_single_opt_shallow", ec_sv, + "--ec_f", "--ec_f", "--ec_f", + ) + cmd.assert_args( + out, + (cmd.pypl_single_opt_shallow, pypl_sv), + (cmd.pypl_flag_opt_shallow, 1), + (cmd.tas_multi_opt_shallow, [*tas_mv, tas_sv]), + (cmd.tas_flag_opt_shallow, 2), + (cmd.ec_single_opt_shallow, ec_sv), + (cmd.ec_flag_opt_shallow, 3), + ) + + def test_deep_subc_help_msg(self): + cmd = self.deep_subc + help = cmd.get_help_msg() + help.assert_opts( + cmd.ec_flag_opt_deep, + cmd.ec_single_opt_deep, + cmd.pypl_flag_opt_deep, + "help", "m", "nt", + cmd.pypl_single_opt_deep, + "t", + cmd.tas_flag_opt_deep, + cmd.tas_multi_opt_deep, + "v", "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ["python_app_exts"] + assert help.pl_exts == ["python_plugin", "test_apps_shared_test_helpers"] + assert help.app_exts == False + + def test_deep_subc_exts(self, pypl_sv, tas_mv, ec_sv): + cmd = self.deep_subc + out = cmd.run( + "-q", pypl_sv, + "-f", "-f", "--py_f", "--py_f", + "--tas_opt", tas_mv[0], "--tas_opt", tas_mv[1], "--tas_opt", tas_mv[2], + "--tas_flag_opt_deep", + "--ec_opt", ec_sv, + "--ec_df", "-c", "--ec_df", + ) + cmd.assert_args( + out, + (cmd.pypl_single_opt_deep, pypl_sv), + (cmd.pypl_flag_opt_deep, 4), + (cmd.tas_multi_opt_deep, tas_mv), + (cmd.tas_flag_opt_deep, 1), + (cmd.ec_single_opt_deep, ec_sv), + (cmd.ec_flag_opt_deep, 3), + ) + + class TestAppCmdExtConflicts(CLICommon): + ''' Test what happens when extensions conflict with app commands ''' + config = CLICommon.app_cmds.conflict_exts["app.arg_opt_warmup"] + cmd = CLICommon.app_cmds.arg_opt_warmup.extend( + config["exts"], + from_configs=[config["cfg"]], + with_env=config["env"], + ) + _exts = CLICommon.exts.partition_exts(config["exts"]) + + @classmethod + def setup_class(cls): + cls.cmd_help = cls.cmd.get_help_msg() + cls.cmd_conflicts = cls.cmd_help.logged_errors + + @classmethod + def teardown_class(cls): + delattr(cls, "cmd_help") + delattr(cls, "cmd_conflicts") + + @pytest.fixture + def exts(self): + return self._exts + + def test_help_msg(self, exts): + cmd = self.cmd + help = self.cmd_help + + help.assert_args(cmd.first, cmd.second) + help.assert_opts( + exts.tas.conflicts_from_test_apps_shared, + exts.ec.conflicts_from_ext_conflicts, + exts.pypl.conflicts_from_python_plugin, + exts.ec.flag_opt, + exts.tas.flag_opt, + cmd.flag_opt, + exts.pypl.flag_opt, + "h", "m", + cmd.multi_opt, + "nt", + cmd.single_opt, + "t", "v", "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ["ext_conflicts"] + assert help.pl_exts == ["python_plugin", "test_apps_shared_test_helpers"] + assert help.app_exts == False + + def test_conflict_messages(self, exts): + cmd = self.cmd + print(self.cmd_help.text) + conflicts = [ + ["inter_ext_lna_ln", exts.tas.conflicts_from_test_apps_shared, "TAS"], + + ["ln", "iln", exts.pypl.conflicts_from_python_plugin, cmd.single_opt, "single_opt"], + ["sn", "sna", exts.pypl.conflicts_from_python_plugin, cmd.multi_opt, "m"], + ["lna", "lna", exts.pypl.conflicts_from_python_plugin, cmd.multi_opt, "m_opt"], + + ["iln", "iln", exts.tas.flag_opt, exts.pypl.flag_opt], + ["lna", "ln", exts.tas.conflicts_from_test_apps_shared, cmd.hidden_flag_opt, "hidden"], + ["lna", "lna", exts.tas.conflicts_from_test_apps_shared, exts.pypl.conflicts_from_python_plugin, "python_plugin_conflicts"], + ["sna", "sna", exts.tas.conflicts_from_test_apps_shared, cmd.multi_opt, "m"], + ["sna", "sna", exts.tas.conflicts_from_test_apps_shared, exts.pypl.conflicts_from_python_plugin, "a"], + + ["iln", "iln", exts.ec.flag_opt, exts.pypl.flag_opt], + ["lna", "lna", exts.ec.conflicts_from_ext_conflicts, exts.pypl.conflicts_from_python_plugin, "python_plugin_conflicts"], + ["lna", "ln", exts.ec.conflicts_from_ext_conflicts, exts.tas.conflicts_from_test_apps_shared, "TAS"], + ["lna", "ln", exts.ec.conflicts_from_ext_conflicts, cmd.hidden_flag_opt, "hidden"], + ["sna", "sna", exts.ec.conflicts_from_ext_conflicts, exts.pypl.conflicts_from_python_plugin, "a"], + ["sna", "sna", exts.ec.conflicts_from_ext_conflicts, exts.tas.conflicts_from_test_apps_shared, "b"], + ] + for c in reversed(conflicts): + m = self.cmd_conflicts.pop() + assert self.to_conflict_msg(self.cmd, c) in m + assert len(self.cmd_conflicts) == 0 + + def test_conflicts_resolve_correctly(self, exts): + cmd = self.cmd + out = cmd.run( + "a1", "a2,a3", + "--TAS", "-b", + "--EX_Conflicts", "-c", "-c", + "--python_plugin_conflicts", "-a", "-a", "--conflicts_from_python_plugin", + "--ext_opt.aux.ext_conflicts.flag_opt", + "--ext_opt.plugin.test_apps_shared_test_helpers.flag_opt", "--ext_opt.plugin.test_apps_shared_test_helpers.flag_opt", + "--flag_opt", "--flag_opt", "--flag_opt", + "-f", "-f", "-f", "-f", + "--m_opt", "m0", "m1", "-m", "m2", + "-s", "s0" + ) + cmd.assert_args( + out, + (cmd.first, "a1"), + (cmd.second, ["a2", "a3"]), + (cmd.flag_opt, 4), + (exts.ec.flag_opt, 1), + (exts.tas.flag_opt, 2), + (exts.pypl.flag_opt, 3), + (exts.tas.conflicts_from_test_apps_shared, 2), + (exts.ec.conflicts_from_ext_conflicts, 3), + (exts.pypl.conflicts_from_python_plugin, 4), + (cmd.multi_opt, ["m0", "m1", "m2"]), + (cmd.single_opt, "s0"), + ) + + @pytest.mark.skip + def test_subc_help_msg(self): + fail + + @pytest.mark.skip + def test_subc_conflict_msgs(self): + fail + + @pytest.mark.skip + def test_subc_exts(self): + fail + + @pytest.mark.skip + def test_app_cmd_ext_conflicts(self): + ''' This is likely a mistake case but should resolve nonetheless ''' + fail \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/tests__intra_cmd_conflicts.py b/test_apps/python_app/tests/cli/tests__intra_cmd_conflicts.py new file mode 100644 index 00000000..9359a275 --- /dev/null +++ b/test_apps/python_app/tests/cli/tests__intra_cmd_conflicts.py @@ -0,0 +1,111 @@ +import pytest +from .shared import CLICommon + +class T_IntraCmdConflicts(CLICommon): + # Reuse the same conflicts as python plugin. Only change should be the processed command + + cmd = CLICommon.app_cmds.intra_cmd_conflicts + conflicts = CLICommon.python_plugin.get_intra_cmd_conflicts_list(cmd) + + @classmethod + def setup_class(cls): + cls.cmd_help = cls.cmd.get_help_msg() + cls.cmd_conflicts = cls.cmd_help.logged_errors + + @classmethod + def teardown_class(cls): + delattr(cls, "cmd_help") + delattr(cls, "cmd_conflicts") + + def test_help_msg(self): + # Check help message + cmd = self.cmd + help = self.cmd_help + print(self.cmd_help.text) + help.assert_args(cmd.arg0, cmd.arg1, cmd.arg2) + help.assert_opts( + cmd.arg_clash, + cmd.intra_opt_conflicts, + "help", + cmd.inter_opt_conflicts, + "m", "nt", + cmd.opt, + cmd.reserved_prefix_in_ln_lna, + "t", "v", "vk", + ) + help.assert_subcmds(cmd.conflicts_subc, "help") + + assert help.aux_exts == None + assert help.pl_exts == None + assert help.app_exts == False + + def test_conflicts_during_cmd_building(self): + for c in reversed(self.conflicts): + m = self.cmd_conflicts.pop() + assert self.to_conflict_msg(self.cmd, c) in m + + def test_all_error_messages_checked(self): + assert len(self.cmd_conflicts) == 0 + + def test_cmd_conflicts_resolve_correctly(self): + cmd = self.cmd + out = cmd.run( + "0", "1", "2", + "--opt", "--opt0", + "--arg0", "--arg1", + "--ext_opt_lna", + "--intra_opt_cons", "-c", "-e", + "-d", + ) + cmd.assert_args( + out, + (cmd.arg0, "0"), + (cmd.arg1, "1"), + (cmd.arg2, "2"), + (cmd.opt, 2), + (cmd.arg_clash, 2), + (cmd.reserved_prefix_in_ln_lna, 1), + (cmd.intra_opt_conflicts, 3), + (cmd.inter_opt_conflicts, 1), + ) + + def test_subc_help_msg(self): + # Check help message + cmd = self.cmd.conflicts_subc + help = cmd.get_help_msg() + + help.assert_args(cmd.arg0, cmd.sub_arg_1) + help.assert_opts( + "help", + cmd.inter_subc_conflicts, + cmd.intra_subc_lna_iln_conflict, + "m", "nt", + cmd.opt, + cmd.intra_subc_conflicts, + "t", "v", "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == None + assert help.pl_exts == None + assert help.app_exts == False + + def test_cmd_subc_conflicts_resolve_correctly(self): + cmd = self.cmd.conflicts_subc + out = cmd.run( + "a", "b", + "--opt", "--subc_opt", + "--intra_subc_conflicts", "-r", + "--intra_subc_lna_iln_conflict", + "--inter_subc_conflicts" + ) + cmd.assert_args( + out, + (cmd.arg0, "a"), + (cmd.sub_arg_1, "b"), + (cmd.opt, 2), + (cmd.intra_subc_conflicts, 2), + (cmd.intra_subc_lna_iln_conflict, 1), + (cmd.inter_subc_conflicts, 1), + ) + diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 65c8cb27..7360225b 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -9,10 +9,18 @@ from cli.tests__cmd_exts_from_app import T_ExtendingFromAppCmds from cli.tests__reserved_opts import T_ReservedOpts from cli.tests__cmd_integration import T_CommandIntegration +from cli.tests__intra_cmd_conflicts import T_IntraCmdConflicts +from cli.tests__extending_app_cmds import T_ExtendingAppCmds class TestAppCmdBuilding(T_AppCmdBuilding): pass +class TestExtendingAppCmds(T_ExtendingAppCmds): + pass + +class TestIntraCmdConflicts(T_IntraCmdConflicts): + pass + class TestExtendingFromAppCommands(T_ExtendingFromAppCmds): pass @@ -58,32 +66,10 @@ def test_origen_g(): universal_newlines=True) assert process.wait() == 0 -@pytest.mark.skip -class TestPluginCommandsAreAdded: - ... - @pytest.mark.skip class TestAuxCommandsAreAdded: ... -@pytest.mark.skip -class TestAppPluginAndAuxCommandClashing: - # core_cmd = origen.helpers.regressions.cli.CLI.in_app_cmds.eval.extend( - # exts, - # with_env=extend_core_cmds_env, - # from_configs=CLICommon.configs.suppress_plugin_collecting_config, - # ) - - def test_app_cmd_overrides_pl_cmd(self): - fail - - def test_app_cmd_overrides_aux_cmd(self): - fail - - # def test_extending_app_cmds(self): - # fail - - @pytest.mark.skip class TestModeOpts(): def test_(): diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml b/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml index 666ba279..ef264609 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml @@ -295,11 +295,11 @@ help = "Test various argument and option schemes from commands" help = "Command with a single arg and single opt" [[command.subcommand.arg]] - name = "single_val" + name = "single_arg_val" help = "Single value arg" [[command.subcommand.opt]] - name = "single_val" + name = "single_opt_val" takes_value = true help = "Single value opt" diff --git a/test_apps/python_no_app/tests/cmd_building/tests__intra_cmd_conflicts.py b/test_apps/python_no_app/tests/cmd_building/tests__intra_cmd_conflicts.py new file mode 100644 index 00000000..a7e071a2 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_building/tests__intra_cmd_conflicts.py @@ -0,0 +1,106 @@ +from test_apps_shared_test_helpers.cli import CLIShared + +class T_IntraCmdConflicts(CLIShared): + cmd = CLIShared.python_plugin.intra_cmd_conflicts + conflicts = CLIShared.python_plugin.intra_cmd_conflicts_list + + @classmethod + def setup_class(cls): + cls.cmd_help = cls.cmd.get_help_msg() + cls.cmd_conflicts = cls.cmd_help.logged_errors + + @classmethod + def teardown_class(cls): + delattr(cls, "cmd_help") + delattr(cls, "cmd_conflicts") + + def test_help_msg(self): + # Check help message + cmd = self.cmd + help = self.cmd_help + help.assert_args(cmd.arg0, cmd.arg1, cmd.arg2) + help.assert_opts( + cmd.arg_clash, + cmd.intra_opt_conflicts, + "help", + cmd.inter_opt_conflicts, + cmd.opt, + cmd.reserved_prefix_in_ln_lna, + "v", + "vk", + ) + help.assert_subcmds(cmd.conflicts_subc, "help") + + assert help.aux_exts == None + assert help.pl_exts == None + assert help.app_exts == False + + def test_conflicts_during_cmd_building(self): + for c in reversed(self.conflicts): + m = self.cmd_conflicts.pop() + assert self.to_conflict_msg(self.cmd, c) in m + + def test_all_error_messages_checked(self): + assert len(self.cmd_conflicts) == 0 + + def test_cmd_conflicts_resolve_correctly(self): + cmd = self.cmd + out = cmd.run( + "0", "1", "2", + "--opt", "--opt0", + "--arg0", "--arg1", + "--ext_opt_lna", + "--intra_opt_cons", "-c", "-e", + "-d", + ) + cmd.assert_args( + out, + (cmd.arg0, "0"), + (cmd.arg1, "1"), + (cmd.arg2, "2"), + (cmd.opt, 2), + (cmd.arg_clash, 2), + (cmd.reserved_prefix_in_ln_lna, 1), + (cmd.intra_opt_conflicts, 3), + (cmd.inter_opt_conflicts, 1), + ) + + def test_subc_help_msg(self): + # Check help message + cmd = self.cmd.conflicts_subc + help = cmd.get_help_msg() + + help.assert_args(cmd.arg0, cmd.sub_arg_1) + help.assert_opts( + "help", + cmd.inter_subc_conflicts, + cmd.intra_subc_lna_iln_conflict, + cmd.opt, + cmd.intra_subc_conflicts, + "v", + "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == None + assert help.pl_exts == None + assert help.app_exts == False + + def test_cmd_subc_conflicts_resolve_correctly(self): + cmd = self.cmd.conflicts_subc + out = cmd.run( + "a", "b", + "--opt", "--subc_opt", + "--intra_subc_conflicts", "-r", + "--intra_subc_lna_iln_conflict", + "--inter_subc_conflicts" + ) + cmd.assert_args( + out, + (cmd.arg0, "a"), + (cmd.sub_arg_1, "b"), + (cmd.opt, 2), + (cmd.intra_subc_conflicts, 2), + (cmd.intra_subc_lna_iln_conflict, 1), + (cmd.inter_subc_conflicts, 1), + ) diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py new file mode 100644 index 00000000..9bd90f70 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py @@ -0,0 +1,333 @@ +from test_apps_shared_test_helpers.cli import CLIShared + +class T_ExtConflicts(CLIShared): + class TestWithPLCmd(CLIShared): + config = CLIShared.exts.ext_conflicts["plugin.python_plugin.plugin_test_args"] + conflicts = config["conflicts_list"] + cmd = CLIShared.python_plugin.plugin_test_args.extend( + config["exts"], + from_configs=[config["cfg"]], + with_env=config["env"] + ) + aux_exts = config["ext_conflicts_exts"] + pl_exts = config["test_apps_shared_exts"] + + @classmethod + def setup_class(cls): + cls.cmd_help = cls.cmd.get_help_msg() + cls.cmd_conflicts = cls.cmd_help.logged_errors + + @classmethod + def teardown_class(cls): + delattr(cls, "cmd_help") + delattr(cls, "cmd_conflicts") + + def test_help_msg(self): + # Check help message + cmd = self.cmd + help = self.cmd_help + + help.assert_args(cmd.single_arg, cmd.multi_arg) + help.assert_opts( + self.aux_exts.aux_conflict_ln_and_aliases, + self.aux_exts.conflict_sn, + self.aux_exts.alias, + self.aux_exts.flag, + self.aux_exts.pl_aux_conflict, + self.pl_exts.flag, + self.aux_exts.ext_opt_in_ln, + self.aux_exts.ext_opt_in_lna, + self.aux_exts.ext_self_conflict, + self.aux_exts.ext_self_conflict_2, + cmd.flag_opt, + self.aux_exts.repeated_sn_and_aliases, + "help", + cmd.sn_only, + self.aux_exts.ns_self_conflict, + cmd.opt_taking_value, + self.pl_exts.opt_taking_value, + cmd.opt_with_aliases, + self.aux_exts.opt_taking_value, + self.pl_exts.pl_aux_conflict, + self.aux_exts.pl_aux_sn_conflict_aux, + self.pl_exts.pl_conflict_ln_and_aliases, + self.pl_exts.pl_aux_sn_conflict_pl, + self.aux_exts.same_iln_and_ln_alias, + self.aux_exts.same_ln_and_ln_alias, + self.aux_exts.single_arg, + self.aux_exts.subc, + "v", + "vk", + ) + help.assert_subcmds("help", cmd.subc) + + assert help.aux_exts == ['ext_conflicts'] + assert help.pl_exts == ['test_apps_shared_test_helpers'] + assert help.app_exts == False + + def test_conflict_messages(self): + for c in reversed(self.conflicts): + assert self.to_conflict_msg(self.cmd, c) in self.cmd_conflicts.pop() + + def test_error_messages_checked(self): + assert len(self.cmd_conflicts) == 0 + + def test_ext_conflicts_resolve_correctly(self): + cmd = self.cmd + print(self.cmd_help.text) + out = cmd.run( + "abc", "d", "e", + "--opt", "z", + "--flag", "--flag", "--flag", + "-n", + "-a", "--alias", "-b", + + "--single_arg", + "--otv", + "--conflict_sn", + "--ext_opt.aux.ext_conflicts.pl_aux_conflict", + "--pl_aux_sn_conflict_aux", + "--other_alias_aux", "-d", + "--ext_opt.aux.ext_conflicts.flag", + "--ext_opt.aux.ext_conflicts.alias", "--alias_aux", + "--subc", + "--ns_self_conflict", + "--ext_self_conflict", + "--ext_self_conflict_2_1", "--ext_self_conflict_2", + "--ext_opt_in_ln", + "--ext_opt_in_lna", "--ext_opt_in_lna_2", + "--same_ln_and_ln_alias", + "--same_iln_and_ln_alias", + "-g", "-e", "--repeated_lna", + + "--pl_aux_conflict", "--pl_aux_conflict", '--pl_aux_conflict', '--pl_aux_conflict', + "-s", "-s", + "--opt_taking_value", + "--other_alias_pl", "--pl_conflict_ln_and_aliases", "-c", + "--ext_opt.plugin.test_apps_shared_test_helpers.flag", "--ext_opt.plugin.test_apps_shared_test_helpers.flag", + ) + cmd.assert_args( + out, + (cmd.single_arg, "abc"), + (cmd.multi_arg, ["d", "e"]), + (cmd.flag_opt, 3), + (cmd.sn_only, 1), + (cmd.opt_taking_value, "z"), + (cmd.opt_with_aliases, 3), + + (self.aux_exts.single_arg, 1), + (self.aux_exts.opt_taking_value, 1), + (self.aux_exts.conflict_sn, 1), + (self.aux_exts.pl_aux_conflict, 1), + (self.aux_exts.pl_aux_sn_conflict_aux, 1), + (self.aux_exts.aux_conflict_ln_and_aliases, 2), + (self.aux_exts.flag, 1), + (self.aux_exts.alias, 2), + (self.aux_exts.subc, 1), + (self.aux_exts.ns_self_conflict, 1), + (self.aux_exts.ext_self_conflict, 1), + (self.aux_exts.ext_self_conflict_2, 2), + (self.aux_exts.ext_opt_in_ln, 1), + (self.aux_exts.ext_opt_in_lna, 2), + (self.aux_exts.same_ln_and_ln_alias, 1), + (self.aux_exts.same_iln_and_ln_alias, 1), + (self.aux_exts.repeated_sn_and_aliases, 3), + + (self.pl_exts.pl_aux_conflict, 4), + (self.pl_exts.pl_aux_sn_conflict_pl, 2), + (self.pl_exts.opt_taking_value, 1), + (self.pl_exts.pl_conflict_ln_and_aliases, 3), + (self.pl_exts.flag, 2), + ) + + class TestWithPLSubcmd(CLIShared): + config = CLIShared.exts.ext_conflicts["plugin.python_plugin.plugin_test_args.subc"] + cmd = CLIShared.python_plugin.plugin_test_args.subc.extend( + config["exts"], + from_configs=[config["cfg"]], + with_env=config["env"] + ) + aux_exts = config["ext_conflicts_exts"] + pl_exts = config["test_apps_shared_exts"] + + @classmethod + def setup_class(cls): + cls.cmd_help = cls.cmd.get_help_msg() + cls.cmd_conflicts = cls.cmd_help.logged_errors + + @classmethod + def teardown_class(cls): + delattr(cls, "cmd_help") + delattr(cls, "cmd_conflicts") + + def test_help_msg(self): + cmd = self.cmd + pl_exts = self.pl_exts + aux_exts = self.aux_exts + help = self.cmd_help + + print(help.text) + help.assert_args(cmd.single_arg) + help.assert_opts( + pl_exts.subc_pl_aux_conflict, + aux_exts.flag_opt, + aux_exts.more_conflicts, + pl_exts.flag_opt, + cmd.flag_opt, + "help", + pl_exts.more_conflicts, + cmd.subc_sn_only, + cmd.subc_opt_with_aliases, + aux_exts.subc_pl_aux_conflict, + "v", + "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['ext_conflicts'] + assert help.pl_exts == ['test_apps_shared_test_helpers'] + assert help.app_exts == False + + def test_conflict_messages(self): + cmd = self.cmd + conflicts = self.config["conflicts_list"] + + for c in reversed(conflicts): + m = self.to_conflict_msg(cmd, c) + assert m in self.cmd_conflicts.pop() + + def test_all_errors_checked(self): + assert len(self.cmd_conflicts) == 0 + + def test_conflicts_resolve_correctly(self): + cmd = self.cmd + pl_exts = self.pl_exts + aux_exts = self.aux_exts + + out = cmd.run( + "argv", + "--flag_opt", + "-n", "-n", + "-a", "--subc_opt", "-b", "--subc_alias", + + '--pl0', '--pl1', '-c', '--subc_pl_aux', + '--ext_opt.plugin.test_apps_shared_test_helpers.flag_opt', '--ext_opt.plugin.test_apps_shared_test_helpers.flag_opt', + '--more_conflicts', '-d', '--more_conflicts', + + "-e", "--aux0", "--subc_pl_aux_conflict", + "--ext_opt.aux.ext_conflicts.flag_opt", "--ext_opt.aux.ext_conflicts.flag_opt", "--ext_opt.aux.ext_conflicts.flag_opt", + '--ext_opt.aux.ext_conflicts.more_conflicts', '--ext_opt.aux.ext_conflicts.more_conflicts' + ) + cmd.assert_args( + out, + (cmd.single_arg, "argv"), + (cmd.flag_opt, 1), + (cmd.subc_sn_only, 2), + (cmd.subc_opt_with_aliases, 4), + + (pl_exts.subc_pl_aux_conflict, 4), + (pl_exts.flag_opt, 2), + (pl_exts.more_conflicts, 3), + + (aux_exts.subc_pl_aux_conflict, 3), + (aux_exts.flag_opt, 3), + (aux_exts.more_conflicts, 2), + ) + + class TestWithCoreCmd(CLIShared): + eval_config = CLIShared.exts.ext_conflicts["origen.eval"] + eval_cmd = CLIShared.cmds.eval.extend( + CLIShared.exts.exts["origen.eval"]["global_exts"] + eval_config["exts"], + from_configs=[eval_config["cfg"]], + with_env=eval_config["env"] + ) + + creds_clear_config = CLIShared.exts.ext_conflicts["origen.credentials.clear"] + creds_clear_cmd = CLIShared.cmds.creds.clear.extend( + creds_clear_config["exts"], + from_configs=[creds_clear_config["cfg"]], + with_env=creds_clear_config["env"] + ) + + @classmethod + def setup_class(cls): + cls.eval_cmd_help = cls.eval_cmd.get_help_msg() + cls.eval_cmd_conflicts = cls.eval_cmd_help.logged_errors + cls.creds_clear_cmd_help = cls.creds_clear_cmd.get_help_msg() + cls.creds_clear_cmd_conflicts = cls.creds_clear_cmd_help.logged_errors + + @classmethod + def teardown_class(cls): + delattr(cls, "eval_cmd_help") + delattr(cls, "eval_cmd_conflicts") + delattr(cls, "creds_clear_cmd_help") + delattr(cls, "creds_clear_cmd_conflicts") + + def test_ext_arg_conflicts_with_core_cmd_help_msg(self): + cmd = self.eval_cmd + help = self.eval_cmd_help + aux_code_opt = CLIShared.exts.ext_conflicts["origen.eval"]["exts"][0] + pl_code_opt = CLIShared.exts.ext_conflicts["origen.eval"]["exts"][1] + + help.assert_args(cmd.code) + help.assert_opts( + cmd.say_hi_after_eval, + cmd.say_hi_before_eval, + pl_code_opt, + aux_code_opt, + "help", + cmd.say_hi_during_cleanup, + "v", + "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['ext_conflicts'] + assert help.pl_exts == ["python_plugin", 'test_apps_shared_test_helpers'] + assert help.app_exts == False + + def test_ext_arg_conflicts_with_core_cmd_msgs(self): + # Use eval cmd for arg + cmd = self.eval_cmd + + conflicts = self.eval_config["conflicts_list"] + for c in reversed(conflicts): + m = self.to_conflict_msg(cmd, c) + assert m in self.eval_cmd_conflicts.pop() + assert len(self.eval_cmd_conflicts) == 0 + + + def test_ext_opt_conflicts_with_core_cmd_help_msg(self): + cmd = self.creds_clear_cmd + help = self.creds_clear_cmd_help + aux_exts = self.creds_clear_config["ext_conflicts_exts"] + pl_exts = self.creds_clear_config["test_apps_shared_exts"] + + help.assert_args(None) + help.assert_opts( + cmd.all, + aux_exts.cmd_conflicts_aux, + pl_exts.cmd_conflicts_pl, + cmd.datasets, + aux_exts.all, + pl_exts.all, + "help", + "v", + "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['ext_conflicts'] + assert help.pl_exts == ['test_apps_shared_test_helpers'] + assert help.app_exts == False + + + def test_ext_opt_conflicts_with_core_cmd(self): + # Use credentials.clear for opts + cmd = self.creds_clear_cmd + + conflicts = self.creds_clear_config["conflicts_list"] + for c in reversed(conflicts): + m = self.to_conflict_msg(cmd, c) + assert m in self.creds_clear_cmd_conflicts.pop() + assert len(self.eval_cmd_conflicts) == 0 diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py new file mode 100644 index 00000000..f38090a5 --- /dev/null +++ b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py @@ -0,0 +1,545 @@ +import pytest +from test_apps_shared_test_helpers.cli import CLIShared, CmdExtOpt + +class Common(CLIShared): + sv = "single_val" + +class T_ExtendingCmds(CLIShared): + class TestExtensionOpts(Common): + cmd = CLIShared.python_plugin.plugin_test_args.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_args"]["exts"], + from_configs=CLIShared.exts.exts_workout_cfg + ) + subcmd = CLIShared.python_plugin.plugin_test_args.subc.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_args.subc"]["exts"], + from_configs=CLIShared.exts.exts_workout_cfg + ) + + ext_flag = cmd.flag_extension + ext_sa = cmd.single_val_opt + ext_ma = cmd.multi_val_opt + ext_ma_delim = cmd.multi_val_delim_opt + ext_action = cmd.exts_workout_action + ext_ha = cmd.hidden_opt + sa = cmd.single_arg + ma = cmd.multi_arg + sv_opt = cmd.opt_taking_value + f_opt = cmd.flag_opt + opt_als = cmd.opt_with_aliases + sn_only = cmd.sn_only + + mv = ["m0", "m1", "m2"] + ov = "opt_value" + ext_sv = "ext_single_val" + ext_mv = ["mv0", "mv1"] + ext_mvd = ["mvd0", "mvd1"] + ext_rv = ["no_action"] + + def get_action_results(self, output, actions): + retn = {} + for action in actions: + a = {} + r = output.split(f"Start Action Before CMD: {action}")[1].strip() + a["Before"], r = r.split(f"End Action Before CMD: {action}") + r = output.split(f"Start Action After CMD: {action}")[1].strip() + a["After"], r = r.split(f"End Action After CMD: {action}") + retn[action] = a + return retn + + def test_help_msg(self): + help = self.cmd.get_help_msg() + help.assert_args(self.sa, self.ma) + help.assert_opts( + self.ext_action, + self.ext_flag, + self.f_opt, + "help", + self.ext_ma, + self.ext_ma_delim, + self.sn_only, + self.sv_opt, + self.opt_als, + self.ext_sa, + "v", + "vk", + ) + help.assert_subcmds("help", self.cmd.subc) + + assert help.aux_exts == ['exts_workout'] + assert help.pl_exts == None + assert help.app_exts == False + + def test_using_extended_opts(self): + out = self.cmd.run( + self.sv, *self.mv, + self.ext_flag.ln_to_cli(), self.ext_flag.sn_to_cli(), + self.cmd.opt_taking_value.ln_to_cli(), self.ov, + self.ext_sa.sn_to_cli(), self.ext_sv, + self.ext_ma.ln_to_cli(), *self.ext_mv, ','.join(self.ext_mvd), + self.ext_ma_delim.ln_to_cli(), ','.join(self.ext_mvd), + self.ext_action.ln_to_cli(), *self.ext_rv, + self.cmd.flag_opt.ln_to_cli(), + self.ext_ha.ln_to_cli(), + self.cmd.flag_opt.ln_to_cli(), + ) + self.cmd.assert_args( + out, + (self.cmd.single_arg, self.sv), + (self.cmd.multi_arg, self.mv), + (self.cmd.opt_taking_value, self.ov), + (self.cmd.flag_opt, 2), + (self.ext_flag, 2), + (self.ext_sa, self.ext_sv), + (self.ext_ma, [*self.ext_mv, ','.join(self.ext_mvd)]), + (self.ext_ma_delim, self.ext_mvd), + (self.ext_action, self.ext_rv), + (self.ext_ha, 1), + ) + + def test_error_on_required_ext_opt(self): + err = self.cmd.gen_error("single_val") + assert self.err_msgs.missing_required_arg(self.ext_action) in err + + def test_accessing_cmd_args_from_ext(self): + actions = ["show_cmd_args"] + out = self.cmd.run( + self.sv, *self.mv, + self.ext_action.ln_to_cli(), *actions + ) + print(out) + self.cmd.assert_args( + out, + (self.cmd.single_arg, self.sv), + (self.cmd.multi_arg, self.mv), + (self.ext_action, actions), + ) + r = self.get_action_results(out, actions) + assert eval(r["show_cmd_args"]["Before"]) == { + self.cmd.single_arg.name: self.sv, + self.cmd.multi_arg.name: self.mv + } + assert eval(r["show_cmd_args"]["After"]) == { + self.cmd.single_arg.name: self.sv, + self.cmd.multi_arg.name: self.mv + } + + def test_accessing_ext_args_directly(self): + actions = ["show_ext_args"] + out = self.cmd.run( + self.sv, *self.mv, + self.ext_action.ln_to_cli(), *actions + ) + print(out) + self.cmd.assert_args( + out, + (self.cmd.single_arg, self.sv), + (self.cmd.multi_arg, self.mv), + (self.ext_action, actions), + ) + r = self.get_action_results(out, actions) + assert eval(r["show_ext_args"]["Before"]) == { + "aux.exts_workout": {self.ext_action.name: actions} + } + assert eval(r["show_ext_args"]["After"]) == { + "aux.exts_workout": {self.ext_action.name: actions} + } + + def test_manipulating_cmd_args_in_ext(self): + actions = ["show_cmd_args", "set_arg__cmd__single_arg__updated"] + out = self.cmd.run( + self.sv, *self.mv, + self.ext_action.ln_to_cli(), *actions + ) + self.cmd.assert_args( + out, + (self.cmd.single_arg, "updated"), + (self.cmd.multi_arg, self.mv), + (self.ext_action, actions), + ) + r = self.get_action_results(out, actions) + assert eval(r["show_cmd_args"]["Before"]) == { + self.cmd.single_arg.name: self.sv, + self.cmd.multi_arg.name: self.mv + } + assert eval(r["show_cmd_args"]["After"]) == { + self.cmd.single_arg.name: "updated", + self.cmd.multi_arg.name: self.mv + } + + def test_manipulating_ext_args_in_ext(self): + actions = ["show_ext_args", "exts_workout__test_updating_args"] + out = self.cmd.run( + self.sv, + self.ext_action.ln_to_cli(), *actions, + self.ext_sa.sn_to_cli(), self.ext_sv, + self.ext_ma.ln_to_cli(), *self.ext_mv, + self.ext_ma_delim.ln_to_cli(), ','.join(self.ext_mvd), + self.ext_flag.ln_to_cli(), + self.ext_flag.ln_to_cli(), + ) + print(out) + self.cmd.assert_args( + out, + (self.cmd.single_arg, self.sv), + (self.ext_flag, 3, {"Before": 2}), + (self.ext_sa, "update_sv_opt", {"Before": self.ext_sv}), + (self.ext_ma, self.ext_mv + ["update_mv_opt"], {"Before": self.ext_mv}), + (self.ext_ma_delim, self.ext_mvd), + (self.ext_action, actions), + (CmdExtOpt("new_arg", src_name="exts_workout"), "new_arg_for_ext", {"Before": False}) + ) + + @pytest.mark.skip + def test_extending_subcommand(self): + actions = ["no_action"] + out = self.subcmd.run( + self.sv, + self.subcmd.flag_opt.ln_to_cli(), + self.subcmd.exts_workout_action.ln_to_cli(), *actions, + ) + self.subcmd.assert_args( + out, + (self.subcmd.single_arg, self.sv), + (self.subcmd.exts_workout_action, actions), + ) + + def test_subc_help_msg(self): + subc = self.subcmd + help = subc.get_help_msg() + help.assert_args(subc.single_arg) + help.assert_opts( + subc.exts_workout_action, + subc.flag_opt, + "help", + subc.subc_sn_only, + subc.subc_opt_with_aliases, + "v", + "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['exts_workout'] + assert help.pl_exts == None + assert help.app_exts == False + + @pytest.mark.skip + def test_basic_extending_from_pl(self): + help = self.global_cmds.eval.get_help_msg() + assert help.pl_exts == [] + + class TestExtensionStacking(Common): + cmd = CLIShared.python_plugin.plugin_test_ext_stacking.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ] + ) + subc = CLIShared.python_plugin.plugin_test_ext_stacking.subc.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking.subc"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ], + ) + + def test_ext_stacking_help_msg(self): + cmd = self.cmd + help = cmd.get_help_msg() + help.assert_args(cmd.single_arg) + help.assert_opts( + cmd.ext_action, + cmd.flag_opt, + "help", + cmd.pl_ext_stacking_from_aux_action, + cmd.pl_ext_stacking_from_aux_flag, + cmd.pl_the_2nd_ext_action, + cmd.pl_the_2nd_ext_flag, + "v", + "vk", + ) + help.assert_subcmds("help", self.subc) + + assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] + assert help.pl_exts == ['python_plugin_the_second'] + assert help.app_exts == False + + def test_ext_stacking(self): + cmd = self.cmd + actions = [self.na] + out = cmd.run( + self.sv, + cmd.flag_opt.ln_to_cli(), + cmd.ext_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), + cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, + cmd.pl_the_2nd_ext_flag.ln_to_cli(), + ) + cmd.assert_args( + out, + (cmd.single_arg, self.sv), + (cmd.flag_opt, 1), + (cmd.ext_action, actions), + (cmd.pl_ext_stacking_from_aux_action, actions), + (cmd.pl_ext_stacking_from_aux_flag, 2), + (cmd.pl_the_2nd_ext_action, actions), + (cmd.pl_the_2nd_ext_flag, 1), + ) + + def test_manipulating_other_ext_args(self): + cmd = self.cmd + actions = ["update_flag_opts"] + out = cmd.run( + self.sv, + cmd.flag_opt.ln_to_cli(), + cmd.ext_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), + cmd.pl_the_2nd_ext_flag.ln_to_cli(), + ) + cmd.assert_args( + out, + (cmd.single_arg, self.sv), + (cmd.flag_opt, 2), + (cmd.ext_action, actions), + (cmd.pl_ext_stacking_from_aux_flag, 3, {"Before": 2}), + (cmd.pl_the_2nd_ext_flag, 2, {"Before": 1}), + ) + + def test_subc_ext_stacking_help_msg(self): + subc = self.subc + help = subc.get_help_msg() + help.assert_args(subc.single_arg) + help.assert_opts( + subc.ext_action_subc, + subc.flag_opt, + "help", + subc.pl_ext_stacking_from_aux_action_subc, + subc.pl_ext_stacking_from_aux_flag_subc, + subc.pl_the_2nd_ext_action_subc, + subc.pl_the_2nd_ext_flag_subc, + "v", + "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] + assert help.pl_exts == ['python_plugin_the_second'] + assert help.app_exts == False + + def test_subc_ext_stacking(self): + actions = [self.na] + subc = self.subc + out = subc.run( + self.sv, + subc.flag_opt.ln_to_cli(), + subc.ext_action_subc.ln_to_cli(), *actions, + subc.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), subc.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + subc.pl_the_2nd_ext_flag_subc.ln_to_cli(), + ) + subc.assert_args( + out, + (subc.single_arg, self.sv), + (subc.flag_opt, 1), + (subc.ext_action_subc, actions), + (subc.pl_ext_stacking_from_aux_flag_subc, 2), + (subc.pl_the_2nd_ext_flag_subc, 1), + ) + + class TestExtendingAuxCmds(Common): + cmd = CLIShared.aux.ns.dummy_cmds.dummy_cmd.extend( + CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ], + with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] + ) + subc = CLIShared.aux.ns.dummy_cmds.dummy_cmd.subc.extend( + CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd.subc"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ], + with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] + ) + + @property + def na(self): + return "no_action" + + def test_extending_aux_cmd_help_msg(self): + cmd = self.cmd + help = cmd.get_help_msg() + help.assert_args(cmd.action_arg) + help.assert_opts( + cmd.exts_workout_action, + cmd.exts_workout_flag, + "help", + cmd.pl_ext_stacking_from_aux_action, + cmd.pl_ext_stacking_from_aux_flag, + cmd.python_plugin_action, + cmd.python_plugin_flag, + cmd.python_plugin_the_second_action, + cmd.python_plugin_the_second_flag, + "v", + "vk", + ) + help.assert_subcmds("help", cmd.subc) + + assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] + assert help.pl_exts == ['python_plugin', 'python_plugin_the_second'] + assert help.app_exts == False + + def test_extending_aux_cmd(self): + cmd = self.cmd + out = cmd.run( + self.na, + cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), + cmd.python_plugin_the_second_flag.ln_to_cli(), + cmd.python_plugin_flag.ln_to_cli(), + ) + cmd.assert_args( + out, + (cmd.action_arg, [self.na]), + (cmd.exts_workout_action, None), + (cmd.pl_ext_stacking_from_aux_flag, 2), + (cmd.python_plugin_the_second_flag, 1), + (cmd.python_plugin_flag, 1), + ) + + def test_manipulating_args_from_aux_exts(self): + cmd = self.cmd + actions = [ + "inc_flag__aux_ext__pl_ext_stacking_from_aux_flag", + "inc_flag__plugin_ext__python_plugin_the_second_flag", + "set_flag__plugin_ext__python_plugin_flag" + ] + out = cmd.run( + self.na, + cmd.exts_workout_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), + cmd.python_plugin_the_second_flag.ln_to_cli(), + ) + cmd.assert_args( + out, + (cmd.action_arg, [self.na]), + (cmd.exts_workout_action, actions), + (cmd.python_plugin_flag, -1, {"Before": None}), + (cmd.pl_ext_stacking_from_aux_flag, 3, {"Before": 2}), + (cmd.python_plugin_the_second_flag, 2, {"Before": 1}), + finalize_ext_args=lambda ext_args: ext_args['python_plugin'].update({'Before Cmd': []}) + ) + + def test_extending_aux_cmd_help_msg_subc(self): + cmd = self.subc + help = cmd.get_help_msg() + help.assert_args(cmd.action_arg) + help.assert_opts( + cmd.exts_workout_action, + cmd.exts_workout_flag_subc, + cmd.flag_opt, + "help", + cmd.pl_ext_stacking_from_aux_action_subc, + cmd.pl_ext_stacking_from_aux_flag_subc, + cmd.python_plugin_action_subc, + cmd.python_plugin_flag_subc, + cmd.python_plugin_the_second_action_subc, + cmd.python_plugin_the_second_flag_subc, + "v", + "vk", + ) + help.assert_subcmds(None) + + assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] + assert help.pl_exts == ['python_plugin', 'python_plugin_the_second'] + assert help.app_exts == False + + def test_extending_aux_subcmd(self): + cmd = self.subc + actions = ["no_action"] + out = cmd.run( + self.na, + cmd.flag_opt.ln_to_cli(), + cmd.exts_workout_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + cmd.python_plugin_the_second_flag_subc.ln_to_cli(), + cmd.python_plugin_flag_subc.ln_to_cli(), + ) + print(out) + cmd.assert_args( + out, + (cmd.action_arg, [self.na]), + (cmd.flag_opt, 1), + (cmd.exts_workout_action, actions), + (cmd.exts_workout_flag_subc, None), + (cmd.pl_ext_stacking_from_aux_flag_subc, 2), + (cmd.python_plugin_the_second_flag_subc, 1), + (cmd.python_plugin_flag_subc, 1), + ) + + def test_manipulating_args_from_aux_subcmd(self): + cmd = self.subc + actions = [ + "inc_flag__cmd__flag_opt", + "inc_multi_arg__cmd__action_arg__updated", + "inc_flag__aux_ext__pl_ext_stacking_from_aux_flag_subc", + "inc_flag__plugin_ext__python_plugin_the_second_flag_subc", + "inc_flag__plugin_ext__python_plugin_flag_subc" + ] + out = cmd.run( + self.na, + cmd.flag_opt.ln_to_cli(), + cmd.exts_workout_action.ln_to_cli(), *actions, + cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), + cmd.python_plugin_the_second_flag_subc.ln_to_cli(), + cmd.python_plugin_flag_subc.ln_to_cli(), + ) + cmd.assert_args( + out, + (cmd.action_arg, ["updated"]), + (cmd.flag_opt, 2), + (cmd.exts_workout_action, actions), + (cmd.exts_workout_flag_subc, None), + (cmd.pl_ext_stacking_from_aux_flag_subc, 3, {"Before": 2}), + (cmd.python_plugin_the_second_flag_subc, 2, {"Before": 1}), + (cmd.python_plugin_flag_subc, 2, {"Before": 1}), + ) + + @pytest.mark.skip + def test_hidden_exts_full_name(self): + fail + + def test_extending_origen_cmd_from_plugin(self): + ''' Test each global command is extendable''' + cmd = self.global_cmds.eval + cmd = cmd.extend( + CLIShared.exts.exts["generic_core_ext"]["exts"], + from_configs=[CLIShared.exts.core_cmd_exts_cfg] + ) + + help = cmd.get_help_msg() + help.assert_args(cmd.code) + help.assert_opts( + cmd.core_cmd_exts_generic_core_ext, + "help", + cmd.pl_ext_cmds_generic_ext, + "v", + "vk", + ) + help.assert_subcmds(None) + assert help.aux_exts == ['core_cmd_exts'] + assert help.pl_exts == ['pl_ext_cmds'] + assert help.app_exts == False + + d = cmd.global_demo("minimal") + out = d.run(add_args=[ + cmd.core_cmd_exts_generic_core_ext.ln_to_cli(), + cmd.pl_ext_cmds_generic_ext.ln_to_cli(), + cmd.pl_ext_cmds_generic_ext.ln_to_cli(), + ]) + d.assert_present(out) + cmd.core_cmd_exts_generic_core_ext.assert_present(1, out) + cmd.pl_ext_cmds_generic_ext.assert_present(2, out) diff --git a/test_apps/python_no_app/tests/misc_test.py b/test_apps/python_no_app/tests/misc_test.py index fcc9e190..7ae8bb95 100644 --- a/test_apps/python_no_app/tests/misc_test.py +++ b/test_apps/python_no_app/tests/misc_test.py @@ -8,607 +8,9 @@ from tests import configs as config_funcs from test_apps_shared_test_helpers.cli import CmdExtOpt - - # def test_adding_commands_from_config(self): - # fail - - # def test_adding_commands_from_env(self): - # fail - - # def test_adding_commands_frontend_location(self): - # fail - - # def test_adding_commands_from_cli_location(self): - # fail - - # def test_adding_commands_from_plugins(self): - # fail - - # class TestEval - from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg -class Common(CLIShared): - sv = "single_val" - -# @pytest.mark.skip class TestExtensions(CLIShared): - # def test_extending_global_core_cmds(self): - # ... - - # @pytest.mark.skip - # class TestExtensionOpts(CLIShared): - # def test_help_msg(self): - # cfg = self.exts.exts_workout_cfg - # help = self.python_plugin.echo.get_help_msg(with_configs=cfg) - # print(help) - # fail - - # class TestExtendingCmds(CLIShared): - # def test_extending_aux_cmds() - - class TestExtensionOpts(Common): - cmd = CLIShared.python_plugin.plugin_test_args.extend( - CLIShared.exts.exts["plugin.python_plugin.plugin_test_args"]["exts"], - from_configs=CLIShared.exts.exts_workout_cfg - ) - subcmd = CLIShared.python_plugin.plugin_test_args.subc.extend( - CLIShared.exts.exts["plugin.python_plugin.plugin_test_args.subc"]["exts"], - from_configs=CLIShared.exts.exts_workout_cfg - ) - - ext_flag = cmd.flag_extension - ext_sa = cmd.single_val_opt - ext_ma = cmd.multi_val_opt - ext_ma_delim = cmd.multi_val_delim_opt - ext_action = cmd.exts_workout_action - ext_ha = cmd.hidden_opt - sa = cmd.single_arg - ma = cmd.multi_arg - sv_opt = cmd.opt_taking_value - f_opt = cmd.flag_opt - - mv = ["m0", "m1", "m2"] - ov = "opt_value" - ext_sv = "ext_single_val" - ext_mv = ["mv0", "mv1"] - ext_mvd = ["mvd0", "mvd1"] - ext_rv = ["no_action"] - - def get_action_results(self, output, actions): - retn = {} - for action in actions: - a = {} - r = output.split(f"Start Action Before CMD: {action}")[1].strip() - a["Before"], r = r.split(f"End Action Before CMD: {action}") - r = output.split(f"Start Action After CMD: {action}")[1].strip() - a["After"], r = r.split(f"End Action After CMD: {action}") - retn[action] = a - return retn - - def test_help_msg(self): - help = self.cmd.get_help_msg() - help.assert_args(self.sa, self.ma) - help.assert_opts( - self.ext_action, - self.ext_flag, - self.f_opt, - "help", - self.ext_ma, - self.ext_ma_delim, - self.sv_opt, - self.ext_sa, - "v", - "vk", - ) - help.assert_subcmds("help", self.cmd.subc) - - assert help.aux_exts == ['exts_workout'] - assert help.pl_exts == None - assert help.app_exts == False - - def test_using_extended_opts(self): - # sv = "single_val" - # mv = ["m0", "m1", "m2"] - # ov = "opt_value" - # ext_sv = "ext_single_val" - # ext_mv = ["mv0", "mv1"] - # ext_mvd = ["mvd0", "mvd1"] - # ext_rv = "required_ext_opt" - out = self.cmd.run( - self.sv, *self.mv, - self.ext_flag.ln_to_cli(), self.ext_flag.sn_to_cli(), - self.cmd.opt_taking_value.ln_to_cli(), self.ov, - self.ext_sa.sn_to_cli(), self.ext_sv, - self.ext_ma.ln_to_cli(), *self.ext_mv, ','.join(self.ext_mvd), - self.ext_ma_delim.ln_to_cli(), ','.join(self.ext_mvd), - self.ext_action.ln_to_cli(), *self.ext_rv, - self.cmd.flag_opt.ln_to_cli(), - self.ext_ha.ln_to_cli(), - self.cmd.flag_opt.ln_to_cli(), - ) - self.cmd.assert_args( - out, - (self.cmd.single_arg, self.sv), - (self.cmd.multi_arg, self.mv), - (self.cmd.opt_taking_value, self.ov), - (self.cmd.flag_opt, 2), - (self.ext_flag, 2), - (self.ext_sa, self.ext_sv), - (self.ext_ma, [*self.ext_mv, ','.join(self.ext_mvd)]), - (self.ext_ma_delim, self.ext_mvd), - (self.ext_action, self.ext_rv), - (self.ext_ha, 1), - ) - - def test_error_on_required_ext_opt(self): - err = self.cmd.gen_error("single_val") - assert self.err_msgs.missing_required_arg(self.ext_action) in err - - def test_accessing_cmd_args_from_ext(self): - actions = ["show_cmd_args"] - out = self.cmd.run( - self.sv, *self.mv, - self.ext_action.ln_to_cli(), *actions - ) - print(out) - self.cmd.assert_args( - out, - (self.cmd.single_arg, self.sv), - (self.cmd.multi_arg, self.mv), - (self.ext_action, actions), - ) - r = self.get_action_results(out, actions) - assert eval(r["show_cmd_args"]["Before"]) == { - self.cmd.single_arg.name: self.sv, - self.cmd.multi_arg.name: self.mv - } - assert eval(r["show_cmd_args"]["After"]) == { - self.cmd.single_arg.name: self.sv, - self.cmd.multi_arg.name: self.mv - } - - def test_accessing_ext_args_directly(self): - actions = ["show_ext_args"] - out = self.cmd.run( - self.sv, *self.mv, - self.ext_action.ln_to_cli(), *actions - ) - print(out) - self.cmd.assert_args( - out, - (self.cmd.single_arg, self.sv), - (self.cmd.multi_arg, self.mv), - (self.ext_action, actions), - ) - r = self.get_action_results(out, actions) - assert eval(r["show_ext_args"]["Before"]) == { - "aux.exts_workout": {self.ext_action.name: actions} - } - assert eval(r["show_ext_args"]["After"]) == { - "aux.exts_workout": {self.ext_action.name: actions} - } - - def test_manipulating_cmd_args_in_ext(self): - actions = ["show_cmd_args", "set_arg__cmd__single_arg__updated"] - out = self.cmd.run( - self.sv, *self.mv, - self.ext_action.ln_to_cli(), *actions - ) - self.cmd.assert_args( - out, - (self.cmd.single_arg, "updated"), - (self.cmd.multi_arg, self.mv), - (self.ext_action, actions), - ) - # print(out) - r = self.get_action_results(out, actions) - assert eval(r["show_cmd_args"]["Before"]) == { - self.cmd.single_arg.name: self.sv, - self.cmd.multi_arg.name: self.mv - } - assert eval(r["show_cmd_args"]["After"]) == { - self.cmd.single_arg.name: "updated", - self.cmd.multi_arg.name: self.mv - } - - def test_manipulating_ext_args_in_ext(self): - actions = ["show_ext_args", "exts_workout__test_updating_args"] - out = self.cmd.run( - self.sv, - self.ext_action.ln_to_cli(), *actions, - self.ext_sa.sn_to_cli(), self.ext_sv, - self.ext_ma.ln_to_cli(), *self.ext_mv, - self.ext_ma_delim.ln_to_cli(), ','.join(self.ext_mvd), - self.ext_flag.ln_to_cli(), - self.ext_flag.ln_to_cli(), - ) - print(out) - self.cmd.assert_args( - out, - (self.cmd.single_arg, self.sv), - (self.ext_flag, 3, {"Before": 2}), - (self.ext_sa, "update_sv_opt", {"Before": self.ext_sv}), - (self.ext_ma, self.ext_mv + ["update_mv_opt"], {"Before": self.ext_mv}), - (self.ext_ma_delim, self.ext_mvd), - (self.ext_action, actions), - (CmdExtOpt("new_arg", src_name="exts_workout"), "new_arg_for_ext", {"Before": False}) - ) - - - # def test_ext_cleanup(self): - # fail - - # def test_ext_cleanup(self): - # fail - - @pytest.mark.skip - def test_extending_subcommand(self): - actions = ["no_action"] - out = self.subcmd.run( - self.sv, - self.subcmd.flag_opt.ln_to_cli(), - self.subcmd.exts_workout_action.ln_to_cli(), *actions, - # self.sv, - # self.ext_action.ln_to_cli(), *actions, - # self.ext_sa.sn_to_cli(), self.ext_sv, - # self.ext_ma.ln_to_cli(), *self.ext_mv, - # self.ext_ma_delim.ln_to_cli(), ','.join(self.ext_mvd), - # self.ext_flag.ln_to_cli(), - # self.ext_flag.ln_to_cli(), - ) - # print(out) - self.subcmd.assert_args( - out, - (self.subcmd.single_arg, self.sv), - (self.subcmd.exts_workout_action, actions), - ) - - def test_subc_help_msg(self): - subc = self.subcmd - help = subc.get_help_msg() - # help.assert_num_opts(9) - help.assert_args(subc.single_arg) - help.assert_opts( - subc.exts_workout_action, - subc.flag_opt, - "help", - "v", - "vk", - ) - help.assert_subcmds(None) - - assert help.aux_exts == ['exts_workout'] - assert help.pl_exts == None - assert help.app_exts == False - - @pytest.mark.skip - def test_basic_extending_from_pl(self): - help = self.global_cmds.eval.get_help_msg() - assert help.pl_exts == [] - - class TestExtensionStacking(Common): - cmd = CLIShared.python_plugin.plugin_test_ext_stacking.extend( - CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking"]["exts"], - from_configs=[ - CLIShared.exts.exts_workout_cfg, - CLIShared.exts.pl_ext_stacking_from_aux_cfg - ] - ) - subc = CLIShared.python_plugin.plugin_test_ext_stacking.subc.extend( - CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking.subc"]["exts"], - from_configs=[ - CLIShared.exts.exts_workout_cfg, - CLIShared.exts.pl_ext_stacking_from_aux_cfg - ], - ) - - def test_ext_stacking_help_msg(self): - cmd = self.cmd - help = cmd.get_help_msg() - # help.assert_num_opts(9) - help.assert_args(cmd.single_arg) - help.assert_opts( - cmd.ext_action, - cmd.flag_opt, - "help", - cmd.pl_ext_stacking_from_aux_action, - cmd.pl_ext_stacking_from_aux_flag, - cmd.pl_the_2nd_ext_action, - cmd.pl_the_2nd_ext_flag, - "v", - "vk", - ) - help.assert_subcmds("help", self.subc) - - assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] - assert help.pl_exts == ['python_plugin_the_second'] - assert help.app_exts == False - - def test_ext_stacking(self): - cmd = self.cmd - actions = [self.na] - out = cmd.run( - self.sv, - cmd.flag_opt.ln_to_cli(), - cmd.ext_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_from_aux_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), - cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, - cmd.pl_the_2nd_ext_flag.ln_to_cli(), - ) - print(out) - cmd.assert_args( - out, - (cmd.single_arg, self.sv), - (cmd.flag_opt, 1), - (cmd.ext_action, actions), - (cmd.pl_ext_stacking_from_aux_action, actions), - (cmd.pl_ext_stacking_from_aux_flag, 2), - (cmd.pl_the_2nd_ext_action, actions), - (cmd.pl_the_2nd_ext_flag, 1), - ) - - def test_manipulating_other_ext_args(self): - cmd = self.cmd - actions = ["update_flag_opts"] - out = cmd.run( - self.sv, - cmd.flag_opt.ln_to_cli(), - cmd.ext_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), - cmd.pl_the_2nd_ext_flag.ln_to_cli(), - ) - print(out) - cmd.assert_args( - out, - (cmd.single_arg, self.sv), - (cmd.flag_opt, 2), - (cmd.ext_action, actions), - (cmd.pl_ext_stacking_from_aux_flag, 3, {"Before": 2}), - (cmd.pl_the_2nd_ext_flag, 2), - ) - - def test_subc_ext_stacking_help_msg(self): - subc = self.subc - help = subc.get_help_msg() - help.assert_args(subc.single_arg) - help.assert_opts( - subc.ext_action_subc, - subc.flag_opt, - "help", - subc.pl_ext_stacking_from_aux_action_subc, - subc.pl_ext_stacking_from_aux_flag_subc, - subc.pl_the_2nd_ext_action_subc, - subc.pl_the_2nd_ext_flag_subc, - "v", - "vk", - ) - help.assert_subcmds(None) - - assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] - assert help.pl_exts == ['python_plugin_the_second'] - assert help.app_exts == False - - def test_subc_ext_stacking(self): - actions = [self.na] - subc = self.subc - out = subc.run( - self.sv, - subc.flag_opt.ln_to_cli(), - subc.ext_action_subc.ln_to_cli(), *actions, - subc.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), subc.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), - subc.pl_the_2nd_ext_flag_subc.ln_to_cli(), - ) - subc.assert_args( - out, - (subc.single_arg, self.sv), - (subc.flag_opt, 1), - (subc.ext_action_subc, actions), - (subc.pl_ext_stacking_from_aux_flag_subc, 2), - (subc.pl_the_2nd_ext_flag_subc, 1), - ) - - class TestExtendingAuxCmds(Common): - cmd = CLIShared.aux.ns.dummy_cmds.dummy_cmd.extend( - CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["exts"], - from_configs=[ - CLIShared.exts.exts_workout_cfg, - CLIShared.exts.pl_ext_stacking_from_aux_cfg - ], - with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] - ) - subc = CLIShared.aux.ns.dummy_cmds.dummy_cmd.subc.extend( - CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd.subc"]["exts"], - from_configs=[ - CLIShared.exts.exts_workout_cfg, - CLIShared.exts.pl_ext_stacking_from_aux_cfg - ], - with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] - ) - - @property - def na(self): - return "no_action" - - def test_extending_aux_cmd_help_msg(self): - cmd = self.cmd - help = cmd.get_help_msg() - help.assert_args(cmd.action_arg) - help.assert_opts( - cmd.exts_workout_action, - cmd.exts_workout_flag, - "help", - cmd.pl_ext_stacking_from_aux_action, - cmd.pl_ext_stacking_from_aux_flag, - cmd.python_plugin_action, - cmd.python_plugin_flag, - cmd.python_plugin_the_second_action, - cmd.python_plugin_the_second_flag, - "v", - "vk", - ) - help.assert_subcmds("help", cmd.subc) - - assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] - assert help.pl_exts == ['python_plugin', 'python_plugin_the_second'] - assert help.app_exts == False - - def test_extending_aux_cmd(self): - cmd = self.cmd - out = cmd.run( - self.na, - cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), - cmd.python_plugin_the_second_flag.ln_to_cli(), - cmd.python_plugin_flag.ln_to_cli(), - ) - cmd.assert_args( - out, - (cmd.action_arg, [self.na]), - (cmd.exts_workout_action, None), - (cmd.pl_ext_stacking_from_aux_flag, 2), - (cmd.python_plugin_the_second_flag, 1), - (cmd.python_plugin_flag, 1), - ) - - def test_manipulating_args_from_aux_exts(self): - cmd = self.cmd - actions = [ - "inc_flag__aux_ext__pl_ext_stacking_from_aux_flag", - "inc_flag__plugin_ext__python_plugin_the_second_flag", - "set_flag__plugin_ext__python_plugin_flag" - ] - out = cmd.run( - self.na, - cmd.exts_workout_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), - cmd.python_plugin_the_second_flag.ln_to_cli(), - ) - print(out) - cmd.assert_args( - out, - (cmd.action_arg, [self.na]), - (cmd.exts_workout_action, actions), - (cmd.python_plugin_flag, -1), - (cmd.pl_ext_stacking_from_aux_flag, 3, {"Before": 2}), - (cmd.python_plugin_the_second_flag, 2), - ) - - def test_extending_aux_cmd_help_msg_subc(self): - cmd = self.subc - help = cmd.get_help_msg() - help.assert_args(cmd.action_arg) - help.assert_opts( - cmd.exts_workout_action, - cmd.exts_workout_flag_subc, - cmd.flag_opt, - "help", - cmd.pl_ext_stacking_from_aux_action_subc, - cmd.pl_ext_stacking_from_aux_flag_subc, - cmd.python_plugin_action_subc, - cmd.python_plugin_flag_subc, - cmd.python_plugin_the_second_action_subc, - cmd.python_plugin_the_second_flag_subc, - "v", - "vk", - ) - help.assert_subcmds(None) - - assert help.aux_exts == ['pl_ext_stacking_from_aux', 'exts_workout'] - assert help.pl_exts == ['python_plugin', 'python_plugin_the_second'] - assert help.app_exts == False - - def test_extending_aux_subcmd(self): - cmd = self.subc - actions = ["no_action"] - out = cmd.run( - self.na, - cmd.flag_opt.ln_to_cli(), - cmd.exts_workout_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), - cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), - cmd.python_plugin_the_second_flag_subc.ln_to_cli(), - cmd.python_plugin_flag_subc.ln_to_cli(), - ) - print(out) - cmd.assert_args( - out, - (cmd.action_arg, [self.na]), - (cmd.flag_opt, 1), - (cmd.exts_workout_action, actions), - (cmd.exts_workout_flag_subc, None), - (cmd.pl_ext_stacking_from_aux_flag_subc, 2), - (cmd.python_plugin_the_second_flag_subc, 1), - (cmd.python_plugin_flag_subc, 1), - ) - - def test_manipulating_args_from_aux_subcmd(self): - cmd = self.subc - actions = [ - "inc_flag__cmd__flag_opt", - "inc_multi_arg__cmd__action_arg__updated", - "inc_flag__aux_ext__pl_ext_stacking_from_aux_flag_subc", - "inc_flag__plugin_ext__python_plugin_the_second_flag_subc", - "inc_flag__plugin_ext__python_plugin_flag_subc" - ] - out = cmd.run( - self.na, - cmd.flag_opt.ln_to_cli(), - cmd.exts_workout_action.ln_to_cli(), *actions, - cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), - cmd.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), - cmd.python_plugin_the_second_flag_subc.ln_to_cli(), - cmd.python_plugin_flag_subc.ln_to_cli(), - ) - print(out) - cmd.assert_args( - out, - (cmd.action_arg, ["updated"]), - (cmd.flag_opt, 2), - (cmd.exts_workout_action, actions), - (cmd.exts_workout_flag_subc, None), - (cmd.pl_ext_stacking_from_aux_flag_subc, 3, {"Before": 2}), - (cmd.python_plugin_the_second_flag_subc, 2), - (cmd.python_plugin_flag_subc, 2), - ) - - @pytest.mark.skip - def test_hidden_exts_full_name(self): - fail - - # @pytest.mark.parameterize() - def test_extending_origen_cmd_from_plugin(self): - ''' Test each global command is extendable''' - cmd = self.global_cmds.eval - cmd = cmd.extend( - CLIShared.exts.exts["generic_core_ext"]["exts"], - from_configs=[CLIShared.exts.core_cmd_exts_cfg] - ) - - help = cmd.get_help_msg() - help.assert_args(cmd.code) - help.assert_opts( - cmd.core_cmd_exts_generic_core_ext, - "help", - cmd.pl_ext_cmds_generic_ext, - "v", - "vk", - ) - help.assert_subcmds(None) - assert help.aux_exts == ['core_cmd_exts'] - assert help.pl_exts == ['pl_ext_cmds'] - assert help.app_exts == False - - d = cmd.global_demo("minimal") - out = d.run(add_args=[ - cmd.core_cmd_exts_generic_core_ext.ln_to_cli(), - cmd.pl_ext_cmds_generic_ext.ln_to_cli(), - cmd.pl_ext_cmds_generic_ext.ln_to_cli(), - ]) - d.assert_present(out) - cmd.core_cmd_exts_generic_core_ext.assert_present(1, out) - cmd.pl_ext_cmds_generic_ext.assert_present(2, out) - @pytest.mark.skip def test_extending_pl_cmd_from_aux_cmds(self): fail @@ -677,17 +79,6 @@ def test_exception_in_on_load(self): def test_exception_during_mod_load(self): fail - @pytest.mark.skip - class TestConflictingExtensions(): - def test_conflicts_in_core_cmd(self): - fail - - def test_conflicts_in_aux_cmd(self): - fail - - def test_conflicts_in_pl_cmd(self): - fail - @pytest.mark.skip def test_extending_origen_cmd_from_global_context_only(self): fail diff --git a/test_apps/python_no_app/tests/test_cmd_building.py b/test_apps/python_no_app/tests/test_cmd_building.py index e3f92091..80e2d739 100644 --- a/test_apps/python_no_app/tests/test_cmd_building.py +++ b/test_apps/python_no_app/tests/test_cmd_building.py @@ -4,6 +4,7 @@ from .cmd_building.tests__opt_building import T_OptBuilding from .cmd_building.tests__loading_aux_cmds import T_LoadingAuxCommands from .cmd_building.tests__loading_plugin_cmds import T_LoadingPluginCmds +from .cmd_building.tests__intra_cmd_conflicts import T_IntraCmdConflicts class TestLoadingAuxCommands(T_LoadingAuxCommands): pass @@ -18,4 +19,7 @@ class TestOptBuilding(T_OptBuilding): pass class TestLoadingPluginCmds(T_LoadingPluginCmds): - pass \ No newline at end of file + pass + +class TestIntraCmdConflicts(T_IntraCmdConflicts): + pass diff --git a/test_apps/python_no_app/tests/test_cmd_exts.py b/test_apps/python_no_app/tests/test_cmd_exts.py new file mode 100644 index 00000000..088ab57a --- /dev/null +++ b/test_apps/python_no_app/tests/test_cmd_exts.py @@ -0,0 +1,8 @@ +from .cmd_exts.tests__extending_cmds import T_ExtendingCmds +from .cmd_exts.tests__ext_conflicts import T_ExtConflicts + +class TestExtendingCmds(T_ExtendingCmds): + pass + +class TestExtConflicts(T_ExtConflicts): + pass diff --git a/test_apps/python_plugin/python_plugin/commands.toml b/test_apps/python_plugin/python_plugin/commands.toml index b587d807..e3611aaf 100644 --- a/test_apps/python_plugin/python_plugin/commands.toml +++ b/test_apps/python_plugin/python_plugin/commands.toml @@ -49,6 +49,17 @@ help = "Test command for a plugin" help = "Flag Opt" long = "flag" + [[command.opt]] + name = "sn_only" + help = "Opt with short name only" + short = "n" + + [[command.opt]] + name = "opt_with_aliases" + help = "Opt with aliases" + long_aliases = ["alias", "opt_alias"] + short_aliases = ["a", "b"] + [[command.subcommand]] name = "subc" help = "Test Subcommand for plugin_test_args" @@ -61,6 +72,18 @@ help = "Test command for a plugin" name = "flag_opt" help = "Flag Opt For Subcommand" + [[command.subcommand.opt]] + name = "subc_sn_only" + help = "Opt with short name only for subc" + short = "n" + + [[command.subcommand.opt]] + name = "subc_opt_with_aliases" + help = "Opt with aliases for subc" + long = "subc_opt" + long_aliases = ["subc_alias", "subc_opt_alias"] + short_aliases = ["a", "b"] + [[command]] name = "plugin_test_ext_stacking" help = "Test ext stacking for plugin command" @@ -151,6 +174,138 @@ in_global_context = false add_target_opt = true add_mode_opt = true +[[command]] +name = "intra_cmd_conflicts" +help = "PL cmd with conflicting args and opts within the cmd" +on_env=["ORIGEN_PL_INTRA_CMD_CONFLICTS"] + + [[command.arg]] + name = "arg0" + help = "Arg 0" + + [[command.arg]] + name = "arg0" + help = "Duplicate: Arg 0" + + [[command.arg]] + name = "arg1" + help = "Arg 1" + + [[command.arg]] + name = "arg2" + help = "Arg 2" + + [[command.arg]] + name = "arg1" + help = "Duplicate: Arg 1" + + [[command.arg]] + name = "ext_opt.arg" + help = "Arg with reserved prefix" + + [[command.opt]] + name = "opt" + help = "Opt 0" + long_aliases=["opt0"] + + [[command.opt]] + name = "opt" + help = "Duplicate: Opt 0" + + [[command.opt]] + name = "ext_opt.opt" + help = "Reserved Prefix" + + [[command.opt]] + name = "arg0" + help = "Arg-Opt clash" + + [[command.opt]] + name = "arg_clash" + help = "Arg-Opt clash in ln/lna (okay)" + long = "arg0" + long_aliases = ["arg1"] + + [[command.opt]] + name= "reserved_prefix_in_ln_lna" + help = "Reserved prefix in ln and lna" + long = "ext_opt.ln" + long_aliases = ["ext_opt.lna", "ext_opt_lna"] + + [[command.opt]] + name= "intra_opt_conflicts" + help = "Various intra-opt conflicts" + long = "intra_opt_cons" + short = "c" + long_aliases = ["intra_opt_conflicts", "intra_opt_cons", "intra_opt_cons2", "intra_opt_cons2"] + short_aliases = ["a", "b", "c", "b", "c", "e", "e"] + + [[command.opt]] + name= "inter_opt_conflicts" + help = "Various inter-opt conflicts" + long = "intra_opt_conflicts" + short = "a" + long_aliases = ["intra_opt_cons", "ext_opt_lna", "reserved_prefix_in_ln_lna"] + short_aliases = ["b", "c", "d"] + + [[command.opt]] + name = "opt0" + help = "Inferred long name clash" + + [[command.subcommand]] + name = "conflicts_subc" + help = "Subcommand with conflicts" + + [[command.subcommand.arg]] + name = "arg0" + help = "Arg 0" + + [[command.subcommand.arg]] + name = "sub_arg_1" + help = "Subc Arg 1" + + [[command.subcommand.arg]] + name = "sub_arg_1" + help = "Duplicate" + + [[command.subcommand.arg]] + name = "ext_opt.subc_arg" + help = "Arg with reserved prefix" + + [[command.subcommand.opt]] + name = "ext_opt.subc_opt" + help = "Reserved opt prefix" + short = "r" + + [[command.subcommand.opt]] + name = "opt" + help = "Opt 0" + long_aliases=["subc_opt", "ext_opt.subc_opt_lna"] + + [[command.subcommand.opt]] + name = "intra_subc_conflicts" + help = "Intra-opt conflicts for subc" + long = "intra_subc_conflicts" + short = "r" + long_aliases=["intra_subc_conflicts"] + short_aliases=["r"] + + [[command.subcommand.opt]] + name = "intra_subc_lna_iln_conflict" + help = "Intra-opt iln conflict" + long_aliases=["intra_subc_lna_iln_conflict"] + + [[command.subcommand.opt]] + name = "inter_subc_conflicts" + help = "Inter-opt conflicts for subc" + long = "opt" + long_aliases=["intra_subc_conflicts"] + short_aliases=["r"] + + [[command.subcommand.opt]] + name = "intra_subc_conflicts" + help = "Duplicate Opt" + # TODO add this and test # FOR_PR # [[extension]] @@ -174,12 +329,12 @@ in_global_context = false [[extension.opt]] name = "say_hi_before_eval" short = "b" - help = "Have the plugin say hi before evaluating" + help = "Have the plugin say hi before evaluating (global)" [[extension.opt]] name = "say_hi_after_eval" short = "a" - help = "Have the plugin say hi after evaluating" + help = "Have the plugin say hi after evaluating (global)" # FOR_PR swap these for actions? # Or is this even used? @@ -209,11 +364,6 @@ in_global_context = false name = "say_hi_during_cleanup" help = "Have the plugin say hi during cleanup" -# FOR_PR -# [[extension]] -# # Extend an application's 'playground' commmand -# extend = "app.playground" - [[extension]] extend = "aux.dummy_cmds.dummy_cmd" on_env = ["ORIGEN_DUMMY_AUX_CMDS"] @@ -255,3 +405,71 @@ on_env = ["ORIGEN_DUMMY_AUX_CMDS"] # [[extension.opt]] # name = "python_plugin_ext_flag" # help = "Simple extension flag from python plugin" + +[[extension]] +extend = "app.arg_opt_warmup" +on_env = ["ORIGEN_APP_EXT_ARG_OPT_WARMUP"] + + [[extension.opt]] + name = "pypl_single_opt" + help = "Single opt from PYPL" + takes_value = true + + [[extension.opt]] + name = "pypl_multi_opt" + help = "Multi opt from PYPL" + multiple = true + long_aliases=["PYPL"] + + [[extension.opt]] + name = "pypl_hidden" + help = "Hidden opt from PYPL" + long="pypl_h_opt" + short = "p" + hidden = true + +[[extension]] +extend = "app.arg_opt_warmup" +on_env = ["ORIGEN_APP_EXT_CONFLICTS_ARG_OPT_WARMUP"] + + [[extension.opt]] + name = "flag_opt" + help = "Flag opt from Python Plugin" + + [[extension.opt]] + name = "conflicts_from_python_plugin" + help = "Some conflicts from Python Plugin" + long = "single_opt" + short = "m" + long_aliases=["m_opt", "python_plugin_conflicts"] + short_aliases=["a"] + +[[extension]] +extend = "app.nested_app_cmds.nested_l1" +on_env = ["ORIGEN_APP_EXT_NESTED"] + + [[extension.opt]] + name = "pypl_single_opt_shallow" + help = "Single opt from PYPL" + short = "p" + takes_value = true + + [[extension.opt]] + name = "pypl_flag_opt_shallow" + help = "Flag opt from PYPL" + +[[extension]] +extend = "app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a" +on_env = ["ORIGEN_APP_EXT_NESTED"] + + [[extension.opt]] + name = "pypl_single_opt_deep" + help = "Single opt from PYPL" + short = "q" + takes_value = true + + [[extension.opt]] + name = "pypl_flag_opt_deep" + help = "Flag opt from PYPL" + long= "py_f" + short = "f" diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/app.arg_opt_warmup.py b/test_apps/python_plugin/python_plugin/commands/extensions/app.arg_opt_warmup.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/extensions/app.arg_opt_warmup.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py b/test_apps/python_plugin/python_plugin/commands/extensions/app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/extensions/app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/app.nested_app_cmds.nested_l1.py b/test_apps/python_plugin/python_plugin/commands/extensions/app.nested_app_cmds.nested_l1.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/extensions/app.nested_app_cmds.nested_l1.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands/intra_cmd_conflicts.conflicts_subc.py b/test_apps/python_plugin/python_plugin/commands/intra_cmd_conflicts.conflicts_subc.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/intra_cmd_conflicts.conflicts_subc.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_plugin/python_plugin/commands/intra_cmd_conflicts.py b/test_apps/python_plugin/python_plugin/commands/intra_cmd_conflicts.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/intra_cmd_conflicts.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml new file mode 100644 index 00000000..6e4d5795 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml @@ -0,0 +1,215 @@ +# Conflict with core cmd arg name +[[extension]] +extend = "origen.eval" +help = "Conflict with core cmd arg" +on_env=["ORIGEN_EXT_CONFLICTS_CORE_CMD_EVAL"] + + [[extension.opt]] + name = "code" + help = "Conflict with core cmd arg name from AUX" + +[[extension]] +extend = "origen.credentials.clear" +help = "Conflict with core cmd opt from AUX" +on_env=["ORIGEN_EXT_CONFLICTS_CORE_CMD_CREDS_CLEAR"] + + [[extension.opt]] + name = "all" + help = "Conflict with core cmd opt name. Uses full name" + + [[extension.opt]] + name = "cmd_conflicts_aux" + help = "Conflict with core cmd opt from AUX" + long = "all" + short = "a" + long_aliases = ["datasets", "pl_datasets"] + short_aliases = ["d", "e", "f"] + +# FOR_PR +# # Conflict with help opt +# [[extension]] +# extend = "origen.eval" +# help = "Conflict with help arg" +# [[extension.opt]] +# name = "help" +# help = "Conflict with help arg" + +# [[extension]] +# extend = "origen.eval" +# help = "Conflict with help arg" +# [[extension.opt]] +# name = "conflict_sn_help" +# help = "Conflict with help arg" +# short = "h" + +# [[extension]] +# extend = "origen.eval" +# help = "Conflict with help arg" +# [[extension.opt]] +# name = "conflict_help" +# help = "Conflict with help arg" +# short = "g" +# long = "help" + +# [[extension]] +# extend = "origen.eval" +# help = "Conflict with help arg" +# [[extension.opt]] +# name = "conflict_help" +# help = "Conflict with help arg" +# short = "g" +# long = "help1" +# long_aliases = ["help2", "help"] +# short_aliases = ["h", "i"] + +# FOR_PR conflict with v, vk + +# FOR_PR conflict with subcommand + +[[extension]] +extend = "plugin.python_plugin.plugin_test_args" +help = "Conflict with plugin from aux ext" +on_env=["ORIGEN_EXT_CONFLICTS_PL_TEST_ARGS"] + [[extension.opt]] + name = "single_arg" + help = "Conflict with cmd arg" + [[extension.opt]] + name = "opt_taking_value" + help = "Conflict with cmd opt name but long name okay" + long = "otv" + [[extension.opt]] + name = "conflict_sn" + help = "Conflict with cmd opt sn" + short = "n" + [[extension.opt]] + name = "pl_aux_conflict" + help = "plugin-aux conflict (Aux)" + [[extension.opt]] + name = "pl_aux_sn_conflict_aux" + help = "plugin-aux conflict (sn) (Aux)" + short = "s" + [[extension.opt]] + name = "aux_conflict_ln_and_aliases" + help = "Conflict with cmd opt ln and some aliases (Aux)" + long = "alias" + long_aliases = ["opt_alias", "other_alias_pl", "other_alias_aux"] + short_aliases = ["a", "b", "c", "d"] + [[extension.opt]] + name = "flag" + help = "Conflict with inferred long name (Aux)" + [[extension.opt]] + name = "alias" + help = "Conflict with inferred long name with aliases (Aux)" + long_aliases = ["alias_aux"] + [[extension.opt]] + name = "subc" + help = "Conflict with plugin subcommand" + [[extension.opt]] + name = "ns_self_conflict" + help = "Conflict within the namespace" + long = "subc" + short = "d" + [[extension.opt]] + name = "ns_self_conflict" + help = "Conflict within the namespace" + long = "another_self_conflict" + [[extension.opt]] + name = "ext_self_conflict" + help = "Ln conflict within the extension" + long = "ns_self_conflict" + [[extension.opt]] + name = "ext_self_conflict" + help = "Ln conflict within the extension" + [[extension.opt]] + name = "ext_self_conflict_2" + help = "Ilna conflicts within the extension" + long_aliases = ["ext_self_conflict", "ext_self_conflict_2", "ext_self_conflict_2_1"] + # [[extension.opt]] + # FOR_PR + # name = "ext_self_conflict_3" + # help = "Sn and ln conflicts within the extension" + # short = "e" + # long = "ext_self_conflict_3_ln" + # short_aliases = ["e"] + # long_aliases = ["ext_self_conflict_3_ln"] + [[extension.opt]] + name = "ext_opt_in_ln" + help = "Reserved prefix in ln" + long = "ext_opt.in_ln" + [[extension.opt]] + name = "ext_opt_in_lna" + help = "Reserved prefix in lna" + long_aliases = ["ext_opt_in_lna_2", "ext_opt.in_lna"] + [[extension.opt]] + name = "ext_opt.reserved_name" + help = "Conflict with reserved name" + long = "reserved_name" + [[extension.opt]] + name = "same_ln_and_ln_alias" + help = "Same ln and lna" + long = "same_ln_and_ln_alias" + long_aliases = ["same_ln_and_ln_alias"] + [[extension.opt]] + name = "same_iln_and_ln_alias" + help = "Same inferred ln and lna" + long_aliases = ["same_iln_and_ln_alias"] + [[extension.opt]] + name = "repeated_sn_and_aliases" + help = "Repeated sna and lna, with sn conflict" + short = "g" + long_aliases = ["repeated_lna", "repeated_lna", "repeated_lna_2"] + short_aliases = ["g", "e", "e", "e"] + +[[extension]] +extend = "plugin.python_plugin.plugin_test_args.subc" +on_env=["ORIGEN_EXT_CONFLICTS_PL_TEST_ARGS_SUBC"] + [[extension.opt]] + name = "subc_pl_aux_conflict" + help = "plugin-aux conflict (AUX)" + long = "subc_pl_aux" + sn = "c" + long_aliases = ["pl0", "aux0", "subc_pl_aux"] + short_aliases = ["a", "e", "b"] + [[extension.opt]] + name = "subc_pl_aux_conflict" + help = "plugin-aux conflict" + [[extension.opt]] + name = "flag_opt" + help = "Conflict with inferred long name (AUX)" + [[extension.opt]] + name = "more_conflicts" + help = "More conflicts (AUX)" + long_aliases = ["more_conflicts", "subc_opt"] + short_aliases = ["d", "n"] + +[[extension]] +extend = "plugin.python_plugin.plugin_test_args" +on_env = ["ORIGEN_APP_PL_CMD_CONFLICTS"] + + [[extension.opt]] + name = "ec_opt" + help = "Opt from EC" + long = "ec" + short = "e" + long_aliases = ["e_opt"] + short_aliases = ["a", "b", "c", "d"] + + [[extension.opt]] + name = "tas_iln" + short = "n" + long_aliases = ["t_opt"] + help = "More conflicts" + +[[extension]] +extend = "app.arg_opt_warmup" +on_env = ["ORIGEN_APP_EXT_CONFLICTS_ARG_OPT_WARMUP"] + + [[extension.opt]] + name = "flag_opt" + help = "Conflict with flag opt from ext_conflicts AUX" + + [[extension.opt]] + name = "conflicts_from_ext_conflicts" + help = "Some conflicts from ext_conflicts AUX" + long_aliases=["python_plugin_conflicts", "TAS", "EX_Conflicts", "hidden"] + short_aliases=["a", "b", "c"] \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/app.arg_opt_warmup.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/app.arg_opt_warmup.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/app.arg_opt_warmup.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/plugin.python_plugin.plugin_test_args.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/plugin.python_plugin.plugin_test_args.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/plugin.python_plugin.plugin_test_args.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/plugin.python_plugin.plugin_test_args.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/plugin.python_plugin.plugin_test_args.subc.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts/plugin.python_plugin.plugin_test_args.subc.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts_cfg.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts_cfg.toml new file mode 100644 index 00000000..f3297831 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts_cfg.toml @@ -0,0 +1,9 @@ +[[auxillary_commands]] +path = "./ext_conflicts.toml" + +[plugins] +collect = false +load = [ + { name = "python_plugin" }, + { name = "test_apps_shared_test_helpers"} +] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.py deleted file mode 100644 index 8205a541..00000000 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.py +++ /dev/null @@ -1,103 +0,0 @@ -import origen -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str -from test_apps_shared_test_helpers.cli import before_cmd_ext_args_str -from test_apps_shared_test_helpers.cli import clean_up_ext_args_str -# from test_apps_shared_test_helpers.cli import ExtensionDrivers -# def ext_out() -from origen.boot import before_cmd, after_cmd, clean_up - -req_opt = "action_opt" - -class aux: - class exts_workout: - class plugin_test_args: - @classmethod - def do_action(cls, actions, phase): - if actions: - for action in actions: - print(f"Start Action {phase} CMD: {action}") - if action == "show_cmd_args": - print(origen.current_command.args) - if action == "show_ext_args": - print({ext_name: ext.args for ext_name, ext in origen.current_command.exts.items()}) - # print(f"{ext_name} args: {ext.args}") - # print(origen.current_command.exts["exts_workout"].args) - if action == "update_cmd_args": - if phase == "Before": - origen.command.args["single_arg"] = "updated" - if action == "clear_cmd_args": - origen.command.args["single_val"] = None - if action == "before_cmd_exception": - raise RuntimeError("'before_cmd_exception' encountered!") - if action == "update_ext_workout_args": - if phase == "Before": - args = origen.current_command.exts["aux.exts_workout"].args - # Increment the counter - args["flag_extension"] += 1 - - # Append to a multi-arg - args["multi_val_opt"].append("update_mv_opt") - - # Overwrite an arg - args["single_val_opt"] = "update_sv_opt" - - # Set a new arg - args["new_arg"] = "new_arg_for_ext" - if action == "show_exts": - fail - if action == "update_aux_ext": - fail - if action == "current_command_BIST": - fail - print(f"End Action {phase} CMD: {action}") - - @before_cmd - @classmethod - def before_cmd(cls, **args): - print(before_cmd_ext_args_str(args)) - # if args[ext_req.name] == "update_args": - # ... - action = args.get(req_opt, None) - if action: - cls.do_action(action, "Before") - - # # origen.current_command.args['input'] = ["hijack!"] - # print("before!!") - # args.pop("flag_extension") - # return args - - @classmethod - def after_cmd(cls, **args): - print(after_cmd_ext_args_str(args)) - action = args.get(req_opt, None) - if action: - cls.do_action(action, "After") - - @classmethod - def clean_up(cls, **args): - print(clean_up_ext_args_str(args)) - action = args.get(req_opt, None) - if action: - cls.do_action(action, "CleanUp") - - class subc: - @classmethod - def before_cmd(**args): - print(before_cmd_ext_args_str(args)) - - class plugin_test_ext_stacking: - pass - # @before_cmd - # @classmethod - # def print_args_before(cls, **args): - # print(before_cmd_ext_args_str(args)) - - # @after_cmd - # @classmethod - # def print_args_after(cls, **args): - # print(after_cmd_ext_args_str(args)) - - # @clean_up - # @classmethod - # def print_args_clean(cls, **args): - # print(clean_up_ext_args_str(args)) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py index bdbd3813..ea75e7b6 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py @@ -42,13 +42,6 @@ def do_action(actions, phase): # origen.current_command.exts["aux.exts_workout"].args["flag_extension"] += 1 origen.current_command.exts["aux.pl_ext_stacking_from_aux"].args["pl_ext_stacking_from_aux_flag"] += 1 origen.current_command.exts["plugin.python_plugin_the_second"].args["pl_the_2nd_ext_flag"] += 1 - - if action == "show_exts": - fail - if action == "update_aux_ext": - fail - if action == "current_command_BIST": - fail print(f"End Action {phase} CMD: {action}") action_opt = "ext_action" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts.toml new file mode 100644 index 00000000..62665494 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts.toml @@ -0,0 +1,43 @@ +[[extension]] +extend = "app.arg_opt_warmup" + [[extension.opt]] + name = "ec_single_opt" + help = "Single opt from EC" + takes_value = true + [[extension.opt]] + name = "ec_multi_opt" + help = "Multi opt from EC" + long = "ec_multi_opt" + short = "e" + long_aliases=["ec_multi", "EC"] + multiple=true + [[extension.opt]] + name = "ec_hidden" + long = "ec_h_opt" + help = "Hidden opt from EC" + hidden = true + +[[extension]] +extend = "app.nested_app_cmds.nested_l1" + [[extension.opt]] + name = "ec_single_opt_shallow" + help = "Single opt from EC" + takes_value = true + [[extension.opt]] + name = "ec_flag_opt_shallow" + help = "Flag opt from EC" + long= "ec_f" + +[[extension]] +extend = "app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a" + [[extension.opt]] + name = "ec_single_opt_deep" + help = "Single opt from EC" + long = "ec_opt" + long_aliases = ["ec_deep"] + takes_value = true + [[extension.opt]] + name = "ec_flag_opt_deep" + help = "Flag opt from EC" + long= "ec_df" + short = "c" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.arg_opt_warmup.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.arg_opt_warmup.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.arg_opt_warmup.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.nested_app_cmds.nested_l1.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.nested_app_cmds.nested_l1.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts/app.nested_app_cmds.nested_l1.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts_cfg.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts_cfg.toml new file mode 100644 index 00000000..fc3f2923 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/python_app_exts_cfg.toml @@ -0,0 +1,9 @@ +[[auxillary_commands]] +path = "./python_app_exts.toml" + +[plugins] +collect = false +load = [ + { name = "python_plugin" }, + { name = "test_apps_shared_test_helpers"} +] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index d3505855..f9a476f7 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -32,7 +32,7 @@ def clean(**args): clean_up(mod.clean) def get_ext_name(frame=None): - split = re.split(r"/plugin\.|/plugin/|/aux_ns\.|/aux_ns/|/core\.|/core/", str(PurePosixPath(calling_filename(frame or 3)))) + split = re.split(r"/plugin\.|/plugin/|/aux_ns\.|/aux_ns/|/core\.|/core/|/app\.|/app/", str(PurePosixPath(calling_filename(frame or 3)))) if len(split) > 2: ext_name = split[-2] else: @@ -88,12 +88,131 @@ def cmd(self): "echo": (pln__python_plugin, "echo"), } - exts = ExtensionDrivers() plugins = Plugins() aux = Aux() + exts = ExtensionDrivers() + exts.init_conflicts(plugins, aux) python_plugin = plugins.python_plugin cmd_testers = aux.namespaces.cmd_testers cmd_testers_cmd = cmd_testers.cmd_testers - configs = Configs() \ No newline at end of file + configs = Configs() + + # FOR_PR see about moving this into Origen + @classmethod + def to_conflict_msg(cls, cmd, conflict): + if not isinstance(conflict[0], str): + cmd = conflict[0] + conflict = conflict[1:] + + type = conflict[0] + def tname(t, cap=False): + if t in ["lna", "repeated_lna"]: + n = "long name alias" + elif t == "ln": + n = "long name" + elif t == "iln": + n = "inferred long name" + elif t in ["sna", "repeated_sna"]: + n = "short name alias" + elif t == "sn": + n = "short name" + else: + raise RuntimeError(f"Cannot get conflict name from conflict type {t}") + if cap: + n = n.capitalize() + return n + + prefix = f"When processing command '{cmd.full_name}':" + if type in ["lna", "ln", "sna", "sn", "iln"]: + with_type = conflict[1] + offender_opt = conflict[2] + with_opt = conflict[3] + if type == "iln": + if not isinstance(offender_opt, str): + c = offender_opt.name + else: + c = offender_opt + else: + c = conflict[4] + if with_opt is None: + with_opt = offender_opt + + if (not isinstance(offender_opt, str)) and offender_opt.is_ext: + if with_opt.is_ext: + msg = f"{tname(type, True)} '{c}' for extension option '{offender_opt.name}', from {offender_opt.displayed}, conflicts with {tname(with_type, False)} for extension '{with_opt.name}' provided by {with_opt.displayed}" + else: + msg = f"{tname(type, True)} '{c}' for extension option '{offender_opt.name}', from {offender_opt.displayed}, conflicts with {tname(with_type, False)} from command option '{with_opt.name}'" + else: + if not isinstance(offender_opt, str): + offender_opt = offender_opt.name + msg = f"{tname(type, True)} '{c}' for command option '{offender_opt}' conflicts with {tname(with_type, False)} from option '{with_opt.name}'" + elif type in ["inter_ext_sna_sn", "inter_ext_lna_ln", "inter_ext_lna_iln"]: + offending_opt = conflict[1] + if type == "inter_ext_sna_sn": + type = "sna" + with_type = "sn" + name = conflict[2] + elif type == "inter_ext_lna_ln": + type = "lna" + with_type = "ln" + name = conflict[2] + elif "inter_ext_lna_iln": + type = "lna" + with_type = "iln" + name = offending_opt.name + if offending_opt.is_ext: + msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} specifies {tname(type, False)} '{name}' but it conflicts with the option's {tname(with_type, False)}" + else: + msg = f"Option '{offending_opt.name}' specifies {tname(type, False)} '{name}' but it conflicts with the option's {tname(with_type, False)}" + elif type in ["repeated_sna", "repeated_lna"]: + offending_opt = conflict[1] + if offending_opt.is_ext: + offending_src = f"extended from {conflict[1].displayed} " + else: + offending_src = '' + name = conflict[2] + index = conflict[3] + msg = f"Option '{offending_opt.name}' {offending_src}repeats {tname(type, False)} '{name}' (first occurrence at index {index})" + elif type == "reserved_prefix_arg_name": + offending_arg = conflict[1] + msg = f"Argument '{offending_arg}' uses reserved prefix 'ext_opt'. This option will not be available" + elif type == "reserved_prefix_opt_name": + offending_opt = conflict[1] + offending_src = conflict[2] + if offending_src is None: + msg = f"Option '{offending_opt}' uses reserved prefix 'ext_opt'. This option will not be available" + else: + msg = f"Option '{offending_opt}' extended from {offending_src} uses reserved prefix 'ext_opt'. This option will not be available" + elif type in ["reserved_prefix_ln", "reserved_prefix_lna"]: + offending_opt = conflict[1] + name = conflict[2] + if type == "reserved_prefix_ln": + type = "ln" + elif type == "reserved_prefix_lna": + type = "lna" + if offending_opt.is_ext: + msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} uses reserved prefix 'ext_opt' in {tname(type, False)} '{name}' and will not be available as '--{name}'" + else: + msg = f"Option '{offending_opt.name}' uses reserved prefix 'ext_opt' in {tname(type, False)} '{name}' and will not be available as '--{name}'" + elif type == "self_lna_iln": + offending_opt = conflict[1] + msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} specifies long name alias '{offending_opt.name}' but it conflicts with the option's inferred long name. If this is intentional, please set this as the option's long name" + elif type == "duplicate": + offending_opt = conflict[1] + index = conflict[2] + if offending_opt.is_ext: + msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" + elif offending_opt.is_arg: + msg = f"Argument '{offending_opt.name}' is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" + else: + msg = f"Option '{offending_opt.name}' is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" + elif type == "intra_cmd_not_placed": + msg = f"Unable to place unique long name, short name, or inferred long name for command option '{conflict[1]}'. Please resolve any previous conflicts regarding this option or add/update this option's name, long name, or short name" + elif type == "arg_opt_name_conflict": + msg = f"Option '{conflict[1].name}' conflicts with Arg of the same name (Arg #{conflict[2]})" + else: + raise RuntimeError(f"Unrecognized conflict type {conflict[0]}") + msg = f"{prefix} {msg}" + return msg \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py index d4a28a86..c4478200 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py @@ -1,7 +1,7 @@ from origen.helpers.regressions import cli class Cmd(cli.cmd.Cmd): - def assert_args(self, output, *vals): + def assert_args(self, output, *vals, finalize_ext_args=None): ext_args = {} args = [] exp_ext_vals = {} @@ -74,6 +74,8 @@ def assert_args(self, output, *vals): actual = Cmd.parse_ext_keys(output) print(actual) print(ext_args) + if finalize_ext_args: + finalize_ext_args(ext_args) assert actual == ext_args @classmethod diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py index 223ecf5e..84a1d0d6 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py @@ -419,6 +419,8 @@ class PythonAppAuxCmds(cli.CLI): def __init__(self): self.name = "python_app_aux_cmds" self.config_toml = aux_cmds_dir.joinpath(f"{self.name}_cfg.toml") + self.exts_cfg = aux_cmds_dir.joinpath("python_app_exts_cfg.toml") + self.ext_conflicts_cfg = aux_cmds_dir.joinpath("python_app_ext_conflicts_cfg.toml") self.disabling_app_opts_from_aux = self.aux_sub_cmd( self.name, "disabling_app_opts_from_aux", @@ -468,3 +470,4 @@ def __init__(self) -> None: class Aux: namespaces = AuxNamespaces() ns = namespaces + aux_cmds_dir = aux_cmds_dir \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py index 610fabb7..054f160a 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py @@ -1,6 +1,14 @@ from origen.helpers.regressions import cli from . import CmdExtOpt from .auxs import aux_cmds_dir +from types import SimpleNamespace + +# FOR_PR refactor without these +def ext_conflicts_exts(exts): + return SimpleNamespace(**dict((e.name, e) for e in filter(lambda e: e.src_name == "ext_conflicts", exts))) + +def test_apps_shared_exts(exts): + return SimpleNamespace(**dict((e.name, e) for e in filter(lambda e: e.src_name == "test_apps_shared_test_helpers", exts))) class ExtensionDrivers: exts_workout_cfg = aux_cmds_dir.joinpath("exts_workout_cfg.toml") @@ -25,9 +33,38 @@ class ExtensionDrivers: ), ) + @classmethod + def partition_exts(cls, exts): + tas = {} + ec = {} + pypl = {} + app = {} + other = [] + for e in exts: + n = e.name + if e.src_name == "test_apps_shared_test_helpers": + tas[n] = e + elif e.src_name == "ext_conflicts": + ec[n] = e + elif e.src_name == "python_plugin": + pypl[n] = e + elif e.src_type == cli.cmd.SrcTypes.APP: + app[n] = e + else: + other.append(e) + + partitioned = SimpleNamespace(**{ + "tas": SimpleNamespace(**tas), + "ec": SimpleNamespace(**ec), + "pypl": SimpleNamespace(**pypl), + "app": SimpleNamespace(**app), + "_other_": other + }) + return partitioned + exts = { - "core.eval": { - "exts": [ + "origen.eval": { + "global_exts": [ *CmdExtOpt.from_src( "exts_workout", cli.cmd.SrcTypes.AUX, @@ -43,11 +80,13 @@ class ExtensionDrivers: cli.cmd.SrcTypes.PLUGIN, CmdExtOpt( "say_hi_before_eval", - help="Have the plugin say hi before evaluating (app)", + help="Have the plugin say hi before evaluating (global)", + sn="b", ), CmdExtOpt( "say_hi_after_eval", - help="Have the plugin say hi after evaluating (app)", + help="Have the plugin say hi after evaluating (global)", + sn="a", ), CmdExtOpt( "say_hi_during_cleanup", @@ -333,4 +372,339 @@ class ExtensionDrivers: ), ] } - } \ No newline at end of file + } + + ext_conflicts = { + "plugin.python_plugin.plugin_test_args": { + "exts": [ + *CmdExtOpt.from_src( + "ext_conflicts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "single_arg", + help="Conflict with cmd arg", + ), + CmdExtOpt( + "opt_taking_value", + help="Conflict with cmd opt name but long name okay", + ln="otv", + ), + CmdExtOpt( + "conflict_sn", + help="Conflict with cmd opt sn", + ), + CmdExtOpt( + "pl_aux_conflict", + help="plugin-aux conflict (Aux)", + access_with_full_name=True, + ), + CmdExtOpt( + "pl_aux_sn_conflict_aux", + help="plugin-aux conflict (sn) (Aux)", + ), + CmdExtOpt( + "aux_conflict_ln_and_aliases", + help="Conflict with cmd opt ln and some aliases (Aux)", + ln_aliases=["other_alias_aux"], + sn_aliases=["d"], + ), + CmdExtOpt( + "flag", + help="Conflict with inferred long name (Aux)", + access_with_full_name=True, + ), + CmdExtOpt( + "alias", + help="Conflict with inferred long name with aliases (Aux)", + ln_aliases=["alias_aux"], + access_with_full_name=True, + ), + CmdExtOpt( + "subc", + help="Conflict with plugin subcommand" + ), + CmdExtOpt( + "ns_self_conflict", + help="Conflict within the namespace", + ), + CmdExtOpt( + "ext_self_conflict", + help="Ln conflict within the extension", + ), + CmdExtOpt( + "ext_self_conflict_2", + help="Ilna conflicts within the extension", + ln_aliases = ["ext_self_conflict_2_1"], + ), + CmdExtOpt( + "ext_opt_in_ln", + help="Reserved prefix in ln", + ), + CmdExtOpt( + "ext_opt_in_lna", + help="Reserved prefix in lna", + ln_aliases = ["ext_opt_in_lna_2"], + ), + CmdExtOpt( + "same_ln_and_ln_alias", + help="Same ln and lna", + ), + CmdExtOpt( + "same_iln_and_ln_alias", + help="Same inferred ln and lna", + ), + CmdExtOpt( + "repeated_sn_and_aliases", + help="Repeated sna and lna, with sn conflict", + sn="g", + ln_aliases=["repeated_lna", "repeated_lna_2"], + sn_aliases=["e"], + ), + ), + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "pl_aux_conflict", + help="plugin-aux conflict (PL)" + ), + CmdExtOpt( + "pl_aux_sn_conflict_pl", + help="plugin-aux conflict (sn) (PL)", + sn="s", + ), + CmdExtOpt( + "opt_taking_value", + help="Conflict with cmd opt (PL)", + ), + CmdExtOpt( + "pl_conflict_ln_and_aliases", + help="Conflict with cmd opt ln and some aliases (PL)", + ln_aliases=["other_alias_pl"], + sn_aliases=["c"] + ), + CmdExtOpt( + "flag", + help="Conflict with inferred long name (PL)", + access_with_full_name=True, + ), + ) + ], + "env": {"ORIGEN_EXT_CONFLICTS_PL_TEST_ARGS": "1"}, + "cfg": aux_cmds_dir.joinpath("ext_conflicts_cfg.toml"), + }, + "plugin.python_plugin.plugin_test_args.subc": { + "exts": [ + *CmdExtOpt.from_src( + "ext_conflicts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "subc_pl_aux_conflict", + help="plugin-aux conflict (AUX)", + ln_aliases=["aux0"], + sn_aliases=["e"], + ), + CmdExtOpt( + "flag_opt", + help="Conflict with inferred long name (AUX)", + access_with_full_name=True, + ), + CmdExtOpt( + "more_conflicts", + help="More conflicts (AUX)", + access_with_full_name=True, + ), + ), + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "subc_pl_aux_conflict", + help="plugin-aux conflict (PL)", + ln="subc_pl_aux", + sn="c", + ln_aliases=["pl0", "pl1"], + ), + CmdExtOpt( + "flag_opt", + help="Conflict with inferred long name (PL)", + access_with_full_name=True, + ), + CmdExtOpt( + "more_conflicts", + help="More conflicts (PL)", + sn_aliases=["d"], + ), + ) + ], + "env": {"ORIGEN_EXT_CONFLICTS_PL_TEST_ARGS_SUBC": "1"}, + "cfg": aux_cmds_dir.joinpath("ext_conflicts_cfg.toml"), + }, + "origen.eval": { + "exts": [ + *CmdExtOpt.from_src( + "ext_conflicts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "code", + help="Conflict with core cmd arg name from AUX", + access_with_full_name=True, + ) + ), + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "code", + help="Conflict with core cmd arg name from PL", + ) + ), + ], + "env": {"ORIGEN_EXT_CONFLICTS_CORE_CMD_EVAL": "1"}, + "cfg": aux_cmds_dir.joinpath("ext_conflicts_cfg.toml"), + }, + "origen.credentials.clear": { + "exts": [ + *CmdExtOpt.from_src( + "ext_conflicts", + cli.cmd.SrcTypes.AUX, + CmdExtOpt( + "all", + help="Conflict with core cmd opt name. Uses full name", + access_with_full_name=True, + ), + CmdExtOpt( + "cmd_conflicts_aux", + help="Conflict with core cmd opt from AUX", + sn_aliases=["f"], + ), + ), + *CmdExtOpt.from_src( + "test_apps_shared_test_helpers", + cli.cmd.SrcTypes.PLUGIN, + CmdExtOpt( + "all", + help="Conflict with core cmd opt name. Uses full name", + access_with_full_name=True, + ), + CmdExtOpt( + "cmd_conflicts_pl", + help="Conflict with core cmd opt from PL", + ln_aliases=["pl_datasets"], + sn_aliases=["e"], + ), + ) + ], + "env": {"ORIGEN_EXT_CONFLICTS_CORE_CMD_CREDS_CLEAR": "1"}, + "cfg": aux_cmds_dir.joinpath("ext_conflicts_cfg.toml"), + }, + } + + def init_conflicts(self, plugins, aux): + ext_conflicts = self.ext_conflicts + + _cmd_str_ = "plugin.python_plugin.plugin_test_args" + cmd = plugins.python_plugin.plugin_test_args + ext_conflicts[_cmd_str_]["ext_conflicts_exts"] = ext_conflicts_exts(ext_conflicts[_cmd_str_]["exts"]) + aux_exts = ext_conflicts[_cmd_str_]["ext_conflicts_exts"] + ext_conflicts[_cmd_str_]["test_apps_shared_exts"] = test_apps_shared_exts(ext_conflicts[_cmd_str_]["exts"]) + pl_exts = ext_conflicts[_cmd_str_]["test_apps_shared_exts"] + + aux_exts_displayed = aux_exts.ns_self_conflict.displayed + ext_conflicts[_cmd_str_]["conflicts_list"] = [ + ["duplicate", pl_exts.pl_aux_conflict, 0], + ["duplicate", aux_exts.ns_self_conflict, 9], + ["duplicate", aux_exts.ext_self_conflict, 11], + ["self_lna_iln", aux_exts.ext_self_conflict_2], + ["reserved_prefix_ln", aux_exts.ext_opt_in_ln, "ext_opt.in_ln"], + ["reserved_prefix_lna", aux_exts.ext_opt_in_lna, "ext_opt.in_lna"], + ["reserved_prefix_opt_name", "ext_opt.reserved_name", aux_exts_displayed], + ["inter_ext_lna_ln", aux_exts.same_ln_and_ln_alias, "same_ln_and_ln_alias"], + ["inter_ext_lna_iln", aux_exts.same_iln_and_ln_alias], + ["inter_ext_sna_sn", aux_exts.repeated_sn_and_aliases, "g"], + ["repeated_sna", aux_exts.repeated_sn_and_aliases, "e", 1], # Purposefully repeated + ["repeated_sna", aux_exts.repeated_sn_and_aliases, "e", 1], + ["repeated_lna", aux_exts.repeated_sn_and_aliases, "repeated_lna", 0], + ["ln", "lna", pl_exts.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "alias"], + ["sn", "sn", pl_exts.pl_conflict_ln_and_aliases, cmd.sn_only, "n"], + ["lna", "lna", pl_exts.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "opt_alias"], + ["sna", "sna", pl_exts.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "a"], + ["sna", "sna", pl_exts.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "b"], + ["iln", "ln", pl_exts.flag, cmd.flag_opt, "flag"], + ["sn", "sn", aux_exts.conflict_sn, cmd.sn_only, "n"], + ["iln", "iln", aux_exts.pl_aux_conflict, pl_exts.pl_aux_conflict, "pl_aux_conflict"], + ["sn", "sn", aux_exts.pl_aux_sn_conflict_aux, pl_exts.pl_aux_sn_conflict_pl, "s"], + ["ln", "lna", aux_exts.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "alias"], + ["lna", "lna", aux_exts.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "opt_alias"], + ["lna", "lna", aux_exts.aux_conflict_ln_and_aliases, pl_exts.pl_conflict_ln_and_aliases, "other_alias_pl"], + ["sna", "sna", aux_exts.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "a"], + ["sna", "sna", aux_exts.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "b"], + ["sna", "sna", aux_exts.aux_conflict_ln_and_aliases, pl_exts.pl_conflict_ln_and_aliases, "c"], + ["iln", "ln", aux_exts.flag, cmd.flag_opt, 'flag'], + ["iln", "lna", aux_exts.alias, cmd.opt_with_aliases, 'alias'], + ["ln", "iln", aux_exts.ns_self_conflict, aux_exts.subc, "subc"], + ["sn", "sna", aux_exts.ns_self_conflict, aux_exts.aux_conflict_ln_and_aliases, "d"], + ["ln", "iln", aux_exts.ext_self_conflict, aux_exts.ns_self_conflict, "ns_self_conflict"], + ["lna", "iln", aux_exts.ext_self_conflict_2, aux_exts.ext_self_conflict, "ext_self_conflict"], + ] + + _cmd_str_ = "plugin.python_plugin.plugin_test_args.subc" + cmd = plugins.python_plugin.plugin_test_args.subc + ext_conflicts[_cmd_str_]["ext_conflicts_exts"] = ext_conflicts_exts(ext_conflicts[_cmd_str_]["exts"]) + aux_exts = ext_conflicts[_cmd_str_]["ext_conflicts_exts"] + ext_conflicts[_cmd_str_]["test_apps_shared_exts"] = test_apps_shared_exts(ext_conflicts[_cmd_str_]["exts"]) + pl_exts = ext_conflicts[_cmd_str_]["test_apps_shared_exts"] + ext_conflicts[_cmd_str_]["conflicts_list"] = [ + ["reserved_prefix_opt_name", "ext_opt.subc_reserved", pl_exts.subc_pl_aux_conflict.displayed], + ["inter_ext_sna_sn", pl_exts.subc_pl_aux_conflict, "c"], + ["inter_ext_lna_ln", pl_exts.subc_pl_aux_conflict, "subc_pl_aux"], + ["duplicate", pl_exts.subc_pl_aux_conflict, 1], + ["reserved_prefix_lna", pl_exts.more_conflicts, "ext_opt.subc_lna"], + + ["inter_ext_lna_ln", aux_exts.subc_pl_aux_conflict, "subc_pl_aux"], + ["duplicate", aux_exts.subc_pl_aux_conflict, 0], + ["inter_ext_lna_iln", aux_exts.more_conflicts], + + ["sna", "sna", pl_exts.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "a"], + ["iln", "iln", pl_exts.flag_opt, cmd.flag_opt], + ["lna", "ln", pl_exts.more_conflicts, pl_exts.subc_pl_aux_conflict, "subc_pl_aux"], + ["lna", "ln", pl_exts.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt"], + ["lna", "lna", pl_exts.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt_alias"], + ["sna", "sn", pl_exts.more_conflicts, cmd.subc_sn_only, "n"], + + ["ln", "ln", aux_exts.subc_pl_aux_conflict, pl_exts.subc_pl_aux_conflict, "subc_pl_aux"], + ["lna", "lna", aux_exts.subc_pl_aux_conflict, pl_exts.subc_pl_aux_conflict, "pl0"], + ["sna", "sna", aux_exts.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "a"], + ["sna", "sna", aux_exts.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "b"], + ["iln", "iln", aux_exts.flag_opt, cmd.flag_opt], + ["iln", "iln", aux_exts.more_conflicts, pl_exts.more_conflicts], + ["lna", "ln", aux_exts.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt"], + ["sna", "sna", aux_exts.more_conflicts, pl_exts.more_conflicts, "d"], + ["sna", "sn", aux_exts.more_conflicts, cmd.subc_sn_only, "n"], + ] + + _cmd_str_ = "origen.eval" + ext_conflicts[_cmd_str_]["conflicts_list"] = [ + ["iln", "iln", ext_conflicts[_cmd_str_]["exts"][0], ext_conflicts[_cmd_str_]["exts"][1]] + ] + + _cmd_str_ = "origen.credentials.clear" + ext_conflicts[_cmd_str_]["ext_conflicts_exts"] = ext_conflicts_exts(ext_conflicts[_cmd_str_]["exts"]) + aux_exts = ext_conflicts[_cmd_str_]["ext_conflicts_exts"] + ext_conflicts[_cmd_str_]["test_apps_shared_exts"] = test_apps_shared_exts(ext_conflicts[_cmd_str_]["exts"]) + pl_exts = ext_conflicts[_cmd_str_]["test_apps_shared_exts"] + cmd = cli.CLI.cmds.creds.clear + ext_conflicts[_cmd_str_]["conflicts_list"] = [ + ["iln", "ln", pl_exts.all, cmd.all], + ["ln", "ln", pl_exts.cmd_conflicts_pl, cmd.all, "all"], + ["sn", "sn", pl_exts.cmd_conflicts_pl, cmd.all, "a"], + ["lna", "ln", pl_exts.cmd_conflicts_pl, cmd.datasets, "datasets"], + ["sna", "sn", pl_exts.cmd_conflicts_pl, cmd.datasets, "d"], + ["iln", "ln", aux_exts.all, cmd.all], + ["ln", "ln", aux_exts.cmd_conflicts_aux, cmd.all, "all"], + ["sn", "sn", aux_exts.cmd_conflicts_aux, cmd.all, "a"], + ["lna", "ln", aux_exts.cmd_conflicts_aux, cmd.datasets, "datasets"], + ["lna", "lna", aux_exts.cmd_conflicts_aux, pl_exts.cmd_conflicts_pl, "pl_datasets"], + ["sna", "sn", aux_exts.cmd_conflicts_aux, cmd.datasets, "d"], + ["sna", "sna", aux_exts.cmd_conflicts_aux, pl_exts.cmd_conflicts_pl, "e"], + ] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py index fe3ae52d..85b3f613 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py @@ -80,6 +80,17 @@ def __init__(self): help="Flag Opt", ln="flag", ), + CmdOpt( + name="sn_only", + help="Opt with short name only", + sn="n", + ), + CmdOpt( + name="opt_with_aliases", + help="Opt with aliases", + ln_aliases=["alias", "opt_alias"], + sn_aliases=["a", "b"], + ) ], subcmds=[ Cmd( @@ -96,6 +107,18 @@ def __init__(self): name="flag_opt", help="Flag Opt For Subcommand", ), + CmdOpt( + name="subc_sn_only", + help="Opt with short name only for subc", + sn="n", + ), + CmdOpt( + name="subc_opt_with_aliases", + help="Opt with aliases for subc", + ln="subc_opt", + ln_aliases=["subc_alias", "subc_opt_alias"], + sn_aliases=["a", "b"] + ), ] ) ] @@ -166,6 +189,149 @@ def __init__(self): ) ] ) + self.intra_cmd_conflicts = self.pl_sub_cmd( + self.name, + "intra_cmd_conflicts", + help="PL cmd with conflicting args and opts within the cmd", + with_env={"ORIGEN_PL_INTRA_CMD_CONFLICTS": "1"}, + **self.intra_cmd_conflicts_args_opts_subcs(), + ) + + @property + def intra_cmd_conflicts_list(self): + if not hasattr(self, "_intra_cmd_conflicts_list"): + self._intra_cmd_conflicts_list = self.get_intra_cmd_conflicts_list(self.intra_cmd_conflicts) + return self._intra_cmd_conflicts_list + + @classmethod + def intra_cmd_conflicts_args_opts_subcs(cls): + return { + "args": [ + CmdArg( + name="arg0", + help="Arg 0", + ), + CmdArg( + name="arg1", + help="Arg 1", + ), + CmdArg( + name="arg2", + help="Arg 2", + ), + ], + "opts": [ + CmdOpt( + name="opt", + help="Opt 0", + ln_aliases=["opt0"] + ), + CmdOpt( + name="arg_clash", + help="Arg-Opt clash in ln/lna (okay)", + ln="arg0", + ln_aliases=["arg1"], + ), + CmdOpt( + name="reserved_prefix_in_ln_lna", + help="Reserved prefix in ln and lna", + ln_aliases=["ext_opt_lna"], + ), + CmdOpt( + name="intra_opt_conflicts", + help="Various intra-opt conflicts", + ln="intra_opt_cons", + sn="c", + ln_aliases=["intra_opt_conflicts", "intra_opt_cons2"], + sn_aliases=["a", "b", "e"] + ), + CmdOpt( + name="inter_opt_conflicts", + help="Various inter-opt conflicts", + sn_aliases=["d"], + ), + CmdOpt( + name="opt0", + help="Inferred long name clash", + ), + ], + "subcmds": [ + Cmd( + "conflicts_subc", + help="Subcommand with conflicts", + args=[ + CmdArg( + name="arg0", + help="Arg 0", + ), + CmdArg( + name="sub_arg_1", + help="Subc Arg 1", + ), + ], + opts=[ + CmdOpt( + name="opt", + help="Opt 0", + ln_aliases=["subc_opt"], + ), + CmdOpt( + name="intra_subc_conflicts", + help="Intra-opt conflicts for subc", + sn="r", + ln="intra_subc_conflicts", + ), + CmdOpt( + name="intra_subc_lna_iln_conflict", + help="Intra-opt iln conflict", + ), + CmdOpt( + name="inter_subc_conflicts", + help="Inter-opt conflicts for subc", + ), + ] + ) + ] + } + + @classmethod + def get_intra_cmd_conflicts_list(self, base_cmd): + return [ + ["duplicate", base_cmd.arg0, 0], + ["duplicate", base_cmd.arg1, 2], + ["reserved_prefix_arg_name", "ext_opt.arg"], + ["duplicate", base_cmd.opt, 0], + ["reserved_prefix_opt_name", "ext_opt.opt", None], + ["reserved_prefix_ln", base_cmd.reserved_prefix_in_ln_lna,"ext_opt.ln"], + ["reserved_prefix_lna", base_cmd.reserved_prefix_in_ln_lna, "ext_opt.lna"], + ["inter_ext_sna_sn", base_cmd.intra_opt_conflicts, "c"], + ["repeated_sna", base_cmd.intra_opt_conflicts, "b", 1], + ["inter_ext_sna_sn", base_cmd.intra_opt_conflicts, "c"], + ["repeated_sna", base_cmd.intra_opt_conflicts, "e", 5], + ["inter_ext_lna_ln", base_cmd.intra_opt_conflicts, "intra_opt_cons"], + ["repeated_lna", base_cmd.intra_opt_conflicts, "intra_opt_cons2", 2], + ["arg_opt_name_conflict", base_cmd.arg0, 0], + [base_cmd.conflicts_subc, "duplicate", base_cmd.conflicts_subc.sub_arg_1, 1], + [base_cmd.conflicts_subc, "reserved_prefix_arg_name", "ext_opt.subc_arg"], + [base_cmd.conflicts_subc, "reserved_prefix_opt_name", "ext_opt.subc_opt", None], + [base_cmd.conflicts_subc, "reserved_prefix_lna", base_cmd.conflicts_subc.opt, "ext_opt.subc_opt_lna"], + [base_cmd.conflicts_subc, "inter_ext_sna_sn", base_cmd.conflicts_subc.intra_subc_conflicts, "r"], + [base_cmd.conflicts_subc, "inter_ext_lna_ln", base_cmd.conflicts_subc.intra_subc_conflicts, "intra_subc_conflicts"], + [base_cmd.conflicts_subc, "inter_ext_lna_iln", base_cmd.conflicts_subc.intra_subc_lna_iln_conflict], + [base_cmd.conflicts_subc, "duplicate", base_cmd.conflicts_subc.intra_subc_conflicts, 2], + ["ln", "lna", base_cmd.inter_opt_conflicts, base_cmd.intra_opt_conflicts, "intra_opt_conflicts"], + ["sn", "sna", base_cmd.inter_opt_conflicts, base_cmd.intra_opt_conflicts, "a"], + ["lna", "ln", base_cmd.inter_opt_conflicts, base_cmd.intra_opt_conflicts, "intra_opt_cons"], + ["lna", "lna", base_cmd.inter_opt_conflicts, base_cmd.reserved_prefix_in_ln_lna, "ext_opt_lna"], + ["lna", "iln", base_cmd.inter_opt_conflicts, base_cmd.reserved_prefix_in_ln_lna, "reserved_prefix_in_ln_lna"], + ["sna", "sna", base_cmd.inter_opt_conflicts, base_cmd.intra_opt_conflicts, "b"], + ["sna", "sn", base_cmd.inter_opt_conflicts, base_cmd.intra_opt_conflicts, "c"], + ["iln", "lna", "opt0", base_cmd.opt], + ["intra_cmd_not_placed", "opt0"], + [base_cmd.conflicts_subc, "ln", "iln", base_cmd.conflicts_subc.inter_subc_conflicts, base_cmd.conflicts_subc.opt, "opt"], + [base_cmd.conflicts_subc, "lna", "ln", base_cmd.conflicts_subc.inter_subc_conflicts, base_cmd.conflicts_subc.intra_subc_conflicts, "intra_subc_conflicts"], + [base_cmd.conflicts_subc, "sna", "sn", base_cmd.conflicts_subc.inter_subc_conflicts, base_cmd.conflicts_subc.intra_subc_conflicts, "r"], + ] @property def base_cmd(self): diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml index 743e3856..b5b7c21b 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml @@ -21,3 +21,167 @@ extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" [[extension.opt]] name = "test_apps_shared_ext_flag" help = "Flag from test_apps_shared_test_helpers plugin" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_args" +on_env=["ORIGEN_EXT_CONFLICTS_PL_TEST_ARGS"] + [[extension.opt]] + name = "pl_aux_conflict" + help = "plugin-aux conflict (PL)" + [[extension.opt]] + name = "pl_aux_conflict" + help = "plugin-aux conflict" + long = "duplicate_from_pl" + [[extension.opt]] + name = "pl_aux_sn_conflict_pl" + help = "plugin-aux conflict (sn) (PL)" + short = "s" + [[extension.opt]] + name = "opt_taking_value" + help = "Conflict with cmd opt (PL)" + [[extension.opt]] + name = "pl_conflict_ln_and_aliases" + help = "Conflict with cmd opt ln and some aliases (PL)" + long = "alias" + short = "n" + long_aliases = ["opt_alias", "other_alias_pl"] + short_aliases = ["a", "b", "c"] + [[extension.opt]] + name = "flag" + help = "Conflict with inferred long name (PL)" + +[[extension]] +extend = "plugin.python_plugin.plugin_test_args.subc" +on_env=["ORIGEN_EXT_CONFLICTS_PL_TEST_ARGS_SUBC"] + [[extension.opt]] + name = "ext_opt.subc_reserved" + help = "Reserved Prefix" + [[extension.opt]] + name = "subc_pl_aux_conflict" + help = "plugin-aux conflict (PL)" + long = "subc_pl_aux" + short = "c" + long_aliases = ["pl0", "pl1", "subc_pl_aux"] + short_aliases = ["a", "c"] + [[extension.opt]] + name = "subc_pl_aux_conflict" + help = "plugin-aux conflict" + long = "duplicate_from_pl" + [[extension.opt]] + name = "flag_opt" + help = "Conflict with inferred long name (PL)" + [[extension.opt]] + name = "more_conflicts" + help = "More conflicts (PL)" + long_aliases = ["subc_pl_aux", "subc_opt", "subc_opt_alias", "ext_opt.subc_lna"] + short_aliases = ["d", "n"] + +[[extension]] +extend = "plugin.python_plugin.plugin_test_args" +on_env = ["ORIGEN_APP_PL_CMD_CONFLICTS"] + + [[extension.opt]] + name = "tas_opt" + help = "Opt from TAS" + long = "tas" + short = "z" + long_aliases = ["t_opt"] + short_aliases = ["b", "c"] + + [[extension.opt]] + name = "tas_iln" + help = "ILN from TAS" + +[[extension]] +extend = "origen.eval" +help = "Conflict with core cmd arg" +on_env=["ORIGEN_EXT_CONFLICTS_CORE_CMD_EVAL"] + + [[extension.opt]] + name = "code" + help = "Conflict with core cmd arg name from PL" + +[[extension]] +extend = "origen.credentials.clear" +help = "Conflict with core cmd opt from PL" +on_env=["ORIGEN_EXT_CONFLICTS_CORE_CMD_CREDS_CLEAR"] + + [[extension.opt]] + name = "all" + help = "Conflict with core cmd opt name. Uses full name" + + [[extension.opt]] + name = "cmd_conflicts_pl" + help = "Conflict with core cmd opt from PL" + long = "all" + short = "a" + long_aliases = ["datasets", "pl_datasets"] + short_aliases = ["d", "e"] + +[[extension]] +extend = "app.arg_opt_warmup" +on_env = ["ORIGEN_APP_EXT_ARG_OPT_WARMUP"] + + [[extension.opt]] + name = "tas_single_opt" + help = "Single opt from TAS" + long = "tas_sv" + takes_value = true + + [[extension.opt]] + name = "tas_multi_opt" + help = "Multi opt from TAS" + long = "tas_multi_opt" + multiple = true + long_aliases=["tas_multi", "TAS"] + short_aliases=["a"] + + [[extension.opt]] + name = "tas_hidden" + help = "Hidden opt from TAS" + hidden = true + +[[extension]] +extend = "app.arg_opt_warmup" +on_env = ["ORIGEN_APP_EXT_CONFLICTS_ARG_OPT_WARMUP"] + + [[extension.opt]] + name = "flag_opt" + help = "Conflict with flag opt from TAS" + + [[extension.opt]] + name = "conflicts_from_test_apps_shared" + help = "Some conflicts from Test Apps Shared PL" + long = "TAS" + long_aliases=["hidden", "python_plugin_conflicts", "TAS"] + short_aliases=["m", "a", "b"] + +[[extension]] +extend = "app.nested_app_cmds.nested_l1" +on_env = ["ORIGEN_APP_EXT_NESTED"] + + [[extension.opt]] + name = "tas_multi_opt_shallow" + help = "Multi opt from TAS" + long_aliases = ["tas_m_opt", "tas_shallow"] + multiple = true + + [[extension.opt]] + name = "tas_flag_opt_shallow" + help = "Flag opt from TAS" + long= "tas_f" + short = "f" + +[[extension]] +extend = "app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a" +on_env = ["ORIGEN_APP_EXT_NESTED"] + + [[extension.opt]] + name = "tas_multi_opt_deep" + help = "Multi opt from TAS" + long = "tas_opt" + multiple = true + + [[extension.opt]] + name = "tas_flag_opt_deep" + help = "Flag opt from TAS" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/arg_opt_warmup.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/arg_opt_warmup.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/arg_opt_warmup.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/nested_app_cmds.nested_l1.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/nested_app_cmds.nested_l1.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/app/nested_app_cmds.nested_l1.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_args.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_args.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_args.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_args.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_args.subc.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands/extensions/plugin/python_plugin/plugin_test_args.subc.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file From 91b8cb2c9d5181cdb7dedfa84994ed233e4f22e9 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 26 Apr 2023 16:59:48 -0500 Subject: [PATCH 024/200] Prototype non-extendable commands. Redo boot sequence for more consistency in handling -v, --vks, and -h. Add a bunch of tests. --- python/origen/origen/boot.py | 3 - .../helpers/regressions/cli/__init__.py | 15 +- .../origen/helpers/regressions/cli/command.py | 59 +++- .../helpers/regressions/cli/help_msg.py | 20 +- .../origen/helpers/regressions/cli/origen.py | 72 ++++- rust/origen/cli/src/bin.rs | 297 +++++++++++------- rust/origen/cli/src/commands/_prelude/mod.rs | 4 +- rust/origen/cli/src/commands/app.rs | 1 - rust/origen/cli/src/commands/exec.rs | 57 +++- rust/origen/cli/src/commands/mod.rs | 27 -- rust/origen/cli/src/commands/target.rs | 12 +- rust/origen/cli/src/framework/core_cmds.rs | 40 ++- rust/origen/cli/src/framework/extensions.rs | 4 +- rust/origen/cli/src/framework/helps.rs | 46 ++- rust/origen/cli/src/framework/mod.rs | 58 +++- rust/origen_metal/src/framework/logger.rs | 11 +- test_apps/python_app/config/commands.toml | 15 + .../python_app/tests/cli/core_cmds/target.py | 1 + test_apps/python_app/tests/cli/shared.py | 5 +- .../cli/tests__non_extendable_err_msgs.py | 50 +++ test_apps/python_app/tests/cli_test.py | 4 + test_apps/python_app/tests/shared/__init__.py | 1 - .../tests/cli/tests__cmd__eval.py | 7 +- .../tests/cli/tests__cmd__exec.py | 56 ++++ .../tests/cli/tests__global_cmds.py | 35 +-- .../tests/cli/tests__invocation_errors.py | 59 ++++ .../tests/cli/tests__origen_help.py | 31 ++ .../tests/cli/tests__origen_v.py | 20 ++ .../tests/cmd_building/cmd_testers.toml | 4 - .../cmd_testers/test_current_command.py | 9 - .../cmd_building/tests__standard_opts.py | 2 +- .../tests/cmd_exts/tests__ext_conflicts.py | 165 +++++----- test_apps/python_no_app/tests/misc_test.py | 49 ++- test_apps/python_no_app/tests/test_cli.py | 16 + .../python_plugin/python_plugin/commands.toml | 24 ++ .../python_plugin/commands/do_actions.py | 4 + .../cli/__init__.py | 4 +- .../cli/asertions.py | 115 +++++++ .../cli/cmd_models/__init__.py | 5 + .../cli/cmd_models/auxs.py | 20 +- .../cli/cmd_models/exts.py | 167 +++++----- .../cli/cmd_models/plugins.py | 32 +- .../cli/ext_helpers.py | 15 +- .../commands.toml | 14 + 44 files changed, 1182 insertions(+), 473 deletions(-) create mode 100644 test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__exec.py create mode 100644 test_apps/python_no_app/tests/cli/tests__invocation_errors.py create mode 100644 test_apps/python_no_app/tests/cli/tests__origen_help.py create mode 100644 test_apps/python_no_app/tests/cli/tests__origen_v.py delete mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_current_command.py create mode 100644 test_apps/python_plugin/python_plugin/commands/do_actions.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/asertions.py diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 1408184e..4be61567 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -93,7 +93,6 @@ def mod_from_modulized_path(root, sub_parts): return wrap_mod_from_file(path) def call_user_cmd(cmd_type): - print(f"dispatch_root: {dispatch_root}") m = mod_from_modulized_path(dispatch_root, subcmds) if isinstance(m, list): @@ -107,8 +106,6 @@ def call_user_cmd(cmd_type): exit_proc(1) if hasattr(m, 'run'): - print("found run") - print(m.__file__) m.run(**(args or {})) else: origen.logger.error(f"Could not find 'run' function in module '{m.__file__}'") diff --git a/python/origen/origen/helpers/regressions/cli/__init__.py b/python/origen/origen/helpers/regressions/cli/__init__.py index ed40f1e0..534fe94c 100644 --- a/python/origen/origen/helpers/regressions/cli/__init__.py +++ b/python/origen/origen/helpers/regressions/cli/__init__.py @@ -1,6 +1,7 @@ '''Regression test helpers for testing/checking Origen CLI integration''' -from .command import Cmd, CmdArg, CmdOpt +import re +from .command import Cmd, CmdArg, CmdOpt, SrcTypes from .help_msg import HelpMsg from .origen import _CommonNames, GlobalCommands, InAppCommands, CoreOpts, CoreErrorMessages from .... import origen as o @@ -14,6 +15,14 @@ def app_sub_cmd_path(cls): return [cmd.name, cmd.commands.name] class CLI(metaclass=CLIProperties): + @classmethod + def run_cli_cmd(cls, *args, **kwargs): + return o.helpers.env.run_cli_cmd(*args, **kwargs) + + @classmethod + def gen_error(cls, *args, **kwargs): + return o.helpers.env.run_cli_cmd(*args, expect_fail=True, **kwargs) + HelpMsg = HelpMsg Cmd = Cmd CmdOpt = CmdOpt @@ -70,3 +79,7 @@ def eval(cls, *code, **kwargs): error_messages = CoreErrorMessages() err_msgs = error_messages + + @classmethod + def extract_logged_errors(cls, text): + return list(map(lambda l: re.split(r"\[ERROR\] \(..:..:..\....\): ", l, 1)[1], filter(lambda l: "[ERROR] (" in l, text.split("\n")))) \ No newline at end of file diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py index 5748289e..35b89c9f 100644 --- a/python/origen/origen/helpers/regressions/cli/command.py +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -100,6 +100,14 @@ def __str__(self) -> str: elif self == self.AUX: return "aux" + def displayed(self, src_name=None): + if self == SrcTypes.APP: + return "the App" + elif self == SrcTypes.PLUGIN: + return f"plugin '{src_name}'" + elif self == SrcTypes.AUX: + return f"aux namespace '{src_name}'" + class CmdExtOpt(CmdOpt): @classmethod def from_src(cls, src_name, src_type, *args): @@ -132,12 +140,7 @@ def provided_by(self): @property def displayed(self): - if self.provided_by_app: - return "the App" - elif self.src_type == SrcTypes.PLUGIN: - return f"plugin '{self.src_name}'" - elif self.src_type == SrcTypes.AUX: - return f"aux namespace '{self.src_name}'" + return self.src_type.displayed(self.src_name) class CmdDemo: def __init__(self, name, args=None, expected_output=None) -> None: @@ -164,7 +167,24 @@ def assert_present(self, in_str): assert e in in_str class Cmd: - def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds = None, use_configs = None, with_env=None, demos=None, global_demos=None, app_demos=None, parent=None, aliases=None, src_type=None): + def __init__( + self, + name, + cmd_path=None, + help=None, + args=None, + opts=None, + subcmds=None, + use_configs=None, + with_env=None, + demos=None, + global_demos=None, + app_demos=None, + parent=None, + aliases=None, + src_type=None, + prefix_opts=False, + ): self.name = name self.cmd_path = cmd_path or [] self.help = help @@ -176,6 +196,7 @@ def __init__(self, name, cmd_path=None, help=None, args=None, opts=None, subcmds self.with_env = with_env self.parent = parent self.src_type = src_type + self.prefix_opts = prefix_opts if use_configs: if not isinstance(use_configs, list): use_configs = [use_configs] @@ -224,6 +245,7 @@ def extend(self, exts, with_env=None, from_configs=None): [d.copy() for d in self.app_demos.values()], self.aliases, self.src_type, + self.prefix_opts, ) dup.exts = dict(self.exts) if self.exts else {} dup.exts.update(dict([[ext.name, ext] for ext in (exts or [])])) @@ -254,17 +276,23 @@ def _with_configs_(self, with_configs): with_configs = self.use_configs + (with_configs or []) return with_configs - def get_help_msg_str(self, with_configs=None, run_opts=None): - return self.run("-h", with_configs=with_configs, run_opts=run_opts) + def get_help_msg_str(self, with_configs=None, run_opts=None, opts_pre_cmd=None): + return self.run("help" if self.prefix_opts else "-h", with_configs=with_configs, run_opts=run_opts, pre_cmd_opts=(opts_pre_cmd or self.prefix_opts)) - def get_help_msg(self, with_configs=None, bypass_config_lookup=None, run_opts=None): - return HelpMsg(self.get_help_msg_str(with_configs=with_configs, run_opts=run_opts)) + def get_help_msg(self, with_configs=None, bypass_config_lookup=None, run_opts=None, opts_pre_cmd=None): + return HelpMsg(self.get_help_msg_str(with_configs=with_configs, run_opts=run_opts, opts_pre_cmd=opts_pre_cmd)) - def run(self, *args, with_env=None, with_configs=None, expect_fail=False, run_opts=None): + def run(self, *args, with_env=None, with_configs=None, expect_fail=False, run_opts=None, pre_cmd_opts=None): run_opts = dict(run_opts) if run_opts else {} - a = list(args) + a = [(a.to_cli() if isinstance(a, CmdOpt) else a) for a in args] + if pre_cmd_opts is None or pre_cmd_opts is False: + pre_cmd_opts = [] + elif pre_cmd_opts is True: + pre_cmd_opts = a + a = [] + return run_cli_cmd( - [*self.cmd_path, *([self.name] if self.name else []), *[(a.to_cli() if isinstance(a, CmdOpt) else a) for a in args]], + [*pre_cmd_opts, *self.cmd_path, *([self.name] if self.name else []), *a], with_env=run_opts.pop("with_env", None) or with_env or self.with_env, with_configs=run_opts.pop("with_configs", None) or self._with_configs_(with_configs), expect_fail=run_opts.pop("expect_fail", None) or expect_fail, @@ -272,12 +300,13 @@ def run(self, *args, with_env=None, with_configs=None, expect_fail=False, run_op **(run_opts or {}), ) - def gen_error(self, *args, with_configs=None, return_stdout=False, return_full=False, run_opts=None): + def gen_error(self, *args, with_configs=None, return_stdout=False, return_full=False, run_opts=None, pre_cmd_opts=None): out = self.run( *args, with_configs=with_configs, expect_fail=True, run_opts=run_opts, + pre_cmd_opts=pre_cmd_opts, ) if return_full: return out diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index 9ceae40d..e3f6d7b9 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -1,8 +1,10 @@ class HelpMsg: + not_extendable_msg = "This command does not support extensions." + def __init__(self, help_str): self.text = help_str sections = help_str.split("\n\n") - if sections[0] == "Origen, The Semiconductor Developer's Kit": + if "Origen, The Semiconductor Developer's Kit" in sections[0]: self.version_str = sections.pop(1).strip() self.root_cmd = True else: @@ -25,7 +27,6 @@ def __init__(self, help_str): for sect in sections[2:]: subsects = sect.split("\n") for (i, s) in enumerate(subsects): - print(f"s: {s}") if s == "ARGS:": current = "args" sects[current] = [] @@ -50,12 +51,12 @@ def __init__(self, help_str): else: if (i == len(subsects) - 1) and s == "": next - if not s.startswith(" "): + elif current == "after_help_msg": + self.after_help_msg.append(s) + elif not s.startswith(" "): if current not in ["app_cmd_shortcuts", "pl_cmd_shortcuts", "aux_cmd_shortcuts"]: current = "after_help_msg" self.after_help_msg = [s] - elif current == "after_help_msg": - self.after_help_msg.append(s) else: sects[current].append(s) @@ -82,8 +83,6 @@ def __init__(self, help_str): n = None if "opts" in sects: for line in sects["opts"]: - print(f"l {line}") - l = line.strip() if l[0] == "-": opt = {} @@ -92,7 +91,6 @@ def __init__(self, help_str): opt['extended_from'] = None opt['ext_type'] = None - print(l) s = l.split(" ", 1) if len(s) > 1: opt["help"] = s[1].strip() @@ -162,7 +160,6 @@ def __init__(self, help_str): opt['ext_type'] = SrcTypes.APP if re.search(r"\[aliases: .*\]", opt['help']): - print(f"splitting aliases!!: {opt['help']}") split = opt['help'].split("[aliases: ", 1) if len(split) == 2: if ']' in split[1]: @@ -180,7 +177,6 @@ def __init__(self, help_str): self.subcmds = [] n = None if "subcmds" in sects: - print(sects["subcmds"]) for line in sects["subcmds"]: if line.startswith(" "): self.subcmds[-1]["help"] += f" {line.strip()}" @@ -420,6 +416,10 @@ def assert_summary(self, msg): assert self.help == msg return True + def assert_not_extendable(self): + assert self.after_help_msg is not None + assert self.not_extendable_msg == self.after_help_msg.split("\n")[-1] + @property def logged_errors(self): return list(filter(lambda l: "[ERROR] (" in l, self.text.split("\n"))) \ No newline at end of file diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 41e1a6fb..e8272bf4 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -1,5 +1,5 @@ import origen -from .command import CmdOpt, Cmd, CmdArg, CmdDemo, CmdExtOpt +from .command import CmdOpt, Cmd, CmdArg, CmdArgOpt, CmdDemo, CmdExtOpt def help_subcmd(): return Cmd("help", help="Print this message or the help of the given subcommand(s)") @@ -12,6 +12,7 @@ class _CommonNames: creds = "credentials" new = "new" eval = "eval" + exec = "exec" fmt = "fmt" i = "interactive" v = "-v" @@ -54,6 +55,19 @@ def eval_cmd(cls, add_opts=None): ] ) + @classmethod + def exec_cmd(cls, add_opts=None): + return Cmd( + cls.exec, + help="Execute a command within your Origen/Python environment (e.g. origen exec pytest)", + args=[ + CmdArg("command", "The command to be run", required=True), + CmdArg("args", "Arguments to be passed to the command", multi=True, required=False) + ], + opts=add_opts, + prefix_opts=True, + ) + @classmethod def creds_cmd(cls, add_opts=None): return Cmd( @@ -149,6 +163,7 @@ def __getattr__(self, name=None): class GlobalCommands(CoreCommands): class Names: eval = _CommonNames.eval + exec = _CommonNames.exec aux_cmds = _CommonNames.aux_cmds pls = _CommonNames.pls pl = _CommonNames.pl @@ -162,6 +177,7 @@ class Names: names = Names() eval = _CommonNames.eval_cmd() + exec = _CommonNames.exec_cmd() aux_cmds = Cmd(names.aux_cmds, help="Interface with auxillary commands") pls = Cmd(names.pls) pl = Cmd(names.pl) @@ -174,7 +190,7 @@ class Names: v = _CommonNames.v_cmd() commands = [ - proj, new, creds, eval, i, + proj, new, creds, eval, exec, i, pls, pl, aux_cmds, fmt, build ] cmds = commands @@ -229,7 +245,7 @@ class Names: creds = _CommonNames.creds env = "env" eval = _CommonNames.eval - exec = "exec" + exec = _CommonNames.exec fmt = _CommonNames.fmt generate = "generate" i = _CommonNames.i @@ -272,7 +288,7 @@ def targets_arg(cls, help): creds = _CommonNames.creds_cmd(add_opts=in_app_opts.all()) env = Cmd(names.env) eval = _CommonNames.eval_cmd(add_opts=in_app_opts.all()) - exec = Cmd(names.exec) + exec = _CommonNames.exec_cmd() fmt = Cmd(names.fmt) generate = Cmd(names.generate) i = _CommonNames.interactive_cmd(add_opts=in_app_opts.all()) @@ -340,14 +356,50 @@ def targets_arg(cls, help): class CoreOpts: help = CmdOpt('help', "Print help information", sn="h", ln="help") - verbosity = CmdOpt('verbosity', "Terminal verbosity level e.g. -v, -vv, -vvv", ln="verbosity", sn="v") - vk= CmdOpt("verbosity_keywords", "Keywords for verbose listeners", value_name= "verbosity_keywords", takes_value=True, multi=True, ln_aliases=["vk"]) + verbosity = CmdOpt('verbosity', "Terminal verbosity level e.g. -v, -vv, -vvv", ln="verbose", ln_aliases=["verbosity"], sn="v") + vk = CmdOpt("verbosity_keywords", "Keywords for verbose listeners", value_name= "verbosity_keywords", takes_value=True, use_delimiter=True, ln_aliases=["vk"]) class CoreErrorMessages: @classmethod - def too_many_args(cls, val): + def _invalid_arg_msg(cls, val): return f"Found argument '{val}' which wasn't expected, or isn't valid in this context" + @classmethod + def _missing_arg_val_msg(cls, arg, type, value_name=None): + if type == "ln": + prefix = '--' + elif type == "sn": + prefix = '-' + elif type == "arg": + prefix = '' + else: + raise RuntimeError(f"Cannot generate missing ar val msg for arg type '{type}") + if isinstance(arg, CmdArgOpt): + if value_name is None: + value_name = arg.to_vn() + arg = arg.name + return f"The argument '{prefix}{arg} <{value_name or arg}>' requires a value but none was supplied" + + @classmethod + def missing_arg_val_msg(cls, arg, value_name=None): + return cls._missing_arg_val_msg(arg, "arg", value_name=value_name) + + @classmethod + def missing_ln_val_msg(cls, arg, value_name=None): + return cls._missing_arg_val_msg(arg, "ln", value_name=value_name) + + @classmethod + def missing_sn_val_msg(cls, arg, value_name=None): + return cls._missing_arg_val_msg(arg, "sn", value_name=value_name) + + @classmethod + def too_many_args(cls, val): + return cls._invalid_arg_msg(val) + + @classmethod + def unknown_arg_msg(cls, arg): + return cls._invalid_arg_msg(arg) + @classmethod def unknown_opt_msg(cls, opt, ln=True): if ln: @@ -360,7 +412,7 @@ def unknown_opt_msg(cls, opt, ln=True): else: n = f"{prefix}{opt}" - return f"Found argument '{n}' which wasn't expected, or isn't valid in this context" + return cls._invalid_arg_msg(n) @classmethod def missing_required_arg(cls, *vals): @@ -372,6 +424,10 @@ def missing_required_arg(cls, *vals): mapped_vals.append(f"<{v.to_vn()}>") return "The following required arguments were not provided:" + "\n " + " \n".join(mapped_vals) + @classmethod + def invalid_subc_msg(cls, subc): + return f"The subcommand '{subc}' wasn't recognized\n\nUSAGE:\n" + @classmethod def cmd_building_err_prefix(cls, cmd): return f"When processing command '{cmd.full_name}':" diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index 3224913c..51cb6528 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -18,14 +18,16 @@ use std::process::exit; use framework::{Extensions, Plugins, AuxCmds, AppCmds, CmdHelps}; use framework::plugins::{PL_MGR_CMD_NAME, PL_CMD_NAME, run_pl_mgr, run_pl}; use framework::{ - VERBOSITY_OPT_NAME, VERBOSITY_OPT_SHORT_NAME, - VERBOSITY_KEYWORDS_OPT_NAME, VERBOSITY_KEYWORDS_OPT_LONG_NAME + VERBOSITY_OPT_NAME, VERBOSITY_OPT_SHORT_NAME, VERBOSITY_OPT_LNA, + VERBOSITY_KEYWORDS_OPT_NAME, VERBOSITY_KEYWORDS_OPT_LONG_NAME, + VOV_OPT_NAME, + add_verbosity_opts, }; use clap::error::ErrorKind as ClapErrorKind; use commands::_prelude::clap_arg_actions::*; -static VERBOSITY_HELP_STR: &str = "Terminal verbosity level e.g. -v, -vv, -vvv"; -static VERBOSITY_KEYWORD_HELP_STR: &str = "Keywords for verbose listeners"; +use VERBOSITY_OPT_NAME as V_OPT_NAME; +use VERBOSITY_KEYWORDS_OPT_NAME as VKS_OPT_NAME; #[derive(Clone)] pub struct CommandHelp { @@ -41,57 +43,28 @@ pub mod built_info { // This is the entry point for the Origen CLI tool fn main() -> Result<()> { - let verbosity_re = regex::Regex::new(r"-([vV]+)").unwrap(); - - // Intercept the 'origen exec' command immediately to prevent further parsing of it, this - // is so that something like 'origen exec pytest -v' will apply '-v' as an argument to pytest - // and not to origen - let mut args: Vec = std::env::args().collect(); - if args.len() > 1 && args[1] == "exec" { - args = args.drain(2..).collect(); - if args.len() > 0 && (args[0] == "-h" || args[0] == "--help" || args[0] == "help") { - // Just fall through to display the help in this case - } else { - // Apply any leading -vvv to origen, any -v later in the args will be applied to the - // 3rd party command - if args.len() > 0 && verbosity_re.is_match(&args[0]) { - let captures = verbosity_re.captures(&args[0]).unwrap(); - let x = captures.get(1).unwrap().as_str(); - let verbosity = x.chars().count() as u8; - origen::initialize( - Some(verbosity), - vec![], - None, - Some(built_info::PKG_VERSION.to_string()), - None, - None, - ); - args = args.drain(1..).collect(); - } - // Command is not actually available outside an app, so just fall through - // to generate the appropriate error - if STATUS.is_app_present { - if args.len() > 0 { - let cmd = args[0].clone(); - args = args.drain(1..).collect(); - let cmd_args: Vec<&str> = args.iter().map(|s| s.as_str()).collect(); - commands::exec::run(&cmd, cmd_args); - } else { - std::process::exit(0); - } - } - } + // Create a mini-app to handle verbose and verbosity keyword arguments and run any commands that should be run + // earlier in the flow (e.g.: exec). Call this the "pre-phase" app. + // Exits if a pre-phase command was handled, otherwise, set verbosity settings and continue with the main flow + // Note: pre-phase runs before plugins or extensions are available. By definition, commands executing during pre-phase are not extendable. + macro_rules! pre_phase_app { + () => {{ + add_verbosity_opts(Command::new("") + .disable_version_flag(true) + .allow_external_subcommands(true) + .disable_help_flag(true) + .allow_hyphen_values(true), + true + ) + }} } - // Set the verbosity immediately, this is to allow log statements to work in really - // low level stuff, e.g. when building the STATUS - let mut verbosity: u8 = 0; - for arg in std::env::args() { - if let Some(captures) = verbosity_re.captures(&arg) { - let x = captures.get(1).unwrap().as_str(); - verbosity = x.chars().count() as u8; - } - } + let mut pre_phase_app = pre_phase_app!(); + pre_phase_app = commands::exec::add_prephase_cmds(pre_phase_app); + + let mut print_help = false; + let mut verbosity; + let mut vks; let exe = match std::env::current_exe() { Ok(p) => Some(format!("{}", p.display())), Err(e) => { @@ -99,14 +72,150 @@ fn main() -> Result<()> { None } }; - origen::initialize( - Some(verbosity), - vec![], - exe, - Some(built_info::PKG_VERSION.to_string()), - None, - None, - ); + macro_rules! origen_init { + () => {{ + origen::initialize( + Some(verbosity), + vks, + exe, + Some(built_info::PKG_VERSION.to_string()), + None, + None, + ) + }} + } + + match pre_phase_app.try_get_matches() { + Ok(m) => { + verbosity = *m.get_one::(V_OPT_NAME).unwrap_or(&0); + verbosity += m.get_one::(VOV_OPT_NAME).unwrap_or(&0); + vks = match m.get_many::(VKS_OPT_NAME) { + Some(vks) => vks.map( |vk| vk.to_owned()).collect::>(), + None => vec!() + }; + + macro_rules! run_pre_phase_cmd { + ($cmd_mod:ident, $subc:expr) => {{ + origen_init!(); + exit(commands::$cmd_mod::run_pre_phase(&$subc)?); + }} + } + + match m.subcommand() { + Some((commands::exec::BASE_CMD, subc)) => { + run_pre_phase_cmd!(exec, subc); + }, + // "External subcommand" received, which in this case is either a non-pre-prephase or invalid command. + // Either way, let the main flow handle it. + Some((ext, ext_args)) => { + // Args under "" are external subcommand args + match ext_args.get_many::("") { + Some(args) => { + // Need to repeatedly parse the args to overcome handling of corner cases. + // Use a dummy app that just accepts verbosity and keywords. Parse this until empty. + let mut dummy = pre_phase_app!().no_binary_name(true); + let mut reduced = args.map(|a| a.to_owned()).collect::>(); + while(true) { + match dummy.try_get_matches_from_mut(reduced.clone()) { + Ok(dm) => { + verbosity += dm.get_one::(V_OPT_NAME).unwrap_or(&0); + verbosity += dm.get_one::(VOV_OPT_NAME).unwrap_or(&0); + match dm.get_many::(VKS_OPT_NAME) { + Some(vkws) => vks.append(&mut vkws.map( |vk| vk.to_owned()).collect::>()), + None => {} + }; + + match dm.subcommand() { + Some((ext, dm_args)) => { + match dm_args.get_many::("") { + Some(dm_args) => { + reduced = dm_args.map(|a| a.to_owned()).collect::>(); + } + None => { + break + } + } + }, + None => { + break + }, + } + }, + Err(e) => { + e.exit(); + }, + } + } + }, + None => {} + } + }, + _ => { + // No subcommand, or options only. Set the verbosity based on previous handling of options. + // The only options here will be verbosity and vks. Knock one of the -v flags off and set + // verbosity according to that. The version printout will be handled later on. + verbosity = *m.get_one::(V_OPT_NAME).unwrap_or(&0); + verbosity += m.get_one::(VOV_OPT_NAME).unwrap(); + + // version_or_verbosity will default to 0, even if not present on the invocation + match m.value_source(VOV_OPT_NAME) { + Some(clap::parser::ValueSource::DefaultValue) => { + // This would actually fal into a 'origen -v' invocation, but actually want to display help here + // E.g.: origen --verbose --vk blah + // should display help, not version + print_help = true; + }, + _ => { + // All other cases, it was given, so knock off a -v flag off + // origen -vvv => origen (version) -vv + verbosity -= 1; + } + } + } + } + origen_init!(); + }, + Err(e) => { + // Any mis-use of pre-phase commands or unknown args/subcommands will be handled by the full app. + // Fallback to manually discerning the verbosity/keywords for the main phase + let mut dummy = pre_phase_app!().no_binary_name(true); + let mut reduced: Vec = std::env::args().skip(1).collect(); + verbosity = 0; + vks = vec!(); + while(true) { + match dummy.try_get_matches_from_mut(reduced.clone()) { + Ok(dm) => { + verbosity += dm.get_one::(V_OPT_NAME).unwrap_or(&0); + verbosity += dm.get_one::(VOV_OPT_NAME).unwrap_or(&0); + match dm.get_many::(VKS_OPT_NAME) { + Some(vkws) => vks.append(&mut vkws.map( |vk| vk.to_owned()).collect::>()), + None => {} + }; + + match dm.subcommand() { + Some((ext, dm_args)) => { + match dm_args.get_many::("") { + Some(dm_args) => { + reduced = dm_args.map(|a| a.to_owned()).collect::>(); + } + None => { + break + } + } + }, + None => { + break + }, + } + }, + Err(e) => { + e.exit(); + }, + } + } + origen_init!(); + } + } let version = match STATUS.is_app_present { true => format!("Origen CLI: {}", STATUS.origen_version.to_string()), @@ -151,25 +260,8 @@ fn main() -> Result<()> { .arg_required_else_help(true) .disable_version_flag(true) .before_help("Origen, The Semiconductor Developer's Kit") - .version(&*version) - .arg( - Arg::new("verbose") - .long(VERBOSITY_OPT_NAME) - .short(VERBOSITY_OPT_SHORT_NAME) - .action(clap::builder::ArgAction::Count) - .global(true) - .help(VERBOSITY_HELP_STR), - ) - .arg( - Arg::new("verbosity_keywords") - .long(VERBOSITY_KEYWORDS_OPT_NAME) - .visible_alias(VERBOSITY_KEYWORDS_OPT_LONG_NAME) - // .short('k') - .multiple(true) - .action(AppendArgs) - .global(true) - .help(VERBOSITY_KEYWORD_HELP_STR), - ); + .version(&*version); + app = add_verbosity_opts(app, false); /************************************************************************************/ /******************** Global only commands ******************************************/ @@ -330,6 +422,7 @@ fn main() -> Result<()> { framework::plugins::add_helps(&mut helps, plugins.as_ref()); framework::aux_cmds::add_helps(&mut helps, &aux_cmds); commands::eval::add_helps(&mut helps); + commands::exec::add_helps(&mut helps); commands::credentials::add_helps(&mut helps); commands::interactive::add_helps(&mut helps); @@ -347,6 +440,7 @@ fn main() -> Result<()> { // app = mailer::add_commands(app, &mut origen_commands)?; app = commands::credentials::add_commands(app, &helps, &extensions)?; app = commands::eval::add_commands(app, &helps, &extensions)?; + app = commands::exec::add_commands(app, &helps, &extensions)?; app = commands::interactive::add_commands(app, &helps, &extensions)?; app = framework::plugins::add_commands(app, &helps, plugins.as_ref(), &extensions)?; app = framework::aux_cmds::add_commands(app, &helps, &aux_cmds, &extensions)?; @@ -762,38 +856,6 @@ Examples: ) ); - /************************************************************************************/ - let exec_help = "Execute a command within your application's Origen/Python environment (e.g. origen exec pytest)"; - origen_commands.push(CommandHelp { - name: "exec".to_string(), - help: exec_help.to_string(), - shortcut: None, - }); - app = app.subcommand( - Command::new("exec") - .about(exec_help) - .arg_required_else_help(true) - .allow_hyphen_values(true) - .arg( - Arg::new("cmd") - .help("The command to be run") - .action(SetArg) - .required(true) - .value_name("COMMAND"), - ) - .arg( - Arg::new("args") - .help("Arguments to be passed to the command") - .action(AppendArgs) - .allow_hyphen_values(true) - .multiple(true) - .number_of_values(1) - .required(false) - //.last(true) - .value_name("ARGS"), - ), - ); - /************************************************************************************/ let save_ref_help = "Save a reference version of the given file, this will be automatically checked for differences the next time it is generated"; origen_commands.push(CommandHelp { @@ -1039,11 +1101,6 @@ Examples: let matches = app.get_matches_mut(); - let _ = LOGGER.set_verbosity(*matches.get_one::("verbose").unwrap()); - if let Some(keywords) = matches.get_many::("verbosity_keywords") { - let _ = LOGGER.set_verbosity_keywords(keywords.map(|k| k.to_string()).collect()); - } - macro_rules! run_cmd_match_case { ($cmd:ident, $cmd_name:ident) => { commands::$cmd::run(matches.subcommand_matches(commands::$cmd::$cmd_name).unwrap(), &app, &extensions, plugins.as_ref())? @@ -1230,6 +1287,12 @@ Examples: unreachable!("Uncaught invalid command encountered: '{}'", invalid_cmd); } None => { + if print_help { + // No subcommands or "-v" used, but verbose and/or vks used. + // This will register as no subcommand, but actually want to display help, not version + app.print_help()?; + return Ok(()) + } // To get here means the user has typed "origen -v", which officially means // verbosity level 1 with no command, but this is what they really mean let mut max_len = 0; diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index 8570ae4a..5aafecc2 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -5,7 +5,7 @@ pub use origen::Result; pub use super::super::CommandHelp; pub use indexmap::IndexMap; pub use super::{launch, launch_simple, launch_as}; -pub use crate::framework::{Extensions, Plugins}; +pub use crate::framework::{Extensions, Plugins, add_verbosity_opts}; pub use crate::framework::{CmdHelps, CmdHelp, CmdSrc}; // FOR_PR remove this @@ -14,7 +14,7 @@ pub type RunInput<'a> = &'a clap::ArgMatches; pub use clap_arg_actions::*; pub use crate::{ gen_core_cmd_funcs, gen_core_cmd_funcs__no_exts__no_app_opts, - core_subcmd, core_subcmd__no_app_opts, + core_subcmd, core_subcmd__no_exts__no_app_opts, gen_simple_run_func, print_subcmds_available_msg, }; \ No newline at end of file diff --git a/rust/origen/cli/src/commands/app.rs b/rust/origen/cli/src/commands/app.rs index 137ff75b..830153d8 100644 --- a/rust/origen/cli/src/commands/app.rs +++ b/rust/origen/cli/src/commands/app.rs @@ -4,7 +4,6 @@ use crate::framework::AppCmds; use crate::commands::_prelude::*; use crate::framework::app_cmds::add_commands as add_app_user_commands; use crate::framework::app_cmds::add_helps as add_app_cmd_helps; -use crate::framework::build_path; pub const BASE_CMD: &'static str = "app"; diff --git a/rust/origen/cli/src/commands/exec.rs b/rust/origen/cli/src/commands/exec.rs index c0be71ff..d6109223 100644 --- a/rust/origen/cli/src/commands/exec.rs +++ b/rust/origen/cli/src/commands/exec.rs @@ -1,20 +1,55 @@ use crate::python::{add_origen_env, PYTHON_CONFIG}; +use super::_prelude::*; +use std::process::exit; +use std::borrow::Cow; -pub fn run(cmd_name: &str, args: Vec<&str>) { +pub const BASE_CMD: &'static str = "exec"; +pub const EXEC_HELP: &'static str = "Execute a command within your Origen/Python environment (e.g. origen exec pytest)"; + +pub(crate) fn run_pre_phase(mut invocation: &clap::ArgMatches) -> Result { let mut cmd = PYTHON_CONFIG.poetry_command(); cmd.arg("run"); - cmd.arg(cmd_name); - cmd.args(&args); + let cmd_name = invocation.get_one::("cmd").unwrap(); + cmd.arg(cmd_name); + if let Some(args) = invocation.get_many::("args") { + cmd.args(args); + } + log_debug!("Running Command (from Exec): {} {}", cmd.get_program().to_string_lossy(), cmd.get_args().map( |a| a.to_string_lossy()).collect::>>().join(" ")); add_origen_env(&mut cmd); - let res = cmd - .status() - .expect("Something went wrong executing the command"); + let res = cmd.status()?; + Ok(if res.success() { 0 } else { 1 }) +} - if res.success() { - std::process::exit(0); - } else { - std::process::exit(1); - } +pub fn add_prephase_cmds<'a>(mut cmd: App<'a>) -> App<'a> { + cmd.subcommand(add_verbosity_opts(config_exec_cmd(Command::new(BASE_CMD)), false)) +} + +pub fn config_exec_cmd<'a>(mut cmd: App<'a>) -> App<'a> { + cmd + .arg( + Arg::new("cmd") + .help("The command to be run") + .action(SetArg) + .required(true) + .value_name("COMMAND") + ) + .arg( + Arg::new("args") + .help("Arguments to be passed to the command") + .action(AppendArgs) + .allow_hyphen_values(true) + .multiple(true) + .required(false) + .value_name("ARGS") + ) } + +gen_core_cmd_funcs__no_exts__no_app_opts!( + BASE_CMD, + EXEC_HELP, + { |cmd: App<'a>| { + config_exec_cmd(cmd) + }} +); diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 2ea62d6e..46ab46ad 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -25,7 +25,6 @@ use std::process::exit; use _prelude::{SetArgTrue, CountArgs}; use clap::{App, ArgMatches}; -// use crate::Extensions; use crate::framework::extensions::{Extension, ExtensionSource}; use crate::Plugins; use std::collections::HashMap; @@ -136,7 +135,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation let mut args: Vec = vec!(); - // println!("exts from launch: {:?}", cmd_exts); let mut opt_names = HashMap::new(); let mut ext_args = HashMap::new(); if let Some(exts) = cmd_exts { @@ -151,12 +149,10 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } } } - // println!("ext names: {:?}", opt_names); let mut targets = None; for arg in cmd_def.get_arguments() { - // println!("Arg: {}", arg.get_id()); let arg_n= arg.get_id(); if arg_n == "verbose" || arg_n == "verbosity_keywords" { continue; @@ -217,7 +213,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } } } - // println!("ext args: {:?}", ext_args); let mut cmd = format!("from origen.boot import run_cmd; run_cmd('{}'", base_cmd.unwrap_or_else(|| cmd_def.get_name())); if let Some(subs) = subcmds.as_ref() { @@ -229,12 +224,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation let mut pl_ext_str = "".to_string(); let mut aux_ext_str = "".to_string(); if !ext_args.is_empty() { - // let mut app_ext_str = "{".to_string(); - // let mut pl_ext_str = "{".to_string(); - // let mut aux_ext_str = "{".to_string(); - // let mut app_ext_args = vec!(); - // let mut pl_ext_args = vec!(); - // let mut aux_ext_args = vec!(); for ext in ext_args { match ext.0 { ExtensionSource::App => { @@ -242,7 +231,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation }, ExtensionSource::Plugin(ref pl_name) => { pl_ext_str += &format!(", '{}': {{{}}}", pl_name, ext.1.join(", ")); - // pl_ext_args.push(format!("")); }, ExtensionSource::Aux(ref ns, _) => { aux_ext_str += &format!(", '{}': {{{}}}", ns, ext.1.join(", ")); @@ -255,9 +243,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation if !aux_ext_str.is_empty() { aux_ext_str = aux_ext_str[2..].to_string(); } - // app_ext_str += "}"; - // pl_ext_str += "}"; - // aux_ext_str += "}"; } cmd += &format!( ", ext_args={{'app': {{{}}}, 'plugin': {{{}}}, 'aux': {{{}}}}}", @@ -269,7 +254,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation if let Some(exts) = cmd_exts { let mut ext_setups: Vec = vec!(); for ext in exts { - // ext_setup: HashMap<&str, String> = HashMap::new(); let mut ext_setup = "{".to_string(); match ext.source { ExtensionSource::App => { @@ -287,30 +271,20 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation "'root': r'{}', 'name': r'{}', 'source': 'aux'", path.display(), ns, - // plugins.unwrap().plugins.get(pl_name).unwrap().root.as_path().join(format!("commands/extensions/{}.py", ext.extends)).display() ); } } ext_setup += "}"; - // ext_setups.push(ext_setup.iter().map( |n, v| &format!("'{}': '{}'", )).collect::>().join(', ')) ext_setups.push(ext_setup); } cmd += &format!(", extensions=[{}]", ext_setups.join(", ")); } if let Some(pls) = plugins { - // let mut pls_config = "{".to_string(); cmd += &format!( ", plugins={{{}}}", pls.plugins.iter().map(|(n, pl)| format!("'{}': {{'root': r'{}'}}", n, pl.root.display())).collect::>().join(", ") ); - // for pl in pls { - // pl_config = format!("'{}': {{}}", pl.name, pl.root.display()); - // cmd += - // pl_config += "}"; - // } - // pls_config += "}"; - // cmd += &format!(", plugins={}") } if let Some(top_overrides) = overrides { @@ -333,7 +307,6 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation cmd += ");"; log_debug!("Launching Python: '{}'", &cmd); - // println!("CMD: {}", cmd); match python::run(&cmd) { Err(e) => { diff --git a/rust/origen/cli/src/commands/target.rs b/rust/origen/cli/src/commands/target.rs index da0283d7..c8094e49 100644 --- a/rust/origen/cli/src/commands/target.rs +++ b/rust/origen/cli/src/commands/target.rs @@ -37,29 +37,29 @@ gen_core_cmd_funcs__no_exts__no_app_opts!( BASE_CMD, "Set/view the default target", { |cmd: App<'a>| { cmd.arg(full_paths_opt!()).visible_alias("t") }}, - core_subcmd__no_app_opts!("add", "Activates the given target(s)", { |cmd: App| { + core_subcmd__no_exts__no_app_opts!("add", "Activates the given target(s)", { |cmd: App| { cmd.visible_alias("a") .arg(targets_arg!("Targets to be activated")) .arg(full_paths_opt!()) }}), - core_subcmd__no_app_opts!("clear", "Deactivates any and all current targets", { |cmd: App| { + core_subcmd__no_exts__no_app_opts!("clear", "Deactivates any and all current targets", { |cmd: App| { cmd.visible_alias("c") }}), - core_subcmd__no_app_opts!("remove", "Deactivates the given target(s)", { |cmd: App| { + core_subcmd__no_exts__no_app_opts!("remove", "Deactivates the given target(s)", { |cmd: App| { cmd.visible_alias("r") .arg(targets_arg!("Targets to be deactivated")) .arg(full_paths_opt!()) }}), - core_subcmd__no_app_opts!("set", "Activates the given target(s) while deactivating all others", { |cmd: App| { + core_subcmd__no_exts__no_app_opts!("set", "Activates the given target(s) while deactivating all others", { |cmd: App| { cmd.visible_alias("s") .arg(targets_arg!("Targets to be set")) .arg(full_paths_opt!()) }}), - core_subcmd__no_app_opts!("default", "Activates the default target(s) while deactivating all others", { |cmd: App| { + core_subcmd__no_exts__no_app_opts!("default", "Activates the default target(s) while deactivating all others", { |cmd: App| { cmd.visible_alias("d") .arg(full_paths_opt!()) }}), - core_subcmd__no_app_opts!("view", "Views the currently activated target(s)", { |cmd: App| { + core_subcmd__no_exts__no_app_opts!("view", "Views the currently activated target(s)", { |cmd: App| { cmd.visible_alias("v") .arg(full_paths_opt!()) }}) diff --git a/rust/origen/cli/src/framework/core_cmds.rs b/rust/origen/cli/src/framework/core_cmds.rs index 6190092f..ec0562ef 100644 --- a/rust/origen/cli/src/framework/core_cmds.rs +++ b/rust/origen/cli/src/framework/core_cmds.rs @@ -2,11 +2,14 @@ use super::{CmdHelps, Extensions}; use origen::Result; use clap::Command; -pub fn add_core_subc_helps(helps: &mut CmdHelps, base_name: &str, cmd: &str, cmd_help: &str, subcmds: &[SubCmd]) { +pub fn add_core_subc_helps(helps: &mut CmdHelps, base_name: &str, cmd: &str, cmd_help: &str, extendable: bool, subcmds: &[SubCmd]) { let n = format!("{}.{}", base_name, cmd); - helps.add_core_cmd(&n).set_help_msg(cmd_help); + let h = helps.add_core_cmd(&n).set_help_msg(cmd_help); + if !extendable { + h.set_as_not_extendable(); + } for subc in subcmds { - add_core_subc_helps(helps, &n, subc.name, subc.help, subc.subcmds); + add_core_subc_helps(helps, &n, subc.name, subc.help, subc.extendable, subc.subcmds); } } @@ -36,23 +39,25 @@ pub struct SubCmd<'a> { pub subcmds: &'a [SubCmd<'a>], pub proc: Option<&'a dyn Fn(Command) -> Command>, pub include_app_opts: bool, + pub extendable: bool, } #[macro_export] macro_rules! core_subcmd { ($($args:tt)+) => {{ - $crate::_core_subcmd!(true, $($args)*) + $crate::_core_subcmd!(true, true, $($args)*) }} } #[macro_export] macro_rules! _core_subcmd { - ($include_app_opts:expr, $name:expr, $help:expr, $proc:tt) => {{ + ($include_app_opts:expr, $extendable:expr, $name:expr, $help:expr, $proc:tt) => {{ $crate::framework::core_cmds::SubCmd { name: $name, help: $help, subcmds: &[], proc: Some(&$proc), include_app_opts: $include_app_opts, + extendable: $extendable, } }}; @@ -63,6 +68,7 @@ macro_rules! _core_subcmd { subcmds: &[$($subcmd),*], proc: Some(&$proc), include_app_opts: $include_app_opts, + extendable: true, } }}; @@ -73,6 +79,7 @@ macro_rules! _core_subcmd { subcmds: &[], proc: None, include_app_opts: $include_app_opts, + extendable: true, } }}; @@ -83,14 +90,15 @@ macro_rules! _core_subcmd { subcmds: &[$($subcmd),*], proc: None, include_app_opts: $include_app_opts, + extendable: true, } }}; } #[macro_export] -macro_rules! core_subcmd__no_app_opts { +macro_rules! core_subcmd__no_exts__no_app_opts { ($($args:tt)+) => {{ - $crate::_core_subcmd!(false, $($args)*) + $crate::_core_subcmd!(false, false, $($args)*) }} } @@ -103,7 +111,7 @@ macro_rules! gen_core_cmd_funcs { pub (crate) fn add_helps(helps: &mut $crate::CmdHelps) { helps.add_core_cmd($base_name).set_help_msg($cmd_help); $( - $crate::framework::core_cmds::add_core_subc_helps(helps, $base_name, $subcmd.name, $subcmd.help, $subcmd.subcmds); + $crate::framework::core_cmds::add_core_subc_helps(helps, $base_name, $subcmd.name, $subcmd.help, $subcmd.extendable, $subcmd.subcmds); )* } @@ -124,9 +132,9 @@ macro_rules! gen_core_cmd_funcs { macro_rules! gen_core_cmd_funcs__no_exts__no_app_opts { ($base_name:expr, $cmd_help:expr, $proc:tt, $($subcmd:expr ), *) => { pub (crate) fn add_helps(helps: &mut $crate::CmdHelps) { - helps.add_core_cmd($base_name).set_help_msg($cmd_help); + helps.add_core_cmd($base_name).set_help_msg($cmd_help).set_as_not_extendable(); $( - $crate::framework::core_cmds::add_core_subc_helps(helps, $base_name, $subcmd.name, $subcmd.help, $subcmd.subcmds); + $crate::framework::core_cmds::add_core_subc_helps(helps, $base_name, $subcmd.name, $subcmd.help, $subcmd.extendable, $subcmd.subcmds); )* } @@ -139,4 +147,16 @@ macro_rules! gen_core_cmd_funcs__no_exts__no_app_opts { Ok(app.subcommand(cmd)) } }; + + ($base_name:expr, $cmd_help:expr, $proc:tt) => { + pub (crate) fn add_helps(helps: &mut $crate::CmdHelps) { + helps.add_core_cmd($base_name).set_help_msg($cmd_help).set_as_not_extendable(); + } + + pub (crate) fn add_commands<'a>(app: clap::Command<'a>, helps: &'a $crate::CmdHelps, exts: &'a $crate::Extensions) -> origen::Result> { + let mut cmd = helps.core_cmd($base_name); + cmd = $proc(cmd); + Ok(app.subcommand(cmd)) + } + }; } \ No newline at end of file diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs index e037d815..d27a75a8 100644 --- a/rust/origen/cli/src/framework/extensions.rs +++ b/rust/origen/cli/src/framework/extensions.rs @@ -3,8 +3,8 @@ use origen::Result; use super::plugins::Plugin; use super::aux_cmds::{AuxCmdNamespace}; use clap::Command as ClapCommand; -use super::{ArgTOML, Arg, OptTOML, Opt, CmdSrc, Applies, CmdOptCache}; -use crate::{from_toml_args, from_toml_opts}; +use super::{OptTOML, Opt, CmdSrc, Applies, CmdOptCache}; +use crate::from_toml_opts; use std::path::PathBuf; use std::fmt; diff --git a/rust/origen/cli/src/framework/helps.rs b/rust/origen/cli/src/framework/helps.rs index 98174d23..c4a36879 100644 --- a/rust/origen/cli/src/framework/helps.rs +++ b/rust/origen/cli/src/framework/helps.rs @@ -4,6 +4,8 @@ use std::fmt; use super::extensions::ExtensionSource; use origen_metal::indexmap::IndexSet; +pub const NOT_EXTENDABLE_MSG: &'static str = "This command does not support extensions."; + #[derive(Debug)] pub struct CmdHelps { helps: HashMap @@ -77,6 +79,14 @@ impl CmdHelps { pub fn apply_exts(&mut self, extensions: &Extensions) { for (target, exts) in extensions.exts() { if let Some(help) = self.helps.get_mut(&target) { + if !help.extendable { + log_error!("Command '{}' does not support extensions but an extension was attempted from:", target); + for ext in exts { + log_error!("\t{}", ext.source); + } + continue; + } + let mut extended_from_app = false; let mut pls: IndexSet<&str> = IndexSet::new(); let mut nspaces: IndexSet<&str> = IndexSet::new(); @@ -103,30 +113,38 @@ impl CmdHelps { nspaces.iter().map(|n| format!("'{}'", n)).collect::>().join(", ") ); } - // exts.iter().map( |e| e.source.to_string()).collect::>().join(", ") if let Some(after) = help.after_help.as_ref() { help.after_help = Some(after.to_string() + "\n\n" + &msg); } else { help.after_help = Some(msg); } } else { - // Suppress any app command errors when in the global context - // if !app_present!() && target.is_app_cmd() { - log_error!("Tried to extend unknown command '{}' from:", target); - for ext in exts { - log_error!("\t{}", ext.source); - } - // } + log_error!("Tried to extend unknown command '{}' from:", target); + for ext in exts { + log_error!("\t{}", ext.source); + } } } } } -#[derive(Default, Debug)] +#[derive(Debug)] pub struct CmdHelp { help: Option, after_help: Option, before_help: Option, + extendable: bool, +} + +impl Default for CmdHelp { + fn default() -> Self { + Self { + help: None, + after_help: None, + before_help: None, + extendable: true, + } + } } impl CmdHelp { @@ -139,6 +157,16 @@ impl CmdHelp { self.help = help_msg; self } + + pub fn set_as_not_extendable(&mut self) -> &mut Self { + self.extendable = false; + if let Some(h) = self.after_help.as_mut() { + self.after_help = Some(format!("{h}\n\n{NOT_EXTENDABLE_MSG}")); + } else { + self.after_help = Some(NOT_EXTENDABLE_MSG.to_string()); + } + self + } } #[derive(Debug, Hash, Eq, PartialEq)] diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index 46116b23..ad96fc52 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -6,6 +6,9 @@ pub mod aux_cmds; pub mod app_cmds; pub mod core_cmds; +use std::collections::HashMap; +use origen_metal::indexmap::IndexMap; + pub use extensions::{Extensions, ExtensionTOML, Extension}; pub use plugins::{Plugins, Plugin}; pub use aux_cmds::AuxCmds; @@ -15,6 +18,7 @@ use std::{env}; use clap::{App}; use clap::Command as ClapCommand; +use clap::Arg as ClapArg; use origen::{Result, in_app_invocation}; use crate::commands::_prelude::clap_arg_actions::*; @@ -312,8 +316,6 @@ impl Applies for Command { } } -use std::collections::{HashSet, HashMap}; -use origen_metal::indexmap::IndexMap; #[derive(Debug)] pub struct CmdOptCache { opt_names: Vec, @@ -615,7 +617,7 @@ impl Opt { fn from_toml(opt: &OptTOML, cmd_path: &str, parent: &dyn Display, ext: Option<&str>) -> Self { macro_rules! gen_err { ($msg:tt $(,)? $($arg:expr),*) => {{ - if let Some(e) = ext { + if ext.is_some() { log_err_processing_cmd!(cmd_path, concat!("Option '{}' extended from {} ", $msg), opt.name, parent, $($arg),*); } else { log_err_processing_cmd!(cmd_path, concat!("Option '{}' ", $msg), opt.name, $($arg),*); @@ -717,7 +719,7 @@ impl Opt { } else if (&opt.name == lna) && ln.is_none() { gen_err!("specifies long name alias '{}' but it conflicts with the option's inferred long name. If this is intentional, please set this as the option's long name", lna); return None - } else if let Some(idx) = lnas.get(lna) { // lnas.contains(&lna.as_str()) { + } else if let Some(idx) = lnas.get(lna) { gen_err!("repeats long name alias '{}' (first occurrence at index {})", lna, idx); return None } @@ -938,8 +940,10 @@ pub const HELP_OPT_NAME: &str = "help"; pub const HELP_OPT_SHORT_NAME: char = 'h'; pub const VERBOSITY_KEYWORDS_OPT_NAME: &str = "verbosity_keywords"; pub const VERBOSITY_KEYWORDS_OPT_LONG_NAME: &str = "vk"; -pub const VERBOSITY_OPT_NAME: &str = "verbosity"; +pub const VERBOSITY_OPT_NAME: &str = "verbose"; pub const VERBOSITY_OPT_SHORT_NAME: char = 'v'; +// pub const VERBOSITY_OPT_LONG_NAME: &str = "verbose"; +pub const VERBOSITY_OPT_LNA: &str = "verbosity"; pub const TARGET_OPT_NAME: &str = "targets"; pub const TARGET_OPT_ALIAS: &str = "target"; pub const TARGET_OPT_SN: char = 't'; @@ -953,13 +957,55 @@ pub const RESERVED_OPT_NAMES: &[&str] = &[ TARGET_OPT_NAME, TARGET_OPT_ALIAS, NO_TARGET_OPT_NAME, NO_TARGET_OPT_ALIAS, MODE_OPT_NAME, - VERBOSITY_OPT_NAME + VERBOSITY_OPT_NAME, VERBOSITY_OPT_LNA, ]; pub const RESERVED_OPT_SHORT_NAMES: &[char] = &[ HELP_OPT_SHORT_NAME, TARGET_OPT_SN, VERBOSITY_OPT_SHORT_NAME ]; +static VERBOSITY_HELP_STR: &str = "Terminal verbosity level e.g. -v, -vv, -vvv"; +static VERBOSITY_KEYWORD_HELP_STR: &str = "Keywords for verbose listeners"; + +pub const VOV_OPT_NAME: &str = "version_or_verbosity"; + +pub fn add_verbosity_opts<'a>(mut cmd: ClapCommand<'a>, split_v: bool) -> ClapCommand<'a> { + if split_v { + cmd.arg( + ClapArg::new(VERBOSITY_OPT_NAME) + .long(VERBOSITY_OPT_NAME) + .visible_alias(VERBOSITY_OPT_LNA) + .action(CountArgs) + ) + .arg( + ClapArg::new(VOV_OPT_NAME) + .short(VERBOSITY_OPT_SHORT_NAME) + .action(CountArgs) + ) + } else { + cmd.arg( + ClapArg::new(VERBOSITY_OPT_NAME) + .long(VERBOSITY_OPT_NAME) + .visible_alias(VERBOSITY_OPT_LNA) + .short(VERBOSITY_OPT_SHORT_NAME) + .action(CountArgs) + .global(true) + .help(VERBOSITY_HELP_STR), + ) + } + .arg( + ClapArg::new(VERBOSITY_KEYWORDS_OPT_NAME) + .long(VERBOSITY_KEYWORDS_OPT_NAME) + .visible_alias(VERBOSITY_KEYWORDS_OPT_LONG_NAME) + .multiple(true) + .action(AppendArgs) + .global(true) + .help(VERBOSITY_KEYWORD_HELP_STR) + .number_of_values(1) + .use_value_delimiter(true) + ) +} + macro_rules! add_mode_opt { ($cmd:expr) => { $cmd.arg(clap::Arg::new(crate::framework::MODE_OPT_NAME) diff --git a/rust/origen_metal/src/framework/logger.rs b/rust/origen_metal/src/framework/logger.rs index 5408c3f8..ab88a60a 100644 --- a/rust/origen_metal/src/framework/logger.rs +++ b/rust/origen_metal/src/framework/logger.rs @@ -97,9 +97,12 @@ impl Logger { } pub fn set_verbosity(&self, level: u8) -> Result<()> { - log_debug!("Setting logger verbosity to '{}'", level); - let mut inner = self.inner.write().unwrap(); - inner.level = level; + log_debug!("Setting Logger Verbosity: {}", level); + { + let mut inner = self.inner.write().unwrap(); + inner.level = level; + } + log_debug!("Logger Verbosity: {}", level); Ok(()) } @@ -495,7 +498,7 @@ impl Logger { } pub fn set_verbosity_keywords(&self, keywords: Vec) -> Result<()> { - log_debug!("Setting verbosity keywords: {:?}", keywords); + log_debug!("Setting Verbosity Keywords: {:?}", keywords); let mut inner = self.inner.write().unwrap(); inner.keywords = keywords; Ok(()) diff --git a/test_apps/python_app/config/commands.toml b/test_apps/python_app/config/commands.toml index 403e2071..d8032640 100644 --- a/test_apps/python_app/config/commands.toml +++ b/test_apps/python_app/config/commands.toml @@ -564,3 +564,18 @@ on_env = ["ORIGEN_APP_EXT_TEST_RESERVED_OPT_ERRORS"] name = "conflicting_vk" help = "Conflicting Core Extension" long_aliases=["verbosity_keywords", "vk"] + +# Try to extend non-extenable commands +[[extension]] +extend = "origen.target" +on_env = ["ORIGEN_EXT_TARGET_CMD"] + [[extension.opt]] + name = "test_ext" + help = "Test target" + +[[extension]] +extend = "origen.target.view" +on_env = ["ORIGEN_EXT_TARGET_CMD"] + [[extension.opt]] + name = "test_ext" + help = "Test target view" diff --git a/test_apps/python_app/tests/cli/core_cmds/target.py b/test_apps/python_app/tests/cli/core_cmds/target.py index a72d35df..c0f7369a 100644 --- a/test_apps/python_app/tests/cli/core_cmds/target.py +++ b/test_apps/python_app/tests/cli/core_cmds/target.py @@ -84,6 +84,7 @@ def test_help_msg(self, cmd): help.assert_subcmds(cmd.subcmds, help=3) else: help.assert_subcmds(None) + help.assert_not_extendable() def test_adding_targets(self, clear_targets, eagle, uflex, smt7, smt8): add = self.cmd.add diff --git a/test_apps/python_app/tests/cli/shared.py b/test_apps/python_app/tests/cli/shared.py index b88ad79e..dd75c507 100644 --- a/test_apps/python_app/tests/cli/shared.py +++ b/test_apps/python_app/tests/cli/shared.py @@ -3,12 +3,15 @@ from tests.shared import PythonAppCommon from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg, CmdExtOpt +from test_apps_shared_test_helpers.cli.cmd_models import SrcBase Cmd = CLIShared.Cmd class CLICommon(CLIShared, PythonAppCommon): - class AppCmds: + class AppCmds(SrcBase): def __init__(self): + self.src_type = cli.SrcTypes.APP + self.name = "example" self.warmup_cmd = CLIShared.app_sub_cmd( "arg_opt_warmup", help = "Gross test command demonstrating args/opts from app commands", diff --git a/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py b/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py new file mode 100644 index 00000000..08d4a7ac --- /dev/null +++ b/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py @@ -0,0 +1,50 @@ +import pytest +from cli.shared import CLICommon +from .core_cmds.target import TargetCLI + +class T_NonExtendableErrMsgs(TargetCLI): + with_env = {"ORIGEN_EXT_TARGET_CMD": "1"} + _cmd = CLICommon.in_app_commands.target.extend( + [], + with_env=with_env + ) + # TODO have with_env extension apply to subcommands? + view_cmd = CLICommon.in_app_commands.target.view.extend( + [], + with_env=with_env + ) + + @pytest.fixture + def cmd(self): + return self._cmd + + err_srcs = [CLICommon.plugins.tas, CLICommon.plugins.python_plugin, CLICommon.app_cmds] + + @classmethod + def assert_non_ext_errors(cls, out): + errors = "\n".join(cls.extract_logged_errors(out)) + print(errors) + cls.assert_ext_non_ext_cmd_msg(errors, cls._cmd.view, cls.err_srcs) + cls.assert_ext_non_ext_cmd_msg(errors, cls._cmd, cls.err_srcs) + + def test_err_msg(self, cmd): + help = cmd.get_help_msg() + print(help.text) + help.assert_opts(cmd.full_paths, "h", "v", "vk") + self.assert_non_ext_errors(help.text) + + def test_err_msg_when_run(self, cmd, eagle): + out = cmd.run() + self.assert_non_ext_errors(out) + self.assert_out(out, eagle) + + def test_err_msg_subc(self): + cmd = self.view_cmd + help = cmd.get_help_msg() + help.assert_opts(cmd.full_paths, "h", "v", "vk") + self.assert_non_ext_errors(help.text) + + def test_subc_err_msg_when_run(self, eagle): + out = self.view_cmd.run() + self.assert_non_ext_errors(out) + self.assert_out(out, eagle) diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 7360225b..290ff72b 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -11,6 +11,7 @@ from cli.tests__cmd_integration import T_CommandIntegration from cli.tests__intra_cmd_conflicts import T_IntraCmdConflicts from cli.tests__extending_app_cmds import T_ExtendingAppCmds +from cli.tests__non_extendable_err_msgs import T_NonExtendableErrMsgs class TestAppCmdBuilding(T_AppCmdBuilding): pass @@ -33,6 +34,9 @@ class TestReservedOpts(T_ReservedOpts): class TestCommandIntegration(T_CommandIntegration): pass +class TestNonExtendableErrMsgs(T_NonExtendableErrMsgs): + pass + origen_cli = os.getenv('TRAVIS_ORIGEN_CLI') or 'origen' def test_origen_v(): diff --git a/test_apps/python_app/tests/shared/__init__.py b/test_apps/python_app/tests/shared/__init__.py index b5e95943..05886abb 100644 --- a/test_apps/python_app/tests/shared/__init__.py +++ b/test_apps/python_app/tests/shared/__init__.py @@ -142,7 +142,6 @@ def show_per_cmd_targets(self, targets=None, **kwargs): targets = [(t.name if isinstance(t, Targets.Target) else t) for t in targets] kwargs.setdefault("run_opts", {})["targets"] = targets out = CLICommon.eval(f"print( f'{prefix}{{origen.target.current_targets}}' )", **kwargs) - print(out) out = out.split("\n") return eval(next(t.replace(prefix, '') for t in out if t.startswith(prefix))) diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py index 3ffaec23..f55ba9df 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py @@ -18,7 +18,7 @@ def test_help_msg(self, cmd, no_config_run_opts): help.assert_args(cmd.code) help.assert_bare_opts() - def test_with_single_statment(self, cmd, no_config_run_opts): + def test_with_single_statement(self, cmd, no_config_run_opts): d = cmd.demos["multi_statement_single_arg"] out = d.run(run_opts=no_config_run_opts) d.assert_present(out) @@ -45,3 +45,8 @@ def test_error_in_statements_still_runs_cleanup(self, cmd, no_config_run_opts): d.assert_present(out["stderr"]) print(out["stdout"]) fail + + def test_clean_eval(self): + eval_prefix = "Origen Version From Eval: " + out = self.eval("print (f'" + eval_prefix + "{origen.version}' )") + assert out == f"{eval_prefix}{origen.version}\n" diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__exec.py b/test_apps/python_no_app/tests/cli/tests__cmd__exec.py new file mode 100644 index 00000000..9f3c3e2c --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__exec.py @@ -0,0 +1,56 @@ +import origen, pytest +from .shared import CLICommon + +class T_Exec(CLICommon): + _cmd= origen.helpers.regressions.cli.CLI.global_cmds.exec + + def test_help_msg(self, cmd): + help = cmd.get_help_msg() + help.assert_summary(cmd.help) + help.assert_args(cmd.command, cmd.args["args"]) + help.assert_opts("h", "v", "vk") + help.assert_not_extendable() + + def test_without_any_args(self, cmd): + out = cmd.gen_error() + self.assert_v(out, None) + self.assert_args_required_msg(out, cmd.command) + + def test_error_on_usage(self, cmd): + out = cmd.gen_error(return_full=True, pre_cmd_opts=["-vv", "--vk", "vk_arg", "--blah"]) + self.assert_v(out["stdout"], 2, "vk_arg") + self.assert_invalid_ln_msg(out["stderr"], "blah") + + def test_verbosity_in_errors(self, cmd): + out = cmd.gen_error(return_full=True, pre_cmd_opts=["-vv", "--vk", "vk_arg", "--verbose"]) + print(out["stdout"]) + self.assert_v(out["stdout"], 3, ["vk_arg"]) + self.assert_args_required_msg(out["stderr"], cmd.command) + + out = cmd.gen_error(return_full=True, pre_cmd_opts=["-vv", "--vk", "vk0", "--verbose", "--vk", "vk1", "--blah"]) + self.assert_v(out["stdout"], 3, ["vk0", "vk1"]) + self.assert_invalid_ln_msg(out["stderr"], "blah") + + out = cmd.gen_error(return_full=True, pre_cmd_opts=["-b", "-vv", "--vk", "vk_arg"]) + self.assert_v(out["stdout"], 2, ["vk_arg"]) + self.assert_invalid_sn_msg(out["stderr"], "b") + + def test_args_post_cmd_is_part_of_exec_args(self, cmd): + out = cmd.run("echo", "-h", "-v", "-v") + assert out == "-h -v -v\n" + self.assert_v(out, None) + + out = cmd.run("echo", "-v", "--help") + assert out == "-v --help\n" + self.assert_v(out, None) + + # -- is needed to interpret long arg names as values and not options + out = cmd.run("echo", "--", "--vk", "hi", "bye", "-v") + assert out == "--vk hi bye -v\n" + self.assert_v(out, None) + + def test_args_pre_cmd_are_applied_to_origen(self, cmd): + out = cmd.run("echo", "echoing...", "--", "--vk", "hi", "bye", "-v", pre_cmd_opts=["-vvv", "--vk", "vk0,vk1"]) + self.assert_v(out, 3, ["vk0", "vk1"]) + # Remove the closing coloration from the previous line + assert out.split("\n")[-2].replace("\x1b[0m", '') == "echoing... --vk hi bye -v" diff --git a/test_apps/python_no_app/tests/cli/tests__global_cmds.py b/test_apps/python_no_app/tests/cli/tests__global_cmds.py index 7a56498f..9842d49e 100644 --- a/test_apps/python_no_app/tests/cli/tests__global_cmds.py +++ b/test_apps/python_no_app/tests/cli/tests__global_cmds.py @@ -4,42 +4,9 @@ from tests.cmd_building.shared import CLICommon as CmdTestersCommon class T_GlobalCmds(CLICommon): - def test_origen_v(self): - out = run_cli_cmd(["-v"]) - assert "Origen: " in out - assert "CLI: " in out - assert "app" not in out.lower() - - def test_global_help_message_core_commands(self): - out = run_cli_cmd(["-h"]) - help = CmdTestersCommon.HelpMsg(out) - assert help.root_cmd is True - assert "Origen: 2." in help.version_str - help.assert_bare_opts() - - - # TODO check order? - assert set(s["name"] for s in help.subcmds) == set(self.global_cmds.all_names_add_help) - assert help.app_cmd_shortcuts == None - assert help.pl_cmd_shortcuts == { - "plugin_says_hi": ("python_plugin", "plugin_says_hi"), - "echo": ("python_plugin", "echo"), - "plugin_test_args": ("python_plugin", "plugin_test_args"), - "plugin_test_ext_stacking": ("python_plugin", "plugin_test_ext_stacking"), - } - assert help.aux_cmd_shortcuts == { - "python_no_app_tests": ("cmd_testers", "python_no_app_tests"), - "test_current_command": ("cmd_testers", "test_current_command"), - "test_nested_level_1": ("cmd_testers", "test_nested_level_1"), - "test_arguments": ("cmd_testers", "test_arguments"), - "error_cases": ("cmd_testers", "error_cases"), - "say_hi": ("python_no_app_aux_cmds", "say_hi"), - "say_bye": ("python_no_app_aux_cmds", "say_bye"), - } - @pytest.mark.parametrize("cmd", CLICommon.global_cmds.cmds, ids=CLICommon.global_cmds.all_names) def test_core_commands_are_available(self, cmd): - ''' Just testing that "-h" doesn't crash for all core commands ''' + ''' Just testing that "-h" (or help for some commands) doesn't crash for all core commands ''' help = cmd.get_help_msg() assert len(help.opts) >= 3 # FOR_PR diff --git a/test_apps/python_no_app/tests/cli/tests__invocation_errors.py b/test_apps/python_no_app/tests/cli/tests__invocation_errors.py new file mode 100644 index 00000000..437ff8e3 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__invocation_errors.py @@ -0,0 +1,59 @@ +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg +import pytest + +class T_InvocationErrors(CLIShared): + def test_with_unknown_cmds(self): + out = self.gen_error(["blah_cmd"], return_details=True) + self.assert_v(out["stdout"], None) + self.assert_invalid_arg_msg(out["stderr"], "blah_cmd") + + out = self.gen_error(["--vk", "vk0", "blah_cmd", "-vv"], return_details=True) + self.assert_v(out["stdout"], 2, ["vk0"]) + self.assert_invalid_arg_msg(out["stderr"], "blah_cmd") + + def test_with_unknown_options(self): + out = self.gen_error(["--blah_opt"], return_details=True) + self.assert_v(out["stdout"], None) + self.assert_invalid_ln_msg(out["stderr"], "blah_opt") + + out = self.gen_error(["--verbose", "--vk", "vk_opt_1", "--blah_opt", "--verbose", "--vk", "vk_opt_2,vk_opt_3"], return_details=True) + self.assert_v(out["stdout"], 2, ["vk_opt_1", "vk_opt_2", "vk_opt_3"]) + self.assert_invalid_ln_msg(out["stderr"], "blah_opt") + + inv_subc = "invalid_subc" + invalid_help_subc_cases = [ + ("help_pre_subc", "invalid_subc", ["help", inv_subc], None, None), + ("help_post_subc", "invalid_arg", [inv_subc, "help"], None, None), + ("help_sn_pre", "invalid_arg", [inv_subc, "-h", "-vv"], 2, None), + ("help_ln", "invalid_arg", [inv_subc, "--help", "-vv", "--vk", "vk_ln"], 2, "vk_ln"), + + # This will parse "-h" first, meaning this will actually display help message, not an error + ("help_sn_post", None, ["-h", "-vv", inv_subc, "--vk", "vk0,vk1"], 2, ["vk0", "vk1"]), + ] + @pytest.mark.parametrize("assert_method,args,vlvl,vks", [h[1:] for h in invalid_help_subc_cases], ids=[h[0] for h in invalid_help_subc_cases]) + def test_help_with_unknown_subcs(self, assert_method, args, vlvl, vks): + if assert_method is None: + out = self.run_cli_cmd(args) + self.assert_core_help(out) + else: + out = self.gen_error(args, return_details=True) + getattr(self, f"assert_{assert_method}_msg")(out["stderr"], self.inv_subc) + out = out["stdout"] + self.assert_v(out, vlvl, vks) + + misuses = [ + ("eval_without_files", "missing_arg", CLIShared.global_cmds.eval.code, ["-vv", "eval", "--vk", "vk_g"], 2, "vk_g"), + ("eval_with_invalid_opt", "invalid_ln", "blah_opt", ["eval", "\"print( 'hi' )\"", "--blah_opt", "-vv", "--vk", "vk_opt"], 2, "vk_opt"), + ("eval_with_invalid_opt_pre_cmd", "invalid_ln", "blah_opt", ["--blah_opt", "-vv", "--vk", "vk_opt", "eval", "\"print( 'hi' )\"", "-v"], 3, "vk_opt"), + ("missing_vk_val", "missing_ln_val", CLIShared.opts.vk, ["eval", "\"print( 'hi' )\"", "--vk", "-vv"], None, None), + ("missing_vk_val", "missing_ln_val", CLIShared.opts.vk, ["-h", "--vk", "-vv"], None, None), + + # Help subc will view anything after as subcommand + # e.g.: "help -h" will try to "help" the subc "-h", which won't exists + ("help_subc_and_sn", "invalid_subc", "-h", ["help", "-h"], None, None), + ] + @pytest.mark.parametrize("assert_method,offender,args,vlvl,vks", [h[1:] for h in misuses], ids=[h[0] for h in misuses]) + def test_command_misuse_with_verbosity(self, assert_method, offender, args, vlvl, vks): + out = self.gen_error(args, return_details=True) + self.assert_v(out["stdout"], vlvl, vks) + getattr(self, f"assert_{assert_method}_msg")(out["stderr"], offender) diff --git a/test_apps/python_no_app/tests/cli/tests__origen_help.py b/test_apps/python_no_app/tests/cli/tests__origen_help.py new file mode 100644 index 00000000..698dec43 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__origen_help.py @@ -0,0 +1,31 @@ +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg +import pytest + +class T_OrigenHelp(CLIShared): + help_invocations = [ + ("sn", ["-h"]), + ("ln", ["--help"]), + ("subc", ["help"]), + ("sn_and_ln", ["-h", "--help"], + ("help_on_no_subc", [])), + ] + @pytest.mark.parametrize("args", [h[1] for h in help_invocations], ids=[h[0] for h in help_invocations]) + def test_origen_help(self, args): + out = self.run_cli_cmd(args) + self.assert_v(out, None) + self.assert_core_help(out) + + verbose_help_invocs = [ + ("sns", (["-h", "-v", "-v", "-v"], 3, None)), + ("ln_with_vks", (["-vv", "--help", "--vk", "vk0,vk1"], 2, ["vk0", "vk1"])), + ("subc_with_vks", (["-vv", "--vk", "vka", "--verbose", "--vk", "vkb", "help"], 3, ["vka", "vkb"]), + ("no_subc", (["--verbose", "--vk", "vk", "--verbose"], 2, ["vk"]))), + + # These won't show since verbosity is not enabled, but should get the help message without other errors + ("vks_only", (["--vk", "vk0", "--vk", "vk1"], None, None)), + ] + @pytest.mark.parametrize("args,vlvl,vks", [h[1] for h in verbose_help_invocs], ids=[h[0] for h in verbose_help_invocs]) + def test_help_with_verbosity(self, args, vlvl, vks): + out = self.run_cli_cmd(args) + self.assert_v(out, vlvl, vks) + self.assert_core_help(out) diff --git a/test_apps/python_no_app/tests/cli/tests__origen_v.py b/test_apps/python_no_app/tests/cli/tests__origen_v.py new file mode 100644 index 00000000..2dcff544 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__origen_v.py @@ -0,0 +1,20 @@ +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg +import pytest + +class T_OrigenVersion(CLIShared): + def test_origen_v(self): + out = self.cmds.v.run() + self.assert_v(out, None) + self.assert_no_app_origen_v(out) + + invocs = [ + ("vvv", ["-vvv"], 2, None), + ("v_v_v", ["-v", "-v", "-v"], 2, None), + ("vks", ["-v", "--verbose", "--vk", "vk0", "-vv"], 3, ["vk0"]), + ("vks_2", ["--verbose", "--vk", "vka", "-vv", "--vk", "vkb"], 2, ["vka", "vkb"]), + ] + @pytest.mark.parametrize("args,vlvl,vks", [[h[1], h[2], h[3]] for h in invocs], ids=[h[0] for h in invocs]) + def test_origen_v_with_verbosity(self, args, vlvl, vks): + out = self.run_cli_cmd(args) + self.assert_v(out, vlvl, vks) + self.assert_no_app_origen_v(out, version_only=False) diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml b/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml index ef264609..483052b4 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers.toml @@ -4,10 +4,6 @@ help = "Commands to assist in testing aux commands when no app is present" name = "python_no_app_tests" help = "Test commands for python-no-app workspace" -[[command]] -name = "test_current_command" -help = "Tests origen.current_command" - [[command]] name = "test_nested_level_1" help = "Tests origen.current_command L1" diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_current_command.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_current_command.py deleted file mode 100644 index 7188bb8b..00000000 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_current_command.py +++ /dev/null @@ -1,9 +0,0 @@ -# FOR_PR not sure if needed -import origen - -def run(**kwargs): - cc = origen.current_command - print(f"Class: {cc.__class__.__name__}") - print(f"Command: {cc.command}") - print(f"SubCommands: {cc.subcommands}") - print(f"Args: {cc.args}") diff --git a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py index a4685b87..f100f73d 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py @@ -27,7 +27,7 @@ def test_empty_verbosity_keywords_are_accessible(self): assert "keywords: []" in out def test_verbosity_keywords_are_accessible(self): - out = self.cmd_testers.display_v.run("--vk", "t1", "t2", "-v") + out = self.cmd_testers.display_v.run("--vk", "t1,t2", "-v") assert r'Args: {}' in out assert "keywords: ['t1', 't2']" in out assert "verbosity: 1" in out diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py index 9bd90f70..28bed75f 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py @@ -1,7 +1,22 @@ +import pytest from test_apps_shared_test_helpers.cli import CLIShared +class Common(CLIShared): + @pytest.fixture + def exts(self): + return self.config["exts_by_ns"] + + @pytest.fixture + def ec(self, exts): + return exts.ec + + @pytest.fixture + def tas(self, exts): + return exts.tas + + class T_ExtConflicts(CLIShared): - class TestWithPLCmd(CLIShared): + class TestWithPLCmd(Common): config = CLIShared.exts.ext_conflicts["plugin.python_plugin.plugin_test_args"] conflicts = config["conflicts_list"] cmd = CLIShared.python_plugin.plugin_test_args.extend( @@ -9,8 +24,6 @@ class TestWithPLCmd(CLIShared): from_configs=[config["cfg"]], with_env=config["env"] ) - aux_exts = config["ext_conflicts_exts"] - pl_exts = config["test_apps_shared_exts"] @classmethod def setup_class(cls): @@ -22,40 +35,40 @@ def teardown_class(cls): delattr(cls, "cmd_help") delattr(cls, "cmd_conflicts") - def test_help_msg(self): + def test_help_msg(self, ec, tas): # Check help message cmd = self.cmd help = self.cmd_help help.assert_args(cmd.single_arg, cmd.multi_arg) help.assert_opts( - self.aux_exts.aux_conflict_ln_and_aliases, - self.aux_exts.conflict_sn, - self.aux_exts.alias, - self.aux_exts.flag, - self.aux_exts.pl_aux_conflict, - self.pl_exts.flag, - self.aux_exts.ext_opt_in_ln, - self.aux_exts.ext_opt_in_lna, - self.aux_exts.ext_self_conflict, - self.aux_exts.ext_self_conflict_2, + ec.aux_conflict_ln_and_aliases, + ec.conflict_sn, + ec.alias, + ec.flag, + ec.pl_aux_conflict, + tas.flag, + ec.ext_opt_in_ln, + ec.ext_opt_in_lna, + ec.ext_self_conflict, + ec.ext_self_conflict_2, cmd.flag_opt, - self.aux_exts.repeated_sn_and_aliases, + ec.repeated_sn_and_aliases, "help", cmd.sn_only, - self.aux_exts.ns_self_conflict, + ec.ns_self_conflict, cmd.opt_taking_value, - self.pl_exts.opt_taking_value, + tas.opt_taking_value, cmd.opt_with_aliases, - self.aux_exts.opt_taking_value, - self.pl_exts.pl_aux_conflict, - self.aux_exts.pl_aux_sn_conflict_aux, - self.pl_exts.pl_conflict_ln_and_aliases, - self.pl_exts.pl_aux_sn_conflict_pl, - self.aux_exts.same_iln_and_ln_alias, - self.aux_exts.same_ln_and_ln_alias, - self.aux_exts.single_arg, - self.aux_exts.subc, + ec.opt_taking_value, + tas.pl_aux_conflict, + ec.pl_aux_sn_conflict_aux, + tas.pl_conflict_ln_and_aliases, + tas.pl_aux_sn_conflict_pl, + ec.same_iln_and_ln_alias, + ec.same_ln_and_ln_alias, + ec.single_arg, + ec.subc, "v", "vk", ) @@ -72,9 +85,8 @@ def test_conflict_messages(self): def test_error_messages_checked(self): assert len(self.cmd_conflicts) == 0 - def test_ext_conflicts_resolve_correctly(self): + def test_ext_conflicts_resolve_correctly(self, tas, ec): cmd = self.cmd - print(self.cmd_help.text) out = cmd.run( "abc", "d", "e", "--opt", "z", @@ -115,40 +127,38 @@ def test_ext_conflicts_resolve_correctly(self): (cmd.opt_taking_value, "z"), (cmd.opt_with_aliases, 3), - (self.aux_exts.single_arg, 1), - (self.aux_exts.opt_taking_value, 1), - (self.aux_exts.conflict_sn, 1), - (self.aux_exts.pl_aux_conflict, 1), - (self.aux_exts.pl_aux_sn_conflict_aux, 1), - (self.aux_exts.aux_conflict_ln_and_aliases, 2), - (self.aux_exts.flag, 1), - (self.aux_exts.alias, 2), - (self.aux_exts.subc, 1), - (self.aux_exts.ns_self_conflict, 1), - (self.aux_exts.ext_self_conflict, 1), - (self.aux_exts.ext_self_conflict_2, 2), - (self.aux_exts.ext_opt_in_ln, 1), - (self.aux_exts.ext_opt_in_lna, 2), - (self.aux_exts.same_ln_and_ln_alias, 1), - (self.aux_exts.same_iln_and_ln_alias, 1), - (self.aux_exts.repeated_sn_and_aliases, 3), - - (self.pl_exts.pl_aux_conflict, 4), - (self.pl_exts.pl_aux_sn_conflict_pl, 2), - (self.pl_exts.opt_taking_value, 1), - (self.pl_exts.pl_conflict_ln_and_aliases, 3), - (self.pl_exts.flag, 2), + (ec.single_arg, 1), + (ec.opt_taking_value, 1), + (ec.conflict_sn, 1), + (ec.pl_aux_conflict, 1), + (ec.pl_aux_sn_conflict_aux, 1), + (ec.aux_conflict_ln_and_aliases, 2), + (ec.flag, 1), + (ec.alias, 2), + (ec.subc, 1), + (ec.ns_self_conflict, 1), + (ec.ext_self_conflict, 1), + (ec.ext_self_conflict_2, 2), + (ec.ext_opt_in_ln, 1), + (ec.ext_opt_in_lna, 2), + (ec.same_ln_and_ln_alias, 1), + (ec.same_iln_and_ln_alias, 1), + (ec.repeated_sn_and_aliases, 3), + + (tas.pl_aux_conflict, 4), + (tas.pl_aux_sn_conflict_pl, 2), + (tas.opt_taking_value, 1), + (tas.pl_conflict_ln_and_aliases, 3), + (tas.flag, 2), ) - class TestWithPLSubcmd(CLIShared): + class TestWithPLSubcmd(Common): config = CLIShared.exts.ext_conflicts["plugin.python_plugin.plugin_test_args.subc"] cmd = CLIShared.python_plugin.plugin_test_args.subc.extend( config["exts"], from_configs=[config["cfg"]], with_env=config["env"] ) - aux_exts = config["ext_conflicts_exts"] - pl_exts = config["test_apps_shared_exts"] @classmethod def setup_class(cls): @@ -160,25 +170,23 @@ def teardown_class(cls): delattr(cls, "cmd_help") delattr(cls, "cmd_conflicts") - def test_help_msg(self): + def test_help_msg(self, ec, tas): cmd = self.cmd - pl_exts = self.pl_exts - aux_exts = self.aux_exts help = self.cmd_help print(help.text) help.assert_args(cmd.single_arg) help.assert_opts( - pl_exts.subc_pl_aux_conflict, - aux_exts.flag_opt, - aux_exts.more_conflicts, - pl_exts.flag_opt, + tas.subc_pl_aux_conflict, + ec.flag_opt, + ec.more_conflicts, + tas.flag_opt, cmd.flag_opt, "help", - pl_exts.more_conflicts, + tas.more_conflicts, cmd.subc_sn_only, cmd.subc_opt_with_aliases, - aux_exts.subc_pl_aux_conflict, + ec.subc_pl_aux_conflict, "v", "vk", ) @@ -199,11 +207,8 @@ def test_conflict_messages(self): def test_all_errors_checked(self): assert len(self.cmd_conflicts) == 0 - def test_conflicts_resolve_correctly(self): + def test_conflicts_resolve_correctly(self, tas, ec): cmd = self.cmd - pl_exts = self.pl_exts - aux_exts = self.aux_exts - out = cmd.run( "argv", "--flag_opt", @@ -225,13 +230,13 @@ def test_conflicts_resolve_correctly(self): (cmd.subc_sn_only, 2), (cmd.subc_opt_with_aliases, 4), - (pl_exts.subc_pl_aux_conflict, 4), - (pl_exts.flag_opt, 2), - (pl_exts.more_conflicts, 3), + (tas.subc_pl_aux_conflict, 4), + (tas.flag_opt, 2), + (tas.more_conflicts, 3), - (aux_exts.subc_pl_aux_conflict, 3), - (aux_exts.flag_opt, 3), - (aux_exts.more_conflicts, 2), + (ec.subc_pl_aux_conflict, 3), + (ec.flag_opt, 3), + (ec.more_conflicts, 2), ) class TestWithCoreCmd(CLIShared): @@ -300,17 +305,17 @@ def test_ext_arg_conflicts_with_core_cmd_msgs(self): def test_ext_opt_conflicts_with_core_cmd_help_msg(self): cmd = self.creds_clear_cmd help = self.creds_clear_cmd_help - aux_exts = self.creds_clear_config["ext_conflicts_exts"] - pl_exts = self.creds_clear_config["test_apps_shared_exts"] + ec = self.creds_clear_config["exts_by_ns"].ec + tas = self.creds_clear_config["exts_by_ns"].tas help.assert_args(None) help.assert_opts( cmd.all, - aux_exts.cmd_conflicts_aux, - pl_exts.cmd_conflicts_pl, + ec.cmd_conflicts_aux, + tas.cmd_conflicts_pl, cmd.datasets, - aux_exts.all, - pl_exts.all, + ec.all, + tas.all, "help", "v", "vk", @@ -330,4 +335,4 @@ def test_ext_opt_conflicts_with_core_cmd(self): for c in reversed(conflicts): m = self.to_conflict_msg(cmd, c) assert m in self.creds_clear_cmd_conflicts.pop() - assert len(self.eval_cmd_conflicts) == 0 + assert len(self.creds_clear_cmd_conflicts) == 0 diff --git a/test_apps/python_no_app/tests/misc_test.py b/test_apps/python_no_app/tests/misc_test.py index 7ae8bb95..3b629c52 100644 --- a/test_apps/python_no_app/tests/misc_test.py +++ b/test_apps/python_no_app/tests/misc_test.py @@ -7,9 +7,22 @@ from origen.helpers.env import in_new_origen_proc, run_cli_cmd from tests import configs as config_funcs from test_apps_shared_test_helpers.cli import CmdExtOpt +from types import SimpleNamespace from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg +@pytest.mark.skip +class TestNonExtendableCommands(CLIShared): + def test_extensions_do_nothing(self): + cmd = self.cmds.target + + def test_help_msg(self): + fail + + def test_error_when_extended(self): + fail + + class TestExtensions(CLIShared): @pytest.mark.skip def test_extending_pl_cmd_from_aux_cmds(self): @@ -83,14 +96,44 @@ def test_exception_during_mod_load(self): def test_extending_origen_cmd_from_global_context_only(self): fail -class TestCurrentCommand: +class TestCurrentCommand(CLIShared): + @classmethod + def parse_current_cmd(cls, out): + out = out.split("Start Action For CMD: display_current_command\n")[1].split("End Action For CMD: display_current_command")[0].split("\n")[:-1] + print(out) + assert out[0] == "Class: CurrentCommand" + return SimpleNamespace(**{ + "base_cmd": out[1].split("Base Cmd: ")[1], + "subcmds": eval(out[2].split("Sub Cmds: ")[1]), + "args": eval(out[3].split("Args: ")[1]), + "exts": eval(out[4].split("Exts: ")[1]), + }) + + @classmethod + def assert_current_cmd(cls, out, base, subcmds, args, exts): + cmd = cls.parse_current_cmd(out) + assert cmd.base_cmd == base + assert cmd.subcmds == subcmds + assert cmd.args == args + assert cmd.exts == exts + + def test_current_command_is_none(self): + assert origen.current_command is None + @pytest.mark.skip def test_current_command_from_core_cmd(self): eval_cmd - @pytest.mark.skip def test_current_command_from_pl_cmd(self): - pl_cmd + out = self.python_plugin.do_actions.run("display_current_command") + print(out) + self.assert_current_cmd( + out, + "_plugin_dispatch_", + ["do_actions"], + {"actions": ['display_current_command']}, + {} + ) @pytest.mark.skip def test_current_command_from_aux_cmd(self): diff --git a/test_apps/python_no_app/tests/test_cli.py b/test_apps/python_no_app/tests/test_cli.py index ee56d1b4..af944e46 100644 --- a/test_apps/python_no_app/tests/test_cli.py +++ b/test_apps/python_no_app/tests/test_cli.py @@ -1,12 +1,28 @@ from .cli.tests__global_cmds import T_GlobalCmds from .cli.tests__cmd__credentials import T_Credentials from .cli.tests__cmd__eval import T_Eval +from .cli.tests__cmd__exec import T_Exec +from .cli.tests__origen_v import T_OrigenVersion +from .cli.tests__origen_help import T_OrigenHelp +from .cli.tests__invocation_errors import T_InvocationErrors class TestGlobalCmds(T_GlobalCmds): pass +class TestOrigenHelp(T_OrigenHelp): + pass + class TestCredentials(T_Credentials): pass class TestEval(T_Eval): pass + +class TestExec(T_Exec): + pass + +class TestOrigenVersion(T_OrigenVersion): + pass + +class TestInvocationErrors(T_InvocationErrors): + pass \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands.toml b/test_apps/python_plugin/python_plugin/commands.toml index e3611aaf..20bcad05 100644 --- a/test_apps/python_plugin/python_plugin/commands.toml +++ b/test_apps/python_plugin/python_plugin/commands.toml @@ -124,6 +124,16 @@ help = "Echos the input" long = "repeat" short = "r" +[[command]] + name = "do_actions" + help = "Perform the given actions" + + [[command.arg]] + name = "actions" + required = true + use_delimiter = true + help = "Actions to perform" + # Command disabling standard app opts [[command]] name = "disabling_app_opts_from_pl" @@ -473,3 +483,17 @@ on_env = ["ORIGEN_APP_EXT_NESTED"] help = "Flag opt from PYPL" long= "py_f" short = "f" + +[[extension]] +extend = "origen.target" +on_env = ["ORIGEN_EXT_TARGET_CMD"] + [[extension.opt]] + name = "test_ext" + help = "Test target" + +[[extension]] +extend = "origen.target.view" +on_env = ["ORIGEN_EXT_TARGET_CMD"] + [[extension.opt]] + name = "test_ext" + help = "Test target view" diff --git a/test_apps/python_plugin/python_plugin/commands/do_actions.py b/test_apps/python_plugin/python_plugin/commands/do_actions.py new file mode 100644 index 00000000..5cf7d490 --- /dev/null +++ b/test_apps/python_plugin/python_plugin/commands/do_actions.py @@ -0,0 +1,4 @@ +from test_apps_shared_test_helpers.cli.ext_helpers import do_action + +def run(**args): + do_action(args.get("actions"), None) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index f9a476f7..ad9a6383 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -8,6 +8,8 @@ from .cmd_models.exts import ExtensionDrivers from .cmd_models.plugins import Plugins +from .asertions import AssertionHelpers + def apply_ext_output_args(mod): from origen.boot import before_cmd, after_cmd, clean_up from .ext_helpers import do_action @@ -73,7 +75,7 @@ class Configs: configs_dir = Path(__file__).parent.joinpath("configs") suppress_plugin_collecting_config = configs_dir.joinpath("suppress_plugin_collecting.toml") -class CLIShared(cli.CLI): +class CLIShared(cli.CLI, AssertionHelpers): Cmd = Cmd na = "no_action" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/asertions.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/asertions.py new file mode 100644 index 00000000..95c17149 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/asertions.py @@ -0,0 +1,115 @@ +import re +from origen.helpers.regressions.cli.origen import CoreErrorMessages as Errs + +class AssertionHelpers: + @classmethod + def assert_v(cls, out, v_lvl, v_keywords=None): + if v_lvl is not False: + base = r"\[DEBUG\] \(..:..:..\....\): Logger Verbosity:" + if v_lvl is None or v_lvl < 2: + assert re.search(f"{base}", out) is None + else: + assert re.search(f"{base} {v_lvl}", out) is not None + if v_keywords is not False: + if isinstance(v_keywords, str): + v_keywords = [v_keywords] + base = r"\[DEBUG\] \(..:..:..\....\): Setting Verbosity Keywords:" + if v_keywords is None: + if v_lvl is None or v_lvl < 2: + assert re.search(f"{base}", out) is None + else: + assert re.search(rf"{base} \[\]", out) is not None + else: + v_keywords = [f"\"{k}\"" for k in v_keywords] + assert re.search(rf"{base} \[{', '.join(v_keywords)}\]", out) is not None + + assert_verbosity = assert_v + + @classmethod + def assert_invalid_subc_msg(cls, out, subc): + assert Errs.invalid_subc_msg(subc) in out + + @classmethod + def assert_args_required_msg(cls, out, *missing_args): + assert Errs.missing_required_arg(*missing_args) in out + + @classmethod + def assert_missing_arg_msg(cls, out, arg): + assert Errs.missing_required_arg(arg) in out + + @classmethod + def assert_missing_ln_val_msg(cls, out, arg, value_name=None): + assert Errs.missing_ln_val_msg(arg, value_name=value_name) in out + + @classmethod + def assert_invalid_arg_msg(cls, out, arg_or_subc): + assert Errs.unknown_arg_msg(arg_or_subc) in out + + @classmethod + def assert_invalid_ln_msg(cls, out, offender): + assert Errs.unknown_opt_msg(offender, True) in out + + @classmethod + def assert_invalid_sn_msg(cls, out, offender): + assert Errs.unknown_opt_msg(offender, False) in out + + @classmethod + def assert_origen_v(cls, out, version=None, version_only=True, app=None): + import origen + v = version or origen.status["origen_version"] + if app: + if app is True: + a = origen.app.version + else: + a = app + s = "\n".join([ + f"App: {a}", + f"Origen: {v}", + '' + ]) + else: + s = "\n".join([ + f"Origen: {v}", + f"CLI: {v}", + '' + ]) + if version_only: + assert s == out + else: + assert s in out + + @classmethod + def assert_no_app_origen_v(cls, out, version=None, version_only=True): + cls.assert_origen_v(out, version=version, app=False, version_only=version_only) + + @classmethod + def assert_core_help(cls, out): + help = cls.HelpMsg(out) + assert help.root_cmd is True + assert "Origen: 2." in help.version_str + help.assert_bare_opts() + + # TODO check order? + assert set(s["name"] for s in help.subcmds) == set(cls.global_cmds.all_names_add_help) + assert help.app_cmd_shortcuts == None + assert help.pl_cmd_shortcuts == { + "do_actions": ("python_plugin", "do_actions"), + "plugin_says_hi": ("python_plugin", "plugin_says_hi"), + "echo": ("python_plugin", "echo"), + "plugin_test_args": ("python_plugin", "plugin_test_args"), + "plugin_test_ext_stacking": ("python_plugin", "plugin_test_ext_stacking"), + } + assert help.aux_cmd_shortcuts == { + "python_no_app_tests": ("cmd_testers", "python_no_app_tests"), + "test_nested_level_1": ("cmd_testers", "test_nested_level_1"), + "test_arguments": ("cmd_testers", "test_arguments"), + "error_cases": ("cmd_testers", "error_cases"), + "say_hi": ("python_no_app_aux_cmds", "say_hi"), + "say_bye": ("python_no_app_aux_cmds", "say_bye"), + } + + @classmethod + def assert_ext_non_ext_cmd_msg(self, out, target, offenders): + offenders = "\n".join([f"\t{o.displayed}" for o in offenders]) + msg = f"Command '{target.full_name}' does not support extensions but an extension was attempted from:\n{offenders}" + assert msg in out \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py index c4478200..0c622477 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py @@ -1,5 +1,10 @@ from origen.helpers.regressions import cli +class SrcBase(cli.CLI): + @property + def displayed(self): + return self.src_type.displayed(self.name) + class Cmd(cli.cmd.Cmd): def assert_args(self, output, *vals, finalize_ext_args=None): ext_args = {} diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py index 84a1d0d6..924b3abe 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py @@ -1,10 +1,15 @@ from pathlib import Path from origen.helpers.regressions import cli -from . import Cmd, CmdArg, CmdOpt +from . import Cmd, CmdArg, CmdOpt, SrcBase aux_cmds_dir = Path(__file__).parent.parent.parent.joinpath("aux_cmds") -class AuxCmdsFromCliDir(cli.CLI): +class AuxNS(SrcBase): + @property + def src_type(self): + return cli.SrcTypes.AUX + +class AuxCmdsFromCliDir(AuxNS): Cmd = Cmd def __init__(self): @@ -21,7 +26,7 @@ def __init__(self): def base_cmd(self): return self.aux_cmds_from_cli_dir -class AddAuxCmds(cli.CLI): +class AddAuxCmds(AuxNS): Cmd = Cmd def __init__(self): @@ -35,7 +40,7 @@ def __init__(self): def base_cmd(self): return self.add_aux_cmd -class CmdTesters(cli.CLI): +class CmdTesters(AuxNS): Cmd = Cmd def __init__(self): @@ -309,7 +314,6 @@ def __init__(self): ), ] ), - Cmd("test_current_command", help="Tests origen.current_command"), Cmd( "test_nested_level_1", help="Tests origen.current_command L1", @@ -360,7 +364,7 @@ def subc_l3_b(self): return self.subc_l2.test_nested_level_3_b -class DummyCmds(cli.CLI): +class DummyCmds(AuxNS): Cmd = Cmd cfg_toml = aux_cmds_dir.joinpath("dummy_cmds_cfg.toml") @@ -399,7 +403,7 @@ def __init__(self): from_config=self.cfg_toml ) -class PythonNoAppAuxCmds(cli.CLI): +class PythonNoAppAuxCmds(AuxNS): Cmd = Cmd def __init__(self): @@ -413,7 +417,7 @@ def __init__(self): def base_cmd(self): return self.python_no_app_aux_cmds -class PythonAppAuxCmds(cli.CLI): +class PythonAppAuxCmds(AuxNS): Cmd = Cmd def __init__(self): diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py index 054f160a..c0ada672 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py @@ -3,13 +3,6 @@ from .auxs import aux_cmds_dir from types import SimpleNamespace -# FOR_PR refactor without these -def ext_conflicts_exts(exts): - return SimpleNamespace(**dict((e.name, e) for e in filter(lambda e: e.src_name == "ext_conflicts", exts))) - -def test_apps_shared_exts(exts): - return SimpleNamespace(**dict((e.name, e) for e in filter(lambda e: e.src_name == "test_apps_shared_test_helpers", exts))) - class ExtensionDrivers: exts_workout_cfg = aux_cmds_dir.joinpath("exts_workout_cfg.toml") exts_workout_toml = aux_cmds_dir.joinpath("exts_workout.toml") @@ -602,85 +595,81 @@ def partition_exts(cls, exts): def init_conflicts(self, plugins, aux): ext_conflicts = self.ext_conflicts + n = "exts_by_ns" _cmd_str_ = "plugin.python_plugin.plugin_test_args" cmd = plugins.python_plugin.plugin_test_args - ext_conflicts[_cmd_str_]["ext_conflicts_exts"] = ext_conflicts_exts(ext_conflicts[_cmd_str_]["exts"]) - aux_exts = ext_conflicts[_cmd_str_]["ext_conflicts_exts"] - ext_conflicts[_cmd_str_]["test_apps_shared_exts"] = test_apps_shared_exts(ext_conflicts[_cmd_str_]["exts"]) - pl_exts = ext_conflicts[_cmd_str_]["test_apps_shared_exts"] - - aux_exts_displayed = aux_exts.ns_self_conflict.displayed + exts = self.partition_exts(ext_conflicts[_cmd_str_]["exts"]) + ext_conflicts[_cmd_str_][n] = exts + ec_displayed = exts.ec.ns_self_conflict.displayed ext_conflicts[_cmd_str_]["conflicts_list"] = [ - ["duplicate", pl_exts.pl_aux_conflict, 0], - ["duplicate", aux_exts.ns_self_conflict, 9], - ["duplicate", aux_exts.ext_self_conflict, 11], - ["self_lna_iln", aux_exts.ext_self_conflict_2], - ["reserved_prefix_ln", aux_exts.ext_opt_in_ln, "ext_opt.in_ln"], - ["reserved_prefix_lna", aux_exts.ext_opt_in_lna, "ext_opt.in_lna"], - ["reserved_prefix_opt_name", "ext_opt.reserved_name", aux_exts_displayed], - ["inter_ext_lna_ln", aux_exts.same_ln_and_ln_alias, "same_ln_and_ln_alias"], - ["inter_ext_lna_iln", aux_exts.same_iln_and_ln_alias], - ["inter_ext_sna_sn", aux_exts.repeated_sn_and_aliases, "g"], - ["repeated_sna", aux_exts.repeated_sn_and_aliases, "e", 1], # Purposefully repeated - ["repeated_sna", aux_exts.repeated_sn_and_aliases, "e", 1], - ["repeated_lna", aux_exts.repeated_sn_and_aliases, "repeated_lna", 0], - ["ln", "lna", pl_exts.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "alias"], - ["sn", "sn", pl_exts.pl_conflict_ln_and_aliases, cmd.sn_only, "n"], - ["lna", "lna", pl_exts.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "opt_alias"], - ["sna", "sna", pl_exts.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "a"], - ["sna", "sna", pl_exts.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "b"], - ["iln", "ln", pl_exts.flag, cmd.flag_opt, "flag"], - ["sn", "sn", aux_exts.conflict_sn, cmd.sn_only, "n"], - ["iln", "iln", aux_exts.pl_aux_conflict, pl_exts.pl_aux_conflict, "pl_aux_conflict"], - ["sn", "sn", aux_exts.pl_aux_sn_conflict_aux, pl_exts.pl_aux_sn_conflict_pl, "s"], - ["ln", "lna", aux_exts.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "alias"], - ["lna", "lna", aux_exts.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "opt_alias"], - ["lna", "lna", aux_exts.aux_conflict_ln_and_aliases, pl_exts.pl_conflict_ln_and_aliases, "other_alias_pl"], - ["sna", "sna", aux_exts.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "a"], - ["sna", "sna", aux_exts.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "b"], - ["sna", "sna", aux_exts.aux_conflict_ln_and_aliases, pl_exts.pl_conflict_ln_and_aliases, "c"], - ["iln", "ln", aux_exts.flag, cmd.flag_opt, 'flag'], - ["iln", "lna", aux_exts.alias, cmd.opt_with_aliases, 'alias'], - ["ln", "iln", aux_exts.ns_self_conflict, aux_exts.subc, "subc"], - ["sn", "sna", aux_exts.ns_self_conflict, aux_exts.aux_conflict_ln_and_aliases, "d"], - ["ln", "iln", aux_exts.ext_self_conflict, aux_exts.ns_self_conflict, "ns_self_conflict"], - ["lna", "iln", aux_exts.ext_self_conflict_2, aux_exts.ext_self_conflict, "ext_self_conflict"], + ["duplicate", exts.tas.pl_aux_conflict, 0], + ["duplicate", exts.ec.ns_self_conflict, 9], + ["duplicate", exts.ec.ext_self_conflict, 11], + ["self_lna_iln", exts.ec.ext_self_conflict_2], + ["reserved_prefix_ln", exts.ec.ext_opt_in_ln, "ext_opt.in_ln"], + ["reserved_prefix_lna", exts.ec.ext_opt_in_lna, "ext_opt.in_lna"], + ["reserved_prefix_opt_name", "ext_opt.reserved_name", ec_displayed], + ["inter_ext_lna_ln", exts.ec.same_ln_and_ln_alias, "same_ln_and_ln_alias"], + ["inter_ext_lna_iln", exts.ec.same_iln_and_ln_alias], + ["inter_ext_sna_sn", exts.ec.repeated_sn_and_aliases, "g"], + ["repeated_sna", exts.ec.repeated_sn_and_aliases, "e", 1], # Purposefully repeated + ["repeated_sna", exts.ec.repeated_sn_and_aliases, "e", 1], + ["repeated_lna", exts.ec.repeated_sn_and_aliases, "repeated_lna", 0], + ["ln", "lna", exts.tas.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "alias"], + ["sn", "sn", exts.tas.pl_conflict_ln_and_aliases, cmd.sn_only, "n"], + ["lna", "lna", exts.tas.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "opt_alias"], + ["sna", "sna", exts.tas.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "a"], + ["sna", "sna", exts.tas.pl_conflict_ln_and_aliases, cmd.opt_with_aliases, "b"], + ["iln", "ln", exts.tas.flag, cmd.flag_opt, "flag"], + ["sn", "sn", exts.ec.conflict_sn, cmd.sn_only, "n"], + ["iln", "iln", exts.ec.pl_aux_conflict, exts.tas.pl_aux_conflict, "pl_aux_conflict"], + ["sn", "sn", exts.ec.pl_aux_sn_conflict_aux, exts.tas.pl_aux_sn_conflict_pl, "s"], + ["ln", "lna", exts.ec.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "alias"], + ["lna", "lna", exts.ec.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "opt_alias"], + ["lna", "lna", exts.ec.aux_conflict_ln_and_aliases, exts.tas.pl_conflict_ln_and_aliases, "other_alias_pl"], + ["sna", "sna", exts.ec.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "a"], + ["sna", "sna", exts.ec.aux_conflict_ln_and_aliases, cmd.opt_with_aliases, "b"], + ["sna", "sna", exts.ec.aux_conflict_ln_and_aliases, exts.tas.pl_conflict_ln_and_aliases, "c"], + ["iln", "ln", exts.ec.flag, cmd.flag_opt, 'flag'], + ["iln", "lna", exts.ec.alias, cmd.opt_with_aliases, 'alias'], + ["ln", "iln", exts.ec.ns_self_conflict, exts.ec.subc, "subc"], + ["sn", "sna", exts.ec.ns_self_conflict, exts.ec.aux_conflict_ln_and_aliases, "d"], + ["ln", "iln", exts.ec.ext_self_conflict, exts.ec.ns_self_conflict, "ns_self_conflict"], + ["lna", "iln", exts.ec.ext_self_conflict_2, exts.ec.ext_self_conflict, "ext_self_conflict"], ] _cmd_str_ = "plugin.python_plugin.plugin_test_args.subc" cmd = plugins.python_plugin.plugin_test_args.subc - ext_conflicts[_cmd_str_]["ext_conflicts_exts"] = ext_conflicts_exts(ext_conflicts[_cmd_str_]["exts"]) - aux_exts = ext_conflicts[_cmd_str_]["ext_conflicts_exts"] - ext_conflicts[_cmd_str_]["test_apps_shared_exts"] = test_apps_shared_exts(ext_conflicts[_cmd_str_]["exts"]) - pl_exts = ext_conflicts[_cmd_str_]["test_apps_shared_exts"] + exts = self.partition_exts(ext_conflicts[_cmd_str_]["exts"]) + ext_conflicts[_cmd_str_][n] = exts ext_conflicts[_cmd_str_]["conflicts_list"] = [ - ["reserved_prefix_opt_name", "ext_opt.subc_reserved", pl_exts.subc_pl_aux_conflict.displayed], - ["inter_ext_sna_sn", pl_exts.subc_pl_aux_conflict, "c"], - ["inter_ext_lna_ln", pl_exts.subc_pl_aux_conflict, "subc_pl_aux"], - ["duplicate", pl_exts.subc_pl_aux_conflict, 1], - ["reserved_prefix_lna", pl_exts.more_conflicts, "ext_opt.subc_lna"], + ["reserved_prefix_opt_name", "ext_opt.subc_reserved", exts.tas.subc_pl_aux_conflict.displayed], + ["inter_ext_sna_sn", exts.tas.subc_pl_aux_conflict, "c"], + ["inter_ext_lna_ln", exts.tas.subc_pl_aux_conflict, "subc_pl_aux"], + ["duplicate", exts.tas.subc_pl_aux_conflict, 1], + ["reserved_prefix_lna", exts.tas.more_conflicts, "ext_opt.subc_lna"], - ["inter_ext_lna_ln", aux_exts.subc_pl_aux_conflict, "subc_pl_aux"], - ["duplicate", aux_exts.subc_pl_aux_conflict, 0], - ["inter_ext_lna_iln", aux_exts.more_conflicts], + ["inter_ext_lna_ln", exts.ec.subc_pl_aux_conflict, "subc_pl_aux"], + ["duplicate", exts.ec.subc_pl_aux_conflict, 0], + ["inter_ext_lna_iln", exts.ec.more_conflicts], - ["sna", "sna", pl_exts.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "a"], - ["iln", "iln", pl_exts.flag_opt, cmd.flag_opt], - ["lna", "ln", pl_exts.more_conflicts, pl_exts.subc_pl_aux_conflict, "subc_pl_aux"], - ["lna", "ln", pl_exts.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt"], - ["lna", "lna", pl_exts.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt_alias"], - ["sna", "sn", pl_exts.more_conflicts, cmd.subc_sn_only, "n"], + ["sna", "sna", exts.tas.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "a"], + ["iln", "iln", exts.tas.flag_opt, cmd.flag_opt], + ["lna", "ln", exts.tas.more_conflicts, exts.tas.subc_pl_aux_conflict, "subc_pl_aux"], + ["lna", "ln", exts.tas.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt"], + ["lna", "lna", exts.tas.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt_alias"], + ["sna", "sn", exts.tas.more_conflicts, cmd.subc_sn_only, "n"], - ["ln", "ln", aux_exts.subc_pl_aux_conflict, pl_exts.subc_pl_aux_conflict, "subc_pl_aux"], - ["lna", "lna", aux_exts.subc_pl_aux_conflict, pl_exts.subc_pl_aux_conflict, "pl0"], - ["sna", "sna", aux_exts.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "a"], - ["sna", "sna", aux_exts.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "b"], - ["iln", "iln", aux_exts.flag_opt, cmd.flag_opt], - ["iln", "iln", aux_exts.more_conflicts, pl_exts.more_conflicts], - ["lna", "ln", aux_exts.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt"], - ["sna", "sna", aux_exts.more_conflicts, pl_exts.more_conflicts, "d"], - ["sna", "sn", aux_exts.more_conflicts, cmd.subc_sn_only, "n"], + ["ln", "ln", exts.ec.subc_pl_aux_conflict, exts.tas.subc_pl_aux_conflict, "subc_pl_aux"], + ["lna", "lna", exts.ec.subc_pl_aux_conflict, exts.tas.subc_pl_aux_conflict, "pl0"], + ["sna", "sna", exts.ec.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "a"], + ["sna", "sna", exts.ec.subc_pl_aux_conflict, cmd.subc_opt_with_aliases, "b"], + ["iln", "iln", exts.ec.flag_opt, cmd.flag_opt], + ["iln", "iln", exts.ec.more_conflicts, exts.tas.more_conflicts], + ["lna", "ln", exts.ec.more_conflicts, cmd.subc_opt_with_aliases, "subc_opt"], + ["sna", "sna", exts.ec.more_conflicts, exts.tas.more_conflicts, "d"], + ["sna", "sn", exts.ec.more_conflicts, cmd.subc_sn_only, "n"], ] _cmd_str_ = "origen.eval" @@ -689,22 +678,20 @@ def init_conflicts(self, plugins, aux): ] _cmd_str_ = "origen.credentials.clear" - ext_conflicts[_cmd_str_]["ext_conflicts_exts"] = ext_conflicts_exts(ext_conflicts[_cmd_str_]["exts"]) - aux_exts = ext_conflicts[_cmd_str_]["ext_conflicts_exts"] - ext_conflicts[_cmd_str_]["test_apps_shared_exts"] = test_apps_shared_exts(ext_conflicts[_cmd_str_]["exts"]) - pl_exts = ext_conflicts[_cmd_str_]["test_apps_shared_exts"] cmd = cli.CLI.cmds.creds.clear + exts = self.partition_exts(ext_conflicts[_cmd_str_]["exts"]) + ext_conflicts[_cmd_str_][n] = exts ext_conflicts[_cmd_str_]["conflicts_list"] = [ - ["iln", "ln", pl_exts.all, cmd.all], - ["ln", "ln", pl_exts.cmd_conflicts_pl, cmd.all, "all"], - ["sn", "sn", pl_exts.cmd_conflicts_pl, cmd.all, "a"], - ["lna", "ln", pl_exts.cmd_conflicts_pl, cmd.datasets, "datasets"], - ["sna", "sn", pl_exts.cmd_conflicts_pl, cmd.datasets, "d"], - ["iln", "ln", aux_exts.all, cmd.all], - ["ln", "ln", aux_exts.cmd_conflicts_aux, cmd.all, "all"], - ["sn", "sn", aux_exts.cmd_conflicts_aux, cmd.all, "a"], - ["lna", "ln", aux_exts.cmd_conflicts_aux, cmd.datasets, "datasets"], - ["lna", "lna", aux_exts.cmd_conflicts_aux, pl_exts.cmd_conflicts_pl, "pl_datasets"], - ["sna", "sn", aux_exts.cmd_conflicts_aux, cmd.datasets, "d"], - ["sna", "sna", aux_exts.cmd_conflicts_aux, pl_exts.cmd_conflicts_pl, "e"], + ["iln", "ln", exts.tas.all, cmd.all], + ["ln", "ln", exts.tas.cmd_conflicts_pl, cmd.all, "all"], + ["sn", "sn", exts.tas.cmd_conflicts_pl, cmd.all, "a"], + ["lna", "ln", exts.tas.cmd_conflicts_pl, cmd.datasets, "datasets"], + ["sna", "sn", exts.tas.cmd_conflicts_pl, cmd.datasets, "d"], + ["iln", "ln", exts.ec.all, cmd.all], + ["ln", "ln", exts.ec.cmd_conflicts_aux, cmd.all, "all"], + ["sn", "sn", exts.ec.cmd_conflicts_aux, cmd.all, "a"], + ["lna", "ln", exts.ec.cmd_conflicts_aux, cmd.datasets, "datasets"], + ["lna", "lna", exts.ec.cmd_conflicts_aux, exts.tas.cmd_conflicts_pl, "pl_datasets"], + ["sna", "sn", exts.ec.cmd_conflicts_aux, cmd.datasets, "d"], + ["sna", "sna", exts.ec.cmd_conflicts_aux, exts.tas.cmd_conflicts_pl, "e"], ] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py index 85b3f613..9959326d 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py @@ -1,11 +1,16 @@ from origen.helpers.regressions import cli -from . import Cmd, CmdArg, CmdOpt +from . import Cmd, CmdArg, CmdOpt, SrcBase -class PlExtCmds(cli.CLI): +class Plugin(SrcBase): + @property + def src_type(self): + return cli.SrcTypes.PLUGIN + +class PlExtCmds(Plugin): def __init__(self): self.name = "pl_ext_cmds" -class PythonPlugin(cli.CLI): +class PythonPlugin(Plugin): Cmd = Cmd def __init__(self): @@ -189,6 +194,16 @@ def __init__(self): ) ] ) + self.do_actions = self.pl_sub_cmd( + self.name, + "do_actions", + help="Perform the given actions", + args=[CmdArg( + name="actions", + help="Actions to perform", + use_delimiter=True, + )], + ) self.intra_cmd_conflicts = self.pl_sub_cmd( self.name, "intra_cmd_conflicts", @@ -340,6 +355,7 @@ def base_cmd(self): @property def ordered_subcmds(self): return [ + self.do_actions, self.echo, "help", self.plugin_says_hi, @@ -347,7 +363,7 @@ def ordered_subcmds(self): self.plugin_test_ext_stacking, ] -class PythonPluginNoCmds(cli.CLI): +class PythonPluginNoCmds(Plugin): def __init__(self): self.name = "python_plugin_no_cmds" self.python_plugin_no_cmds = self.pl_cmd( @@ -358,7 +374,7 @@ def __init__(self): def base_cmd(self): return self.python_plugin_no_cmds -class PythonPluginTheSecond(cli.CLI): +class PythonPluginTheSecond(Plugin): def __init__(self): self.name = "python_plugin_the_second" self.python_plugin_the_second = self.pl_cmd( @@ -369,7 +385,7 @@ def __init__(self): def base_cmd(self): return self.python_plugin_the_second -class TestAppsSharedTestHelpers(cli.CLI): +class TestAppsSharedTestHelpers(Plugin): def __init__(self): self.name = "test_apps_shared_test_helpers" self.test_apps_shared_test_helpers = self.pl_cmd( @@ -390,6 +406,10 @@ def __init__(self): "test_apps_shared_test_helpers": TestAppsSharedTestHelpers() } + @property + def tas(self): + return self.test_apps_shared_test_helpers + @property def python_no_app_collected_pl_names(self): return list(self.plugins.keys()) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py index 0ecfd20f..9f184001 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py @@ -30,7 +30,11 @@ def extract(action): def do_action(actions, phase): if actions: for action in actions: - print(f"Start Action {phase} CMD: {action}") + if phase is None: + p_out = 'For' + else: + p_out = phase + print(f"Start Action {p_out} CMD: {action}") if action.startswith("inc_flag__"): if phase == "Before": _, is_cmd, f = action.split("__", 2) @@ -73,8 +77,15 @@ def do_action(actions, phase): # Set a new arg args["new_arg"] = "new_arg_for_ext" + elif action == "display_current_command": + cc = origen.current_command + print(f"Class: {cc.__class__.__name__}") + print(f"Base Cmd: {cc.base_cmd}") + print(f"Sub Cmds: {cc.subcmds}") + print(f"Args: {cc.args}") + print(f"Exts: {dict(cc.exts)}") elif action == "no_action": pass else: raise RuntimeError(f"No action '{action}' is known!") - print(f"End Action {phase} CMD: {action}") \ No newline at end of file + print(f"End Action {p_out} CMD: {action}") \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml index b5b7c21b..e19d262d 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/commands.toml @@ -185,3 +185,17 @@ on_env = ["ORIGEN_APP_EXT_NESTED"] [[extension.opt]] name = "tas_flag_opt_deep" help = "Flag opt from TAS" + +[[extension]] +extend = "origen.target" +on_env = ["ORIGEN_EXT_TARGET_CMD"] + [[extension.opt]] + name = "test_ext" + help = "Test target" + +[[extension]] +extend = "origen.target.view" +on_env = ["ORIGEN_EXT_TARGET_CMD"] + [[extension.opt]] + name = "test_ext" + help = "Test target view" From 904c0bfa86e23cb79f30092bccf3e0a6827ad8ae Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 26 Apr 2023 18:16:16 -0500 Subject: [PATCH 025/200] debug regression fails --- test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py b/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py index 08d4a7ac..647fc1c8 100644 --- a/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py +++ b/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py @@ -24,6 +24,7 @@ def cmd(self): def assert_non_ext_errors(cls, out): errors = "\n".join(cls.extract_logged_errors(out)) print(errors) + print(errors.encode("ascii")) cls.assert_ext_non_ext_cmd_msg(errors, cls._cmd.view, cls.err_srcs) cls.assert_ext_non_ext_cmd_msg(errors, cls._cmd, cls.err_srcs) From 7ec5593b37f3aa86c858da8f5aa7f19bc79191c6 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 26 Apr 2023 21:08:17 -0500 Subject: [PATCH 026/200] continue regression debug --- test_apps/python_app/config/enumerated_plugins.toml | 6 ++++++ .../tests/cli/tests__non_extendable_err_msgs.py | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 test_apps/python_app/config/enumerated_plugins.toml diff --git a/test_apps/python_app/config/enumerated_plugins.toml b/test_apps/python_app/config/enumerated_plugins.toml new file mode 100644 index 00000000..693bb889 --- /dev/null +++ b/test_apps/python_app/config/enumerated_plugins.toml @@ -0,0 +1,6 @@ +[plugins] +collect = false +load = [ + { name = "test_apps_shared_test_helpers" }, + { name = "python_plugin" }, +] diff --git a/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py b/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py index 647fc1c8..f65269fe 100644 --- a/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py +++ b/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py @@ -6,12 +6,14 @@ class T_NonExtendableErrMsgs(TargetCLI): with_env = {"ORIGEN_EXT_TARGET_CMD": "1"} _cmd = CLICommon.in_app_commands.target.extend( [], - with_env=with_env + with_env=with_env, + from_configs=["config/enumerated_plugins.toml"], ) # TODO have with_env extension apply to subcommands? view_cmd = CLICommon.in_app_commands.target.view.extend( [], - with_env=with_env + with_env=with_env, + from_configs=["config/enumerated_plugins.toml"], ) @pytest.fixture @@ -23,14 +25,11 @@ def cmd(self): @classmethod def assert_non_ext_errors(cls, out): errors = "\n".join(cls.extract_logged_errors(out)) - print(errors) - print(errors.encode("ascii")) cls.assert_ext_non_ext_cmd_msg(errors, cls._cmd.view, cls.err_srcs) cls.assert_ext_non_ext_cmd_msg(errors, cls._cmd, cls.err_srcs) def test_err_msg(self, cmd): help = cmd.get_help_msg() - print(help.text) help.assert_opts(cmd.full_paths, "h", "v", "vk") self.assert_non_ext_errors(help.text) From 4a8df7d07c0e29465ff0e61304ff8677d084a0ed Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 11 May 2023 14:04:40 -0500 Subject: [PATCH 027/200] Refactor and update non-extendable for plugins/plugin/aux_cmds/app-commands. Add tests. --- .../helpers/regressions/cli/__init__.py | 4 +- .../origen/helpers/regressions/cli/command.py | 26 ++ .../helpers/regressions/cli/help_msg.py | 22 ++ .../origen/helpers/regressions/cli/origen.py | 79 ++++- rust/origen/cli/src/bin.rs | 19 +- rust/origen/cli/src/commands/_prelude/mod.rs | 2 +- rust/origen/cli/src/commands/app.rs | 2 +- rust/origen/cli/src/commands/aux_cmds.rs | 19 +- rust/origen/cli/src/commands/mod.rs | 9 + rust/origen/cli/src/commands/plugin.rs | 27 ++ rust/origen/cli/src/commands/plugins.rs | 37 ++ rust/origen/cli/src/commands/target.rs | 5 +- rust/origen/cli/src/framework/app_cmds.rs | 2 +- rust/origen/cli/src/framework/aux_cmds.rs | 79 ++--- rust/origen/cli/src/framework/helps.rs | 5 - rust/origen/cli/src/framework/plugins.rs | 165 ++------- test_apps/python_app/config/commands.toml | 1 - test_apps/python_app/config/origen.toml | 8 +- test_apps/python_app/pyproject.toml | 1 + .../python_app/tests/cli/core_cmds/app.py | 16 + .../tests/cli/core_cmds/aux_cmds.py | 13 + .../python_app/tests/cli/core_cmds/plugin.py | 10 + .../python_app/tests/cli/core_cmds/plugins.py | 5 + test_apps/python_app/tests/cli/shared.py | 206 ++++++----- .../tests/cli/tests__app_cmd_building.py | 4 +- .../python_app/tests/cli/tests__core_cmds.py | 16 + .../tests/cli/tests__extending_app_cmds.py | 4 +- .../tests/configs/empty_app_cmds.toml | 1 + test_apps/python_no_app/origen.toml | 3 + .../tests/cli/tests__cmd__aux_cmds.py | 14 + .../tests/cli/tests__cmd__eval.py | 2 +- .../tests/cli/tests__cmd__plugin.py | 14 + .../tests/cli/tests__cmd__plugins.py | 8 + .../tests/cmd_building/shared.py | 9 + .../cmd_building/tests__loading_aux_cmds.py | 27 +- .../tests__loading_plugin_cmds.py | 27 +- .../configs/suppress_plugin_collecting.toml | 3 - test_apps/python_no_app/tests/test_cli.py | 12 + test_apps/python_no_app/tests/test_configs.py | 1 - .../tests/test_plugin_loading.py | 2 +- .../aux_cmds/empty_aux_ns.toml | 1 + .../aux_cmds/empty_aux_ns_cfg.toml | 2 + .../cli/__init__.py | 14 + .../cli/auditors.py | 160 +++++++++ .../cli/cmd_models/__init__.py | 29 +- .../cli/cmd_models/auxs.py | 65 ++-- .../cli/cmd_models/plugins.py | 327 +++++++++--------- .../cli/configs/no_plugins_no_aux_cmds.toml | 5 + 48 files changed, 968 insertions(+), 544 deletions(-) create mode 100644 rust/origen/cli/src/commands/plugin.rs create mode 100644 rust/origen/cli/src/commands/plugins.rs create mode 100644 test_apps/python_app/tests/cli/core_cmds/app.py create mode 100644 test_apps/python_app/tests/cli/core_cmds/aux_cmds.py create mode 100644 test_apps/python_app/tests/cli/core_cmds/plugin.py create mode 100644 test_apps/python_app/tests/cli/core_cmds/plugins.py create mode 100644 test_apps/python_app/tests/configs/empty_app_cmds.toml create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__aux_cmds.py create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__plugin.py create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__plugins.py delete mode 100644 test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns_cfg.toml create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/auditors.py create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/no_plugins_no_aux_cmds.toml diff --git a/python/origen/origen/helpers/regressions/cli/__init__.py b/python/origen/origen/helpers/regressions/cli/__init__.py index 534fe94c..52085dcd 100644 --- a/python/origen/origen/helpers/regressions/cli/__init__.py +++ b/python/origen/origen/helpers/regressions/cli/__init__.py @@ -1,6 +1,6 @@ '''Regression test helpers for testing/checking Origen CLI integration''' -import re +import re, abc from .command import Cmd, CmdArg, CmdOpt, SrcTypes from .help_msg import HelpMsg from .origen import _CommonNames, GlobalCommands, InAppCommands, CoreOpts, CoreErrorMessages @@ -8,7 +8,7 @@ cmd = command -class CLIProperties(type): +class CLIProperties(abc.ABCMeta, type): @property def app_sub_cmd_path(cls): cmd = cls.in_app_cmds.app diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py index 35b89c9f..aea0e9bd 100644 --- a/python/origen/origen/helpers/regressions/cli/command.py +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -184,6 +184,11 @@ def __init__( aliases=None, src_type=None, prefix_opts=False, + extendable=True, + h_opt_idx=None, + v_opt_idx=None, + vk_opt_idx=None, + help_subc_idx=None, ): self.name = name self.cmd_path = cmd_path or [] @@ -217,6 +222,21 @@ def __init__( self.app_demos = dict([[d.name, d] for d in (app_demos or [])]) for d in self.app_demos.values(): d.parent = self + self.extendable = extendable + self.h_opt_idx = h_opt_idx + self.v_opt_idx = v_opt_idx + self.vk_opt_idx = vk_opt_idx + self.help_subc_idx = help_subc_idx + + def replace_subcmds(self, *subcmds): + self.subcmds = dict([[subcmd.name, subcmd] for subcmd in (subcmds or [])]) + for subcmd in self.subcmds.values(): + subcmd.parent = self + subcmd.cmd_path = self.cmd_path + [self.name] + + if self.parent is None: + self.update_subc() + def update_subc(self): for subcmd in self.subcmds.values(): subcmd.cmd_path = self.cmd_path + [self.name] @@ -243,9 +263,15 @@ def extend(self, exts, with_env=None, from_configs=None): [d.copy() for d in self.demos.values()], [d.copy() for d in self.global_demos.values()], [d.copy() for d in self.app_demos.values()], + self.parent, self.aliases, self.src_type, self.prefix_opts, + self.extendable, + self.h_opt_idx, + self.v_opt_idx, + self.vk_opt_idx, + self.help_subc_idx, ) dup.exts = dict(self.exts) if self.exts else {} dup.exts.update(dict([[ext.name, ext] for ext in (exts or [])])) diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index e3f6d7b9..52cbe519 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -420,6 +420,28 @@ def assert_not_extendable(self): assert self.after_help_msg is not None assert self.not_extendable_msg == self.after_help_msg.split("\n")[-1] + def assert_cmd(self, cmd): + self.assert_args(*[cmd.args.values() or None]) + if cmd.opts: + l = list(cmd.opts.values()) + l.insert(cmd.h_opt_idx, "h") + l.insert(cmd.v_opt_idx, "v") + l.insert(cmd.vk_opt_idx, "vk") + self.assert_opts(*l) + else: + self.assert_bare_opts() + + if cmd.subcmds: + subcs = list(cmd.subcmds.values()) + subcs.insert(cmd.help_subc_idx, "help") + self.assert_subcmds(*subcs) + else: + self.assert_subcmds(None) + + if not cmd.extendable: + self.assert_not_extendable() + self.assert_summary(cmd.help) + @property def logged_errors(self): return list(filter(lambda l: "[ERROR] (" in l, self.text.split("\n"))) \ No newline at end of file diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index e8272bf4..5f61ae25 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -17,6 +17,10 @@ class _CommonNames: i = "interactive" v = "-v" + @classmethod + def aux_cmds_cmd(cls, add_opts=None): + return Cmd(cls.aux_cmds, help="Interface with auxillary commands") + @classmethod def eval_cmd(cls, add_opts=None): return Cmd( @@ -130,6 +134,31 @@ def interactive_cmd(cls, add_opts=None): opts=add_opts, ) + @classmethod + def pl_cmd(cls, add_opts=None): + return Cmd( + cls.pl, + help="Access added commands from individual plugins", + aliases=["pl"], + opts=add_opts, + ) + + @classmethod + def pls_cmd(cls, add_opts=None): + return Cmd( + cls.pls, + help="Interface with the Origen plugin manager", + aliases=["pls", "plss"], + opts=add_opts, + subcmds=[ + Cmd( + "list", + help="List the available plugins", + aliases=["ls"], + ) + ] + ) + @classmethod def v_cmd(cls): return Cmd(cls.v) @@ -178,9 +207,9 @@ class Names: eval = _CommonNames.eval_cmd() exec = _CommonNames.exec_cmd() - aux_cmds = Cmd(names.aux_cmds, help="Interface with auxillary commands") - pls = Cmd(names.pls) - pl = Cmd(names.pl) + aux_cmds = _CommonNames.aux_cmds_cmd() + pls = _CommonNames.pls_cmd() + pl = _CommonNames.pl_cmd() proj = Cmd(names.proj) new = Cmd(names.new) creds = _CommonNames.creds_cmd() @@ -281,8 +310,44 @@ def targets_arg(cls, help): # use_delimiter=True ) - app = Cmd(names.app, subcmds=[Cmd("commands")]) - aux_cmds = Cmd(names.aux_cmds) + app = Cmd( + names.app, + help="Manage and interface with the application", + subcmds=[ + Cmd( + "checkin", + help="Check in the given pathspecs", + ), + Cmd( + "commands", + help="Interface with commands added by the application", + aliases=["cmds"], + ), + Cmd( + "init", + help="Initialize the application's revision control", + ), + Cmd( + "package", + help="Build the app into publishable package (e.g., a 'python wheel')", + ), + Cmd( + "publish", + help="Publish (release) the app", + ), + Cmd( + "run_publish_checks", + help="Run production-ready and publish-ready checks", + ), + Cmd( + "status", + help="Show any local changes", + ), + ], + help_subc_idx=2, + extendable=False, + ) + aux_cmds = _CommonNames.aux_cmds_cmd() build = Cmd(names.build) compile = Cmd(names.compile) creds = _CommonNames.creds_cmd(add_opts=in_app_opts.all()) @@ -295,8 +360,8 @@ def targets_arg(cls, help): mailer = Cmd(names.mailer) mode = Cmd(names.mode) new = Cmd(names.new) - pl = Cmd(names.pl) - pls = Cmd(names.pls) + pl = _CommonNames.pl_cmd() + pls = _CommonNames.pls_cmd() save_ref = Cmd(names.save_ref) target = Cmd( names.target, diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index 51cb6528..e82201f6 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -16,7 +16,6 @@ use origen_metal as om; use std::iter::FromIterator; use std::process::exit; use framework::{Extensions, Plugins, AuxCmds, AppCmds, CmdHelps}; -use framework::plugins::{PL_MGR_CMD_NAME, PL_CMD_NAME, run_pl_mgr, run_pl}; use framework::{ VERBOSITY_OPT_NAME, VERBOSITY_OPT_SHORT_NAME, VERBOSITY_OPT_LNA, VERBOSITY_KEYWORDS_OPT_NAME, VERBOSITY_KEYWORDS_OPT_LONG_NAME, @@ -419,8 +418,9 @@ fn main() -> Result<()> { ); } - framework::plugins::add_helps(&mut helps, plugins.as_ref()); - framework::aux_cmds::add_helps(&mut helps, &aux_cmds); + commands::plugin::add_helps(&mut helps, plugins.as_ref()); + commands::plugins::add_helps(&mut helps); + commands::aux_cmds::add_helps(&mut helps, &aux_cmds); commands::eval::add_helps(&mut helps); commands::exec::add_helps(&mut helps); commands::credentials::add_helps(&mut helps); @@ -442,8 +442,9 @@ fn main() -> Result<()> { app = commands::eval::add_commands(app, &helps, &extensions)?; app = commands::exec::add_commands(app, &helps, &extensions)?; app = commands::interactive::add_commands(app, &helps, &extensions)?; - app = framework::plugins::add_commands(app, &helps, plugins.as_ref(), &extensions)?; - app = framework::aux_cmds::add_commands(app, &helps, &aux_cmds, &extensions)?; + app = commands::plugin::add_commands(app, &helps, plugins.as_ref(), &extensions)?; + app = commands::plugins::add_commands(app, &helps, &extensions)?; + app = commands::aux_cmds::add_commands(app, &helps, &aux_cmds, &extensions)?; /************************************************************************************/ /******************** Origen dev commands *******************************************/ @@ -1271,7 +1272,7 @@ Examples: _ => {} } } - Some("credentials") => run_cmd_match_case!(credentials), + Some(commands::credentials::BASE_CMD) => run_cmd_match_case!(credentials), Some("mode") => { let matches = matches.subcommand_matches("mode").unwrap(); commands::mode::run(matches.get_one::<&str>("mode").map(|s| *s)); @@ -1280,8 +1281,8 @@ Examples: let matches = matches.subcommand_matches("save_ref").unwrap(); commands::save_ref::run(matches); } - Some(PL_MGR_CMD_NAME) => run_pl_mgr(matches.subcommand_matches(PL_MGR_CMD_NAME).unwrap(), plugins.as_ref())?, - Some(PL_CMD_NAME) => run_pl(matches.subcommand_matches(PL_CMD_NAME).unwrap(), &app, &extensions, plugins.as_ref())?, + Some(commands::plugin::BASE_CMD) => run_cmd_match_case!(plugin), + Some(commands::plugins::BASE_CMD) => commands::plugins::run(matches.subcommand_matches(commands::plugins::BASE_CMD).unwrap(), plugins.as_ref())?, Some(invalid_cmd) => { // This case shouldn't happen as clap should've previously kicked out on any invalid command unreachable!("Uncaught invalid command encountered: '{}'", invalid_cmd); @@ -1294,7 +1295,7 @@ Examples: return Ok(()) } // To get here means the user has typed "origen -v", which officially means - // verbosity level 1 with no command, but this is what they really mean + // verbosity level 1 with no command, but really want version with verbosity level 0 let mut max_len = 0; let mut versions: IndexMap = IndexMap::new(); if STATUS.is_app_present { diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index 5aafecc2..cdc5a9e7 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -16,5 +16,5 @@ pub use crate::{ gen_core_cmd_funcs, gen_core_cmd_funcs__no_exts__no_app_opts, core_subcmd, core_subcmd__no_exts__no_app_opts, gen_simple_run_func, - print_subcmds_available_msg, + print_subcmds_available_msg, unreachable_invalid_subc, }; \ No newline at end of file diff --git a/rust/origen/cli/src/commands/app.rs b/rust/origen/cli/src/commands/app.rs index 830153d8..f900f64a 100644 --- a/rust/origen/cli/src/commands/app.rs +++ b/rust/origen/cli/src/commands/app.rs @@ -8,7 +8,7 @@ use crate::framework::app_cmds::add_helps as add_app_cmd_helps; pub const BASE_CMD: &'static str = "app"; pub (crate) fn add_helps(helps: &mut CmdHelps, app_cmds: &AppCmds) { - helps.add_core_cmd(BASE_CMD).set_help_msg("Manage and interface with the application"); + helps.add_core_cmd(BASE_CMD).set_help_msg("Manage and interface with the application").set_as_not_extendable(); add_app_cmd_helps(helps, app_cmds); } diff --git a/rust/origen/cli/src/commands/aux_cmds.rs b/rust/origen/cli/src/commands/aux_cmds.rs index 5549f676..920ae1f2 100644 --- a/rust/origen/cli/src/commands/aux_cmds.rs +++ b/rust/origen/cli/src/commands/aux_cmds.rs @@ -1,7 +1,22 @@ -pub use crate::framework::aux_cmds::BASE_CMD; use super::launch_as; -use crate::framework::build_path; +use crate::framework::{AuxCmds, build_path}; +use crate::framework::aux_cmds::{add_aux_ns_subcmds, add_aux_ns_helps}; use indexmap::IndexMap; +use super::_prelude::*; +use crate::framework::helps::NOT_EXTENDABLE_MSG; + +pub const BASE_CMD: &'static str = "auxillary_commands"; + +pub (crate) fn add_helps(helps: &mut CmdHelps, aux_cmds: &AuxCmds) { + helps.add_core_cmd(BASE_CMD).set_help_msg("Interface with auxillary commands").set_as_not_extendable(); + add_aux_ns_helps(helps, aux_cmds); +} + +pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: &'a AuxCmds, exts: &'a Extensions) -> Result> { + let mut aux_sub = helps.core_cmd(BASE_CMD).visible_alias("aux_cmds").arg_required_else_help(true); + aux_sub = add_aux_ns_subcmds(&app, aux_sub, helps, aux_commands, exts)?; + Ok(app.subcommand(aux_sub)) +} pub(crate) fn run(cmd: &clap::ArgMatches, mut app: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>, aux_cmds: &crate::AuxCmds) -> origen::Result<()> { if let Some(subc) = cmd.subcommand() { diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 46ab46ad..b687f19d 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -14,6 +14,8 @@ pub mod target; pub mod credentials; pub mod eval; pub mod aux_cmds; +pub mod plugin; +pub mod plugins; pub mod _prelude; use crate::python; @@ -29,6 +31,13 @@ use crate::framework::extensions::{Extension, ExtensionSource}; use crate::Plugins; use std::collections::HashMap; +#[macro_export] +macro_rules! unreachable_invalid_subc { + ($subcmd:expr) => {{ + unreachable!("Uncaught Invalid Subcommand {} From {}", $subcmd, module_path!()) + }} +} + #[macro_export] macro_rules! print_subcmds_available_msg { () => {{ diff --git a/rust/origen/cli/src/commands/plugin.rs b/rust/origen/cli/src/commands/plugin.rs new file mode 100644 index 00000000..830f1486 --- /dev/null +++ b/rust/origen/cli/src/commands/plugin.rs @@ -0,0 +1,27 @@ +use super::_prelude::*; +use crate::framework::plugins::{add_pl_ns_helps, add_pl_ns_subcmds}; + +pub const BASE_CMD: &'static str = "plugin"; + +pub (crate) fn add_helps(helps: &mut CmdHelps, plugins: Option<&Plugins>) { + helps.add_core_cmd(BASE_CMD).set_help_msg("Access added commands from individual plugins").set_as_not_extendable(); + add_pl_ns_helps(helps, plugins); +} + +pub (crate) fn add_commands<'a>(mut app: App<'a>, helps: &'a CmdHelps, plugins: Option<&'a Plugins>, exts: &'a Extensions) -> Result> { + let mut pl_sub = Command::new(BASE_CMD).visible_alias("pl").arg_required_else_help(true); + pl_sub = helps.apply_core_cmd_helps(BASE_CMD, pl_sub); + if let Some(pls) = plugins { + pl_sub = add_pl_ns_subcmds(pl_sub, helps, pls, exts)?; + } + Ok(app.subcommand(pl_sub)) +} + +pub fn run(cmd: RunInput, app: &clap::App, exts: &crate::Extensions, plugins: Option<&Plugins>) -> Result<()> { + if let Some(subcmd) = cmd.subcommand() { + let sub = subcmd.1; + plugins.unwrap().plugins.get(subcmd.0).unwrap().dispatch(sub, app, exts, plugins) + } else { + Ok(()) + } +} \ No newline at end of file diff --git a/rust/origen/cli/src/commands/plugins.rs b/rust/origen/cli/src/commands/plugins.rs new file mode 100644 index 00000000..e9fa7039 --- /dev/null +++ b/rust/origen/cli/src/commands/plugins.rs @@ -0,0 +1,37 @@ +use super::_prelude::*; + +pub const BASE_CMD: &'static str = "plugins"; + +gen_core_cmd_funcs__no_exts__no_app_opts!( + BASE_CMD, + "Interface with the Origen plugin manager", + { |cmd: App<'a>| { + cmd.visible_alias("pl_mgr").visible_alias("pls").arg_required_else_help(true) + }}, + core_subcmd__no_exts__no_app_opts!("list", "List the available plugins", { |cmd: App| { + cmd.visible_alias("ls") + }}) +); + +pub fn run(cmd: RunInput, plugins: Option<&Plugins>) -> Result<()> { + if let Some(subcmd) = cmd.subcommand() { + match subcmd.0 { + "list" => { + if let Some(pls) = plugins { + if pls.is_empty() { + displayln!("There are no available plugins!"); + } else { + displayln!("Available plugins:\n"); + for (name, _) in pls.plugins.iter() { + displayln!("{}", name); + } + } + } else { + displayln!("The plugin manager is not available or there was an error populating plugins!"); + } + }, + _ => unreachable_invalid_subc!(subcmd.0) + } + } + Ok(()) +} diff --git a/rust/origen/cli/src/commands/target.rs b/rust/origen/cli/src/commands/target.rs index c8094e49..9c99d01e 100644 --- a/rust/origen/cli/src/commands/target.rs +++ b/rust/origen/cli/src/commands/target.rs @@ -105,10 +105,7 @@ pub(crate) fn run(mut invocation: &clap::ArgMatches) -> origen::Result<()> { view!(subcmd)?; return Ok(()); } - _ => { - // Shouldn't hit this. Should be caught by clap before getting here - backend_fail!("Unknown subcommand in target processor"); - } + _ => unreachable_invalid_subc!(n) } // Show the effect after running the command view!(subcmd) diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index 5486a46d..bd90f647 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -85,7 +85,7 @@ impl AppCmds { } pub (crate) fn add_helps(helps: &mut CmdHelps, app_cmds: &AppCmds) { - helps.add_core_sub_cmd(&APP_COMMANDS).set_help_msg("Interface with commands added by the application"); + helps.add_core_sub_cmd(&APP_COMMANDS).set_help_msg("Interface with commands added by the application").set_as_not_extendable(); for (n, c) in app_cmds.commands.iter() { helps.add_app_cmd(n).set_help_msg(&c.help); } diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index 4b7f9bc5..640f3844 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -7,8 +7,40 @@ use origen::core::config::AuxillaryCommandsTOML; use super::extensions::ExtensionTOML; use super::{CommandTOML}; use clap::Command as ClapCommand; +use super::helps::NOT_EXTENDABLE_MSG; -pub const BASE_CMD: &'static str = "auxillary_commands"; +pub (crate) fn add_aux_ns_helps(helps: &mut CmdHelps, aux_cmds: &AuxCmds) { + for (ns, cmds) in aux_cmds.namespaces.iter() { + for (n, c) in cmds.commands.iter() { + helps.add_aux_cmd(ns, n).set_help_msg(&c.help); + } + } +} + +pub (crate) fn add_aux_ns_subcmds<'a>(app: &App<'a>, mut aux_sub: App<'a>, helps: &'a CmdHelps, aux_commands: &'a AuxCmds, exts: &'a Extensions) -> Result> { + for (ns, cmds) in aux_commands.namespaces.iter() { + let mut aux_sub_sub = ClapCommand::new(ns).arg_required_else_help(true).after_help(NOT_EXTENDABLE_MSG); + if let Some(h) = cmds.help.as_ref() { + aux_sub_sub = aux_sub_sub.about(h.as_str()); + } + for top_cmd_name in cmds.top_commands.iter() { + aux_sub_sub = aux_sub_sub.subcommand(build_commands( + &cmds.commands.get(top_cmd_name).unwrap(), + &|cmd, app, opt_cache| { + exts.apply_to_aux_cmd(&ns, cmd, app, opt_cache) + }, + &|cmd| { + cmds.commands.get(cmd).unwrap() + }, + &|cmd, app| { + helps.apply_helps(&CmdSrc::Aux(ns.to_string(), cmd.to_string()), app) + } + )); + } + aux_sub = aux_sub.subcommand(aux_sub_sub); + } + Ok(aux_sub) +} #[derive(Debug, Deserialize)] pub (crate) struct CommandsToml { @@ -148,48 +180,3 @@ impl AuxCmdNamespace { origen_config_metadata().aux_cmd_sources[self.index].to_path_buf() } } - -pub (crate) fn add_helps(helps: &mut CmdHelps, aux_cmds: &AuxCmds) { - helps.add_core_cmd(BASE_CMD).set_help_msg("Interface with auxillary commands"); - for (ns, cmds) in aux_cmds.namespaces.iter() { - for (n, c) in cmds.commands.iter() { - helps.add_aux_cmd(ns, n).set_help_msg(&c.help); - } - } -} - -pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: &'a AuxCmds, exts: &'a Extensions) -> Result> { - // let help = "Interface with auxillary commands"; - // origen_commands.push(CommandHelp { - // name: CMD_NAME.to_string(), - // help: help.to_string(), - // shortcut: None, - // }); - - let mut aux_sub = helps.core_cmd(BASE_CMD) - .visible_alias("aux_cmds") - .arg_required_else_help(true); - - for (ns, cmds) in aux_commands.namespaces.iter() { - let mut aux_sub_sub = ClapCommand::new(ns).setting(AppSettings::ArgRequiredElseHelp); - if let Some(h) = cmds.help.as_ref() { - aux_sub_sub = aux_sub_sub.about(h.as_str()); - } - for top_cmd_name in cmds.top_commands.iter() { - aux_sub_sub = aux_sub_sub.subcommand(build_commands( - &cmds.commands.get(top_cmd_name).unwrap(), - &|cmd, app, opt_cache| { - exts.apply_to_aux_cmd(&ns, cmd, app, opt_cache) - }, - &|cmd| { - cmds.commands.get(cmd).unwrap() - }, - &|cmd, app| { - helps.apply_helps(&CmdSrc::Aux(ns.to_string(), cmd.to_string()), app) - } - )); - } - aux_sub = aux_sub.subcommand(aux_sub_sub); - } - Ok(app.subcommand(aux_sub)) -} \ No newline at end of file diff --git a/rust/origen/cli/src/framework/helps.rs b/rust/origen/cli/src/framework/helps.rs index c4a36879..4322edbf 100644 --- a/rust/origen/cli/src/framework/helps.rs +++ b/rust/origen/cli/src/framework/helps.rs @@ -27,8 +27,6 @@ impl CmdHelps { } pub fn add_core_cmd(&mut self, cmd_name: &str) -> &mut CmdHelp { - // self.insert(CmdSrc::Core(cmd_name.to_string()), CmdHelp::new()); - // self.get() self.helps.entry(CmdSrc::Core(cmd_name.to_string())).or_default() } @@ -41,9 +39,6 @@ impl CmdHelps { } pub fn add_pl_cmd(&mut self, pl_name: &str, cmd_name: &str) -> &mut CmdHelp { - // self.insert(CmdSrc::Core(cmd_name.to_string()), CmdHelp::new()); - // self.get() - // &mut self.entry(CmdSrc::Core(cmd_name.to_string())).and_modify() self.helps.entry(CmdSrc::Plugin(pl_name.to_string(), cmd_name.to_string())).or_default() } diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index acb7199b..476fb075 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -6,45 +6,10 @@ use std::fs; use crate::commands::_prelude::*; use super::{ClapCommand, Command, CommandsToml, CommandTOML, Extensions, build_path}; use crate::commands::launch_as; +use super::helps::NOT_EXTENDABLE_MSG; -pub const PL_MGR_CMD_NAME: &'static str = "plugins"; -pub const PL_CMD_NAME: &'static str = "plugin"; -pub const PL_MGR_LIST_CMD: [&'static str; 2] = [PL_MGR_CMD_NAME, "list"]; - -pub fn run_pl_mgr(cmd: RunInput, plugins: Option<&Plugins>) -> Result<()> { - if let Some(subcmd) = cmd.subcommand() { - match subcmd.0 { - "list" => { - if let Some(pls) = plugins { - displayln!("Available plugins:\n"); - for (name, _) in pls.plugins.iter() { - displayln!("{}", name); - } - } else { - displayln!("No plugins available!"); - } - }, - _ => unreachable!() - } - } - Ok(()) -} - -pub fn run_pl(cmd: RunInput, app: &clap::App, exts: &crate::Extensions, plugins: Option<&Plugins>) -> Result<()> { - if let Some(subcmd) = cmd.subcommand() { - let sub = subcmd.1; - plugins.unwrap().plugins.get(subcmd.0).unwrap().dispatch(sub, app, exts, plugins) - } else { - Ok(()) - } -} - -pub (crate) fn add_helps(helps: &mut CmdHelps, plugins: Option<&Plugins>) { - helps.add_core_cmd(PL_MGR_CMD_NAME).set_help_msg("Interface with the Origen plugin manager"); - helps.add_core_sub_cmd(&PL_MGR_LIST_CMD).set_help_msg("List the available plugins"); - - helps.add_core_cmd(PL_CMD_NAME).set_help_msg("Access added commands from individual plugins"); +pub (crate) fn add_pl_ns_helps(helps: &mut CmdHelps, plugins: Option<&Plugins>) { if let Some(pls) = plugins { for (pl_name, pl) in pls.plugins.iter() { for (n, c) in pl.commands.iter() { @@ -54,116 +19,32 @@ pub (crate) fn add_helps(helps: &mut CmdHelps, plugins: Option<&Plugins>) { } } -// cmd_helps: &'a mut crate::CmdHelps, -pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, plugins: Option<&'a Plugins>, exts: &'a Extensions) -> Result> { - // let help = "Interface with the Origen plugin manager"; - // helps.add_core_cmd(PL_MGR_CMD_NAME.to_string()).set_help_msg("Interface with the Origen plugin manager"); - // origen_commands.push(CommandHelp { - // name: PL_MGR_CMD_NAME.to_string(), - // help: help.to_string(), - // shortcut: None, - // }); - let updated = app.subcommand( - helps.apply_core_cmd_helps( - PL_MGR_CMD_NAME, - ClapCommand::new(PL_MGR_CMD_NAME) - // .about(help) - .visible_alias("pl_mgr") - .visible_alias("pls") - .arg_required_else_help(true) - .subcommand( - helps.core_subc(&PL_MGR_LIST_CMD) - .visible_alias("ls") - // ClapCommand::new("list") - // .about("List the available plugins") - // .visible_alias("ls") - // .arg( - // Arg::new("all") - // .help("Set the password for all datasets") - // .takes_value(false) - // .required(false) - // .long("all") - // .short('a'), - // ) +pub (crate) fn add_pl_ns_subcmds<'a>(mut pl_sub: App<'a>, helps: &'a CmdHelps, plugins: &'a Plugins, exts: &'a Extensions) -> Result> { + for (pl_name, pl) in plugins.plugins.iter() { + let mut pl_sub_sub = ClapCommand::new(pl_name.as_str()).setting(AppSettings::ArgRequiredElseHelp).after_help(NOT_EXTENDABLE_MSG); + for n in pl.top_commands.iter() { + pl_sub_sub = pl_sub_sub.subcommand( + super::build_commands( + &pl.commands.get(n).unwrap(), + &|cmd, app, opt_cache| { + exts.apply_to_pl_cmd(&pl_name, cmd, app, opt_cache) + }, + &|cmd| { + plugins.plugins.get(pl_name).unwrap().commands.get(cmd).unwrap() + }, + &|cmd, app| { + helps.apply_helps(&CmdSrc::Plugin(pl_name.to_string(), cmd.to_string()), app) + } ) - ) - ); - - // let help = "Access added commands from individual plugins"; - // origen_commands.push(CommandHelp { - // name: PL_CMD_NAME.to_string(), - // help: help.to_string(), - // shortcut: None, - // }); - let mut pl_sub = ClapCommand::new(PL_CMD_NAME) - // .about(help) - .visible_alias("pl"); - pl_sub = helps.apply_core_cmd_helps(PL_CMD_NAME, pl_sub); - - if let Some(pls) = plugins { - for (pl_name, pl) in pls.plugins.iter() { - let mut pl_sub_sub = ClapCommand::new(pl_name.as_str()).setting(AppSettings::ArgRequiredElseHelp); - // if let Some(pl_cmds) = pl.commands { - // for (n, c) in pl_cmds { - // for (n, c) in pl.commands.iter() { - for n in pl.top_commands.iter() { - // pl_sub_sub = pl_sub_sub.subcommand(crate::build_pl_commands(&c, &pls)); - pl_sub_sub = pl_sub_sub.subcommand( - super::build_commands( - // c, // &cmds.commands.get(top_cmd_name).unwrap(), - &pl.commands.get(n).unwrap(), - // cmd_helps, - &|cmd, app, opt_cache| { - // println!("cmd... {}", cmd); - // println!("pl name.. {}", pl_name); - exts.apply_to_pl_cmd(&pl_name, cmd, app, opt_cache) - }, - &|cmd| { - // let split = cmd.split_once('.').unwrap(); - // println!("S: {:?}", split); - pls.plugins.get(pl_name).unwrap().commands.get(cmd).unwrap() - // pls.plugins.get(split.0).unwrap().commands.get(split.1).unwrap() - }, - &|cmd, app| { - // let split = cmd.split_once('.').unwrap(); - helps.apply_helps(&CmdSrc::Plugin(pl_name.to_string(), cmd.to_string()), app) - } - ) - ); -// for c in subcommands { -// // let subcmd = build_command(&c); -// let split = c.split_once('.').unwrap(); -// let subcmd = build_pl_commands(plugins.plugins.get(split.0).unwrap().commands.get(split.1).unwrap(), plugins); -// cmd = cmd.subcommand(subcmd); -// } - - } - pl_sub = pl_sub.subcommand(pl_sub_sub); - // } + ); } + pl_sub = pl_sub.subcommand(pl_sub_sub) } - let updated = updated.subcommand(pl_sub); - // let updated = app.subcommand( - // SubCommand::with_name(PL_CMD_NAME) - // .about(help) - // // .setting(AppSettings::ArgRequiredElseHelp) - // .visible_alias("pl") - // // .arg( - // // Arg::new("code") - // // .help("Set the password for all datasets") - // // .takes_value(true) - // // .value_name("CODE") - // // .multiple(true) - // // .required(true) - // // ) - // ); - - Ok(updated) + Ok(pl_sub) } pub struct Plugins { pub plugins: IndexMap - // pub commands: HashMap } impl Plugins { @@ -206,6 +87,10 @@ impl Plugins { Ok(None) } } + + pub fn is_empty(&self) -> bool { + self.plugins.is_empty() + } } pub struct Plugin { diff --git a/test_apps/python_app/config/commands.toml b/test_apps/python_app/config/commands.toml index d8032640..cb8ff570 100644 --- a/test_apps/python_app/config/commands.toml +++ b/test_apps/python_app/config/commands.toml @@ -15,7 +15,6 @@ [[command.arg]] name = "arg2" help = "A required argument accepting multiple values" - switch = false takes_value = true multiple = true required = true diff --git a/test_apps/python_app/config/origen.toml b/test_apps/python_app/config/origen.toml index 43972d56..8cbb6108 100644 --- a/test_apps/python_app/config/origen.toml +++ b/test_apps/python_app/config/origen.toml @@ -73,6 +73,8 @@ domain = "origen.org" user = "dummy_ldap_read_only" timeout = 120 -# FOR_PR test adding aux commands from app? -# [[auxillary_commands]] -# path = "../tests/cli/cmd_testers" +[[auxillary_commands]] + path = "../../test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/dummy_cmds.toml" + +[[auxillary_commands]] + path = "../../test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns.toml" diff --git a/test_apps/python_app/pyproject.toml b/test_apps/python_app/pyproject.toml index 688d6e26..a66e0f68 100644 --- a/test_apps/python_app/pyproject.toml +++ b/test_apps/python_app/pyproject.toml @@ -9,6 +9,7 @@ python = ">=3.7,<3.11" origen = "= 2.0.0.dev5" python_plugin = { path = "../python_plugin", develop = true } test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true } +python_plugin_no_cmds = { path = "../python_plugin_no_cmds", develop = true } [tool.poetry.dev-dependencies] pytest = "^6.0" diff --git a/test_apps/python_app/tests/cli/core_cmds/app.py b/test_apps/python_app/tests/cli/core_cmds/app.py new file mode 100644 index 00000000..53abeb54 --- /dev/null +++ b/test_apps/python_app/tests/cli/core_cmds/app.py @@ -0,0 +1,16 @@ +from test_apps_shared_test_helpers.cli.auditors import CmdNamespaceAuditor +from ..shared import CLICommon +import pytest + +class T_App(CLICommon): + class TestAppCommands(CmdNamespaceAuditor, CLICommon): + nspace = CLICommon.app_cmds + nspace_help_offset = 3 + empty_nspace = CLICommon.empty_app + + def test_app_cmd_help_msg(self): + cmd = CLICommon.in_app_cmds.app + help = cmd.get_help_msg() + help.assert_cmd(cmd) + out = cmd.gen_error() + assert out == help.text \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/core_cmds/aux_cmds.py b/test_apps/python_app/tests/cli/core_cmds/aux_cmds.py new file mode 100644 index 00000000..ab3d3c6b --- /dev/null +++ b/test_apps/python_app/tests/cli/core_cmds/aux_cmds.py @@ -0,0 +1,13 @@ +from test_apps_shared_test_helpers.cli.auditors import CmdNamespaceContainerAuditor +from ..shared import CLICommon + +class T_AuxCmds(CmdNamespaceContainerAuditor): + container = CmdNamespaceContainerAuditor.in_app_cmds.aux_cmds + container_help_offset = 2 + container_nspaces = [ + CmdNamespaceContainerAuditor.aux.ns.dummy_cmds, + CmdNamespaceContainerAuditor.aux.ns.empty_aux_ns, + ] + nspace = CmdNamespaceContainerAuditor.aux.ns.dummy_cmds + nspace_help_offset = 1 + empty_nspace = CmdNamespaceContainerAuditor.aux.ns.empty_aux_ns diff --git a/test_apps/python_app/tests/cli/core_cmds/plugin.py b/test_apps/python_app/tests/cli/core_cmds/plugin.py new file mode 100644 index 00000000..3b3b6f42 --- /dev/null +++ b/test_apps/python_app/tests/cli/core_cmds/plugin.py @@ -0,0 +1,10 @@ +from test_apps_shared_test_helpers.cli.auditors import CmdNamespaceContainerAuditor +from ..shared import CLICommon + +class T_Plugin(CmdNamespaceContainerAuditor): + container = CLICommon.in_app_cmds.pl + container_help_offset = 0 + container_nspaces = CLICommon.loaded_plugins_alpha() + nspace = CmdNamespaceContainerAuditor.plugins.python_plugin + nspace_help_offset = 3 + empty_nspace = CmdNamespaceContainerAuditor.plugins.python_plugin_no_cmds diff --git a/test_apps/python_app/tests/cli/core_cmds/plugins.py b/test_apps/python_app/tests/cli/core_cmds/plugins.py new file mode 100644 index 00000000..7dd2fcc4 --- /dev/null +++ b/test_apps/python_app/tests/cli/core_cmds/plugins.py @@ -0,0 +1,5 @@ +from test_apps_shared_test_helpers.cli.auditors import PluginsCmdAudit +from ..shared import CLICommon + +class T_Plugins(PluginsCmdAudit): + loaded_plugins = CLICommon.loaded_plugins() diff --git a/test_apps/python_app/tests/cli/shared.py b/test_apps/python_app/tests/cli/shared.py index dd75c507..71d66b34 100644 --- a/test_apps/python_app/tests/cli/shared.py +++ b/test_apps/python_app/tests/cli/shared.py @@ -7,94 +7,115 @@ Cmd = CLIShared.Cmd +class EmptyApp(SrcBase): + def __init__(self): + self.src_type = cli.SrcTypes.APP + self.name = "example" + self.app_cmds = CLIShared.in_app_cmds.app.commands.extend( + [], + with_env = {"origen_app_config_paths": str(PythonAppCommon.to_config_path("empty_app_cmds.toml"))}, + ) + class CLICommon(CLIShared, PythonAppCommon): class AppCmds(SrcBase): def __init__(self): self.src_type = cli.SrcTypes.APP self.name = "example" - self.warmup_cmd = CLIShared.app_sub_cmd( - "arg_opt_warmup", - help = "Gross test command demonstrating args/opts from app commands", - args=[ - CmdArg("first", help="First Argument - Required", required=True), - CmdArg("second", help="Second Multi-Argument - Not Required", use_delimiter=True, multi=True), - ], - opts=[ - CmdOpt("flag_opt", sn="f", help="Flag opt"), - CmdOpt("single_opt", sn_aliases=["s"], takes_value=True, help="Single-value non-required opt"), - CmdOpt("multi_opt", sn_aliases=["m"], ln_aliases=["m_opt"], multi=True, help="Multi-value non-required opt"), - CmdOpt("hidden_flag_opt", hidden=True, ln="hidden", help="Hidden flag opt"), - ] - ) - self.nested_cmds = CLIShared.app_sub_cmd( - "nested_app_cmds", - help="Nested app cmds", - subcmds=[ - Cmd( - "nested_l1", - help="Nested app cmds level 1", - subcmds=[ - Cmd( - "nested_l2_a", - help="Nested app cmds level 2 (A)", - subcmds=[ - Cmd( - "nested_l3_a", - help="Nested app cmds level 3 (A-A)" - ), - Cmd( - "nested_l3_b", - help="Nested app cmds level 3 (A-B)" - ), - ] - ), - Cmd( - "nested_l2_b", - help="Nested app cmds level 2 (B)", - subcmds=[ - Cmd( - "nested_l3_a", - help="Nested app cmds level 3 (B-A)" - ), - Cmd( - "nested_l3_b", - help="Nested app cmds level 3 (B-B)" - ), - ] - ) - ] - ) - ] - ) - self.disabling_app_opts = CLIShared.app_sub_cmd( - "disabling_app_opts", - help="Test disabling standard app opts", - subcmds=[ - Cmd( - "disable_targets_opt", - help="Disable the targets and no-targets opt", - subcmds=[ - Cmd("disable_subc", help="Disables inherited from parent"), - Cmd("override_subc", help="Overrides disable inherited from parent"), - ] - ), - Cmd( - "disable_mode_opt", - help="Disable the mode opt", - subcmds=[ - Cmd("disable_subc",help="Disables inherited from parent"), - Cmd("override_subc", help="Overrides disable inherited from parent"), - ] - ), - Cmd( - "disable_app_opts", - help="Disable all app opts", - subcmds=[ - Cmd("disable_subc",help="Disables inherited from parent"), - Cmd("override_subc", help="Overrides disable inherited from parent"), - ] - ) - ] + self.app_cmds = CLIShared.in_app_cmds.app.commands.extend([]) + self.app_cmds.replace_subcmds( + Cmd( + "arg_opt_warmup", + help = "Gross test command demonstrating args/opts from app commands", + args=[ + CmdArg("first", help="First Argument - Required", required=True), + CmdArg("second", help="Second Multi-Argument - Not Required", use_delimiter=True, multi=True), + ], + opts=[ + CmdOpt("flag_opt", sn="f", help="Flag opt"), + CmdOpt("single_opt", sn_aliases=["s"], takes_value=True, help="Single-value non-required opt"), + CmdOpt("multi_opt", sn_aliases=["m"], ln_aliases=["m_opt"], multi=True, help="Multi-value non-required opt"), + CmdOpt("hidden_flag_opt", hidden=True, ln="hidden", help="Hidden flag opt"), + ] + ), + Cmd( + "disabling_app_opts", + help="Test disabling standard app opts", + subcmds=[ + Cmd( + "disable_targets_opt", + help="Disable the targets and no-targets opt", + subcmds=[ + Cmd("disable_subc", help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ), + Cmd( + "disable_mode_opt", + help="Disable the mode opt", + subcmds=[ + Cmd("disable_subc",help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ), + Cmd( + "disable_app_opts", + help="Disable all app opts", + subcmds=[ + Cmd("disable_subc",help="Disables inherited from parent"), + Cmd("override_subc", help="Overrides disable inherited from parent"), + ] + ) + ] + ), + Cmd( + "examples", + help="Run diff-based regression tests of the pattern and program generator", + ), + Cmd( + "nested_app_cmds", + help="Nested app cmds", + subcmds=[ + Cmd( + "nested_l1", + help="Nested app cmds level 1", + subcmds=[ + Cmd( + "nested_l2_a", + help="Nested app cmds level 2 (A)", + subcmds=[ + Cmd( + "nested_l3_a", + help="Nested app cmds level 3 (A-A)" + ), + Cmd( + "nested_l3_b", + help="Nested app cmds level 3 (A-B)" + ), + ] + ), + Cmd( + "nested_l2_b", + help="Nested app cmds level 2 (B)", + subcmds=[ + Cmd( + "nested_l3_a", + help="Nested app cmds level 3 (B-A)" + ), + Cmd( + "nested_l3_b", + help="Nested app cmds level 3 (B-B)" + ), + ] + ) + ] + ) + ] + ), + Cmd( + "playground", + help="This is used to test Origen's app command definition and dispatch", + aliases=["y"], + ), ) self.intra_cmd_conflicts = CLIShared.app_sub_cmd( "intra_cmd_conflicts", @@ -395,12 +416,31 @@ def arg_opt_warmup(self): app_cmds = AppCmds() app_commands = app_cmds + empty_app = EmptyApp() _no_config_run_opts = { "with_configs": CLIShared.configs.suppress_plugin_collecting_config, "bypass_config_lookup": True } + @classmethod + def loaded_plugins_alpha(cls): + return [ + cls.plugins.pl_ext_cmds, + cls.plugins.py_pl, + cls.plugins.python_plugin_no_cmds, + cls.plugins.tas, + ] + + @classmethod + def loaded_plugins(cls): + return [ + cls.plugins.python_plugin_no_cmds, + cls.plugins.pl_ext_cmds, + cls.plugins.tas, + cls.plugins.py_pl, + ] + @pytest.fixture def no_config_run_opts(self): return self._no_config_run_opts diff --git a/test_apps/python_app/tests/cli/tests__app_cmd_building.py b/test_apps/python_app/tests/cli/tests__app_cmd_building.py index 578e0cdf..512d5bfb 100644 --- a/test_apps/python_app/tests/cli/tests__app_cmd_building.py +++ b/test_apps/python_app/tests/cli/tests__app_cmd_building.py @@ -2,8 +2,8 @@ from .shared import CLICommon, Cmd, CmdOpt, CmdArg class T_AppCmdBuilding(CLICommon): - warmup_cmd = CLICommon.app_cmds.warmup_cmd - nested_cmds = CLICommon.app_cmds.nested_cmds + warmup_cmd = CLICommon.app_cmds.arg_opt_warmup + nested_cmds = CLICommon.app_cmds.nested_app_cmds def test_app_command_args_and_opts(self): cmd = self.warmup_cmd diff --git a/test_apps/python_app/tests/cli/tests__core_cmds.py b/test_apps/python_app/tests/cli/tests__core_cmds.py index 30394729..6a8514e6 100644 --- a/test_apps/python_app/tests/cli/tests__core_cmds.py +++ b/test_apps/python_app/tests/cli/tests__core_cmds.py @@ -1,6 +1,10 @@ import pytest, origen from .shared import CLICommon +from .core_cmds.aux_cmds import T_AuxCmds from .core_cmds.target import T_Target +from .core_cmds.app import T_App +from .core_cmds.plugin import T_Plugin +from .core_cmds.plugins import T_Plugins class T_AppWorkspaceCoreCommands(CLICommon): @property @@ -37,6 +41,12 @@ def test_core_commands_are_available(self, cmd): assert len(help.opts) >= 3 # FOR_PR add check for app opts when applicable + class TestApp(T_App): + pass + + class TestAuxCmds(T_AuxCmds): + pass + class TestEval(CLICommon): _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.eval @@ -51,6 +61,12 @@ def test_basic_eval(self, cmd, no_config_run_opts): out = d.run(run_opts=no_config_run_opts) d.assert_present(out) + class TestPlugin(T_Plugin): + pass + + class TestPlugins(T_Plugins): + pass + class TestTarget(T_Target): pass diff --git a/test_apps/python_app/tests/cli/tests__extending_app_cmds.py b/test_apps/python_app/tests/cli/tests__extending_app_cmds.py index 06830af8..e3451e25 100644 --- a/test_apps/python_app/tests/cli/tests__extending_app_cmds.py +++ b/test_apps/python_app/tests/cli/tests__extending_app_cmds.py @@ -11,14 +11,14 @@ class TestExtendingAppCmds(CLICommon): ) config_shallow_subc = CLICommon.app_cmds.exts["app.nested_app_cmds.nested_l1"] - shallow_subc = CLICommon.app_cmds.nested_cmds.nested_l1.extend( + shallow_subc = CLICommon.app_cmds.nested_app_cmds.nested_l1.extend( config_shallow_subc["exts"], from_configs=[config_shallow_subc["cfg"]], with_env=config_shallow_subc["env"], ) config_deep_subc = CLICommon.app_cmds.exts["app.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a"] - deep_subc = CLICommon.app_cmds.nested_cmds.nested_l1.nested_l2_b.nested_l3_a.extend( + deep_subc = CLICommon.app_cmds.nested_app_cmds.nested_l1.nested_l2_b.nested_l3_a.extend( config_deep_subc["exts"], from_configs=[config_deep_subc["cfg"]], with_env=config_deep_subc["env"], diff --git a/test_apps/python_app/tests/configs/empty_app_cmds.toml b/test_apps/python_app/tests/configs/empty_app_cmds.toml new file mode 100644 index 00000000..f6c28576 --- /dev/null +++ b/test_apps/python_app/tests/configs/empty_app_cmds.toml @@ -0,0 +1 @@ +commands = [] \ No newline at end of file diff --git a/test_apps/python_no_app/origen.toml b/test_apps/python_no_app/origen.toml index b156ba8b..c90241dd 100644 --- a/test_apps/python_no_app/origen.toml +++ b/test_apps/python_no_app/origen.toml @@ -89,3 +89,6 @@ load = [ [[auxillary_commands]] name = "python_no_app_aux_cmds" path = "./tests/dummy_aux_cmds/dummy_aux_cmds.toml" + +[[auxillary_commands]] + path = "../test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns.toml" diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__aux_cmds.py b/test_apps/python_no_app/tests/cli/tests__cmd__aux_cmds.py new file mode 100644 index 00000000..6d284791 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__aux_cmds.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli.auditors import CmdNamespaceContainerAuditor +import pytest + +class T_AuxCmds(CmdNamespaceContainerAuditor): + container = CmdNamespaceContainerAuditor.global_cmds.aux_cmds + container_help_offset = 2 + container_nspaces = [ + CmdNamespaceContainerAuditor.aux.ns.cmd_testers, + CmdNamespaceContainerAuditor.aux.ns.empty_aux_ns, + CmdNamespaceContainerAuditor.aux.ns.python_no_app_aux_cmds + ] + nspace = CmdNamespaceContainerAuditor.aux.ns.python_no_app_aux_cmds + nspace_help_offset = 0 + empty_nspace = CmdNamespaceContainerAuditor.aux.ns.empty_aux_ns diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py index f55ba9df..a219481d 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py @@ -4,7 +4,7 @@ class T_Eval(CLICommon): _cmd= origen.helpers.regressions.cli.CLI.global_cmds.eval _no_config_run_opts = { - "with_configs": CLICommon.suppress_plugin_collecting_config, + "with_configs": CLICommon.configs.suppress_plugin_collecting_config, "bypass_config_lookup": True } diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__plugin.py b/test_apps/python_no_app/tests/cli/tests__cmd__plugin.py new file mode 100644 index 00000000..b472b89d --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__plugin.py @@ -0,0 +1,14 @@ +from test_apps_shared_test_helpers.cli.auditors import CmdNamespaceContainerAuditor +import pytest + +class T_Plugin(CmdNamespaceContainerAuditor): + container = CmdNamespaceContainerAuditor.global_cmds.pl + container_help_offset = 0 + container_nspaces = [ + CmdNamespaceContainerAuditor.plugins.python_plugin, + CmdNamespaceContainerAuditor.plugins.python_plugin_no_cmds, + CmdNamespaceContainerAuditor.plugins.python_plugin_the_second + ] + nspace = CmdNamespaceContainerAuditor.plugins.python_plugin + nspace_help_offset = 2 + empty_nspace = CmdNamespaceContainerAuditor.plugins.python_plugin_no_cmds diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__plugins.py b/test_apps/python_no_app/tests/cli/tests__cmd__plugins.py new file mode 100644 index 00000000..f77613d2 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__plugins.py @@ -0,0 +1,8 @@ +from test_apps_shared_test_helpers.cli.auditors import PluginsCmdAudit + +class T_Plugins(PluginsCmdAudit): + loaded_plugins = [ + PluginsCmdAudit.plugins.python_plugin, + PluginsCmdAudit.plugins.python_plugin_the_second, + PluginsCmdAudit.plugins.python_plugin_no_cmds, + ] diff --git a/test_apps/python_no_app/tests/cmd_building/shared.py b/test_apps/python_no_app/tests/cmd_building/shared.py index 4cf10885..d8e501e5 100644 --- a/test_apps/python_no_app/tests/cmd_building/shared.py +++ b/test_apps/python_no_app/tests/cmd_building/shared.py @@ -18,3 +18,12 @@ def with_cli_aux_cmds(self): os.remove(self.cli_config) os.remove(self.cli_dir.joinpath("aux_cmds_from_cli_dir.toml")) shutil.rmtree(dest_dir) + + @property + def aux_cmd_ns_subcs(self): + return [ + self.cmd_testers_cmd, + self.aux.ns.empty_aux_ns.base_cmd, + 'help', + self.aux.ns.python_no_app_aux_cmds.base_cmd + ] diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py index d05c53d7..cb385232 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py @@ -5,23 +5,14 @@ class T_LoadingAuxCommands(CLICommon, ConfigCommmon): def test_aux_commands_are_added(self): help = self.global_cmds.aux_cmds.get_help_msg() - help.assert_subcmds( - self.cmd_testers_cmd, - 'help', - self.aux.ns.python_no_app_aux_cmds.base_cmd - ) + help.assert_subcmds(*self.aux_cmd_ns_subcs) out = self.cmd_testers_cmd.run("python_no_app_tests") assert "Hi from No-App Origen!!" in out def test_aux_commands_stack(self, with_cli_aux_cmds): help = self.global_cmds.aux_cmds.get_help_msg() - help.assert_subcmds( - self.aux.ns.aux_cmds_from_cli_dir.base_cmd, - self.cmd_testers_cmd, - 'help', - self.aux.ns.python_no_app_aux_cmds.base_cmd - ) + help.assert_subcmds(self.aux.ns.aux_cmds_from_cli_dir.base_cmd, *self.aux_cmd_ns_subcs) out = self.aux.ns.aux_cmds_from_cli_dir.base_cmd.cli_dir_says_hi.run() assert "Hi from CLI dir!! " in out @@ -68,12 +59,7 @@ def test_conflicting_namespaces(self): conflicting_config = self.aux_cmd_configs_dir.joinpath("conflicting_namespaces_config.toml") out = self.global_cmds.aux_cmds.get_help_msg_str(with_configs=[conflicting_config, orig_config]) help = self.HelpMsg(out) - help.assert_subcmds( - self.aux.ns.add_aux_cmd.base_cmd, - self.cmd_testers_cmd, - "help", - self.aux.ns.python_no_app_aux_cmds.base_cmd - ) + help.assert_subcmds(self.aux.ns.add_aux_cmd.base_cmd, *self.aux_cmd_ns_subcs) assert "Auxillary commands namespaced 'add_aux_cmd' already exists." in out assert f"Cannot add namespace from config '{conflicting_config}'" in out assert f"Namespace first defined in config '{orig_config}'" in out @@ -98,12 +84,7 @@ def test_invalid_aux_path(self): ''' Should generate a logger error message but not kill the process''' out = self.global_cmds.aux_cmds.get_help_msg_str(with_configs=self.aux_cmd_configs_dir.joinpath("invalid_aux_cmd_path_config.toml")) help = self.HelpMsg(out) - help.assert_subcmds( - self.aux.ns.add_aux_cmd.base_cmd, - self.cmd_testers_cmd, - "help", - self.aux.ns.python_no_app_aux_cmds.base_cmd - ) + help.assert_subcmds(self.aux.ns.add_aux_cmd.base_cmd, *self.aux_cmd_ns_subcs) assert f"Unable to add auxillary commands at '{self.aux_cmd_configs_dir}{os.sep}./invalid_aux_cmd_path.toml' from config '{self.aux_cmd_configs_dir}{os.sep}invalid_aux_cmd_path_config.toml'. The following error was met" in out def test_missing_aux_cmd_impl_dir(self): diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py index 198b4587..7b007fed 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py @@ -1,29 +1,10 @@ import pytest from .shared import CLICommon -Cmd = CLICommon.Cmd class Common(CLICommon): pass class T_LoadingPluginCmds(Common): - def test_plugin_cmds_are_added(self): - # TODO is ordering off here? - help = self.global_cmds.pl.get_help_msg() - help.assert_subcmds( - "help", - self.python_plugin.base_cmd, - self.plugins.python_plugin_no_cmds.base_cmd, - self.plugins.python_plugin_the_second.base_cmd - ) - - # FOR_PR - @pytest.mark.skip - def test_no_cmds_present_only_has_help_subcmd(self): - help = self.cmds["python_plugin_no_cmds"].get_help_msg() - assert len(help.args) == 0 - assert len(help.opts) == 0 - assert list(help.subcmds.keys()) == ["help"] - class Test_PythonPluginCMDs(Common): @pytest.fixture def root_cmd(self): @@ -55,6 +36,11 @@ def test_help_msg(self, root_cmd): help.assert_args(None) help.assert_subcmds(*self.python_plugin.ordered_subcmds) + help.assert_not_extendable() + + def test_help_on_no_subcmd_given(self, root_cmd): + out = root_cmd.gen_error() + assert out == root_cmd.get_help_msg().text def test_hi_help_cmd(self, hi_cmd): help = hi_cmd.get_help_msg() @@ -109,8 +95,9 @@ class Test_PythonPluginNoCMDs(Common): def root_cmd(self): return self.plugins.python_plugin_no_cmds.base_cmd - def test_no_cmds_present_only_has_help_subcmd(self, root_cmd): + def test_no_cmds_in_plugin(self, root_cmd): help = root_cmd.get_help_msg() help.assert_args(None) help.assert_bare_opts() help.assert_subcmds(None) + help.assert_not_extendable() diff --git a/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml b/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml deleted file mode 100644 index e28ff97c..00000000 --- a/test_apps/python_no_app/tests/configs/suppress_plugin_collecting.toml +++ /dev/null @@ -1,3 +0,0 @@ -# FOR_PR use shared one -[plugins] -collect = false diff --git a/test_apps/python_no_app/tests/test_cli.py b/test_apps/python_no_app/tests/test_cli.py index af944e46..07567099 100644 --- a/test_apps/python_no_app/tests/test_cli.py +++ b/test_apps/python_no_app/tests/test_cli.py @@ -1,7 +1,10 @@ from .cli.tests__global_cmds import T_GlobalCmds +from .cli.tests__cmd__aux_cmds import T_AuxCmds from .cli.tests__cmd__credentials import T_Credentials from .cli.tests__cmd__eval import T_Eval from .cli.tests__cmd__exec import T_Exec +from .cli.tests__cmd__plugin import T_Plugin +from .cli.tests__cmd__plugins import T_Plugins from .cli.tests__origen_v import T_OrigenVersion from .cli.tests__origen_help import T_OrigenHelp from .cli.tests__invocation_errors import T_InvocationErrors @@ -12,6 +15,9 @@ class TestGlobalCmds(T_GlobalCmds): class TestOrigenHelp(T_OrigenHelp): pass +class TestAuxCmds(T_AuxCmds): + pass + class TestCredentials(T_Credentials): pass @@ -21,6 +27,12 @@ class TestEval(T_Eval): class TestExec(T_Exec): pass +class TestPlugin(T_Plugin): + pass + +class TestPlugins(T_Plugins): + pass + class TestOrigenVersion(T_OrigenVersion): pass diff --git a/test_apps/python_no_app/tests/test_configs.py b/test_apps/python_no_app/tests/test_configs.py index 299e81e3..67281039 100644 --- a/test_apps/python_no_app/tests/test_configs.py +++ b/test_apps/python_no_app/tests/test_configs.py @@ -19,7 +19,6 @@ class Common(CLIShared): dummy_origen_config = dummy_configs_dir.joinpath("origen.toml") empty_config = configs_dir.joinpath("empty.toml") - suppress_plugin_collecting_config = configs_dir.joinpath("suppress_plugin_collecting.toml") python_plugin_and_2nd_only_config = configs_dir.joinpath("python_plugin_and_2nd_only.toml") aux_cmds_dir = Path(__file__).parent.joinpath("dummy_aux_cmds") diff --git a/test_apps/python_no_app/tests/test_plugin_loading.py b/test_apps/python_no_app/tests/test_plugin_loading.py index 007dc1a5..781964c5 100644 --- a/test_apps/python_no_app/tests/test_plugin_loading.py +++ b/test_apps/python_no_app/tests/test_plugin_loading.py @@ -56,7 +56,7 @@ def test_registering_global_plugins(self): # ] def test_suppressing_plugin_collection(self): - c = self.suppress_plugin_collecting_config + c = self.configs.suppress_plugin_collecting_config retn = in_new_origen_proc( mod=config_funcs, func_kwargs={'configs': c} diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns.toml new file mode 100644 index 00000000..0f3637af --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns.toml @@ -0,0 +1 @@ +help = "Aux namespace without any commands defined" \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns_cfg.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns_cfg.toml new file mode 100644 index 00000000..216d6826 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/empty_aux_ns_cfg.toml @@ -0,0 +1,2 @@ +[[auxillary_commands]] +path = "./empty_aux_ns.toml" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index ad9a6383..5b338a6e 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -74,6 +74,7 @@ def clean_up_ext_args_str(ext_args, ext_name=None): class Configs: configs_dir = Path(__file__).parent.joinpath("configs") suppress_plugin_collecting_config = configs_dir.joinpath("suppress_plugin_collecting.toml") + no_plugins_no_aux_cmds_config = configs_dir.joinpath("no_plugins_no_aux_cmds.toml") class CLIShared(cli.CLI, AssertionHelpers): Cmd = Cmd @@ -83,6 +84,19 @@ class CLIShared(cli.CLI, AssertionHelpers): def cmd(self): return self._cmd + @pytest.fixture + def cached_help(self): + return self.get_cached_help() + + def get_cached_help(self): + if not hasattr(self, "_cached_help"): + self._cached_help = self._cmd.get_help_msg() + return self._cached_help + + @classmethod + def add_no_pl_aux_cfg(cls, cmd): + return cmd.extend([], from_configs=cls.configs.no_plugins_no_aux_cmds_config, with_env={"origen_bypass_config_lookup": "1"}) + pln__python_plugin = "python_plugin" cmd_shortcuts__default_plugins = { diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/auditors.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/auditors.py new file mode 100644 index 00000000..d324e5ed --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/auditors.py @@ -0,0 +1,160 @@ +import pytest +from abc import ABC, abstractclassmethod +from . import CLIShared + +class CLIAudit(CLIShared): + @pytest.fixture + def cmd(self): + return self._cmd + +class CmdNamespaceAuditor(CLIAudit, ABC): + @property + @abstractclassmethod + def nspace(self): + raise NotImplemented + + @property + @abstractclassmethod + def nspace_help_offset(cls): + raise NotImplemented + + @property + @abstractclassmethod + def empty_nspace(cls): + raise NotImplemented + + @property + def nspace_subcmds(self): + cmds = list(self.nspace.base_cmd.subcmds.values()) + cmds.insert(self.nspace_help_offset, "help") + return cmds + + @pytest.fixture + def cached_no_subc_help(self): + if not hasattr(self, "_cached_no_subc_help"): + self._cached_no_subc_help = self.nspace.base_cmd.get_help_msg() + return self._cached_no_subc_help + + def test_nspace_help_msg(self, cached_no_subc_help): + help = cached_no_subc_help + help.assert_args(None) + help.assert_bare_opts() + help.assert_subcmds(*self.nspace_subcmds) + help.assert_not_extendable() + + def test_nspace_help_with_no_subcmds_given(self, cached_no_subc_help): + out = self.nspace.base_cmd.gen_error() + assert out == cached_no_subc_help.text + + def test_nspace_without_subcmds(self): + cmd = self.empty_nspace.base_cmd + help = cmd.get_help_msg() + help.assert_args(None) + help.assert_bare_opts() + help.assert_subcmds(None) + help.assert_not_extendable() + +class CmdNamespaceContainerAuditor(CmdNamespaceAuditor, ABC): + @property + @abstractclassmethod + def container(self): + raise NotImplemented + + @property + @abstractclassmethod + def container_help_offset(self): + raise NotImplemented + + @abstractclassmethod + def container_nspaces(self): + raise NotImplemented + + @property + def container_subcmds(self): + l = [n.base_cmd for n in self.container_nspaces] + l.insert(self.container_help_offset, "help") + return l + + @classmethod + def setup_class(cls): + cls._cmd = cls.container + + def test_help_msg_with_cmds(self, cmd, cached_help): + help = cached_help + help.assert_args(None) + help.assert_bare_opts() + help.assert_subcmds(*self.container_subcmds) + help.assert_not_extendable() + help.assert_summary(cmd.help) + + def test_help_with_no_subcmds_given(self, cmd, cached_help): + out = cmd.gen_error() + assert out == cached_help.text + + def test_no_cmds_present(self, cmd): + cmd = self.add_no_pl_aux_cfg(cmd) + help = cmd.get_help_msg() + help.assert_args(None) + help.assert_bare_opts() + help.assert_subcmds(None) + help.assert_not_extendable() + +class PluginsCmdAudit(CLIShared, ABC): + import origen + if origen.app: + cmd = CLIShared.global_cmds.pls + else: + cmd = CLIShared.in_app_cmds.pls + + @property + @abstractclassmethod + def loaded_plugins(cls): + raise NotImplementedError + + class TestBaseCmd(CLIShared): + def test_help_msg(self, cmd, cached_help): + help = cached_help + help.assert_args(None) + help.assert_bare_opts() + help.assert_subcmds("help", cmd.list) + help.assert_not_extendable() + help.assert_summary(cmd.help) + + def test_help_on_no_subc(self, cmd, cached_help): + assert cmd.gen_error() == cached_help.text + + class TestListSubc(CLIShared): + def assert_out(self, out, plugins): + if plugins is None: + assert out == "There are no available plugins!\n" + else: + pls = "\n".join([pl.name for pl in plugins]) + assert out == f"Available plugins:\n\n{pls}\n" + + def test_help_msg(self, cmd): + help = cmd.get_help_msg() + help.assert_summary(cmd.help) + help.assert_args(None) + help.assert_bare_opts() + help.assert_subcmds(None) + help.assert_not_extendable() + + def test_listing_plugins(self, cmd): + out = cmd.run() + self.assert_out( + out, + self.loaded_plugins + ) + + def test_listing_with_no_plugins(self, cmd): + out = self.add_no_pl_aux_cfg(cmd).run() + self.assert_out(out, None) + + def setup_class(cls): + c = cls.TestBaseCmd + c._cmd = cls.cmd + c.loaded_plugins = cls.loaded_plugins + + c = cls.TestListSubc + c._cmd = cls.cmd.list + c.loaded_plugins = cls.loaded_plugins diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py index 0c622477..d63c8ebe 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/__init__.py @@ -1,10 +1,5 @@ from origen.helpers.regressions import cli -class SrcBase(cli.CLI): - @property - def displayed(self): - return self.src_type.displayed(self.name) - class Cmd(cli.cmd.Cmd): def assert_args(self, output, *vals, finalize_ext_args=None): ext_args = {} @@ -150,4 +145,26 @@ def to_assert_str(self, vals, **opts): retn.append(f"{preface} (CleanUp Cmd):{CmdArgOpt.to_assert_str(self, cleanup_val).split(':', 3)[3]}") else: retn.append(f"{preface} (CleanUp Cmd):{CmdArgOpt.to_assert_str(self, cleanup_val).split(':', 2)[2]}") - return retn \ No newline at end of file + return retn + +class SrcBase(cli.CLI): + Cmd = Cmd + + @property + def displayed(self): + return self.src_type.displayed(self.name) + + @property + def base_cmd(self): + if self.src_type == cli.SrcTypes.APP: + return self.app_cmds + else: + return getattr(self, self.name) + + def __getattr__(self, name: str): + try: + return self.__getattribute__(name) + except AttributeError as e: + if name in self.base_cmd.subcmds.keys(): + return self.base_cmd.subcmds[name] + raise(e) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py index 924b3abe..aa896d9e 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/auxs.py @@ -370,47 +370,59 @@ class DummyCmds(AuxNS): def __init__(self): self.name = "dummy_cmds" - self.dummy_cmd = self.aux_sub_cmd( + self.dummy_cmds = self.aux_cmd( self.name, - "dummy_cmd", - help="Dummy Aux Command", - args=[ - CmdArg( - name="action_arg", - help="Dummy Aux Action", - multi=True, - ), - ], - subcmds=[ + subcmds = [ Cmd( - "subc", - help="Dummy Aux Subcommand", + "dummy_cmd", + help="Dummy Aux Command", args=[ CmdArg( name="action_arg", - help="Dummy Aux Subc Action", + help="Dummy Aux Action", multi=True, ), ], - opts=[ - CmdOpt( - name="flag_opt", - help="Dummy Aux Subc Flag", - ), + subcmds=[ + Cmd( + "subc", + help="Dummy Aux Subcommand", + args=[ + CmdArg( + name="action_arg", + help="Dummy Aux Subc Action", + multi=True, + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Dummy Aux Subc Flag", + ), + ], + ) ], + use_configs=[self.cfg_toml] ) - ], - from_config=self.cfg_toml + ] ) + + @property + def dummy_cmd(self): + return self.dummy_cmds.dummy_cmd + class PythonNoAppAuxCmds(AuxNS): Cmd = Cmd def __init__(self): self.name = "python_no_app_aux_cmds" - self.python_no_app_aux_cmds = self.aux_sub_cmd( + self.python_no_app_aux_cmds = self.aux_cmd( self.name, - "python_no_app_aux_cmds" + subcmds=[ + Cmd("say_bye", help="Say bye!"), + Cmd("say_hi", help="Say hi!"), + ] ) @property @@ -462,6 +474,12 @@ def __init__(self): def base_cmd(self): return self.python_app_aux_cmds +class EmptyAuxNS(AuxNS): + def __init__(self): + self.name = "empty_aux_ns" + self.config_toml = aux_cmds_dir.joinpath(f"{self.name}_cfg.toml") + self.empty_aux_ns = self.aux_cmd(self.name, help="Aux namespace without any commands defined") + class AuxNamespaces: def __init__(self) -> None: self.dummy_cmds = DummyCmds() @@ -470,6 +488,7 @@ def __init__(self) -> None: self.python_app_aux_cmds = PythonAppAuxCmds() self.aux_cmds_from_cli_dir = AuxCmdsFromCliDir() self.add_aux_cmd = AddAuxCmds() + self.empty_aux_ns = EmptyAuxNS() class Aux: namespaces = AuxNamespaces() diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py index 9959326d..473550e9 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/plugins.py @@ -1,3 +1,4 @@ +import origen from origen.helpers.regressions import cli from . import Cmd, CmdArg, CmdOpt, SrcBase @@ -9,160 +10,178 @@ def src_type(self): class PlExtCmds(Plugin): def __init__(self): self.name = "pl_ext_cmds" + self.pl_ext_cmds = self.pl_cmd( + self.name, + ) class PythonPlugin(Plugin): Cmd = Cmd def __init__(self): self.name = "python_plugin" + subcmds = [ + Cmd( + "do_actions", + help="Perform the given actions", + args=[CmdArg( + name="actions", + help="Actions to perform", + use_delimiter=True, + )], + ), + Cmd( + "echo", + help="Echos the input", + args=[CmdArg( + name="input", + help="Input to echo", + use_delimiter=True, + )], + opts=[CmdOpt( + name="repeat", + help="Echo again (repeat)", + ln="repeat", + sn="r", + )], + ), + Cmd( + "plugin_says_hi", + help="Say 'hi' from the python plugin", + opts=[ + CmdOpt( + name="times", + help="Number of times for the python plugin to say", + value_name="TIMES", + ln="times", + sn="x" + ), + CmdOpt( + name="loudly", + help="LOUDLY say hi", + ln="loudly", + sn="l" + ), + CmdOpt( + name="to", + help="Specify who should be greeted", + multi=True, + ) + ] + ), + Cmd( + "plugin_test_args", + help="Test command for a plugin", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + CmdArg( + name="multi_arg", + help="Multi Arg", + multi=True, + ), + ], + opts=[ + CmdOpt( + name="opt_taking_value", + help="Opt taking a single value", + ln="opt", + ), + CmdOpt( + name="flag_opt", + help="Flag Opt", + ln="flag", + ), + CmdOpt( + name="sn_only", + help="Opt with short name only", + sn="n", + ), + CmdOpt( + name="opt_with_aliases", + help="Opt with aliases", + ln_aliases=["alias", "opt_alias"], + sn_aliases=["a", "b"], + ) + ], + subcmds=[ + Cmd( + "subc", + help="Test Subcommand for plugin_test_args", + args=[ + CmdArg( + name="single_arg", + help="Single Arg For Subcommand", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt For Subcommand", + ), + CmdOpt( + name="subc_sn_only", + help="Opt with short name only for subc", + sn="n", + ), + CmdOpt( + name="subc_opt_with_aliases", + help="Opt with aliases for subc", + ln="subc_opt", + ln_aliases=["subc_alias", "subc_opt_alias"], + sn_aliases=["a", "b"] + ), + ] + ) + ] + ), + Cmd( + "plugin_test_ext_stacking", + help="Test ext stacking for plugin command", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt", + ), + ], + subcmds=[ + Cmd( + "subc", + help="Test Subcommand for ext stacking", + args=[ + CmdArg( + name="single_arg", + help="Single Arg", + ), + ], + opts=[ + CmdOpt( + name="flag_opt", + help="Flag Opt", + ), + ], + ) + ] + ) + ] + if origen.app: + subcmds.insert(0, Cmd( + "disabling_app_opts_from_pl", + help="Test disabling standard app opts from plugin commands" + )) + self.python_plugin = self.pl_cmd( - self.name - ) - self.echo = self.pl_sub_cmd( self.name, - "echo", - help="Echos the input", - args=[CmdArg( - name="input", - help="Input to echo", - use_delimiter=True, - )], - opts=[CmdOpt( - name="repeat", - help="Echo again (repeat)", - ln="repeat", - sn="r", - )], - ) - self.plugin_says_hi = self.pl_sub_cmd( - self.name, - "plugin_says_hi", - help="Say 'hi' from the python plugin", - opts=[ - CmdOpt( - name="times", - help="Number of times for the python plugin to say", - value_name="TIMES", - ln="times", - sn="x" - ), - CmdOpt( - name="loudly", - help="LOUDLY say hi", - ln="loudly", - sn="l" - ), - CmdOpt( - name="to", - help="Specify who should be greeted", - multi=True, - ) - ] - ) - self.plugin_test_args = self.pl_sub_cmd( - self.name, - "plugin_test_args", - help="Test command for a plugin", - args=[ - CmdArg( - name="single_arg", - help="Single Arg", - ), - CmdArg( - name="multi_arg", - help="Multi Arg", - multi=True, - ), - ], - opts=[ - CmdOpt( - name="opt_taking_value", - help="Opt taking a single value", - ln="opt", - ), - CmdOpt( - name="flag_opt", - help="Flag Opt", - ln="flag", - ), - CmdOpt( - name="sn_only", - help="Opt with short name only", - sn="n", - ), - CmdOpt( - name="opt_with_aliases", - help="Opt with aliases", - ln_aliases=["alias", "opt_alias"], - sn_aliases=["a", "b"], - ) - ], - subcmds=[ - Cmd( - "subc", - help="Test Subcommand for plugin_test_args", - args=[ - CmdArg( - name="single_arg", - help="Single Arg For Subcommand", - ), - ], - opts=[ - CmdOpt( - name="flag_opt", - help="Flag Opt For Subcommand", - ), - CmdOpt( - name="subc_sn_only", - help="Opt with short name only for subc", - sn="n", - ), - CmdOpt( - name="subc_opt_with_aliases", - help="Opt with aliases for subc", - ln="subc_opt", - ln_aliases=["subc_alias", "subc_opt_alias"], - sn_aliases=["a", "b"] - ), - ] - ) - ] - ) - self.plugin_test_ext_stacking = self.pl_sub_cmd( - self.name, - "plugin_test_ext_stacking", - help="Test ext stacking for plugin command", - args=[ - CmdArg( - name="single_arg", - help="Single Arg", - ), - ], - opts=[ - CmdOpt( - name="flag_opt", - help="Flag Opt", - ), - ], - subcmds=[ - Cmd( - "subc", - help="Test Subcommand for ext stacking", - args=[ - CmdArg( - name="single_arg", - help="Single Arg", - ), - ], - opts=[ - CmdOpt( - name="flag_opt", - help="Flag Opt", - ), - ], - ) - ] + subcmds=subcmds ) + self.disabling_app_opts_from_pl = self.pl_sub_cmd( self.name, "disabling_app_opts_from_pl", @@ -192,17 +211,7 @@ def __init__(self): Cmd("override_subc", help="Overrides disable inherited from parent"), ] ) - ] - ) - self.do_actions = self.pl_sub_cmd( - self.name, - "do_actions", - help="Perform the given actions", - args=[CmdArg( - name="actions", - help="Actions to perform", - use_delimiter=True, - )], + ], ) self.intra_cmd_conflicts = self.pl_sub_cmd( self.name, @@ -410,6 +419,10 @@ def __init__(self): def tas(self): return self.test_apps_shared_test_helpers + @property + def py_pl(self): + return self.python_plugin + @property def python_no_app_collected_pl_names(self): return list(self.plugins.keys()) @@ -426,4 +439,4 @@ def __getattr__(self, name): if name in self.plugins: return self.plugins[name] else: - super + return object.__getattribute__(self, name) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/no_plugins_no_aux_cmds.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/no_plugins_no_aux_cmds.toml new file mode 100644 index 00000000..79346f1e --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/no_plugins_no_aux_cmds.toml @@ -0,0 +1,5 @@ +auxillary_commands = [] + +[plugins] +collect = false +load = [] From a813bf9640629d1cd73aba0a3ce37adc6e017dbe Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 11 May 2023 17:18:36 -0500 Subject: [PATCH 028/200] See if updating locks and rust version resolves plugin order checking. --- .github/workflows/regression_test.yml | 2 +- test_apps/python_app/poetry.lock | 20 +- test_apps/python_no_app/poetry.lock | 1665 +++++++++++++------------ 3 files changed, 862 insertions(+), 825 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index d3e2e234..5fb88578 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -21,7 +21,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: "nightly-2022-04-21" + toolchain: "nightly-2022-05-17" override: true #components: rustfmt, clippy diff --git a/test_apps/python_app/poetry.lock b/test_apps/python_app/poetry.lock index 87a3b599..f22327ee 100644 --- a/test_apps/python_app/poetry.lock +++ b/test_apps/python_app/poetry.lock @@ -1273,6 +1273,24 @@ origen = {path = "../../python/origen", develop = true} type = "directory" url = "../python_plugin" +[[package]] +name = "python-plugin-no-cmds" +version = "0.1.0" +description = "Example Origen Plugin Without Any Commands" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +files = [] +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} + +[package.source] +type = "directory" +url = "../python_plugin_no_cmds" + [[package]] name = "pytz" version = "2022.7" @@ -1957,4 +1975,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" python-versions = ">=3.7,<3.11" -content-hash = "f1f014490864b5d619ae08b69574f6ed6d2c50121f8c787e03583ec5f12a379e" +content-hash = "321b436680a0eeca2b6cd2f6818c80b05cf1120111e8e1545d882690ec9d6056" diff --git a/test_apps/python_no_app/poetry.lock b/test_apps/python_no_app/poetry.lock index 9201021b..52106d08 100644 --- a/test_apps/python_no_app/poetry.lock +++ b/test_apps/python_no_app/poetry.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Poetry and should not be changed by hand. + [[package]] name = "alabaster" version = "0.7.12" @@ -5,6 +7,10 @@ description = "A configurable sidebar-enabled Sphinx theme" category = "main" optional = false python-versions = "*" +files = [ + {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, + {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, +] [[package]] name = "atomicwrites" @@ -13,6 +19,9 @@ description = "Atomic file writes." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] [[package]] name = "attrs" @@ -21,14 +30,17 @@ description = "Classes Without Boilerplate" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, + {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, +] [package.extras] -cov = ["attrs", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] -dev = ["attrs"] -docs = ["furo", "sphinx", "myst-parser", "zope.interface", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] -tests = ["attrs", "zope.interface"] -tests-no-zope = ["hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist", "cloudpickle", "mypy (>=0.971,<0.990)", "pytest-mypy-plugins"] -tests_no_zope = ["hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist", "cloudpickle", "mypy (>=0.971,<0.990)", "pytest-mypy-plugins"] +cov = ["attrs[tests]", "coverage-enable-subprocess", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope.interface"] +tests = ["attrs[tests-no-zope]", "zope.interface"] +tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy (>=0.971,<0.990)", "mypy (>=0.971,<0.990)", "pympler", "pympler", "pytest (>=4.3.0)", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-mypy-plugins", "pytest-xdist[psutil]", "pytest-xdist[psutil]"] [[package]] name = "babel" @@ -37,6 +49,10 @@ description = "Internationalization utilities" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "Babel-2.11.0-py3-none-any.whl", hash = "sha256:1ad3eca1c885218f6dce2ab67291178944f810a10a9b5f3cb8382a5a232b64fe"}, + {file = "Babel-2.11.0.tar.gz", hash = "sha256:5ef4b3226b0180dedded4229651c8b0e1a3a6a2837d45a073272f313e4cf97f6"}, +] [package.dependencies] pytz = ">=2015.7" @@ -48,6 +64,10 @@ description = "cached_property() - computed once per instance, cached as attribu category = "main" optional = false python-versions = ">=3.6.0" +files = [ + {file = "backports.cached-property-1.0.2.tar.gz", hash = "sha256:9306f9eed6ec55fd156ace6bc1094e2c86fae5fb2bf07b6a9c00745c656e75dd"}, + {file = "backports.cached_property-1.0.2-py3-none-any.whl", hash = "sha256:baeb28e1cd619a3c9ab8941431fe34e8490861fb998c6c4590693d50171db0cc"}, +] [[package]] name = "beautifulsoup4" @@ -56,6 +76,11 @@ description = "Screen-scraping library" category = "main" optional = false python-versions = "*" +files = [ + {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, + {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, + {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, +] [package.dependencies] soupsieve = ">=1.2" @@ -71,6 +96,9 @@ description = "Dummy package for Beautiful Soup" category = "main" optional = false python-versions = "*" +files = [ + {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, +] [package.dependencies] beautifulsoup4 = "*" @@ -82,6 +110,10 @@ description = "httplib2 caching for requests" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "CacheControl-0.12.12-py2.py3-none-any.whl", hash = "sha256:5986a16897cd296bdb7b86b42e0403c4ca30b9875f0e0c7c8e509b50cff115b7"}, + {file = "CacheControl-0.12.12.tar.gz", hash = "sha256:9c2e5208ea76ebd9921176569743ddf6d7f3bb4188dbf61806f0f8fc48ecad38"}, +] [package.dependencies] filelock = {version = ">=3.8.0", optional = true, markers = "extra == \"filecache\""} @@ -99,6 +131,10 @@ description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, + {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, +] [[package]] name = "cffi" @@ -107,6 +143,72 @@ description = "Foreign Function Interface for Python calling C code." category = "main" optional = false python-versions = "*" +files = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] [package.dependencies] pycparser = "*" @@ -118,9 +220,13 @@ description = "The Real First Universal Charset Detector. Open, modern and activ category = "main" optional = false python-versions = ">=3.6.0" +files = [ + {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, + {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, +] [package.extras] -unicode_backport = ["unicodedata2"] +unicode-backport = ["unicodedata2"] [[package]] name = "cleo" @@ -129,6 +235,10 @@ description = "Cleo allows you to create beautiful and testable command-line int category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "cleo-2.0.1-py3-none-any.whl", hash = "sha256:6eb133670a3ed1f3b052d53789017b6e50fca66d1287e6e6696285f4cb8ea448"}, + {file = "cleo-2.0.1.tar.gz", hash = "sha256:eb4b2e1f3063c11085cebe489a6e9124163c226575a3c3be69b2e51af4a15ec5"}, +] [package.dependencies] crashtest = ">=0.4.1,<0.5.0" @@ -141,6 +251,10 @@ description = "Cross-platform colored terminal text." category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] [[package]] name = "commonmark" @@ -149,6 +263,10 @@ description = "Python parser for the CommonMark Markdown spec" category = "main" optional = false python-versions = "*" +files = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] [package.extras] test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] @@ -160,6 +278,10 @@ description = "Manage Python errors with ease" category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "crashtest-0.4.1-py3-none-any.whl", hash = "sha256:8d23eac5fa660409f57472e3851dab7ac18aba459a8d19cbbba86d3d5aecd2a5"}, + {file = "crashtest-0.4.1.tar.gz", hash = "sha256:80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce"}, +] [[package]] name = "cryptography" @@ -168,17 +290,45 @@ description = "cryptography is a package which provides cryptographic recipes an category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "cryptography-38.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:2fa36a7b2cc0998a3a4d5af26ccb6273f3df133d61da2ba13b3286261e7efb70"}, + {file = "cryptography-38.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:1f13ddda26a04c06eb57119caf27a524ccae20533729f4b1e4a69b54e07035eb"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:2ec2a8714dd005949d4019195d72abed84198d877112abb5a27740e217e0ea8d"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50a1494ed0c3f5b4d07650a68cd6ca62efe8b596ce743a5c94403e6f11bf06c1"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a10498349d4c8eab7357a8f9aa3463791292845b79597ad1b98a543686fb1ec8"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:10652dd7282de17990b88679cb82f832752c4e8237f0c714be518044269415db"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:bfe6472507986613dc6cc00b3d492b2f7564b02b3b3682d25ca7f40fa3fd321b"}, + {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:ce127dd0a6a0811c251a6cddd014d292728484e530d80e872ad9806cfb1c5b3c"}, + {file = "cryptography-38.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:53049f3379ef05182864d13bb9686657659407148f901f3f1eee57a733fb4b00"}, + {file = "cryptography-38.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:8a4b2bdb68a447fadebfd7d24855758fe2d6fecc7fed0b78d190b1af39a8e3b0"}, + {file = "cryptography-38.0.4-cp36-abi3-win32.whl", hash = "sha256:1d7e632804a248103b60b16fb145e8df0bc60eed790ece0d12efe8cd3f3e7744"}, + {file = "cryptography-38.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:8e45653fb97eb2f20b8c96f9cd2b3a0654d742b47d638cf2897afbd97f80fa6d"}, + {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca57eb3ddaccd1112c18fc80abe41db443cc2e9dcb1917078e02dfa010a4f353"}, + {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:c9e0d79ee4c56d841bd4ac6e7697c8ff3c8d6da67379057f29e66acffcd1e9a7"}, + {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:0e70da4bdff7601b0ef48e6348339e490ebfb0cbe638e083c9c41fb49f00c8bd"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:998cd19189d8a747b226d24c0207fdaa1e6658a1d3f2494541cb9dfbf7dcb6d2"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67461b5ebca2e4c2ab991733f8ab637a7265bb582f07c7c88914b5afb88cb95b"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:4eb85075437f0b1fd8cd66c688469a0c4119e0ba855e3fef86691971b887caf6"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3178d46f363d4549b9a76264f41c6948752183b3f587666aff0555ac50fd7876"}, + {file = "cryptography-38.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:6391e59ebe7c62d9902c24a4d8bcbc79a68e7c4ab65863536127c8a9cd94043b"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:78e47e28ddc4ace41dd38c42e6feecfdadf9c3be2af389abbfeef1ff06822285"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fb481682873035600b5502f0015b664abc26466153fab5c6bc92c1ea69d478b"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:4367da5705922cf7070462e964f66e4ac24162e22ab0a2e9d31f1b270dd78083"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b4cad0cea995af760f82820ab4ca54e5471fc782f70a007f31531957f43e9dee"}, + {file = "cryptography-38.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:80ca53981ceeb3241998443c4964a387771588c4e4a5d92735a493af868294f9"}, + {file = "cryptography-38.0.4.tar.gz", hash = "sha256:175c1a818b87c9ac80bb7377f5520b7f31b3ef2a0004e2420319beadedb67290"}, +] [package.dependencies] cffi = ">=1.12" [package.extras] docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] -docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +docstest = ["pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"] pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] sdist = ["setuptools-rust (>=0.11.4)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test = ["hypothesis (>=1.11.4,!=3.79.2)", "iso8601", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pytz"] [[package]] name = "distlib" @@ -187,6 +337,10 @@ description = "Distribution utilities" category = "main" optional = false python-versions = "*" +files = [ + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, +] [[package]] name = "docutils" @@ -195,6 +349,10 @@ description = "Docutils -- Python Documentation Utilities" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, +] [[package]] name = "dulwich" @@ -203,6 +361,71 @@ description = "Python Git Library" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:97f02f8d500d4af08dc022d697c56e8539171acc3f575c2fe9acf3b078e5c8c9"}, + {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7301773e5cc16d521bc6490e73772a86a4d1d0263de506f08b54678cc4e2f061"}, + {file = "dulwich-0.20.50-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b70106580ed11f45f4c32d2831d0c9c9f359bc2415fff4a6be443e3a36811398"}, + {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f9c4f2455f966cad94648278fa9972e4695b35d04f82792fa58e1ea15dd83f0"}, + {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9163fbb021a8ad9c35a0814a5eedf45a8eb3a0b764b865d7016d901fc5a947fc"}, + {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:322ff8ff6aa4d6d36294cd36de1c84767eb1903c7db3e7b4475ad091febf5363"}, + {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5d3290a45651c8e534f8e83ae2e30322aefdd162f0f338bae2e79a6ee5a87513"}, + {file = "dulwich-0.20.50-cp310-cp310-win32.whl", hash = "sha256:80ab07131a6e68594441f5c4767e9e44e87fceafc3e347e541c928a18c679bd8"}, + {file = "dulwich-0.20.50-cp310-cp310-win_amd64.whl", hash = "sha256:eefe786a6010f8546baac4912113eeed4e397ddb8c433a345b548a04d4176496"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:df3562dde3079d57287c233d45b790bc967c5aae975c9a7b07ca30e60e055512"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e1ae18d5805f0c0c5dac65795f8d48660437166b12ee2c0ffea95bfdbf9c1051"}, + {file = "dulwich-0.20.50-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d2f7df39bd1378d3b0bfb3e7fc930fd0191924af1f0ef587bcd9946afe076c06"}, + {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:731e7f319b34251fadeb362ada1d52cc932369d9cdfa25c0e41150cda28773d0"}, + {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d11d44176e5d2fa8271fc86ad1e0a8731b9ad8f77df64c12846b30e16135eb"}, + {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7aaabb8e4beadd53f75f853a981caaadef3ef130e5645c902705704eaf136daa"}, + {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3dc9f97ec8d3db08d9723b9fd06f3e52c15b84c800d153cfb59b0a3dc8b8d40"}, + {file = "dulwich-0.20.50-cp311-cp311-win32.whl", hash = "sha256:3b1964fa80cafd5a1fd71615b0313daf6f3295c6ab05656ea0c1d2423539904a"}, + {file = "dulwich-0.20.50-cp311-cp311-win_amd64.whl", hash = "sha256:a24a3893108f3b97beb958670d5f3f2a3bec73a1fe18637a572a85abd949a1c4"}, + {file = "dulwich-0.20.50-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6d409a282f8848fd6c8d7c7545ad2f75c16de5d5977de202642f1d50fdaac554"}, + {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5411d0f1092152e1c0bb916ae490fe181953ae1b8d13f4e68661253e10b78dbb"}, + {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6343569f998ce429e2a5d813c56768ac51b496522401db950f0aa44240bfa901"}, + {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a405cd236766060894411614a272cfb86fe86cde5ca73ef264fc4fa5a715fff4"}, + {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:ee0f9b02019c0ea84cdd31c00a0c283669b771c85612997a911715cf84e33d99"}, + {file = "dulwich-0.20.50-cp36-cp36m-win32.whl", hash = "sha256:2644466270267270f2157ea6f1c0aa224f6f3bf06a307fc39954e6b4b3d82bae"}, + {file = "dulwich-0.20.50-cp36-cp36m-win_amd64.whl", hash = "sha256:d4629635a97e3af1b5da48071e00c8e70fad85f3266fadabe1f5a8f49172c507"}, + {file = "dulwich-0.20.50-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0e4862f318d99cc8a500e3622a89613a88c07d957a0f628cdc2ed86addff790f"}, + {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c96e3fb9d48c0454dc242c7accc7819780c9a7f29e441a9eff12361ed0fa35f9"}, + {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc6092a4f0bbbff2e553e87a9c6325955b64ea43fca21297c8182e19ae8a43c"}, + {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:519b627d49d273e2fd01c79d09e578675ca6cd05193c1787e9ef165c9a1d66ea"}, + {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a75cab01b909c4c683c2083e060e378bc01701b7366b5a7d9846ef6d3b9e3d5"}, + {file = "dulwich-0.20.50-cp37-cp37m-win32.whl", hash = "sha256:ea8ffe26d91dbcd5580dbd5a07270a12ea57b091604d77184da0a0d9fad50ed3"}, + {file = "dulwich-0.20.50-cp37-cp37m-win_amd64.whl", hash = "sha256:8f3af857f94021cae1322d86925bfc0dd31e501e885ab5db275473bfac0bb39d"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3fb35cedb1243bc420d885ef5b4afd642c6ac8f07ddfc7fdbca1becf9948bf7e"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4bb23a9cec63e16c0e432335f068169b73dd44fa9318dd7cd7a4ca83607ff367"}, + {file = "dulwich-0.20.50-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5267619b34ddaf8d9a6b841492cd17a971fd25bf9a5657f2de928385c3a08b94"}, + {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9091f1d53a3c0747cbf0bd127c64e7f09b770264d8fb53e284383fcdf69154e7"}, + {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6ec7c8fea2b44187a3b545e6c11ab9947ffb122647b07abcdb7cc3aaa770c0e"}, + {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:11b180b80363b4fc70664197028181a17ae4c52df9965a29b62a6c52e40c2dbe"}, + {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c83e7840d9d0a94d7033bc109efe0c22dfcdcd816bcd4469085e42809e3bf5ba"}, + {file = "dulwich-0.20.50-cp38-cp38-win32.whl", hash = "sha256:c075f69c2de19d9fd97e3b70832d2b42c6a4a5d909b3ffd1963b67d86029f95f"}, + {file = "dulwich-0.20.50-cp38-cp38-win_amd64.whl", hash = "sha256:06775c5713cfeda778c7c67d4422b5e7554d3a7f644f1dde646cdf486a30285a"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:49f66f1c057c18d7d60363f461f4ab8329320fbe1f02a7a33c255864a7d3c942"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4e541cd690a5e3d55082ed51732d755917e933cddeb4b0204f2a5ec5d5d7b60b"}, + {file = "dulwich-0.20.50-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:80e8750ee2fa0ab2784a095956077758e5f6107de27f637c4b9d18406652c22c"}, + {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbb6368f18451dc44c95c55e1a609d1a01d3821f7ed480b22b2aea1baca0f4a7"}, + {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3ee45001411b638641819b7b3b33f31f13467c84066e432256580fcab7d8815"}, + {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4842e22ed863a776b36ef8ffe9ed7b772eb452b42c8d02975c29d27e3bc50ab4"}, + {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:790e4a641284a7fb4d56ebdaf8b324a5826fbbb9c54307c06f586f9f6a5e56db"}, + {file = "dulwich-0.20.50-cp39-cp39-win32.whl", hash = "sha256:f08406b6b789dea5c95ba1130a0801d8748a67f18be940fe7486a8b481fde875"}, + {file = "dulwich-0.20.50-cp39-cp39-win_amd64.whl", hash = "sha256:78c388ad421199000fb7b5ed5f0c7b509b3e31bd7cad303786a4d0bf89b82f60"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:cb194c53109131bcbcd1ca430fcd437cdaf2d33e204e45fbe121c47eaa43e9af"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7542a72c5640dd0620862d6df8688f02a6c336359b5af9b3fcfe11b7fa6652f"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4aa1d0861517ebbbe0e0084cc9ab4f7ab720624a3eda2bd10e45f774ab858db8"}, + {file = "dulwich-0.20.50-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:583c6bbc27f13fe2e41a19f6987a42681c6e4f6959beae0a6e5bb033b8b081a8"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0c61c193d02c0e1e0d758cdd57ae76685c368d09a01f00d704ba88bd96767cfe"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2edbff3053251985f10702adfafbee118298d383ef5b5b432a5f22d1f1915df"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a344230cadfc5d315752add6ce9d4cfcfc6c85e36bbf57fce9444bcc7c6ea8fb"}, + {file = "dulwich-0.20.50-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:57bff9bde0b6b05b00c6acbb1a94357caddb2908ed7026a48c715ff50d220335"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e29a3c2037761fa816aa556e78364dfc8e3f44b873db2d17aed96f9b06ac83a3"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2aa2a4a84029625bf9c63771f8a628db1f3be2d2ea3cb8b17942cd4317797152"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd9fa00971ecf059bb358085a942ecac5be4ff71acdf299f44c8cbc45c18659f"}, + {file = "dulwich-0.20.50-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:af4adac92fb95671ea3a24f2f8e5e5e8f638711ce9c33a3ca6cd68bf1ff7d99f"}, + {file = "dulwich-0.20.50.tar.gz", hash = "sha256:50a941796b2c675be39be728d540c16b5b7ce77eb9e1b3f855650ece6832d2be"}, +] [package.dependencies] urllib3 = ">=1.25" @@ -220,10 +443,14 @@ description = "A platform independent file lock." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, + {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, +] [package.extras] -docs = ["furo (>=2022.12.7)", "sphinx-autodoc-typehints (>=1.19.5)", "sphinx (>=5.3)"] -testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)", "pytest (>=7.2)"] +docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] [[package]] name = "html5lib" @@ -232,13 +459,17 @@ description = "HTML parser based on the WHATWG HTML specification" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, + {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, +] [package.dependencies] six = ">=1.9" webencodings = "*" [package.extras] -all = ["genshi", "chardet (>=2.2)", "lxml"] +all = ["chardet (>=2.2)", "genshi", "lxml"] chardet = ["chardet (>=2.2)"] genshi = ["genshi"] lxml = ["lxml"] @@ -250,6 +481,10 @@ description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] [[package]] name = "imagesize" @@ -258,6 +493,10 @@ description = "Getting image size from png/jpeg/jpeg2000/gif file" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] [[package]] name = "importlib-metadata" @@ -266,15 +505,19 @@ description = "Read metadata from Python packages" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, + {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, +] [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] +testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] [[package]] name = "importlib-resources" @@ -283,13 +526,17 @@ description = "Read resources from Python packages" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "importlib_resources-5.10.2-py3-none-any.whl", hash = "sha256:7d543798b0beca10b6a01ac7cafda9f822c54db9e8376a6bf57e0cbd74d486b6"}, + {file = "importlib_resources-5.10.2.tar.gz", hash = "sha256:e4a96c8cc0339647ff9a5e0550d9f276fc5a01ffa276012b58ec108cfd7b8484"}, +] [package.dependencies] zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [[package]] name = "iniconfig" @@ -298,6 +545,10 @@ description = "iniconfig: brain-dead simple config-ini parsing" category = "dev" optional = false python-versions = "*" +files = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] [[package]] name = "jaraco.classes" @@ -306,13 +557,17 @@ description = "Utility functions for Python class constructs" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "jaraco.classes-3.2.3-py3-none-any.whl", hash = "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158"}, + {file = "jaraco.classes-3.2.3.tar.gz", hash = "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a"}, +] [package.dependencies] more-itertools = "*" [package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [[package]] name = "jeepney" @@ -321,10 +576,14 @@ description = "Low-level, pure Python DBus protocol wrapper." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, +] [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] -trio = ["trio", "async-generator"] +test = ["async-timeout", "pytest", "pytest-asyncio (>=0.17)", "pytest-trio", "testpath", "trio"] +trio = ["async_generator", "trio"] [[package]] name = "jinja2" @@ -333,6 +592,10 @@ description = "A very fast and expressive template engine." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] [package.dependencies] MarkupSafe = ">=2.0" @@ -347,6 +610,10 @@ description = "An implementation of JSON Schema validation for Python" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "jsonschema-4.17.3-py3-none-any.whl", hash = "sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6"}, + {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, +] [package.dependencies] attrs = ">=17.4.0" @@ -367,6 +634,10 @@ description = "Store and access your passwords safely." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "keyring-23.13.1-py3-none-any.whl", hash = "sha256:771ed2a91909389ed6148631de678f82ddc73737d85a927f382a8a1b157898cd"}, + {file = "keyring-23.13.1.tar.gz", hash = "sha256:ba2e15a9b35e21908d0aaf4e0a47acc52d6ae33444df0da2b49d41a46ef6d678"}, +] [package.dependencies] importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} @@ -378,8 +649,8 @@ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] completion = ["shtab"] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [[package]] name = "lockfile" @@ -388,6 +659,10 @@ description = "Platform-independent file locking module" category = "main" optional = false python-versions = "*" +files = [ + {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, + {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +] [[package]] name = "mako" @@ -396,6 +671,9 @@ description = "A super-fast templating language that borrows the best ideas fro category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, +] [package.dependencies] MarkupSafe = ">=0.9.2" @@ -407,22 +685,122 @@ description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false python-versions = ">=3.7" - -[[package]] -name = "more-itertools" -version = "9.0.0" -description = "More routines for operating on iterables, beyond itertools" -category = "main" -optional = false -python-versions = ">=3.7" - -[[package]] -name = "msgpack" +files = [ + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, +] + +[[package]] +name = "more-itertools" +version = "9.0.0" +description = "More routines for operating on iterables, beyond itertools" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "more-itertools-9.0.0.tar.gz", hash = "sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab"}, + {file = "more_itertools-9.0.0-py3-none-any.whl", hash = "sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41"}, +] + +[[package]] +name = "msgpack" version = "1.0.4" description = "MessagePack serializer" category = "main" optional = false python-versions = "*" +files = [ + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, + {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, + {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, + {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, + {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, + {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, + {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, + {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, + {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, + {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, + {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, + {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, + {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, + {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, + {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, + {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, + {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, + {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, + {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, + {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, + {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, + {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, + {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, + {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, + {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, + {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, + {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, +] [[package]] name = "origen" @@ -431,6 +809,7 @@ description = "Semiconductor Developer's Kit" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -460,6 +839,10 @@ description = "Automatic API reference documentation generation for Sphinx inspi category = "main" optional = false python-versions = "*" +files = [ + {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, + {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, +] [package.dependencies] sphinx = "*" @@ -471,6 +854,7 @@ description = "Bare metal APIs for the Origen SDK" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -489,6 +873,10 @@ description = "Core utilities for Python packages" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"}, + {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"}, +] [[package]] name = "pexpect" @@ -497,6 +885,10 @@ description = "Pexpect allows easy control of interactive console applications." category = "main" optional = false python-versions = "*" +files = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] [package.dependencies] ptyprocess = ">=0.5" @@ -508,6 +900,10 @@ description = "Query metadatdata from sdists / bdists / installed packages." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "pkginfo-1.9.2-py3-none-any.whl", hash = "sha256:d580059503f2f4549ad6e4c106d7437356dbd430e2c7df99ee1efe03d75f691e"}, + {file = "pkginfo-1.9.2.tar.gz", hash = "sha256:ac03e37e4d601aaee40f8087f63fc4a2a6c9814dda2c8fa6aab1b1829653bdfa"}, +] [package.extras] testing = ["pytest", "pytest-cov"] @@ -519,6 +915,10 @@ description = "Resolve a name to an object." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, + {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, +] [[package]] name = "pl-ext-cmds" @@ -527,6 +927,7 @@ description = "Plugin Extending Cmds" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -544,13 +945,17 @@ description = "A small Python package for determining appropriate platform-speci category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, + {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, +] [package.dependencies] typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} [package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx-autodoc-typehints (>=1.19.5)", "sphinx (>=5.3)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest (>=7.2)"] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" @@ -559,6 +964,10 @@ description = "plugin and hook calling mechanisms for python" category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} @@ -574,6 +983,10 @@ description = "Python dependency management and packaging made easy." category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry-1.3.1-py3-none-any.whl", hash = "sha256:e8c24984af3e124ef31a5891c1c11871c948687368ee451e95f7f101ffbf8204"}, + {file = "poetry-1.3.1.tar.gz", hash = "sha256:fde98462ad5dc9879393157da93092206a3411117e25a4761a41c6d08f31aea8"}, +] [package.dependencies] "backports.cached-property" = {version = ">=1.0.2,<2.0.0", markers = "python_version < \"3.8\""} @@ -613,6 +1026,10 @@ description = "Poetry PEP 517 Build Backend" category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry_core-1.4.0-py3-none-any.whl", hash = "sha256:5559ab80384ac021db329ef317086417e140ee1176bcfcb3a3838b544e213c8e"}, + {file = "poetry_core-1.4.0.tar.gz", hash = "sha256:514bd33c30e0bf56b0ed44ee15e120d7e47b61ad908b2b1011da68c48a84ada9"}, +] [package.dependencies] importlib-metadata = {version = ">=1.7.0", markers = "python_version < \"3.8\""} @@ -624,6 +1041,10 @@ description = "Poetry plugin to export the dependencies to various formats" category = "main" optional = false python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry_plugin_export-1.2.0-py3-none-any.whl", hash = "sha256:109fb43ebfd0e79d8be2e7f9d43ba2ae357c4975a18dfc0cfdd9597dd086790e"}, + {file = "poetry_plugin_export-1.2.0.tar.gz", hash = "sha256:9a1dd42765408931d7831738749022651d43a2968b67c988db1b7a567dfe41ef"}, +] [package.dependencies] poetry = ">=1.2.2,<2.0.0" @@ -636,6 +1057,10 @@ description = "Run a subprocess in a pseudo terminal" category = "main" optional = false python-versions = "*" +files = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] [[package]] name = "py" @@ -644,6 +1069,10 @@ description = "library with cross-python path, ini-parsing, io, code, log facili category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] [[package]] name = "pycparser" @@ -652,6 +1081,10 @@ description = "C parser in Python" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] [[package]] name = "pygments" @@ -660,6 +1093,10 @@ description = "Pygments is a syntax highlighting package written in Python." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, + {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, +] [package.extras] plugins = ["importlib-metadata"] @@ -671,6 +1108,10 @@ description = "A python implementation of GNU readline." category = "main" optional = false python-versions = "*" +files = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] [[package]] name = "pyrsistent" @@ -679,6 +1120,30 @@ description = "Persistent/Functional/Immutable data structures" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "pyrsistent-0.19.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d6982b5a0237e1b7d876b60265564648a69b14017f3b5f908c5be2de3f9abb7a"}, + {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:187d5730b0507d9285a96fca9716310d572e5464cadd19f22b63a6976254d77a"}, + {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:055ab45d5911d7cae397dc418808d8802fb95262751872c841c170b0dbf51eed"}, + {file = "pyrsistent-0.19.2-cp310-cp310-win32.whl", hash = "sha256:456cb30ca8bff00596519f2c53e42c245c09e1a4543945703acd4312949bfd41"}, + {file = "pyrsistent-0.19.2-cp310-cp310-win_amd64.whl", hash = "sha256:b39725209e06759217d1ac5fcdb510e98670af9e37223985f330b611f62e7425"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2aede922a488861de0ad00c7630a6e2d57e8023e4be72d9d7147a9fcd2d30712"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:879b4c2f4d41585c42df4d7654ddffff1239dc4065bc88b745f0341828b83e78"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c43bec251bbd10e3cb58ced80609c5c1eb238da9ca78b964aea410fb820d00d6"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-win32.whl", hash = "sha256:d690b18ac4b3e3cab73b0b7aa7dbe65978a172ff94970ff98d82f2031f8971c2"}, + {file = "pyrsistent-0.19.2-cp37-cp37m-win_amd64.whl", hash = "sha256:3ba4134a3ff0fc7ad225b6b457d1309f4698108fb6b35532d015dca8f5abed73"}, + {file = "pyrsistent-0.19.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a178209e2df710e3f142cbd05313ba0c5ebed0a55d78d9945ac7a4e09d923308"}, + {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e371b844cec09d8dc424d940e54bba8f67a03ebea20ff7b7b0d56f526c71d584"}, + {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:111156137b2e71f3a9936baf27cb322e8024dac3dc54ec7fb9f0bcf3249e68bb"}, + {file = "pyrsistent-0.19.2-cp38-cp38-win32.whl", hash = "sha256:e5d8f84d81e3729c3b506657dddfe46e8ba9c330bf1858ee33108f8bb2adb38a"}, + {file = "pyrsistent-0.19.2-cp38-cp38-win_amd64.whl", hash = "sha256:9cd3e9978d12b5d99cbdc727a3022da0430ad007dacf33d0bf554b96427f33ab"}, + {file = "pyrsistent-0.19.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f1258f4e6c42ad0b20f9cfcc3ada5bd6b83374516cd01c0960e3cb75fdca6770"}, + {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21455e2b16000440e896ab99e8304617151981ed40c29e9507ef1c2e4314ee95"}, + {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd880614c6237243ff53a0539f1cb26987a6dc8ac6e66e0c5a40617296a045e"}, + {file = "pyrsistent-0.19.2-cp39-cp39-win32.whl", hash = "sha256:71d332b0320642b3261e9fee47ab9e65872c2bd90260e5d225dabeed93cbd42b"}, + {file = "pyrsistent-0.19.2-cp39-cp39-win_amd64.whl", hash = "sha256:dec3eac7549869365fe263831f576c8457f6c833937c68542d08fde73457d291"}, + {file = "pyrsistent-0.19.2-py3-none-any.whl", hash = "sha256:ea6b79a02a28550c98b6ca9c35b9f492beaa54d7c5c9e9949555893c8a9234d0"}, + {file = "pyrsistent-0.19.2.tar.gz", hash = "sha256:bfa0351be89c9fcbcb8c9879b826f4353be10f58f8a677efab0c017bf7137ec2"}, +] [[package]] name = "pytest" @@ -687,6 +1152,10 @@ description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, +] [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} @@ -709,6 +1178,7 @@ description = "Example Origen Plugin" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -725,6 +1195,7 @@ description = "Example Origen Plugin Without Any Commands" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -742,6 +1213,7 @@ description = "Another Example Origen Plugin" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -759,6 +1231,10 @@ description = "World timezone definitions, modern and historical" category = "main" optional = false python-versions = "*" +files = [ + {file = "pytz-2022.7-py2.py3-none-any.whl", hash = "sha256:93007def75ae22f7cd991c84e02d434876818661f8df9ad5df9e950ff4e52cfd"}, + {file = "pytz-2022.7.tar.gz", hash = "sha256:7ccfae7b4b2c067464a6733c6261673fdb8fd1be905460396b97a073e9fa683a"}, +] [[package]] name = "pywin32-ctypes" @@ -767,6 +1243,10 @@ description = "" category = "main" optional = false python-versions = "*" +files = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] [[package]] name = "rapidfuzz" @@ -775,79 +1255,211 @@ description = "rapid fuzzy string matching" category = "main" optional = false python-versions = ">=3.7" - -[package.extras] -full = ["numpy"] - -[[package]] -name = "recommonmark" -version = "0.7.1" -description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." -category = "main" -optional = false -python-versions = "*" - -[package.dependencies] -commonmark = ">=0.8.1" -docutils = ">=0.11" -sphinx = ">=1.3.1" - -[[package]] -name = "requests" -version = "2.28.1" -description = "Python HTTP for Humans." -category = "main" -optional = false -python-versions = ">=3.7, <4" - -[package.dependencies] -certifi = ">=2017.4.17" -charset-normalizer = ">=2,<3" -idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<1.27" - -[package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] - -[[package]] -name = "requests-toolbelt" -version = "0.10.1" -description = "A utility belt for advanced users of python-requests" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.dependencies] -requests = ">=2.0.1,<3.0.0" - -[[package]] -name = "secretstorage" -version = "3.3.3" -description = "Python bindings to FreeDesktop.org Secret Service API" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -cryptography = ">=2.0" -jeepney = ">=0.6" - -[[package]] -name = "shellingham" -version = "1.5.0" -description = "Tool to Detect Surrounding Shell" -category = "main" -optional = false -python-versions = ">=3.4" - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -category = "main" -optional = false +files = [ + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b75dd0928ce8e216f88660ab3d5c5ffe990f4dd682fd1709dba29d5dafdde6de"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:24d3fea10680d085fd0a4d76e581bfb2b1074e66e78fd5964d4559e1fcd2a2d4"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8109e0324d21993d5b2d111742bf5958f3516bf8c59f297c5d1cc25a2342eb66"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5f705652360d520c2de52bee11100c92f59b3e3daca308ebb150cbc58aecdad"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7496e8779905b02abc0ab4ba2a848e802ab99a6e20756ffc967a0de4900bd3da"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:24eb6b843492bdc63c79ee4b2f104059b7a2201fef17f25177f585d3be03405a"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:467c1505362823a5af12b10234cb1c4771ccf124c00e3fc9a43696512bd52293"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53dcae85956853b787c27c1cb06f18bb450e22cf57a4ad3444cf03b8ff31724a"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:46b9b8aa09998bc48dd800854e8d9b74bc534d7922c1d6e1bbf783e7fa6ac29c"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:1fbad8fb28d98980f5bff33c7842efef0315d42f0cd59082108482a7e6b61410"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:43fb8cb030f888c3f076d40d428ed5eb4331f5dd6cf1796cfa39c67bf0f0fc1e"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:b6bad92de071cbffa2acd4239c1779f66851b60ffbbda0e4f4e8a2e9b17e7eef"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d00df2e4a81ffa56a6b1ec4d2bc29afdcb7f565e0b8cd3092fece2290c4c7a79"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-win32.whl", hash = "sha256:2c836f0f2d33d4614c3fbaf9a1eb5407c0fe23f8876f47fd15b90f78daa64c34"}, + {file = "rapidfuzz-2.13.7-cp310-cp310-win_amd64.whl", hash = "sha256:c36fd260084bb636b9400bb92016c6bd81fd80e59ed47f2466f85eda1fc9f782"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b34e8c0e492949ecdd5da46a1cfc856a342e2f0389b379b1a45a3cdcd3176a6e"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:875d51b3497439a72e2d76183e1cb5468f3f979ab2ddfc1d1f7dde3b1ecfb42f"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ae33a72336059213996fe4baca4e0e4860913905c2efb7c991eab33b95a98a0a"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5585189b3d90d81ccd62d4f18530d5ac8972021f0aaaa1ffc6af387ff1dce75"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42085d4b154a8232767de8296ac39c8af5bccee6b823b0507de35f51c9cbc2d7"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:585206112c294e335d84de5d5f179c0f932837752d7420e3de21db7fdc476278"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f891b98f8bc6c9d521785816085e9657212621e93f223917fb8e32f318b2957e"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08590905a95ccfa43f4df353dcc5d28c15d70664299c64abcad8721d89adce4f"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b5dd713a1734574c2850c566ac4286594bacbc2d60b9170b795bee4b68656625"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:988f8f6abfba7ee79449f8b50687c174733b079521c3cc121d65ad2d38831846"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b3210869161a864f3831635bb13d24f4708c0aa7208ef5baac1ac4d46e9b4208"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:f6fe570e20e293eb50491ae14ddeef71a6a7e5f59d7e791393ffa99b13f1f8c2"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6120f2995f5154057454c5de99d86b4ef3b38397899b5da1265467e8980b2f60"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-win32.whl", hash = "sha256:b20141fa6cee041917801de0bab503447196d372d4c7ee9a03721b0a8edf5337"}, + {file = "rapidfuzz-2.13.7-cp311-cp311-win_amd64.whl", hash = "sha256:ec55a81ac2b0f41b8d6fb29aad16e55417036c7563bad5568686931aa4ff08f7"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7d005e058d86f2a968a8d28ca6f2052fab1f124a39035aa0523261d6baf21e1f"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe59a0c21a032024edb0c8e43f5dee5623fef0b65a1e3c1281836d9ce199af3b"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cdfc04f7647c29fb48da7a04082c34cdb16f878d3c6d098d62d5715c0ad3000c"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:68a89bb06d5a331511961f4d3fa7606f8e21237467ba9997cae6f67a1c2c2b9e"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:effe182767d102cb65dfbbf74192237dbd22d4191928d59415aa7d7c861d8c88"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25b4cedf2aa19fb7212894ce5f5219010cce611b60350e9a0a4d492122e7b351"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3a9bd02e1679c0fd2ecf69b72d0652dbe2a9844eaf04a36ddf4adfbd70010e95"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5e2b3d020219baa75f82a4e24b7c8adcb598c62f0e54e763c39361a9e5bad510"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:cf62dacb3f9234f3fddd74e178e6d25c68f2067fde765f1d95f87b1381248f58"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:fa263135b892686e11d5b84f6a1892523123a00b7e5882eff4fbdabb38667347"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:fa4c598ed77f74ec973247ca776341200b0f93ec3883e34c222907ce72cb92a4"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-win32.whl", hash = "sha256:c2523f8180ebd9796c18d809e9a19075a1060b1a170fde3799e83db940c1b6d5"}, + {file = "rapidfuzz-2.13.7-cp37-cp37m-win_amd64.whl", hash = "sha256:5ada0a14c67452358c1ee52ad14b80517a87b944897aaec3e875279371a9cb96"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ca8a23097c1f50e0fdb4de9e427537ca122a18df2eead06ed39c3a0bef6d9d3a"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9be02162af0376d64b840f2fc8ee3366794fc149f1e06d095a6a1d42447d97c5"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:af4f7c3c904ca709493eb66ca9080b44190c38e9ecb3b48b96d38825d5672559"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f50d1227e6e2a0e3ae1fb1c9a2e1c59577d3051af72c7cab2bcc430cb5e18da"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c71d9d512b76f05fa00282227c2ae884abb60e09f08b5ca3132b7e7431ac7f0d"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b52ac2626945cd21a2487aeefed794c14ee31514c8ae69b7599170418211e6f6"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca00fafd2756bc9649bf80f1cf72c647dce38635f0695d7ce804bc0f759aa756"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d248a109699ce9992304e79c1f8735c82cc4c1386cd8e27027329c0549f248a2"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c88adbcb933f6b8612f6c593384bf824e562bb35fc8a0f55fac690ab5b3486e5"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c8601a66fbfc0052bb7860d2eacd303fcde3c14e87fdde409eceff516d659e77"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:27be9c63215d302ede7d654142a2e21f0d34ea6acba512a4ae4cfd52bbaa5b59"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:3dcffe1f3cbda0dc32133a2ae2255526561ca594f15f9644384549037b355245"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8450d15f7765482e86ef9be2ad1a05683cd826f59ad236ef7b9fb606464a56aa"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-win32.whl", hash = "sha256:460853983ab88f873173e27cc601c5276d469388e6ad6e08c4fd57b2a86f1064"}, + {file = "rapidfuzz-2.13.7-cp38-cp38-win_amd64.whl", hash = "sha256:424f82c35dbe4f83bdc3b490d7d696a1dc6423b3d911460f5493b7ffae999fd2"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c3fbe449d869ea4d0909fc9d862007fb39a584fb0b73349a6aab336f0d90eaed"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:16080c05a63d6042643ae9b6cfec1aefd3e61cef53d0abe0df3069b9d4b72077"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dbcf5371ea704759fcce772c66a07647751d1f5dbdec7818331c9b31ae996c77"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:114810491efb25464016fd554fdf1e20d390309cecef62587494fc474d4b926f"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99a84ab9ac9a823e7e93b4414f86344052a5f3e23b23aa365cda01393ad895bd"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:81642a24798851b118f82884205fc1bd9ff70b655c04018c467824b6ecc1fabc"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3741cb0bf9794783028e8b0cf23dab917fa5e37a6093b94c4c2f805f8e36b9f"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:759a3361711586a29bc753d3d1bdb862983bd9b9f37fbd7f6216c24f7c972554"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1333fb3d603d6b1040e365dca4892ba72c7e896df77a54eae27dc07db90906e3"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:916bc2e6cf492c77ad6deb7bcd088f0ce9c607aaeabc543edeb703e1fbc43e31"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:23524635840500ce6f4d25005c9529a97621689c85d2f727c52eed1782839a6a"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:ebe303cd9839af69dd1f7942acaa80b1ba90bacef2e7ded9347fbed4f1654672"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:fe56659ccadbee97908132135de4b875543353351e0c92e736b7c57aee298b5a"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-win32.whl", hash = "sha256:3f11a7eff7bc6301cd6a5d43f309e22a815af07e1f08eeb2182892fca04c86cb"}, + {file = "rapidfuzz-2.13.7-cp39-cp39-win_amd64.whl", hash = "sha256:e8914dad106dacb0775718e54bf15e528055c4e92fb2677842996f2d52da5069"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7f7930adf84301797c3f09c94b9c5a9ed90a9e8b8ed19b41d2384937e0f9f5bd"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c31022d9970177f6affc6d5dd757ed22e44a10890212032fabab903fdee3bfe7"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f42b82f268689f429def9ecfb86fa65ceea0eaf3fed408b570fe113311bf5ce7"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b477b43ced896301665183a5e0faec0f5aea2373005648da8bdcb3c4b73f280"}, + {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:d63def9bbc6b35aef4d76dc740301a4185867e8870cbb8719ec9de672212fca8"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:c66546e30addb04a16cd864f10f5821272a1bfe6462ee5605613b4f1cb6f7b48"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f799d1d6c33d81e983d3682571cc7d993ae7ff772c19b3aabb767039c33f6d1e"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d82f20c0060ffdaadaf642b88ab0aa52365b56dffae812e188e5bdb998043588"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:042644133244bfa7b20de635d500eb9f46af7097f3d90b1724f94866f17cb55e"}, + {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75c45dcd595f8178412367e302fd022860ea025dc4a78b197b35428081ed33d5"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3d8b081988d0a49c486e4e845a547565fee7c6e7ad8be57ff29c3d7c14c6894c"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16ffad751f43ab61001187b3fb4a9447ec2d1aedeff7c5bac86d3b95f9980cc3"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:020858dd89b60ce38811cd6e37875c4c3c8d7fcd8bc20a0ad2ed1f464b34dc4e"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cda1e2f66bb4ba7261a0f4c2d052d5d909798fca557cbff68f8a79a87d66a18f"}, + {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b6389c50d8d214c9cd11a77f6d501529cb23279a9c9cafe519a3a4b503b5f72a"}, + {file = "rapidfuzz-2.13.7.tar.gz", hash = "sha256:8d3e252d4127c79b4d7c2ae47271636cbaca905c8bb46d80c7930ab906cf4b5c"}, +] + +[package.extras] +full = ["numpy"] + +[[package]] +name = "recommonmark" +version = "0.7.1" +description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, + {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, +] + +[package.dependencies] +commonmark = ">=0.8.1" +docutils = ">=0.11" +sphinx = ">=1.3.1" + +[[package]] +name = "requests" +version = "2.28.1" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=3.7, <4" +files = [ + {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, + {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<3" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<1.27" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-toolbelt" +version = "0.10.1" +description = "A utility belt for advanced users of python-requests" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "requests-toolbelt-0.10.1.tar.gz", hash = "sha256:62e09f7ff5ccbda92772a29f394a49c3ad6cb181d568b1337626b2abb628a63d"}, + {file = "requests_toolbelt-0.10.1-py2.py3-none-any.whl", hash = "sha256:18565aa58116d9951ac39baa288d3adb5b3ff975c4f25eee78555d89e8f247f7"}, +] + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +name = "secretstorage" +version = "3.3.3" +description = "Python bindings to FreeDesktop.org Secret Service API" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + +[[package]] +name = "setuptools" +version = "67.7.2" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "setuptools-67.7.2-py3-none-any.whl", hash = "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b"}, + {file = "setuptools-67.7.2.tar.gz", hash = "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8 (<5)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "shellingham" +version = "1.5.0" +description = "Tool to Detect Surrounding Shell" +category = "main" +optional = false +python-versions = ">=3.4" +files = [ + {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, + {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, +] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] [[package]] name = "snowballstemmer" @@ -856,6 +1468,10 @@ description = "This package provides 29 stemmers for 28 languages generated from category = "main" optional = false python-versions = "*" +files = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] [[package]] name = "soupsieve" @@ -864,6 +1480,10 @@ description = "A modern CSS selector implementation for Beautiful Soup." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, + {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, +] [[package]] name = "sphinx" @@ -872,6 +1492,10 @@ description = "Python documentation generator" category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, + {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, +] [package.dependencies] alabaster = ">=0.7,<0.8" @@ -883,6 +1507,7 @@ Jinja2 = ">=2.3" packaging = "*" Pygments = ">=2.0" requests = ">=2.5.0" +setuptools = "*" snowballstemmer = ">=1.1" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" @@ -893,8 +1518,8 @@ sphinxcontrib-serializinghtml = "*" [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-stubs"] -test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] +lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)"] +test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] [[package]] name = "sphinxbootstrap4theme" @@ -903,6 +1528,9 @@ description = "Sphinx Bootstrap4 Theme" category = "main" optional = false python-versions = "*" +files = [ + {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, +] [[package]] name = "sphinxcontrib-applehelp" @@ -911,9 +1539,13 @@ description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -923,9 +1555,13 @@ description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -935,10 +1571,14 @@ description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML h category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest", "html5lib"] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["html5lib", "pytest"] [[package]] name = "sphinxcontrib-jsmath" @@ -947,9 +1587,13 @@ description = "A sphinx extension which renders display math in HTML via JavaScr category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] [package.extras] -test = ["pytest", "flake8", "mypy"] +test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" @@ -958,9 +1602,13 @@ description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp d category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -970,9 +1618,13 @@ description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -982,6 +1634,10 @@ description = "ANSI color formatting for output in terminal" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "termcolor-2.1.1-py3-none-any.whl", hash = "sha256:fa852e957f97252205e105dd55bbc23b419a70fec0085708fc0515e399f304fd"}, + {file = "termcolor-2.1.1.tar.gz", hash = "sha256:67cee2009adc6449c650f6bcf3bdeed00c8ba53a8cda5362733c53e0a39fb70b"}, +] [package.extras] tests = ["pytest", "pytest-cov"] @@ -993,6 +1649,7 @@ description = "Shared Regression Test Helpers for Test Apps" category = "main" optional = false python-versions = ">=3.7,<3.11" +files = [] develop = true [package.dependencies] @@ -1010,6 +1667,10 @@ description = "Python Library for Tom's Obvious, Minimal Language" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] [[package]] name = "tomli" @@ -1018,6 +1679,10 @@ description = "A lil' TOML parser" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] [[package]] name = "tomlkit" @@ -1026,6 +1691,10 @@ description = "Style preserving TOML library" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "tomlkit-0.11.6-py3-none-any.whl", hash = "sha256:07de26b0d8cfc18f871aec595fda24d95b08fef89d147caa861939f37230bf4b"}, + {file = "tomlkit-0.11.6.tar.gz", hash = "sha256:71b952e5721688937fb02cf9d354dbcf0785066149d2855e44531ebdd2b65d73"}, +] [[package]] name = "trove-classifiers" @@ -1034,6 +1703,10 @@ description = "Canonical source for classifiers on PyPI (pypi.org)." category = "main" optional = false python-versions = "*" +files = [ + {file = "trove-classifiers-2022.12.22.tar.gz", hash = "sha256:fe0fe3f085987161aee2a5a853c7cc7cdf64515c5965d57ad968fdd8cc3b0362"}, + {file = "trove_classifiers-2022.12.22-py3-none-any.whl", hash = "sha256:f0013fd4ce06cfae879a2580ab6acc3d51ec93ecb364d6c061b6c77b44dd72de"}, +] [[package]] name = "typing-extensions" @@ -1042,6 +1715,10 @@ description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, + {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, +] [[package]] name = "urllib3" @@ -1050,10 +1727,14 @@ description = "HTTP library with thread-safe connection pooling, file post, and category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + {file = "urllib3-1.26.13-py2.py3-none-any.whl", hash = "sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc"}, + {file = "urllib3-1.26.13.tar.gz", hash = "sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"}, +] [package.extras] -brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] @@ -1063,6 +1744,10 @@ description = "Virtual Python Environment builder" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "virtualenv-20.16.5-py3-none-any.whl", hash = "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27"}, + {file = "virtualenv-20.16.5.tar.gz", hash = "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da"}, +] [package.dependencies] distlib = ">=0.3.5,<1" @@ -1080,6 +1765,10 @@ description = "Virtual Python Environment builder" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, + {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, +] [package.dependencies] distlib = ">=0.3.6,<1" @@ -1098,6 +1787,10 @@ description = "Character encoding aliases for legacy web content" category = "main" optional = false python-versions = "*" +files = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] [[package]] name = "xattr" @@ -1106,709 +1799,7 @@ description = "Python wrapper for extended filesystem attributes" category = "main" optional = false python-versions = "*" - -[package.dependencies] -cffi = ">=1.0" - -[[package]] -name = "yapf" -version = "0.30.0" -description = "A formatter for Python code." -category = "main" -optional = false -python-versions = "*" - -[[package]] -name = "zipp" -version = "3.11.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" -optional = false -python-versions = ">=3.7" - -[package.extras] -docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "jaraco.functools", "more-itertools", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"] - -[metadata] -lock-version = "1.1" -python-versions = ">=3.7,<3.11" -content-hash = "26480da255683b8b3fa427275d60c56838bea009549dbeec10ceac16960d7b9e" - -[metadata.files] -alabaster = [ - {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, - {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, -] -atomicwrites = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] -attrs = [ - {file = "attrs-22.2.0-py3-none-any.whl", hash = "sha256:29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836"}, - {file = "attrs-22.2.0.tar.gz", hash = "sha256:c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99"}, -] -babel = [ - {file = "Babel-2.11.0-py3-none-any.whl", hash = "sha256:1ad3eca1c885218f6dce2ab67291178944f810a10a9b5f3cb8382a5a232b64fe"}, - {file = "Babel-2.11.0.tar.gz", hash = "sha256:5ef4b3226b0180dedded4229651c8b0e1a3a6a2837d45a073272f313e4cf97f6"}, -] -"backports.cached-property" = [ - {file = "backports.cached-property-1.0.2.tar.gz", hash = "sha256:9306f9eed6ec55fd156ace6bc1094e2c86fae5fb2bf07b6a9c00745c656e75dd"}, - {file = "backports.cached_property-1.0.2-py3-none-any.whl", hash = "sha256:baeb28e1cd619a3c9ab8941431fe34e8490861fb998c6c4590693d50171db0cc"}, -] -beautifulsoup4 = [ - {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, - {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, - {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, -] -bs4 = [ - {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, -] -cachecontrol = [ - {file = "CacheControl-0.12.12-py2.py3-none-any.whl", hash = "sha256:5986a16897cd296bdb7b86b42e0403c4ca30b9875f0e0c7c8e509b50cff115b7"}, - {file = "CacheControl-0.12.12.tar.gz", hash = "sha256:9c2e5208ea76ebd9921176569743ddf6d7f3bb4188dbf61806f0f8fc48ecad38"}, -] -certifi = [ - {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, - {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, -] -cffi = [ - {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, - {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, - {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, - {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, - {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, - {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, - {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, - {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, - {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, - {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, - {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, - {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, - {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, - {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, - {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, - {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, - {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, - {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, - {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.1.1.tar.gz", hash = "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845"}, - {file = "charset_normalizer-2.1.1-py3-none-any.whl", hash = "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"}, -] -cleo = [ - {file = "cleo-2.0.1-py3-none-any.whl", hash = "sha256:6eb133670a3ed1f3b052d53789017b6e50fca66d1287e6e6696285f4cb8ea448"}, - {file = "cleo-2.0.1.tar.gz", hash = "sha256:eb4b2e1f3063c11085cebe489a6e9124163c226575a3c3be69b2e51af4a15ec5"}, -] -colorama = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] -commonmark = [ - {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, - {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, -] -crashtest = [ - {file = "crashtest-0.4.1-py3-none-any.whl", hash = "sha256:8d23eac5fa660409f57472e3851dab7ac18aba459a8d19cbbba86d3d5aecd2a5"}, - {file = "crashtest-0.4.1.tar.gz", hash = "sha256:80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce"}, -] -cryptography = [ - {file = "cryptography-38.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:2fa36a7b2cc0998a3a4d5af26ccb6273f3df133d61da2ba13b3286261e7efb70"}, - {file = "cryptography-38.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:1f13ddda26a04c06eb57119caf27a524ccae20533729f4b1e4a69b54e07035eb"}, - {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:2ec2a8714dd005949d4019195d72abed84198d877112abb5a27740e217e0ea8d"}, - {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50a1494ed0c3f5b4d07650a68cd6ca62efe8b596ce743a5c94403e6f11bf06c1"}, - {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a10498349d4c8eab7357a8f9aa3463791292845b79597ad1b98a543686fb1ec8"}, - {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:10652dd7282de17990b88679cb82f832752c4e8237f0c714be518044269415db"}, - {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:bfe6472507986613dc6cc00b3d492b2f7564b02b3b3682d25ca7f40fa3fd321b"}, - {file = "cryptography-38.0.4-cp36-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:ce127dd0a6a0811c251a6cddd014d292728484e530d80e872ad9806cfb1c5b3c"}, - {file = "cryptography-38.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:53049f3379ef05182864d13bb9686657659407148f901f3f1eee57a733fb4b00"}, - {file = "cryptography-38.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:8a4b2bdb68a447fadebfd7d24855758fe2d6fecc7fed0b78d190b1af39a8e3b0"}, - {file = "cryptography-38.0.4-cp36-abi3-win32.whl", hash = "sha256:1d7e632804a248103b60b16fb145e8df0bc60eed790ece0d12efe8cd3f3e7744"}, - {file = "cryptography-38.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:8e45653fb97eb2f20b8c96f9cd2b3a0654d742b47d638cf2897afbd97f80fa6d"}, - {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ca57eb3ddaccd1112c18fc80abe41db443cc2e9dcb1917078e02dfa010a4f353"}, - {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:c9e0d79ee4c56d841bd4ac6e7697c8ff3c8d6da67379057f29e66acffcd1e9a7"}, - {file = "cryptography-38.0.4-pp37-pypy37_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:0e70da4bdff7601b0ef48e6348339e490ebfb0cbe638e083c9c41fb49f00c8bd"}, - {file = "cryptography-38.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:998cd19189d8a747b226d24c0207fdaa1e6658a1d3f2494541cb9dfbf7dcb6d2"}, - {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:67461b5ebca2e4c2ab991733f8ab637a7265bb582f07c7c88914b5afb88cb95b"}, - {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:4eb85075437f0b1fd8cd66c688469a0c4119e0ba855e3fef86691971b887caf6"}, - {file = "cryptography-38.0.4-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:3178d46f363d4549b9a76264f41c6948752183b3f587666aff0555ac50fd7876"}, - {file = "cryptography-38.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:6391e59ebe7c62d9902c24a4d8bcbc79a68e7c4ab65863536127c8a9cd94043b"}, - {file = "cryptography-38.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:78e47e28ddc4ace41dd38c42e6feecfdadf9c3be2af389abbfeef1ff06822285"}, - {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fb481682873035600b5502f0015b664abc26466153fab5c6bc92c1ea69d478b"}, - {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:4367da5705922cf7070462e964f66e4ac24162e22ab0a2e9d31f1b270dd78083"}, - {file = "cryptography-38.0.4-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b4cad0cea995af760f82820ab4ca54e5471fc782f70a007f31531957f43e9dee"}, - {file = "cryptography-38.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:80ca53981ceeb3241998443c4964a387771588c4e4a5d92735a493af868294f9"}, - {file = "cryptography-38.0.4.tar.gz", hash = "sha256:175c1a818b87c9ac80bb7377f5520b7f31b3ef2a0004e2420319beadedb67290"}, -] -distlib = [ - {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, - {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, -] -docutils = [ - {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, - {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, -] -dulwich = [ - {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:97f02f8d500d4af08dc022d697c56e8539171acc3f575c2fe9acf3b078e5c8c9"}, - {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7301773e5cc16d521bc6490e73772a86a4d1d0263de506f08b54678cc4e2f061"}, - {file = "dulwich-0.20.50-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b70106580ed11f45f4c32d2831d0c9c9f359bc2415fff4a6be443e3a36811398"}, - {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f9c4f2455f966cad94648278fa9972e4695b35d04f82792fa58e1ea15dd83f0"}, - {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9163fbb021a8ad9c35a0814a5eedf45a8eb3a0b764b865d7016d901fc5a947fc"}, - {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:322ff8ff6aa4d6d36294cd36de1c84767eb1903c7db3e7b4475ad091febf5363"}, - {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5d3290a45651c8e534f8e83ae2e30322aefdd162f0f338bae2e79a6ee5a87513"}, - {file = "dulwich-0.20.50-cp310-cp310-win32.whl", hash = "sha256:80ab07131a6e68594441f5c4767e9e44e87fceafc3e347e541c928a18c679bd8"}, - {file = "dulwich-0.20.50-cp310-cp310-win_amd64.whl", hash = "sha256:eefe786a6010f8546baac4912113eeed4e397ddb8c433a345b548a04d4176496"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:df3562dde3079d57287c233d45b790bc967c5aae975c9a7b07ca30e60e055512"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e1ae18d5805f0c0c5dac65795f8d48660437166b12ee2c0ffea95bfdbf9c1051"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d2f7df39bd1378d3b0bfb3e7fc930fd0191924af1f0ef587bcd9946afe076c06"}, - {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:731e7f319b34251fadeb362ada1d52cc932369d9cdfa25c0e41150cda28773d0"}, - {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d11d44176e5d2fa8271fc86ad1e0a8731b9ad8f77df64c12846b30e16135eb"}, - {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7aaabb8e4beadd53f75f853a981caaadef3ef130e5645c902705704eaf136daa"}, - {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3dc9f97ec8d3db08d9723b9fd06f3e52c15b84c800d153cfb59b0a3dc8b8d40"}, - {file = "dulwich-0.20.50-cp311-cp311-win32.whl", hash = "sha256:3b1964fa80cafd5a1fd71615b0313daf6f3295c6ab05656ea0c1d2423539904a"}, - {file = "dulwich-0.20.50-cp311-cp311-win_amd64.whl", hash = "sha256:a24a3893108f3b97beb958670d5f3f2a3bec73a1fe18637a572a85abd949a1c4"}, - {file = "dulwich-0.20.50-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6d409a282f8848fd6c8d7c7545ad2f75c16de5d5977de202642f1d50fdaac554"}, - {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5411d0f1092152e1c0bb916ae490fe181953ae1b8d13f4e68661253e10b78dbb"}, - {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6343569f998ce429e2a5d813c56768ac51b496522401db950f0aa44240bfa901"}, - {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a405cd236766060894411614a272cfb86fe86cde5ca73ef264fc4fa5a715fff4"}, - {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:ee0f9b02019c0ea84cdd31c00a0c283669b771c85612997a911715cf84e33d99"}, - {file = "dulwich-0.20.50-cp36-cp36m-win32.whl", hash = "sha256:2644466270267270f2157ea6f1c0aa224f6f3bf06a307fc39954e6b4b3d82bae"}, - {file = "dulwich-0.20.50-cp36-cp36m-win_amd64.whl", hash = "sha256:d4629635a97e3af1b5da48071e00c8e70fad85f3266fadabe1f5a8f49172c507"}, - {file = "dulwich-0.20.50-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0e4862f318d99cc8a500e3622a89613a88c07d957a0f628cdc2ed86addff790f"}, - {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c96e3fb9d48c0454dc242c7accc7819780c9a7f29e441a9eff12361ed0fa35f9"}, - {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc6092a4f0bbbff2e553e87a9c6325955b64ea43fca21297c8182e19ae8a43c"}, - {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:519b627d49d273e2fd01c79d09e578675ca6cd05193c1787e9ef165c9a1d66ea"}, - {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a75cab01b909c4c683c2083e060e378bc01701b7366b5a7d9846ef6d3b9e3d5"}, - {file = "dulwich-0.20.50-cp37-cp37m-win32.whl", hash = "sha256:ea8ffe26d91dbcd5580dbd5a07270a12ea57b091604d77184da0a0d9fad50ed3"}, - {file = "dulwich-0.20.50-cp37-cp37m-win_amd64.whl", hash = "sha256:8f3af857f94021cae1322d86925bfc0dd31e501e885ab5db275473bfac0bb39d"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3fb35cedb1243bc420d885ef5b4afd642c6ac8f07ddfc7fdbca1becf9948bf7e"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4bb23a9cec63e16c0e432335f068169b73dd44fa9318dd7cd7a4ca83607ff367"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5267619b34ddaf8d9a6b841492cd17a971fd25bf9a5657f2de928385c3a08b94"}, - {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9091f1d53a3c0747cbf0bd127c64e7f09b770264d8fb53e284383fcdf69154e7"}, - {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6ec7c8fea2b44187a3b545e6c11ab9947ffb122647b07abcdb7cc3aaa770c0e"}, - {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:11b180b80363b4fc70664197028181a17ae4c52df9965a29b62a6c52e40c2dbe"}, - {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c83e7840d9d0a94d7033bc109efe0c22dfcdcd816bcd4469085e42809e3bf5ba"}, - {file = "dulwich-0.20.50-cp38-cp38-win32.whl", hash = "sha256:c075f69c2de19d9fd97e3b70832d2b42c6a4a5d909b3ffd1963b67d86029f95f"}, - {file = "dulwich-0.20.50-cp38-cp38-win_amd64.whl", hash = "sha256:06775c5713cfeda778c7c67d4422b5e7554d3a7f644f1dde646cdf486a30285a"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:49f66f1c057c18d7d60363f461f4ab8329320fbe1f02a7a33c255864a7d3c942"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4e541cd690a5e3d55082ed51732d755917e933cddeb4b0204f2a5ec5d5d7b60b"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:80e8750ee2fa0ab2784a095956077758e5f6107de27f637c4b9d18406652c22c"}, - {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbb6368f18451dc44c95c55e1a609d1a01d3821f7ed480b22b2aea1baca0f4a7"}, - {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3ee45001411b638641819b7b3b33f31f13467c84066e432256580fcab7d8815"}, - {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4842e22ed863a776b36ef8ffe9ed7b772eb452b42c8d02975c29d27e3bc50ab4"}, - {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:790e4a641284a7fb4d56ebdaf8b324a5826fbbb9c54307c06f586f9f6a5e56db"}, - {file = "dulwich-0.20.50-cp39-cp39-win32.whl", hash = "sha256:f08406b6b789dea5c95ba1130a0801d8748a67f18be940fe7486a8b481fde875"}, - {file = "dulwich-0.20.50-cp39-cp39-win_amd64.whl", hash = "sha256:78c388ad421199000fb7b5ed5f0c7b509b3e31bd7cad303786a4d0bf89b82f60"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:cb194c53109131bcbcd1ca430fcd437cdaf2d33e204e45fbe121c47eaa43e9af"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7542a72c5640dd0620862d6df8688f02a6c336359b5af9b3fcfe11b7fa6652f"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4aa1d0861517ebbbe0e0084cc9ab4f7ab720624a3eda2bd10e45f774ab858db8"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:583c6bbc27f13fe2e41a19f6987a42681c6e4f6959beae0a6e5bb033b8b081a8"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0c61c193d02c0e1e0d758cdd57ae76685c368d09a01f00d704ba88bd96767cfe"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2edbff3053251985f10702adfafbee118298d383ef5b5b432a5f22d1f1915df"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a344230cadfc5d315752add6ce9d4cfcfc6c85e36bbf57fce9444bcc7c6ea8fb"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:57bff9bde0b6b05b00c6acbb1a94357caddb2908ed7026a48c715ff50d220335"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e29a3c2037761fa816aa556e78364dfc8e3f44b873db2d17aed96f9b06ac83a3"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2aa2a4a84029625bf9c63771f8a628db1f3be2d2ea3cb8b17942cd4317797152"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd9fa00971ecf059bb358085a942ecac5be4ff71acdf299f44c8cbc45c18659f"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:af4adac92fb95671ea3a24f2f8e5e5e8f638711ce9c33a3ca6cd68bf1ff7d99f"}, - {file = "dulwich-0.20.50.tar.gz", hash = "sha256:50a941796b2c675be39be728d540c16b5b7ce77eb9e1b3f855650ece6832d2be"}, -] -filelock = [ - {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, - {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, -] -html5lib = [ - {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, - {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, -] -idna = [ - {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, - {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, -] -imagesize = [ - {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, - {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, -] -importlib-metadata = [ - {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, - {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, -] -importlib-resources = [ - {file = "importlib_resources-5.10.2-py3-none-any.whl", hash = "sha256:7d543798b0beca10b6a01ac7cafda9f822c54db9e8376a6bf57e0cbd74d486b6"}, - {file = "importlib_resources-5.10.2.tar.gz", hash = "sha256:e4a96c8cc0339647ff9a5e0550d9f276fc5a01ffa276012b58ec108cfd7b8484"}, -] -iniconfig = [ - {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, - {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, -] -"jaraco.classes" = [ - {file = "jaraco.classes-3.2.3-py3-none-any.whl", hash = "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158"}, - {file = "jaraco.classes-3.2.3.tar.gz", hash = "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a"}, -] -jeepney = [ - {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, - {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, -] -jinja2 = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, -] -jsonschema = [ - {file = "jsonschema-4.17.3-py3-none-any.whl", hash = "sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6"}, - {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, -] -keyring = [ - {file = "keyring-23.13.1-py3-none-any.whl", hash = "sha256:771ed2a91909389ed6148631de678f82ddc73737d85a927f382a8a1b157898cd"}, - {file = "keyring-23.13.1.tar.gz", hash = "sha256:ba2e15a9b35e21908d0aaf4e0a47acc52d6ae33444df0da2b49d41a46ef6d678"}, -] -lockfile = [ - {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, - {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, -] -mako = [ - {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, -] -markupsafe = [ - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, - {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, -] -more-itertools = [ - {file = "more-itertools-9.0.0.tar.gz", hash = "sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab"}, - {file = "more_itertools-9.0.0-py3-none-any.whl", hash = "sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41"}, -] -msgpack = [ - {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, - {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, - {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, - {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, - {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, - {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, - {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, - {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, - {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, - {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, - {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, - {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, - {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, - {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, - {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, - {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, -] -origen = [] -origen-autoapi = [ - {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, - {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, -] -origen-metal = [] -packaging = [ - {file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"}, - {file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"}, -] -pexpect = [ - {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, - {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, -] -pkginfo = [ - {file = "pkginfo-1.9.2-py3-none-any.whl", hash = "sha256:d580059503f2f4549ad6e4c106d7437356dbd430e2c7df99ee1efe03d75f691e"}, - {file = "pkginfo-1.9.2.tar.gz", hash = "sha256:ac03e37e4d601aaee40f8087f63fc4a2a6c9814dda2c8fa6aab1b1829653bdfa"}, -] -pkgutil-resolve-name = [ - {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, - {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, -] -pl-ext-cmds = [] -platformdirs = [ - {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, - {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, -] -pluggy = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] -poetry = [ - {file = "poetry-1.3.1-py3-none-any.whl", hash = "sha256:e8c24984af3e124ef31a5891c1c11871c948687368ee451e95f7f101ffbf8204"}, - {file = "poetry-1.3.1.tar.gz", hash = "sha256:fde98462ad5dc9879393157da93092206a3411117e25a4761a41c6d08f31aea8"}, -] -poetry-core = [ - {file = "poetry_core-1.4.0-py3-none-any.whl", hash = "sha256:5559ab80384ac021db329ef317086417e140ee1176bcfcb3a3838b544e213c8e"}, - {file = "poetry_core-1.4.0.tar.gz", hash = "sha256:514bd33c30e0bf56b0ed44ee15e120d7e47b61ad908b2b1011da68c48a84ada9"}, -] -poetry-plugin-export = [ - {file = "poetry_plugin_export-1.2.0-py3-none-any.whl", hash = "sha256:109fb43ebfd0e79d8be2e7f9d43ba2ae357c4975a18dfc0cfdd9597dd086790e"}, - {file = "poetry_plugin_export-1.2.0.tar.gz", hash = "sha256:9a1dd42765408931d7831738749022651d43a2968b67c988db1b7a567dfe41ef"}, -] -ptyprocess = [ - {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, - {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, -] -py = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] -pycparser = [ - {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, - {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, -] -pygments = [ - {file = "Pygments-2.13.0-py3-none-any.whl", hash = "sha256:f643f331ab57ba3c9d89212ee4a2dabc6e94f117cf4eefde99a0574720d14c42"}, - {file = "Pygments-2.13.0.tar.gz", hash = "sha256:56a8508ae95f98e2b9bdf93a6be5ae3f7d8af858b43e02c5a2ff083726be40c1"}, -] -pyreadline3 = [ - {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, - {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, -] -pyrsistent = [ - {file = "pyrsistent-0.19.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d6982b5a0237e1b7d876b60265564648a69b14017f3b5f908c5be2de3f9abb7a"}, - {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:187d5730b0507d9285a96fca9716310d572e5464cadd19f22b63a6976254d77a"}, - {file = "pyrsistent-0.19.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:055ab45d5911d7cae397dc418808d8802fb95262751872c841c170b0dbf51eed"}, - {file = "pyrsistent-0.19.2-cp310-cp310-win32.whl", hash = "sha256:456cb30ca8bff00596519f2c53e42c245c09e1a4543945703acd4312949bfd41"}, - {file = "pyrsistent-0.19.2-cp310-cp310-win_amd64.whl", hash = "sha256:b39725209e06759217d1ac5fcdb510e98670af9e37223985f330b611f62e7425"}, - {file = "pyrsistent-0.19.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2aede922a488861de0ad00c7630a6e2d57e8023e4be72d9d7147a9fcd2d30712"}, - {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:879b4c2f4d41585c42df4d7654ddffff1239dc4065bc88b745f0341828b83e78"}, - {file = "pyrsistent-0.19.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c43bec251bbd10e3cb58ced80609c5c1eb238da9ca78b964aea410fb820d00d6"}, - {file = "pyrsistent-0.19.2-cp37-cp37m-win32.whl", hash = "sha256:d690b18ac4b3e3cab73b0b7aa7dbe65978a172ff94970ff98d82f2031f8971c2"}, - {file = "pyrsistent-0.19.2-cp37-cp37m-win_amd64.whl", hash = "sha256:3ba4134a3ff0fc7ad225b6b457d1309f4698108fb6b35532d015dca8f5abed73"}, - {file = "pyrsistent-0.19.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a178209e2df710e3f142cbd05313ba0c5ebed0a55d78d9945ac7a4e09d923308"}, - {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e371b844cec09d8dc424d940e54bba8f67a03ebea20ff7b7b0d56f526c71d584"}, - {file = "pyrsistent-0.19.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:111156137b2e71f3a9936baf27cb322e8024dac3dc54ec7fb9f0bcf3249e68bb"}, - {file = "pyrsistent-0.19.2-cp38-cp38-win32.whl", hash = "sha256:e5d8f84d81e3729c3b506657dddfe46e8ba9c330bf1858ee33108f8bb2adb38a"}, - {file = "pyrsistent-0.19.2-cp38-cp38-win_amd64.whl", hash = "sha256:9cd3e9978d12b5d99cbdc727a3022da0430ad007dacf33d0bf554b96427f33ab"}, - {file = "pyrsistent-0.19.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f1258f4e6c42ad0b20f9cfcc3ada5bd6b83374516cd01c0960e3cb75fdca6770"}, - {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21455e2b16000440e896ab99e8304617151981ed40c29e9507ef1c2e4314ee95"}, - {file = "pyrsistent-0.19.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bfd880614c6237243ff53a0539f1cb26987a6dc8ac6e66e0c5a40617296a045e"}, - {file = "pyrsistent-0.19.2-cp39-cp39-win32.whl", hash = "sha256:71d332b0320642b3261e9fee47ab9e65872c2bd90260e5d225dabeed93cbd42b"}, - {file = "pyrsistent-0.19.2-cp39-cp39-win_amd64.whl", hash = "sha256:dec3eac7549869365fe263831f576c8457f6c833937c68542d08fde73457d291"}, - {file = "pyrsistent-0.19.2-py3-none-any.whl", hash = "sha256:ea6b79a02a28550c98b6ca9c35b9f492beaa54d7c5c9e9949555893c8a9234d0"}, - {file = "pyrsistent-0.19.2.tar.gz", hash = "sha256:bfa0351be89c9fcbcb8c9879b826f4353be10f58f8a677efab0c017bf7137ec2"}, -] -pytest = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, -] -python-plugin = [] -python-plugin-no-cmds = [] -python-plugin-the-second = [] -pytz = [ - {file = "pytz-2022.7-py2.py3-none-any.whl", hash = "sha256:93007def75ae22f7cd991c84e02d434876818661f8df9ad5df9e950ff4e52cfd"}, - {file = "pytz-2022.7.tar.gz", hash = "sha256:7ccfae7b4b2c067464a6733c6261673fdb8fd1be905460396b97a073e9fa683a"}, -] -pywin32-ctypes = [ - {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, - {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, -] -rapidfuzz = [ - {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:b75dd0928ce8e216f88660ab3d5c5ffe990f4dd682fd1709dba29d5dafdde6de"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:24d3fea10680d085fd0a4d76e581bfb2b1074e66e78fd5964d4559e1fcd2a2d4"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8109e0324d21993d5b2d111742bf5958f3516bf8c59f297c5d1cc25a2342eb66"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b5f705652360d520c2de52bee11100c92f59b3e3daca308ebb150cbc58aecdad"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7496e8779905b02abc0ab4ba2a848e802ab99a6e20756ffc967a0de4900bd3da"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:24eb6b843492bdc63c79ee4b2f104059b7a2201fef17f25177f585d3be03405a"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:467c1505362823a5af12b10234cb1c4771ccf124c00e3fc9a43696512bd52293"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53dcae85956853b787c27c1cb06f18bb450e22cf57a4ad3444cf03b8ff31724a"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:46b9b8aa09998bc48dd800854e8d9b74bc534d7922c1d6e1bbf783e7fa6ac29c"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:1fbad8fb28d98980f5bff33c7842efef0315d42f0cd59082108482a7e6b61410"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:43fb8cb030f888c3f076d40d428ed5eb4331f5dd6cf1796cfa39c67bf0f0fc1e"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:b6bad92de071cbffa2acd4239c1779f66851b60ffbbda0e4f4e8a2e9b17e7eef"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d00df2e4a81ffa56a6b1ec4d2bc29afdcb7f565e0b8cd3092fece2290c4c7a79"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-win32.whl", hash = "sha256:2c836f0f2d33d4614c3fbaf9a1eb5407c0fe23f8876f47fd15b90f78daa64c34"}, - {file = "rapidfuzz-2.13.7-cp310-cp310-win_amd64.whl", hash = "sha256:c36fd260084bb636b9400bb92016c6bd81fd80e59ed47f2466f85eda1fc9f782"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b34e8c0e492949ecdd5da46a1cfc856a342e2f0389b379b1a45a3cdcd3176a6e"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:875d51b3497439a72e2d76183e1cb5468f3f979ab2ddfc1d1f7dde3b1ecfb42f"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ae33a72336059213996fe4baca4e0e4860913905c2efb7c991eab33b95a98a0a"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5585189b3d90d81ccd62d4f18530d5ac8972021f0aaaa1ffc6af387ff1dce75"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42085d4b154a8232767de8296ac39c8af5bccee6b823b0507de35f51c9cbc2d7"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:585206112c294e335d84de5d5f179c0f932837752d7420e3de21db7fdc476278"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f891b98f8bc6c9d521785816085e9657212621e93f223917fb8e32f318b2957e"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08590905a95ccfa43f4df353dcc5d28c15d70664299c64abcad8721d89adce4f"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b5dd713a1734574c2850c566ac4286594bacbc2d60b9170b795bee4b68656625"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:988f8f6abfba7ee79449f8b50687c174733b079521c3cc121d65ad2d38831846"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b3210869161a864f3831635bb13d24f4708c0aa7208ef5baac1ac4d46e9b4208"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:f6fe570e20e293eb50491ae14ddeef71a6a7e5f59d7e791393ffa99b13f1f8c2"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6120f2995f5154057454c5de99d86b4ef3b38397899b5da1265467e8980b2f60"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-win32.whl", hash = "sha256:b20141fa6cee041917801de0bab503447196d372d4c7ee9a03721b0a8edf5337"}, - {file = "rapidfuzz-2.13.7-cp311-cp311-win_amd64.whl", hash = "sha256:ec55a81ac2b0f41b8d6fb29aad16e55417036c7563bad5568686931aa4ff08f7"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7d005e058d86f2a968a8d28ca6f2052fab1f124a39035aa0523261d6baf21e1f"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe59a0c21a032024edb0c8e43f5dee5623fef0b65a1e3c1281836d9ce199af3b"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cdfc04f7647c29fb48da7a04082c34cdb16f878d3c6d098d62d5715c0ad3000c"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:68a89bb06d5a331511961f4d3fa7606f8e21237467ba9997cae6f67a1c2c2b9e"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:effe182767d102cb65dfbbf74192237dbd22d4191928d59415aa7d7c861d8c88"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25b4cedf2aa19fb7212894ce5f5219010cce611b60350e9a0a4d492122e7b351"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3a9bd02e1679c0fd2ecf69b72d0652dbe2a9844eaf04a36ddf4adfbd70010e95"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5e2b3d020219baa75f82a4e24b7c8adcb598c62f0e54e763c39361a9e5bad510"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:cf62dacb3f9234f3fddd74e178e6d25c68f2067fde765f1d95f87b1381248f58"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:fa263135b892686e11d5b84f6a1892523123a00b7e5882eff4fbdabb38667347"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:fa4c598ed77f74ec973247ca776341200b0f93ec3883e34c222907ce72cb92a4"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-win32.whl", hash = "sha256:c2523f8180ebd9796c18d809e9a19075a1060b1a170fde3799e83db940c1b6d5"}, - {file = "rapidfuzz-2.13.7-cp37-cp37m-win_amd64.whl", hash = "sha256:5ada0a14c67452358c1ee52ad14b80517a87b944897aaec3e875279371a9cb96"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:ca8a23097c1f50e0fdb4de9e427537ca122a18df2eead06ed39c3a0bef6d9d3a"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9be02162af0376d64b840f2fc8ee3366794fc149f1e06d095a6a1d42447d97c5"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:af4f7c3c904ca709493eb66ca9080b44190c38e9ecb3b48b96d38825d5672559"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f50d1227e6e2a0e3ae1fb1c9a2e1c59577d3051af72c7cab2bcc430cb5e18da"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c71d9d512b76f05fa00282227c2ae884abb60e09f08b5ca3132b7e7431ac7f0d"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b52ac2626945cd21a2487aeefed794c14ee31514c8ae69b7599170418211e6f6"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca00fafd2756bc9649bf80f1cf72c647dce38635f0695d7ce804bc0f759aa756"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d248a109699ce9992304e79c1f8735c82cc4c1386cd8e27027329c0549f248a2"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:c88adbcb933f6b8612f6c593384bf824e562bb35fc8a0f55fac690ab5b3486e5"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:c8601a66fbfc0052bb7860d2eacd303fcde3c14e87fdde409eceff516d659e77"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:27be9c63215d302ede7d654142a2e21f0d34ea6acba512a4ae4cfd52bbaa5b59"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:3dcffe1f3cbda0dc32133a2ae2255526561ca594f15f9644384549037b355245"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8450d15f7765482e86ef9be2ad1a05683cd826f59ad236ef7b9fb606464a56aa"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-win32.whl", hash = "sha256:460853983ab88f873173e27cc601c5276d469388e6ad6e08c4fd57b2a86f1064"}, - {file = "rapidfuzz-2.13.7-cp38-cp38-win_amd64.whl", hash = "sha256:424f82c35dbe4f83bdc3b490d7d696a1dc6423b3d911460f5493b7ffae999fd2"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c3fbe449d869ea4d0909fc9d862007fb39a584fb0b73349a6aab336f0d90eaed"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:16080c05a63d6042643ae9b6cfec1aefd3e61cef53d0abe0df3069b9d4b72077"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dbcf5371ea704759fcce772c66a07647751d1f5dbdec7818331c9b31ae996c77"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:114810491efb25464016fd554fdf1e20d390309cecef62587494fc474d4b926f"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:99a84ab9ac9a823e7e93b4414f86344052a5f3e23b23aa365cda01393ad895bd"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:81642a24798851b118f82884205fc1bd9ff70b655c04018c467824b6ecc1fabc"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3741cb0bf9794783028e8b0cf23dab917fa5e37a6093b94c4c2f805f8e36b9f"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:759a3361711586a29bc753d3d1bdb862983bd9b9f37fbd7f6216c24f7c972554"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1333fb3d603d6b1040e365dca4892ba72c7e896df77a54eae27dc07db90906e3"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:916bc2e6cf492c77ad6deb7bcd088f0ce9c607aaeabc543edeb703e1fbc43e31"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:23524635840500ce6f4d25005c9529a97621689c85d2f727c52eed1782839a6a"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:ebe303cd9839af69dd1f7942acaa80b1ba90bacef2e7ded9347fbed4f1654672"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:fe56659ccadbee97908132135de4b875543353351e0c92e736b7c57aee298b5a"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-win32.whl", hash = "sha256:3f11a7eff7bc6301cd6a5d43f309e22a815af07e1f08eeb2182892fca04c86cb"}, - {file = "rapidfuzz-2.13.7-cp39-cp39-win_amd64.whl", hash = "sha256:e8914dad106dacb0775718e54bf15e528055c4e92fb2677842996f2d52da5069"}, - {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7f7930adf84301797c3f09c94b9c5a9ed90a9e8b8ed19b41d2384937e0f9f5bd"}, - {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c31022d9970177f6affc6d5dd757ed22e44a10890212032fabab903fdee3bfe7"}, - {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f42b82f268689f429def9ecfb86fa65ceea0eaf3fed408b570fe113311bf5ce7"}, - {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8b477b43ced896301665183a5e0faec0f5aea2373005648da8bdcb3c4b73f280"}, - {file = "rapidfuzz-2.13.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:d63def9bbc6b35aef4d76dc740301a4185867e8870cbb8719ec9de672212fca8"}, - {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:c66546e30addb04a16cd864f10f5821272a1bfe6462ee5605613b4f1cb6f7b48"}, - {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f799d1d6c33d81e983d3682571cc7d993ae7ff772c19b3aabb767039c33f6d1e"}, - {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d82f20c0060ffdaadaf642b88ab0aa52365b56dffae812e188e5bdb998043588"}, - {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:042644133244bfa7b20de635d500eb9f46af7097f3d90b1724f94866f17cb55e"}, - {file = "rapidfuzz-2.13.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75c45dcd595f8178412367e302fd022860ea025dc4a78b197b35428081ed33d5"}, - {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:3d8b081988d0a49c486e4e845a547565fee7c6e7ad8be57ff29c3d7c14c6894c"}, - {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:16ffad751f43ab61001187b3fb4a9447ec2d1aedeff7c5bac86d3b95f9980cc3"}, - {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:020858dd89b60ce38811cd6e37875c4c3c8d7fcd8bc20a0ad2ed1f464b34dc4e"}, - {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cda1e2f66bb4ba7261a0f4c2d052d5d909798fca557cbff68f8a79a87d66a18f"}, - {file = "rapidfuzz-2.13.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b6389c50d8d214c9cd11a77f6d501529cb23279a9c9cafe519a3a4b503b5f72a"}, - {file = "rapidfuzz-2.13.7.tar.gz", hash = "sha256:8d3e252d4127c79b4d7c2ae47271636cbaca905c8bb46d80c7930ab906cf4b5c"}, -] -recommonmark = [ - {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, - {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, -] -requests = [ - {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, - {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, -] -requests-toolbelt = [ - {file = "requests-toolbelt-0.10.1.tar.gz", hash = "sha256:62e09f7ff5ccbda92772a29f394a49c3ad6cb181d568b1337626b2abb628a63d"}, - {file = "requests_toolbelt-0.10.1-py2.py3-none-any.whl", hash = "sha256:18565aa58116d9951ac39baa288d3adb5b3ff975c4f25eee78555d89e8f247f7"}, -] -secretstorage = [ - {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, - {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, -] -shellingham = [ - {file = "shellingham-1.5.0-py2.py3-none-any.whl", hash = "sha256:a8f02ba61b69baaa13facdba62908ca8690a94b8119b69f5ec5873ea85f7391b"}, - {file = "shellingham-1.5.0.tar.gz", hash = "sha256:72fb7f5c63103ca2cb91b23dee0c71fe8ad6fbfd46418ef17dbe40db51592dad"}, -] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -snowballstemmer = [ - {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, - {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, -] -soupsieve = [ - {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, - {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, -] -sphinx = [ - {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, - {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, -] -sphinxbootstrap4theme = [ - {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, -] -sphinxcontrib-applehelp = [ - {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, - {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, -] -sphinxcontrib-devhelp = [ - {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, - {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, -] -sphinxcontrib-htmlhelp = [ - {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, - {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, -] -sphinxcontrib-jsmath = [ - {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, - {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, -] -sphinxcontrib-qthelp = [ - {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, - {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, -] -sphinxcontrib-serializinghtml = [ - {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, - {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, -] -termcolor = [ - {file = "termcolor-2.1.1-py3-none-any.whl", hash = "sha256:fa852e957f97252205e105dd55bbc23b419a70fec0085708fc0515e399f304fd"}, - {file = "termcolor-2.1.1.tar.gz", hash = "sha256:67cee2009adc6449c650f6bcf3bdeed00c8ba53a8cda5362733c53e0a39fb70b"}, -] -test-apps-shared-test-helpers = [] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -tomli = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] -tomlkit = [ - {file = "tomlkit-0.11.6-py3-none-any.whl", hash = "sha256:07de26b0d8cfc18f871aec595fda24d95b08fef89d147caa861939f37230bf4b"}, - {file = "tomlkit-0.11.6.tar.gz", hash = "sha256:71b952e5721688937fb02cf9d354dbcf0785066149d2855e44531ebdd2b65d73"}, -] -trove-classifiers = [ - {file = "trove-classifiers-2022.12.22.tar.gz", hash = "sha256:fe0fe3f085987161aee2a5a853c7cc7cdf64515c5965d57ad968fdd8cc3b0362"}, - {file = "trove_classifiers-2022.12.22-py3-none-any.whl", hash = "sha256:f0013fd4ce06cfae879a2580ab6acc3d51ec93ecb364d6c061b6c77b44dd72de"}, -] -typing-extensions = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, -] -urllib3 = [ - {file = "urllib3-1.26.13-py2.py3-none-any.whl", hash = "sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc"}, - {file = "urllib3-1.26.13.tar.gz", hash = "sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8"}, -] -virtualenv = [ - {file = "virtualenv-20.16.5-py3-none-any.whl", hash = "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27"}, - {file = "virtualenv-20.16.5.tar.gz", hash = "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da"}, - {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, - {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, -] -webencodings = [ - {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, - {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, -] -xattr = [ +files = [ {file = "xattr-0.10.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:16a660a883e703b311d1bbbcafc74fa877585ec081cd96e8dd9302c028408ab1"}, {file = "xattr-0.10.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:1e2973e72faa87ca29d61c23b58c3c89fe102d1b68e091848b0e21a104123503"}, {file = "xattr-0.10.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:13279fe8f7982e3cdb0e088d5cb340ce9cbe5ef92504b1fd80a0d3591d662f68"}, @@ -1882,11 +1873,39 @@ xattr = [ {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:827b5a97673b9997067fde383a7f7dc67342403093b94ea3c24ae0f4f1fec649"}, {file = "xattr-0.10.1.tar.gz", hash = "sha256:c12e7d81ffaa0605b3ac8c22c2994a8e18a9cf1c59287a1b7722a2289c952ec5"}, ] -yapf = [ + +[package.dependencies] +cffi = ">=1.0" + +[[package]] +name = "yapf" +version = "0.30.0" +description = "A formatter for Python code." +category = "main" +optional = false +python-versions = "*" +files = [ {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, ] -zipp = [ + +[[package]] +name = "zipp" +version = "3.11.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ {file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"}, {file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"}, ] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[metadata] +lock-version = "2.0" +python-versions = ">=3.7,<3.11" +content-hash = "26480da255683b8b3fa427275d60c56838bea009549dbeec10ceac16960d7b9e" From 691461dbe72491a0589c80410fd3a3aa062913e4 Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 11 May 2023 20:52:12 -0500 Subject: [PATCH 029/200] Remove checking order from app plugins. Doesn't seem to match between Linux and Windows anyway. --- .../python_app/tests/cli/core_cmds/plugins.py | 1 + .../test_apps_shared_test_helpers/cli/auditors.py | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/test_apps/python_app/tests/cli/core_cmds/plugins.py b/test_apps/python_app/tests/cli/core_cmds/plugins.py index 7dd2fcc4..2772976b 100644 --- a/test_apps/python_app/tests/cli/core_cmds/plugins.py +++ b/test_apps/python_app/tests/cli/core_cmds/plugins.py @@ -3,3 +3,4 @@ class T_Plugins(PluginsCmdAudit): loaded_plugins = CLICommon.loaded_plugins() + check_pl_list_order = False \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/auditors.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/auditors.py index d324e5ed..e4597f21 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/auditors.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/auditors.py @@ -111,6 +111,8 @@ class PluginsCmdAudit(CLIShared, ABC): def loaded_plugins(cls): raise NotImplementedError + check_pl_list_order = True + class TestBaseCmd(CLIShared): def test_help_msg(self, cmd, cached_help): help = cached_help @@ -128,8 +130,16 @@ def assert_out(self, out, plugins): if plugins is None: assert out == "There are no available plugins!\n" else: - pls = "\n".join([pl.name for pl in plugins]) - assert out == f"Available plugins:\n\n{pls}\n" + if self.check_pl_list_order: + pls = "\n".join([pl.name for pl in plugins]) + assert out == f"Available plugins:\n\n{pls}\n" + else: + assert out.startswith(f"Available plugins:\n\n") + out = out.split("\n") + print(out) + assert len(out) == 3 + len(plugins) + for pl in plugins: + assert pl.name in out def test_help_msg(self, cmd): help = cmd.get_help_msg() @@ -158,3 +168,4 @@ def setup_class(cls): c = cls.TestListSubc c._cmd = cls.cmd.list c.loaded_plugins = cls.loaded_plugins + c.check_pl_list_order = cls.check_pl_list_order From 723221ee70db0eb1535713d18547f0c9f9b1529d Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 16 May 2023 07:28:24 -0500 Subject: [PATCH 030/200] Move generate and env commands to use shared methods. Add some basic tests. --- python/origen/origen/boot.py | 9 +- .../origen/helpers/regressions/cli/_origen.py | 50 +++++++ .../origen/helpers/regressions/cli/command.py | 2 + .../helpers/regressions/cli/help_msg.py | 2 +- .../origen/helpers/regressions/cli/origen.py | 57 ++++---- python/origen/origen/producer.py | 23 ++-- rust/origen/cli/src/bin.rs | 122 +++--------------- rust/origen/cli/src/commands/_prelude/mod.rs | 7 +- rust/origen/cli/src/commands/env.rs | 25 +++- rust/origen/cli/src/commands/generate.rs | 31 +++++ rust/origen/cli/src/commands/mod.rs | 1 + rust/origen/cli/src/framework/mod.rs | 28 ++++ .../python_app/tests/cli/core_cmds/env.py | 11 ++ .../tests/cli/core_cmds/generate.py | 39 ++++++ test_apps/python_app/tests/cli/shared.py | 3 + .../python_app/tests/cli/tests__core_cmds.py | 8 ++ 16 files changed, 266 insertions(+), 152 deletions(-) create mode 100644 python/origen/origen/helpers/regressions/cli/_origen.py create mode 100644 rust/origen/cli/src/commands/generate.rs create mode 100644 test_apps/python_app/tests/cli/core_cmds/env.py create mode 100644 test_apps/python_app/tests/cli/core_cmds/generate.py diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 4be61567..11ea0268 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -21,9 +21,6 @@ def run_cmd(command, verbosity=None, verbosity_keywords=None, mode=None, - files=None, - output_dir=None, - reference_dir=None, debug=False, args=None, ext_args=None, @@ -50,6 +47,9 @@ def run_cmd(command, import origen.application import origen.target + if args is None: + args = {} + if command == dispatch_plugin_cmd: cmd_src = "plugin" elif command == dispatch_aux_cmd: @@ -127,6 +127,7 @@ def unsupported_subcmd(subcmd=None): else: origen.set_mode(mode) + files = args.get("files", None) if files is not None: _origen.file_handler().init(files) @@ -136,9 +137,11 @@ def unsupported_subcmd(subcmd=None): if verbosity_keywords is not None: origen_metal.framework.logger.set_verbosity_keywords(verbosity_keywords) + output_dir = args.get("output_dir", None) if output_dir is not None: _origen.set_output_dir(output_dir) + reference_dir = args.get("reference_dir", None) if reference_dir is not None: _origen.set_reference_dir(reference_dir) diff --git a/python/origen/origen/helpers/regressions/cli/_origen.py b/python/origen/origen/helpers/regressions/cli/_origen.py new file mode 100644 index 00000000..6265819b --- /dev/null +++ b/python/origen/origen/helpers/regressions/cli/_origen.py @@ -0,0 +1,50 @@ +from .command import CmdOpt + +def to_std_opt(opt): + if opt == "m": + return CmdOpt( + "mode", + help="Override the default mode currently set by the workspace for this command", + takes_value=True, + multi=False, + ln="mode", + ) + elif opt == "nt": + return CmdOpt( + "no_targets", + help="Clear any targets currently set by the workspace for this command", + takes_value=False, + ln_aliases=["no_target"], + ) + elif opt == "o": + return CmdOpt( + "output_dir", + help="Override the default output directory (/output)", + sn="o", + ln="output-dir", + takes_value=True, + ln_aliases=["output_dir"], + ) + elif opt == "r": + return CmdOpt( + "reference_dir", + help="Override the default reference directory (/.ref)", + sn="r", + ln="ref-dir", + takes_value=True, + ln_aliases=["reference_dir", "ref_dir", "reference-dir"], + value_name="REFERENCE_DIR", + ) + elif opt == "t": + return CmdOpt( + "targets", + help="Override the targets currently set by the workspace for this command", + takes_value=True, + multi=True, + use_delimiter=True, + ln="targets", + ln_aliases=["target"], + sn="t", + ) + else: + raise RuntimeError(f"Unknown std opt '{opt}'") diff --git a/python/origen/origen/helpers/regressions/cli/command.py b/python/origen/origen/helpers/regressions/cli/command.py index aea0e9bd..f61a3a0d 100644 --- a/python/origen/origen/helpers/regressions/cli/command.py +++ b/python/origen/origen/helpers/regressions/cli/command.py @@ -190,10 +190,12 @@ def __init__( vk_opt_idx=None, help_subc_idx=None, ): + from ._origen import to_std_opt self.name = name self.cmd_path = cmd_path or [] self.help = help self.args = dict([[arg.name, arg] for arg in (args or [])]) + opts = [(to_std_opt(o) if isinstance(o, str) else o) for o in (opts or [])] self.opts = dict([[opt.name, opt] for opt in (opts or [])]) self.subcmds = dict([[subcmd.name, subcmd] for subcmd in (subcmds or [])]) self.aliases = aliases diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index 52cbe519..bb0ae394 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -421,7 +421,7 @@ def assert_not_extendable(self): assert self.not_extendable_msg == self.after_help_msg.split("\n")[-1] def assert_cmd(self, cmd): - self.assert_args(*[cmd.args.values() or None]) + self.assert_args(*(cmd.args.values() or [None])) if cmd.opts: l = list(cmd.opts.values()) l.insert(cmd.h_opt_idx, "h") diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 5f61ae25..763f3db3 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -1,5 +1,6 @@ import origen from .command import CmdOpt, Cmd, CmdArg, CmdArgOpt, CmdDemo, CmdExtOpt +from ._origen import to_std_opt def help_subcmd(): return Cmd("help", help="Print this message or the help of the given subcommand(s)") @@ -226,30 +227,8 @@ class Names: origen = Cmd("") + class InAppOpts: - targets = CmdOpt( - "targets", - help="Override the targets currently set by the workspace for this command", - takes_value=True, - multi=True, - use_delimiter=True, - ln="targets", - ln_aliases=["target"], - sn="t", - ) - no_targets = CmdOpt( - "no_targets", - help="Clear any targets currently set by the workspace for this command", - takes_value=False, - ln_aliases=["no_target"], - ) - mode = CmdOpt( - "mode", - help="Override the default mode currently set by the workspace for this command", - takes_value=True, - multi=False, - ln="mode", - ) @classmethod def all(cls): @@ -259,6 +238,11 @@ def all(cls): def standard_opts(self): return [CoreOpts.help, self.mode, self.no_targets, self.targets, CoreOpts.verbosity, CoreOpts.vk ] + mode = to_std_opt("m") + no_targets = to_std_opt("nt") + targets = to_std_opt("t") + to_std_opt = to_std_opt + class InAppCommands(CoreCommands): in_app_opts = InAppOpts() @@ -351,11 +335,34 @@ def targets_arg(cls, help): build = Cmd(names.build) compile = Cmd(names.compile) creds = _CommonNames.creds_cmd(add_opts=in_app_opts.all()) - env = Cmd(names.env) + env = Cmd( + names.env, + help="Manage your application's Origen/Python environment (dependencies, etc.)", + subcmds=[ + Cmd( + "setup", + help="Setup your application's Python environment for the first time in a new workspace, this will install dependencies per the poetry.lock file", + ), + Cmd( + "update", + help="Update your application's Python dependencies according to the latest pyproject.toml file", + ), + ], + help_subc_idx=0, + extendable=False + ) eval = _CommonNames.eval_cmd(add_opts=in_app_opts.all()) exec = _CommonNames.exec_cmd() fmt = Cmd(names.fmt) - generate = Cmd(names.generate) + generate = Cmd( + names.generate, + help="Generate patterns or test programs", + args=[CmdArg("files", help="The name of the file(s) to be generated", multi=True, required=True)], + opts=["m", "nt", "o", "r", "t"], + h_opt_idx=0, + vk_opt_idx=7, + v_opt_idx=6, + ) i = _CommonNames.interactive_cmd(add_opts=in_app_opts.all()) mailer = Cmd(names.mailer) mode = Cmd(names.mode) diff --git a/python/origen/origen/producer.py b/python/origen/origen/producer.py index 8f77e34d..ab15464a 100644 --- a/python/origen/origen/producer.py +++ b/python/origen/origen/producer.py @@ -62,17 +62,18 @@ def summarize(self): 'changed_program_files'] > 0 new_files = stats['new_pattern_files'] > 0 or stats[ 'new_program_files'] > 0 - if changes or new_files: - print("") - if changes: - print("To save all changed files run:") - print(" origen save_ref --changed") - if new_files: - print("To save all new files run:") - print(" origen save_ref --new") - if changes and new_files: - print("To save both run:") - print(" origen save_ref --new --changed") + # TODO add this back in when save_ref is re-added + # if changes or new_files: + # print("") + # if changes: + # print("To save all changed files run:") + # print(" origen save_ref --changed") + # if new_files: + # print("To save all new files run:") + # print(" origen save_ref --new") + # if changes and new_files: + # print("To save both run:") + # print(" origen save_ref --new --changed") @contextmanager def Pattern(self, **kwargs): diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index e82201f6..41ba433b 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -428,6 +428,8 @@ fn main() -> Result<()> { if STATUS.is_app_present { commands::app::add_helps(&mut helps, app_cmds.as_ref().unwrap()); + commands::env::add_helps(&mut helps); + commands::generate::add_helps(&mut helps); commands::target::add_helps(&mut helps); } @@ -477,6 +479,8 @@ fn main() -> Result<()> { /************************************************************************************/ if STATUS.is_app_present { app = commands::app::add_commands(app, &helps, app_cmds.as_ref().unwrap(), &extensions)?; + app = commands::env::add_commands(app, &helps, &extensions)?; + app = commands::generate::add_commands(app, &helps, &extensions)?; /************************************************************************************/ let new_help = "Generate a new block, flow, pattern, etc. for your application"; @@ -553,69 +557,6 @@ Examples: ) ); - /************************************************************************************/ - let g_help = "Generate patterns or test programs"; - origen_commands.push(CommandHelp { - name: "generate".to_string(), - help: g_help.to_string(), - shortcut: Some("g".to_string()), - }); - app = app.subcommand( - Command::new("generate") - .about(g_help) - .visible_alias("g") - .arg( - Arg::new("files") - .help("The name of the file(s) to be generated") - .action(AppendArgs) - .value_name("FILES") - .multiple(true) - .required(true), - ) - .arg( - Arg::new("target") - .short('t') - .long("target") - .help("Override the default target currently set by the workspace") - .action(AppendArgs) - .use_delimiter(true) - .multiple(true) - .number_of_values(1) - .value_name("TARGET"), - ) - .arg( - Arg::new("mode") - .short('m') - .long("mode") - .help("Override the default execution mode currently set by the workspace") - .action(SetArg) - .value_name("MODE"), - ) - .arg( - Arg::new("output_dir") - .short('o') - .long("output-dir") - .help("Override the default output directory (/output)") - .action(SetArg) - .value_name("OUTPUT_DIR"), - ) - .arg( - Arg::new("reference_dir") - .short('r') - .long("reference-dir") - .help("Override the default reference directory (/.ref)") - .action(SetArg) - .value_name("REFERENCE_DIR"), - ) - .arg( - Arg::new("debug") - .long("debug") - .short('d') - .help("Enable Python caller tracking for debug (takes longer to execute)") - .action(SetArgTrue), - ), - ); - /************************************************************************************/ let c_help = "Compile templates"; origen_commands.push(CommandHelp { @@ -833,30 +774,6 @@ Examples: ), ); - /************************************************************************************/ - let env_help = "Manage your application's Origen/Python environment (dependencies, etc.)"; - origen_commands.push(CommandHelp { - name: "env".to_string(), - help: env_help.to_string(), - shortcut: None, - }); - app = app.subcommand(Command::new("env").about(env_help) - .arg_required_else_help(true) - .subcommand( - Command::new("setup") - .about("Setup your application's Python environment for the first time in a new workspace, this will install dependencies per the poetry.lock file") - .arg(Arg::new("origen") - .long("origen") - .help("The path to a local version of Origen to use (to develop Origen)") - .action(SetArg) - ), - ) - .subcommand( - Command::new("update") - .about("Update your application's Python dependencies according to the latest pyproject.toml file"), - ) - ); - /************************************************************************************/ let save_ref_help = "Save a reference version of the given file, this will be automatically checked for differences the next time it is generated"; origen_commands.push(CommandHelp { @@ -1111,33 +1028,26 @@ Examples: } } + macro_rules! run_non_ext_cmd_match_case { + ($cmd:ident, $cmd_name:ident) => { + commands::$cmd::run(matches.subcommand_matches(commands::$cmd::$cmd_name).unwrap())? + }; + ($cmd:ident) => { + commands::$cmd::run(matches.subcommand_matches(commands::$cmd::BASE_CMD).unwrap())? + } + } + match matches.subcommand_name() { Some(commands::app::BASE_CMD) => commands::app::run(matches.subcommand_matches(commands::app::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &app_cmds.as_ref().unwrap())?, - Some("env") => commands::env::run(matches.subcommand_matches("env").unwrap()), Some("fmt") => commands::fmt::run()?, Some("new") => commands::new::run(matches.subcommand_matches("new").unwrap()), Some("build") => commands::build::run(matches.subcommand_matches("build").unwrap())?, Some("proj") => commands::proj::run(matches.subcommand_matches("proj").unwrap()), + Some(commands::env::BASE_CMD) => run_non_ext_cmd_match_case!(env), Some(commands::eval::BASE_CMD) => run_cmd_match_case!(eval), Some(commands::interactive::BASE_CMD) => run_cmd_match_case!(interactive), Some(commands::aux_cmds::BASE_CMD) => commands::aux_cmds::run(matches.subcommand_matches(commands::aux_cmds::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &aux_cmds)?, - Some("generate") => { - let m = matches.subcommand_matches("generate").unwrap(); - commands::launch( - "generate", - if let Some(targets) = m.get_many::("target") { - Some(targets.map(|t| t.as_str()).collect()) - } else { - Option::None - }, - &m.get_one::<&str>("mode").map(|s| *s), - Some(m.get_many::("files").unwrap().map(|t| t.as_str()).collect()), - m.get_one::<&str>("output_dir").map(|s| *s), - m.get_one::<&str>("reference_dir").map(|s| *s), - m.contains_id("debug"), - None, - ); - } + Some(commands::generate::BASE_CMD) => run_cmd_match_case!(generate), Some("compile") => { let m = matches.subcommand_matches("compile").unwrap(); commands::launch( @@ -1155,7 +1065,7 @@ Examples: None, ); } - Some(commands::target::BASE_CMD) => commands::target::run(matches.subcommand_matches(commands::target::BASE_CMD).unwrap())?, + Some(commands::target::BASE_CMD) => run_non_ext_cmd_match_case!(target), Some("web") => { let cmd = matches.subcommand_matches("web").unwrap(); let subcmd = cmd.subcommand().unwrap(); diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index cdc5a9e7..1b39a522 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -5,8 +5,11 @@ pub use origen::Result; pub use super::super::CommandHelp; pub use indexmap::IndexMap; pub use super::{launch, launch_simple, launch_as}; -pub use crate::framework::{Extensions, Plugins, add_verbosity_opts}; -pub use crate::framework::{CmdHelps, CmdHelp, CmdSrc}; +pub use crate::framework::{ + Extensions, Plugins, add_verbosity_opts, + CmdHelps, CmdHelp, CmdSrc +}; +pub use crate::{output_dir_opt, ref_dir_opt}; // FOR_PR remove this pub type RunInput<'a> = &'a clap::ArgMatches; diff --git a/rust/origen/cli/src/commands/env.rs b/rust/origen/cli/src/commands/env.rs index 0e2501c0..5eec3768 100644 --- a/rust/origen/cli/src/commands/env.rs +++ b/rust/origen/cli/src/commands/env.rs @@ -1,6 +1,6 @@ //! Some notes on how Origen's Python environment is setup and invoked: //! - +use super::_prelude::*; extern crate time; use crate::python::{poetry_version, MIN_PYTHON_VERSION, PYTHON_CONFIG}; @@ -13,11 +13,27 @@ use regex::Regex; use semver::VersionReq; use std::process::Command; +pub const BASE_CMD: &'static str = "env"; + static MINIMUM_PIP_VERSION: &str = "22.0.4"; static MINIMUM_POETRY_VERSION: &str = "1.3.2"; -pub fn run(matches: &ArgMatches) { - match matches.subcommand_name() { +gen_core_cmd_funcs__no_exts__no_app_opts!( + BASE_CMD, + "Manage your application's Origen/Python environment (dependencies, etc.)", + { |cmd: App<'a>| {cmd.arg_required_else_help(true)}}, + core_subcmd__no_exts__no_app_opts!("setup", "Setup your application's Python environment for the first time in a new workspace, this will install dependencies per the poetry.lock file", { |cmd: App| { + cmd.arg(Arg::new("origen") + .long("origen") + .help("The path to a local version of Origen to use (to develop Origen)") + .action(SetArg) + ) + }}), + core_subcmd__no_exts__no_app_opts!("update", "Update your application's Python dependencies according to the latest pyproject.toml file", { |cmd: App| {cmd}}) +); + +pub fn run(mut invocation: &clap::ArgMatches) -> origen::Result<()> { + match invocation.subcommand_name() { Some("update") => { install_poetry(); let _ = PYTHON_CONFIG.poetry_command().arg("update").status(); @@ -30,7 +46,7 @@ pub fn run(matches: &ArgMatches) { let mut origen_source_changed = false; let mut run_origen_build = false; - let origen_root = match matches + let origen_root = match invocation .subcommand_matches("setup") .unwrap() .get_one::<&str>("origen") @@ -231,6 +247,7 @@ pub fn run(matches: &ArgMatches) { None => unreachable!(), _ => unreachable!(), } + Ok(()) } fn install_poetry() { diff --git a/rust/origen/cli/src/commands/generate.rs b/rust/origen/cli/src/commands/generate.rs new file mode 100644 index 00000000..4ed4a17e --- /dev/null +++ b/rust/origen/cli/src/commands/generate.rs @@ -0,0 +1,31 @@ +use crate::commands::_prelude::*; + +pub const BASE_CMD: &'static str = "generate"; + +gen_core_cmd_funcs!( + BASE_CMD, + "Generate patterns or test programs", + { |cmd: App<'a>| { + cmd.visible_alias("g") + .arg( + Arg::new("files") + .help("The name of the file(s) to be generated") + .action(AppendArgs) + .value_name("FILES") + .multiple(true) + .required(true), + ) + .arg(output_dir_opt!()) + .arg(ref_dir_opt!()) + // TODO re-add debug opt + // .arg( + // Arg::new("debug") + // .long("debug") + // .short('d') + // .help("Enable Python caller tracking for debug (takes longer to execute)") + // .action(SetArgTrue), + // ) + }} +); + +gen_simple_run_func!(); diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index b687f19d..e3233747 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -12,6 +12,7 @@ pub mod save_ref; pub mod target; // pub mod mailer; pub mod credentials; +pub mod generate; pub mod eval; pub mod aux_cmds; pub mod plugin; diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index ad96fc52..f4825577 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -1057,3 +1057,31 @@ pub fn add_all_app_opts(cmd: ClapCommand) -> ClapCommand { cmd } } + +#[macro_export] +macro_rules! output_dir_opt { + () => {{ + Arg::new("output_dir") + .short('o') + .long("output-dir") + .visible_alias("output_dir") + .help("Override the default output directory (/output)") + .action(SetArg) + .value_name("OUTPUT_DIR") + }} +} + +pub const REF_DIR_OPT_LNAS: &[&str] = &["reference_dir", "ref_dir", "reference-dir"]; + +#[macro_export] +macro_rules! ref_dir_opt { + () => {{ + Arg::new("reference_dir") + .short('r') + .long("ref-dir") + .visible_aliases(&crate::framework::REF_DIR_OPT_LNAS) + .help("Override the default reference directory (/.ref)") + .action(SetArg) + .value_name("REFERENCE_DIR") + }} +} diff --git a/test_apps/python_app/tests/cli/core_cmds/env.py b/test_apps/python_app/tests/cli/core_cmds/env.py new file mode 100644 index 00000000..7f5545a9 --- /dev/null +++ b/test_apps/python_app/tests/cli/core_cmds/env.py @@ -0,0 +1,11 @@ +from ..shared import CLICommon + +class T_Env(CLICommon): + _cmd = CLICommon.in_app_cmds.env + + def test_help_msg(self, cmd, cached_help): + cached_help.assert_cmd(cmd) + + def test_help_msg_on_no_subcs(self, cmd, cached_help): + out = cmd.gen_error() + assert out == cached_help.text diff --git a/test_apps/python_app/tests/cli/core_cmds/generate.py b/test_apps/python_app/tests/cli/core_cmds/generate.py new file mode 100644 index 00000000..f0b05803 --- /dev/null +++ b/test_apps/python_app/tests/cli/core_cmds/generate.py @@ -0,0 +1,39 @@ +from ..shared import CLICommon +import re, origen +from pathlib import Path + +class T_Generate(CLICommon): + _cmd = CLICommon.in_app_cmds.generate + pat = "example/patterns/toggle.py" + toggle_out = Path("output/j750/toggle.atp") + custom_dir = CLICommon.tmp_dir() + toggle_out_custom = custom_dir.joinpath("j750/toggle.atp") + targets = ["eagle", "j750"] + + def setup_class(cls): + if cls.toggle_out.exists(): + cls.toggle_out.unlink() + if cls.toggle_out_custom.exists(): + cls.toggle_out_custom.unlink() + + def test_help_msg(self, cmd, cached_help): + cached_help.assert_cmd(cmd) + + def test_error_on_no_args(self, cmd): + out = cmd.gen_error() + print(out) + exp = self.err_msgs.missing_required_arg(cmd.files) + print(exp) + assert exp in out + + def test_generate_pattern(self, cmd): + assert not self.toggle_out.exists() + out = cmd.run(self.pat, run_opts={"targets": self.targets}) + assert re.match(f"Created: {self.toggle_out} - .*New pattern", out) + assert self.toggle_out.exists() + + def test_output_dir(self, cmd): + assert not self.toggle_out_custom.exists() + out = cmd.run(self.pat, cmd.output_dir.sn_to_cli(), self.custom_dir, run_opts={"targets": self.targets}) + assert re.match(f"Created: {self.toggle_out_custom.relative_to(origen.app.root)} - .*New pattern", out) + assert self.toggle_out_custom.exists() diff --git a/test_apps/python_app/tests/cli/shared.py b/test_apps/python_app/tests/cli/shared.py index 71d66b34..6925cded 100644 --- a/test_apps/python_app/tests/cli/shared.py +++ b/test_apps/python_app/tests/cli/shared.py @@ -2,6 +2,7 @@ from origen.helpers.regressions import cli from tests.shared import PythonAppCommon +from tests._shared import tmp_dir from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg, CmdExtOpt from test_apps_shared_test_helpers.cli.cmd_models import SrcBase @@ -423,6 +424,8 @@ def arg_opt_warmup(self): "bypass_config_lookup": True } + tmp_dir = tmp_dir + @classmethod def loaded_plugins_alpha(cls): return [ diff --git a/test_apps/python_app/tests/cli/tests__core_cmds.py b/test_apps/python_app/tests/cli/tests__core_cmds.py index 6a8514e6..18696f34 100644 --- a/test_apps/python_app/tests/cli/tests__core_cmds.py +++ b/test_apps/python_app/tests/cli/tests__core_cmds.py @@ -1,6 +1,8 @@ import pytest, origen from .shared import CLICommon from .core_cmds.aux_cmds import T_AuxCmds +from .core_cmds.env import T_Env +from .core_cmds.generate import T_Generate from .core_cmds.target import T_Target from .core_cmds.app import T_App from .core_cmds.plugin import T_Plugin @@ -47,6 +49,9 @@ class TestApp(T_App): class TestAuxCmds(T_AuxCmds): pass + class TestEnv(T_Env): + pass + class TestEval(CLICommon): _cmd= origen.helpers.regressions.cli.CLI.in_app_cmds.eval @@ -61,6 +66,9 @@ def test_basic_eval(self, cmd, no_config_run_opts): out = d.run(run_opts=no_config_run_opts) d.assert_present(out) + class TestGenerate(T_Generate): + pass + class TestPlugin(T_Plugin): pass From f4d411e4c282ea8fcd03abbdb885b13d9156cd05 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 16 May 2023 07:28:45 -0500 Subject: [PATCH 031/200] add cargo.lock from merge --- rust/origen/Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index 66e35e7d..54e49752 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -2540,7 +2540,7 @@ dependencies = [ [[package]] name = "origen_metal" -version = "0.4.0" +version = "0.5.0" dependencies = [ "aes-gcm", "built", From dfe3dbff84b95e19b8e8af66ade2cd38a981c838 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 16 May 2023 08:15:38 -0500 Subject: [PATCH 032/200] Attempt to fix windows regressions. --- test_apps/python_app/tests/cli/core_cmds/generate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_apps/python_app/tests/cli/core_cmds/generate.py b/test_apps/python_app/tests/cli/core_cmds/generate.py index f0b05803..af62e528 100644 --- a/test_apps/python_app/tests/cli/core_cmds/generate.py +++ b/test_apps/python_app/tests/cli/core_cmds/generate.py @@ -29,11 +29,11 @@ def test_error_on_no_args(self, cmd): def test_generate_pattern(self, cmd): assert not self.toggle_out.exists() out = cmd.run(self.pat, run_opts={"targets": self.targets}) - assert re.match(f"Created: {self.toggle_out} - .*New pattern", out) + assert re.match(rf"Created: {self.toggle_out} - .*New pattern", out) assert self.toggle_out.exists() def test_output_dir(self, cmd): assert not self.toggle_out_custom.exists() - out = cmd.run(self.pat, cmd.output_dir.sn_to_cli(), self.custom_dir, run_opts={"targets": self.targets}) - assert re.match(f"Created: {self.toggle_out_custom.relative_to(origen.app.root)} - .*New pattern", out) + out = cmd.run(self.pat, cmd.output_dir.sn_to_cli(), str(self.custom_dir), run_opts={"targets": self.targets}) + assert re.match(rf"Created: {self.toggle_out_custom.relative_to(origen.app.root)} - .*New pattern", out) assert self.toggle_out_custom.exists() From e9b81bc723582a6d54637505e2113d0042ce881b Mon Sep 17 00:00:00 2001 From: coreyeng Date: Tue, 16 May 2023 21:33:12 -0500 Subject: [PATCH 033/200] Fix for windows --- rust/pyapi/Cargo.lock | 2 +- test_apps/python_app/tests/cli/core_cmds/generate.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index 161a5ba2..eeb1778b 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -2211,7 +2211,7 @@ dependencies = [ [[package]] name = "origen_metal" -version = "0.4.0" +version = "0.5.0" dependencies = [ "aes-gcm", "built", diff --git a/test_apps/python_app/tests/cli/core_cmds/generate.py b/test_apps/python_app/tests/cli/core_cmds/generate.py index af62e528..3d8930d3 100644 --- a/test_apps/python_app/tests/cli/core_cmds/generate.py +++ b/test_apps/python_app/tests/cli/core_cmds/generate.py @@ -29,11 +29,13 @@ def test_error_on_no_args(self, cmd): def test_generate_pattern(self, cmd): assert not self.toggle_out.exists() out = cmd.run(self.pat, run_opts={"targets": self.targets}) - assert re.match(rf"Created: {self.toggle_out} - .*New pattern", out) + s = str(self.toggle_out).replace("\\", "\\\\") + assert re.match(rf"Created: {s} - .*New pattern", out) assert self.toggle_out.exists() def test_output_dir(self, cmd): assert not self.toggle_out_custom.exists() out = cmd.run(self.pat, cmd.output_dir.sn_to_cli(), str(self.custom_dir), run_opts={"targets": self.targets}) - assert re.match(rf"Created: {self.toggle_out_custom.relative_to(origen.app.root)} - .*New pattern", out) + s = str(self.toggle_out_custom.relative_to(origen.app.root)).replace("\\", "\\\\") + assert re.match(rf"Created: {s} - .*New pattern", out) assert self.toggle_out_custom.exists() From 4eb0c2695bf76587a8a587fb54620d8b4eea8eca Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 17 May 2023 20:10:44 -0500 Subject: [PATCH 034/200] Start cleanup and remove untested commands --- .../origen/helpers/regressions/cli/origen.py | 51 +- rust/origen/cli/src/bin.rs | 1308 ++++++++--------- rust/origen/cli/src/commands/_prelude/mod.rs | 1 - rust/origen/cli/src/commands/aux_cmds.rs | 1 - rust/origen/cli/src/commands/env.rs | 1 - rust/origen/cli/src/commands/exec.rs | 1 - rust/origen/cli/src/commands/mod.rs | 15 +- rust/origen/cli/src/framework/plugins.rs | 14 +- .../tests/cli/core_cmds/generate.py | 2 - 9 files changed, 687 insertions(+), 707 deletions(-) diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 763f3db3..e1c60307 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -211,18 +211,20 @@ class Names: aux_cmds = _CommonNames.aux_cmds_cmd() pls = _CommonNames.pls_cmd() pl = _CommonNames.pl_cmd() - proj = Cmd(names.proj) - new = Cmd(names.new) + # proj = Cmd(names.proj) + # new = Cmd(names.new) creds = _CommonNames.creds_cmd() i = _CommonNames.interactive_cmd() - fmt = Cmd(names.fmt) - build = Cmd(names.build) + # fmt = Cmd(names.fmt) + # build = Cmd(names.build) v = _CommonNames.v_cmd() commands = [ - proj, new, creds, eval, exec, i, - pls, pl, aux_cmds, fmt, build - ] + # proj, new, creds, eval, exec, i, + # pls, pl, aux_cmds, fmt, build + creds, eval, exec, i, + pls, pl, aux_cmds, + ] cmds = commands origen = Cmd("") @@ -253,23 +255,23 @@ def standard_opts(self): class Names: app = "app" aux_cmds = _CommonNames.aux_cmds - build = _CommonNames.build - compile = "compile" + # build = _CommonNames.build + # compile = "compile" creds = _CommonNames.creds env = "env" eval = _CommonNames.eval exec = _CommonNames.exec - fmt = _CommonNames.fmt + # fmt = _CommonNames.fmt generate = "generate" i = _CommonNames.i - mailer = "mailer" - mode = "mode" - new = _CommonNames.new + # mailer = "mailer" + # mode = "mode" + # new = _CommonNames.new pl = _CommonNames.pl pls = _CommonNames.pls - save_ref = "save_ref" + # save_ref = "save_ref" target = "target" - web = "web" + # web = "web" names = Names() class _TargetCmd_: @@ -332,8 +334,8 @@ def targets_arg(cls, help): extendable=False, ) aux_cmds = _CommonNames.aux_cmds_cmd() - build = Cmd(names.build) - compile = Cmd(names.compile) + # build = Cmd(names.build) + # compile = Cmd(names.compile) creds = _CommonNames.creds_cmd(add_opts=in_app_opts.all()) env = Cmd( names.env, @@ -353,7 +355,7 @@ def targets_arg(cls, help): ) eval = _CommonNames.eval_cmd(add_opts=in_app_opts.all()) exec = _CommonNames.exec_cmd() - fmt = Cmd(names.fmt) + # fmt = Cmd(names.fmt) generate = Cmd( names.generate, help="Generate patterns or test programs", @@ -364,12 +366,12 @@ def targets_arg(cls, help): v_opt_idx=6, ) i = _CommonNames.interactive_cmd(add_opts=in_app_opts.all()) - mailer = Cmd(names.mailer) - mode = Cmd(names.mode) - new = Cmd(names.new) + # mailer = Cmd(names.mailer) + # mode = Cmd(names.mode) + # new = Cmd(names.new) pl = _CommonNames.pl_cmd() pls = _CommonNames.pls_cmd() - save_ref = Cmd(names.save_ref) + # save_ref = Cmd(names.save_ref) target = Cmd( names.target, help="Set/view the default target", @@ -416,11 +418,12 @@ def targets_arg(cls, help): ], aliases=["w"], ) - web = Cmd(names.web) + # web = Cmd(names.web) v = _CommonNames.v_cmd() commands = [ - app, aux_cmds, build, compile, creds, env, eval, exec, fmt, generate, i, mailer, mode, new, pl, pls, save_ref, target, web + # app, aux_cmds, build, compile, creds, env, eval, exec, fmt, generate, i, mailer, mode, new, pl, pls, save_ref, target, web + app, aux_cmds, creds, env, eval, exec, generate, i, pl, pls, target ] cmds = commands diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index 41ba433b..102e25f2 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -9,31 +9,27 @@ mod framework; mod commands; mod python; -use clap::{Arg, Command}; +use clap::Command; use indexmap::map::IndexMap; -use origen::{Result, LOGGER, STATUS}; -use origen_metal as om; +use origen::{Result, STATUS}; use std::iter::FromIterator; use std::process::exit; use framework::{Extensions, Plugins, AuxCmds, AppCmds, CmdHelps}; use framework::{ - VERBOSITY_OPT_NAME, VERBOSITY_OPT_SHORT_NAME, VERBOSITY_OPT_LNA, - VERBOSITY_KEYWORDS_OPT_NAME, VERBOSITY_KEYWORDS_OPT_LONG_NAME, - VOV_OPT_NAME, + VERBOSITY_OPT_NAME, VERBOSITY_KEYWORDS_OPT_NAME, VOV_OPT_NAME, add_verbosity_opts, }; use clap::error::ErrorKind as ClapErrorKind; -use commands::_prelude::clap_arg_actions::*; use VERBOSITY_OPT_NAME as V_OPT_NAME; use VERBOSITY_KEYWORDS_OPT_NAME as VKS_OPT_NAME; -#[derive(Clone)] -pub struct CommandHelp { - name: String, - help: String, - shortcut: Option, -} +// #[derive(Clone)] +// pub struct CommandHelp { +// name: String, +// help: String, +// shortcut: Option, +// } pub mod built_info { // The file has been placed there by the build script. @@ -114,7 +110,7 @@ fn main() -> Result<()> { // Use a dummy app that just accepts verbosity and keywords. Parse this until empty. let mut dummy = pre_phase_app!().no_binary_name(true); let mut reduced = args.map(|a| a.to_owned()).collect::>(); - while(true) { + loop { match dummy.try_get_matches_from_mut(reduced.clone()) { Ok(dm) => { verbosity += dm.get_one::(V_OPT_NAME).unwrap_or(&0); @@ -181,7 +177,7 @@ fn main() -> Result<()> { let mut reduced: Vec = std::env::args().skip(1).collect(); verbosity = 0; vks = vec!(); - while(true) { + loop { match dummy.try_get_matches_from_mut(reduced.clone()) { Ok(dm) => { verbosity += dm.get_one::(V_OPT_NAME).unwrap_or(&0); @@ -224,7 +220,7 @@ fn main() -> Result<()> { // The main help message is going to be automatically generated to allow us to handle and clearly // separate commands added by the app and plugins. // When a command is added below it must also be added to these vectors. - let mut origen_commands: Vec = vec![]; + // let mut origen_commands: Vec = vec![]; let mut helps = CmdHelps::new(); let app_cmds: Option; let mut extensions = Extensions::new(); @@ -265,158 +261,158 @@ fn main() -> Result<()> { /************************************************************************************/ /******************** Global only commands ******************************************/ /************************************************************************************/ - if !STATUS.is_app_present { - //************************************************************************************/ - let proj_help = "Manage multi-repository project areas and workspaces"; - origen_commands.push(CommandHelp { - name: "proj".to_string(), - help: proj_help.to_string(), - shortcut: None, - }); - - app = app - .subcommand( - Command::new("proj") - .display_order(1) - .about(proj_help) - .arg_required_else_help(true) - .subcommand(Command::new("init") - .display_order(5) - .about("Initialize a new project directory (create an initial project BOM)") - .arg(Arg::new("dir") - .action(SetArg) - .help("The path to the project directory to initialize (PWD will be used by default if not given)") - .value_name("DIR") - ) - ) - .subcommand(Command::new("packages") - .display_order(7) - .about("Displays the IDs of all packages and package groups defined by the BOM") - ) - .subcommand(Command::new("create") - .display_order(10) - .about("Create a new project workspace from the project BOM") - .arg(Arg::new("path") - .help("The path to the new workspace directory") - .action(SetArg) - .value_name("PATH") - .required(true) - ) - ) - .subcommand(Command::new("update") - .display_order(15) - .about("Update an existing project workspace per its current BOM") - .arg(Arg::new("force") - .short('f') - .long("force") - .required(false) - .action(SetArgTrue) - .help("Force the update and potentially lose any local modifications") - ) - .arg(Arg::new("links") - .short('l') - .long("links") - .required(false) - .action(SetArgTrue) - .help("Update the workspace links") - ) - .arg(Arg::new("packages") - .value_name("PACKAGES") - .action(AppendArgs) - .multiple(true) - .help("Packages and/or groups to be updated, run 'origen proj packages' to see a list of possible package IDs") - .required_unless("links") - .required(true) - ) - ) - .subcommand(Command::new("mods") - .display_order(20) - .about("Display a list of modified files within the given package(s)") - .arg(Arg::new("packages") - .help("Package(s) to look for modifications in, use 'all' to see the modification to all packages") - .action(AppendArgs) - .multiple(true) - .value_name("PACKAGES") - .required(true) - ) - ) - .subcommand(Command::new("clean") - .display_order(20) - .about("Revert all local modifications within the given package(s)") - .arg(Arg::new("packages") - .help("Package(s) to revert local modifications in, use 'all' to clean all packages") - .action(AppendArgs) - .multiple(true) - .value_name("PACKAGES") - .required(true) - ) - ) - .subcommand(Command::new("tag") - .display_order(20) - .about("Apply the given tag to the current view of the given package(s)") - .arg(Arg::new("name") - .help("Name of the tag to be applied") - .action(SetArg) - .value_name("NAME") - .required(true) - ) - .arg(Arg::new("packages") - .help("Package(s) to be tagged, use 'all' to tag all packages") - .multiple(true) - .action(AppendArgs) - .value_name("PACKAGES") - .required(true) - ) - .arg(Arg::new("force") - .short('f') - .long("force") - .required(false) - .action(SetArgTrue) - .help("Force the application of the tag even if there are local modifications") - ) - .arg(Arg::new("message") - .short('m') - .long("message") - .required(false) - .action(SetArg) - .help("A message to be applied with the tag") - ) - ) - .subcommand(Command::new("bom") - .display_order(25) - .about("View the active BOM in the current or given directory") - .arg(Arg::new("dir") - .action(SetArg) - .help("The path to a directory (PWD will be used by default if not given)") - .value_name("DIR") - ) - ) - ); - + // if !STATUS.is_app_present { //************************************************************************************/ - let new_help = "Create a new Origen application"; - origen_commands.push(CommandHelp { - name: "new".to_string(), - help: new_help.to_string(), - shortcut: None, - }); - app = app.subcommand( - Command::new("new").about(new_help).arg( - Arg::new("name") - .help("The lowercased and underscored name of the new application") - .action(SetArg) - .required(true) - .number_of_values(1) - .value_name("NAME"), - ) - .arg(Arg::new("setup") - .help("Don't create the new app's virtual environment after building (need to manually run 'origen env setup' within the new app workspace before using it in that case)") - .long("no-setup") - .required(false) - .action(SetArgTrue) - ), - ); - } + // let proj_help = "Manage multi-repository project areas and workspaces"; + // origen_commands.push(CommandHelp { + // name: "proj".to_string(), + // help: proj_help.to_string(), + // shortcut: None, + // }); + + // app = app + // .subcommand( + // Command::new("proj") + // .display_order(1) + // .about(proj_help) + // .arg_required_else_help(true) + // .subcommand(Command::new("init") + // .display_order(5) + // .about("Initialize a new project directory (create an initial project BOM)") + // .arg(Arg::new("dir") + // .action(SetArg) + // .help("The path to the project directory to initialize (PWD will be used by default if not given)") + // .value_name("DIR") + // ) + // ) + // .subcommand(Command::new("packages") + // .display_order(7) + // .about("Displays the IDs of all packages and package groups defined by the BOM") + // ) + // .subcommand(Command::new("create") + // .display_order(10) + // .about("Create a new project workspace from the project BOM") + // .arg(Arg::new("path") + // .help("The path to the new workspace directory") + // .action(SetArg) + // .value_name("PATH") + // .required(true) + // ) + // ) + // .subcommand(Command::new("update") + // .display_order(15) + // .about("Update an existing project workspace per its current BOM") + // .arg(Arg::new("force") + // .short('f') + // .long("force") + // .required(false) + // .action(SetArgTrue) + // .help("Force the update and potentially lose any local modifications") + // ) + // .arg(Arg::new("links") + // .short('l') + // .long("links") + // .required(false) + // .action(SetArgTrue) + // .help("Update the workspace links") + // ) + // .arg(Arg::new("packages") + // .value_name("PACKAGES") + // .action(AppendArgs) + // .multiple(true) + // .help("Packages and/or groups to be updated, run 'origen proj packages' to see a list of possible package IDs") + // .required_unless("links") + // .required(true) + // ) + // ) + // .subcommand(Command::new("mods") + // .display_order(20) + // .about("Display a list of modified files within the given package(s)") + // .arg(Arg::new("packages") + // .help("Package(s) to look for modifications in, use 'all' to see the modification to all packages") + // .action(AppendArgs) + // .multiple(true) + // .value_name("PACKAGES") + // .required(true) + // ) + // ) + // .subcommand(Command::new("clean") + // .display_order(20) + // .about("Revert all local modifications within the given package(s)") + // .arg(Arg::new("packages") + // .help("Package(s) to revert local modifications in, use 'all' to clean all packages") + // .action(AppendArgs) + // .multiple(true) + // .value_name("PACKAGES") + // .required(true) + // ) + // ) + // .subcommand(Command::new("tag") + // .display_order(20) + // .about("Apply the given tag to the current view of the given package(s)") + // .arg(Arg::new("name") + // .help("Name of the tag to be applied") + // .action(SetArg) + // .value_name("NAME") + // .required(true) + // ) + // .arg(Arg::new("packages") + // .help("Package(s) to be tagged, use 'all' to tag all packages") + // .multiple(true) + // .action(AppendArgs) + // .value_name("PACKAGES") + // .required(true) + // ) + // .arg(Arg::new("force") + // .short('f') + // .long("force") + // .required(false) + // .action(SetArgTrue) + // .help("Force the application of the tag even if there are local modifications") + // ) + // .arg(Arg::new("message") + // .short('m') + // .long("message") + // .required(false) + // .action(SetArg) + // .help("A message to be applied with the tag") + // ) + // ) + // .subcommand(Command::new("bom") + // .display_order(25) + // .about("View the active BOM in the current or given directory") + // .arg(Arg::new("dir") + // .action(SetArg) + // .help("The path to a directory (PWD will be used by default if not given)") + // .value_name("DIR") + // ) + // ) + // ); + + // //************************************************************************************/ + // let new_help = "Create a new Origen application"; + // origen_commands.push(CommandHelp { + // name: "new".to_string(), + // help: new_help.to_string(), + // shortcut: None, + // }); + // app = app.subcommand( + // Command::new("new").about(new_help).arg( + // Arg::new("name") + // .help("The lowercased and underscored name of the new application") + // .action(SetArg) + // .required(true) + // .number_of_values(1) + // .value_name("NAME"), + // ) + // .arg(Arg::new("setup") + // .help("Don't create the new app's virtual environment after building (need to manually run 'origen env setup' within the new app workspace before using it in that case)") + // .long("no-setup") + // .required(false) + // .action(SetArgTrue) + // ), + // ); + // } commands::plugin::add_helps(&mut helps, plugins.as_ref()); commands::plugins::add_helps(&mut helps); @@ -451,28 +447,28 @@ fn main() -> Result<()> { /************************************************************************************/ /******************** Origen dev commands *******************************************/ /************************************************************************************/ - if STATUS.is_origen_present || STATUS.is_app_present { - let fmt_help = match STATUS.is_origen_present { - true => "Nicely format all Rust and Python files", - false => "Nicely format all of your application's Python files", - }; - - origen_commands.push(CommandHelp { - name: "fmt".to_string(), - help: fmt_help.to_string(), - shortcut: None, - }); - - app = app - //************************************************************************************/ - .subcommand(Command::new("fmt").about(fmt_help)); - } - - if STATUS.is_origen_present || STATUS.is_app_in_origen_dev_mode { - let (app_, help) = commands::build::define(app); - app = app_; - origen_commands.push(help); - } + // if STATUS.is_origen_present || STATUS.is_app_present { + // let fmt_help = match STATUS.is_origen_present { + // true => "Nicely format all Rust and Python files", + // false => "Nicely format all of your application's Python files", + // }; + + // origen_commands.push(CommandHelp { + // name: "fmt".to_string(), + // help: fmt_help.to_string(), + // shortcut: None, + // }); + + // app = app + // //************************************************************************************/ + // .subcommand(Command::new("fmt").about(fmt_help)); + // } + + // if STATUS.is_origen_present || STATUS.is_app_in_origen_dev_mode { + // let (app_, help) = commands::build::define(app); + // app = app_; + // origen_commands.push(help); + // } /************************************************************************************/ /******************** In application commands ***************************************/ @@ -482,331 +478,331 @@ fn main() -> Result<()> { app = commands::env::add_commands(app, &helps, &extensions)?; app = commands::generate::add_commands(app, &helps, &extensions)?; - /************************************************************************************/ - let new_help = "Generate a new block, flow, pattern, etc. for your application"; - origen_commands.push(CommandHelp { - name: "new".to_string(), - help: new_help.to_string(), - shortcut: None, - }); - app = app.subcommand( - Command::new("new") - .about(new_help) - .arg_required_else_help(true) - .subcommand(Command::new("dut") - .display_order(5) - .about("Create a new top-level (DUT) block, see 'origen new dut -h' for more info") - .long_about( -"This generator creates a top-level (DUT) block and all of the associated resources for it, e.g. a -reg file, controller, target, timesets, pins, etc. - -The NAME of the DUT should be given in lower case, optionally prefixed by parent DUT name(s) separated -by a forward slash. - -Any parent DUT(s) will be created if they don't exist, but they will not be modified if they do. - -Examples: - origen new dut # Creates /blocks/dut/... - origen new dut falcon # Creates /blocks/dut/derivatives/falcon/... - origen new dut dsp/falcon # Creates /blocks/dut/derivatives/dsp/derivatives/falcon/...") - .arg(Arg::new("name") - .action(SetArg) - .required(false) - .help("The name of the new DUT") - .value_name("NAME") - ) - ) - .subcommand(Command::new("block") - .display_order(5) - .about("Create a new block, see 'origen new block -h' for more info") - .long_about( -"This generator creates a block (e.g. to represent RAM, ATD, Flash, DAC, etc.) and all of the associated -resources for it, e.g. a reg file, controller, timesets, etc. - -The NAME should be given in lower case (e.g. flash/flash2kb, adc/adc16), optionally with -additional parent sub-block names after the initial type. - -Alternatively, a reference to an existing BLOCK can be added, in which case a nested block will be created -within that block's 'blocks/' directory, rather than a primary top-level block. - -Any parent block(s) will be created if they don't exist, but they will not be modified if they do. - -Examples: - origen new block dac # Creates /blocks/dac/... - origen new block adc/adc8bit # Creates /blocks/adc/derivatives/adc8bit/... - origen new block adc/adc16bit # Creates /blocks/adc/derivatives/adc16bit/... - origen new block nvm/flash/flash2kb # Creates /blocks/nvm/derivatives/flash/derivatives/flash2kb/... - - # Example of creating a nested sub-block - origen new block bist --parent nvm/flash # Creates /blocks/nvm/derivatives/flash/blocks/bist/...") - .arg(Arg::new("name") - .action(SetArg) - .required(true) - .help("The name of the new block, including its parents if applicable") - .value_name("NAME") - ) - .arg( - Arg::new("parent") - .short('p') - .long("parent") - .help("Create the new block nested within this existing block") - .action(SetArg) - .required(false) - .value_name("PARENT") - ) - ) - ); - - /************************************************************************************/ - let c_help = "Compile templates"; - origen_commands.push(CommandHelp { - name: "compile".to_string(), - help: c_help.to_string(), - shortcut: Some("c".to_string()), - }); - app = app.subcommand( - Command::new("compile") - .about(c_help) - .visible_alias("c") - .arg( - Arg::new("files") - .help("The name of the file(s) to be generated") - .action(AppendArgs) - .value_name("FILES") - .multiple(true) - .required(true), - ) - .arg( - Arg::new("target") - .short('t') - .long("target") - .help("Override the default target currently set by the workspace") - .action(AppendArgs) - .use_delimiter(true) - .multiple(true) - .number_of_values(1) - .value_name("TARGET"), - ) - .arg( - Arg::new("mode") - .short('m') - .long("mode") - .help("Override the default execution mode currently set by the workspace") - .action(SetArg) - .value_name("MODE"), - ), - ); +// /************************************************************************************/ +// let new_help = "Generate a new block, flow, pattern, etc. for your application"; +// origen_commands.push(CommandHelp { +// name: "new".to_string(), +// help: new_help.to_string(), +// shortcut: None, +// }); +// app = app.subcommand( +// Command::new("new") +// .about(new_help) +// .arg_required_else_help(true) +// .subcommand(Command::new("dut") +// .display_order(5) +// .about("Create a new top-level (DUT) block, see 'origen new dut -h' for more info") +// .long_about( +// "This generator creates a top-level (DUT) block and all of the associated resources for it, e.g. a +// reg file, controller, target, timesets, pins, etc. + +// The NAME of the DUT should be given in lower case, optionally prefixed by parent DUT name(s) separated +// by a forward slash. + +// Any parent DUT(s) will be created if they don't exist, but they will not be modified if they do. + +// Examples: +// origen new dut # Creates /blocks/dut/... +// origen new dut falcon # Creates /blocks/dut/derivatives/falcon/... +// origen new dut dsp/falcon # Creates /blocks/dut/derivatives/dsp/derivatives/falcon/...") +// .arg(Arg::new("name") +// .action(SetArg) +// .required(false) +// .help("The name of the new DUT") +// .value_name("NAME") +// ) +// ) +// .subcommand(Command::new("block") +// .display_order(5) +// .about("Create a new block, see 'origen new block -h' for more info") +// .long_about( +// "This generator creates a block (e.g. to represent RAM, ATD, Flash, DAC, etc.) and all of the associated +// resources for it, e.g. a reg file, controller, timesets, etc. + +// The NAME should be given in lower case (e.g. flash/flash2kb, adc/adc16), optionally with +// additional parent sub-block names after the initial type. + +// Alternatively, a reference to an existing BLOCK can be added, in which case a nested block will be created +// within that block's 'blocks/' directory, rather than a primary top-level block. + +// Any parent block(s) will be created if they don't exist, but they will not be modified if they do. + +// Examples: +// origen new block dac # Creates /blocks/dac/... +// origen new block adc/adc8bit # Creates /blocks/adc/derivatives/adc8bit/... +// origen new block adc/adc16bit # Creates /blocks/adc/derivatives/adc16bit/... +// origen new block nvm/flash/flash2kb # Creates /blocks/nvm/derivatives/flash/derivatives/flash2kb/... + +// # Example of creating a nested sub-block +// origen new block bist --parent nvm/flash # Creates /blocks/nvm/derivatives/flash/blocks/bist/...") +// .arg(Arg::new("name") +// .action(SetArg) +// .required(true) +// .help("The name of the new block, including its parents if applicable") +// .value_name("NAME") +// ) +// .arg( +// Arg::new("parent") +// .short('p') +// .long("parent") +// .help("Create the new block nested within this existing block") +// .action(SetArg) +// .required(false) +// .value_name("PARENT") +// ) +// ) +// ); + +// /************************************************************************************/ +// let c_help = "Compile templates"; +// origen_commands.push(CommandHelp { +// name: "compile".to_string(), +// help: c_help.to_string(), +// shortcut: Some("c".to_string()), +// }); +// app = app.subcommand( +// Command::new("compile") +// .about(c_help) +// .visible_alias("c") +// .arg( +// Arg::new("files") +// .help("The name of the file(s) to be generated") +// .action(AppendArgs) +// .value_name("FILES") +// .multiple(true) +// .required(true), +// ) +// .arg( +// Arg::new("target") +// .short('t') +// .long("target") +// .help("Override the default target currently set by the workspace") +// .action(AppendArgs) +// .use_delimiter(true) +// .multiple(true) +// .number_of_values(1) +// .value_name("TARGET"), +// ) +// .arg( +// Arg::new("mode") +// .short('m') +// .long("mode") +// .help("Override the default execution mode currently set by the workspace") +// .action(SetArg) +// .value_name("MODE"), +// ), +// ); app = commands::target::add_commands(app, &helps, &extensions)?; - /************************************************************************************/ - let t_help = "Create, Build, and View Web Documentation"; - origen_commands.push(CommandHelp { - name: "web".to_string(), - help: t_help.to_string(), - shortcut: Some("w".to_string()), - }); - app = app.subcommand( - Command::new("web") - .about(t_help) - .arg_required_else_help(true) - .visible_alias("w") - .subcommand( - Command::new("build") // What I think this command should be called - .about("Builds the web documentation") - .visible_alias("b") - .visible_alias("compile") // If coming from O1 - .visible_alias("html") // If coming from Sphinx and using quickstart's Makefile - .arg( - Arg::new("view") - .long("view") - .help("Launch your web browser after the build") - .action(SetArgTrue), - ) - .arg( - Arg::new("clean") - .long("clean") - .help( - "Clean up directories from previous builds and force a rebuild", - ) - .action(SetArgTrue), - ) - .arg( - Arg::new("release") - .long("release") - .short('r') - .help("Release (deploy) the resulting web pages") - .action(SetArgTrue), - ) - .arg( - Arg::new("archive") - .long("archive") - .short('a') - .help("Archive the resulting web pages after building") - .action(SetArg) - .multiple(false) - .min_values(0), - ) - .arg( - Arg::new("as-release") - .long("as-release") - .help("Build webpages with release checks") - .action(SetArgTrue), - ) - .arg( - Arg::new("release-with-warnings") - .long("release-with-warnings") - .help("Release webpages even if warnings persists") - .action(SetArgTrue), - ) - .arg( - Arg::new("no-api") - .long("no-api") - .help("Skip building the API") - .action(SetArgTrue), - ) - .arg( - Arg::new("sphinx-args") - .long("sphinx-args") - .help( - "Additional arguments to pass to the 'sphinx-build' command - Argument will passed as a single string and appended to the build command - E.g.: 'origen web build --sphinx-args \"-q -D my_config_define=1\"' - -> 'sphinx-build -q -D my_config_define=1'", - ) - .action(SetArg) - .multiple(false) - .allow_hyphen_values(true), - ), // .arg(Arg::new("pdf") - // .long("pdf") - // .help("Create a PDF of resulting web pages") - // .action(SetArgTrue) - // ) - ) - .subcommand( - Command::new("view") - .about("Launches your web browser to view previously built documentation") - .visible_alias("v"), - ) - .subcommand( - Command::new("clean") - .about("Cleans the output directory and all cached files"), - ), - ); - - /************************************************************************************/ - let mailer_help = - "Command-line-interface to Origen's mailer for quick emailing or shell-scripting"; - origen_commands.push(CommandHelp { - name: "mailer".to_string(), - help: mailer_help.to_string(), - shortcut: None, - }); - app = app.subcommand( - Command::new("mailer") - .about(mailer_help) - .arg_required_else_help(true) - .subcommand( - Command::new("send") - .about("Quickly send an email") - .arg( - Arg::new("body") - .help("Email message body") - .long("body") - .action(SetArg) - .required(true) - .value_name("BODY") - .index(1), - ) - .arg( - Arg::new("subject") - .help("Email subject line") - .long("subject") - .short('s') - .action(SetArg) - .value_name("SUBJECT"), - ) - .arg( - Arg::new("to") - .help("Recipient list") - .long("to") - .short('t') - .action(AppendArgs) - .required(true) - .multiple(true) - .value_name("TO"), - ), - ) - .subcommand( - Command::new("test") - .about("Send a test email") - .arg( - Arg::new("to") - .help( - "Recipient list. If omitted, will be sent to the current user", - ) - .long("to") - .short('t') - .action(AppendArgs) - .required(false) - .multiple(true) - .value_name("TO"), - ), - ), - ); - - /************************************************************************************/ - let mode_help = "Set/view the default execution mode"; - origen_commands.push(CommandHelp { - name: "mode".to_string(), - help: mode_help.to_string(), - shortcut: Some("m".to_string()), - }); - app = app.subcommand( - Command::new("mode") - .about(mode_help) - .visible_alias("m") - .arg( - Arg::new("mode") - .help("The name of the mode to be set as the default mode") - .action(SetArg) - .value_name("MODE"), - ), - ); - - /************************************************************************************/ - let save_ref_help = "Save a reference version of the given file, this will be automatically checked for differences the next time it is generated"; - origen_commands.push(CommandHelp { - name: "save_ref".to_string(), - help: save_ref_help.to_string(), - shortcut: None, - }); - app = app.subcommand( - Command::new("save_ref") - .about(save_ref_help) - .arg( - Arg::new("files") - .help("The name of the file(s) to be saved") - .action(SetArg) - .value_name("FILES") - .multiple(true) - .required_unless_one(&["new", "changed"]), - ) - .arg( - Arg::new("new") - .long("new") - .required(false) - .action(SetArgTrue) - .help("Update all NEW file references from the last generate run"), - ) - .arg( - Arg::new("changed") - .long("changed") - .required(false) - .action(SetArgTrue) - .help("Update all CHANGED file references from the last generate run"), - ), - ); +// /************************************************************************************/ +// let t_help = "Create, Build, and View Web Documentation"; +// origen_commands.push(CommandHelp { +// name: "web".to_string(), +// help: t_help.to_string(), +// shortcut: Some("w".to_string()), +// }); +// app = app.subcommand( +// Command::new("web") +// .about(t_help) +// .arg_required_else_help(true) +// .visible_alias("w") +// .subcommand( +// Command::new("build") // What I think this command should be called +// .about("Builds the web documentation") +// .visible_alias("b") +// .visible_alias("compile") // If coming from O1 +// .visible_alias("html") // If coming from Sphinx and using quickstart's Makefile +// .arg( +// Arg::new("view") +// .long("view") +// .help("Launch your web browser after the build") +// .action(SetArgTrue), +// ) +// .arg( +// Arg::new("clean") +// .long("clean") +// .help( +// "Clean up directories from previous builds and force a rebuild", +// ) +// .action(SetArgTrue), +// ) +// .arg( +// Arg::new("release") +// .long("release") +// .short('r') +// .help("Release (deploy) the resulting web pages") +// .action(SetArgTrue), +// ) +// .arg( +// Arg::new("archive") +// .long("archive") +// .short('a') +// .help("Archive the resulting web pages after building") +// .action(SetArg) +// .multiple(false) +// .min_values(0), +// ) +// .arg( +// Arg::new("as-release") +// .long("as-release") +// .help("Build webpages with release checks") +// .action(SetArgTrue), +// ) +// .arg( +// Arg::new("release-with-warnings") +// .long("release-with-warnings") +// .help("Release webpages even if warnings persists") +// .action(SetArgTrue), +// ) +// .arg( +// Arg::new("no-api") +// .long("no-api") +// .help("Skip building the API") +// .action(SetArgTrue), +// ) +// .arg( +// Arg::new("sphinx-args") +// .long("sphinx-args") +// .help( +// "Additional arguments to pass to the 'sphinx-build' command +// Argument will passed as a single string and appended to the build command +// E.g.: 'origen web build --sphinx-args \"-q -D my_config_define=1\"' +// -> 'sphinx-build -q -D my_config_define=1'", +// ) +// .action(SetArg) +// .multiple(false) +// .allow_hyphen_values(true), +// ), // .arg(Arg::new("pdf") +// // .long("pdf") +// // .help("Create a PDF of resulting web pages") +// // .action(SetArgTrue) +// // ) +// ) +// .subcommand( +// Command::new("view") +// .about("Launches your web browser to view previously built documentation") +// .visible_alias("v"), +// ) +// .subcommand( +// Command::new("clean") +// .about("Cleans the output directory and all cached files"), +// ), +// ); + +// /************************************************************************************/ +// let mailer_help = +// "Command-line-interface to Origen's mailer for quick emailing or shell-scripting"; +// origen_commands.push(CommandHelp { +// name: "mailer".to_string(), +// help: mailer_help.to_string(), +// shortcut: None, +// }); +// app = app.subcommand( +// Command::new("mailer") +// .about(mailer_help) +// .arg_required_else_help(true) +// .subcommand( +// Command::new("send") +// .about("Quickly send an email") +// .arg( +// Arg::new("body") +// .help("Email message body") +// .long("body") +// .action(SetArg) +// .required(true) +// .value_name("BODY") +// .index(1), +// ) +// .arg( +// Arg::new("subject") +// .help("Email subject line") +// .long("subject") +// .short('s') +// .action(SetArg) +// .value_name("SUBJECT"), +// ) +// .arg( +// Arg::new("to") +// .help("Recipient list") +// .long("to") +// .short('t') +// .action(AppendArgs) +// .required(true) +// .multiple(true) +// .value_name("TO"), +// ), +// ) +// .subcommand( +// Command::new("test") +// .about("Send a test email") +// .arg( +// Arg::new("to") +// .help( +// "Recipient list. If omitted, will be sent to the current user", +// ) +// .long("to") +// .short('t') +// .action(AppendArgs) +// .required(false) +// .multiple(true) +// .value_name("TO"), +// ), +// ), +// ); + +// /************************************************************************************/ +// let mode_help = "Set/view the default execution mode"; +// origen_commands.push(CommandHelp { +// name: "mode".to_string(), +// help: mode_help.to_string(), +// shortcut: Some("m".to_string()), +// }); +// app = app.subcommand( +// Command::new("mode") +// .about(mode_help) +// .visible_alias("m") +// .arg( +// Arg::new("mode") +// .help("The name of the mode to be set as the default mode") +// .action(SetArg) +// .value_name("MODE"), +// ), +// ); + +// /************************************************************************************/ +// let save_ref_help = "Save a reference version of the given file, this will be automatically checked for differences the next time it is generated"; +// origen_commands.push(CommandHelp { +// name: "save_ref".to_string(), +// help: save_ref_help.to_string(), +// shortcut: None, +// }); +// app = app.subcommand( +// Command::new("save_ref") +// .about(save_ref_help) +// .arg( +// Arg::new("files") +// .help("The name of the file(s) to be saved") +// .action(SetArg) +// .value_name("FILES") +// .multiple(true) +// .required_unless_one(&["new", "changed"]), +// ) +// .arg( +// Arg::new("new") +// .long("new") +// .required(false) +// .action(SetArgTrue) +// .help("Update all NEW file references from the last generate run"), +// ) +// .arg( +// Arg::new("changed") +// .long("changed") +// .required(false) +// .action(SetArgTrue) +// .help("Update all CHANGED file references from the last generate run"), +// ), +// ); } let mut all_cmds_and_aliases = vec![]; @@ -1039,158 +1035,158 @@ Examples: match matches.subcommand_name() { Some(commands::app::BASE_CMD) => commands::app::run(matches.subcommand_matches(commands::app::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &app_cmds.as_ref().unwrap())?, - Some("fmt") => commands::fmt::run()?, - Some("new") => commands::new::run(matches.subcommand_matches("new").unwrap()), - Some("build") => commands::build::run(matches.subcommand_matches("build").unwrap())?, - Some("proj") => commands::proj::run(matches.subcommand_matches("proj").unwrap()), + // Some("fmt") => commands::fmt::run()?, + // Some("new") => commands::new::run(matches.subcommand_matches("new").unwrap()), + // Some("build") => commands::build::run(matches.subcommand_matches("build").unwrap())?, + // Some("proj") => commands::proj::run(matches.subcommand_matches("proj").unwrap()), Some(commands::env::BASE_CMD) => run_non_ext_cmd_match_case!(env), Some(commands::eval::BASE_CMD) => run_cmd_match_case!(eval), Some(commands::interactive::BASE_CMD) => run_cmd_match_case!(interactive), Some(commands::aux_cmds::BASE_CMD) => commands::aux_cmds::run(matches.subcommand_matches(commands::aux_cmds::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &aux_cmds)?, Some(commands::generate::BASE_CMD) => run_cmd_match_case!(generate), - Some("compile") => { - let m = matches.subcommand_matches("compile").unwrap(); - commands::launch( - "compile", - if let Some(targets) = m.get_many::("target") { - Some(targets.map(|t| t.as_str()).collect()) - } else { - Option::None - }, - &m.get_one::<&str>("mode").map(|s| *s), - Some(m.get_many::("files").unwrap().map(|t| t.as_str()).collect()), - m.get_one::<&str>("output_dir").map(|s| *s), - m.get_one::<&str>("reference_dir").map(|s| *s), - false, - None, - ); - } + // Some("compile") => { + // let m = matches.subcommand_matches("compile").unwrap(); + // commands::launch( + // "compile", + // if let Some(targets) = m.get_many::("target") { + // Some(targets.map(|t| t.as_str()).collect()) + // } else { + // Option::None + // }, + // &m.get_one::<&str>("mode").map(|s| *s), + // Some(m.get_many::("files").unwrap().map(|t| t.as_str()).collect()), + // m.get_one::<&str>("output_dir").map(|s| *s), + // m.get_one::<&str>("reference_dir").map(|s| *s), + // false, + // None, + // ); + // } Some(commands::target::BASE_CMD) => run_non_ext_cmd_match_case!(target), - Some("web") => { - let cmd = matches.subcommand_matches("web").unwrap(); - let subcmd = cmd.subcommand().unwrap(); - let sub = subcmd.1; - match subcmd.0 { - "build" => { - let mut args = IndexMap::new(); - if sub.contains_id("view") { - args.insert("view", "True".to_string()); - } - if sub.contains_id("clean") { - args.insert("clean", "True".to_string()); - } - if sub.contains_id("no-api") { - args.insert("no-api", "True".to_string()); - } - if sub.contains_id("as-release") { - args.insert("as-release", "True".to_string()); - } - if sub.contains_id("release-with-warnings") { - args.insert("release-with-warnings", "True".to_string()); - } - if sub.contains_id("release") { - args.insert("release", "True".to_string()); - } - if sub.contains_id("archive") { - if let Some(archive) = sub.get_one::<&str>("archive") { - args.insert("archive", format!("'{}'", archive)); - } else { - args.insert("archive", "True".to_string()); - } - } - if let Some(s_args) = sub.get_one::<&str>("sphinx-args") { - // Recall that this comes in as a single argument, potentially quoted to mimic multiple, - // but a single argument from the perspective here nonetheless - args.insert("sphinx-args", format!("'{}'", s_args)); - } - commands::launch( - "web:build", - if let Some(targets) = cmd.get_many::("target") { - Some(targets.map(|t| t.as_str()).collect()) - } else { - Option::None - }, - &None, - None, - None, - None, - false, - Some(args), - ) - } - "view" => commands::launch("web:view", None, &None, None, None, None, false, None), - "clean" => { - commands::launch("web:clean", None, &None, None, None, None, false, None) - } - _ => {} - } - } - Some("mailer") => { - let cmd = matches.subcommand_matches("mailer").unwrap(); - let subcmd = cmd.subcommand().unwrap(); - let sub = subcmd.1; - match subcmd.0 { - "send" => { - let mut args = IndexMap::new(); - if let Some(t) = sub.get_many::("to") { - let r = t.map(|x| format!("\"{}\"", x)).collect::>(); - args.insert("to", format!("[{}]", r.join(","))); - } - if let Some(s) = sub.get_one::<&str>("subject") { - args.insert("subject", format!("\"{}\"", s)); - } - if let Some(b) = sub.get_one::<&str>("body") { - args.insert("body", format!("\"{}\"", b)); - } - - commands::launch( - "mailer:send", - if let Some(targets) = cmd.get_many::("target") { - Some(targets.map(|t| t.as_str()).collect()) - } else { - Option::None - }, - &None, - None, - None, - None, - false, - Some(args), - ) - } - "test" => { - let mut args = IndexMap::new(); - if let Some(t) = sub.get_many::("to") { - let r = t.map(|x| format!("\"{}\"", x)).collect::>(); - args.insert("to", format!("[{}]", r.join(","))); - } - commands::launch( - "mailer:test", - if let Some(targets) = cmd.get_many::("target") { - Some(targets.map(|t| t.as_str()).collect()) - } else { - Option::None - }, - &None, - None, - None, - None, - false, - Some(args), - ) - } - _ => {} - } - } + // Some("web") => { + // let cmd = matches.subcommand_matches("web").unwrap(); + // let subcmd = cmd.subcommand().unwrap(); + // let sub = subcmd.1; + // match subcmd.0 { + // "build" => { + // let mut args = IndexMap::new(); + // if sub.contains_id("view") { + // args.insert("view", "True".to_string()); + // } + // if sub.contains_id("clean") { + // args.insert("clean", "True".to_string()); + // } + // if sub.contains_id("no-api") { + // args.insert("no-api", "True".to_string()); + // } + // if sub.contains_id("as-release") { + // args.insert("as-release", "True".to_string()); + // } + // if sub.contains_id("release-with-warnings") { + // args.insert("release-with-warnings", "True".to_string()); + // } + // if sub.contains_id("release") { + // args.insert("release", "True".to_string()); + // } + // if sub.contains_id("archive") { + // if let Some(archive) = sub.get_one::<&str>("archive") { + // args.insert("archive", format!("'{}'", archive)); + // } else { + // args.insert("archive", "True".to_string()); + // } + // } + // if let Some(s_args) = sub.get_one::<&str>("sphinx-args") { + // // Recall that this comes in as a single argument, potentially quoted to mimic multiple, + // // but a single argument from the perspective here nonetheless + // args.insert("sphinx-args", format!("'{}'", s_args)); + // } + // commands::launch( + // "web:build", + // if let Some(targets) = cmd.get_many::("target") { + // Some(targets.map(|t| t.as_str()).collect()) + // } else { + // Option::None + // }, + // &None, + // None, + // None, + // None, + // false, + // Some(args), + // ) + // } + // "view" => commands::launch("web:view", None, &None, None, None, None, false, None), + // "clean" => { + // commands::launch("web:clean", None, &None, None, None, None, false, None) + // } + // _ => {} + // } + // } + // Some("mailer") => { + // let cmd = matches.subcommand_matches("mailer").unwrap(); + // let subcmd = cmd.subcommand().unwrap(); + // let sub = subcmd.1; + // match subcmd.0 { + // "send" => { + // let mut args = IndexMap::new(); + // if let Some(t) = sub.get_many::("to") { + // let r = t.map(|x| format!("\"{}\"", x)).collect::>(); + // args.insert("to", format!("[{}]", r.join(","))); + // } + // if let Some(s) = sub.get_one::<&str>("subject") { + // args.insert("subject", format!("\"{}\"", s)); + // } + // if let Some(b) = sub.get_one::<&str>("body") { + // args.insert("body", format!("\"{}\"", b)); + // } + + // commands::launch( + // "mailer:send", + // if let Some(targets) = cmd.get_many::("target") { + // Some(targets.map(|t| t.as_str()).collect()) + // } else { + // Option::None + // }, + // &None, + // None, + // None, + // None, + // false, + // Some(args), + // ) + // } + // "test" => { + // let mut args = IndexMap::new(); + // if let Some(t) = sub.get_many::("to") { + // let r = t.map(|x| format!("\"{}\"", x)).collect::>(); + // args.insert("to", format!("[{}]", r.join(","))); + // } + // commands::launch( + // "mailer:test", + // if let Some(targets) = cmd.get_many::("target") { + // Some(targets.map(|t| t.as_str()).collect()) + // } else { + // Option::None + // }, + // &None, + // None, + // None, + // None, + // false, + // Some(args), + // ) + // } + // _ => {} + // } + // } Some(commands::credentials::BASE_CMD) => run_cmd_match_case!(credentials), - Some("mode") => { - let matches = matches.subcommand_matches("mode").unwrap(); - commands::mode::run(matches.get_one::<&str>("mode").map(|s| *s)); - } - Some("save_ref") => { - let matches = matches.subcommand_matches("save_ref").unwrap(); - commands::save_ref::run(matches); - } + // Some("mode") => { + // let matches = matches.subcommand_matches("mode").unwrap(); + // commands::mode::run(matches.get_one::<&str>("mode").map(|s| *s)); + // } + // Some("save_ref") => { + // let matches = matches.subcommand_matches("save_ref").unwrap(); + // commands::save_ref::run(matches); + // } Some(commands::plugin::BASE_CMD) => run_cmd_match_case!(plugin), Some(commands::plugins::BASE_CMD) => commands::plugins::run(matches.subcommand_matches(commands::plugins::BASE_CMD).unwrap(), plugins.as_ref())?, Some(invalid_cmd) => { diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index 1b39a522..b1665c42 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -2,7 +2,6 @@ pub mod clap_arg_actions; pub use clap::{App, AppSettings, Arg, Command}; pub use origen::Result; -pub use super::super::CommandHelp; pub use indexmap::IndexMap; pub use super::{launch, launch_simple, launch_as}; pub use crate::framework::{ diff --git a/rust/origen/cli/src/commands/aux_cmds.rs b/rust/origen/cli/src/commands/aux_cmds.rs index 920ae1f2..63e88748 100644 --- a/rust/origen/cli/src/commands/aux_cmds.rs +++ b/rust/origen/cli/src/commands/aux_cmds.rs @@ -3,7 +3,6 @@ use crate::framework::{AuxCmds, build_path}; use crate::framework::aux_cmds::{add_aux_ns_subcmds, add_aux_ns_helps}; use indexmap::IndexMap; use super::_prelude::*; -use crate::framework::helps::NOT_EXTENDABLE_MSG; pub const BASE_CMD: &'static str = "auxillary_commands"; diff --git a/rust/origen/cli/src/commands/env.rs b/rust/origen/cli/src/commands/env.rs index 5eec3768..bb9c936f 100644 --- a/rust/origen/cli/src/commands/env.rs +++ b/rust/origen/cli/src/commands/env.rs @@ -4,7 +4,6 @@ use super::_prelude::*; extern crate time; use crate::python::{poetry_version, MIN_PYTHON_VERSION, PYTHON_CONFIG}; -use clap::ArgMatches; use online::online; use origen::core::status::search_for; use origen::core::term::*; diff --git a/rust/origen/cli/src/commands/exec.rs b/rust/origen/cli/src/commands/exec.rs index d6109223..9f938a24 100644 --- a/rust/origen/cli/src/commands/exec.rs +++ b/rust/origen/cli/src/commands/exec.rs @@ -1,6 +1,5 @@ use crate::python::{add_origen_env, PYTHON_CONFIG}; use super::_prelude::*; -use std::process::exit; use std::borrow::Cow; pub const BASE_CMD: &'static str = "exec"; diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index e3233747..18d32e1e 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -1,14 +1,14 @@ // FOR_PR clean up, specifically launch stuff pub mod app; -pub mod build; +// pub mod build; pub mod env; pub mod exec; -pub mod fmt; +// pub mod fmt; pub mod interactive; -pub mod mode; -pub mod new; -pub mod proj; -pub mod save_ref; +// pub mod mode; +// pub mod new; +// pub mod proj; +// pub mod save_ref; pub mod target; // pub mod mailer; pub mod credentials; @@ -179,8 +179,7 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation continue; } else if arg_n == "mode" { // FOR_PR - todo!(); - continue; + todo!("Mode argument is not currently supported!"); } let arg_str: String; diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index 476fb075..006ae41b 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -1,5 +1,5 @@ use origen::{Result, ORIGEN_CONFIG}; -use crate::{python, CommandHelp}; +use crate::python; use std::path::PathBuf; use indexmap::IndexMap; use std::fs; @@ -162,18 +162,6 @@ impl Plugin { Ok(slf) } - pub fn command_helps(&self) -> Vec { - let mut helps = vec!(); - for (_, cmd) in self.commands.iter() { - helps.push(CommandHelp { - name: cmd.name.clone(), - help: cmd.help.clone(), - shortcut: cmd.alias.clone(), - }); - } - helps - } - pub fn dispatch(&self, cmd: &clap::ArgMatches, mut app: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>) -> Result<()> { if cmd.subcommand().is_some() { let path = build_path(&cmd)?; diff --git a/test_apps/python_app/tests/cli/core_cmds/generate.py b/test_apps/python_app/tests/cli/core_cmds/generate.py index 3d8930d3..fc2b930f 100644 --- a/test_apps/python_app/tests/cli/core_cmds/generate.py +++ b/test_apps/python_app/tests/cli/core_cmds/generate.py @@ -21,9 +21,7 @@ def test_help_msg(self, cmd, cached_help): def test_error_on_no_args(self, cmd): out = cmd.gen_error() - print(out) exp = self.err_msgs.missing_required_arg(cmd.files) - print(exp) assert exp in out def test_generate_pattern(self, cmd): From 8615871600892fa7f4df86d8f11c7d30b4b220b7 Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 19 May 2023 17:12:13 -0500 Subject: [PATCH 035/200] Refactor build/fmt as develop_origen subcmds. Update regressions accordingly. --- .github/workflows/regression_test.yml | 4 +- .../origen/helpers/regressions/cli/origen.py | 2 - rust/origen/cli/src/bin.rs | 32 ++----- rust/origen/cli/src/commands/_prelude/mod.rs | 3 +- .../commands/{ => develop_origen}/build.rs | 85 ++++++++----------- .../src/commands/{ => develop_origen}/fmt.rs | 13 ++- .../cli/src/commands/develop_origen/mod.rs | 25 ++++++ rust/origen/cli/src/commands/mod.rs | 2 +- .../cli/__init__.py | 19 +++++ 9 files changed, 103 insertions(+), 82 deletions(-) rename rust/origen/cli/src/commands/{ => develop_origen}/build.rs (90%) rename rust/origen/cli/src/commands/{ => develop_origen}/fmt.rs (88%) create mode 100644 rust/origen/cli/src/commands/develop_origen/mod.rs diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 5fb88578..2b174595 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -58,7 +58,7 @@ jobs: run: origen -v - name: Build PyAPI - run: origen build + run: origen origen build - name: Setup App Env working-directory: test_apps/python_app @@ -119,7 +119,7 @@ jobs: run: cargo test --workspace - name: Build PyAPI - Metal - run: origen build --metal + run: origen origen build --metal - name: Install Poetry uses: abatilo/actions-poetry@v2.0.0 diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index e1c60307..d2c65ae4 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -334,8 +334,6 @@ def targets_arg(cls, help): extendable=False, ) aux_cmds = _CommonNames.aux_cmds_cmd() - # build = Cmd(names.build) - # compile = Cmd(names.compile) creds = _CommonNames.creds_cmd(add_opts=in_app_opts.all()) env = Cmd( names.env, diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index 102e25f2..3c911307 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -429,6 +429,10 @@ fn main() -> Result<()> { commands::target::add_helps(&mut helps); } + if STATUS.is_origen_present { + commands::develop_origen::add_helps(&mut helps); + } + helps.apply_exts(&extensions); /************************************************************************************/ @@ -447,28 +451,9 @@ fn main() -> Result<()> { /************************************************************************************/ /******************** Origen dev commands *******************************************/ /************************************************************************************/ - // if STATUS.is_origen_present || STATUS.is_app_present { - // let fmt_help = match STATUS.is_origen_present { - // true => "Nicely format all Rust and Python files", - // false => "Nicely format all of your application's Python files", - // }; - - // origen_commands.push(CommandHelp { - // name: "fmt".to_string(), - // help: fmt_help.to_string(), - // shortcut: None, - // }); - - // app = app - // //************************************************************************************/ - // .subcommand(Command::new("fmt").about(fmt_help)); - // } - - // if STATUS.is_origen_present || STATUS.is_app_in_origen_dev_mode { - // let (app_, help) = commands::build::define(app); - // app = app_; - // origen_commands.push(help); - // } + if STATUS.is_origen_present { + app = commands::develop_origen::add_commands(app, &helps, &extensions)?; + } /************************************************************************************/ /******************** In application commands ***************************************/ @@ -1035,12 +1020,11 @@ fn main() -> Result<()> { match matches.subcommand_name() { Some(commands::app::BASE_CMD) => commands::app::run(matches.subcommand_matches(commands::app::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &app_cmds.as_ref().unwrap())?, - // Some("fmt") => commands::fmt::run()?, // Some("new") => commands::new::run(matches.subcommand_matches("new").unwrap()), - // Some("build") => commands::build::run(matches.subcommand_matches("build").unwrap())?, // Some("proj") => commands::proj::run(matches.subcommand_matches("proj").unwrap()), Some(commands::env::BASE_CMD) => run_non_ext_cmd_match_case!(env), Some(commands::eval::BASE_CMD) => run_cmd_match_case!(eval), + Some(commands::develop_origen::BASE_CMD) => run_non_ext_cmd_match_case!(develop_origen), Some(commands::interactive::BASE_CMD) => run_cmd_match_case!(interactive), Some(commands::aux_cmds::BASE_CMD) => commands::aux_cmds::run(matches.subcommand_matches(commands::aux_cmds::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &aux_cmds)?, Some(commands::generate::BASE_CMD) => run_cmd_match_case!(generate), diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index b1665c42..24640d9f 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -6,8 +6,9 @@ pub use indexmap::IndexMap; pub use super::{launch, launch_simple, launch_as}; pub use crate::framework::{ Extensions, Plugins, add_verbosity_opts, - CmdHelps, CmdHelp, CmdSrc + CmdHelps, CmdHelp, CmdSrc, }; +pub use crate::framework::core_cmds::SubCmd; pub use crate::{output_dir_opt, ref_dir_opt}; // FOR_PR remove this diff --git a/rust/origen/cli/src/commands/build.rs b/rust/origen/cli/src/commands/develop_origen/build.rs similarity index 90% rename from rust/origen/cli/src/commands/build.rs rename to rust/origen/cli/src/commands/develop_origen/build.rs index 997da43a..07961e15 100644 --- a/rust/origen/cli/src/commands/build.rs +++ b/rust/origen/cli/src/commands/develop_origen/build.rs @@ -1,6 +1,4 @@ -use crate::CommandHelp; use clap::{App, Arg, ArgMatches}; -use clap::Command as ClapCommand; use origen::core::file_handler::File; use origen::utility::version::Version; use origen::{Result, STATUS}; @@ -10,31 +8,28 @@ use regex::Regex; use sha2::{Digest, Sha256}; use std::path::Path; use std::process::Command; -use super::_prelude::clap_arg_actions::*; - -pub fn define<'a>(app: App<'a>) -> (App<'a>, CommandHelp) { - let help = match STATUS.is_origen_present { - true => "Build and publish Origen, builds the pyapi Rust package by default", - false => "Build Origen", - }; - - let mut cmd = ClapCommand::new("build").about(help).arg( - Arg::new("cli") - .long("cli") - .required(false) - .action(SetArgTrue) - .display_order(1) - .help("Build the CLI (instead of the Python API)"), - ); - - if STATUS.is_origen_present { - cmd = cmd + +use crate::commands::_prelude::*; +pub const BASE_CMD: &'static str = "build"; + +pub (crate) fn build_cmd<'a>() -> SubCmd<'a> { + core_subcmd__no_exts__no_app_opts!( + BASE_CMD, + "Build and publish Origen, builds the pyapi Rust package by default", + { |mut cmd: App| { + cmd.visible_alias("b") + .arg( + Arg::new("cli") + .long("cli") + .required(false) + .action(SetArgTrue) + .help("Build the CLI (instead of the Python API)"), + ) .arg( Arg::new("release") .long("release") .required(false) .action(SetArgTrue) - .display_order(1) .help("Build a release version (applied by default with --publish and only applicable to Rust builds)"), ) .arg( @@ -42,7 +37,6 @@ pub fn define<'a>(app: App<'a>) -> (App<'a>, CommandHelp) { .long("target") .required(false) .action(SetArg) - .display_order(1) .help("The Rust h/ware target (passed directly to Cargo build)"), ) .arg( @@ -50,7 +44,6 @@ pub fn define<'a>(app: App<'a>) -> (App<'a>, CommandHelp) { .long("publish") .required(false) .action(SetArgTrue) - .display_order(1) .help("Publish packages (e.g. to PyPI) after building"), ) .arg( @@ -58,7 +51,6 @@ pub fn define<'a>(app: App<'a>) -> (App<'a>, CommandHelp) { .long("dry-run") .required(false) .action(SetArgTrue) - .display_order(1) .help("Use with --publish to perform a full dry run of the publishable build without actually publishing it"), ) .arg( @@ -67,29 +59,20 @@ pub fn define<'a>(app: App<'a>) -> (App<'a>, CommandHelp) { .required(false) .action(SetArg) .value_name("VERSION") - .display_order(1) .help("Set the version (of all components) to the given value"), ) .arg( Arg::new("metal") .long("metal") .action(SetArgTrue) - .display_order(1) .help("Build the metal_pyapi"), - ); - } - - let help = CommandHelp { - name: "build".to_string(), - help: help.to_string(), - shortcut: None, - }; - - (app.subcommand(cmd), help) + ) + }} + ) } -pub fn run(matches: &ArgMatches) -> Result<()> { - if let Some(v) = matches.get_one::<&str>("version") { +pub(crate) fn run(mut invocation: &clap::ArgMatches) -> Result<()> { + if let Some(v) = invocation.get_one::<&str>("version") { let mut version_bad = false; let version; match Version::new_semver(v) { @@ -150,7 +133,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { // Build the latest CLI, this can be requested from an Origen workspace or an app workspace that is // locally referencing an Origen workspace - if *matches.get_one("cli").unwrap() { + if *invocation.get_one("cli").unwrap() { cd(&STATUS .origen_wksp_root .join("rust") @@ -158,7 +141,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { .join("cli"))?; display!(""); let mut args = vec!["build"]; - if *matches.get_one("release").unwrap() || *matches.get_one("publish").unwrap() { + if *invocation.get_one("release").unwrap() || *invocation.get_one("publish").unwrap() { args.push("--release"); } Command::new("cargo") @@ -168,13 +151,13 @@ pub fn run(matches: &ArgMatches) -> Result<()> { display!(""); // Build the metal_pyapi - } else if *matches.get_one("metal").unwrap() { - build_metal(matches)?; + } else if *invocation.get_one("metal").unwrap() { + build_metal(invocation)?; // Build the PyAPI by default } else { // A publish build will also build the origen_pyapi Python package and // publish it to PyPI, only available within an Origen workspace - if *matches.get_one("publish").unwrap() { + if *invocation.get_one("publish").unwrap() { let wheel_dir = &STATUS .origen_wksp_root .join("rust") @@ -214,7 +197,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { change_pyapi_wheel_version(&wheel_dir, &old, &new); } - if *matches.get_one("publish").unwrap() && !matches.get_one::("dry_run").unwrap() { + if *invocation.get_one("publish").unwrap() && !invocation.get_one::("dry_run").unwrap() { let pypi_token = std::env::var("ORIGEN_PYPI_TOKEN").expect("ORIGEN_PYPI_TOKEN is not defined"); @@ -239,7 +222,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { // A standard (non-published) build, this can be requested from an Origen workspace or an app workspace that // is locally referencing an Origen workspace } else { - build_metal(matches)?; + build_metal(invocation)?; let pyapi_dir = STATUS.origen_wksp_root.join("rust").join("pyapi"); cd(&pyapi_dir)?; display!(""); @@ -248,11 +231,11 @@ pub fn run(matches: &ArgMatches) -> Result<()> { let mut target = "debug"; let mut arch_target = None; - if *matches.get_one("release").unwrap() { + if *invocation.get_one("release").unwrap() { args.push("--release"); target = "release"; } - if let Some(t) = matches.get_one::<&str>("target") { + if let Some(t) = invocation.get_one::<&str>("target") { args.push("--target"); args.push(t); arch_target = Some(t); @@ -313,7 +296,7 @@ pub fn run(matches: &ArgMatches) -> Result<()> { Ok(()) } -fn build_metal(matches: &ArgMatches) -> Result<()> { +fn build_metal(invocation: &ArgMatches) -> Result<()> { let pyapi_dir = &STATUS.origen_wksp_root.join("rust").join("pyapi_metal"); cd(&pyapi_dir)?; @@ -321,11 +304,11 @@ fn build_metal(matches: &ArgMatches) -> Result<()> { let mut target = "debug"; let mut arch_target = None; - if *matches.get_one("release").unwrap() { + if *invocation.get_one("release").unwrap() { args.push("--release"); target = "release"; } - if let Some(t) = matches.get_one::<&str>("target") { + if let Some(t) = invocation.get_one::<&str>("target") { args.push("--target"); args.push(t); arch_target = Some(t); diff --git a/rust/origen/cli/src/commands/fmt.rs b/rust/origen/cli/src/commands/develop_origen/fmt.rs similarity index 88% rename from rust/origen/cli/src/commands/fmt.rs rename to rust/origen/cli/src/commands/develop_origen/fmt.rs index 76ed21b5..05716a4d 100644 --- a/rust/origen/cli/src/commands/fmt.rs +++ b/rust/origen/cli/src/commands/develop_origen/fmt.rs @@ -9,7 +9,18 @@ use std::io::Write; use std::path::Path; use std::process::Command; -pub fn run() -> Result<()> { +use crate::commands::_prelude::*; +pub const BASE_CMD: &'static str = "fmt"; + +pub (crate) fn fmt_cmd<'a>() -> SubCmd<'a> { + core_subcmd__no_exts__no_app_opts!( + BASE_CMD, + "Nicely format all Rust and Python files", + { |cmd| { cmd } } + ) +} + +pub(crate) fn run() -> Result<()> { let orig_dir = env::current_dir().expect("Couldn't read the PWD"); if STATUS.is_origen_present { diff --git a/rust/origen/cli/src/commands/develop_origen/mod.rs b/rust/origen/cli/src/commands/develop_origen/mod.rs new file mode 100644 index 00000000..8e12ef98 --- /dev/null +++ b/rust/origen/cli/src/commands/develop_origen/mod.rs @@ -0,0 +1,25 @@ +mod build; +mod fmt; + +use origen::Result; +use super::_prelude::*; +pub const BASE_CMD: &'static str = "develop_origen"; + +gen_core_cmd_funcs__no_exts__no_app_opts!( + BASE_CMD, + "Commands to assist with Origen core development", + { |cmd: App<'a>| { + cmd.arg_required_else_help(true).visible_alias("origen") + }}, + build::build_cmd(), + fmt::fmt_cmd() +); + +pub(crate) fn run(mut invocation: &clap::ArgMatches) -> Result<()> { + let (n, subcmd) = invocation.subcommand().unwrap(); + match n { + build::BASE_CMD => build::run(subcmd), + fmt::BASE_CMD => fmt::run(), + _ => unreachable_invalid_subc!(n) + } +} \ No newline at end of file diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 18d32e1e..c7e646b5 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -1,6 +1,5 @@ // FOR_PR clean up, specifically launch stuff pub mod app; -// pub mod build; pub mod env; pub mod exec; // pub mod fmt; @@ -12,6 +11,7 @@ pub mod interactive; pub mod target; // pub mod mailer; pub mod credentials; +pub mod develop_origen; pub mod generate; pub mod eval; pub mod aux_cmds; diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index 5b338a6e..d9375d3b 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -10,6 +10,25 @@ from .asertions import AssertionHelpers +develop_origen = "develop_origen" +def develop_origen_cmd(): + return Cmd( + develop_origen, + help="Commands to assist with Origen core development", + aliases=["origen"], + subcmds=[ + Cmd("build"), + ] + ) + +cli.GlobalCommands.Names.develop_origen = develop_origen +cli.GlobalCommands.develop_origen = develop_origen_cmd() +cli.GlobalCommands.commands.insert(2, cli.GlobalCommands.develop_origen) + +cli.InAppCommands.Names.develop_origen = develop_origen +cli.InAppCommands.develop_origen = develop_origen_cmd() +cli.InAppCommands.commands.insert(4, cli.InAppCommands.develop_origen) + def apply_ext_output_args(mod): from origen.boot import before_cmd, after_cmd, clean_up from .ext_helpers import do_action From 617e11424af845cc6455e76d92b19c996b5eb1c8 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 20 May 2023 17:12:43 -0500 Subject: [PATCH 036/200] Clean up last of CLI warnings. Remove app commands that haven't been tried --- .../origen/helpers/regressions/cli/origen.py | 48 +-- rust/origen/cli/src/bin.rs | 8 +- rust/origen/cli/src/commands/_prelude/mod.rs | 2 +- rust/origen/cli/src/commands/app.rs | 340 +++++++++--------- rust/origen/cli/src/commands/aux_cmds.rs | 6 +- .../cli/src/commands/develop_origen/build.rs | 4 +- .../cli/src/commands/develop_origen/mod.rs | 2 +- rust/origen/cli/src/commands/env.rs | 2 +- rust/origen/cli/src/commands/exec.rs | 6 +- rust/origen/cli/src/commands/mod.rs | 119 +----- rust/origen/cli/src/commands/plugin.rs | 2 +- rust/origen/cli/src/commands/target.rs | 2 +- rust/origen/cli/src/framework/aux_cmds.rs | 3 +- rust/origen/cli/src/framework/core_cmds.rs | 4 +- rust/origen/cli/src/framework/extensions.rs | 4 - rust/origen/cli/src/framework/helps.rs | 12 - rust/origen/cli/src/framework/mod.rs | 4 +- rust/origen/cli/src/framework/plugins.rs | 4 +- .../cli/__init__.py | 1 + 19 files changed, 226 insertions(+), 347 deletions(-) diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index d2c65ae4..bf087761 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -300,35 +300,35 @@ def targets_arg(cls, help): names.app, help="Manage and interface with the application", subcmds=[ - Cmd( - "checkin", - help="Check in the given pathspecs", - ), + # Cmd( + # "checkin", + # help="Check in the given pathspecs", + # ), Cmd( "commands", help="Interface with commands added by the application", aliases=["cmds"], ), - Cmd( - "init", - help="Initialize the application's revision control", - ), - Cmd( - "package", - help="Build the app into publishable package (e.g., a 'python wheel')", - ), - Cmd( - "publish", - help="Publish (release) the app", - ), - Cmd( - "run_publish_checks", - help="Run production-ready and publish-ready checks", - ), - Cmd( - "status", - help="Show any local changes", - ), + # Cmd( + # "init", + # help="Initialize the application's revision control", + # ), + # Cmd( + # "package", + # help="Build the app into publishable package (e.g., a 'python wheel')", + # ), + # Cmd( + # "publish", + # help="Publish (release) the app", + # ), + # Cmd( + # "run_publish_checks", + # help="Run production-ready and publish-ready checks", + # ), + # Cmd( + # "status", + # help="Show any local changes", + # ), ], help_subc_idx=2, extendable=False, diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index 3c911307..fa97994a 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -102,7 +102,7 @@ fn main() -> Result<()> { }, // "External subcommand" received, which in this case is either a non-pre-prephase or invalid command. // Either way, let the main flow handle it. - Some((ext, ext_args)) => { + Some((_ext, ext_args)) => { // Args under "" are external subcommand args match ext_args.get_many::("") { Some(args) => { @@ -121,7 +121,7 @@ fn main() -> Result<()> { }; match dm.subcommand() { - Some((ext, dm_args)) => { + Some((_ext, dm_args)) => { match dm_args.get_many::("") { Some(dm_args) => { reduced = dm_args.map(|a| a.to_owned()).collect::>(); @@ -170,7 +170,7 @@ fn main() -> Result<()> { } origen_init!(); }, - Err(e) => { + Err(_e) => { // Any mis-use of pre-phase commands or unknown args/subcommands will be handled by the full app. // Fallback to manually discerning the verbosity/keywords for the main phase let mut dummy = pre_phase_app!().no_binary_name(true); @@ -188,7 +188,7 @@ fn main() -> Result<()> { }; match dm.subcommand() { - Some((ext, dm_args)) => { + Some((_ext, dm_args)) => { match dm_args.get_many::("") { Some(dm_args) => { reduced = dm_args.map(|a| a.to_owned()).collect::>(); diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index 24640d9f..4ccf9af8 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -3,7 +3,7 @@ pub mod clap_arg_actions; pub use clap::{App, AppSettings, Arg, Command}; pub use origen::Result; pub use indexmap::IndexMap; -pub use super::{launch, launch_simple, launch_as}; +pub use super::launch_as; pub use crate::framework::{ Extensions, Plugins, add_verbosity_opts, CmdHelps, CmdHelp, CmdSrc, diff --git a/rust/origen/cli/src/commands/app.rs b/rust/origen/cli/src/commands/app.rs index f900f64a..a26cfb9f 100644 --- a/rust/origen/cli/src/commands/app.rs +++ b/rust/origen/cli/src/commands/app.rs @@ -1,4 +1,4 @@ -use clap::{ArgMatches, Command}; +use clap::ArgMatches; use indexmap::IndexMap; use crate::framework::AppCmds; use crate::commands::_prelude::*; @@ -14,186 +14,186 @@ pub (crate) fn add_helps(helps: &mut CmdHelps, app_cmds: &AppCmds) { pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, app_cmds: &'a AppCmds, exts: &'a Extensions, ) -> Result> { let mut app_subc = helps.core_cmd(BASE_CMD) - .arg_required_else_help(true) - .subcommand( - Command::new("init") - .about("Initialize the application's revision control") - ) - .subcommand( - Command::new("status") - .about("Show any local changes") - .arg(Arg::new("modified") - .long("modified") - .action(SetArgTrue) - .help("Show tracked, modified files") - ) - .arg(Arg::new("untracked") - .long("untracked") - .action(SetArgTrue) - .help("Show untracked files") - ) - ) - .subcommand( - Command::new("checkin") - .about("Check in the given pathspecs") - .arg(Arg::new("pathspecs") - .help("The paths to be checked in") - .action(AppendArgs) - .value_name("PATHSPECS") - .multiple(true) - ) - .arg(Arg::new("all") - .long("all") - .short('a') - .action(SetArgTrue) - .conflicts_with("pathspecs") - .help("Check in all changes in the workspace") - ) - .arg(Arg::new("dry-run") - .long("dry-run") - .action(SetArgTrue) - .conflicts_with("pathspecs") - .help("Perform a dry-run only") - ) - .arg(Arg::new("message") - .long("message") - .short('m') - .action(SetArg) - .required(true) - .help("Message to provide with the check-in operation") - ) - ) - .subcommand( - Command::new("package") - .about("Build the app into publishable package (e.g., a 'python wheel')"), - ) - .subcommand(Command::new("run_publish_checks") - .about("Run production-ready and publish-ready checks") - ) - .subcommand(Command::new("publish") - .about("Publish (release) the app") - .arg(Arg::new("dry-run") - .long("dry-run") - .action(SetArgTrue) - .help("Runs through the entire process except the uploading and mailer steps") - ) - .arg(Arg::new("version") - .long("version") - .action(SetArg) - .value_name("VERSION") - .help("Publish with the given version increment") - ) - .arg(Arg::new("release-note") - .long("release-note") - .action(SetArg) - .value_name("NOTE") - .help("Publish with the given release note") - ) - .arg(Arg::new("release-title") - .long("release-title") - .action(SetArg) - .value_name("TITLE") - .help("Publish with the given release title") - ) - .arg(Arg::new("no-release-title") - .long("no-release-title") - .action(SetArgTrue) - .help("Indicate no release title will be provided") - .conflicts_with("release-title") - ) - ); + .arg_required_else_help(true); + // .subcommand( + // Command::new("init") + // .about("Initialize the application's revision control") + // ) + // .subcommand( + // Command::new("status") + // .about("Show any local changes") + // .arg(Arg::new("modified") + // .long("modified") + // .action(SetArgTrue) + // .help("Show tracked, modified files") + // ) + // .arg(Arg::new("untracked") + // .long("untracked") + // .action(SetArgTrue) + // .help("Show untracked files") + // ) + // ) + // .subcommand( + // Command::new("checkin") + // .about("Check in the given pathspecs") + // .arg(Arg::new("pathspecs") + // .help("The paths to be checked in") + // .action(AppendArgs) + // .value_name("PATHSPECS") + // .multiple(true) + // ) + // .arg(Arg::new("all") + // .long("all") + // .short('a') + // .action(SetArgTrue) + // .conflicts_with("pathspecs") + // .help("Check in all changes in the workspace") + // ) + // .arg(Arg::new("dry-run") + // .long("dry-run") + // .action(SetArgTrue) + // .conflicts_with("pathspecs") + // .help("Perform a dry-run only") + // ) + // .arg(Arg::new("message") + // .long("message") + // .short('m') + // .action(SetArg) + // .required(true) + // .help("Message to provide with the check-in operation") + // ) + // ) + // .subcommand( + // Command::new("package") + // .about("Build the app into publishable package (e.g., a 'python wheel')"), + // ) + // .subcommand(Command::new("run_publish_checks") + // .about("Run production-ready and publish-ready checks") + // ) + // .subcommand(Command::new("publish") + // .about("Publish (release) the app") + // .arg(Arg::new("dry-run") + // .long("dry-run") + // .action(SetArgTrue) + // .help("Runs through the entire process except the uploading and mailer steps") + // ) + // .arg(Arg::new("version") + // .long("version") + // .action(SetArg) + // .value_name("VERSION") + // .help("Publish with the given version increment") + // ) + // .arg(Arg::new("release-note") + // .long("release-note") + // .action(SetArg) + // .value_name("NOTE") + // .help("Publish with the given release note") + // ) + // .arg(Arg::new("release-title") + // .long("release-title") + // .action(SetArg) + // .value_name("TITLE") + // .help("Publish with the given release title") + // ) + // .arg(Arg::new("no-release-title") + // .long("no-release-title") + // .action(SetArgTrue) + // .help("Indicate no release title will be provided") + // .conflicts_with("release-title") + // ) + // ); app_subc = add_app_user_commands(app_subc, helps, app_cmds, exts)?; Ok(app.subcommand(app_subc)) } -fn _run(cmd: &str, proc_cmd: &ArgMatches, args: Option>) -> Result<()>{ - super::launch( - cmd, - if let Some(targets) = proc_cmd.get_many::("target") { - Some(targets.map(|t| t.as_str()).collect()) - } else { - Option::None - }, - &None, - None, - None, - None, - false, - args, - ); - Ok(()) -} +// fn _run(cmd: &str, proc_cmd: &ArgMatches, args: Option>) -> Result<()>{ +// super::launch( +// cmd, +// if let Some(targets) = proc_cmd.get_many::("target") { +// Some(targets.map(|t| t.as_str()).collect()) +// } else { +// Option::None +// }, +// &None, +// None, +// None, +// None, +// false, +// args, +// ); +// Ok(()) +// } -pub(crate) fn run(cmd: &ArgMatches, mut app: &App, exts: &Extensions, plugins: Option<&Plugins>, app_cmds: &AppCmds) -> origen::Result<()> { - let subcmd = cmd.subcommand().unwrap(); +pub(crate) fn run(invocation: &ArgMatches, mut app: &App, exts: &Extensions, plugins: Option<&Plugins>, app_cmds: &AppCmds) -> origen::Result<()> { + let subcmd = invocation.subcommand().unwrap(); let sub = subcmd.1; match subcmd.0 { - "init" => { - _run("app:init", sub, None) - } - "status" => { - let mut args = IndexMap::new(); - if sub.contains_id("modified") { - args.insert("modified", "True".to_string()); - } - if sub.contains_id("untracked") { - args.insert("untracked", "True".to_string()); - } - _run("app:status", sub, Some(args)) - } - "checkin" => { - let mut args = IndexMap::new(); - if sub.contains_id("all") { - args.insert("all", "True".to_string()); - } - if sub.contains_id("dry-run") { - args.insert("dry-run", "True".to_string()); - } - if let Some(pathspecs) = sub.get_many::("pathspecs") { - let p = pathspecs - .map(|ps| format!("\"{}\"", ps)) - .collect::>(); - args.insert("pathspecs", format!("[{}]", p.join(","))); - } - args.insert( - "msg", - format!("\"{}\"", sub.get_one::("message").unwrap()), - ); - _run("app:checkin", sub, Some(args)) - } - "package" => { - _run("app:package", sub, None) - } - "publish" => { - let mut args = IndexMap::new(); - if sub.contains_id("dry-run") { - args.insert("dry-run", "True".to_string()); - } - if let Some(v) = sub.get_one::<&str>("version") { - args.insert("version", format!("\"{}\"", v.to_string())); - } - if let Some(r) = sub.get_one::<&str>("release-note") { - args.insert("release-note", format!("\"{}\"", r.to_string())); - } - if let Some(t) = sub.get_one::<&str>("release-title") { - args.insert("release-title", format!("\"{}\"", t.to_string())); - } - if sub.contains_id("no-release-title") { - args.insert("no-release-title", "True".to_string()); - } - _run("app:publish", sub, Some(args)) - } - "run_publish_checks" => { - _run("app:run_publish_checks", sub, None) - } + // "init" => { + // _run("app:init", sub, None) + // } + // "status" => { + // let mut args = IndexMap::new(); + // if sub.contains_id("modified") { + // args.insert("modified", "True".to_string()); + // } + // if sub.contains_id("untracked") { + // args.insert("untracked", "True".to_string()); + // } + // _run("app:status", sub, Some(args)) + // } + // "checkin" => { + // let mut args = IndexMap::new(); + // if sub.contains_id("all") { + // args.insert("all", "True".to_string()); + // } + // if sub.contains_id("dry-run") { + // args.insert("dry-run", "True".to_string()); + // } + // if let Some(pathspecs) = sub.get_many::("pathspecs") { + // let p = pathspecs + // .map(|ps| format!("\"{}\"", ps)) + // .collect::>(); + // args.insert("pathspecs", format!("[{}]", p.join(","))); + // } + // args.insert( + // "msg", + // format!("\"{}\"", sub.get_one::("message").unwrap()), + // ); + // _run("app:checkin", sub, Some(args)) + // } + // "package" => { + // _run("app:package", sub, None) + // } + // "publish" => { + // let mut args = IndexMap::new(); + // if sub.contains_id("dry-run") { + // args.insert("dry-run", "True".to_string()); + // } + // if let Some(v) = sub.get_one::<&str>("version") { + // args.insert("version", format!("\"{}\"", v.to_string())); + // } + // if let Some(r) = sub.get_one::<&str>("release-note") { + // args.insert("release-note", format!("\"{}\"", r.to_string())); + // } + // if let Some(t) = sub.get_one::<&str>("release-title") { + // args.insert("release-title", format!("\"{}\"", t.to_string())); + // } + // if sub.contains_id("no-release-title") { + // args.insert("no-release-title", "True".to_string()); + // } + // _run("app:publish", sub, Some(args)) + // } + // "run_publish_checks" => { + // _run("app:run_publish_checks", sub, None) + // } "commands" => { - if let Some(subc) = cmd.subcommand() { + if sub.subcommand().is_some() { // invocation.subcommand() { let mut overrides = IndexMap::new(); - let mut matches = cmd; + let mut matches = sub; let mut path_pieces: Vec = vec!(); app = app.find_subcommand(BASE_CMD).unwrap(); - matches = matches.subcommand_matches("commands").unwrap(); + // matches = matches.subcommand_matches("commands").unwrap(); app = app.find_subcommand("commands").unwrap(); while matches.subcommand_name().is_some() { let n = matches.subcommand_name().unwrap(); @@ -207,7 +207,7 @@ pub(crate) fn run(cmd: &ArgMatches, mut app: &App, exts: &Extensions, plugins: O overrides.insert("dispatch_root".to_string(), Some(format!("r'{}'", app_cmds.cmds_root()?.display()))); overrides } - ), None); + )); Ok(()) } else { // This case shouldn't happen as any non-valid command should be diff --git a/rust/origen/cli/src/commands/aux_cmds.rs b/rust/origen/cli/src/commands/aux_cmds.rs index 63e88748..191989ea 100644 --- a/rust/origen/cli/src/commands/aux_cmds.rs +++ b/rust/origen/cli/src/commands/aux_cmds.rs @@ -1,6 +1,6 @@ use super::launch_as; use crate::framework::{AuxCmds, build_path}; -use crate::framework::aux_cmds::{add_aux_ns_subcmds, add_aux_ns_helps}; +use crate::framework::aux_cmds::{aux_ns_subcmd, add_aux_ns_helps}; use indexmap::IndexMap; use super::_prelude::*; @@ -13,7 +13,7 @@ pub (crate) fn add_helps(helps: &mut CmdHelps, aux_cmds: &AuxCmds) { pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, aux_commands: &'a AuxCmds, exts: &'a Extensions) -> Result> { let mut aux_sub = helps.core_cmd(BASE_CMD).visible_alias("aux_cmds").arg_required_else_help(true); - aux_sub = add_aux_ns_subcmds(&app, aux_sub, helps, aux_commands, exts)?; + aux_sub = aux_ns_subcmd(aux_sub, helps, aux_commands, exts)?; Ok(app.subcommand(aux_sub)) } @@ -41,7 +41,7 @@ pub(crate) fn run(cmd: &clap::ArgMatches, mut app: &clap::App, exts: &crate::Ext overrides.insert("dispatch_src".to_string(), Some(format!("r'{}'", subc.0))); overrides } - ), None); + )); Ok(()) } else { // This case shouldn't happen as any non-valid command should be diff --git a/rust/origen/cli/src/commands/develop_origen/build.rs b/rust/origen/cli/src/commands/develop_origen/build.rs index 07961e15..82d22065 100644 --- a/rust/origen/cli/src/commands/develop_origen/build.rs +++ b/rust/origen/cli/src/commands/develop_origen/build.rs @@ -16,7 +16,7 @@ pub (crate) fn build_cmd<'a>() -> SubCmd<'a> { core_subcmd__no_exts__no_app_opts!( BASE_CMD, "Build and publish Origen, builds the pyapi Rust package by default", - { |mut cmd: App| { + { |cmd: App| { cmd.visible_alias("b") .arg( Arg::new("cli") @@ -71,7 +71,7 @@ pub (crate) fn build_cmd<'a>() -> SubCmd<'a> { ) } -pub(crate) fn run(mut invocation: &clap::ArgMatches) -> Result<()> { +pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { if let Some(v) = invocation.get_one::<&str>("version") { let mut version_bad = false; let version; diff --git a/rust/origen/cli/src/commands/develop_origen/mod.rs b/rust/origen/cli/src/commands/develop_origen/mod.rs index 8e12ef98..74bf2862 100644 --- a/rust/origen/cli/src/commands/develop_origen/mod.rs +++ b/rust/origen/cli/src/commands/develop_origen/mod.rs @@ -15,7 +15,7 @@ gen_core_cmd_funcs__no_exts__no_app_opts!( fmt::fmt_cmd() ); -pub(crate) fn run(mut invocation: &clap::ArgMatches) -> Result<()> { +pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { let (n, subcmd) = invocation.subcommand().unwrap(); match n { build::BASE_CMD => build::run(subcmd), diff --git a/rust/origen/cli/src/commands/env.rs b/rust/origen/cli/src/commands/env.rs index bb9c936f..229d5697 100644 --- a/rust/origen/cli/src/commands/env.rs +++ b/rust/origen/cli/src/commands/env.rs @@ -31,7 +31,7 @@ gen_core_cmd_funcs__no_exts__no_app_opts!( core_subcmd__no_exts__no_app_opts!("update", "Update your application's Python dependencies according to the latest pyproject.toml file", { |cmd: App| {cmd}}) ); -pub fn run(mut invocation: &clap::ArgMatches) -> origen::Result<()> { +pub fn run(invocation: &clap::ArgMatches) -> origen::Result<()> { match invocation.subcommand_name() { Some("update") => { install_poetry(); diff --git a/rust/origen/cli/src/commands/exec.rs b/rust/origen/cli/src/commands/exec.rs index 9f938a24..c5a01d71 100644 --- a/rust/origen/cli/src/commands/exec.rs +++ b/rust/origen/cli/src/commands/exec.rs @@ -5,7 +5,7 @@ use std::borrow::Cow; pub const BASE_CMD: &'static str = "exec"; pub const EXEC_HELP: &'static str = "Execute a command within your Origen/Python environment (e.g. origen exec pytest)"; -pub(crate) fn run_pre_phase(mut invocation: &clap::ArgMatches) -> Result { +pub(crate) fn run_pre_phase(invocation: &clap::ArgMatches) -> Result { let mut cmd = PYTHON_CONFIG.poetry_command(); cmd.arg("run"); let cmd_name = invocation.get_one::("cmd").unwrap(); @@ -21,11 +21,11 @@ pub(crate) fn run_pre_phase(mut invocation: &clap::ArgMatches) -> Result { Ok(if res.success() { 0 } else { 1 }) } -pub fn add_prephase_cmds<'a>(mut cmd: App<'a>) -> App<'a> { +pub fn add_prephase_cmds<'a>(cmd: App<'a>) -> App<'a> { cmd.subcommand(add_verbosity_opts(config_exec_cmd(Command::new(BASE_CMD)), false)) } -pub fn config_exec_cmd<'a>(mut cmd: App<'a>) -> App<'a> { +pub fn config_exec_cmd<'a>(cmd: App<'a>) -> App<'a> { cmd .arg( Arg::new("cmd") diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index c7e646b5..13b31513 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -23,7 +23,7 @@ use crate::python; use crate::{vks_to_cmd, strs_to_cli_arr}; use indexmap::map::IndexMap; -use origen::{clean_mode, LOGGER, STATUS}; +use origen::{LOGGER, STATUS}; // clean_mode # TODO use std::process::exit; use _prelude::{SetArgTrue, CountArgs}; @@ -50,20 +50,16 @@ macro_rules! print_subcmds_available_msg { macro_rules! gen_simple_run_func { ($base_cmd: expr) => { pub(crate) fn run(mut invocation: &clap::ArgMatches, mut cmd_def: &clap::App, exts: &crate::Extensions, plugins: Option<&crate::Plugins>) -> origen::Result<()> { - // let mut matches = cmd; let mut path_pieces: Vec = vec!(); - // let mut overrides = IndexMap::new(); - // let base_cmd = cmd.name; cmd_def = cmd_def.find_subcommand($base_cmd).unwrap(); if invocation.subcommand_name().is_some() { while invocation.subcommand_name().is_some() { let n = invocation.subcommand_name().unwrap(); invocation = invocation.subcommand_matches(&n).unwrap(); cmd_def = cmd_def.find_subcommand(n).unwrap(); - // path_pieces.push(format!("r'{}'", n)); path_pieces.push(n.to_string()); } - crate::commands::launch3( + crate::commands::launch( Some($base_cmd), Some(&path_pieces), invocation, @@ -71,25 +67,15 @@ macro_rules! gen_simple_run_func { exts.get_core_ext(&format!("{}.{}", $base_cmd, path_pieces.join("."))), plugins, None, - None, ); } else { - crate::commands::launch2( - // CMD_NAME, + crate::commands::launch_from_invocation( invocation, cmd_def, exts.get_core_ext($base_cmd), plugins, ); } - - // crate::commands::launch2( - // // CMD_NAME, - // cmd, - // app.find_subcommand($cmd_name).unwrap(), - // exts.get_core_ext($cmd_name), - // plugins, - // ); Ok(()) } }; @@ -98,17 +84,6 @@ macro_rules! gen_simple_run_func { } } -// #[macro_export] -// macro_rules! gen_run_func { -// ? -// } - -pub fn launch_simple(command: &str, args: Option>) { - launch(command, None, &None, None, None, None, false, args) -} - -// pub fn launch_cmd() - pub fn launch_as( cmd: &str, subcmds: Option<&Vec>, @@ -117,22 +92,15 @@ pub fn launch_as( cmd_exts: Option<&Vec>, plugins: Option<&Plugins>, overrides: Option>>, - arg_overrides: Option>>, ) -> () { - launch3(Some(cmd), subcmds, invocation, cmd_def, cmd_exts, plugins, overrides, arg_overrides) + launch(Some(cmd), subcmds, invocation, cmd_def, cmd_exts, plugins, overrides) } -pub fn launch2(invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>) { - // TODO arg overrides - launch3(None, None, invocation, cmd_def, cmd_exts, plugins, None, None) +pub fn launch_from_invocation(invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>) { + launch(None, None, invocation, cmd_def, cmd_exts, plugins, None) } -// pub fn launch4(invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>, callback: Option) { -// // TODO arg overrides -// launch3(None, invocation, cmd_def, cmd_exts, plugins, None, None) -// } - -pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>, overrides: Option>>, arg_overrides: Option>>) { +pub fn launch(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: &ArgMatches, cmd_def: &App, cmd_exts: Option<&Vec>, plugins: Option<&Plugins>, overrides: Option>>) { macro_rules! as_name { ($arg_name:expr) => {{ if $arg_name.starts_with(crate::framework::extensions::EXT_BASE_NAME) { @@ -331,76 +299,3 @@ pub fn launch3(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation } } } - -/// Launch the given command in Python -pub fn launch( - command: &str, - targets: Option>, - mode: &Option<&str>, - files: Option>, - output_dir: Option<&str>, - reference_dir: Option<&str>, - debug: bool, - cmd_args: Option>, -) { - let mut cmd = format!("from origen.boot import run_cmd; run_cmd('{}'", command); - - if let Some(t) = targets { - // added r prefix to the string to force python to interpret as a string literal - let _t: Vec = t.iter().map(|__t| format!("r'{}'", __t)).collect(); - cmd += &format!(", targets=[{}]", &_t.join(",")).to_string(); - } - - if mode.is_some() { - let c = clean_mode(mode.unwrap()); - cmd += &format!(", mode='{}'", c).to_string(); - } - - if files.is_some() { - // added r prefix to the string to force python to interpret as a string literal - let f: Vec = files.unwrap().iter().map(|f| format!("r'{}'", f)).collect(); - cmd += &format!(", files=[{}]", f.join(",")).to_string(); - } - - if let Some(args) = cmd_args { - cmd += ", args={"; - cmd += &args - .iter() - .map(|(arg, val)| format!("'{}': {}", arg, val)) - .collect::>() - .join(","); - cmd += "}"; - } - - if let Some(dir) = output_dir { - cmd += &format!(", output_dir='{}'", dir); - } - - if let Some(dir) = reference_dir { - cmd += &format!(", reference_dir='{}'", dir); - } - - if debug { - cmd += ", debug=True"; - } - - cmd += &format!(", verbosity={}", LOGGER.verbosity()); - cmd += &format!(", {}", vks_to_cmd!()); - cmd += ");"; - - log_debug!("Launching Python: '{}'", &cmd); - - match python::run(&cmd) { - Err(e) => { - log_error!("{}", &e); - exit(1); - } - Ok(exit_status) => { - if exit_status.success() { - exit(0); - } else { - exit(exit_status.code().unwrap_or(1)); - } - } - } -} diff --git a/rust/origen/cli/src/commands/plugin.rs b/rust/origen/cli/src/commands/plugin.rs index 830f1486..e152b09c 100644 --- a/rust/origen/cli/src/commands/plugin.rs +++ b/rust/origen/cli/src/commands/plugin.rs @@ -8,7 +8,7 @@ pub (crate) fn add_helps(helps: &mut CmdHelps, plugins: Option<&Plugins>) { add_pl_ns_helps(helps, plugins); } -pub (crate) fn add_commands<'a>(mut app: App<'a>, helps: &'a CmdHelps, plugins: Option<&'a Plugins>, exts: &'a Extensions) -> Result> { +pub (crate) fn add_commands<'a>(app: App<'a>, helps: &'a CmdHelps, plugins: Option<&'a Plugins>, exts: &'a Extensions) -> Result> { let mut pl_sub = Command::new(BASE_CMD).visible_alias("pl").arg_required_else_help(true); pl_sub = helps.apply_core_cmd_helps(BASE_CMD, pl_sub); if let Some(pls) = plugins { diff --git a/rust/origen/cli/src/commands/target.rs b/rust/origen/cli/src/commands/target.rs index 9c99d01e..60b4c260 100644 --- a/rust/origen/cli/src/commands/target.rs +++ b/rust/origen/cli/src/commands/target.rs @@ -81,7 +81,7 @@ fn view_targets(fp: bool) -> Result<()> { Ok(()) } -pub(crate) fn run(mut invocation: &clap::ArgMatches) -> origen::Result<()> { +pub(crate) fn run(invocation: &clap::ArgMatches) -> origen::Result<()> { if let Some((n, subcmd)) = invocation.subcommand() { match n { "add" => { diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index 640f3844..6706bfa5 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -17,7 +17,8 @@ pub (crate) fn add_aux_ns_helps(helps: &mut CmdHelps, aux_cmds: &AuxCmds) { } } -pub (crate) fn add_aux_ns_subcmds<'a>(app: &App<'a>, mut aux_sub: App<'a>, helps: &'a CmdHelps, aux_commands: &'a AuxCmds, exts: &'a Extensions) -> Result> { +#[inline] +pub (crate) fn aux_ns_subcmd<'a>(mut aux_sub: App<'a>, helps: &'a CmdHelps, aux_commands: &'a AuxCmds, exts: &'a Extensions) -> Result> { for (ns, cmds) in aux_commands.namespaces.iter() { let mut aux_sub_sub = ClapCommand::new(ns).arg_required_else_help(true).after_help(NOT_EXTENDABLE_MSG); if let Some(h) = cmds.help.as_ref() { diff --git a/rust/origen/cli/src/framework/core_cmds.rs b/rust/origen/cli/src/framework/core_cmds.rs index ec0562ef..73407fb2 100644 --- a/rust/origen/cli/src/framework/core_cmds.rs +++ b/rust/origen/cli/src/framework/core_cmds.rs @@ -138,7 +138,7 @@ macro_rules! gen_core_cmd_funcs__no_exts__no_app_opts { )* } - pub (crate) fn add_commands<'a>(app: clap::Command<'a>, helps: &'a $crate::CmdHelps, exts: &'a $crate::Extensions) -> origen::Result> { + pub (crate) fn add_commands<'a>(app: clap::Command<'a>, helps: &'a $crate::CmdHelps, _exts: &'a $crate::Extensions) -> origen::Result> { let mut cmd = helps.core_cmd($base_name); cmd = $proc(cmd); $( @@ -153,7 +153,7 @@ macro_rules! gen_core_cmd_funcs__no_exts__no_app_opts { helps.add_core_cmd($base_name).set_help_msg($cmd_help).set_as_not_extendable(); } - pub (crate) fn add_commands<'a>(app: clap::Command<'a>, helps: &'a $crate::CmdHelps, exts: &'a $crate::Extensions) -> origen::Result> { + pub (crate) fn add_commands<'a>(app: clap::Command<'a>, helps: &'a $crate::CmdHelps, _exts: &'a $crate::Extensions) -> origen::Result> { let mut cmd = helps.core_cmd($base_name); cmd = $proc(cmd); Ok(app.subcommand(cmd)) diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs index d27a75a8..1bc7c8bc 100644 --- a/rust/origen/cli/src/framework/extensions.rs +++ b/rust/origen/cli/src/framework/extensions.rs @@ -98,10 +98,6 @@ impl Extensions { self.extensions.get(&ExtensionTarget::Core(cmd_path.to_string())) } - pub fn get_core_subc_ext(&self, cmd_path: &[&str]) -> Option<&Vec> { - self.extensions.get(&ExtensionTarget::Core(cmd_path.join("."))) - } - pub fn get_app_ext(&self, cmd_path: &str) -> Option<&Vec> { self.extensions.get(&ExtensionTarget::App(cmd_path.to_string())) } diff --git a/rust/origen/cli/src/framework/helps.rs b/rust/origen/cli/src/framework/helps.rs index 4322edbf..6dbe4e92 100644 --- a/rust/origen/cli/src/framework/helps.rs +++ b/rust/origen/cli/src/framework/helps.rs @@ -148,11 +148,6 @@ impl CmdHelp { self } - pub fn set_optional_help_msg(&mut self, help_msg: Option) -> &mut Self { - self.help = help_msg; - self - } - pub fn set_as_not_extendable(&mut self) -> &mut Self { self.extendable = false; if let Some(h) = self.after_help.as_mut() { @@ -189,13 +184,6 @@ impl CmdSrc { _ => bail!("Unknown target scope '{}'. Expected 'origen', 'app', 'aux', or 'plugin'", scope) }) } - - pub fn is_app_cmd(&self) -> bool { - match self { - Self::App(_) => true, - _ => false, - } - } } impl fmt::Display for CmdSrc { diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index f4825577..b45ee58e 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -390,7 +390,7 @@ macro_rules! cache { impl CmdOptCache { pub fn new(cmd_path: String) -> Self { - let mut slf = Self { + let slf = Self { opt_names: Vec::new(), lns: HashMap::new(), ilns: HashMap::new(), @@ -969,7 +969,7 @@ static VERBOSITY_KEYWORD_HELP_STR: &str = "Keywords for verbose listeners"; pub const VOV_OPT_NAME: &str = "version_or_verbosity"; -pub fn add_verbosity_opts<'a>(mut cmd: ClapCommand<'a>, split_v: bool) -> ClapCommand<'a> { +pub fn add_verbosity_opts<'a>(cmd: ClapCommand<'a>, split_v: bool) -> ClapCommand<'a> { if split_v { cmd.arg( ClapArg::new(VERBOSITY_OPT_NAME) diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index 006ae41b..c1111f34 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -5,10 +5,8 @@ use indexmap::IndexMap; use std::fs; use crate::commands::_prelude::*; use super::{ClapCommand, Command, CommandsToml, CommandTOML, Extensions, build_path}; -use crate::commands::launch_as; use super::helps::NOT_EXTENDABLE_MSG; - pub (crate) fn add_pl_ns_helps(helps: &mut CmdHelps, plugins: Option<&Plugins>) { if let Some(pls) = plugins { for (pl_name, pl) in pls.plugins.iter() { @@ -183,7 +181,7 @@ impl Plugin { overrides.insert("dispatch_src".to_string(), Some(format!("r'{}'", &self.name))); overrides } - ), None); + )); Ok(()) } else { diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index d9375d3b..256a1b19 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -18,6 +18,7 @@ def develop_origen_cmd(): aliases=["origen"], subcmds=[ Cmd("build"), + Cmd("fmt"), ] ) From b5c3084b6b2e3488625f647036eeca9ab6a2679c Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 21 May 2023 21:32:53 -0500 Subject: [PATCH 037/200] Some cleanup & support splitting out core cmds from boot.py --- python/origen/origen/boot.py | 60 ++----------------- .../origen/origen/core/commands/__init__.py | 34 +++++++++++ .../origen/core/commands/credentials.py | 35 +++++++++++ rust/origen/cli/src/framework/app_cmds.rs | 1 - rust/origen/cli/src/framework/aux_cmds.rs | 1 - rust/origen/cli/src/framework/extensions.rs | 30 ++++------ rust/origen/cli/src/framework/mod.rs | 4 +- .../aux_cmds/ext_conflicts.toml | 8 --- 8 files changed, 87 insertions(+), 86 deletions(-) create mode 100644 python/origen/origen/core/commands/__init__.py create mode 100644 python/origen/origen/core/commands/credentials.py diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 11ea0268..ab3fabfc 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -1,14 +1,6 @@ -# FOR_PR need to clean up print statemnents import pathlib from builtins import exit as exit_proc - -# TEST_NEEDED -# Or needed at all? -def unsupported_command(base_cmd, sub_command=None): - if sub_command is None: - raise RuntimeError(f"Unsupported command '{base_cmd}'") - else: - raise RuntimeError(f"Unsupported sub-command '{sub_command}' for '{base_cmd}'") +from .core.commands import run_core_cmd dispatch_plugin_cmd = "_plugin_dispatch_" dispatch_aux_cmd = "_dispatch_aux_cmd_" @@ -111,16 +103,6 @@ def call_user_cmd(cmd_type): origen.logger.error(f"Could not find 'run' function in module '{m.__file__}'") exit_proc(1) - def is_subcmd(*subcs): - return list(subcs) == subcmds - - def unsupported_subcmd(subcmd=None): - if subcmd is None: - print(f"Unsupported sub-command '{subcmds.join(' -> ')}' for base command '{command}'") - else: - print(f"Unsupported sub-command '{subcmd}' for '{command}'") - exit_proc(1) - if mode == None: if _origen.is_app_present(): origen.set_mode(_origen.app_config()["mode"]) @@ -193,8 +175,6 @@ def run(func): return func setattr(origen.boot, "run", run) - # FOR_PR need to test with app subcmds - for ext in extensions: current_ext = ext if cmd_src == "core": @@ -272,39 +252,6 @@ def run_ext(phase, continue_on_fail=False): interactive.interact(banner=f"Origen {origen.version}", context=origen.__interactive_context__()) - elif command == "credentials": - _origen.set_operation("credentials") - datasets = args.get("datasets", None) - all = args.get("all", False) - if is_subcmd("set"): - if all: - origen.logger.display("Setting passwords for all available datasets...") - for d in origen.current_user.datasets.values(): - d.password = None - d.password() - origen.logger.display("Done!") - elif datasets is None: - origen.current_user.password = None - origen.current_user.password - else: - for d in datasets: - d.password = None - d.password() - elif is_subcmd("clear"): - if all: - origen.logger.display("Clearing all cached passwords...") - origen.current_user.clear_cached_passwords() - elif datasets is None: - origen.logger.display("Clearing cached password for topmost dataset...") - origen.current_user.clear_cached_password() - else: - for d in datasets: - origen.logger.display(f"Clearing cached password for dataset '{d}'") - origen.current_user.datasets[d].clear_cached_password() - origen.logger.display("Done!") - else: - unsupported_subcmd() - elif command == "eval": for c in args['code']: exec(c) @@ -478,8 +425,11 @@ def tabify(message): elif command == dispatch_aux_cmd: call_user_cmd("aux") + elif run_core_cmd(command, subcmds, args): + pass + else: - unsupported_command(command) + raise RuntimeError(f"Unsupported command '{command}'") run_ext("after_cmd") finally: diff --git a/python/origen/origen/core/commands/__init__.py b/python/origen/origen/core/commands/__init__.py new file mode 100644 index 00000000..ec3377c5 --- /dev/null +++ b/python/origen/origen/core/commands/__init__.py @@ -0,0 +1,34 @@ +import importlib, origen + +creds = "credentials" + +_subcmds = None +_base_cmd = None + +def import_cmd(cmd): + return importlib.import_module(f"origen.core.commands.{cmd}") + +def is_subcmd(*subcs): + return list(subcs) == _subcmds + +def unsupported_subcmd(subcmd=None): + if subcmd is None: + print(f"Unsupported sub-command '{(' -> ').join(_subcmds)}' for base command '{_base_cmd}'") + else: + print(f"Unsupported sub-command '{subcmd}' for '{_base_cmd}'") + exit(1) + +def run_core_cmd(base_cmd, sub_cmds, args): + origen.core.commands._base_cmd = base_cmd + origen.core.commands._subcmds = sub_cmds + try: + if base_cmd == creds: + import_cmd(creds).run(args) + else: + return False + return True + except Exception as e: + raise e + finally: + origen.core.commands._base_cmd = None + origen.core.commands._subcmds = None diff --git a/python/origen/origen/core/commands/credentials.py b/python/origen/origen/core/commands/credentials.py new file mode 100644 index 00000000..66d36f03 --- /dev/null +++ b/python/origen/origen/core/commands/credentials.py @@ -0,0 +1,35 @@ +import _origen, origen +from . import is_subcmd, unsupported_subcmd + +def run(args): + _origen.set_operation("credentials") + datasets = args.get("datasets", None) + all = args.get("all", False) + if is_subcmd("set"): + if all: + origen.logger.display("Setting passwords for all available datasets...") + for d in origen.current_user.datasets.values(): + d.password = None + d.password() + origen.logger.display("Done!") + elif datasets is None: + origen.current_user.password = None + origen.current_user.password + else: + for d in datasets: + d.password = None + d.password() + elif is_subcmd("clear"): + if all: + origen.logger.display("Clearing all cached passwords...") + origen.current_user.clear_cached_passwords() + elif datasets is None: + origen.logger.display("Clearing cached password for topmost dataset...") + origen.current_user.clear_cached_password() + else: + for d in datasets: + origen.logger.display(f"Clearing cached password for dataset '{d}'") + origen.current_user.datasets[d].clear_cached_password() + origen.logger.display("Done!") + else: + unsupported_subcmd() diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index bd90f647..2674ae76 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -8,7 +8,6 @@ use origen::core::application::Application; use super::{Command, CommandsToml, CommandTOML, Extensions}; -// pub const CMD_NAME: &'static str = "commands"; pub const APP_COMMANDS: [&'static str; 2] = [crate::commands::app::BASE_CMD, "commands"]; pub struct AppCmds { diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index 6706bfa5..e0c9ea77 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -90,7 +90,6 @@ pub struct AuxCmdNamespace { commands: IndexMap, pub top_commands: Vec, index: usize, - // path: PathBuf, help: Option, } diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs index 1bc7c8bc..70b45a19 100644 --- a/rust/origen/cli/src/framework/extensions.rs +++ b/rust/origen/cli/src/framework/extensions.rs @@ -17,13 +17,9 @@ macro_rules! ext_opt { pub const EXT_BASE_NAME: &'static str = ext_opt!(); pub const EXT_BASE_PREFIX: &'static str = concat!(ext_opt!(), "."); -// TODO refactor this -use super::helps::CmdSrc as ExtensionTarget; - - #[derive(Debug)] pub struct Extensions { - extensions: HashMap>, + extensions: HashMap>, } impl Extensions { @@ -33,7 +29,7 @@ impl Extensions { } } - pub fn exts(&self) -> &HashMap> { + pub fn exts(&self) -> &HashMap> { &self.extensions } @@ -63,51 +59,49 @@ impl Extensions { } pub fn apply_to_core_cmd<'a>(&'a self, cmd: &str, app: ClapCommand<'a>) -> ClapCommand<'a> { - let e = ExtensionTarget::Core(cmd.to_string()); + let e = CmdSrc::Core(cmd.to_string()); let mut cache = CmdOptCache::unchecked_populated(&app, e.to_string()); self.apply_to(&e, app, &mut cache) } pub fn apply_to_app_cmd<'a>(&'a self, cmd: &str, app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { - self.apply_to(&ExtensionTarget::App(cmd.to_string()), app, cache) + self.apply_to(&CmdSrc::App(cmd.to_string()), app, cache) } pub fn apply_to_pl_cmd<'a>(&'a self, pl: &str, cmd: &str, app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { - self.apply_to(&ExtensionTarget::Plugin(pl.to_string(), cmd.to_string()), app, cache) + self.apply_to(&CmdSrc::Plugin(pl.to_string(), cmd.to_string()), app, cache) } pub fn apply_to_aux_cmd<'a>(&'a self, ns: &str, cmd: &str, app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { - self.apply_to(&ExtensionTarget::Aux(ns.to_string(), cmd.to_string()), app, cache) + self.apply_to(&CmdSrc::Aux(ns.to_string(), cmd.to_string()), app, cache) } - pub fn apply_to<'a>(&'a self, cmd: &ExtensionTarget, mut app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { + // Apply any extensions, returning an unaltered command if no extensions are available for this command. + pub fn apply_to<'a>(&'a self, cmd: &CmdSrc, mut app: ClapCommand<'a>, cache: &mut CmdOptCache) -> ClapCommand<'a> { if let Some(exts) = self.extensions.get(cmd) { for ext in exts { if let Some(opts) = ext.opts.as_ref() { app = super::apply_opts(opts, app, cache, Some(ext)); } } - } else { - // println!("No extension found for {:?}", cmd); - // FOR_PR } app } pub fn get_core_ext(&self, cmd_path: &str) -> Option<&Vec> { - self.extensions.get(&ExtensionTarget::Core(cmd_path.to_string())) + self.extensions.get(&CmdSrc::Core(cmd_path.to_string())) } pub fn get_app_ext(&self, cmd_path: &str) -> Option<&Vec> { - self.extensions.get(&ExtensionTarget::App(cmd_path.to_string())) + self.extensions.get(&CmdSrc::App(cmd_path.to_string())) } pub fn get_pl_ext(&self, pl: &str, cmd_path: &str) -> Option<&Vec> { - self.extensions.get(&ExtensionTarget::Plugin(pl.to_string(), cmd_path.to_string())) + self.extensions.get(&CmdSrc::Plugin(pl.to_string(), cmd_path.to_string())) } pub fn get_aux_ext(&self, ns: &str, cmd_path: &str) -> Option<&Vec> { - self.extensions.get(&ExtensionTarget::Aux(ns.to_string(), cmd_path.to_string())) + self.extensions.get(&CmdSrc::Aux(ns.to_string(), cmd_path.to_string())) } } diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index b45ee58e..6a6b8b20 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -1,4 +1,3 @@ -// FOR_PR clean up this and entire directory pub mod helps; pub mod extensions; pub mod plugins; @@ -106,7 +105,7 @@ macro_rules! from_toml_opts { } current_names.push(None); None - } else if crate::uses_reserved_prefix!(o.name) { // o.name.starts_with(crate::framework::extensions::EXT_BASE_NAME) { + } else if crate::uses_reserved_prefix!(o.name) { if $ext.is_some() { crate::log_err_processing_cmd!( $cmd_path, @@ -942,7 +941,6 @@ pub const VERBOSITY_KEYWORDS_OPT_NAME: &str = "verbosity_keywords"; pub const VERBOSITY_KEYWORDS_OPT_LONG_NAME: &str = "vk"; pub const VERBOSITY_OPT_NAME: &str = "verbose"; pub const VERBOSITY_OPT_SHORT_NAME: char = 'v'; -// pub const VERBOSITY_OPT_LONG_NAME: &str = "verbose"; pub const VERBOSITY_OPT_LNA: &str = "verbosity"; pub const TARGET_OPT_NAME: &str = "targets"; pub const TARGET_OPT_ALIAS: &str = "target"; diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml index 6e4d5795..f16e5c4a 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml @@ -124,14 +124,6 @@ on_env=["ORIGEN_EXT_CONFLICTS_PL_TEST_ARGS"] name = "ext_self_conflict_2" help = "Ilna conflicts within the extension" long_aliases = ["ext_self_conflict", "ext_self_conflict_2", "ext_self_conflict_2_1"] - # [[extension.opt]] - # FOR_PR - # name = "ext_self_conflict_3" - # help = "Sn and ln conflicts within the extension" - # short = "e" - # long = "ext_self_conflict_3_ln" - # short_aliases = ["e"] - # long_aliases = ["ext_self_conflict_3_ln"] [[extension.opt]] name = "ext_opt_in_ln" help = "Reserved prefix in ln" From d28668801f70087a9ee5357509b766488b9124d2 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 23 May 2023 20:20:45 -0500 Subject: [PATCH 038/200] Continue clean up. Bugfix where parent required args are inherited by subcmds. Allow delimiter-based values in target subcmds. --- python/origen/origen/boot.py | 6 +++-- .../origen/helpers/regressions/cli/origen.py | 3 +-- rust/origen/cli/Cargo.toml | 2 +- rust/origen/cli/src/commands/mod.rs | 1 - rust/origen/cli/src/commands/target.rs | 1 + rust/origen/cli/src/framework/mod.rs | 2 ++ .../python_app/tests/cli/core_cmds/target.py | 15 +++++++++++ .../python_app/tests/cli/tests__core_cmds.py | 26 ++++++++++++++----- test_apps/python_app/tests/cli_test.py | 11 -------- .../tests/cmd_exts/tests__extending_cmds.py | 8 +++--- .../extensions/aux_ns.dummy_cmds.dummy_cmd.py | 18 ++++--------- .../aux_ns.dummy_cmds.dummy_cmd.subc.py | 19 ++++---------- .../commands/extensions/core.eval.py | 1 - .../commands/plugin_test_ext_stacking.py | 10 ++++++- .../aux_cmds/ext_conflicts.toml | 2 -- .../python_plugin/plugin_test_args.subc.py | 6 +++++ .../configs/suppress_plugin_collecting.toml | 1 - 17 files changed, 71 insertions(+), 61 deletions(-) create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_args.subc.py diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index ab3fabfc..2f061689 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -50,6 +50,7 @@ def run_cmd(command, cmd_src = "app" else: cmd_src = "core" + dispatch = {} def wrap_mod_from_file(path): try: @@ -97,7 +98,9 @@ def call_user_cmd(cmd_type): origen.log.error(f" {msg}") exit_proc(1) - if hasattr(m, 'run'): + if "run_func" in dispatch: + dispatch["run_func"](**(args or {})) + elif hasattr(m, 'run'): m.run(**(args or {})) else: origen.logger.error(f"Could not find 'run' function in module '{m.__file__}'") @@ -169,7 +172,6 @@ def on_load(func): return func setattr(origen.boot, "on_load", on_load) - dispatch = {} def run(func): dispatch['run_func'] = func return func diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index bf087761..b0a14d2d 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -292,8 +292,7 @@ def targets_arg(cls, help): help=help, multi=True, required=True, - # FOR_PR - # use_delimiter=True + use_delimiter=True ) app = Cmd( diff --git a/rust/origen/cli/Cargo.toml b/rust/origen/cli/Cargo.toml index bc8a9134..ae4eb636 100644 --- a/rust/origen/cli/Cargo.toml +++ b/rust/origen/cli/Cargo.toml @@ -12,7 +12,7 @@ path = "src/bin.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -clap = {version = "3.2.17", features = ["unstable-replace"]} +clap = {version = "3.2.23", features = ["unstable-replace"]} origen = { path = ".." } origen_metal = { path = "../../origen_metal" } pathdiff = "0.1" diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 13b31513..8ede2989 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -1,4 +1,3 @@ -// FOR_PR clean up, specifically launch stuff pub mod app; pub mod env; pub mod exec; diff --git a/rust/origen/cli/src/commands/target.rs b/rust/origen/cli/src/commands/target.rs index 60b4c260..2e47345c 100644 --- a/rust/origen/cli/src/commands/target.rs +++ b/rust/origen/cli/src/commands/target.rs @@ -24,6 +24,7 @@ macro_rules! targets_arg { .value_name("TARGETS") .multiple(true) .required(true) + .use_delimiter(true) } } diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index 6a6b8b20..119d2aa0 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -782,6 +782,7 @@ where ); cmd = cmd.subcommand(subcmd); } + cmd = cmd.subcommand_negates_reqs(true); } cmd = exts(&cmd_def.full_name, cmd, &mut cache); cmd = apply_helps(&cmd_def.full_name, cmd); @@ -811,6 +812,7 @@ pub (crate) fn apply_args<'a>(args: &'a Vec, mut cmd: App<'a>) -> App<'a> { if let Some(r) = arg_def.required { arg = arg.required(r); + // arg = arg.setting(clap::builder::ArgSettings::Required); } // FOR_PR is hidden arg a thing? diff --git a/test_apps/python_app/tests/cli/core_cmds/target.py b/test_apps/python_app/tests/cli/core_cmds/target.py index c0f7369a..2a5fba89 100644 --- a/test_apps/python_app/tests/cli/core_cmds/target.py +++ b/test_apps/python_app/tests/cli/core_cmds/target.py @@ -255,6 +255,21 @@ def test_viewing_targets(self, set_eagle, eagle, j750): self.assert_out(out, None, full_paths=True) self.check_targets(None) + def test_delimited_targets(self, eagle, j750, uflex, smt7, smt8): + out= self.cmd.set.run(','.join([eagle.name, uflex.name, j750.name]), smt7.name, smt8.name) + targets = [eagle, uflex, j750, smt7, smt8] + self.assert_out(out, *targets) + self.check_targets(*targets) + + out = self.cmd.remove.run(','.join([uflex.name, j750.name]), ','.join([smt7.name, smt8.name])) + self.assert_out(out, eagle) + self.check_targets(eagle) + + out = self.cmd.add.run(','.join([smt7.name, smt8.name]), ','.join([uflex.name, j750.name])) + targets = [eagle, smt7, smt8, uflex, j750] + self.assert_out(out, *targets) + self.check_targets(*targets) + def test_base_cmd_acts_as_view(self, set_eagle, eagle, j750): h = "Run with 'help' or '-h' to see available subcommands" b = self.cmd diff --git a/test_apps/python_app/tests/cli/tests__core_cmds.py b/test_apps/python_app/tests/cli/tests__core_cmds.py index 18696f34..39dfd621 100644 --- a/test_apps/python_app/tests/cli/tests__core_cmds.py +++ b/test_apps/python_app/tests/cli/tests__core_cmds.py @@ -20,6 +20,23 @@ def cmd_shortcuts__app(self): "disabling_app_opts": "disabling_app_opts", } + @property + def cmd_shortcuts__pl(self): + return { + "plugin_says_hi": ("python_plugin", "plugin_says_hi"), + "plugin_test_args": ("python_plugin", "plugin_test_args"), + "plugin_test_ext_stacking": ("python_plugin", "plugin_test_ext_stacking"), + "echo": ("python_plugin", "echo"), + "do_actions": ("python_plugin", "do_actions"), + "disabling_app_opts_from_pl": ("python_plugin", "disabling_app_opts_from_pl"), + } + + @property + def cmd_shortcuts__aux(self): + return { + "dummy_cmd": ("dummy_cmds", "dummy_cmd") + } + def test_app_workspace_help_message(self): help = self.in_app_cmds.origen.get_help_msg() assert help.root_cmd is True @@ -28,13 +45,8 @@ def test_app_workspace_help_message(self): assert set(help.subcmd_names) == set(self.in_app_cmds.all_names_add_help) assert help.app_cmd_shortcuts == self.cmd_shortcuts__app - # FOR_PR plugin commands - # assert help.pl_cmd_shortcuts == self.cmd_shortcuts__default_plugins - # FOR_PR Aux commands - # assert help.pl_cmd_shortcuts == { - # "plugin_says_hi": ("python_plugin", "plugin_says_hi"), - # "echo": ("python_plugin", "echo"), - # } + assert help.pl_cmd_shortcuts == self.cmd_shortcuts__pl + assert help.aux_cmd_shortcuts == self.cmd_shortcuts__aux @pytest.mark.parametrize("cmd", CLICommon.in_app_cmds.cmds, ids=CLICommon.in_app_cmds.all_names) def test_core_commands_are_available(self, cmd): diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 290ff72b..598c74e8 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -1,4 +1,3 @@ -# FOR_PR convert assert args import pytest, pathlib import subprocess import os @@ -60,16 +59,6 @@ def test_bad_command(): assert process.wait() == 2 assert "error:" in process.stderr.readline() - -def test_origen_g(): - os.chdir(origen.root) - process = subprocess.Popen([ - f'{origen_cli}', 'g', r'./example/patterns/toggle.py', '-t', - r'./targets/eagle_with_smt7.py' - ], - universal_newlines=True) - assert process.wait() == 0 - @pytest.mark.skip class TestAuxCommandsAreAdded: ... diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py index f38090a5..45bd149e 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py @@ -106,7 +106,6 @@ def test_accessing_cmd_args_from_ext(self): self.sv, *self.mv, self.ext_action.ln_to_cli(), *actions ) - print(out) self.cmd.assert_args( out, (self.cmd.single_arg, self.sv), @@ -129,7 +128,6 @@ def test_accessing_ext_args_directly(self): self.sv, *self.mv, self.ext_action.ln_to_cli(), *actions ) - print(out) self.cmd.assert_args( out, (self.cmd.single_arg, self.sv), @@ -177,7 +175,6 @@ def test_manipulating_ext_args_in_ext(self): self.ext_flag.ln_to_cli(), self.ext_flag.ln_to_cli(), ) - print(out) self.cmd.assert_args( out, (self.cmd.single_arg, self.sv), @@ -189,17 +186,18 @@ def test_manipulating_ext_args_in_ext(self): (CmdExtOpt("new_arg", src_name="exts_workout"), "new_arg_for_ext", {"Before": False}) ) - @pytest.mark.skip def test_extending_subcommand(self): actions = ["no_action"] out = self.subcmd.run( self.sv, self.subcmd.flag_opt.ln_to_cli(), - self.subcmd.exts_workout_action.ln_to_cli(), *actions, + self.subcmd.exts_workout_action.ln_to_cli(), + *actions, ) self.subcmd.assert_args( out, (self.subcmd.single_arg, self.sv), + (self.subcmd.flag_opt, 1), (self.subcmd.exts_workout_action, actions), ) diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py index bc7b4dd2..e8bce0ef 100644 --- a/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py +++ b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.py @@ -1,14 +1,6 @@ -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str -from origen.boot import before_cmd, after_cmd, clean_up +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load -@before_cmd -def before(**args): - print(before_cmd_ext_args_str(args)) - -@after_cmd -def after(**args): - print(after_cmd_ext_args_str(args)) - -@clean_up -def clean_up(**args): - print(clean_up_ext_args_str(args)) +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py index 40c4bed6..e8bce0ef 100644 --- a/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py +++ b/test_apps/python_plugin/python_plugin/commands/extensions/aux_ns.dummy_cmds.dummy_cmd.subc.py @@ -1,15 +1,6 @@ -# FOR_PR switch to shared stuff -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str -from origen.boot import before_cmd, after_cmd, clean_up +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load -@before_cmd -def before(**args): - print(before_cmd_ext_args_str(args)) - -@after_cmd -def after(**args): - print(after_cmd_ext_args_str(args)) - -@clean_up -def clean_up(**args): - print(clean_up_ext_args_str(args)) +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py b/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py index ac0b4b5e..a77b60f5 100644 --- a/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py +++ b/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py @@ -1,7 +1,6 @@ import origen def before_cmd(): - print("before cmd!!") print(origen.current_command.args) if "say_hi_before_eval" in origen.current_command.args: print("Hi from python-plugin during 'eval'!") diff --git a/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.py b/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.py index c30a3947..c0f86705 100644 --- a/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.py +++ b/test_apps/python_plugin/python_plugin/commands/plugin_test_ext_stacking.py @@ -1 +1,9 @@ -from test_apps_shared_test_helpers.aux_cmds import run +from test_apps_shared_test_helpers.aux_cmds import run as tas_run +from origen.boot import run as run_wrapper + +def run(**args): + raise RuntimeError("This shouldn't be used!") + +@run_wrapper +def run_func(**args): + tas_run(**args) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml index f16e5c4a..edf936c9 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml @@ -64,8 +64,6 @@ on_env=["ORIGEN_EXT_CONFLICTS_CORE_CMD_CREDS_CLEAR"] # FOR_PR conflict with v, vk -# FOR_PR conflict with subcommand - [[extension]] extend = "plugin.python_plugin.plugin_test_args" help = "Conflict with plugin from aux ext" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_args.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_args.subc.py new file mode 100644 index 00000000..e8bce0ef --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_args.subc.py @@ -0,0 +1,6 @@ +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load + +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/suppress_plugin_collecting.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/suppress_plugin_collecting.toml index e28ff97c..a962ef67 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/suppress_plugin_collecting.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/suppress_plugin_collecting.toml @@ -1,3 +1,2 @@ -# FOR_PR use shared one [plugins] collect = false From ef489a1ce12d0bb169d80bfdff7a686103411189 Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 25 May 2023 21:46:44 -0500 Subject: [PATCH 039/200] Continue cleanup items --- python/origen/origen/helpers/env.py | 16 +++-- rust/origen/cli/src/framework/app_cmds.rs | 2 +- rust/origen/cli/src/framework/aux_cmds.rs | 2 +- rust/origen/cli/src/framework/extensions.rs | 6 +- rust/origen/cli/src/framework/helps.rs | 7 ++ rust/origen/cli/src/framework/mod.rs | 58 +++++++-------- rust/origen/cli/src/framework/plugins.rs | 2 +- .../tests/cmd_exts/tests__extending_cmds.py | 46 ++++++------ .../python_plugin_the_second/commands.toml | 8 +-- .../aux_cmds/exts_workout.toml | 4 +- .../python_plugin/plugin_test_ext_stacking.py | 72 ++----------------- .../plugin_test_ext_stacking/subc.py | 20 ++---- .../cli/cmd_models/exts.py | 12 ++-- .../cli/ext_helpers.py | 2 - 14 files changed, 97 insertions(+), 160 deletions(-) diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index 17071271..0122525a 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -11,8 +11,17 @@ def in_new_origen_proc(func=None, mod=None, *, func_kwargs=None, with_configs=No func = getattr(mod, inspect.stack()[1].function) return in_new_proc(func, mod, func_kwargs=func_kwargs, expect_fail=expect_fail) -# TODO support options -def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=False, input=None, expect_fail=False, return_details=False, shell=None, targets=None): +def run_cli_cmd(cmd, *, + with_env=None, + with_configs=None, + bypass_config_lookup=False, + input=None, + expect_fail=False, + return_details=False, + shell=None, + targets=None, + check=True, +): if isinstance(cmd, str): cmd = ["origen", cmd] else: @@ -46,8 +55,7 @@ def run_cli_cmd(cmd, *, with_env=None, with_configs=None, bypass_config_lookup=F cmd = ' '.join(cmd) raise RuntimeError(f"Expected cmd '{cmd}' to fail but received return code 0") else: - # FOR_PR make check an option - result = subprocess.run(cmd, shell=shell, check=False, capture_output=True, text=True, input=input, env=subp_env) + result = subprocess.run(cmd, shell=shell, check=check, capture_output=True, text=True, input=input, env=subp_env) # FOR_PR take these out print(result.stdout) print(result.stderr) diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index 2674ae76..5b5ad531 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -18,7 +18,7 @@ pub struct AppCmds { impl AppCmds { fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML, parent_cmd: Option<&Command>) -> Result { - if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::App(current_path.to_string()), parent_cmd)? { + if let Some(c) = Command::from_toml_cmd(current_cmd, CmdSrc::App(current_path.to_string()), parent_cmd)? { if let Some(ref mut sub_cmds) = current_cmd.subcommand { for mut sub in sub_cmds { Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub, Some(&c))?; diff --git a/rust/origen/cli/src/framework/aux_cmds.rs b/rust/origen/cli/src/framework/aux_cmds.rs index e0c9ea77..80f8948d 100644 --- a/rust/origen/cli/src/framework/aux_cmds.rs +++ b/rust/origen/cli/src/framework/aux_cmds.rs @@ -95,7 +95,7 @@ pub struct AuxCmdNamespace { impl AuxCmdNamespace { fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML, parent_cmd: Option<&Command>) -> Result { - if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::Aux(slf.namespace(), current_path.to_string()), parent_cmd)? { + if let Some(c) = Command::from_toml_cmd(current_cmd, CmdSrc::Aux(slf.namespace(), current_path.to_string()), parent_cmd)? { if let Some(ref mut sub_cmds) = current_cmd.subcommand { for mut sub in sub_cmds { Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub, Some(&c))?; diff --git a/rust/origen/cli/src/framework/extensions.rs b/rust/origen/cli/src/framework/extensions.rs index 70b45a19..2da0e3ef 100644 --- a/rust/origen/cli/src/framework/extensions.rs +++ b/rust/origen/cli/src/framework/extensions.rs @@ -150,7 +150,7 @@ impl fmt::Display for ExtensionSource { #[derive(Debug)] pub struct Extension { - pub extends: String, + pub extends: CmdSrc, pub in_global_context: Option, pub in_app_context: Option, pub on_env: Option>, @@ -167,12 +167,12 @@ impl Extension { on_env: ext.on_env, opts: None, source: ext_source, - extends: ext.extend, + extends: CmdSrc::new(&ext.extend)?, }; if !slf.applies()? { return Ok(None) } - slf.opts = from_toml_opts!(ext.opt, &slf.extends, &slf.source, Some(&slf.extends)); + slf.opts = from_toml_opts!(ext.opt, &slf.extends.to_string(), Some(&slf.source.to_string())); if let Some(opts) = slf.opts.as_mut() { for opt in opts { opt.help += &format!(" [Extended from {}]", diff --git a/rust/origen/cli/src/framework/helps.rs b/rust/origen/cli/src/framework/helps.rs index 6dbe4e92..2563d5c0 100644 --- a/rust/origen/cli/src/framework/helps.rs +++ b/rust/origen/cli/src/framework/helps.rs @@ -184,6 +184,13 @@ impl CmdSrc { _ => bail!("Unknown target scope '{}'. Expected 'origen', 'app', 'aux', or 'plugin'", scope) }) } + + pub fn offset_path(&self) -> &str { + match self { + Self::Core(cmd) | Self::App(cmd) => &cmd, + Self::Plugin(_, cmd) | Self::Aux(_, cmd) => &cmd + } + } } impl fmt::Display for CmdSrc { diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index 119d2aa0..51df3d90 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -78,21 +78,21 @@ macro_rules! from_toml_args { #[macro_export] macro_rules! from_toml_opts { - ($toml_opts: expr, $cmd_path: expr, $parent: expr) => { - crate::from_toml_opts!($toml_opts, $cmd_path, $parent, None::<&str>) + ($toml_opts: expr, $cmd_path: expr) => { + crate::from_toml_opts!($toml_opts, $cmd_path, None::<&str>) }; - ($toml_opts: expr, $cmd_path: expr, $parent: expr, $ext: expr) => {{ + ($toml_opts: expr, $cmd_path: expr, $ext_from: expr) => {{ let mut current_names: Vec> = vec!(); $toml_opts.as_ref() .map(|opts| opts.iter() .filter_map( |o| { if let Some(i) = current_names.iter().position( |n| *n == Some(&o.name)) { - if $ext.is_some() { + if let Some(ext) = $ext_from { crate::log_err_processing_cmd!( $cmd_path, "Option '{}' extended from {} is already present. Subsequent occurrences will be skipped (first occurrence at index {})", &o.name, - $parent, + ext, i ); } else { @@ -106,12 +106,12 @@ macro_rules! from_toml_opts { current_names.push(None); None } else if crate::uses_reserved_prefix!(o.name) { - if $ext.is_some() { + if let Some(ext) = $ext_from { crate::log_err_processing_cmd!( $cmd_path, "Option '{}' extended from {} uses reserved prefix '{}'. This option will not be available", &o.name, - $parent, + ext, crate::framework::extensions::EXT_BASE_NAME ); } else { @@ -126,7 +126,7 @@ macro_rules! from_toml_opts { None } else { current_names.push(Some(&o.name)); - Some(crate::framework::Opt::from_toml(o, $cmd_path, $parent, $ext)) + Some(crate::framework::Opt::from_toml(o, $cmd_path, $ext_from)) } }) .collect::>()) @@ -219,19 +219,16 @@ pub struct Command { pub args: Option>, pub opts: Option>, pub subcommands: Option>, - // Name offset from the command type (e.g., cmd.subc, instead of origen.cmd.subc, or plugin.pl.cmd.subc) - pub full_name: String, pub add_mode_opt: Option, pub add_target_opt: Option, - // FOR_PR seems src not parent - pub parent: CmdSrc, + pub cmd_path: CmdSrc, pub in_global_context: Option, pub in_app_context: Option, pub on_env: Option>, } impl Command { - pub fn from_toml_cmd(cmd: &CommandTOML, cmd_path: &str, parent: CmdSrc, parent_cmd: Option<&Self>) -> Result> { + pub fn from_toml_cmd(cmd: &CommandTOML, cmd_path: CmdSrc, parent_cmd: Option<&Self>) -> Result> { let mut slf = Self { name: cmd.name.to_owned(), help: cmd.help.to_owned(), @@ -239,7 +236,6 @@ impl Command { args: None, opts: None, subcommands: None, - full_name: cmd_path.to_string(), add_mode_opt: cmd.add_mode_opt.or_else(|| { if let Some(p) = parent_cmd { p.add_mode_opt.to_owned() @@ -254,7 +250,7 @@ impl Command { None } }), - parent: parent, + cmd_path: cmd_path, in_global_context: cmd.in_global_context, in_app_context: cmd.in_app_context, on_env: cmd.on_env.to_owned(), @@ -262,9 +258,9 @@ impl Command { if !slf.applies()? { return Ok(None) } - let fp = slf.parent.to_string(); + let fp = slf.cmd_path.to_string(); slf.args = from_toml_args!(cmd.arg, &fp); - slf.opts = from_toml_opts!(cmd.opt, &fp, &slf.parent); + slf.opts = from_toml_opts!(cmd.opt, &fp); if let Some(args) = slf.args.as_ref() { if let Some(opts) = slf.opts.as_mut() { opts.retain(|o| { @@ -283,7 +279,7 @@ impl Command { } } slf.subcommands = cmd.subcommand.as_ref().map(|sub_cmds| - sub_cmds.iter().map(|c| format!("{}.{}", cmd_path, &c.name.to_string())).collect::>() + sub_cmds.iter().map(|c| format!("{}.{}", &slf.offset_path(), &c.name.to_string())).collect::>() ); Ok(Some(slf)) } @@ -295,6 +291,10 @@ impl Command { pub fn add_target_opt(&self) -> bool { self.add_target_opt.unwrap_or(true) } + + pub fn offset_path(&self) -> &str { + self.cmd_path.offset_path() + } } impl Applies for Command { @@ -311,7 +311,7 @@ impl Applies for Command { } fn on_env_error_msg(&self, e: &String) -> String { - format!("Failed to parse 'on_env' '{}', for command {}", e, self.full_name) + format!("Failed to parse 'on_env' '{}', for command {}", e, self.offset_path()) } } @@ -610,14 +610,12 @@ pub struct Opt { pub full_name: Option, } -use core::fmt::Display; impl Opt { - // FOR_PR is cmd_path/parent the same here? - fn from_toml(opt: &OptTOML, cmd_path: &str, parent: &dyn Display, ext: Option<&str>) -> Self { + fn from_toml(opt: &OptTOML, cmd_path: &str, ext_from: Option<&str>) -> Self { macro_rules! gen_err { ($msg:tt $(,)? $($arg:expr),*) => {{ - if ext.is_some() { - log_err_processing_cmd!(cmd_path, concat!("Option '{}' extended from {} ", $msg), opt.name, parent, $($arg),*); + if let Some(ext) = ext_from { + log_err_processing_cmd!(cmd_path, concat!("Option '{}' extended from {} ", $msg), opt.name, ext, $($arg),*); } else { log_err_processing_cmd!(cmd_path, concat!("Option '{}' ", $msg), opt.name, $($arg),*); } @@ -767,7 +765,7 @@ where cmd = apply_args(args, cmd); } - let mut cache = CmdOptCache::new(cmd_def.parent.to_string()); + let mut cache = CmdOptCache::new(cmd_def.cmd_path.to_string()); if let Some(opts) = cmd_def.opts.as_ref() { cmd = apply_opts(opts, cmd, &mut cache, None); } @@ -784,8 +782,8 @@ where } cmd = cmd.subcommand_negates_reqs(true); } - cmd = exts(&cmd_def.full_name, cmd, &mut cache); - cmd = apply_helps(&cmd_def.full_name, cmd); + cmd = exts(&cmd_def.offset_path(), cmd, &mut cache); + cmd = apply_helps(&cmd_def.offset_path(), cmd); cmd } @@ -812,13 +810,7 @@ pub (crate) fn apply_args<'a>(args: &'a Vec, mut cmd: App<'a>) -> App<'a> { if let Some(r) = arg_def.required { arg = arg.required(r); - // arg = arg.setting(clap::builder::ArgSettings::Required); } - - // FOR_PR is hidden arg a thing? - // if arg_def.hidden.is_some() { - // arg = arg.hidden(arg_def.hidden.unwrap()) - // } cmd = cmd.arg(arg); } cmd diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index c1111f34..d605cf9c 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -101,7 +101,7 @@ pub struct Plugin { impl Plugin { fn _add_cmd(slf: &mut Self, current_path: String, current_cmd: &mut CommandTOML, parent_cmd: Option<&Command>) -> Result { - if let Some(c) = Command::from_toml_cmd(current_cmd, ¤t_path, CmdSrc::Plugin(slf.name.to_owned(), current_path.to_string()), parent_cmd)? { + if let Some(c) = Command::from_toml_cmd(current_cmd, CmdSrc::Plugin(slf.name.to_owned(), current_path.to_string()), parent_cmd)? { if let Some(ref mut sub_cmds) = current_cmd.subcommand { for mut sub in sub_cmds { Self::_add_cmd(slf, format!("{}.{}", current_path, &sub.name), &mut sub, Some(&c))?; diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py index 45bd149e..66b3c474 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py @@ -246,13 +246,13 @@ def test_ext_stacking_help_msg(self): help = cmd.get_help_msg() help.assert_args(cmd.single_arg) help.assert_opts( - cmd.ext_action, + cmd.exts_workout_action, cmd.flag_opt, "help", cmd.pl_ext_stacking_from_aux_action, cmd.pl_ext_stacking_from_aux_flag, - cmd.pl_the_2nd_ext_action, - cmd.pl_the_2nd_ext_flag, + cmd.python_plugin_the_second_action, + cmd.python_plugin_the_second_flag, "v", "vk", ) @@ -268,40 +268,44 @@ def test_ext_stacking(self): out = cmd.run( self.sv, cmd.flag_opt.ln_to_cli(), - cmd.ext_action.ln_to_cli(), *actions, + cmd.exts_workout_action.ln_to_cli(), *actions, cmd.pl_ext_stacking_from_aux_action.ln_to_cli(), *actions, cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), - cmd.pl_the_2nd_ext_action.ln_to_cli(), *actions, - cmd.pl_the_2nd_ext_flag.ln_to_cli(), + cmd.python_plugin_the_second_action.ln_to_cli(), *actions, + cmd.python_plugin_the_second_flag.ln_to_cli(), ) cmd.assert_args( out, (cmd.single_arg, self.sv), (cmd.flag_opt, 1), - (cmd.ext_action, actions), + (cmd.exts_workout_action, actions), (cmd.pl_ext_stacking_from_aux_action, actions), (cmd.pl_ext_stacking_from_aux_flag, 2), - (cmd.pl_the_2nd_ext_action, actions), - (cmd.pl_the_2nd_ext_flag, 1), + (cmd.python_plugin_the_second_action, actions), + (cmd.python_plugin_the_second_flag, 1), ) def test_manipulating_other_ext_args(self): cmd = self.cmd - actions = ["update_flag_opts"] + actions = [ + "inc_flag__cmd__flag_opt", + "inc_flag__aux_ext__pl_ext_stacking_from_aux_flag", + "inc_flag__plugin_ext__python_plugin_the_second_flag" + ] out = cmd.run( self.sv, cmd.flag_opt.ln_to_cli(), - cmd.ext_action.ln_to_cli(), *actions, + cmd.exts_workout_action.ln_to_cli(), *actions, cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), cmd.pl_ext_stacking_from_aux_flag.ln_to_cli(), - cmd.pl_the_2nd_ext_flag.ln_to_cli(), + cmd.python_plugin_the_second_flag.ln_to_cli(), ) cmd.assert_args( out, (cmd.single_arg, self.sv), (cmd.flag_opt, 2), - (cmd.ext_action, actions), + (cmd.exts_workout_action, actions), (cmd.pl_ext_stacking_from_aux_flag, 3, {"Before": 2}), - (cmd.pl_the_2nd_ext_flag, 2, {"Before": 1}), + (cmd.python_plugin_the_second_flag, 2, {"Before": 1}), ) def test_subc_ext_stacking_help_msg(self): @@ -309,13 +313,13 @@ def test_subc_ext_stacking_help_msg(self): help = subc.get_help_msg() help.assert_args(subc.single_arg) help.assert_opts( - subc.ext_action_subc, + subc.exts_workout_action_subc, subc.flag_opt, "help", subc.pl_ext_stacking_from_aux_action_subc, subc.pl_ext_stacking_from_aux_flag_subc, - subc.pl_the_2nd_ext_action_subc, - subc.pl_the_2nd_ext_flag_subc, + subc.python_plugin_the_second_action_subc, + subc.python_plugin_the_second_flag_subc, "v", "vk", ) @@ -331,17 +335,17 @@ def test_subc_ext_stacking(self): out = subc.run( self.sv, subc.flag_opt.ln_to_cli(), - subc.ext_action_subc.ln_to_cli(), *actions, + subc.exts_workout_action_subc.ln_to_cli(), *actions, subc.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), subc.pl_ext_stacking_from_aux_flag_subc.ln_to_cli(), - subc.pl_the_2nd_ext_flag_subc.ln_to_cli(), + subc.python_plugin_the_second_flag_subc.ln_to_cli(), ) subc.assert_args( out, (subc.single_arg, self.sv), (subc.flag_opt, 1), - (subc.ext_action_subc, actions), + (subc.exts_workout_action_subc, actions), (subc.pl_ext_stacking_from_aux_flag_subc, 2), - (subc.pl_the_2nd_ext_flag_subc, 1), + (subc.python_plugin_the_second_flag_subc, 1), ) class TestExtendingAuxCmds(Common): diff --git a/test_apps/python_plugin_the_second/python_plugin_the_second/commands.toml b/test_apps/python_plugin_the_second/python_plugin_the_second/commands.toml index 66627d85..f44e1faf 100644 --- a/test_apps/python_plugin_the_second/python_plugin_the_second/commands.toml +++ b/test_apps/python_plugin_the_second/python_plugin_the_second/commands.toml @@ -2,24 +2,24 @@ extend = "plugin.python_plugin.plugin_test_ext_stacking" [[extension.opt]] - name = "pl_the_2nd_ext_action" + name = "python_plugin_the_second_action" multiple = true help = "Action from pl_the_2nd plugin" [[extension.opt]] - name = "pl_the_2nd_ext_flag" + name = "python_plugin_the_second_flag" help = "Flag from pl_the_2nd plugin" [[extension]] extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" [[extension.opt]] - name = "pl_the_2nd_ext_action_subc" + name = "python_plugin_the_second_action_subc" multiple = true help = "Action from pl_the_2nd plugin subc" [[extension.opt]] - name = "pl_the_2nd_ext_flag_subc" + name = "python_plugin_the_second_flag_subc" help = "Flag from pl_the_2nd plugin subc" [[extension]] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml index 94bd48ca..71983402 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout.toml @@ -54,7 +54,7 @@ help = "Extend plugin command's subcommand from aux command" extend = "plugin.python_plugin.plugin_test_ext_stacking" [[extension.opt]] - name = "ext_action" + name = "exts_workout_action" long = "action" multiple = true help = "Action for the extended opt" @@ -63,7 +63,7 @@ extend = "plugin.python_plugin.plugin_test_ext_stacking" extend = "plugin.python_plugin.plugin_test_ext_stacking.subc" [[extension.opt]] - name = "ext_action_subc" + name = "exts_workout_action_subc" long = "action" multiple = true help = "Action for the extended opt subc" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py index ea75e7b6..eb4549b1 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking.py @@ -1,68 +1,6 @@ -# FOR_PR cleanup and conform to other method +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str -from origen.boot import before_cmd, after_cmd, clean_up - - -import origen -def do_action(actions, phase): - if actions: - for action in actions: - print(f"Start Action {phase} CMD: {action}") - if action == "show_cmd_args": - print(origen.current_command.args) - if action == "show_ext_args": - print({ext_name: ext.args for ext_name, ext in origen.current_command.exts.items()}) - # print(f"{ext_name} args: {ext.args}") - # print(origen.current_command.exts["exts_workout"].args) - if action == "update_cmd_args": - if phase == "Before": - origen.command.args["single_arg"] = "updated" - if action == "clear_cmd_args": - origen.command.args["single_val"] = None - if action == "before_cmd_exception": - raise RuntimeError("'before_cmd_exception' encountered!") - if action == "update_ext_workout_args": - if phase == "Before": - args = origen.current_command.exts["aux.exts_workout"].args - # Increment the counter - args["flag_extension"] += 1 - - # Append to a multi-arg - args["multi_val_opt"].append("update_mv_opt") - - # Overwrite an arg - args["single_val_opt"] = "update_sv_opt" - - # Set a new arg - args["new_arg"] = "new_arg_for_ext" - if action == "update_flag_opts": - if phase == "Before": - origen.current_command.args["flag_opt"] += 1 - # origen.current_command.exts["aux.exts_workout"].args["flag_extension"] += 1 - origen.current_command.exts["aux.pl_ext_stacking_from_aux"].args["pl_ext_stacking_from_aux_flag"] += 1 - origen.current_command.exts["plugin.python_plugin_the_second"].args["pl_the_2nd_ext_flag"] += 1 - print(f"End Action {phase} CMD: {action}") - -action_opt = "ext_action" - -@before_cmd -def before(**args): - print(before_cmd_ext_args_str(args)) - action = args.get(action_opt, None) - if action: - do_action(action, "Before") - -@after_cmd -def after(**args): - print(after_cmd_ext_args_str(args)) - action = args.get(action_opt, None) - if action: - do_action(action, "After") - -@clean_up -def clean_up(**args): - print(clean_up_ext_args_str(args)) - action = args.get(action_opt, None) - if action: - do_action(action, "CleanUp") +@on_load +def load_ext(mod): + apply_ext_output_args(mod) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking/subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking/subc.py index 727a7699..eb4549b1 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking/subc.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/exts_workout/plugin/python_plugin/plugin_test_ext_stacking/subc.py @@ -1,16 +1,6 @@ -# FOR_PR switch to on-load -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str -from origen.boot import before_cmd, after_cmd, clean_up +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load - -@before_cmd -def before(**args): - print(before_cmd_ext_args_str(args)) - -@after_cmd -def after(**args): - print(after_cmd_ext_args_str(args)) - -@clean_up -def clean_up(**args): - print(clean_up_ext_args_str(args)) +@on_load +def load_ext(mod): + apply_ext_output_args(mod) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py index c0ada672..8cf5885c 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/cmd_models/exts.py @@ -154,7 +154,7 @@ def partition_exts(cls, exts): "exts_workout", cli.cmd.SrcTypes.AUX, CmdExtOpt( - "ext_action", + "exts_workout_action", multi=True, help="Action for the extended opt", ln="action", @@ -177,12 +177,12 @@ def partition_exts(cls, exts): "python_plugin_the_second", cli.cmd.SrcTypes.PLUGIN, CmdExtOpt( - "pl_the_2nd_ext_action", + "python_plugin_the_second_action", help="Action from pl_the_2nd plugin", multi=True, ), CmdExtOpt( - "pl_the_2nd_ext_flag", + "python_plugin_the_second_flag", help="Flag from pl_the_2nd plugin", ), ) @@ -194,7 +194,7 @@ def partition_exts(cls, exts): "exts_workout", cli.cmd.SrcTypes.AUX, CmdExtOpt( - "ext_action_subc", + "exts_workout_action_subc", multi=True, help="Action for the extended opt subc", ln="action", @@ -217,12 +217,12 @@ def partition_exts(cls, exts): "python_plugin_the_second", cli.cmd.SrcTypes.PLUGIN, CmdExtOpt( - "pl_the_2nd_ext_action_subc", + "python_plugin_the_second_action_subc", help="Action from pl_the_2nd plugin subc", multi=True, ), CmdExtOpt( - "pl_the_2nd_ext_flag_subc", + "python_plugin_the_second_flag_subc", help="Flag from pl_the_2nd plugin subc", ), ), diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py index 9f184001..8b6563a4 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py @@ -41,8 +41,6 @@ def do_action(actions, phase): if is_cmd == "cmd": args = origen.current_command.args else: - print("Exts:") - print(origen.current_command.exts.keys()) ext = f.rsplit("_flag", 1)[0] t = is_cmd.split("_")[0] args = origen.current_command.exts[f"{t}.{ext}"].args From 19a4625fca3b081b86a58b1f9ddb24a6e7797354 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 28 May 2023 20:05:30 -0500 Subject: [PATCH 040/200] Continue cmds PR cleanup and additional tests --- python/origen/origen/application.py | 14 ++++ python/origen/origen/boot.py | 7 +- .../helpers/regressions/cli/help_msg.py | 3 +- rust/origen/cli/src/commands/mod.rs | 2 +- rust/origen/cli/src/framework/app_cmds.rs | 10 ++- rust/origen/cli/src/python.rs | 4 - .../invalid.toml | 0 .../python_app/config/cmd_tomls/invalid2.toml | 7 ++ .../python_app/config/cmd_tomls/simple.toml | 11 +++ .../python_app/config/cmd_tomls/simple2.toml | 11 +++ .../config/test_case_cmds/commands.toml | 7 -- .../example/commands/simple2_with_arg.py | 1 + .../example/commands/simple_with_arg.py | 1 + test_apps/python_app/tests/cli/shared.py | 78 ++++++++++++++++++- .../tests/cli/tests__app_cmd_building.py | 71 ++++++++++++++--- .../python_app/tests/cli/tests__core_cmds.py | 34 +------- .../tests/cli/tests__cmd__credentials.py | 20 +---- 17 files changed, 199 insertions(+), 82 deletions(-) rename test_apps/python_app/config/{test_case_cmds => cmd_tomls}/invalid.toml (100%) create mode 100644 test_apps/python_app/config/cmd_tomls/invalid2.toml create mode 100644 test_apps/python_app/config/cmd_tomls/simple.toml create mode 100644 test_apps/python_app/config/cmd_tomls/simple2.toml delete mode 100644 test_apps/python_app/config/test_case_cmds/commands.toml create mode 100644 test_apps/python_app/example/commands/simple2_with_arg.py create mode 100644 test_apps/python_app/example/commands/simple_with_arg.py diff --git a/python/origen/origen/application.py b/python/origen/origen/application.py index 5238e7e4..05e06e69 100644 --- a/python/origen/origen/application.py +++ b/python/origen/origen/application.py @@ -79,6 +79,20 @@ def python_dir(self): ''' An alias for app_dir ''' return self._app_dir + # TEST_NEEDED app.config_dir + @property + def config_dir(self): + return self.root.joinpath("config") + + # TEST_NEEDED app.commands_dir + @property + def commands_dir(self): + d = self.app_dir.joinpath("commands") + if d.exists(): + return d + else: + return None + @property def session(self): ''' Return this app's session store''' diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 2f061689..e4f46dd9 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -65,8 +65,8 @@ def mod_from_modulized_path(root, sub_parts): path = pathlib.Path(f"{root.joinpath('.'.join(sub_parts))}.py") if not path.exists(): paths = [path] - modulized_path = pathlib.Path(root) if len(sub_parts) > 1: + modulized_path = pathlib.Path(root) for i, sub in enumerate(sub_parts[:-1]): modulized_path = modulized_path.joinpath(sub) if modulized_path.exists(): @@ -79,10 +79,7 @@ def mod_from_modulized_path(root, sub_parts): return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] else: - path = pathlib.Path(f"{modulized_path}/{sub_parts[-1]}.py") - if not path.exists(): - paths.append(path) - return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] + return [f"From root '{root}', searched:", *[p.relative_to(root) for p in paths]] return wrap_mod_from_file(path) def call_user_cmd(cmd_type): diff --git a/python/origen/origen/helpers/regressions/cli/help_msg.py b/python/origen/origen/helpers/regressions/cli/help_msg.py index bb0ae394..ab473312 100644 --- a/python/origen/origen/helpers/regressions/cli/help_msg.py +++ b/python/origen/origen/helpers/regressions/cli/help_msg.py @@ -444,4 +444,5 @@ def assert_cmd(self, cmd): @property def logged_errors(self): - return list(filter(lambda l: "[ERROR] (" in l, self.text.split("\n"))) \ No newline at end of file + from . import CLI + return CLI.extract_logged_errors(self.text) \ No newline at end of file diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 8ede2989..546eb3bb 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -145,7 +145,7 @@ pub fn launch(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: } continue; } else if arg_n == "mode" { - // FOR_PR + // O1_MODE_SUPPORT todo!("Mode argument is not currently supported!"); } diff --git a/rust/origen/cli/src/framework/app_cmds.rs b/rust/origen/cli/src/framework/app_cmds.rs index 5b5ad531..c529b099 100644 --- a/rust/origen/cli/src/framework/app_cmds.rs +++ b/rust/origen/cli/src/framework/app_cmds.rs @@ -49,11 +49,17 @@ impl AppCmds { let command_config: CommandsToml = match toml::from_str(&content) { Ok(x) => x, Err(e) => { - bail!("Malformed commands.toml: {}", e); + log_error!("Malformed Commands TOML '{}': {}", &commands_toml.display(), e); + continue; } }; - // FOR_PR error on help given? + // FEATURE: help on cmd nspace (app) error on help given? // slf.help = command_config.help.to_owned(); + // Help for the app-cmd namespace is not supported. Origen provides the help message. + // Display a warning saying this will have not effect + // if command_config.help.is_some() { + // log_warning!("Custom help messages from app commands are not supported and will be ignored (from '{}')", commands_toml.display()) + // } if let Some(commands) = command_config.command { for mut cmd in commands { diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index 8ed4dd0c..f6497aee 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -179,10 +179,6 @@ pub fn run(code: &str) -> Result { cmd.arg(&PYTHON_CONFIG.command); cmd.arg("-c"); cmd.arg(&code); - // FOR_PR are these needed? - cmd.arg("-"); - cmd.arg(&format!("verbosity={}", origen::LOGGER.verbosity())); - cmd.arg(&vks_to_cmd!()); // current_exe returns the Python process once it gets underway, so pass in the CLI // location for Origen to use (used to resolve Origen config files) if let Ok(p) = std::env::current_exe() { diff --git a/test_apps/python_app/config/test_case_cmds/invalid.toml b/test_apps/python_app/config/cmd_tomls/invalid.toml similarity index 100% rename from test_apps/python_app/config/test_case_cmds/invalid.toml rename to test_apps/python_app/config/cmd_tomls/invalid.toml diff --git a/test_apps/python_app/config/cmd_tomls/invalid2.toml b/test_apps/python_app/config/cmd_tomls/invalid2.toml new file mode 100644 index 00000000..f927395a --- /dev/null +++ b/test_apps/python_app/config/cmd_tomls/invalid2.toml @@ -0,0 +1,7 @@ +[[command]] +name = "invalid2" +test = "invalid toml format" + +[[command]] +name = "invalid2" +test = "invalid toml format diff --git a/test_apps/python_app/config/cmd_tomls/simple.toml b/test_apps/python_app/config/cmd_tomls/simple.toml new file mode 100644 index 00000000..42370155 --- /dev/null +++ b/test_apps/python_app/config/cmd_tomls/simple.toml @@ -0,0 +1,11 @@ +[[command]] + name = "simple" + help = "Simple App CMD" + +[[command]] + name = "simple_with_arg" + help = "Simple App CMD with Arg" + + [[command.arg]] + name = "arg" + help = "Simple arg" diff --git a/test_apps/python_app/config/cmd_tomls/simple2.toml b/test_apps/python_app/config/cmd_tomls/simple2.toml new file mode 100644 index 00000000..09c2bf30 --- /dev/null +++ b/test_apps/python_app/config/cmd_tomls/simple2.toml @@ -0,0 +1,11 @@ +[[command]] + name = "simple2" + help = "Simple App CMD - 2" + +[[command]] + name = "simple2_with_arg" + help = "Simple App CMD with Arg - 2" + + [[command.arg]] + name = "arg" + help = "Simple arg" diff --git a/test_apps/python_app/config/test_case_cmds/commands.toml b/test_apps/python_app/config/test_case_cmds/commands.toml deleted file mode 100644 index f26f67c8..00000000 --- a/test_apps/python_app/config/test_case_cmds/commands.toml +++ /dev/null @@ -1,7 +0,0 @@ -[[command]] - name = "echo" - help = "Echo from the application" - - [[command.arg]] - name = "input" - help = "Input to echo" diff --git a/test_apps/python_app/example/commands/simple2_with_arg.py b/test_apps/python_app/example/commands/simple2_with_arg.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/simple2_with_arg.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/example/commands/simple_with_arg.py b/test_apps/python_app/example/commands/simple_with_arg.py new file mode 100644 index 00000000..c30a3947 --- /dev/null +++ b/test_apps/python_app/example/commands/simple_with_arg.py @@ -0,0 +1 @@ +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_app/tests/cli/shared.py b/test_apps/python_app/tests/cli/shared.py index 6925cded..70d7dc85 100644 --- a/test_apps/python_app/tests/cli/shared.py +++ b/test_apps/python_app/tests/cli/shared.py @@ -1,4 +1,4 @@ -import pytest, pathlib +import pytest, pathlib, origen from origen.helpers.regressions import cli from tests.shared import PythonAppCommon @@ -415,9 +415,85 @@ def __init__(self): def arg_opt_warmup(self): return self.warmup_cmd + class CmdTOMLs(SrcBase): + root = origen.app.root.joinpath("config/cmd_tomls") + invalid_toml = root.joinpath("invalid.toml") + invalid2_toml = root.joinpath("invalid2.toml") + simple_toml = root.joinpath("simple.toml") + simple2_toml = root.joinpath("simple2.toml") + + def __init__(self): + self.src_type = cli.SrcTypes.APP + self.name = "example" + self.app_cmds = CLIShared.in_app_cmds.app.commands.extend([]) + self.app_cmds.replace_subcmds( + Cmd( + "simple", + help = "Simple App CMD", + ), + Cmd( + "simple_with_arg", + help = "Simple App CMD with Arg", + args=[ + CmdArg("arg", help="Simple arg"), + ] + ), + Cmd( + "simple2", + help = "Simple App CMD - 2", + ), + Cmd( + "simple2_with_arg", + help = "Simple App CMD with Arg - 2", + args=[ + CmdArg("arg", help="Simple arg"), + ] + ) + ) + app_cmds = AppCmds() app_commands = app_cmds empty_app = EmptyApp() + cmd_tomls = CmdTOMLs() + + class CmdShortcuts(): + @property + def app(self): + return { + 'arg_opt_warmup': 'arg_opt_warmup', + "examples": "examples", + "playground": "playground", + "y": "playground", + "nested_app_cmds": "nested_app_cmds", + "disabling_app_opts": "disabling_app_opts", + } + + @property + def pl(self): + return { + "plugin_says_hi": ("python_plugin", "plugin_says_hi"), + "plugin_test_args": ("python_plugin", "plugin_test_args"), + "plugin_test_ext_stacking": ("python_plugin", "plugin_test_ext_stacking"), + "echo": ("python_plugin", "echo"), + "do_actions": ("python_plugin", "do_actions"), + "disabling_app_opts_from_pl": ("python_plugin", "disabling_app_opts_from_pl"), + } + + @property + def aux(self): + return { + "dummy_cmd": ("dummy_cmds", "dummy_cmd") + } + + @property + def simple_cmd_tomls(self): + return { + "simple": "simple", + "simple_with_arg": "simple_with_arg", + "simple2": "simple2", + "simple2_with_arg": "simple2_with_arg", + } + cmd_shortcuts = CmdShortcuts() _no_config_run_opts = { "with_configs": CLIShared.configs.suppress_plugin_collecting_config, diff --git a/test_apps/python_app/tests/cli/tests__app_cmd_building.py b/test_apps/python_app/tests/cli/tests__app_cmd_building.py index 512d5bfb..4e9c388e 100644 --- a/test_apps/python_app/tests/cli/tests__app_cmd_building.py +++ b/test_apps/python_app/tests/cli/tests__app_cmd_building.py @@ -1,4 +1,4 @@ -import pytest +import pytest, origen from .shared import CLICommon, Cmd, CmdOpt, CmdArg class T_AppCmdBuilding(CLICommon): @@ -85,16 +85,65 @@ def test_nested_cmds(self, cmd, lvl, sublvl): out = cmd.run() assert f"Hi from 'nested_app_cmds' level {lvl}{ ' (' + sublvl + ')' if sublvl else ''}!" in out + def test_enumerated_tomls(self): + enum_envs = {"with_env": {"ORIGEN_APP_COMMANDS": ",".join([ + str(self.cmd_tomls.simple_toml.relative_to(origen.app.config_dir)), + str(self.cmd_tomls.simple2_toml), + ])}} + + help = self.in_app_cmds.origen.get_help_msg(run_opts=enum_envs) + assert help.app_cmd_shortcuts == self.cmd_shortcuts.simple_cmd_tomls + + help = self.in_app_cmds.app.commands.get_help_msg(run_opts=enum_envs) + help.assert_subcmds( + "help", + self.cmd_tomls.simple, + self.cmd_tomls.simple2, + self.cmd_tomls.simple2_with_arg, + self.cmd_tomls.simple_with_arg, + ) + + cmd = self.cmd_tomls.simple_with_arg + out = cmd.run("hi", run_opts=enum_envs) + cmd.assert_args( + out, + (cmd.arg, "hi"), + ) + + cmd = self.cmd_tomls.simple2_with_arg + out = cmd.run("hi", run_opts=enum_envs) + cmd.assert_args( + out, + (cmd.arg, "hi"), + ) + class TestErrorCases(CLICommon): - @pytest.mark.skip def test_invalid_cmd_toml(self): - # FOR_PR need to make app specific - out = self.in_app_cmds.origen.run(with_env={"ORIGEN_APP_COMMANDS": "test_case_cmds/invalid.toml,test_case_cmds/error_cases.toml"}) # run_cli_cmd(["-h"]) #.split("\n\n") - print(out) - help = self.HelpMsg(out) - assert list(help.subcmds.keys()) == ["add_aux_cmd", "cmd_testers", "help", "python_no_app_aux_cmds"] - assert f"Unable to add auxillary commands at '{self.aux_cmd_configs_dir}{os.sep}./invalid_aux_cmd_path.toml' from config '{self.aux_cmd_configs_dir}{os.sep}invalid_aux_cmd_path_config.toml'. The following error was met" in out + missing = "missing_cmd_toml.toml" + env = {"with_env": {"ORIGEN_APP_COMMANDS": ",".join([ + str(self.cmd_tomls.invalid_toml.relative_to(origen.app.config_dir)), + str(self.cmd_tomls.simple_toml.relative_to(origen.app.config_dir)), + str(self.cmd_tomls.invalid2_toml), + str(f"cmd_tomls/{missing}"), # Since not absolute, should compute relative to config/ directory, but not from cmd_tomls + str(self.cmd_tomls.simple2_toml), + ])}} + help = self.in_app_cmds.origen.get_help_msg(run_opts=env) + assert help.app_cmd_shortcuts == self.cmd_shortcuts.simple_cmd_tomls + assert help.pl_cmd_shortcuts == self.cmd_shortcuts.pl + assert help.aux_cmd_shortcuts == self.cmd_shortcuts.aux + errs = help.logged_errors + assert f"Malformed Commands TOML '{self.cmd_tomls.invalid2_toml}'" in errs.pop() + assert f"Malformed Commands TOML '{self.cmd_tomls.invalid_toml}'" in errs.pop() + assert f"Can not locate app commands file '{self.cmd_tomls.root.joinpath(missing)}'" in errs.pop() + assert len(errs) == 0 - @pytest.mark.skip - def test_error_global_and_in_app_setting_used(self): - fail + def test_missing_app_cmd_implementation(self): + env = {"with_env": {"ORIGEN_APP_COMMANDS": ",".join([ + str(self.cmd_tomls.simple_toml.relative_to(origen.app.config_dir)), + ])}} + out = self.cmd_tomls.simple.gen_error(run_opts=env, return_full=True) + errs = self.extract_logged_errors(out["stdout"]) + assert " simple.py" == errs.pop() + assert f" From root '{origen.app.commands_dir}', searched:" == errs.pop() + assert "Could not find implementation for app command 'simple'" == errs.pop() + assert len(errs) == 0 diff --git a/test_apps/python_app/tests/cli/tests__core_cmds.py b/test_apps/python_app/tests/cli/tests__core_cmds.py index 39dfd621..9c745f77 100644 --- a/test_apps/python_app/tests/cli/tests__core_cmds.py +++ b/test_apps/python_app/tests/cli/tests__core_cmds.py @@ -9,34 +9,6 @@ from .core_cmds.plugins import T_Plugins class T_AppWorkspaceCoreCommands(CLICommon): - @property - def cmd_shortcuts__app(self): - return { - 'arg_opt_warmup': 'arg_opt_warmup', - "examples": "examples", - "playground": "playground", - "y": "playground", - "nested_app_cmds": "nested_app_cmds", - "disabling_app_opts": "disabling_app_opts", - } - - @property - def cmd_shortcuts__pl(self): - return { - "plugin_says_hi": ("python_plugin", "plugin_says_hi"), - "plugin_test_args": ("python_plugin", "plugin_test_args"), - "plugin_test_ext_stacking": ("python_plugin", "plugin_test_ext_stacking"), - "echo": ("python_plugin", "echo"), - "do_actions": ("python_plugin", "do_actions"), - "disabling_app_opts_from_pl": ("python_plugin", "disabling_app_opts_from_pl"), - } - - @property - def cmd_shortcuts__aux(self): - return { - "dummy_cmd": ("dummy_cmds", "dummy_cmd") - } - def test_app_workspace_help_message(self): help = self.in_app_cmds.origen.get_help_msg() assert help.root_cmd is True @@ -44,9 +16,9 @@ def test_app_workspace_help_message(self): help.assert_bare_opts() assert set(help.subcmd_names) == set(self.in_app_cmds.all_names_add_help) - assert help.app_cmd_shortcuts == self.cmd_shortcuts__app - assert help.pl_cmd_shortcuts == self.cmd_shortcuts__pl - assert help.aux_cmd_shortcuts == self.cmd_shortcuts__aux + assert help.app_cmd_shortcuts == self.cmd_shortcuts.app + assert help.pl_cmd_shortcuts == self.cmd_shortcuts.pl + assert help.aux_cmd_shortcuts == self.cmd_shortcuts.aux @pytest.mark.parametrize("cmd", CLICommon.in_app_cmds.cmds, ids=CLICommon.in_app_cmds.all_names) def test_core_commands_are_available(self, cmd): diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py index 583ee3cc..b6b1bb08 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py @@ -1,4 +1,3 @@ -# FOR_PR clean up import pytest, origen, origen_metal from .shared import CLICommon @@ -70,19 +69,8 @@ def test_clearing_passwords(self): assert u.datasets["dummy_ldap_ds"].password == "dummy_ldap_ds_pw" assert u.datasets["test2"].password == "test2_pw" assert u.datasets["git"].password == "git_pw" - # import time - # time.sleep(5) - - # Should only clear the 'test' pw - # TODO need to clear all hierarchy - # origen_metal.users.unload() - # origen_metal.sessions.unload() - # origen_metal.frontend.reset() + out = self.global_cmds.creds.run("clear") - # import os - # os.remove(r"C:\Users\nxa13790\Documents\origen\o2_2nd\test_apps\python_no_app\.o2\.session\__user__nxa13790__\__user__") - # import time - # time.sleep(5) assert "Clearing cached password for topmost dataset..." in out origen_metal.sessions.unload() origen_metal.users.unload() @@ -90,13 +78,7 @@ def test_clearing_passwords(self): u.datasets["dummy_ldap_ds"].should_validate_password = False u = origen.current_user u.prompt_for_passwords = False - # origen.boot_users() - # origen.users.remove(u.id) - # origen.users.lookup_current_id(update_current=True) - # u.session.refresh() - # print(u.password) - # TODO update this with "prompt=False" option or something better than expecting an error prompt_err = f"Cannot prompt for passwords for user '{u.id}'. Passwords must be loaded by the config or set directly." with pytest.raises(RuntimeError, match=prompt_err): assert u.password is None From 1b06a8d984c1c3270b4f690679af83d87104c7f1 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Mon, 29 May 2023 13:52:26 -0500 Subject: [PATCH 041/200] Try to fix path difference on Windows regressions. --- rust/origen/src/core/application/config.rs | 4 ++-- rust/origen_metal/src/macros.rs | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/rust/origen/src/core/application/config.rs b/rust/origen/src/core/application/config.rs index 03400b57..77c9b4c3 100644 --- a/rust/origen/src/core/application/config.rs +++ b/rust/origen/src/core/application/config.rs @@ -1,6 +1,6 @@ use crate::utility::location::Location; use crate::exit_on_bad_config; -use origen_metal::config; +use origen_metal::{config, scrub_path}; use origen_metal::config::{Environment, File}; use std::collections::HashMap; use std::path::{Path, PathBuf}; @@ -233,7 +233,7 @@ impl Config { if ct.exists() { retn.push(ct.to_owned()); } else { - log_error!("Can not locate app commands file '{}'", ct.display()) + log_error!("Can not locate app commands file '{}'", scrub_path!(ct).display()) } } } else { diff --git a/rust/origen_metal/src/macros.rs b/rust/origen_metal/src/macros.rs index 158e550a..76cea665 100644 --- a/rust/origen_metal/src/macros.rs +++ b/rust/origen_metal/src/macros.rs @@ -339,3 +339,12 @@ macro_rules! hashmap { h }}; } + +/// Create a new pathbuf, rebuilt from components to resolve OS path differences +/// when displaying paths possibly built from "/", "\", or "\\" used interchangeably +#[macro_export] +macro_rules! scrub_path { + ($path:expr) => {{ + std::path::PathBuf::from_iter($path.components()) + }} +} \ No newline at end of file From f2262ba3839add3ab6205a69972a9c7b378268cf Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 31 May 2023 20:06:07 -0500 Subject: [PATCH 042/200] Continue cleanup or dispositining tasks --- python/origen/origen/__init__.py | 2 + python/origen/origen/application.py | 2 +- python/origen/origen/boot.py | 6 +- python/origen/origen/core/plugins.py | 29 +-- .../helpers/regressions/cli/__init__.py | 6 +- rust/origen/cli/src/commands/_prelude/mod.rs | 2 +- rust/origen/cli/src/commands/mod.rs | 2 +- rust/origen/cli/src/python.rs | 2 +- rust/pyapi/src/plugins.rs | 179 ------------------ .../python_app/tests/app_invocation_test.py | 10 + .../tests/cli/tests__cmd_exts_from_app.py | 2 +- .../tests/cli/tests__extending_app_cmds.py | 2 +- .../tests/cli/tests__intra_cmd_conflicts.py | 2 +- .../tests__intra_cmd_conflicts.py | 2 +- .../tests/cmd_exts/tests__ext_conflicts.py | 8 +- test_apps/python_no_app/tests/test_configs.py | 16 +- .../tests/test_global_invocation.py | 7 +- .../python_plugin/python_plugin/commands.toml | 14 -- .../aux_cmds/ext_conflicts.toml | 5 +- .../cli/__init__.py | 124 +----------- .../cli}/configs/empty.toml | 0 .../cli/error_cases.py | 121 ++++++++++++ 22 files changed, 177 insertions(+), 366 deletions(-) create mode 100644 test_apps/python_app/tests/app_invocation_test.py rename test_apps/{python_no_app/tests => test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli}/configs/empty.toml (100%) create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/error_cases.py diff --git a/python/origen/origen/__init__.py b/python/origen/origen/__init__.py index 5ba00177..fd614e08 100644 --- a/python/origen/origen/__init__.py +++ b/python/origen/origen/__init__.py @@ -38,6 +38,8 @@ def __getattr__(name: str): return users.current_user elif name == "initial_user": return users.initial_user + elif name == "is_app_present": + return status["is_app_present"] elif name in ["command", "current_command", "cmd", "current_cmd"]: return _origen._current_command_ elif name == "core_app": diff --git a/python/origen/origen/application.py b/python/origen/origen/application.py index 05e06e69..9421b6b0 100644 --- a/python/origen/origen/application.py +++ b/python/origen/origen/application.py @@ -134,7 +134,7 @@ def is_plugin(self): def __init__(self, *args, **options): self._compiler = Compiler() self._translator = Translator() - if (origen.app is None) & _origen.is_app_present(): + if (origen.app is None) and origen.is_app_present: self._plugin = False self._root = origen.root self._name = _origen.app_config()["name"] diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index e4f46dd9..41abd8c0 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -104,7 +104,7 @@ def call_user_cmd(cmd_type): exit_proc(1) if mode == None: - if _origen.is_app_present(): + if origen.is_app_present: origen.set_mode(_origen.app_config()["mode"]) else: origen.set_mode(mode) @@ -133,7 +133,7 @@ def call_user_cmd(cmd_type): from origen.core.plugins import from_origen_cli from_origen_cli(plugins) - if _origen.is_app_present(): + if origen.is_app_present: origen.target.setup(targets=([] if targets is False else targets)) if args is None: @@ -241,7 +241,7 @@ def run_ext(phase, continue_on_fail=False): elif command == "interactive": _origen.set_operation("interactive") origen.logger.trace("Starting interactive session (on Python side)") - if _origen.is_app_present: + if origen.is_app_present: origen.target.load() from origen_metal._helpers import interactive diff --git a/python/origen/origen/core/plugins.py b/python/origen/origen/core/plugins.py index 5c078479..718d6f3a 100644 --- a/python/origen/origen/core/plugins.py +++ b/python/origen/origen/core/plugins.py @@ -1,28 +1,13 @@ -# FOR_PR decide if plugins should be implemented here or in pyapi import origen from collections import UserDict import importlib, os from pathlib import Path import _origen -# class Plugin: -# def __init__(self, name, root): -# self.name = name -# self.root = root - def collect_plugins(): pls = Plugins() for n, r in _origen.plugins.get_plugin_roots().items(): pls.register(n) - # parts = l.split("|") - # if len(parts) != 3: - # origen.log.error(f"Malformed output encountered when collecting plugin roots: {l}") - # continue - - # if not parts[0] == "success": - # origen.log_error(f"Unknown status when collecting plugin roots: {parts[0]}") - # else: - # pls.register(parts[1]) origen._plugins = pls return origen._plugins @@ -54,14 +39,6 @@ def register(self, name): self.data[name] = app return app - # def add_plugin(self, name, app): - # self._plugins[name] = app - - # def register_plugin() - - def collect(self): - ... - - def load_from_config(self): - for pl in _origen.config['plugins']['load']: - self._load_pl() \ No newline at end of file + # def load_from_config(self): + # for pl in _origen.config['plugins']['load']: + # self._load_pl() diff --git a/python/origen/origen/helpers/regressions/cli/__init__.py b/python/origen/origen/helpers/regressions/cli/__init__.py index 52085dcd..c782279a 100644 --- a/python/origen/origen/helpers/regressions/cli/__init__.py +++ b/python/origen/origen/helpers/regressions/cli/__init__.py @@ -76,9 +76,11 @@ def eval(cls, *code, **kwargs): else: cmds = global_cmds - error_messages = CoreErrorMessages() - err_msgs = error_messages + + @property + def err_msgs(self): + return self.error_messages @classmethod def extract_logged_errors(cls, text): diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index 4ccf9af8..55584813 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -11,7 +11,7 @@ pub use crate::framework::{ pub use crate::framework::core_cmds::SubCmd; pub use crate::{output_dir_opt, ref_dir_opt}; -// FOR_PR remove this +// TODO clap4.0 remove after update to next clap version pub type RunInput<'a> = &'a clap::ArgMatches; pub use clap_arg_actions::*; diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 546eb3bb..0d4d94fa 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -22,7 +22,7 @@ use crate::python; use crate::{vks_to_cmd, strs_to_cli_arr}; use indexmap::map::IndexMap; -use origen::{LOGGER, STATUS}; // clean_mode # TODO +use origen::{LOGGER, STATUS}; // clean_mode # O1_MODE_SUPPORT clean_mode function available, or remove use std::process::exit; use _prelude::{SetArgTrue, CountArgs}; diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index f6497aee..a1869dd9 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -14,7 +14,7 @@ const PYTHONS: &[&str] = &[ "python3.8", "python3.7", ]; -pub const MIN_PYTHON_VERSION: &str = "3.6.0"; +pub const MIN_PYTHON_VERSION: &str = "3.7.0"; // FOR_PR use more generic macro below #[macro_export] diff --git a/rust/pyapi/src/plugins.rs b/rust/pyapi/src/plugins.rs index d0babb33..b89c5d85 100644 --- a/rust/pyapi/src/plugins.rs +++ b/rust/pyapi/src/plugins.rs @@ -1,4 +1,3 @@ -// FOR_PR figure out what'sn needed here vs. what's staying in FE use pyo3::prelude::*; use pyo3::types::PyDict; use pyo3::wrap_pyfunction; @@ -10,14 +9,10 @@ use pyo3::exceptions::PyKeyError; pub fn define(py: Python, m: &PyModule) -> PyResult<()> { let subm = PyModule::new(py, "plugins")?; - subm.add_wrapped(wrap_pyfunction!(from_origen_cli))?; - subm.add_wrapped(wrap_pyfunction!(default))?; subm.add_wrapped(wrap_pyfunction!(get_plugin_roots))?; subm.add_wrapped(wrap_pyfunction!(display_plugin_roots))?; subm.add_wrapped(wrap_pyfunction!(find_plugin_roots))?; subm.add_wrapped(wrap_pyfunction!(collect_plugin_roots))?; - subm.add_class::()?; - subm.add_class::()?; m.add_submodule(subm)?; Ok(()) } @@ -107,177 +102,3 @@ for dist in importlib_metadata.distributions(): )?; Ok(l.get_item("plugin_paths").ok_or_else( || key_exception!("Error collecting plugin roots: expected 'plugin_paths' key."))?.extract()?) } - -#[pyfunction] -pub fn from_origen_cli(py: Python, plugin_configs: &PyDict) -> PyResult { - Plugins::from_pl_config_dict(py, plugin_configs) -} - -// FOR_PR not sure what's needed from below - -#[pyfunction] -pub fn default(py: Python) -> PyResult { - Plugins::from_roots(py) -} - -// #[pymodule] -// pub fn plugins(_py: Python, m: &PyModule) -> PyResult<()> { -// m.add_wrapped(plugins); -// m.add_class::()?; -// m.add_class::()?; -// Ok(()) -// } - -#[pyclass] -pub struct Plugins { - plugins: IndexMap> -} - -#[pymethods] -impl Plugins { - #[getter] - pub fn plugins<'py>(&self, py: Python<'py>) -> PyResult<&'py PyDict> { - let retn = PyDict::new(py); - for (n, pl) in self.plugins.iter() { - retn.set_item(n, pl)?; - } - Ok(retn) - } - - #[getter] - pub fn names(&self) -> PyResult> { - self.keys() - } - - pub fn get(&self, key: &str) -> PyResult>> { - Ok(if let Some(pl) = self.plugins.get(key) { - // PyDataStoreCategory::autoload_category(cat.borrow(py).into(), py)?; - Some(pl) - } else { - None - }) - } - - fn keys(&self) -> PyResult> { - Ok(self.plugins.keys().map(|k| k.to_string()).collect()) - } - - // TODO dictlike - // fn values(&self) -> PyResult>> { - // Ok(self.plugins.iter().map(|(_, cat)| cat).collect()) - // } - - // TODO dictlike - // fn items(&self) -> PyResult)>> { - // Ok(self - // .plugins - // .iter() - // .map(|(n, cat)| (n.to_string(), cat)) - // .collect()) - // } - - fn __getitem__(&self, key: &str) -> PyResult<&Py> { - if let Some(pl) = self.get(key)? { - Ok(pl) - } else { - key_error!(format!("Unknown plugin '{}'", key)) - } - } - - fn __len__(&self) -> PyResult { - Ok(self.plugins.len()) - } - - fn __iter__(slf: PyRefMut) -> PyResult { - Ok(PluginsIter { - keys: slf.keys().unwrap(), - i: 0, - }) - } -} - -impl Plugins { - pub fn from_pl_config_dict(py: Python, plugin_configs: &PyDict) -> PyResult { - Ok(Self { - plugins: { - let mut plugins = IndexMap::new(); - for (n, pl) in plugin_configs { - let name = n.extract::()?; - plugins.insert(name.to_owned(), { - let cfg = pl.extract::<&PyDict>()?; - let r = cfg.get_item("root").ok_or_else(|| PyKeyError::new_err(format!("A 'root' is required for plugin '{}'", name)))?.extract::()?; - Py::new(py, Plugin { - name: name, - root: r, - })? - }); - } - plugins - } - }) - } - - pub fn from_roots(py: Python) -> PyResult { - let roots = get_plugin_roots(py)?; - Ok(Self { - plugins: { - let mut plugins = IndexMap::new(); - for (n, r) in roots { - let name = n.extract::()?; - let root = r.extract::()?; - plugins.insert(name.to_owned(), Py::new(py, Plugin { name: name, root: root })?); - // plugins.insert(name.to_owned(), { - // let cfg = pl.extract::<&PyDict>()?; - // let r = cfg.get_item("root").ok_or_else(|| PyKeyError::new_err(format!("A 'root' is required for plugin '{}'", name)))?.extract::()?; - // Py::new(py, Plugin { - // name: name, - // root: r, - // })? - // }); - } - plugins - } - }) - } -} - -#[pyclass] -pub struct PluginsIter { - pub keys: Vec, - pub i: usize, -} - -#[pymethods] -impl PluginsIter { - fn __iter__(slf: PyRefMut) -> PyResult> { - Ok(slf.into()) - } - - fn __next__(mut slf: PyRefMut) -> PyResult> { - if slf.i >= slf.keys.len() { - return Ok(None); - } - let name = slf.keys[slf.i].clone(); - slf.i += 1; - Ok(Some(name)) - } -} - -#[pyclass] -pub struct Plugin { - name: String, - root: PathBuf, -} - -#[pymethods] -impl Plugin { - #[getter] - pub fn name(&self) -> PyResult<&String> { - Ok(&self.name) - } - - #[getter] - pub fn root(&self, py: Python) -> PyResult { - Ok(pypath!(py, self.root.display())) - } -} diff --git a/test_apps/python_app/tests/app_invocation_test.py b/test_apps/python_app/tests/app_invocation_test.py new file mode 100644 index 00000000..b0d231d2 --- /dev/null +++ b/test_apps/python_app/tests/app_invocation_test.py @@ -0,0 +1,10 @@ +import origen, _origen + +def test_app_is_none(): + print(origen.app) + assert isinstance(origen.app, origen.application.Base) + +def test_is_app_present(): + assert origen.is_app_present is True + assert _origen.is_app_present() is True + assert origen.status["is_app_present"] is True \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py index dd72314a..9ac66bbc 100644 --- a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py +++ b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py @@ -405,7 +405,7 @@ def test_conflict_msgs(self, exts, cmd_help): for c in reversed(conflicts): m = cmd_conflicts.pop() print(m) - assert self.to_conflict_msg(cmd, c) in m + assert self.err_msgs.to_conflict_msg(cmd, c) in m def test_exts(self, exts): cmd = self.cmd diff --git a/test_apps/python_app/tests/cli/tests__extending_app_cmds.py b/test_apps/python_app/tests/cli/tests__extending_app_cmds.py index e3451e25..a99e3d0a 100644 --- a/test_apps/python_app/tests/cli/tests__extending_app_cmds.py +++ b/test_apps/python_app/tests/cli/tests__extending_app_cmds.py @@ -286,7 +286,7 @@ def test_conflict_messages(self, exts): ] for c in reversed(conflicts): m = self.cmd_conflicts.pop() - assert self.to_conflict_msg(self.cmd, c) in m + assert self.err_msgs.to_conflict_msg(self.cmd, c) in m assert len(self.cmd_conflicts) == 0 def test_conflicts_resolve_correctly(self, exts): diff --git a/test_apps/python_app/tests/cli/tests__intra_cmd_conflicts.py b/test_apps/python_app/tests/cli/tests__intra_cmd_conflicts.py index 9359a275..c5314b40 100644 --- a/test_apps/python_app/tests/cli/tests__intra_cmd_conflicts.py +++ b/test_apps/python_app/tests/cli/tests__intra_cmd_conflicts.py @@ -42,7 +42,7 @@ def test_help_msg(self): def test_conflicts_during_cmd_building(self): for c in reversed(self.conflicts): m = self.cmd_conflicts.pop() - assert self.to_conflict_msg(self.cmd, c) in m + assert self.err_msgs.to_conflict_msg(self.cmd, c) in m def test_all_error_messages_checked(self): assert len(self.cmd_conflicts) == 0 diff --git a/test_apps/python_no_app/tests/cmd_building/tests__intra_cmd_conflicts.py b/test_apps/python_no_app/tests/cmd_building/tests__intra_cmd_conflicts.py index a7e071a2..47749aae 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__intra_cmd_conflicts.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__intra_cmd_conflicts.py @@ -38,7 +38,7 @@ def test_help_msg(self): def test_conflicts_during_cmd_building(self): for c in reversed(self.conflicts): m = self.cmd_conflicts.pop() - assert self.to_conflict_msg(self.cmd, c) in m + assert self.err_msgs.to_conflict_msg(self.cmd, c) in m def test_all_error_messages_checked(self): assert len(self.cmd_conflicts) == 0 diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py index 28bed75f..984a2199 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py @@ -80,7 +80,7 @@ def test_help_msg(self, ec, tas): def test_conflict_messages(self): for c in reversed(self.conflicts): - assert self.to_conflict_msg(self.cmd, c) in self.cmd_conflicts.pop() + assert self.err_msgs.to_conflict_msg(self.cmd, c) in self.cmd_conflicts.pop() def test_error_messages_checked(self): assert len(self.cmd_conflicts) == 0 @@ -201,7 +201,7 @@ def test_conflict_messages(self): conflicts = self.config["conflicts_list"] for c in reversed(conflicts): - m = self.to_conflict_msg(cmd, c) + m = self.err_msgs.to_conflict_msg(cmd, c) assert m in self.cmd_conflicts.pop() def test_all_errors_checked(self): @@ -297,7 +297,7 @@ def test_ext_arg_conflicts_with_core_cmd_msgs(self): conflicts = self.eval_config["conflicts_list"] for c in reversed(conflicts): - m = self.to_conflict_msg(cmd, c) + m = self.err_msgs.to_conflict_msg(cmd, c) assert m in self.eval_cmd_conflicts.pop() assert len(self.eval_cmd_conflicts) == 0 @@ -333,6 +333,6 @@ def test_ext_opt_conflicts_with_core_cmd(self): conflicts = self.creds_clear_config["conflicts_list"] for c in reversed(conflicts): - m = self.to_conflict_msg(cmd, c) + m = self.err_msgs.to_conflict_msg(cmd, c) assert m in self.creds_clear_cmd_conflicts.pop() assert len(self.creds_clear_cmd_conflicts) == 0 diff --git a/test_apps/python_no_app/tests/test_configs.py b/test_apps/python_no_app/tests/test_configs.py index 67281039..f5c9d4eb 100644 --- a/test_apps/python_no_app/tests/test_configs.py +++ b/test_apps/python_no_app/tests/test_configs.py @@ -3,21 +3,18 @@ from origen.helpers.env import in_new_origen_proc, run_cli_cmd from tests import configs as config_funcs -from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg +from test_apps_shared_test_helpers.cli import CLIShared class Common(CLIShared): - # FOR_PR see how many of these are needed and what can be moved to test apps shared tests_root = Path(__file__).parent working_dir = Path(__file__).parent.parent working_dir_config = working_dir.joinpath("origen.toml") - cli_dir = working_dir.joinpath("../../rust/origen/target/debug").resolve() - cli_config = cli_dir.joinpath("origen.toml") + cli_config = CLIShared.cli_dir.joinpath("origen.toml") configs_dir = Path(__file__).parent.joinpath("configs") dummy_config = configs_dir.joinpath("dummy_config.toml") dummy_configs_dir = configs_dir.joinpath("dummy_dir") dummy_origen_config = dummy_configs_dir.joinpath("origen.toml") - empty_config = configs_dir.joinpath("empty.toml") python_plugin_and_2nd_only_config = configs_dir.joinpath("python_plugin_and_2nd_only.toml") @@ -28,6 +25,7 @@ class Common(CLIShared): cmd_testers_root = tests_root.joinpath("cmd_building/cmd_testers") aux_cmd_configs_dir = configs_dir.joinpath("aux_cmds") + # Test relative paths, so leave these as relative to python_no_app root python_plugin_config_dir_str = "../python_plugin/config" python_plugin_config_toml = Path(python_plugin_config_dir_str).joinpath("origen.toml") @@ -46,7 +44,7 @@ def test_package_root_config_is_found(self): def test_config_from_cli_source_is_added(self, existing_configs): assert self.cli_config not in existing_configs - shutil.copy(self.empty_config, self.cli_config) + shutil.copy(self.configs.empty_config, self.cli_config) try: out = run_cli_cmd(["eval", "print( origen.__config_metadata__['files'] )"]) print(out.split("\n")[-2]) @@ -61,7 +59,7 @@ def test_config_from_cli_source_is_added(self, existing_configs): def test_config_dir_from_env_is_added(self, existing_configs): # Add directory - retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'config_dir': self.dummy_configs_dir}) #, with_configs=self.dummy_configs_dir) + retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'config_dir': self.dummy_configs_dir}) assert retn['files'] == [ self.dummy_origen_config, *existing_configs, @@ -69,7 +67,7 @@ def test_config_dir_from_env_is_added(self, existing_configs): def test_direct_config_from_env_is_added(self, existing_configs): # Add direct toml source - retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'config_toml': self.dummy_config}) # , with_configs=self.dummy_origen_config) + retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'config_toml': self.dummy_config}) assert retn['files'] == [ self.dummy_config, *existing_configs @@ -84,7 +82,7 @@ def test_multiple_configs_from_env_are_added(self, existing_configs): ] def test_relative_config_from_env_is_added(self, existing_configs): - retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'configs': self.python_plugin_config_dir_str}) #, with_configs="../python_no_app/tests/configs/") + retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'configs': self.python_plugin_config_dir_str}) assert retn['files'] == [ self.python_plugin_config_toml, *existing_configs diff --git a/test_apps/python_no_app/tests/test_global_invocation.py b/test_apps/python_no_app/tests/test_global_invocation.py index 14c43ff4..c3767d75 100644 --- a/test_apps/python_no_app/tests/test_global_invocation.py +++ b/test_apps/python_no_app/tests/test_global_invocation.py @@ -1,4 +1,4 @@ -import origen, origen_metal, getpass, pytest +import origen, origen_metal, _origen, getpass, pytest def test_import(): assert "2." in origen.version @@ -6,6 +6,11 @@ def test_import(): def test_app_is_none(): assert origen.app is None +def test_is_app_present(): + assert origen.is_app_present is False + assert _origen.is_app_present() is False + assert origen.status["is_app_present"] is False + class TestGlobalFEIntegration: def test_frontend_is_accessible(self): assert (origen_metal.frontend.frontend() is not None) diff --git a/test_apps/python_plugin/python_plugin/commands.toml b/test_apps/python_plugin/python_plugin/commands.toml index 20bcad05..1ccdcc0a 100644 --- a/test_apps/python_plugin/python_plugin/commands.toml +++ b/test_apps/python_plugin/python_plugin/commands.toml @@ -316,20 +316,6 @@ on_env=["ORIGEN_PL_INTRA_CMD_CONFLICTS"] name = "intra_subc_conflicts" help = "Duplicate Opt" -# TODO add this and test -# FOR_PR -# [[extension]] -# # Extend generate command -# # (only available in application context) -# extend = "origen.generate" -# in_global_context = false - -# [[extension.opt]] -# name = "say_hi_in_pattern" -# short = "s" -# help = "Have the plugin say hi in the pattern" -# takes_value = false - [[extension]] # Extend eval command only in global context extend = "origen.eval" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml index edf936c9..e866e783 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/ext_conflicts.toml @@ -25,8 +25,7 @@ on_env=["ORIGEN_EXT_CONFLICTS_CORE_CMD_CREDS_CLEAR"] long_aliases = ["datasets", "pl_datasets"] short_aliases = ["d", "e", "f"] -# FOR_PR -# # Conflict with help opt +# TESTS_NEEDED CLI Conflict with help opt # [[extension]] # extend = "origen.eval" # help = "Conflict with help arg" @@ -62,7 +61,7 @@ on_env=["ORIGEN_EXT_CONFLICTS_CORE_CMD_CREDS_CLEAR"] # long_aliases = ["help2", "help"] # short_aliases = ["h", "i"] -# FOR_PR conflict with v, vk +# TESTS_NEEDED CLI Opt conflict with v, vk [[extension]] extend = "plugin.python_plugin.plugin_test_args" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index 256a1b19..9425d29d 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -7,6 +7,7 @@ from .cmd_models.auxs import Aux from .cmd_models.exts import ExtensionDrivers from .cmd_models.plugins import Plugins +from .error_cases import ErrorCases from .asertions import AssertionHelpers @@ -95,9 +96,11 @@ class Configs: configs_dir = Path(__file__).parent.joinpath("configs") suppress_plugin_collecting_config = configs_dir.joinpath("suppress_plugin_collecting.toml") no_plugins_no_aux_cmds_config = configs_dir.joinpath("no_plugins_no_aux_cmds.toml") + empty_config = configs_dir.joinpath("empty.toml") class CLIShared(cli.CLI, AssertionHelpers): Cmd = Cmd + error_messages = ErrorCases() na = "no_action" @pytest.fixture @@ -135,120 +138,7 @@ def add_no_pl_aux_cfg(cls, cmd): configs = Configs() - # FOR_PR see about moving this into Origen - @classmethod - def to_conflict_msg(cls, cmd, conflict): - if not isinstance(conflict[0], str): - cmd = conflict[0] - conflict = conflict[1:] - - type = conflict[0] - def tname(t, cap=False): - if t in ["lna", "repeated_lna"]: - n = "long name alias" - elif t == "ln": - n = "long name" - elif t == "iln": - n = "inferred long name" - elif t in ["sna", "repeated_sna"]: - n = "short name alias" - elif t == "sn": - n = "short name" - else: - raise RuntimeError(f"Cannot get conflict name from conflict type {t}") - if cap: - n = n.capitalize() - return n - - prefix = f"When processing command '{cmd.full_name}':" - if type in ["lna", "ln", "sna", "sn", "iln"]: - with_type = conflict[1] - offender_opt = conflict[2] - with_opt = conflict[3] - if type == "iln": - if not isinstance(offender_opt, str): - c = offender_opt.name - else: - c = offender_opt - else: - c = conflict[4] - if with_opt is None: - with_opt = offender_opt - - if (not isinstance(offender_opt, str)) and offender_opt.is_ext: - if with_opt.is_ext: - msg = f"{tname(type, True)} '{c}' for extension option '{offender_opt.name}', from {offender_opt.displayed}, conflicts with {tname(with_type, False)} for extension '{with_opt.name}' provided by {with_opt.displayed}" - else: - msg = f"{tname(type, True)} '{c}' for extension option '{offender_opt.name}', from {offender_opt.displayed}, conflicts with {tname(with_type, False)} from command option '{with_opt.name}'" - else: - if not isinstance(offender_opt, str): - offender_opt = offender_opt.name - msg = f"{tname(type, True)} '{c}' for command option '{offender_opt}' conflicts with {tname(with_type, False)} from option '{with_opt.name}'" - elif type in ["inter_ext_sna_sn", "inter_ext_lna_ln", "inter_ext_lna_iln"]: - offending_opt = conflict[1] - if type == "inter_ext_sna_sn": - type = "sna" - with_type = "sn" - name = conflict[2] - elif type == "inter_ext_lna_ln": - type = "lna" - with_type = "ln" - name = conflict[2] - elif "inter_ext_lna_iln": - type = "lna" - with_type = "iln" - name = offending_opt.name - if offending_opt.is_ext: - msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} specifies {tname(type, False)} '{name}' but it conflicts with the option's {tname(with_type, False)}" - else: - msg = f"Option '{offending_opt.name}' specifies {tname(type, False)} '{name}' but it conflicts with the option's {tname(with_type, False)}" - elif type in ["repeated_sna", "repeated_lna"]: - offending_opt = conflict[1] - if offending_opt.is_ext: - offending_src = f"extended from {conflict[1].displayed} " - else: - offending_src = '' - name = conflict[2] - index = conflict[3] - msg = f"Option '{offending_opt.name}' {offending_src}repeats {tname(type, False)} '{name}' (first occurrence at index {index})" - elif type == "reserved_prefix_arg_name": - offending_arg = conflict[1] - msg = f"Argument '{offending_arg}' uses reserved prefix 'ext_opt'. This option will not be available" - elif type == "reserved_prefix_opt_name": - offending_opt = conflict[1] - offending_src = conflict[2] - if offending_src is None: - msg = f"Option '{offending_opt}' uses reserved prefix 'ext_opt'. This option will not be available" - else: - msg = f"Option '{offending_opt}' extended from {offending_src} uses reserved prefix 'ext_opt'. This option will not be available" - elif type in ["reserved_prefix_ln", "reserved_prefix_lna"]: - offending_opt = conflict[1] - name = conflict[2] - if type == "reserved_prefix_ln": - type = "ln" - elif type == "reserved_prefix_lna": - type = "lna" - if offending_opt.is_ext: - msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} uses reserved prefix 'ext_opt' in {tname(type, False)} '{name}' and will not be available as '--{name}'" - else: - msg = f"Option '{offending_opt.name}' uses reserved prefix 'ext_opt' in {tname(type, False)} '{name}' and will not be available as '--{name}'" - elif type == "self_lna_iln": - offending_opt = conflict[1] - msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} specifies long name alias '{offending_opt.name}' but it conflicts with the option's inferred long name. If this is intentional, please set this as the option's long name" - elif type == "duplicate": - offending_opt = conflict[1] - index = conflict[2] - if offending_opt.is_ext: - msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" - elif offending_opt.is_arg: - msg = f"Argument '{offending_opt.name}' is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" - else: - msg = f"Option '{offending_opt.name}' is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" - elif type == "intra_cmd_not_placed": - msg = f"Unable to place unique long name, short name, or inferred long name for command option '{conflict[1]}'. Please resolve any previous conflicts regarding this option or add/update this option's name, long name, or short name" - elif type == "arg_opt_name_conflict": - msg = f"Option '{conflict[1].name}' conflicts with Arg of the same name (Arg #{conflict[2]})" - else: - raise RuntimeError(f"Unrecognized conflict type {conflict[0]}") - msg = f"{prefix} {msg}" - return msg \ No newline at end of file + project_dir = Path(__file__).parent.parent.parent.parent.parent + cli_dir = project_dir.joinpath("rust/origen/target/debug") + test_apps_dir = project_dir.joinpath("test_apps") + plugins_dir = test_apps_dir # Currently the same but may change if test_apps dir is re-organized \ No newline at end of file diff --git a/test_apps/python_no_app/tests/configs/empty.toml b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/empty.toml similarity index 100% rename from test_apps/python_no_app/tests/configs/empty.toml rename to test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/configs/empty.toml diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/error_cases.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/error_cases.py new file mode 100644 index 00000000..c5ee84b9 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/error_cases.py @@ -0,0 +1,121 @@ +from origen.helpers.regressions.cli import CoreErrorMessages + +class ErrorCases(CoreErrorMessages): + ''' Error cases, messages, and generators too esoteric to be relevant to global origen package''' + + @classmethod + def to_conflict_msg(cls, cmd, conflict): + if not isinstance(conflict[0], str): + cmd = conflict[0] + conflict = conflict[1:] + + type = conflict[0] + def tname(t, cap=False): + if t in ["lna", "repeated_lna"]: + n = "long name alias" + elif t == "ln": + n = "long name" + elif t == "iln": + n = "inferred long name" + elif t in ["sna", "repeated_sna"]: + n = "short name alias" + elif t == "sn": + n = "short name" + else: + raise RuntimeError(f"Cannot get conflict name from conflict type {t}") + if cap: + n = n.capitalize() + return n + + prefix = f"When processing command '{cmd.full_name}':" + if type in ["lna", "ln", "sna", "sn", "iln"]: + with_type = conflict[1] + offender_opt = conflict[2] + with_opt = conflict[3] + if type == "iln": + if not isinstance(offender_opt, str): + c = offender_opt.name + else: + c = offender_opt + else: + c = conflict[4] + if with_opt is None: + with_opt = offender_opt + + if (not isinstance(offender_opt, str)) and offender_opt.is_ext: + if with_opt.is_ext: + msg = f"{tname(type, True)} '{c}' for extension option '{offender_opt.name}', from {offender_opt.displayed}, conflicts with {tname(with_type, False)} for extension '{with_opt.name}' provided by {with_opt.displayed}" + else: + msg = f"{tname(type, True)} '{c}' for extension option '{offender_opt.name}', from {offender_opt.displayed}, conflicts with {tname(with_type, False)} from command option '{with_opt.name}'" + else: + if not isinstance(offender_opt, str): + offender_opt = offender_opt.name + msg = f"{tname(type, True)} '{c}' for command option '{offender_opt}' conflicts with {tname(with_type, False)} from option '{with_opt.name}'" + elif type in ["inter_ext_sna_sn", "inter_ext_lna_ln", "inter_ext_lna_iln"]: + offending_opt = conflict[1] + if type == "inter_ext_sna_sn": + type = "sna" + with_type = "sn" + name = conflict[2] + elif type == "inter_ext_lna_ln": + type = "lna" + with_type = "ln" + name = conflict[2] + elif "inter_ext_lna_iln": + type = "lna" + with_type = "iln" + name = offending_opt.name + if offending_opt.is_ext: + msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} specifies {tname(type, False)} '{name}' but it conflicts with the option's {tname(with_type, False)}" + else: + msg = f"Option '{offending_opt.name}' specifies {tname(type, False)} '{name}' but it conflicts with the option's {tname(with_type, False)}" + elif type in ["repeated_sna", "repeated_lna"]: + offending_opt = conflict[1] + if offending_opt.is_ext: + offending_src = f"extended from {conflict[1].displayed} " + else: + offending_src = '' + name = conflict[2] + index = conflict[3] + msg = f"Option '{offending_opt.name}' {offending_src}repeats {tname(type, False)} '{name}' (first occurrence at index {index})" + elif type == "reserved_prefix_arg_name": + offending_arg = conflict[1] + msg = f"Argument '{offending_arg}' uses reserved prefix 'ext_opt'. This option will not be available" + elif type == "reserved_prefix_opt_name": + offending_opt = conflict[1] + offending_src = conflict[2] + if offending_src is None: + msg = f"Option '{offending_opt}' uses reserved prefix 'ext_opt'. This option will not be available" + else: + msg = f"Option '{offending_opt}' extended from {offending_src} uses reserved prefix 'ext_opt'. This option will not be available" + elif type in ["reserved_prefix_ln", "reserved_prefix_lna"]: + offending_opt = conflict[1] + name = conflict[2] + if type == "reserved_prefix_ln": + type = "ln" + elif type == "reserved_prefix_lna": + type = "lna" + if offending_opt.is_ext: + msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} uses reserved prefix 'ext_opt' in {tname(type, False)} '{name}' and will not be available as '--{name}'" + else: + msg = f"Option '{offending_opt.name}' uses reserved prefix 'ext_opt' in {tname(type, False)} '{name}' and will not be available as '--{name}'" + elif type == "self_lna_iln": + offending_opt = conflict[1] + msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} specifies long name alias '{offending_opt.name}' but it conflicts with the option's inferred long name. If this is intentional, please set this as the option's long name" + elif type == "duplicate": + offending_opt = conflict[1] + index = conflict[2] + if offending_opt.is_ext: + msg = f"Option '{offending_opt.name}' extended from {offending_opt.displayed} is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" + elif offending_opt.is_arg: + msg = f"Argument '{offending_opt.name}' is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" + else: + msg = f"Option '{offending_opt.name}' is already present. Subsequent occurrences will be skipped (first occurrence at index {index})" + elif type == "intra_cmd_not_placed": + msg = f"Unable to place unique long name, short name, or inferred long name for command option '{conflict[1]}'. Please resolve any previous conflicts regarding this option or add/update this option's name, long name, or short name" + elif type == "arg_opt_name_conflict": + msg = f"Option '{conflict[1].name}' conflicts with Arg of the same name (Arg #{conflict[2]})" + else: + raise RuntimeError(f"Unrecognized conflict type {conflict[0]}") + msg = f"{prefix} {msg}" + return msg \ No newline at end of file From aff9521501034c97c8ca59532888b7aed2ea0e45 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 3 Jun 2023 20:38:13 -0500 Subject: [PATCH 043/200] Continue cleanup & re-categorizing future TODOs/tests --- rust/origen/cli/src/commands/mod.rs | 4 +- rust/origen/cli/src/python.rs | 11 -- rust/pyapi/src/current_command.rs | 15 +- rust/pyapi/src/extensions.rs | 25 ++- rust/pyapi/src/plugins.rs | 4 +- .../tests/cli/tests__cmd_exts_from_app.py | 5 + .../python_app/tests/cli/tests__core_cmds.py | 6 +- .../tests/cli/tests__extending_app_cmds.py | 4 + .../cli/tests__non_extendable_err_msgs.py | 2 +- test_apps/python_app/tests/plugin_test.py | 10 -- test_apps/python_no_app/pyproject.toml | 1 - .../tests/cli/tests__cmd__credentials.py | 1 + .../tests/cli/tests__cmd__eval.py | 9 -- .../tests/cli/tests__global_cmds.py | 2 +- .../cmd_testers/test_arguments/__init__.py | 2 - .../test_arguments/args_with_value_names.py | 5 +- .../test_arguments/delim_multi_arg.py | 5 +- .../cmd_testers/test_arguments/flag_opts.py | 5 +- .../cmd_testers/test_arguments/hidden_opt.py | 5 +- .../cmd_testers/test_arguments/multi_arg.py | 5 +- .../cmd_testers/test_arguments/multi_opts.py | 5 +- .../test_arguments/no_args_or_opts.py | 5 +- .../test_arguments/optional_arg.py | 5 +- .../test_arguments/opts_with_aliases.py | 5 +- .../test_arguments/opts_with_value_names.py | 5 +- .../test_arguments/required_arg.py | 5 +- .../test_arguments/single_and_multi_arg.py | 5 +- .../single_value_optional_opt.py | 5 +- .../single_value_required_opt.py | 5 +- .../cmd_building/tests__loading_aux_cmds.py | 1 + .../tests__loading_plugin_cmds.py | 1 + .../cmd_building/tests__standard_opts.py | 1 + .../tests/cmd_exts/tests__ext_conflicts.py | 2 - .../tests/cmd_exts/tests__extending_cmds.py | 119 ++++++++++++++- test_apps/python_no_app/tests/misc_test.py | 144 ------------------ test_apps/python_no_app/tests/test_configs.py | 21 +-- .../tests/test_current_command.py | 53 +++++++ .../tests/test_global_invocation.py | 1 + .../python_plugin/python_plugin/commands.toml | 45 ++---- .../cli/ext_helpers.py | 4 + 40 files changed, 256 insertions(+), 307 deletions(-) delete mode 100644 test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py delete mode 100644 test_apps/python_no_app/tests/misc_test.py create mode 100644 test_apps/python_no_app/tests/test_current_command.py diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 0d4d94fa..a8a05784 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -19,7 +19,7 @@ pub mod plugins; pub mod _prelude; use crate::python; -use crate::{vks_to_cmd, strs_to_cli_arr}; +use crate::strs_to_cli_arr; use indexmap::map::IndexMap; use origen::{LOGGER, STATUS}; // clean_mode # O1_MODE_SUPPORT clean_mode function available, or remove @@ -279,7 +279,7 @@ pub fn launch(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: } } cmd += &format!(", verbosity={}", LOGGER.verbosity()); - cmd += &format!(", {}", vks_to_cmd!()); + cmd += &format!(", {}", strs_to_cli_arr!("verbosity_keywords", origen::LOGGER.data().keywords.iter())); cmd += ");"; log_debug!("Launching Python: '{}'", &cmd); diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index a1869dd9..d1471e9b 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -16,17 +16,6 @@ const PYTHONS: &[&str] = &[ ]; pub const MIN_PYTHON_VERSION: &str = "3.7.0"; -// FOR_PR use more generic macro below -#[macro_export] -macro_rules! vks_to_cmd { - () => { - format!( - "verbosity_keywords=[{}]", - origen::LOGGER.data().keywords.iter().map(|k| format!("r'{}'", k)).collect::>().join(", ") - ) - } -} - #[macro_export] macro_rules! strs_to_cli_arr { ($name:expr, $strs:expr) => {{ diff --git a/rust/pyapi/src/current_command.rs b/rust/pyapi/src/current_command.rs index c50efaf2..407ecec0 100644 --- a/rust/pyapi/src/current_command.rs +++ b/rust/pyapi/src/current_command.rs @@ -8,7 +8,7 @@ pub fn define(py: Python, m: &PyModule) -> PyResult<()> { let subm = PyModule::new(py, "current_command")?; subm.add_wrapped(wrap_pyfunction!(get_command))?; subm.add_wrapped(wrap_pyfunction!(set_command))?; - subm.add_wrapped(wrap_pyfunction!(clear_command))?; + // subm.add_wrapped(wrap_pyfunction!(clear_command))?; FEATURE CLI Clearing Current Command subm.add_class::()?; m.add_submodule(subm)?; Ok(()) @@ -30,14 +30,11 @@ fn set_command(py: Python, base_cmd: String, subcmds: Vec, args: Py PyResult<()> { - // Ok(STATUS.clear_command()) - // FOR_PR - // TEST_NEEDED also - todo!() - // _origen!(py).setattr(ATTR_NAME, Py::new(py, cmd)?) -} +// FEATURE CLI Clearing Current Command +// #[pyfunction] +// fn clear_command() -> PyResult<()> { +// todo!() +// } #[pyclass] pub struct CurrentCommand { diff --git a/rust/pyapi/src/extensions.rs b/rust/pyapi/src/extensions.rs index 0eba52b1..41bcfb7a 100644 --- a/rust/pyapi/src/extensions.rs +++ b/rust/pyapi/src/extensions.rs @@ -16,7 +16,7 @@ pub struct Extension { name: String, args: Py, source: String, - // m: , // FOR_PR store mod here? + ext_mod: Option>, } #[pymethods] @@ -31,10 +31,19 @@ impl Extension { Ok(self.args.as_ref(py)) } - // TODO return path? #[getter] - pub fn source(&self) -> PyResult<&str> { - Ok(&self.source) + pub fn source(&self, py: Python) -> PyResult { + Ok(pyapi_metal::pypath!(py, &self.source)) + } + + #[getter] + pub fn r#mod(&self) -> PyResult>> { + Ok(self.ext_mod.as_ref()) + } + + #[getter] + pub fn module(&self) -> PyResult>> { + Ok(self.ext_mod.as_ref()) } } @@ -148,6 +157,14 @@ impl Extensions { }, name: ext_name, source: ext_path.clone(), + ext_mod: { + let m = PyAny::get_item(ext_cfg, "mod")?; + if m.is_none() { + None + } else { + Some(m.extract::<&PyModule>()?.into_py(py)) + } + } }; slf.exts.insert(ext_path, Py::new(py, py_ext)?); } diff --git a/rust/pyapi/src/plugins.rs b/rust/pyapi/src/plugins.rs index b89c5d85..148ffdba 100644 --- a/rust/pyapi/src/plugins.rs +++ b/rust/pyapi/src/plugins.rs @@ -1,11 +1,9 @@ use pyo3::prelude::*; use pyo3::types::PyDict; use pyo3::wrap_pyfunction; -use pyapi_metal::{pypath, key_error, key_exception}; +use pyapi_metal::key_exception; use origen::ORIGEN_CONFIG; -use origen_metal::indexmap::IndexMap; use std::path::PathBuf; -use pyo3::exceptions::PyKeyError; pub fn define(py: Python, m: &PyModule) -> PyResult<()> { let subm = PyModule::new(py, "plugins")?; diff --git a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py index 9ac66bbc..bf924968 100644 --- a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py +++ b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py @@ -313,21 +313,26 @@ def test_error_msg_on_missing_implementation(self): assert f"plugin.python_plugin.plugin_says_hi.py" in out assert f"plugin{os.sep}python_plugin.plugin_says_hi.py" in out assert f"plugin{os.sep}python_plugin{os.sep}plugin_says_hi.py" in out + # TEST_NEEDED CLI check mod is None in error cases @pytest.mark.skip def error_msg_on_extending_unknown_cmd(self): + # TEST_NEEDED CLI error handling from app context fail @pytest.mark.skip def test_error_in_before(self): + # TEST_NEEDED CLI error handling from app context fail @pytest.mark.skip def test_error_in_after(self): + # TEST_NEEDED CLI error handling from app context fail @pytest.mark.skip def test_error_in_cleanup(self): + # TEST_NEEDED CLI error handling from app context fail class TestAppExtConflicts(CLICommon): diff --git a/test_apps/python_app/tests/cli/tests__core_cmds.py b/test_apps/python_app/tests/cli/tests__core_cmds.py index 9c745f77..4e8b79f9 100644 --- a/test_apps/python_app/tests/cli/tests__core_cmds.py +++ b/test_apps/python_app/tests/cli/tests__core_cmds.py @@ -25,7 +25,7 @@ def test_core_commands_are_available(self, cmd): ''' Just testing that "-h" doesn't crash for all core commands ''' help = cmd.get_help_msg() assert len(help.opts) >= 3 - # FOR_PR add check for app opts when applicable + # TESTS_NEEDED CLI add check for app opts when applicable class TestApp(T_App): pass @@ -73,7 +73,7 @@ def test_help_msg(self, cmd, no_config_run_opts): @pytest.mark.skip def test_interactive(self, cmd, no_config_run_opts): - # TODO try to get an interactive test that just starts/stops + # TEST_NEEDED CLI try to get an interactive test that just starts/stops proc = subprocess.Popen(["poetry", "run", "origen", "i"], universal_newlines=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) try: proc.stdin.flush() @@ -114,4 +114,4 @@ def test_interactive(self, cmd, no_config_run_opts): # class TestCredentials(CLICommon): # def test_credentials(self): - # ? + # # TEST_NEEDED CLI credentials from app context diff --git a/test_apps/python_app/tests/cli/tests__extending_app_cmds.py b/test_apps/python_app/tests/cli/tests__extending_app_cmds.py index a99e3d0a..55b88e0f 100644 --- a/test_apps/python_app/tests/cli/tests__extending_app_cmds.py +++ b/test_apps/python_app/tests/cli/tests__extending_app_cmds.py @@ -320,17 +320,21 @@ def test_conflicts_resolve_correctly(self, exts): @pytest.mark.skip def test_subc_help_msg(self): + # TEST_NEEDED CLI subc conflicts from app context fail @pytest.mark.skip def test_subc_conflict_msgs(self): + # TEST_NEEDED CLI subc conflicts from app context fail @pytest.mark.skip def test_subc_exts(self): + # TEST_NEEDED CLI subc conflicts from app context fail @pytest.mark.skip def test_app_cmd_ext_conflicts(self): ''' This is likely a mistake case but should resolve nonetheless ''' + # TEST_NEEDED CLI subc conflicts from app context fail \ No newline at end of file diff --git a/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py b/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py index f65269fe..bef7b85a 100644 --- a/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py +++ b/test_apps/python_app/tests/cli/tests__non_extendable_err_msgs.py @@ -9,7 +9,7 @@ class T_NonExtendableErrMsgs(TargetCLI): with_env=with_env, from_configs=["config/enumerated_plugins.toml"], ) - # TODO have with_env extension apply to subcommands? + # TODO CLI have with_env extension apply to subcommands? view_cmd = CLICommon.in_app_commands.target.view.extend( [], with_env=with_env, diff --git a/test_apps/python_app/tests/plugin_test.py b/test_apps/python_app/tests/plugin_test.py index 17e7d1ca..c53ab08e 100644 --- a/test_apps/python_app/tests/plugin_test.py +++ b/test_apps/python_app/tests/plugin_test.py @@ -2,16 +2,6 @@ import pytest from tests.shared import * -#@pytest.fixture(autouse=True) -#def run_around_tests(): -# global dut -# # Code that will run before each test -# instantiate_dut("dut.falcon") -# dut = origen.dut -# yield -# # Code that will run after each test - - def test_dut_from_a_plugin(): origen.target.load("dut/hawk") assert "python_plugin.blocks.dut.derivatives.hawk.controller.Controller" in str( diff --git a/test_apps/python_no_app/pyproject.toml b/test_apps/python_no_app/pyproject.toml index 75433ed1..b4a28a96 100644 --- a/test_apps/python_no_app/pyproject.toml +++ b/test_apps/python_no_app/pyproject.toml @@ -1,4 +1,3 @@ -# FOR_PR clean up all no-app tests [tool.poetry] name = "python_no_app" version = "0.1.0" diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py index b6b1bb08..499c4ab6 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__credentials.py @@ -4,6 +4,7 @@ class T_Credentials(CLICommon): @pytest.mark.skip def test_help_msg(self): + # TEST_NEEDED CLI credentials help message fail @pytest.mark.skip diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py index a219481d..105a3d20 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py @@ -37,15 +37,6 @@ def test_error_in_statements(self, cmd, no_config_run_opts): out = d.gen_error(run_opts=no_config_run_opts) d.assert_present(out) - # FOR_PR - @pytest.mark.skip - def test_error_in_statements_still_runs_cleanup(self, cmd, no_config_run_opts): - d = cmd.demos["gen_name_error"] - out = d.gen_error(return_full=True) - d.assert_present(out["stderr"]) - print(out["stdout"]) - fail - def test_clean_eval(self): eval_prefix = "Origen Version From Eval: " out = self.eval("print (f'" + eval_prefix + "{origen.version}' )") diff --git a/test_apps/python_no_app/tests/cli/tests__global_cmds.py b/test_apps/python_no_app/tests/cli/tests__global_cmds.py index 9842d49e..30814ffd 100644 --- a/test_apps/python_no_app/tests/cli/tests__global_cmds.py +++ b/test_apps/python_no_app/tests/cli/tests__global_cmds.py @@ -9,5 +9,5 @@ def test_core_commands_are_available(self, cmd): ''' Just testing that "-h" (or help for some commands) doesn't crash for all core commands ''' help = cmd.get_help_msg() assert len(help.opts) >= 3 - # FOR_PR + # TESTS_NEEDED CLI better opt check # help.assert_bare_opts_present() \ No newline at end of file diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py deleted file mode 100644 index 84e2c321..00000000 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# FOR_PR switch to common method. Use nested_common as example for using common functions when running -from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/args_with_value_names.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/args_with_value_names.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/args_with_value_names.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/args_with_value_names.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/delim_multi_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/delim_multi_arg.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/delim_multi_arg.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/delim_multi_arg.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/flag_opts.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/flag_opts.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/flag_opts.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/flag_opts.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/hidden_opt.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/hidden_opt.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/hidden_opt.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/hidden_opt.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_arg.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_arg.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_arg.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_opts.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_opts.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_opts.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/multi_opts.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/no_args_or_opts.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/no_args_or_opts.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/no_args_or_opts.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/no_args_or_opts.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/optional_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/optional_arg.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/optional_arg.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/optional_arg.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_aliases.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_aliases.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_aliases.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_aliases.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_value_names.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_value_names.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_value_names.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/opts_with_value_names.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/required_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/required_arg.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/required_arg.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/required_arg.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_and_multi_arg.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_and_multi_arg.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_and_multi_arg.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_and_multi_arg.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_optional_opt.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_optional_opt.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_optional_opt.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_optional_opt.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_required_opt.py b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_required_opt.py index aa93dc47..c30a3947 100644 --- a/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_required_opt.py +++ b/test_apps/python_no_app/tests/cmd_building/cmd_testers/test_arguments/single_value_required_opt.py @@ -1,4 +1 @@ -import sys, pathlib -sys.path.append(str(pathlib.Path(__file__).parent.parent)) - -from test_arguments import run +from test_apps_shared_test_helpers.aux_cmds import run diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py index cb385232..2f3304c7 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_aux_cmds.py @@ -19,6 +19,7 @@ def test_aux_commands_stack(self, with_cli_aux_cmds): @pytest.mark.xfail def test_aux_command_tree_view(self): + # FEATURE CLI aux/plugin/app command tree view fail class TestNestedCommands(CLICommon): diff --git a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py index 7b007fed..a7318323 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__loading_plugin_cmds.py @@ -88,6 +88,7 @@ def test_py_plugin_echo_delimited(self, echo_cmd): @pytest.mark.skip def test_nested_cmds(self): + # TEST_NEEDED CLI test nested command from global invocation side fail class Test_PythonPluginNoCMDs(Common): diff --git a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py index f100f73d..aae5a828 100644 --- a/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py +++ b/test_apps/python_no_app/tests/cmd_building/tests__standard_opts.py @@ -1,5 +1,6 @@ from .shared import CLICommon +# Uses custom format output from ./cmd_building/cmd_testers/test_arguments/display_verbosity_opts.py class T_StandardOpts(CLICommon): def test_empty_verbosity_is_accessible(self): out = self.cmd_testers.display_v.run() diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py index 984a2199..4c36ed7e 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py @@ -14,7 +14,6 @@ def ec(self, exts): def tas(self, exts): return exts.tas - class T_ExtConflicts(CLIShared): class TestWithPLCmd(Common): config = CLIShared.exts.ext_conflicts["plugin.python_plugin.plugin_test_args"] @@ -174,7 +173,6 @@ def test_help_msg(self, ec, tas): cmd = self.cmd help = self.cmd_help - print(help.text) help.assert_args(cmd.single_arg) help.assert_opts( tas.subc_pl_aux_conflict, diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py index 66b3c474..a7f0c929 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py @@ -220,11 +220,6 @@ def test_subc_help_msg(self): assert help.pl_exts == None assert help.app_exts == False - @pytest.mark.skip - def test_basic_extending_from_pl(self): - help = self.global_cmds.eval.get_help_msg() - assert help.pl_exts == [] - class TestExtensionStacking(Common): cmd = CLIShared.python_plugin.plugin_test_ext_stacking.extend( CLIShared.exts.exts["plugin.python_plugin.plugin_test_ext_stacking"]["exts"], @@ -510,8 +505,39 @@ def test_manipulating_args_from_aux_subcmd(self): (cmd.python_plugin_flag_subc, 2, {"Before": 1}), ) + @pytest.mark.skip + def test_extending_origen_cmd_from_global_context_only(self): + # TEST_NEEDED CLI explicit test for global only exts + fail + @pytest.mark.skip def test_hidden_exts_full_name(self): + # TEST_NEEDED CLI hidden exts full name + fail + + @pytest.mark.skip + def test_ext_mods_are_accessible(self): + # TEST_NEEDED CLI test extension keys + # (what's provided in origen.current_command.exts['ext']) + fail + + @pytest.mark.skip + def test_ext_mods_are_accessible(self): + # TEST_NEEDED CLI test extension mods are available + cmd = CLIShared.aux.ns.dummy_cmds.dummy_cmd.extend( + CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["exts"], + from_configs=[ + CLIShared.exts.exts_workout_cfg, + CLIShared.exts.pl_ext_stacking_from_aux_cfg + ], + with_env=CLIShared.exts.exts["aux.dummy_cmds.dummy_cmd"]["env"] + ) + out = cmd.run( + cmd.exts_workout_action.ln_to_cli(), "show_ext_mods", + ) + print(out) + # actions = [ + # "inc_flag__cmd__flag_opt", fail def test_extending_origen_cmd_from_plugin(self): @@ -545,3 +571,86 @@ def test_extending_origen_cmd_from_plugin(self): d.assert_present(out) cmd.core_cmd_exts_generic_core_ext.assert_present(1, out) cmd.pl_ext_cmds_generic_ext.assert_present(2, out) + + @pytest.mark.skip + class TestErrorConditions(): + def test_exception_in_before_cmd(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + actions = ["before_cmd_exception"] + out = self.cmd.gen_error( + self.sv, + self.ext_action.ln_to_cli(), *actions, + return_full=True, + ) + stderr = out["stderr"] + stdout = out["stdout"] + action_strs = self.ext_action.to_assert_str(actions) + sv_str = self.cmd.single_arg.to_assert_str(self.sv) + print(stdout) + assert "RuntimeError: 'before_cmd_exception' encountered!" in stderr + assert action_strs[0] in stdout + assert action_strs[1] not in stdout + assert action_strs[2] in stdout + assert sv_str not in stdout + fail + + def test_exception_in_after_cmd(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_exception_in_cmd(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + # Maybe move this to cmd building. Or do an with-exts/without-exts version + actions = [self.na] + out = self.cmd.gen_error( + "gen_error", + self.ext_action.ln_to_cli(), *actions, + return_full=True, + ) + fail + + def test_exception_in_clean_up(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_exceptions_in_multiple_clean_ups(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_exceptions_in_before_and_cleanups(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_missing_ext_plugin_mod(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_missing_ext_plugin_mod(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_missing_ext_aux_mod(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_missing_multiple_ext_mods(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_exception_in_on_load(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + def test_exception_during_mod_load(self): + # TEST_NEEDED CLI Ext/Cmds Error cases in global context + fail + + @pytest.mark.skip + class TestNonExtendableCommands(CLIShared): + def test_help_msg(self): + # TEST_NEEDED CLI Ext/Cmds Non-extendable commands + cmd = self.cmds.develop_origen + + def test_error_msg_when_extended(self): + # TEST_NEEDED CLI Ext/Cmds Non-extendable commands + fail diff --git a/test_apps/python_no_app/tests/misc_test.py b/test_apps/python_no_app/tests/misc_test.py deleted file mode 100644 index 3b629c52..00000000 --- a/test_apps/python_no_app/tests/misc_test.py +++ /dev/null @@ -1,144 +0,0 @@ -# FOR_PR clean up -import re -import shutil -import origen, pytest, origen_metal, getpass, os -from pathlib import Path -# import origen_metal -from origen.helpers.env import in_new_origen_proc, run_cli_cmd -from tests import configs as config_funcs -from test_apps_shared_test_helpers.cli import CmdExtOpt -from types import SimpleNamespace - -from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg - -@pytest.mark.skip -class TestNonExtendableCommands(CLIShared): - def test_extensions_do_nothing(self): - cmd = self.cmds.target - - def test_help_msg(self): - fail - - def test_error_when_extended(self): - fail - - -class TestExtensions(CLIShared): - @pytest.mark.skip - def test_extending_pl_cmd_from_aux_cmds(self): - fail - - @pytest.mark.skip - def test_extending_aux_cmd_from_pl(self): - fail - - @pytest.mark.skip - class ErrorConditions(): - def test_exception_in_before_cmd(self): - actions = ["before_cmd_exception"] - out = self.cmd.gen_error( - self.sv, - self.ext_action.ln_to_cli(), *actions, - return_full=True, - ) - stderr = out["stderr"] - stdout = out["stdout"] - action_strs = self.ext_action.to_assert_str(actions) - sv_str = self.cmd.single_arg.to_assert_str(self.sv) - print(stdout) - assert "RuntimeError: 'before_cmd_exception' encountered!" in stderr - assert action_strs[0] in stdout - assert action_strs[1] not in stdout - assert action_strs[2] in stdout - assert sv_str not in stdout - fail - - def test_exception_in_after_cmd(self): - fail - - def test_exception_in_cmd(self): - actions = [self.na] - out = self.cmd.gen_error( - "gen_error", - self.ext_action.ln_to_cli(), *actions, - return_full=True, - ) - fail - - def test_exception_in_clean_up(self): - fail - - def test_exceptions_in_multiple_clean_ups(self): - fail - - def test_exceptions_in_before_and_cleanups(self): - fail - - def test_missing_ext_plugin_mod(self): - fail - - def test_missing_ext_plugin_mod(self): - fail - - def test_missing_ext_aux_mod(self): - fail - - def test_missing_multiple_ext_mods(self): - fail - - def test_exception_in_on_load(self): - fail - - def test_exception_during_mod_load(self): - fail - - @pytest.mark.skip - def test_extending_origen_cmd_from_global_context_only(self): - fail - -class TestCurrentCommand(CLIShared): - @classmethod - def parse_current_cmd(cls, out): - out = out.split("Start Action For CMD: display_current_command\n")[1].split("End Action For CMD: display_current_command")[0].split("\n")[:-1] - print(out) - assert out[0] == "Class: CurrentCommand" - return SimpleNamespace(**{ - "base_cmd": out[1].split("Base Cmd: ")[1], - "subcmds": eval(out[2].split("Sub Cmds: ")[1]), - "args": eval(out[3].split("Args: ")[1]), - "exts": eval(out[4].split("Exts: ")[1]), - }) - - @classmethod - def assert_current_cmd(cls, out, base, subcmds, args, exts): - cmd = cls.parse_current_cmd(out) - assert cmd.base_cmd == base - assert cmd.subcmds == subcmds - assert cmd.args == args - assert cmd.exts == exts - - def test_current_command_is_none(self): - assert origen.current_command is None - - @pytest.mark.skip - def test_current_command_from_core_cmd(self): - eval_cmd - - def test_current_command_from_pl_cmd(self): - out = self.python_plugin.do_actions.run("display_current_command") - print(out) - self.assert_current_cmd( - out, - "_plugin_dispatch_", - ["do_actions"], - {"actions": ['display_current_command']}, - {} - ) - - @pytest.mark.skip - def test_current_command_from_aux_cmd(self): - aux_cmd - - @pytest.mark.skip - def test_current_command_from_app_cmd(self): - app_cmd \ No newline at end of file diff --git a/test_apps/python_no_app/tests/test_configs.py b/test_apps/python_no_app/tests/test_configs.py index f5c9d4eb..b2557d47 100644 --- a/test_apps/python_no_app/tests/test_configs.py +++ b/test_apps/python_no_app/tests/test_configs.py @@ -47,10 +47,8 @@ def test_config_from_cli_source_is_added(self, existing_configs): shutil.copy(self.configs.empty_config, self.cli_config) try: out = run_cli_cmd(["eval", "print( origen.__config_metadata__['files'] )"]) - print(out.split("\n")[-2]) from pathlib import WindowsPath, PosixPath configs = eval(out.split("\n")[-2]) - # retn = in_new_origen_proc(mod=config_funcs) finally: os.remove(self.cli_config) @@ -88,8 +86,9 @@ def test_relative_config_from_env_is_added(self, existing_configs): *existing_configs ] - @pytest.mark.xfail + @pytest.mark.skip def test_error_on_non_toml_config_in_env(self, existing_configs): + # TEST_NEEDED CLI retn = in_new_origen_proc(mod=config_funcs, func_kwargs={'configs': self.dummy_configs_dir.parent.joinpath("__init__.py")}) assert retn['files'] == [ self.python_plugin_config_toml, @@ -98,18 +97,22 @@ def test_error_on_non_toml_config_in_env(self, existing_configs): @pytest.mark.skip def test_error_on_missing_config_dir_in_env(self): + # TEST_NEEDED CLI fail @pytest.mark.skip def test_error_on_missing_toml_config_in_env(self): + # TEST_NEEDED CLI fail @pytest.mark.skip def test_config_locations_can_stack(self): + # TEST_NEEDED CLI fail - @pytest.mark.xfail - def test_bypassing_config_lookups(self): + @pytest.mark.skip + def test_bypassing_default_config_lookups(self): + # TEST_NEEDED CLI # No configs retn = in_new_origen_proc(mod=config_funcs, bypass_config_lookup=True) assert retn['files'] == [] @@ -117,11 +120,3 @@ def test_bypassing_config_lookups(self): # Configs from the env are added though retn = in_new_origen_proc(func=config_funcs.test_bypassing_config_lookup_with_env, bypass_config_lookup=True, with_config=[...]) assert retn['files'] == [] - - @pytest.mark.skip - def test_user_config_is_added(self): - fail - - @pytest.mark.skip - def test_default_config_lookup_can_be_suppressed(self): - fail diff --git a/test_apps/python_no_app/tests/test_current_command.py b/test_apps/python_no_app/tests/test_current_command.py new file mode 100644 index 00000000..aaea3d1a --- /dev/null +++ b/test_apps/python_no_app/tests/test_current_command.py @@ -0,0 +1,53 @@ +import origen, pytest +from types import SimpleNamespace +from test_apps_shared_test_helpers.cli import CLIShared, CmdOpt, CmdArg + +class TestCurrentCommand(CLIShared): + @classmethod + def parse_current_cmd(cls, out): + out = out.split("Start Action For CMD: display_current_command\n")[1].split("End Action For CMD: display_current_command")[0].split("\n")[:-1] + print(out) + assert out[0] == "Class: CurrentCommand" + return SimpleNamespace(**{ + "base_cmd": out[1].split("Base Cmd: ")[1], + "subcmds": eval(out[2].split("Sub Cmds: ")[1]), + "args": eval(out[3].split("Args: ")[1]), + "exts": eval(out[4].split("Exts: ")[1]), + }) + + @classmethod + def assert_current_cmd(cls, out, base, subcmds, args, exts): + cmd = cls.parse_current_cmd(out) + assert cmd.base_cmd == base + assert cmd.subcmds == subcmds + assert cmd.args == args + assert cmd.exts == exts + + def test_current_command_is_none(self): + assert origen.current_command is None + + @pytest.mark.skip + def test_current_command_from_core_cmd(self): + # TEST_NEEDED Current Command core case + eval_cmd + + def test_current_command_from_pl_cmd(self): + out = self.python_plugin.do_actions.run("display_current_command") + self.assert_current_cmd( + out, + "_plugin_dispatch_", + ["do_actions"], + {"actions": ['display_current_command']}, + {} + ) + + @pytest.mark.skip + def test_current_command_from_aux_cmd(self): + # TEST_NEEDED Current Command core case + aux_cmd + + @pytest.mark.skip + def test_current_command_from_app_cmd(self): + # TEST_NEEDED Current Command app case + # Obviously move to app + app_cmd \ No newline at end of file diff --git a/test_apps/python_no_app/tests/test_global_invocation.py b/test_apps/python_no_app/tests/test_global_invocation.py index c3767d75..7e57fa72 100644 --- a/test_apps/python_no_app/tests/test_global_invocation.py +++ b/test_apps/python_no_app/tests/test_global_invocation.py @@ -20,4 +20,5 @@ def test_current_user_is_available(self): @pytest.mark.skip def test_datastores_are_available(self): + # TEST_NEEDED Datastores in global invocation assert origen.datastores.keys() == ['ldaps'] \ No newline at end of file diff --git a/test_apps/python_plugin/python_plugin/commands.toml b/test_apps/python_plugin/python_plugin/commands.toml index 1ccdcc0a..740d1424 100644 --- a/test_apps/python_plugin/python_plugin/commands.toml +++ b/test_apps/python_plugin/python_plugin/commands.toml @@ -332,23 +332,22 @@ on_env=["ORIGEN_PL_INTRA_CMD_CONFLICTS"] short = "a" help = "Have the plugin say hi after evaluating (global)" -# FOR_PR swap these for actions? -# Or is this even used? -[[extension]] - # Extend eval command only in an application context - extend = "origen.eval" - in_global_context = false - in_app_context = true +# TESTS_NEEDED CLI explicit global vs. app case. Have global, need app +# [[extension]] +# # Extend eval command only in an application context +# extend = "origen.eval" +# in_global_context = false +# in_app_context = true - [[extension.opt]] - name = "say_hi_before_eval" - short = "y" - help = "Have the plugin say hi before evaluating (app)" +# [[extension.opt]] +# name = "say_hi_before_eval" +# short = "y" +# help = "Have the plugin say hi before evaluating (app)" - [[extension.opt]] - name = "say_hi_after_eval" - short = "z" - help = "Have the plugin say hi after evaluating (app)" +# [[extension.opt]] +# name = "say_hi_after_eval" +# short = "z" +# help = "Have the plugin say hi after evaluating (app)" [[extension]] # Extend eval command in both contexts @@ -386,22 +385,6 @@ on_env = ["ORIGEN_DUMMY_AUX_CMDS"] name = "python_plugin_flag_subc" help = "Flag from python_plugin subc" -# FOR_PR -# [[extension]] -# # Extend eval command only in global context -# extend = "origen.eval" -# in_global_context = true -# in_app_context = false - -# [[extension.opt]] -# name = "python_plugin_ext_action" -# help = "Simple extension action from python plugin" -# multiple=true - -# [[extension.opt]] -# name = "python_plugin_ext_flag" -# help = "Simple extension flag from python plugin" - [[extension]] extend = "app.arg_opt_warmup" on_env = ["ORIGEN_APP_EXT_ARG_OPT_WARMUP"] diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py index 8b6563a4..17761bb1 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py @@ -82,6 +82,10 @@ def do_action(actions, phase): print(f"Sub Cmds: {cc.subcmds}") print(f"Args: {cc.args}") print(f"Exts: {dict(cc.exts)}") + elif action == "show_ext_mods": + # TEST_NEEDED CLI check for extension mods + for n, e in origen.current_command.exts.items(): + print(f"{n}: {e.mod}") elif action == "no_action": pass else: From ee67a10a848a25c6b94927eb4a4abcbcf2895c6f Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 3 Jun 2023 21:48:56 -0500 Subject: [PATCH 044/200] Finish up recategorizing cleanup items --- python/origen/origen/helpers/env.py | 3 -- rust/origen/src/core/status.rs | 54 ++++++++++--------- .../aux_cmds/__init__.py | 2 - .../aux_ns.dummy_cmds.dummy_cmd.py | 18 ++----- .../aux_ns.dummy_cmds.dummy_cmd.subc.py | 18 ++----- ...on_plugin.plugin_test_ext_stacking.subc.py | 18 ++----- 6 files changed, 43 insertions(+), 70 deletions(-) diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index 0122525a..01b82ff0 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -56,9 +56,6 @@ def run_cli_cmd(cmd, *, raise RuntimeError(f"Expected cmd '{cmd}' to fail but received return code 0") else: result = subprocess.run(cmd, shell=shell, check=check, capture_output=True, text=True, input=input, env=subp_env) - # FOR_PR take these out - print(result.stdout) - print(result.stderr) if return_details: return { "stderr": result.stderr, diff --git a/rust/origen/src/core/status.rs b/rust/origen/src/core/status.rs index 7ac7497e..d9be1b88 100644 --- a/rust/origen/src/core/status.rs +++ b/rust/origen/src/core/status.rs @@ -12,7 +12,6 @@ use std::path::Path; use std::path::PathBuf; use std::str::FromStr; use std::sync::{RwLock, RwLockReadGuard}; -use crate::TypedValueMap; // Trait for extending std::path::PathBuf use path_slash::PathBufExt; @@ -55,12 +54,14 @@ impl FromStr for Operation { } } -#[derive(Debug)] -pub struct CurrentCommand { - pub top_cmd: String, - pub subcmds: Vec, - pub args: TypedValueMap, -} +// FEATURE Backend Current Command. Either store some basics here, or use a frontend wrapper +// use crate::TypedValueMap; +// #[derive(Debug)] +// pub struct CurrentCommand { +// pub top_cmd: String, +// pub subcmds: Vec, +// pub args: TypedValueMap, +// } /// Exposes some status information about the runtime environment, e.g. whether an /// application workspace is present @@ -113,7 +114,7 @@ pub struct Status { unique_id: RwLock, debug_enabled: RwLock, _operation: RwLock, - command: RwLock>, + // command: RwLock>, // FEATURE Backend Current Command } impl Default for Status { @@ -206,7 +207,7 @@ impl Default for Status { unique_id: RwLock::new(0), debug_enabled: RwLock::new(false), _operation: RwLock::new(Operation::None), - command: RwLock::new(None), + // command: RwLock::new(None), // FEATURE Backend Current Command }; log_trace!("Status built successfully"); s @@ -342,23 +343,24 @@ impl Status { *self.debug_enabled.read().unwrap() } - pub fn set_command(&self, top_cmd: String, subcommands: Vec, args: TypedValueMap) { - let mut cmd = self.command.write().unwrap(); - *cmd = Some(CurrentCommand { - top_cmd: top_cmd, - subcmds: subcommands, - args: args - }); - } - - pub fn clear_command(&self) { - let mut cmd = self.command.write().unwrap(); - *cmd = None; - } - - pub fn command(&self) -> RwLockReadGuard> { - self.command.read().unwrap() - } + // FEATURE Backend Current Command + // pub fn set_command(&self, top_cmd: String, subcommands: Vec, args: TypedValueMap) { + // let mut cmd = self.command.write().unwrap(); + // *cmd = Some(CurrentCommand { + // top_cmd: top_cmd, + // subcmds: subcommands, + // args: args + // }); + // } + + // pub fn clear_command(&self) { + // let mut cmd = self.command.write().unwrap(); + // *cmd = None; + // } + + // pub fn command(&self) -> RwLockReadGuard> { + // self.command.read().unwrap() + // } pub fn set_operation(&self, val: Operation) { let mut operation = self._operation.write().unwrap(); diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/__init__.py index 74f6c9f0..20660985 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/__init__.py @@ -1,5 +1,3 @@ -# FOR_PR see about on-load for all extensions here -import origen from test_apps_shared_test_helpers.cli import output_args def run(**args): diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.py index bc7b4dd2..e8bce0ef 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.py @@ -1,14 +1,6 @@ -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str -from origen.boot import before_cmd, after_cmd, clean_up +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load -@before_cmd -def before(**args): - print(before_cmd_ext_args_str(args)) - -@after_cmd -def after(**args): - print(after_cmd_ext_args_str(args)) - -@clean_up -def clean_up(**args): - print(clean_up_ext_args_str(args)) +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.subc.py index bc7b4dd2..e8bce0ef 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.subc.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/aux_ns.dummy_cmds.dummy_cmd.subc.py @@ -1,14 +1,6 @@ -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str -from origen.boot import before_cmd, after_cmd, clean_up +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load -@before_cmd -def before(**args): - print(before_cmd_ext_args_str(args)) - -@after_cmd -def after(**args): - print(after_cmd_ext_args_str(args)) - -@clean_up -def clean_up(**args): - print(clean_up_ext_args_str(args)) +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.subc.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.subc.py index bc7b4dd2..e8bce0ef 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.subc.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/aux_cmds/pl_ext_stacking_from_aux/plugin.python_plugin.plugin_test_ext_stacking.subc.py @@ -1,14 +1,6 @@ -from test_apps_shared_test_helpers.cli import after_cmd_ext_args_str, before_cmd_ext_args_str, clean_up_ext_args_str -from origen.boot import before_cmd, after_cmd, clean_up +from test_apps_shared_test_helpers.cli import apply_ext_output_args +from origen.boot import on_load -@before_cmd -def before(**args): - print(before_cmd_ext_args_str(args)) - -@after_cmd -def after(**args): - print(after_cmd_ext_args_str(args)) - -@clean_up -def clean_up(**args): - print(clean_up_ext_args_str(args)) +@on_load +def load_ext(mod): + apply_ext_output_args(mod) \ No newline at end of file From d4d92255e6b4c927ee1d2d78074df6c36f978d0f Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 24 Jun 2023 16:57:05 -0500 Subject: [PATCH 045/200] Begin invocation debug/test work. Add infrastructure and some tests for app, workspace, and user-global invocations. --- .github/workflows/regression_test.yml | 21 + .gitignore | 7 +- python/origen/origen/__init__.py | 23 +- python/origen/origen/helpers/env.py | 11 +- python/origen/pyproject.toml | 2 +- rust/origen/cli/src/python.rs | 184 +- rust/origen/src/core/config.rs | 10 +- rust/origen/src/core/status.rs | 62 + rust/origen_metal/src/utils/command.rs | 28 +- rust/origen_metal/src/utils/file.rs | 18 + rust/pyapi/src/infrastructure/mod.rs | 10 + rust/pyapi/src/infrastructure/pyproject.rs | 53 + rust/pyapi/src/lib.rs | 20 + test_apps/no_workspace/__init__.py | 0 test_apps/no_workspace/t_invocation_env.py | 130 ++ .../no_workspace/templates/pyproject.toml | 24 + test_apps/no_workspace/test_user_install.py | 60 + .../no_workspace/user_install/inner/.keep | 0 .../no_workspace/user_install/poetry.lock | 1976 +++++++++++++++++ .../no_workspace/user_install/pyproject.toml | 13 + test_apps/python_app/tests/cli_test.py | 12 +- test_apps/python_no_app/tests/shared.py | 5 + test_apps/python_no_app/tests/test_configs.py | 7 +- .../tests/test_global_invocation.py | 13 +- .../pyproject.toml | 1 + 25 files changed, 2649 insertions(+), 41 deletions(-) create mode 100644 rust/pyapi/src/infrastructure/mod.rs create mode 100644 rust/pyapi/src/infrastructure/pyproject.rs create mode 100644 test_apps/no_workspace/__init__.py create mode 100644 test_apps/no_workspace/t_invocation_env.py create mode 100644 test_apps/no_workspace/templates/pyproject.toml create mode 100644 test_apps/no_workspace/test_user_install.py create mode 100644 test_apps/no_workspace/user_install/inner/.keep create mode 100644 test_apps/no_workspace/user_install/poetry.lock create mode 100644 test_apps/no_workspace/user_install/pyproject.toml create mode 100644 test_apps/python_no_app/tests/shared.py diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 2b174595..01f9824f 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -139,3 +139,24 @@ jobs: working-directory: rust/origen_metal run: cargo test + # Use a global pytest install for invocation tests + - name: Install Pytest + run: pip install pytest==7.2.1 + + - name: Get Pytest Version (Check Install) + run: pytest --version + + - name: Run User-Global Invocation Tests + working-directory: test_apps/no_workspace + run: pytest test_user_install.py -vv + + # TODO eventually want to move this into a poetry build step + # For now, manually move the binary. Also keeps us from having to mess with the path across OSs + # 'mv' command should be be fine for both linux & powershell + # - name: Move Origen executable (Linux) + # if: matrix.os == 'ubuntu-latest' + # run: mv rust/origen/target/debug/origen python/origen/origen/__bin__/bin + + # - name: Move Origen executable (Windows) + # if: matrix.os == 'windows-latest' + # run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin diff --git a/.gitignore b/.gitignore index f078ed88..deb10ffb 100755 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,9 @@ log/ /test_apps/**/.session /python/origen/dist /python/origen_metal/dist +/python/origen_metal/build rls/ +.pytest_cache # pyenv .python-version @@ -35,9 +37,10 @@ rls/ # Output files from regressions python/origen/templates/dut_info.txt +test_apps/no_workspace/templates/output/ # Bin directory for packaging -python/origen/__bin__/bin/* -!python/origen/__bin__/bin/.keep +python/origen/origen/__bin__/bin/* +!python/origen/origen/__bin__/bin/.keep python/origen_metal/__bin__/bin/* !python/origen_metal/__bin__/bin/.keep diff --git a/python/origen/origen/__init__.py b/python/origen/origen/__init__.py index fd614e08..c5de3c1d 100644 --- a/python/origen/origen/__init__.py +++ b/python/origen/origen/__init__.py @@ -5,11 +5,15 @@ cli_path = None cli_ver = None vks = [] +pyproject_src = None +invoc = None regexp = re.compile(r'verbosity=(\d+)') cli_re = re.compile(r'origen_cli=(.+)') cli_ver_re = re.compile(r'origen_cli_version=(.+)') vk_re = re.compile(r'verbosity_keywords=(.+)') +pyproj_src_re = re.compile(r'pyproject_src=(.+)') +invoc_re = re.compile(r'invocation=(.+)') for arg in sys.argv: matches = regexp.search(arg) if matches: @@ -27,6 +31,14 @@ if matches: cli_ver = matches.group(1) next + matches = pyproj_src_re.search(arg) + if matches: + pyproject_src = matches.group(1) + next + matches = invoc_re.search(arg) + if matches: + invoc = matches.group(1) + next import _origen from _origen import _origen_metal @@ -64,7 +76,16 @@ def __getattr__(name: str): om = origen_metal origen_metal.frontend.initialize() -_origen.initialize(init_verbosity, vks, cli_path, cli_ver, pathlib.Path(__file__).parent, sys.executable) +_origen.initialize( + init_verbosity, + vks, + cli_path, + cli_ver, + pathlib.Path(__file__).parent, + sys.executable, + ((invoc, pyproject_src) if invoc else None) +) +del init_verbosity, vks, cli_path, cli_ver, invoc, pyproject_src from pathlib import Path import importlib diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index 01b82ff0..f554900b 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -21,11 +21,16 @@ def run_cli_cmd(cmd, *, shell=None, targets=None, check=True, + poetry_run=False, + origen_exe=None ): if isinstance(cmd, str): - cmd = ["origen", cmd] - else: - cmd = ["origen", *cmd] + cmd = [cmd] + if (origen_exe is None) or isinstance(origen_exe, str): + origen_exe = [origen_exe or 'origen'] + if poetry_run: + origen_exe = ["poetry", "run", *origen_exe] + cmd = [*origen_exe, *cmd] subp_env = os.environ.copy() if isinstance(with_configs, str) or isinstance(with_configs, pathlib.Path): diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index a1465970..40e392b0 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -18,7 +18,7 @@ script = "poetry_build.py" generate-setup-file = false [tool.poetry.scripts] -o2 = 'origen.__bin__:run_origen' +origen = 'origen.__bin__:run_origen' [tool.poetry.dependencies] python = ">=3.7,<3.11" diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index d1471e9b..1491ae3f 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -1,8 +1,10 @@ // Responsible for managing Python execution - use crate::built_info; -use origen::Result; +use origen::{Result, STATUS}; +use origen::core::status::DependencySrc; +use origen_metal::utils::file::search_backwards_for_first; use semver::Version; +use std::env; use std::path::PathBuf; use std::process::{Command, ExitStatus, Stdio}; @@ -31,6 +33,16 @@ lazy_static! { pub static ref PYTHON_CONFIG: Config = Config::default(); } +macro_rules! pyproject_str { + () => { "pyproject.toml" } +} +macro_rules! user_env_str { + () => { "ORIGEN_PYPROJECT" } +} + +const PYPROJECT: &'static str = pyproject_str!(); +const USER_ENV: &'static str = user_env_str!(); + pub struct Config { pub available: bool, pub command: String, @@ -38,18 +50,170 @@ pub struct Config { pub error: String, } +pub fn resolve_pyproject() -> Result { + // TODO allow a .origen offset when looking for pyprojects? + // let offset = ".origen"; + if let Some(app) = STATUS.app.as_ref() { + let path = app.root.join(PYPROJECT); + log_trace!("Found app pyproject: {}", path.display()); + return Ok(DependencySrc::App(path)); + } + + if let Some(p) = search_backwards_for_first(env::current_dir()?, |p| { + let f = p.join(PYPROJECT); + log_trace!("Searching for workspace project from {}", p.display()); + if f.exists() { + log_trace!("Found workspace pyproject: {}", f.display()); + Ok(Some(f)) + } else { + Ok(None) + } + })? { + return Ok(DependencySrc::Workspace(p.to_path_buf())) + } + + if let Some(p) = env::var_os(USER_ENV) { + log_trace!("Attempting to find user-given pyproject: {}", p.to_string_lossy()); + let mut f = PathBuf::from(p); + if f.exists() { + f = f.join(PYPROJECT); + if f.exists() { + log_trace!("Found user-given pyproject: {}", f.display()); + return Ok(DependencySrc::UserGlobal(f)); + } else { + bail!(concat!("Could not locate ", pyproject_str!(), " from ", user_env_str!(), " {}"), f.display()); + } + } else { + bail!(concat!(user_env_str!(), " '{}' does not exists!"), f.display()); + } + } + + // Try the python package installation directory + let path = std::env::current_exe()?; + log_trace!("Searching CLI installation directories for pyproject: {}", path.display()); + if let Some(p) = search_backwards_for_first(path, |p| { + let f = p.join(PYPROJECT); + log_trace!("Searching for workspace project from {}", p.display()); + if f.exists() { + log_trace!("Found workspace pyproject: {}", f.display()); + Ok(Some(f)) + } else { + Ok(None) + } + })? { + return Ok(DependencySrc::Global(p.to_path_buf())) + } + + log_trace!("No pyproject found. Skipping Poetry invocations..."); + Ok(DependencySrc::None) +} + impl Config { + pub fn base_cmd(&self) -> Command { + let dep_src = STATUS.dependency_src(); + let mut c = Command::new(&self.command); + + if let Some(dep_src) = dep_src.as_ref() { + match dep_src { + DependencySrc::App(_path) | DependencySrc::Workspace(_path) => { + c.arg("-m"); + c.arg("poetry"); + }, + DependencySrc::UserGlobal(path) | DependencySrc::Global(path) => { + c.arg("-m"); + c.arg("poetry"); + c.arg("-C"); + c.arg(path); + } + DependencySrc::None => {} + } + } else { + log_error!("Dependency source has not been set - defaulting to global Python installation"); + } + c + } + + pub fn run_cmd(&self, code: &str) -> Command { + let mut c = self.base_cmd(); + if let Some(d) = STATUS.dependency_src().as_ref() { + if d.src_available() { + c.arg("run"); + c.arg(&self.command); + } + } + c.arg("-c"); + c.arg(code); + if let Some(d) = STATUS.dependency_src().as_ref() { + c.arg(format!("invocation={}", d)); + if let Some(path) = d.src_file() { + c.arg(format!("pyproject_src={}", path.display())); + } + } + c + } + pub fn poetry_command(&self) -> Command { let mut c = Command::new(&self.command); c.arg("-m"); c.arg("poetry"); + if let Some(d) = STATUS.dependency_src().as_ref() { + if let Some(path) = d.src_file() { + c.arg("-C"); + c.arg(path); + } + } c } + + // TODO Invocation see if these are needed or can be cleaned up + // fn get_origen_pkg_path(&self) -> Result { + // let mut c = Command::new("pip"); + // c.arg("show"); + // c.arg("origen"); + // let output = exec_and_capture_cmd(c)?; + // if let Some(loc) = output.1.iter().find_map( |line| line.strip_prefix("Location: ")) { + // Ok(PathBuf::from(loc)) + // } else { + // bail!( + // "Error locating origen package information from pip.\nReceived stdout:\n{}\nReceived stderr:\n{}", + // output.1.join("\n"), + // output.2.join("\n") + // ); + // } + // } + + // fn in_workspace(&self) -> Result { + // let mut c = Command::new(&self.command); + // c.arg("-m"); + // c.arg("poetry"); + // c.arg("env"); + // c.arg("info"); + // let output = exec_and_capture_cmd(c)?; + // if !output.0.success() { + // if let Some(l) = output.2.last() { + // if l.starts_with("Poetry could not find a pyproject.toml file in ") { + // return Ok(false); + // } + // } + // bail!( + // "Unexpected response when querying poetry environment:\nReceived stdout:\n{}Received stderr:\n{}", + // output.1.join("\n"), + // output.2.join("\n") + // ); + // } + // Ok(true) + // } } impl Default for Config { fn default() -> Config { let mut available = false; + match resolve_pyproject() { + Ok(deps) => { + STATUS.set_dependency_src(Some(deps)) + }, + Err(e) => log_error!("Errors encountered resolving pyproject: {}", e) + } for cmd in PYTHONS.iter() { match get_version(cmd) { Some(version) => { @@ -163,11 +327,7 @@ fn extract_version(text: &str) -> Option { /// Execute the given Python code pub fn run(code: &str) -> Result { - let mut cmd = PYTHON_CONFIG.poetry_command(); - cmd.arg("run"); - cmd.arg(&PYTHON_CONFIG.command); - cmd.arg("-c"); - cmd.arg(&code); + let mut cmd = PYTHON_CONFIG.run_cmd(code); // current_exe returns the Python process once it gets underway, so pass in the CLI // location for Origen to use (used to resolve Origen config files) if let Ok(p) = std::env::current_exe() { @@ -190,15 +350,7 @@ pub fn run_with_callbacks( ) -> Result<()> { use origen::utility::command_helpers::log_stdout_and_stderr; - let mut cmd = PYTHON_CONFIG.poetry_command(); - cmd.arg("run"); - cmd.arg(&PYTHON_CONFIG.command); - cmd.arg("-c"); - cmd.arg(&code); - cmd.arg("-"); - // Force logger to be silent, use case for this is parsing output data so keep - // noise to a minimum - cmd.arg("verbosity=0"); + let mut cmd = PYTHON_CONFIG.run_cmd(code); // current_exe returns the Python process once it gets underway, so pass in the CLI // location for Origen to use (used to resolve Origen config files) if let Ok(p) = std::env::current_exe() { diff --git a/rust/origen/src/core/config.rs b/rust/origen/src/core/config.rs index 7039268b..42e28b24 100644 --- a/rust/origen/src/core/config.rs +++ b/rust/origen/src/core/config.rs @@ -404,12 +404,20 @@ impl Default for Config { } } else { match std::env::current_dir() { - Ok(path) => { + Ok(mut path) => { let f = path.join("origen.toml"); log_trace!("Looking for Origen config file in current working directory at '{}'", f.display()); if f.exists() { files.push(f); } + + while path.pop() { + let f = path.join("origen.toml"); + log_trace!("Looking for Origen config file at '{}'", f.display()); + if f.exists() { + files.push(f); + } + } } Err(e) => { log_error!("Failed to lookup current working directory: {}", e.to_string()) diff --git a/rust/origen/src/core/status.rs b/rust/origen/src/core/status.rs index d9be1b88..01d66434 100644 --- a/rust/origen/src/core/status.rs +++ b/rust/origen/src/core/status.rs @@ -54,6 +54,57 @@ impl FromStr for Operation { } } +#[derive(Debug, Display)] +pub enum DependencySrc { + // Dependencies resolve from... + App(PathBuf), // the application + Workspace(PathBuf), // current directory tree (in workspace) + UserGlobal(PathBuf), // explicitly given by user, no workspace + Global(PathBuf), // the origen CLI installation directory, no workspace + None, // None available. Use whatever is available in the same install environment as Origen itself +} + +impl DependencySrc { + pub fn src_available(&self) -> bool { + match self { + Self::None => false, + _ => true, + } + } + + pub fn src_file(&self) -> Option<&PathBuf> { + match self { + Self::App(path) | Self::Workspace(path) | Self::UserGlobal(path) | Self::Global(path) => Some(path), + Self::None => None, + } + } +} + +impl TryFrom<(S, Option)> for DependencySrc +where S: AsRef { + type Error = crate::Error; + + fn try_from(value: (S, Option)) -> Result { + macro_rules! gen_case { + ($t: ident) => { + if let Some(path) = value.1 { + Self::$t(path) + } else { + bail!(concat!("A path is required with dependency src type '", stringify!($t), "'")); + } + } + } + Ok(match value.0.as_ref() { + "App" => gen_case!(App), + "Workspace" => gen_case!(Workspace), + "UserGlobal" => gen_case!(UserGlobal), + "Global" => gen_case!(Global), + "None" => Self::None, + _ => bail!("Cannot convert value '{}' to dependency src type", value.0.as_ref()) + }) + } +} + // FEATURE Backend Current Command. Either store some basics here, or use a frontend wrapper // use crate::TypedValueMap; // #[derive(Debug)] @@ -114,6 +165,7 @@ pub struct Status { unique_id: RwLock, debug_enabled: RwLock, _operation: RwLock, + dependency_src: RwLock>, // command: RwLock>, // FEATURE Backend Current Command } @@ -207,6 +259,7 @@ impl Default for Status { unique_id: RwLock::new(0), debug_enabled: RwLock::new(false), _operation: RwLock::new(Operation::None), + dependency_src: RwLock::new(None), // command: RwLock::new(None), // FEATURE Backend Current Command }; log_trace!("Status built successfully"); @@ -444,6 +497,15 @@ impl Status { *s = stat; } + pub fn set_dependency_src(&self, src: Option) { + let mut dependency_src = self.dependency_src.write().unwrap(); + *dependency_src = src; + } + + pub fn dependency_src(&self) -> RwLockReadGuard> { + self.dependency_src.read().unwrap() + } + /// This is the main method to get the current output directory, accounting for all /// possible ways to set it, from current command, the app, default, etc. /// If nothing has been set (only possible when running globally), then it will default diff --git a/rust/origen_metal/src/utils/command.rs b/rust/origen_metal/src/utils/command.rs index 2560bdaf..a2b70af3 100644 --- a/rust/origen_metal/src/utils/command.rs +++ b/rust/origen_metal/src/utils/command.rs @@ -6,18 +6,7 @@ use std::process::{Command, Stdio}; use std::time::Duration; use wait_timeout::ChildExt; -/// Executes the given command/args, returning all captured stdout and stderr lines and -/// the exit code of the process. -pub fn exec_and_capture( - cmd: &str, - args: Option>, -) -> Result<(std::process::ExitStatus, Vec, Vec)> { - let mut command = Command::new(cmd); - if let Some(args) = args { - for arg in args { - command.arg(arg); - } - } +pub fn exec_and_capture_cmd(mut command: Command) -> Result<(std::process::ExitStatus, Vec, Vec)> { let mut process = command .stdout(Stdio::piped()) .stderr(Stdio::piped()) @@ -39,6 +28,21 @@ pub fn exec_and_capture( Ok((exit_code, stdout_lines, stderr_lines)) } +/// Executes the given command/args, returning all captured stdout and stderr lines and +/// the exit code of the process. +pub fn exec_and_capture( + cmd: &str, + args: Option>, +) -> Result<(std::process::ExitStatus, Vec, Vec)> { + let mut command = Command::new(cmd); + if let Some(args) = args { + for arg in args { + command.arg(arg); + } + } + exec_and_capture_cmd(command) +} + /// Log both stdout and stderr to the debug and error logs respectively, optionally /// calling a callback function for each line captured. /// If no callbacks are given then any captures lines will be sent to the debug and diff --git a/rust/origen_metal/src/utils/file.rs b/rust/origen_metal/src/utils/file.rs index 1bb1c729..17a70fb3 100644 --- a/rust/origen_metal/src/utils/file.rs +++ b/rust/origen_metal/src/utils/file.rs @@ -60,6 +60,24 @@ pub fn search_backwards_for(files: Vec<&str>, base: &Path) -> (bool, PathBuf) { } } +/// Similar to search_backwards_for but takes a func returning Result> if found, None otherwise. +/// Returns Ok(Some) for the first result and ceases running. If no results are found, returns Ok(None) +pub fn search_backwards_for_first(mut start_path: PathBuf, mut func: F) -> Result> +where + F: FnMut(&Path) -> Result> +{ + if let Some(res) = func(&start_path)? { + return Ok(Some(res)); + } + + while start_path.pop() { + if let Some(res) = func(&start_path)? { + return Ok(Some(res)); + } + } + Ok(None) +} + /// Change the current directory to the given one pub fn cd(dir: &Path) -> Result<()> { env::set_current_dir(&dir).context(&format!("When cd'ing to '{}'", dir.display()))?; diff --git a/rust/pyapi/src/infrastructure/mod.rs b/rust/pyapi/src/infrastructure/mod.rs new file mode 100644 index 00000000..5ca25963 --- /dev/null +++ b/rust/pyapi/src/infrastructure/mod.rs @@ -0,0 +1,10 @@ +pub mod pyproject; + +use pyo3::prelude::*; + +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "infrastructure")?; + pyproject::define(py, subm)?; + m.add_submodule(subm)?; + Ok(()) +} diff --git a/rust/pyapi/src/infrastructure/pyproject.rs b/rust/pyapi/src/infrastructure/pyproject.rs new file mode 100644 index 00000000..319e1f19 --- /dev/null +++ b/rust/pyapi/src/infrastructure/pyproject.rs @@ -0,0 +1,53 @@ +use origen::STATUS; +use pyo3::prelude::*; +use pyo3::types::PyDict; +use origen::core::status::DependencySrc; + +pub fn populate_status(py: Python, status: &PyDict) -> PyResult<()> { + if let Some(d) = STATUS.dependency_src().as_ref() { + if let Some(pyproject) = d.src_file() { + status.set_item("pyproject", pyapi_metal::pypath!(py, pyproject.display()))?; + } else { + status.set_item("pyproject", py.None())?; + } + status.set_item("invocation", PyProjectSrc::from(d).to_py(py)?)?; + } else { + status.set_item("pyproject", py.None())?; + status.set_item("invocation", py.None())?; + } + Ok(()) +} + +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "pyproject")?; + subm.add_class::()?; + m.add_submodule(subm)?; + Ok(()) +} + +#[pyclass] +pub enum PyProjectSrc { + App, + Workspace, + UserGlobal, + Global, + None, +} + +impl PyProjectSrc { + pub fn to_py(self, py: Python) -> PyResult> { + Py::new(py, self) + } +} + +impl From<&DependencySrc> for PyProjectSrc { + fn from(src: &DependencySrc) -> Self { + match src { + DependencySrc::App(_) => Self::App, + DependencySrc::Workspace(_) => Self::Workspace, + DependencySrc::UserGlobal(_) => Self::UserGlobal, + DependencySrc::Global(_) => Self::Global, + DependencySrc::None => Self::None, + } + } +} \ No newline at end of file diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index f78560b5..fccc92f3 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -13,6 +13,7 @@ mod current_command; mod dut; mod extensions; mod file_handler; +mod infrastructure; mod meta; mod model; #[macro_use] @@ -48,6 +49,7 @@ use std::str::FromStr; use std::sync::MutexGuard; use utility::location::Location; use paste::paste; +use origen::core::status::DependencySrc; use crate::dut::__PYO3_PYMODULE_DEF_DUT; use crate::tester::__PYO3_PYMODULE_DEF_TESTER; @@ -112,6 +114,7 @@ fn _origen(py: Python, m: &PyModule) -> PyResult<()> { plugins::define(py, m)?; extensions::define(py, m)?; current_command::define(py, m)?; + infrastructure::define(py, m)?; // Compile the _origen_metal library along with this one // to allow re-use from that library @@ -379,9 +382,16 @@ fn initialize( cli_version: Option, fe_pkg_loc: Option, fe_exe_loc: Option, + invocation: Option<(String, Option)>, ) -> PyResult<()> { origen::initialize(log_verbosity, verbosity_keywords, cli_location, cli_version, fe_pkg_loc, fe_exe_loc); origen::STATUS.update_other_build_info("pyapi_version", built_info::PKG_VERSION)?; + if let Some(invoc) = invocation { + match DependencySrc::try_from(invoc) { + Ok(d) => origen::STATUS.set_dependency_src(Some(d)), + Err(e) => log_error!("{}", e.to_string()) + } + } origen::FRONTEND .write() .unwrap() @@ -516,11 +526,21 @@ fn status(py: Python) -> PyResult { None => py.None(), }, )?; + ret.set_item( + "cli_location", + match STATUS.cli_location() { + Some(path) => pypath!(py, path.display()), + None => py.None(), + }, + )?; ret.set_item( "is_app_in_origen_dev_mode", STATUS.is_app_in_origen_dev_mode, )?; ret.set_item("in_origen_core_app", STATUS.in_origen_core_app())?; + + // Invocation details + infrastructure::pyproject::populate_status(py, ret)?; Ok(ret.into()) } diff --git a/test_apps/no_workspace/__init__.py b/test_apps/no_workspace/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py new file mode 100644 index 00000000..9185b399 --- /dev/null +++ b/test_apps/no_workspace/t_invocation_env.py @@ -0,0 +1,130 @@ +# Use the dev version but actual tests should be done through 'eval'. +import sys, pathlib +p = pathlib.Path(__file__).parent.parent.parent.joinpath("python/origen") +sys.path.append(str(p)) +sys.path.append(str(p.parent.joinpath("origen_metal"))) + +import origen, _origen, origen_metal + +import pytest, pip, jinja2, shutil, subprocess +from origen.helpers.regressions.cli import CLI +from types import ModuleType +from pathlib import Path, PosixPath, WindowsPath + +PyProjectSrc = _origen.infrastructure.pyproject.PyProjectSrc +toml = "pyproject.toml" +lockfile = "poetry.lock" +no_workspace_test_dir = pathlib.Path(__file__).parent +o2_root = no_workspace_test_dir.parent.parent +debug_cli_loc = o2_root.joinpath(f"rust/origen/target/debug/origen{'.exe' if origen.running_on_windows else ''}") + +# Assume pip is installed in 'site-packages' +site_packages_dir = pathlib.Path(pip.__file__).parent.parent + +class T_InvocationBaseTests(CLI): + templates_dir = no_workspace_test_dir.joinpath("templates") + templates_out_dir = templates_dir.joinpath("output") + debug_cli_loc = debug_cli_loc + PyProjectSrc = PyProjectSrc + + @classmethod + def setup(cls): + cls.set_params() + cls.target_pyproj_toml = cls.target_pyproj_dir.joinpath(toml) + cls.target_poetry_lock = cls.target_pyproj_dir.joinpath(lockfile) + + @property + def header(self): + return "--Origen Eval--" + + def test_invocation_from_pytest(self): + assert origen.status["pyproject"] is None + assert origen.status["invocation"] is None + + def eval_and_parse(self, code): + # out = CLI.global_cmds.eval.run(code, "-vv", run_opts={"return_details": True}) + out = CLI.global_cmds.eval.run(code) + out = out.split("\n") + idx = out.index(self.header) + return eval(out[idx+1]) + + def test_pyproject_and_invocation_set(self): + code = f"print('{self.header}'); print(origen.status)" + # code = r"print\(\\\"Origen\ Status:\\\"\) print\(origen.status\)" + status = self.eval_and_parse(code) + print(status) + assert status["pyproject"] == self.target_pyproj_toml + assert status["invocation"] == self.invocation + + def test_cli_location(self): + code = f"print('{self.header}'); print(origen.status)" + status = self.eval_and_parse(code) + assert status['cli_location'] == self.cli_location + +class T_InvocationEnv(T_InvocationBaseTests): + @classmethod + def setup(cls): + super().setup() + # cls.set_params() + cls._pyproj_src_file = cls.gen_pyproj() + if not hasattr(cls, "move_pyproject"): + cls.move_pyproject = True + # TODO clear any existing pyproject/poetry.locks ? + # cls._pyproj_lock = cls._pyproj_file.parent.joinpath("poetry.lock") + # for d in origen_exe_loc.parents: + # f = d.joinpath(toml) + # if f.exists(): + # target = f.parent.joinpath(f"{toml}.origen.regressions") + # print(f"Temporarily moving pyproject {f} to {target}") + # f.rename(target) + if cls.move_pyproject: + target = cls.target_pyproj_dir.joinpath(toml) + print(f"Moving pyproject {cls._pyproj_src_file} to {target}") + shutil.copy(cls._pyproj_src_file, target) + subprocess.run(["poetry", "install"], check=True, cwd=cls.target_pyproj_dir) + + @classmethod + def teardown(cls): + if cls.move_pyproject: + print(f"Cleaning pyproject and lockfile {cls.target_pyproj_toml}, {cls.target_poetry_lock}") + cls.target_pyproj_toml.unlink() + cls.target_poetry_lock.unlink() + + @classmethod + def gen_pyproj(cls): + env = jinja2.Environment( + loader=jinja2.FileSystemLoader(searchpath="./templates") + ) + t = env.get_template("pyproject.toml") + cls.templates_out_dir.mkdir(exist_ok=True) + pyproj = cls.templates_out_dir.joinpath(f"{cls.__name__}.{toml}") + with open(pyproj, "w") as f: + f.write(t.render(local_origen=cls.local_origen, name=cls.__name__, o2_root=o2_root)) + return pyproj + + # TEST_NEEDED invocation origen/metal package locations + # class TestBareEnv(CLI): + # @pytest.mark.parameterize( + # [origen, origen._origen, origen_metal, origen._origen_metal], + # ids=["origen", "_origen", "origen_metal", "_origen_metal"] + # ) + # def test_origen_pkgs(self, mod, ext, ): + # # assert origen.__file__ == ? + # # assert origen._origen.__file__ == + # # assert origen_metal.__file__ == ? + # # TEST_NEEDED CLI not sure why origen_metal._origen_metal has no filename + # # Just assert its a module fo now. + # # if id == "_origen_metal": + # assert isinstance(origen_metal._origen_metal, ModuleType) + + @pytest.mark.skip + def test_origen_h(self): + fail + + def test_plugins(self): + code = f"print('{self.header}'); print(list(origen.plugins.keys()))" + pls = self.eval_and_parse(code) + if self.has_pls: + assert pls == ['python_plugin_the_second', 'pl_ext_cmds', 'test_apps_shared_test_helpers', 'python_plugin'] + else: + assert pls == [] diff --git a/test_apps/no_workspace/templates/pyproject.toml b/test_apps/no_workspace/templates/pyproject.toml new file mode 100644 index 00000000..7be3df09 --- /dev/null +++ b/test_apps/no_workspace/templates/pyproject.toml @@ -0,0 +1,24 @@ +[tool.poetry] +name = "{{ name }}" +version = "0.1.0" +description = "Origen Installation Test" +authors = ["Origen-SDK"] + +[tool.poetry.dependencies] +python = ">=3.7,<3.11" +{% if local_origen %} +origen = { path = "{{ o2_root }}/python/origen", develop = true } +origen_metal = { path = "{{ o2_root }}/python/origen_metal", develop = true } +{% else %} +origen = ">= 0.0.0" +origen_metal = ">= 0.0.0" +{% endif %} +{% if include_plugins %} + {% if local_origen %} +pl_ext_cmds = { path = "{{ o2_root }}/test_apps/pl_ext_cmds", develop = true } +test_apps_shared_test_helpers = { path = "{{ o2_root }}/test_apps/test_apps_shared_test_helpers", develop = true } + {% else %} +pl_ext_cmds = ">= 0.0.0" +test_apps_shared_test_helpers = ">= 0.0.0" + {% endif %} +{% endif %} \ No newline at end of file diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py new file mode 100644 index 00000000..01dd7e25 --- /dev/null +++ b/test_apps/no_workspace/test_user_install.py @@ -0,0 +1,60 @@ +import os +from .t_invocation_env import T_InvocationEnv, no_workspace_test_dir, PyProjectSrc + +# class TestGlobalNoPlugins(T_InvocationEnv): +# @classmethod +# def set_params(cls): +# cls.local_origen = True +# cls.has_pls = False +# cls.target_pyproj_dir = cls.site_packages_dir +# cls.invocation = PyProjectSrc.Global + +# class TestGlobalWithPluginsHigherLevel(T_InvocationEnv): +# @classmethod +# def set_params(cls): +# cls.local_origen = True +# cls.has_pls = False +# cls.target_pyproj_dir = cls.site_packages_dir.parent + +# class TestGlobalWithPlugins(T_InvocationEnv): +# ... + +class TestUserInstall(T_InvocationEnv): + user_install_dir = no_workspace_test_dir.joinpath("user_install") + + @classmethod + def set_params(cls): + cls.local_origen = True + cls.has_pls = True + cls.target_pyproj_dir = cls.user_install_dir + cls.move_pyproject = False + cls.invocation = PyProjectSrc.UserGlobal + cls.cli_location = cls.debug_cli_loc + + @classmethod + def setup_method(cls): + super().setup() + os.environ["ORIGEN_PYPROJECT"] = str(cls.user_install_dir) + + @classmethod + def teardown_method(cls): + del os.environ["ORIGEN_PYPROJECT"] + + def test_exts_in_user_global_context(self): + out = self.global_cmds.eval.run("print('hi with exts')", "-b", "-a") + assert "Hi from python-plugin during 'eval'!" in out + assert "Hi again from python-plugin during 'eval'!" in out + +# class TestGlobalInstall(T_InvocationEnv): +# ... + +# class TestGlobalInstallWithPlugins(T_InvocationEnv): +# ... + +# @pytest.mark.skip +# class TestErrorCases(T_InvocationEnv): +# def test_origen_pkg_not_installed(self): +# fail + +# def test_missing_pyproject(self): +# fail diff --git a/test_apps/no_workspace/user_install/inner/.keep b/test_apps/no_workspace/user_install/inner/.keep new file mode 100644 index 00000000..e69de29b diff --git a/test_apps/no_workspace/user_install/poetry.lock b/test_apps/no_workspace/user_install/poetry.lock new file mode 100644 index 00000000..dfd75ab2 --- /dev/null +++ b/test_apps/no_workspace/user_install/poetry.lock @@ -0,0 +1,1976 @@ +# This file is automatically @generated by Poetry and should not be changed by hand. + +[[package]] +name = "alabaster" +version = "0.7.13" +description = "A configurable sidebar-enabled Sphinx theme" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, + {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, +] + +[[package]] +name = "attrs" +version = "23.1.0" +description = "Classes Without Boilerplate" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, + {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, +] + +[package.dependencies] +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} + +[package.extras] +cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]", "pre-commit"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] +tests = ["attrs[tests-no-zope]", "zope-interface"] +tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] + +[[package]] +name = "babel" +version = "2.12.1" +description = "Internationalization utilities" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Babel-2.12.1-py3-none-any.whl", hash = "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610"}, + {file = "Babel-2.12.1.tar.gz", hash = "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"}, +] + +[package.dependencies] +pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} + +[[package]] +name = "backports-cached-property" +version = "1.0.2" +description = "cached_property() - computed once per instance, cached as attribute" +category = "main" +optional = false +python-versions = ">=3.6.0" +files = [ + {file = "backports.cached-property-1.0.2.tar.gz", hash = "sha256:9306f9eed6ec55fd156ace6bc1094e2c86fae5fb2bf07b6a9c00745c656e75dd"}, + {file = "backports.cached_property-1.0.2-py3-none-any.whl", hash = "sha256:baeb28e1cd619a3c9ab8941431fe34e8490861fb998c6c4590693d50171db0cc"}, +] + +[[package]] +name = "beautifulsoup4" +version = "4.8.2" +description = "Screen-scraping library" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, + {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, + {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, +] + +[package.dependencies] +soupsieve = ">=1.2" + +[package.extras] +html5lib = ["html5lib"] +lxml = ["lxml"] + +[[package]] +name = "bs4" +version = "0.0.1" +description = "Dummy package for Beautiful Soup" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, +] + +[package.dependencies] +beautifulsoup4 = "*" + +[[package]] +name = "build" +version = "0.10.0" +description = "A simple, correct Python build frontend" +category = "main" +optional = false +python-versions = ">= 3.7" +files = [ + {file = "build-0.10.0-py3-none-any.whl", hash = "sha256:af266720050a66c893a6096a2f410989eeac74ff9a68ba194b3f6473e8e26171"}, + {file = "build-0.10.0.tar.gz", hash = "sha256:d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "os_name == \"nt\""} +importlib-metadata = {version = ">=0.22", markers = "python_version < \"3.8\""} +packaging = ">=19.0" +pyproject_hooks = "*" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} + +[package.extras] +docs = ["furo (>=2021.08.31)", "sphinx (>=4.0,<5.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)"] +test = ["filelock (>=3)", "pytest (>=6.2.4)", "pytest-cov (>=2.12)", "pytest-mock (>=2)", "pytest-rerunfailures (>=9.1)", "pytest-xdist (>=1.34)", "setuptools (>=42.0.0)", "setuptools (>=56.0.0)", "toml (>=0.10.0)", "wheel (>=0.36.0)"] +typing = ["importlib-metadata (>=5.1)", "mypy (==0.991)", "tomli", "typing-extensions (>=3.7.4.3)"] +virtualenv = ["virtualenv (>=20.0.35)"] + +[[package]] +name = "cachecontrol" +version = "0.12.14" +description = "httplib2 caching for requests" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "CacheControl-0.12.14-py2.py3-none-any.whl", hash = "sha256:1c2939be362a70c4e5f02c6249462b3b7a24441e4f1ced5e9ef028172edf356a"}, + {file = "CacheControl-0.12.14.tar.gz", hash = "sha256:d1087f45781c0e00616479bfd282c78504371ca71da017b49df9f5365a95feba"}, +] + +[package.dependencies] +lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} +msgpack = ">=0.5.2" +requests = "*" + +[package.extras] +filecache = ["lockfile (>=0.9)"] +redis = ["redis (>=2.10.5)"] + +[[package]] +name = "certifi" +version = "2023.5.7" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, + {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, +] + +[[package]] +name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "3.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-win32.whl", hash = "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-win32.whl", hash = "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-win32.whl", hash = "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-win32.whl", hash = "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-win32.whl", hash = "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b"}, + {file = "charset_normalizer-3.1.0-py3-none-any.whl", hash = "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d"}, +] + +[[package]] +name = "cleo" +version = "2.0.1" +description = "Cleo allows you to create beautiful and testable command-line interfaces." +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "cleo-2.0.1-py3-none-any.whl", hash = "sha256:6eb133670a3ed1f3b052d53789017b6e50fca66d1287e6e6696285f4cb8ea448"}, + {file = "cleo-2.0.1.tar.gz", hash = "sha256:eb4b2e1f3063c11085cebe489a6e9124163c226575a3c3be69b2e51af4a15ec5"}, +] + +[package.dependencies] +crashtest = ">=0.4.1,<0.5.0" +rapidfuzz = ">=2.2.0,<3.0.0" + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "commonmark" +version = "0.9.1" +description = "Python parser for the CommonMark Markdown spec" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] + +[package.extras] +test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] + +[[package]] +name = "crashtest" +version = "0.4.1" +description = "Manage Python errors with ease" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "crashtest-0.4.1-py3-none-any.whl", hash = "sha256:8d23eac5fa660409f57472e3851dab7ac18aba459a8d19cbbba86d3d5aecd2a5"}, + {file = "crashtest-0.4.1.tar.gz", hash = "sha256:80d7b1f316ebfbd429f648076d6275c877ba30ba48979de4191714a75266f0ce"}, +] + +[[package]] +name = "cryptography" +version = "41.0.1" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "cryptography-41.0.1-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:f73bff05db2a3e5974a6fd248af2566134d8981fd7ab012e5dd4ddb1d9a70699"}, + {file = "cryptography-41.0.1-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:1a5472d40c8f8e91ff7a3d8ac6dfa363d8e3138b961529c996f3e2df0c7a411a"}, + {file = "cryptography-41.0.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7fa01527046ca5facdf973eef2535a27fec4cb651e4daec4d043ef63f6ecd4ca"}, + {file = "cryptography-41.0.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b46e37db3cc267b4dea1f56da7346c9727e1209aa98487179ee8ebed09d21e43"}, + {file = "cryptography-41.0.1-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:d198820aba55660b4d74f7b5fd1f17db3aa5eb3e6893b0a41b75e84e4f9e0e4b"}, + {file = "cryptography-41.0.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:948224d76c4b6457349d47c0c98657557f429b4e93057cf5a2f71d603e2fc3a3"}, + {file = "cryptography-41.0.1-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:059e348f9a3c1950937e1b5d7ba1f8e968508ab181e75fc32b879452f08356db"}, + {file = "cryptography-41.0.1-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:b4ceb5324b998ce2003bc17d519080b4ec8d5b7b70794cbd2836101406a9be31"}, + {file = "cryptography-41.0.1-cp37-abi3-win32.whl", hash = "sha256:8f4ab7021127a9b4323537300a2acfb450124b2def3756f64dc3a3d2160ee4b5"}, + {file = "cryptography-41.0.1-cp37-abi3-win_amd64.whl", hash = "sha256:1fee5aacc7367487b4e22484d3c7e547992ed726d14864ee33c0176ae43b0d7c"}, + {file = "cryptography-41.0.1-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9a6c7a3c87d595608a39980ebaa04d5a37f94024c9f24eb7d10262b92f739ddb"}, + {file = "cryptography-41.0.1-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5d092fdfedaec4cbbffbf98cddc915ba145313a6fdaab83c6e67f4e6c218e6f3"}, + {file = "cryptography-41.0.1-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a8e6c2de6fbbcc5e14fd27fb24414507cb3333198ea9ab1258d916f00bc3039"}, + {file = "cryptography-41.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:cb33ccf15e89f7ed89b235cff9d49e2e62c6c981a6061c9c8bb47ed7951190bc"}, + {file = "cryptography-41.0.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f0ff6e18d13a3de56f609dd1fd11470918f770c6bd5d00d632076c727d35485"}, + {file = "cryptography-41.0.1-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7bfc55a5eae8b86a287747053140ba221afc65eb06207bedf6e019b8934b477c"}, + {file = "cryptography-41.0.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:eb8163f5e549a22888c18b0d53d6bb62a20510060a22fd5a995ec8a05268df8a"}, + {file = "cryptography-41.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:8dde71c4169ec5ccc1087bb7521d54251c016f126f922ab2dfe6649170a3b8c5"}, + {file = "cryptography-41.0.1.tar.gz", hash = "sha256:d34579085401d3f49762d2f7d6634d6b6c2ae1242202e860f4d26b046e3a1006"}, +] + +[package.dependencies] +cffi = ">=1.12" + +[package.extras] +docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] +docstest = ["pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"] +nox = ["nox"] +pep8test = ["black", "check-sdist", "mypy", "ruff"] +sdist = ["build"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test-randomorder = ["pytest-randomly"] + +[[package]] +name = "distlib" +version = "0.3.6" +description = "Distribution utilities" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, +] + +[[package]] +name = "docutils" +version = "0.20.1" +description = "Docutils -- Python Documentation Utilities" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, +] + +[[package]] +name = "dulwich" +version = "0.21.5" +description = "Python Git Library" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "dulwich-0.21.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8864719bc176cdd27847332a2059127e2f7bab7db2ff99a999873cb7fff54116"}, + {file = "dulwich-0.21.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3800cdc17d144c1f7e114972293bd6c46688f5bcc2c9228ed0537ded72394082"}, + {file = "dulwich-0.21.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e2f676bfed8146966fe934ee734969d7d81548fbd250a8308582973670a9dab1"}, + {file = "dulwich-0.21.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4db330fb59fe3b9d253bdf0e49a521739db83689520c4921ab1c5242aaf77b82"}, + {file = "dulwich-0.21.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e8f6d4f4f4d01dd1d3c968e486d4cd77f96f772da7265941bc506de0944ddb9"}, + {file = "dulwich-0.21.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:1cc0c9ba19ac1b2372598802bc9201a9c45e5d6f1f7a80ec40deeb10acc4e9ae"}, + {file = "dulwich-0.21.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:61e10242b5a7a82faa8996b2c76239cfb633620b02cdd2946e8af6e7eb31d651"}, + {file = "dulwich-0.21.5-cp310-cp310-win32.whl", hash = "sha256:7f357639b56146a396f48e5e0bc9bbaca3d6d51c8340bd825299272b588fff5f"}, + {file = "dulwich-0.21.5-cp310-cp310-win_amd64.whl", hash = "sha256:891d5c73e2b66d05dbb502e44f027dc0dbbd8f6198bc90dae348152e69d0befc"}, + {file = "dulwich-0.21.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:45d6198e804b539708b73a003419e48fb42ff2c3c6dd93f63f3b134dff6dd259"}, + {file = "dulwich-0.21.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c2a565d4e704d7f784cdf9637097141f6d47129c8fffc2fac699d57cb075a169"}, + {file = "dulwich-0.21.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:823091d6b6a1ea07dc4839c9752198fb39193213d103ac189c7669736be2eaff"}, + {file = "dulwich-0.21.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b2c9931b657f2206abec0964ec2355ee2c1e04d05f8864e823ffa23c548c4548"}, + {file = "dulwich-0.21.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7dc358c2ee727322a09b7c6da43d47a1026049dbd3ad8d612eddca1f9074b298"}, + {file = "dulwich-0.21.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6155ab7388ee01c670f7c5d8003d4e133eebebc7085a856c007989f0ba921b36"}, + {file = "dulwich-0.21.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a605e10d72f90a39ea2e634fbfd80f866fc4df29a02ea6db52ae92e5fd4a2003"}, + {file = "dulwich-0.21.5-cp311-cp311-win32.whl", hash = "sha256:daa607370722c3dce99a0022397c141caefb5ed32032a4f72506f4817ea6405b"}, + {file = "dulwich-0.21.5-cp311-cp311-win_amd64.whl", hash = "sha256:5e56b2c1911c344527edb2bf1a4356e2fb7e086b1ba309666e1e5c2224cdca8a"}, + {file = "dulwich-0.21.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:85d3401d08b1ec78c7d58ae987c4bb7b768a438f3daa74aeb8372bebc7fb16fa"}, + {file = "dulwich-0.21.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:90479608e49db93d8c9e4323bc0ec5496678b535446e29d8fd67dc5bbb5d51bf"}, + {file = "dulwich-0.21.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9a6bf99f57bcac4c77fc60a58f1b322c91cc4d8c65dc341f76bf402622f89cb"}, + {file = "dulwich-0.21.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3e68b162af2aae995355e7920f89d50d72b53d56021e5ac0a546d493b17cbf7e"}, + {file = "dulwich-0.21.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0ab86d6d42e385bf3438e70f3c9b16de68018bd88929379e3484c0ef7990bd3c"}, + {file = "dulwich-0.21.5-cp37-cp37m-win32.whl", hash = "sha256:f2eeca6d61366cf5ee8aef45bed4245a67d4c0f0d731dc2383eabb80fa695683"}, + {file = "dulwich-0.21.5-cp37-cp37m-win_amd64.whl", hash = "sha256:1b20a3656b48c941d49c536824e1e5278a695560e8de1a83b53a630143c4552e"}, + {file = "dulwich-0.21.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3932b5e17503b265a85f1eda77ede647681c3bab53bc9572955b6b282abd26ea"}, + {file = "dulwich-0.21.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6616132d219234580de88ceb85dd51480dc43b1bdc05887214b8dd9cfd4a9d40"}, + {file = "dulwich-0.21.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:eaf6c7fb6b13495c19c9aace88821c2ade3c8c55b4e216cd7cc55d3e3807d7fa"}, + {file = "dulwich-0.21.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be12a46f73023970125808a4a78f610c055373096c1ecea3280edee41613eba8"}, + {file = "dulwich-0.21.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baecef0d8b9199822c7912876a03a1af17833f6c0d461efb62decebd45897e49"}, + {file = "dulwich-0.21.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:82f632afb9c7c341a875d46aaa3e6c5e586c7a64ce36c9544fa400f7e4f29754"}, + {file = "dulwich-0.21.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:82cdf482f8f51fcc965ffad66180b54a9abaea9b1e985a32e1acbfedf6e0e363"}, + {file = "dulwich-0.21.5-cp38-cp38-win32.whl", hash = "sha256:c8ded43dc0bd2e65420eb01e778034be5ca7f72e397a839167eda7dcb87c4248"}, + {file = "dulwich-0.21.5-cp38-cp38-win_amd64.whl", hash = "sha256:2aba0fdad2a19bd5bb3aad6882580cb33359c67b48412ccd4cfccd932012b35e"}, + {file = "dulwich-0.21.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:fd4ad079758514375f11469e081723ba8831ce4eaa1a64b41f06a3a866d5ac34"}, + {file = "dulwich-0.21.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7fe62685bf356bfb4d0738f84a3fcf0d1fc9e11fee152e488a20b8c66a52429e"}, + {file = "dulwich-0.21.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:aae448da7d80306dda4fc46292fed7efaa466294571ab3448be16714305076f1"}, + {file = "dulwich-0.21.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b24cb1fad0525dba4872e9381bc576ea2a6dcdf06b0ed98f8e953e3b1d719b89"}, + {file = "dulwich-0.21.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1e39b7c2c9bda6acae83b25054650a8bb7e373e886e2334721d384e1479bf04b"}, + {file = "dulwich-0.21.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:26456dba39d1209fca17187db06967130e27eeecad2b3c2bbbe63467b0bf09d6"}, + {file = "dulwich-0.21.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:281310644e02e3aa6d76bcaffe2063b9031213c4916b5f1a6e68c25bdecfaba4"}, + {file = "dulwich-0.21.5-cp39-cp39-win32.whl", hash = "sha256:4814ca3209dabe0fe7719e9545fbdad7f8bb250c5a225964fe2a31069940c4cf"}, + {file = "dulwich-0.21.5-cp39-cp39-win_amd64.whl", hash = "sha256:c922a4573267486be0ef85216f2da103fb38075b8465dc0e90457843884e4860"}, + {file = "dulwich-0.21.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e52b20c4368171b7d32bd3ab0f1d2402e76ad4f2ea915ff9aa73bc9fa2b54d6d"}, + {file = "dulwich-0.21.5-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aeb736d777ee21f2117a90fc453ee181aa7eedb9e255b5ef07c51733f3fe5cb6"}, + {file = "dulwich-0.21.5-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5e8a79c1ed7166f32ad21974fa98d11bf6fd74e94a47e754c777c320e01257c6"}, + {file = "dulwich-0.21.5-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:b943517e30bd651fbc275a892bb96774f3893d95fe5a4dedd84496a98eaaa8ab"}, + {file = "dulwich-0.21.5-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:32493a456358a3a6c15bbda07106fc3d4cc50834ee18bc7717968d18be59b223"}, + {file = "dulwich-0.21.5-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0aa44b812d978fc22a04531f5090c3c369d5facd03fa6e0501d460a661800c7f"}, + {file = "dulwich-0.21.5-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f46bcb6777e5f9f4af24a2bd029e88b77316269d24ce66be590e546a0d8f7b7"}, + {file = "dulwich-0.21.5-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:a917fd3b4493db3716da2260f16f6b18f68d46fbe491d851d154fc0c2d984ae4"}, + {file = "dulwich-0.21.5-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:684c52cff867d10c75a7238151ca307582b3d251bbcd6db9e9cffbc998ef804e"}, + {file = "dulwich-0.21.5-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9019189d7a8f7394df6a22cd5b484238c5776e42282ad5d6d6c626b4c5f43597"}, + {file = "dulwich-0.21.5-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:494024f74c2eef9988adb4352b3651ac1b6c0466176ec62b69d3d3672167ba68"}, + {file = "dulwich-0.21.5-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:f9b6ac1b1c67fc6083c42b7b6cd3b211292c8a6517216c733caf23e8b103ab6d"}, + {file = "dulwich-0.21.5.tar.gz", hash = "sha256:70955e4e249ddda6e34a4636b90f74e931e558f993b17c52570fa6144b993103"}, +] + +[package.dependencies] +typing-extensions = {version = "*", markers = "python_version <= \"3.7\""} +urllib3 = ">=1.25" + +[package.extras] +fastimport = ["fastimport"] +https = ["urllib3 (>=1.24.1)"] +paramiko = ["paramiko"] +pgp = ["gpg"] + +[[package]] +name = "exceptiongroup" +version = "1.1.1" +description = "Backport of PEP 654 (exception groups)" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, + {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, +] + +[package.extras] +test = ["pytest (>=6)"] + +[[package]] +name = "filelock" +version = "3.12.2" +description = "A platform independent file lock." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "filelock-3.12.2-py3-none-any.whl", hash = "sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec"}, + {file = "filelock-3.12.2.tar.gz", hash = "sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81"}, +] + +[package.extras] +docs = ["furo (>=2023.5.20)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] + +[[package]] +name = "html5lib" +version = "1.1" +description = "HTML parser based on the WHATWG HTML specification" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, + {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, +] + +[package.dependencies] +six = ">=1.9" +webencodings = "*" + +[package.extras] +all = ["chardet (>=2.2)", "genshi", "lxml"] +chardet = ["chardet (>=2.2)"] +genshi = ["genshi"] +lxml = ["lxml"] + +[[package]] +name = "idna" +version = "3.4" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] + +[[package]] +name = "imagesize" +version = "1.4.1" +description = "Getting image size from png/jpeg/jpeg2000/gif file" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] + +[[package]] +name = "importlib-metadata" +version = "6.7.0" +description = "Read metadata from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, + {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, +] + +[package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] + +[[package]] +name = "importlib-resources" +version = "5.12.0" +description = "Read resources from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "importlib_resources-5.12.0-py3-none-any.whl", hash = "sha256:7b1deeebbf351c7578e09bf2f63fa2ce8b5ffec296e0d349139d43cca061a81a"}, + {file = "importlib_resources-5.12.0.tar.gz", hash = "sha256:4be82589bf5c1d7999aedf2a45159d10cb3ca4f19b2271f8792bc8e6da7b22f6"}, +] + +[package.dependencies] +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + +[[package]] +name = "installer" +version = "0.7.0" +description = "A library for installing Python wheels." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "installer-0.7.0-py3-none-any.whl", hash = "sha256:05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53"}, + {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, +] + +[[package]] +name = "jaraco-classes" +version = "3.2.3" +description = "Utility functions for Python class constructs" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jaraco.classes-3.2.3-py3-none-any.whl", hash = "sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158"}, + {file = "jaraco.classes-3.2.3.tar.gz", hash = "sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a"}, +] + +[package.dependencies] +more-itertools = "*" + +[package.extras] +docs = ["jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[[package]] +name = "jeepney" +version = "0.8.0" +description = "Low-level, pure Python DBus protocol wrapper." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, +] + +[package.extras] +test = ["async-timeout", "pytest", "pytest-asyncio (>=0.17)", "pytest-trio", "testpath", "trio"] +trio = ["async_generator", "trio"] + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "jsonschema" +version = "4.17.3" +description = "An implementation of JSON Schema validation for Python" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "jsonschema-4.17.3-py3-none-any.whl", hash = "sha256:a870ad254da1a8ca84b6a2905cac29d265f805acc57af304784962a2aa6508f6"}, + {file = "jsonschema-4.17.3.tar.gz", hash = "sha256:0f864437ab8b6076ba6707453ef8f98a6a0d512a80e93f8abdb676f737ecb60d"}, +] + +[package.dependencies] +attrs = ">=17.4.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +importlib-resources = {version = ">=1.4.0", markers = "python_version < \"3.9\""} +pkgutil-resolve-name = {version = ">=1.3.10", markers = "python_version < \"3.9\""} +pyrsistent = ">=0.14.0,<0.17.0 || >0.17.0,<0.17.1 || >0.17.1,<0.17.2 || >0.17.2" +typing-extensions = {version = "*", markers = "python_version < \"3.8\""} + +[package.extras] +format = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3987", "uri-template", "webcolors (>=1.11)"] +format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339-validator", "rfc3986-validator (>0.1.0)", "uri-template", "webcolors (>=1.11)"] + +[[package]] +name = "keyring" +version = "23.13.1" +description = "Store and access your passwords safely." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "keyring-23.13.1-py3-none-any.whl", hash = "sha256:771ed2a91909389ed6148631de678f82ddc73737d85a927f382a8a1b157898cd"}, + {file = "keyring-23.13.1.tar.gz", hash = "sha256:ba2e15a9b35e21908d0aaf4e0a47acc52d6ae33444df0da2b49d41a46ef6d678"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""} +importlib-resources = {version = "*", markers = "python_version < \"3.9\""} +"jaraco.classes" = "*" +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = ">=0.2.0", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} + +[package.extras] +completion = ["shtab"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[[package]] +name = "lockfile" +version = "0.12.2" +description = "Platform-independent file locking module" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, + {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +] + +[[package]] +name = "mako" +version = "1.1.0" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, +] + +[package.dependencies] +MarkupSafe = ">=0.9.2" + +[[package]] +name = "markupsafe" +version = "2.1.3" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, +] + +[[package]] +name = "more-itertools" +version = "9.1.0" +description = "More routines for operating on iterables, beyond itertools" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "more-itertools-9.1.0.tar.gz", hash = "sha256:cabaa341ad0389ea83c17a94566a53ae4c9d07349861ecb14dc6d0345cf9ac5d"}, + {file = "more_itertools-9.1.0-py3-none-any.whl", hash = "sha256:d2bc7f02446e86a68911e58ded76d6561eea00cddfb2a91e7019bbb586c799f3"}, +] + +[[package]] +name = "msgpack" +version = "1.0.5" +description = "MessagePack serializer" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "msgpack-1.0.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:525228efd79bb831cf6830a732e2e80bc1b05436b086d4264814b4b2955b2fa9"}, + {file = "msgpack-1.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4f8d8b3bf1ff2672567d6b5c725a1b347fe838b912772aa8ae2bf70338d5a198"}, + {file = "msgpack-1.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdc793c50be3f01106245a61b739328f7dccc2c648b501e237f0699fe1395b81"}, + {file = "msgpack-1.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cb47c21a8a65b165ce29f2bec852790cbc04936f502966768e4aae9fa763cb7"}, + {file = "msgpack-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e42b9594cc3bf4d838d67d6ed62b9e59e201862a25e9a157019e171fbe672dd3"}, + {file = "msgpack-1.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:55b56a24893105dc52c1253649b60f475f36b3aa0fc66115bffafb624d7cb30b"}, + {file = "msgpack-1.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:1967f6129fc50a43bfe0951c35acbb729be89a55d849fab7686004da85103f1c"}, + {file = "msgpack-1.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20a97bf595a232c3ee6d57ddaadd5453d174a52594bf9c21d10407e2a2d9b3bd"}, + {file = "msgpack-1.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d25dd59bbbbb996eacf7be6b4ad082ed7eacc4e8f3d2df1ba43822da9bfa122a"}, + {file = "msgpack-1.0.5-cp310-cp310-win32.whl", hash = "sha256:382b2c77589331f2cb80b67cc058c00f225e19827dbc818d700f61513ab47bea"}, + {file = "msgpack-1.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:4867aa2df9e2a5fa5f76d7d5565d25ec76e84c106b55509e78c1ede0f152659a"}, + {file = "msgpack-1.0.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9f5ae84c5c8a857ec44dc180a8b0cc08238e021f57abdf51a8182e915e6299f0"}, + {file = "msgpack-1.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9e6ca5d5699bcd89ae605c150aee83b5321f2115695e741b99618f4856c50898"}, + {file = "msgpack-1.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5494ea30d517a3576749cad32fa27f7585c65f5f38309c88c6d137877fa28a5a"}, + {file = "msgpack-1.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ab2f3331cb1b54165976a9d976cb251a83183631c88076613c6c780f0d6e45a"}, + {file = "msgpack-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28592e20bbb1620848256ebc105fc420436af59515793ed27d5c77a217477705"}, + {file = "msgpack-1.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe5c63197c55bce6385d9aee16c4d0641684628f63ace85f73571e65ad1c1e8d"}, + {file = "msgpack-1.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ed40e926fa2f297e8a653c954b732f125ef97bdd4c889f243182299de27e2aa9"}, + {file = "msgpack-1.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b2de4c1c0538dcb7010902a2b97f4e00fc4ddf2c8cda9749af0e594d3b7fa3d7"}, + {file = "msgpack-1.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bf22a83f973b50f9d38e55c6aade04c41ddda19b00c4ebc558930d78eecc64ed"}, + {file = "msgpack-1.0.5-cp311-cp311-win32.whl", hash = "sha256:c396e2cc213d12ce017b686e0f53497f94f8ba2b24799c25d913d46c08ec422c"}, + {file = "msgpack-1.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:6c4c68d87497f66f96d50142a2b73b97972130d93677ce930718f68828b382e2"}, + {file = "msgpack-1.0.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:a2b031c2e9b9af485d5e3c4520f4220d74f4d222a5b8dc8c1a3ab9448ca79c57"}, + {file = "msgpack-1.0.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f837b93669ce4336e24d08286c38761132bc7ab29782727f8557e1eb21b2080"}, + {file = "msgpack-1.0.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1d46dfe3832660f53b13b925d4e0fa1432b00f5f7210eb3ad3bb9a13c6204a6"}, + {file = "msgpack-1.0.5-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:366c9a7b9057e1547f4ad51d8facad8b406bab69c7d72c0eb6f529cf76d4b85f"}, + {file = "msgpack-1.0.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:4c075728a1095efd0634a7dccb06204919a2f67d1893b6aa8e00497258bf926c"}, + {file = "msgpack-1.0.5-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:f933bbda5a3ee63b8834179096923b094b76f0c7a73c1cfe8f07ad608c58844b"}, + {file = "msgpack-1.0.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:36961b0568c36027c76e2ae3ca1132e35123dcec0706c4b7992683cc26c1320c"}, + {file = "msgpack-1.0.5-cp36-cp36m-win32.whl", hash = "sha256:b5ef2f015b95f912c2fcab19c36814963b5463f1fb9049846994b007962743e9"}, + {file = "msgpack-1.0.5-cp36-cp36m-win_amd64.whl", hash = "sha256:288e32b47e67f7b171f86b030e527e302c91bd3f40fd9033483f2cacc37f327a"}, + {file = "msgpack-1.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:137850656634abddfb88236008339fdaba3178f4751b28f270d2ebe77a563b6c"}, + {file = "msgpack-1.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c05a4a96585525916b109bb85f8cb6511db1c6f5b9d9cbcbc940dc6b4be944b"}, + {file = "msgpack-1.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56a62ec00b636583e5cb6ad313bbed36bb7ead5fa3a3e38938503142c72cba4f"}, + {file = "msgpack-1.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef8108f8dedf204bb7b42994abf93882da1159728a2d4c5e82012edd92c9da9f"}, + {file = "msgpack-1.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1835c84d65f46900920b3708f5ba829fb19b1096c1800ad60bae8418652a951d"}, + {file = "msgpack-1.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:e57916ef1bd0fee4f21c4600e9d1da352d8816b52a599c46460e93a6e9f17086"}, + {file = "msgpack-1.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:17358523b85973e5f242ad74aa4712b7ee560715562554aa2134d96e7aa4cbbf"}, + {file = "msgpack-1.0.5-cp37-cp37m-win32.whl", hash = "sha256:cb5aaa8c17760909ec6cb15e744c3ebc2ca8918e727216e79607b7bbce9c8f77"}, + {file = "msgpack-1.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:ab31e908d8424d55601ad7075e471b7d0140d4d3dd3272daf39c5c19d936bd82"}, + {file = "msgpack-1.0.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b72d0698f86e8d9ddf9442bdedec15b71df3598199ba33322d9711a19f08145c"}, + {file = "msgpack-1.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:379026812e49258016dd84ad79ac8446922234d498058ae1d415f04b522d5b2d"}, + {file = "msgpack-1.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:332360ff25469c346a1c5e47cbe2a725517919892eda5cfaffe6046656f0b7bb"}, + {file = "msgpack-1.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:476a8fe8fae289fdf273d6d2a6cb6e35b5a58541693e8f9f019bfe990a51e4ba"}, + {file = "msgpack-1.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9985b214f33311df47e274eb788a5893a761d025e2b92c723ba4c63936b69b1"}, + {file = "msgpack-1.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48296af57cdb1d885843afd73c4656be5c76c0c6328db3440c9601a98f303d87"}, + {file = "msgpack-1.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:addab7e2e1fcc04bd08e4eb631c2a90960c340e40dfc4a5e24d2ff0d5a3b3edb"}, + {file = "msgpack-1.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:916723458c25dfb77ff07f4c66aed34e47503b2eb3188b3adbec8d8aa6e00f48"}, + {file = "msgpack-1.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:821c7e677cc6acf0fd3f7ac664c98803827ae6de594a9f99563e48c5a2f27eb0"}, + {file = "msgpack-1.0.5-cp38-cp38-win32.whl", hash = "sha256:1c0f7c47f0087ffda62961d425e4407961a7ffd2aa004c81b9c07d9269512f6e"}, + {file = "msgpack-1.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:bae7de2026cbfe3782c8b78b0db9cbfc5455e079f1937cb0ab8d133496ac55e1"}, + {file = "msgpack-1.0.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:20c784e66b613c7f16f632e7b5e8a1651aa5702463d61394671ba07b2fc9e025"}, + {file = "msgpack-1.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:266fa4202c0eb94d26822d9bfd7af25d1e2c088927fe8de9033d929dd5ba24c5"}, + {file = "msgpack-1.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:18334484eafc2b1aa47a6d42427da7fa8f2ab3d60b674120bce7a895a0a85bdd"}, + {file = "msgpack-1.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57e1f3528bd95cc44684beda696f74d3aaa8a5e58c816214b9046512240ef437"}, + {file = "msgpack-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:586d0d636f9a628ddc6a17bfd45aa5b5efaf1606d2b60fa5d87b8986326e933f"}, + {file = "msgpack-1.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a740fa0e4087a734455f0fc3abf5e746004c9da72fbd541e9b113013c8dc3282"}, + {file = "msgpack-1.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3055b0455e45810820db1f29d900bf39466df96ddca11dfa6d074fa47054376d"}, + {file = "msgpack-1.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:a61215eac016f391129a013c9e46f3ab308db5f5ec9f25811e811f96962599a8"}, + {file = "msgpack-1.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:362d9655cd369b08fda06b6657a303eb7172d5279997abe094512e919cf74b11"}, + {file = "msgpack-1.0.5-cp39-cp39-win32.whl", hash = "sha256:ac9dd47af78cae935901a9a500104e2dea2e253207c924cc95de149606dc43cc"}, + {file = "msgpack-1.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:06f5174b5f8ed0ed919da0e62cbd4ffde676a374aba4020034da05fab67b9164"}, + {file = "msgpack-1.0.5.tar.gz", hash = "sha256:c075544284eadc5cddc70f4757331d99dcbc16b2bbd4849d15f8aae4cf36d31c"}, +] + +[[package]] +name = "origen" +version = "2.0.0.dev5" +description = "Semiconductor Developer's Kit" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +files = [] +develop = true + +[package.dependencies] +beautifulsoup4 = "4.8.2" +bs4 = "0.0.1" +colorama = "^0.4" +importlib-metadata = ">= 1.7.0" +Jinja2 = "^3" +mako = "1.1.0" +origen_autoapi = "2.0.1" +origen_metal = "= 0.4.0" +poetry = "^1.1.14" +recommonmark = ">= 0" +sphinx = "3.0.2" +sphinxbootstrap4theme = ">= 0" +termcolor = ">= 1.1.0" +yapf = "0.30" + +[package.source] +type = "directory" +url = "../../../python/origen" + +[[package]] +name = "origen-autoapi" +version = "2.0.1" +description = "Automatic API reference documentation generation for Sphinx inspired by Doxygen, with changes for the Origen project." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, + {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, +] + +[package.dependencies] +sphinx = "*" + +[[package]] +name = "origen-metal" +version = "0.4.0" +description = "Bare metal APIs for the Origen SDK" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +files = [] +develop = true + +[package.dependencies] +colorama = ">= 0.4.4" +pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} +termcolor = ">= 1.1.0" + +[package.source] +type = "directory" +url = "../../../python/origen_metal" + +[[package]] +name = "packaging" +version = "23.1" +description = "Core utilities for Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, + {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, +] + +[[package]] +name = "pexpect" +version = "4.8.0" +description = "Pexpect allows easy control of interactive console applications." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] + +[package.dependencies] +ptyprocess = ">=0.5" + +[[package]] +name = "pkginfo" +version = "1.9.6" +description = "Query metadata from sdists / bdists / installed packages." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pkginfo-1.9.6-py3-none-any.whl", hash = "sha256:4b7a555a6d5a22169fcc9cf7bfd78d296b0361adad412a346c1226849af5e546"}, + {file = "pkginfo-1.9.6.tar.gz", hash = "sha256:8fd5896e8718a4372f0ea9cc9d96f6417c9b986e23a4d116dda26b62cc29d046"}, +] + +[package.extras] +testing = ["pytest", "pytest-cov"] + +[[package]] +name = "pkgutil-resolve-name" +version = "1.3.10" +description = "Resolve a name to an object." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pkgutil_resolve_name-1.3.10-py3-none-any.whl", hash = "sha256:ca27cc078d25c5ad71a9de0a7a330146c4e014c2462d9af19c6b828280649c5e"}, + {file = "pkgutil_resolve_name-1.3.10.tar.gz", hash = "sha256:357d6c9e6a755653cfd78893817c0853af365dd51ec97f3d358a819373bbd174"}, +] + +[[package]] +name = "pl-ext-cmds" +version = "0.1.0" +description = "Plugin Extending Cmds" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +files = [] +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +origen_metal = {path = "../../python/origen_metal", develop = true} + +[package.source] +type = "directory" +url = "../../pl_ext_cmds" + +[[package]] +name = "platformdirs" +version = "3.6.0" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "platformdirs-3.6.0-py3-none-any.whl", hash = "sha256:ffa199e3fbab8365778c4a10e1fbf1b9cd50707de826eb304b50e57ec0cc8d38"}, + {file = "platformdirs-3.6.0.tar.gz", hash = "sha256:57e28820ca8094678b807ff529196506d7a21e17156cb1cddb3e74cebce54640"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.6.3", markers = "python_version < \"3.8\""} + +[package.extras] +docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)"] + +[[package]] +name = "pluggy" +version = "1.0.0" +description = "plugin and hook calling mechanisms for python" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[[package]] +name = "poetry" +version = "1.5.1" +description = "Python dependency management and packaging made easy." +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry-1.5.1-py3-none-any.whl", hash = "sha256:dfc7ce3a38ae216c0465694e2e674bef6eb1a2ba81aa47a26f9dc03362fe2f5f"}, + {file = "poetry-1.5.1.tar.gz", hash = "sha256:cc7ea4524d1a11558006224bfe8ba8ed071417d4eb5ef6c89decc6a37d437eeb"}, +] + +[package.dependencies] +"backports.cached-property" = {version = ">=1.0.2,<2.0.0", markers = "python_version < \"3.8\""} +build = ">=0.10.0,<0.11.0" +cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"]} +cleo = ">=2.0.0,<3.0.0" +crashtest = ">=0.4.1,<0.5.0" +dulwich = ">=0.21.2,<0.22.0" +filelock = ">=3.8.0,<4.0.0" +html5lib = ">=1.0,<2.0" +importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} +installer = ">=0.7.0,<0.8.0" +jsonschema = ">=4.10.0,<5.0.0" +keyring = ">=23.9.0,<24.0.0" +lockfile = ">=0.12.2,<0.13.0" +packaging = ">=20.4" +pexpect = ">=4.7.0,<5.0.0" +pkginfo = ">=1.9.4,<2.0.0" +platformdirs = ">=3.0.0,<4.0.0" +poetry-core = "1.6.1" +poetry-plugin-export = ">=1.4.0,<2.0.0" +pyproject-hooks = ">=1.0.0,<2.0.0" +requests = ">=2.18,<3.0" +requests-toolbelt = ">=0.9.1,<2" +shellingham = ">=1.5,<2.0" +tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} +tomlkit = ">=0.11.4,<1.0.0" +trove-classifiers = ">=2022.5.19" +urllib3 = ">=1.26.0,<2.0.0" +virtualenv = ">=20.22.0,<21.0.0" +xattr = {version = ">=0.10.0,<0.11.0", markers = "sys_platform == \"darwin\""} + +[[package]] +name = "poetry-core" +version = "1.6.1" +description = "Poetry PEP 517 Build Backend" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry_core-1.6.1-py3-none-any.whl", hash = "sha256:70707340447dee0e7f334f9495ae652481c67b32d8d218f296a376ac2ed73573"}, + {file = "poetry_core-1.6.1.tar.gz", hash = "sha256:0f9b0de39665f36d6594657e7d57b6f463cc10f30c28e6d1c3b9ff54c26c9ac3"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=1.7.0", markers = "python_version < \"3.8\""} + +[[package]] +name = "poetry-plugin-export" +version = "1.4.0" +description = "Poetry plugin to export the dependencies to various formats" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "poetry_plugin_export-1.4.0-py3-none-any.whl", hash = "sha256:5d9186d6f77cf2bf35fc96bd11fe650cc7656e515b17d99cb65018d50ba22589"}, + {file = "poetry_plugin_export-1.4.0.tar.gz", hash = "sha256:f16974cd9f222d4ef640fa97a8d661b04d4fb339e51da93973f1bc9d578e183f"}, +] + +[package.dependencies] +poetry = ">=1.5.0,<2.0.0" +poetry-core = ">=1.6.0,<2.0.0" + +[[package]] +name = "ptyprocess" +version = "0.7.0" +description = "Run a subprocess in a pseudo terminal" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] + +[[package]] +name = "pygments" +version = "2.15.1" +description = "Pygments is a syntax highlighting package written in Python." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Pygments-2.15.1-py3-none-any.whl", hash = "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1"}, + {file = "Pygments-2.15.1.tar.gz", hash = "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c"}, +] + +[package.extras] +plugins = ["importlib-metadata"] + +[[package]] +name = "pyproject-hooks" +version = "1.0.0" +description = "Wrappers to call pyproject.toml-based build backend hooks." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyproject_hooks-1.0.0-py3-none-any.whl", hash = "sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8"}, + {file = "pyproject_hooks-1.0.0.tar.gz", hash = "sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5"}, +] + +[package.dependencies] +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} + +[[package]] +name = "pyreadline3" +version = "3.4.1" +description = "A python implementation of GNU readline." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] + +[[package]] +name = "pyrsistent" +version = "0.19.3" +description = "Persistent/Functional/Immutable data structures" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyrsistent-0.19.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:20460ac0ea439a3e79caa1dbd560344b64ed75e85d8703943e0b66c2a6150e4a"}, + {file = "pyrsistent-0.19.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4c18264cb84b5e68e7085a43723f9e4c1fd1d935ab240ce02c0324a8e01ccb64"}, + {file = "pyrsistent-0.19.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b774f9288dda8d425adb6544e5903f1fb6c273ab3128a355c6b972b7df39dcf"}, + {file = "pyrsistent-0.19.3-cp310-cp310-win32.whl", hash = "sha256:5a474fb80f5e0d6c9394d8db0fc19e90fa540b82ee52dba7d246a7791712f74a"}, + {file = "pyrsistent-0.19.3-cp310-cp310-win_amd64.whl", hash = "sha256:49c32f216c17148695ca0e02a5c521e28a4ee6c5089f97e34fe24163113722da"}, + {file = "pyrsistent-0.19.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:f0774bf48631f3a20471dd7c5989657b639fd2d285b861237ea9e82c36a415a9"}, + {file = "pyrsistent-0.19.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ab2204234c0ecd8b9368dbd6a53e83c3d4f3cab10ecaf6d0e772f456c442393"}, + {file = "pyrsistent-0.19.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e42296a09e83028b3476f7073fcb69ffebac0e66dbbfd1bd847d61f74db30f19"}, + {file = "pyrsistent-0.19.3-cp311-cp311-win32.whl", hash = "sha256:64220c429e42a7150f4bfd280f6f4bb2850f95956bde93c6fda1b70507af6ef3"}, + {file = "pyrsistent-0.19.3-cp311-cp311-win_amd64.whl", hash = "sha256:016ad1afadf318eb7911baa24b049909f7f3bb2c5b1ed7b6a8f21db21ea3faa8"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c4db1bd596fefd66b296a3d5d943c94f4fac5bcd13e99bffe2ba6a759d959a28"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aeda827381f5e5d65cced3024126529ddc4289d944f75e090572c77ceb19adbf"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:42ac0b2f44607eb92ae88609eda931a4f0dfa03038c44c772e07f43e738bcac9"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-win32.whl", hash = "sha256:e8f2b814a3dc6225964fa03d8582c6e0b6650d68a232df41e3cc1b66a5d2f8d1"}, + {file = "pyrsistent-0.19.3-cp37-cp37m-win_amd64.whl", hash = "sha256:c9bb60a40a0ab9aba40a59f68214eed5a29c6274c83b2cc206a359c4a89fa41b"}, + {file = "pyrsistent-0.19.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a2471f3f8693101975b1ff85ffd19bb7ca7dd7c38f8a81701f67d6b4f97b87d8"}, + {file = "pyrsistent-0.19.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc5d149f31706762c1f8bda2e8c4f8fead6e80312e3692619a75301d3dbb819a"}, + {file = "pyrsistent-0.19.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3311cb4237a341aa52ab8448c27e3a9931e2ee09561ad150ba94e4cfd3fc888c"}, + {file = "pyrsistent-0.19.3-cp38-cp38-win32.whl", hash = "sha256:f0e7c4b2f77593871e918be000b96c8107da48444d57005b6a6bc61fb4331b2c"}, + {file = "pyrsistent-0.19.3-cp38-cp38-win_amd64.whl", hash = "sha256:c147257a92374fde8498491f53ffa8f4822cd70c0d85037e09028e478cababb7"}, + {file = "pyrsistent-0.19.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b735e538f74ec31378f5a1e3886a26d2ca6351106b4dfde376a26fc32a044edc"}, + {file = "pyrsistent-0.19.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99abb85579e2165bd8522f0c0138864da97847875ecbd45f3e7e2af569bfc6f2"}, + {file = "pyrsistent-0.19.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3a8cb235fa6d3fd7aae6a4f1429bbb1fec1577d978098da1252f0489937786f3"}, + {file = "pyrsistent-0.19.3-cp39-cp39-win32.whl", hash = "sha256:c74bed51f9b41c48366a286395c67f4e894374306b197e62810e0fdaf2364da2"}, + {file = "pyrsistent-0.19.3-cp39-cp39-win_amd64.whl", hash = "sha256:878433581fc23e906d947a6814336eee031a00e6defba224234169ae3d3d6a98"}, + {file = "pyrsistent-0.19.3-py3-none-any.whl", hash = "sha256:ccf0d6bd208f8111179f0c26fdf84ed7c3891982f2edaeae7422575f47e66b64"}, + {file = "pyrsistent-0.19.3.tar.gz", hash = "sha256:1a2994773706bbb4995c31a97bc94f1418314923bd1048c6d964837040376440"}, +] + +[[package]] +name = "pytest" +version = "7.3.2" +description = "pytest: simple powerful testing with Python" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-7.3.2-py3-none-any.whl", hash = "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295"}, + {file = "pytest-7.3.2.tar.gz", hash = "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "python-plugin" +version = "0.1.0" +description = "Example Origen Plugin" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +files = [] +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} + +[package.source] +type = "directory" +url = "../../python_plugin" + +[[package]] +name = "pytz" +version = "2023.3" +description = "World timezone definitions, modern and historical" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, + {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, +] + +[[package]] +name = "pywin32-ctypes" +version = "0.2.1" +description = "A (partial) reimplementation of pywin32 using ctypes/cffi" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "pywin32-ctypes-0.2.1.tar.gz", hash = "sha256:934a2def1e5cbc472b2b6bf80680c0f03cd87df65dfd58bfd1846969de095b03"}, + {file = "pywin32_ctypes-0.2.1-py3-none-any.whl", hash = "sha256:b9a53ef754c894a525469933ab2a447c74ec1ea6b9d2ef446f40ec50d3dcec9f"}, +] + +[[package]] +name = "rapidfuzz" +version = "2.15.1" +description = "rapid fuzzy string matching" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "rapidfuzz-2.15.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fc0bc259ebe3b93e7ce9df50b3d00e7345335d35acbd735163b7c4b1957074d3"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d59fb3a410d253f50099d7063855c2b95df1ef20ad93ea3a6b84115590899f25"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c525a3da17b6d79d61613096c8683da86e3573e807dfaecf422eea09e82b5ba6"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4deae6a918ecc260d0c4612257be8ba321d8e913ccb43155403842758c46fbe"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2577463d10811386e704a3ab58b903eb4e2a31b24dfd9886d789b0084d614b01"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f67d5f56aa48c0da9de4ab81bffb310683cf7815f05ea38e5aa64f3ba4368339"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d7927722ff43690e52b3145b5bd3089151d841d350c6f8378c3cfac91f67573a"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6534afc787e32c4104f65cdeb55f6abe4d803a2d0553221d00ef9ce12788dcde"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d0ae6ec79a1931929bb9dd57bc173eb5ba4c7197461bf69e3a34b6dd314feed2"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:be7ccc45c4d1a7dfb595f260e8022a90c6cb380c2a346ee5aae93f85c96d362b"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:8ba013500a2b68c64b2aecc5fb56a2dad6c2872cf545a0308fd044827b6e5f6a"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:4d9f7d10065f657f960b48699e7dddfce14ab91af4bab37a215f0722daf0d716"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7e24a1b802cea04160b3fccd75d2d0905065783ebc9de157d83c14fb9e1c6ce2"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-win32.whl", hash = "sha256:dffdf03499e0a5b3442951bb82b556333b069e0661e80568752786c79c5b32de"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d150d90a7c6caae7962f29f857a4e61d42038cfd82c9df38508daf30c648ae7"}, + {file = "rapidfuzz-2.15.1-cp310-cp310-win_arm64.whl", hash = "sha256:87c30e9184998ff6eb0fa9221f94282ce7c908fd0da96a1ef66ecadfaaa4cdb7"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6986413cb37035eb796e32f049cbc8c13d8630a4ac1e0484e3e268bb3662bd1b"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a72f26e010d4774b676f36e43c0fc8a2c26659efef4b3be3fd7714d3491e9957"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b5cd54c98a387cca111b3b784fc97a4f141244bbc28a92d4bde53f164464112e"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da7fac7c3da39f93e6b2ebe386ed0ffe1cefec91509b91857f6e1204509e931f"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f976e76ac72f650790b3a5402431612175b2ac0363179446285cb3c901136ca9"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:abde47e1595902a490ed14d4338d21c3509156abb2042a99e6da51f928e0c117"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca8f1747007a3ce919739a60fa95c5325f7667cccf6f1c1ef18ae799af119f5e"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c35da09ab9797b020d0d4f07a66871dfc70ea6566363811090353ea971748b5a"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a3a769ca7580686a66046b77df33851b3c2d796dc1eb60c269b68f690f3e1b65"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d50622efefdb03a640a51a6123748cd151d305c1f0431af762e833d6ffef71f0"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b7461b0a7651d68bc23f0896bffceea40f62887e5ab8397bf7caa883592ef5cb"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:074ee9e17912e025c72a5780ee4c7c413ea35cd26449719cc399b852d4e42533"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7025fb105a11f503943f17718cdb8241ea3bb4d812c710c609e69bead40e2ff0"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-win32.whl", hash = "sha256:2084d36b95139413cef25e9487257a1cc892b93bd1481acd2a9656f7a1d9930c"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:5a738fcd24e34bce4b19126b92fdae15482d6d3a90bd687fd3d24ce9d28ce82d"}, + {file = "rapidfuzz-2.15.1-cp311-cp311-win_arm64.whl", hash = "sha256:dc3cafa68cfa54638632bdcadf9aab89a3d182b4a3f04d2cad7585ed58ea8731"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3c53d57ba7a88f7bf304d4ea5a14a0ca112db0e0178fff745d9005acf2879f7d"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a6ee758eec4cf2215dc8d8eafafcea0d1f48ad4b0135767db1b0f7c5c40a17dd"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2d93ba3ae59275e7a3a116dac4ffdb05e9598bf3ee0861fecc5b60fb042d539e"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7c3ff75e647908ddbe9aa917fbe39a112d5631171f3fcea5809e2363e525a59d"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6d89c421702474c6361245b6b199e6e9783febacdbfb6b002669e6cb3ef17a09"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f69e6199fec0f58f9a89afbbaea78d637c7ce77f656a03a1d6ea6abdc1d44f8"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:41dfea282844d0628279b4db2929da0dacb8ac317ddc5dcccc30093cf16357c1"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2dd03477feefeccda07b7659dd614f6738cfc4f9b6779dd61b262a73b0a9a178"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:5efe035aa76ff37d1b5fa661de3c4b4944de9ff227a6c0b2e390a95c101814c0"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:ed2cf7c69102c7a0a06926d747ed855bc836f52e8d59a5d1e3adfd980d1bd165"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a0e441d4c2025110ec3eba5d54f11f78183269a10152b3a757a739ffd1bb12bf"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-win32.whl", hash = "sha256:a4a54efe17cc9f53589c748b53f28776dfdfb9bc83619685740cb7c37985ac2f"}, + {file = "rapidfuzz-2.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:bb8318116ecac4dfb84841d8b9b461f9bb0c3be5b616418387d104f72d2a16d1"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e9296c530e544f68858c3416ad1d982a1854f71e9d2d3dcedb5b216e6d54f067"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:49c4bcdb9238f11f8c4eba1b898937f09b92280d6f900023a8216008f299b41a"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ebb40a279e134bb3fef099a8b58ed5beefb201033d29bdac005bddcdb004ef71"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a7381c11cb590bbd4e6f2d8779a0b34fdd2234dfa13d0211f6aee8ca166d9d05"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cfdcdedfd12a0077193f2cf3626ff6722c5a184adf0d2d51f1ec984bf21c23c3"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f85bece1ec59bda8b982bd719507d468d4df746dfb1988df11d916b5e9fe19e8"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b1b393f4a1eaa6867ffac6aef58cfb04bab2b3d7d8e40b9fe2cf40dd1d384601"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53de456ef020a77bf9d7c6c54860a48e2e902584d55d3001766140ac45c54bc7"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2492330bc38b76ed967eab7bdaea63a89b6ceb254489e2c65c3824efcbf72993"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:099e4c6befaa8957a816bdb67ce664871f10aaec9bebf2f61368cf7e0869a7a1"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:46599b2ad4045dd3f794a24a6db1e753d23304699d4984462cf1ead02a51ddf3"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:591f19d16758a3c55c9d7a0b786b40d95599a5b244d6eaef79c7a74fcf5104d8"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ed17359061840eb249f8d833cb213942e8299ffc4f67251a6ed61833a9f2ea20"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-win32.whl", hash = "sha256:aa1e5aad325168e29bf8e17006479b97024aa9d2fdbe12062bd2f8f09080acf8"}, + {file = "rapidfuzz-2.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:c2bb68832b140c551dbed691290bef4ee6719d4e8ce1b7226a3736f61a9d1a83"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:3fac40972cf7b6c14dded88ae2331eb50dfbc278aa9195473ef6fc6bfe49f686"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f0e456cbdc0abf39352800309dab82fd3251179fa0ff6573fa117f51f4e84be8"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:22b9d22022b9d09fd4ece15102270ab9b6a5cfea8b6f6d1965c1df7e3783f5ff"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:46754fe404a9a6f5cbf7abe02d74af390038d94c9b8c923b3f362467606bfa28"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:91abb8bf7610efe326394adc1d45e1baca8f360e74187f3fa0ef3df80cdd3ba6"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e40a2f60024f9d3c15401e668f732800114a023f3f8d8c40f1521a62081ff054"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a48ee83916401ac73938526d7bd804e01d2a8fe61809df7f1577b0b3b31049a3"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c71580052f9dbac443c02f60484e5a2e5f72ad4351b84b2009fbe345b1f38422"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:82b86d5b8c1b9bcbc65236d75f81023c78d06a721c3e0229889ff4ed5c858169"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:fc4528b7736e5c30bc954022c2cf410889abc19504a023abadbc59cdf9f37cae"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e1e0e569108a5760d8f01d0f2148dd08cc9a39ead79fbefefca9e7c7723c7e88"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:94e1c97f0ad45b05003806f8a13efc1fc78983e52fa2ddb00629003acf4676ef"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:47e81767a962e41477a85ad7ac937e34d19a7d2a80be65614f008a5ead671c56"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-win32.whl", hash = "sha256:79fc574aaf2d7c27ec1022e29c9c18f83cdaf790c71c05779528901e0caad89b"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:f3dd4bcef2d600e0aa121e19e6e62f6f06f22a89f82ef62755e205ce14727874"}, + {file = "rapidfuzz-2.15.1-cp39-cp39-win_arm64.whl", hash = "sha256:cac095cbdf44bc286339a77214bbca6d4d228c9ebae3da5ff6a80aaeb7c35634"}, + {file = "rapidfuzz-2.15.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b89d1126be65c85763d56e3b47d75f1a9b7c5529857b4d572079b9a636eaa8a7"}, + {file = "rapidfuzz-2.15.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19b7460e91168229768be882ea365ba0ac7da43e57f9416e2cfadc396a7df3c2"}, + {file = "rapidfuzz-2.15.1-pp37-pypy37_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93c33c03e7092642c38f8a15ca2d8fc38da366f2526ec3b46adf19d5c7aa48ba"}, + {file = "rapidfuzz-2.15.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:040faca2e26d9dab5541b45ce72b3f6c0e36786234703fc2ac8c6f53bb576743"}, + {file = "rapidfuzz-2.15.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:6e2a3b23e1e9aa13474b3c710bba770d0dcc34d517d3dd6f97435a32873e3f28"}, + {file = "rapidfuzz-2.15.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:2e597b9dfd6dd180982684840975c458c50d447e46928efe3e0120e4ec6f6686"}, + {file = "rapidfuzz-2.15.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d14752c9dd2036c5f36ebe8db5f027275fa7d6b3ec6484158f83efb674bab84e"}, + {file = "rapidfuzz-2.15.1-pp38-pypy38_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:558224b6fc6124d13fa32d57876f626a7d6188ba2a97cbaea33a6ee38a867e31"}, + {file = "rapidfuzz-2.15.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3c89cfa88dc16fd8c9bcc0c7f0b0073f7ef1e27cceb246c9f5a3f7004fa97c4d"}, + {file = "rapidfuzz-2.15.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:509c5b631cd64df69f0f011893983eb15b8be087a55bad72f3d616b6ae6a0f96"}, + {file = "rapidfuzz-2.15.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0f73a04135a03a6e40393ecd5d46a7a1049d353fc5c24b82849830d09817991f"}, + {file = "rapidfuzz-2.15.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8c99d53138a2dfe8ada67cb2855719f934af2733d726fbf73247844ce4dd6dd5"}, + {file = "rapidfuzz-2.15.1-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f01fa757f0fb332a1f045168d29b0d005de6c39ee5ce5d6c51f2563bb53c601b"}, + {file = "rapidfuzz-2.15.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60368e1add6e550faae65614844c43f8a96e37bf99404643b648bf2dba92c0fb"}, + {file = "rapidfuzz-2.15.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:785744f1270828cc632c5a3660409dee9bcaac6931a081bae57542c93e4d46c4"}, + {file = "rapidfuzz-2.15.1.tar.gz", hash = "sha256:d62137c2ca37aea90a11003ad7dc109c8f1739bfbe5a9a217f3cdb07d7ac00f6"}, +] + +[package.extras] +full = ["numpy"] + +[[package]] +name = "recommonmark" +version = "0.7.1" +description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, + {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, +] + +[package.dependencies] +commonmark = ">=0.8.1" +docutils = ">=0.11" +sphinx = ">=1.3.1" + +[[package]] +name = "requests" +version = "2.31.0" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "requests-toolbelt" +version = "1.0.0" +description = "A utility belt for advanced users of python-requests" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6"}, + {file = "requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06"}, +] + +[package.dependencies] +requests = ">=2.0.1,<3.0.0" + +[[package]] +name = "secretstorage" +version = "3.3.3" +description = "Python bindings to FreeDesktop.org Secret Service API" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + +[[package]] +name = "setuptools" +version = "68.0.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "setuptools-68.0.0-py3-none-any.whl", hash = "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f"}, + {file = "setuptools-68.0.0.tar.gz", hash = "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "shellingham" +version = "1.5.0.post1" +description = "Tool to Detect Surrounding Shell" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "shellingham-1.5.0.post1-py2.py3-none-any.whl", hash = "sha256:368bf8c00754fd4f55afb7bbb86e272df77e4dc76ac29dbcbb81a59e9fc15744"}, + {file = "shellingham-1.5.0.post1.tar.gz", hash = "sha256:823bc5fb5c34d60f285b624e7264f4dda254bc803a3774a147bf99c0e3004a28"}, +] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + +[[package]] +name = "snowballstemmer" +version = "2.2.0" +description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] + +[[package]] +name = "soupsieve" +version = "2.4.1" +description = "A modern CSS selector implementation for Beautiful Soup." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "soupsieve-2.4.1-py3-none-any.whl", hash = "sha256:1c1bfee6819544a3447586c889157365a27e10d88cde3ad3da0cf0ddf646feb8"}, + {file = "soupsieve-2.4.1.tar.gz", hash = "sha256:89d12b2d5dfcd2c9e8c22326da9d9aa9cb3dfab0a83a024f05704076ee8d35ea"}, +] + +[[package]] +name = "sphinx" +version = "3.0.2" +description = "Python documentation generator" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, + {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, +] + +[package.dependencies] +alabaster = ">=0.7,<0.8" +babel = ">=1.3" +colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.12" +imagesize = "*" +Jinja2 = ">=2.3" +packaging = "*" +Pygments = ">=2.0" +requests = ">=2.5.0" +setuptools = "*" +snowballstemmer = ">=1.1" +sphinxcontrib-applehelp = "*" +sphinxcontrib-devhelp = "*" +sphinxcontrib-htmlhelp = "*" +sphinxcontrib-jsmath = "*" +sphinxcontrib-qthelp = "*" +sphinxcontrib-serializinghtml = "*" + +[package.extras] +docs = ["sphinxcontrib-websupport"] +lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)"] +test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] + +[[package]] +name = "sphinxbootstrap4theme" +version = "0.6.0" +description = "Sphinx Bootstrap4 Theme" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, +] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "1.0.2" +description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "1.0.2" +description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.0.0" +description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["html5lib", "pytest"] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +description = "A sphinx extension which renders display math in HTML via JavaScript" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] + +[package.extras] +test = ["flake8", "mypy", "pytest"] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "1.0.3" +description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "1.1.5" +description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] + +[package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["pytest"] + +[[package]] +name = "termcolor" +version = "2.3.0" +description = "ANSI color formatting for output in terminal" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "termcolor-2.3.0-py3-none-any.whl", hash = "sha256:3afb05607b89aed0ffe25202399ee0867ad4d3cb4180d98aaf8eefa6a5f7d475"}, + {file = "termcolor-2.3.0.tar.gz", hash = "sha256:b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a"}, +] + +[package.extras] +tests = ["pytest", "pytest-cov"] + +[[package]] +name = "test-apps-shared-test-helpers" +version = "0.1.0" +description = "Shared Regression Test Helpers for Test Apps" +category = "main" +optional = false +python-versions = ">=3.7,<3.11" +files = [] +develop = true + +[package.dependencies] +origen = {path = "../../python/origen", develop = true} +pl_ext_cmds = {path = "../pl_ext_cmds", develop = true} +pytest = ">=7.2.1" + +[package.source] +type = "directory" +url = "../../test_apps_shared_test_helpers" + +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + +[[package]] +name = "tomlkit" +version = "0.11.8" +description = "Style preserving TOML library" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomlkit-0.11.8-py3-none-any.whl", hash = "sha256:8c726c4c202bdb148667835f68d68780b9a003a9ec34167b6c673b38eff2a171"}, + {file = "tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, +] + +[[package]] +name = "trove-classifiers" +version = "2023.5.24" +description = "Canonical source for classifiers on PyPI (pypi.org)." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "trove-classifiers-2023.5.24.tar.gz", hash = "sha256:fd5a1546283be941f47540a135bdeae8fb261380a6a204d9c18012f2a1b0ceae"}, + {file = "trove_classifiers-2023.5.24-py3-none-any.whl", hash = "sha256:d9d7ae14fb90bf3d50bef99c3941b176b5326509e6e9037e622562d6352629d0"}, +] + +[[package]] +name = "typing-extensions" +version = "4.6.3" +description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"}, + {file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"}, +] + +[[package]] +name = "urllib3" +version = "1.26.16" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +files = [ + {file = "urllib3-1.26.16-py2.py3-none-any.whl", hash = "sha256:8d36afa7616d8ab714608411b4a3b13e58f463aee519024578e062e141dce20f"}, + {file = "urllib3-1.26.16.tar.gz", hash = "sha256:8f135f6502756bde6b2a9b28989df5fbe87c9970cecaa69041edcce7f0589b14"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)", "brotlipy (>=0.6.0)"] +secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "ipaddress", "pyOpenSSL (>=0.14)", "urllib3-secure-extra"] +socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] + +[[package]] +name = "virtualenv" +version = "20.23.1" +description = "Virtual Python Environment builder" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "virtualenv-20.23.1-py3-none-any.whl", hash = "sha256:34da10f14fea9be20e0fd7f04aba9732f84e593dac291b757ce42e3368a39419"}, + {file = "virtualenv-20.23.1.tar.gz", hash = "sha256:8ff19a38c1021c742148edc4f81cb43d7f8c6816d2ede2ab72af5b84c749ade1"}, +] + +[package.dependencies] +distlib = ">=0.3.6,<1" +filelock = ">=3.12,<4" +importlib-metadata = {version = ">=6.6", markers = "python_version < \"3.8\""} +platformdirs = ">=3.5.1,<4" + +[package.extras] +docs = ["furo (>=2023.5.20)", "proselint (>=0.13)", "sphinx (>=7.0.1)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.3.1)", "pytest-env (>=0.8.1)", "pytest-freezer (>=0.4.6)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=67.8)", "time-machine (>=2.9)"] + +[[package]] +name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] + +[[package]] +name = "xattr" +version = "0.10.1" +description = "Python wrapper for extended filesystem attributes" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "xattr-0.10.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:16a660a883e703b311d1bbbcafc74fa877585ec081cd96e8dd9302c028408ab1"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:1e2973e72faa87ca29d61c23b58c3c89fe102d1b68e091848b0e21a104123503"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:13279fe8f7982e3cdb0e088d5cb340ce9cbe5ef92504b1fd80a0d3591d662f68"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:1dc9b9f580ef4b8ac5e2c04c16b4d5086a611889ac14ecb2e7e87170623a0b75"}, + {file = "xattr-0.10.1-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:485539262c2b1f5acd6b6ea56e0da2bc281a51f74335c351ea609c23d82c9a79"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:295b3ab335fcd06ca0a9114439b34120968732e3f5e9d16f456d5ec4fa47a0a2"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:a126eb38e14a2f273d584a692fe36cff760395bf7fc061ef059224efdb4eb62c"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:b0e919c24f5b74428afa91507b15e7d2ef63aba98e704ad13d33bed1288dca81"}, + {file = "xattr-0.10.1-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:e31d062cfe1aaeab6ba3db6bd255f012d105271018e647645941d6609376af18"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:209fb84c09b41c2e4cf16dd2f481bb4a6e2e81f659a47a60091b9bcb2e388840"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c4120090dac33eddffc27e487f9c8f16b29ff3f3f8bcb2251b2c6c3f974ca1e1"}, + {file = "xattr-0.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3e739d624491267ec5bb740f4eada93491de429d38d2fcdfb97b25efe1288eca"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2677d40b95636f3482bdaf64ed9138fb4d8376fb7933f434614744780e46e42d"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40039f1532c4456fd0f4c54e9d4e01eb8201248c321c6c6856262d87e9a99593"}, + {file = "xattr-0.10.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:148466e5bb168aba98f80850cf976e931469a3c6eb11e9880d9f6f8b1e66bd06"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0aedf55b116beb6427e6f7958ccd80a8cbc80e82f87a4cd975ccb61a8d27b2ee"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c3024a9ff157247c8190dd0eb54db4a64277f21361b2f756319d9d3cf20e475f"}, + {file = "xattr-0.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f1be6e733e9698f645dbb98565bb8df9b75e80e15a21eb52787d7d96800e823b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7880c8a54c18bc091a4ce0adc5c6d81da1c748aec2fe7ac586d204d6ec7eca5b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:89c93b42c3ba8aedbc29da759f152731196c2492a2154371c0aae3ef8ba8301b"}, + {file = "xattr-0.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6b905e808df61b677eb972f915f8a751960284358b520d0601c8cbc476ba2df6"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1ef954d0655f93a34d07d0cc7e02765ec779ff0b59dc898ee08c6326ad614d5"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:199b20301b6acc9022661412346714ce764d322068ef387c4de38062474db76c"}, + {file = "xattr-0.10.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec0956a8ab0f0d3f9011ba480f1e1271b703d11542375ef73eb8695a6bd4b78b"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ffcb57ca1be338d69edad93cf59aac7c6bb4dbb92fd7bf8d456c69ea42f7e6d2"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1f0563196ee54756fe2047627d316977dc77d11acd7a07970336e1a711e934db"}, + {file = "xattr-0.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc354f086f926a1c7f04886f97880fed1a26d20e3bc338d0d965fd161dbdb8ab"}, + {file = "xattr-0.10.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:c0cd2d02ef2fb45ecf2b0da066a58472d54682c6d4f0452dfe7ae2f3a76a42ea"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:49626096ddd72dcc1654aadd84b103577d8424f26524a48d199847b5d55612d0"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ceaa26bef8fcb17eb59d92a7481c2d15d20211e217772fb43c08c859b01afc6a"}, + {file = "xattr-0.10.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e8c014c371391f28f8cd27d73ea59f42b30772cd640b5a2538ad4f440fd9190b"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:46c32cd605673606b9388a313b0050ee7877a0640d7561eea243ace4fa2cc5a6"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:772b22c4ff791fe5816a7c2a1c9fcba83f9ab9bea138eb44d4d70f34676232b4"}, + {file = "xattr-0.10.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:183ad611a2d70b5a3f5f7aadef0fcef604ea33dcf508228765fd4ddac2c7321d"}, + {file = "xattr-0.10.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8068df3ebdfa9411e58d5ae4a05d807ec5994645bb01af66ec9f6da718b65c5b"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5bc40570155beb85e963ae45300a530223d9822edfdf09991b880e69625ba38a"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:436e1aaf23c07e15bed63115f1712d2097e207214fc6bcde147c1efede37e2c5"}, + {file = "xattr-0.10.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7298455ccf3a922d403339781b10299b858bb5ec76435445f2da46fb768e31a5"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:986c2305c6c1a08f78611eb38ef9f1f47682774ce954efb5a4f3715e8da00d5f"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5dc6099e76e33fa3082a905fe59df766b196534c705cf7a2e3ad9bed2b8a180e"}, + {file = "xattr-0.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:042ad818cda6013162c0bfd3816f6b74b7700e73c908cde6768da824686885f8"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9d4c306828a45b41b76ca17adc26ac3dc00a80e01a5ba85d71df2a3e948828f2"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a606280b0c9071ef52572434ecd3648407b20df3d27af02c6592e84486b05894"}, + {file = "xattr-0.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5b49d591cf34cda2079fd7a5cb2a7a1519f54dc2e62abe3e0720036f6ed41a85"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b8705ac6791426559c1a5c2b88bb2f0e83dc5616a09b4500899bfff6a929302"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a5ea974930e876bc5c146f54ac0f85bb39b7b5de2b6fc63f90364712ae368ebe"}, + {file = "xattr-0.10.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f55a2dd73a12a1ae5113c5d9cd4b4ab6bf7950f4d76d0a1a0c0c4264d50da61d"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:475c38da0d3614cc5564467c4efece1e38bd0705a4dbecf8deeb0564a86fb010"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:925284a4a28e369459b2b7481ea22840eed3e0573a4a4c06b6b0614ecd27d0a7"}, + {file = "xattr-0.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa32f1b45fed9122bed911de0fcc654da349e1f04fa4a9c8ef9b53e1cc98b91e"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c5d3d0e728bace64b74c475eb4da6148cd172b2d23021a1dcd055d92f17619ac"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8faaacf311e2b5cc67c030c999167a78a9906073e6abf08eaa8cf05b0416515c"}, + {file = "xattr-0.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:cc6b8d5ca452674e1a96e246a3d2db5f477aecbc7c945c73f890f56323e75203"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3725746a6502f40f72ef27e0c7bfc31052a239503ff3eefa807d6b02a249be22"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:789bd406d1aad6735e97b20c6d6a1701e1c0661136be9be862e6a04564da771f"}, + {file = "xattr-0.10.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9a7a807ab538210ff8532220d8fc5e2d51c212681f63dbd4e7ede32543b070f"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3e5825b5fc99ecdd493b0cc09ec35391e7a451394fdf623a88b24726011c950d"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:80638d1ce7189dc52f26c234cee3522f060fadab6a8bc3562fe0ddcbe11ba5a4"}, + {file = "xattr-0.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3ff0dbe4a6ce2ce065c6de08f415bcb270ecfd7bf1655a633ddeac695ce8b250"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:5267e5f9435c840d2674194150b511bef929fa7d3bc942a4a75b9eddef18d8d8"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b27dfc13b193cb290d5d9e62f806bb9a99b00cd73bb6370d556116ad7bb5dc12"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:636ebdde0277bce4d12d2ef2550885804834418fee0eb456b69be928e604ecc4"}, + {file = "xattr-0.10.1-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d60c27922ec80310b45574351f71e0dd3a139c5295e8f8b19d19c0010196544f"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b34df5aad035d0343bd740a95ca30db99b776e2630dca9cc1ba8e682c9cc25ea"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f24a7c04ff666d0fe905dfee0a84bc899d624aeb6dccd1ea86b5c347f15c20c1"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a3878e1aff8eca64badad8f6d896cb98c52984b1e9cd9668a3ab70294d1ef92d"}, + {file = "xattr-0.10.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4abef557028c551d59cf2fb3bf63f2a0c89f00d77e54c1c15282ecdd56943496"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0e14bd5965d3db173d6983abdc1241c22219385c22df8b0eb8f1846c15ce1fee"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f9be588a4b6043b03777d50654c6079af3da60cc37527dbb80d36ec98842b1e"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bc4ae264aa679aacf964abf3ea88e147eb4a22aea6af8c6d03ebdebd64cfd6"}, + {file = "xattr-0.10.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:827b5a97673b9997067fde383a7f7dc67342403093b94ea3c24ae0f4f1fec649"}, + {file = "xattr-0.10.1.tar.gz", hash = "sha256:c12e7d81ffaa0605b3ac8c22c2994a8e18a9cf1c59287a1b7722a2289c952ec5"}, +] + +[package.dependencies] +cffi = ">=1.0" + +[[package]] +name = "yapf" +version = "0.30.0" +description = "A formatter for Python code." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, + {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, +] + +[[package]] +name = "zipp" +version = "3.15.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, + {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[metadata] +lock-version = "2.0" +python-versions = ">=3.7,<3.11" +content-hash = "152a296654d05ccfbaadc5b03711b43e486f70748ba5433d0e8197128cfb5df6" diff --git a/test_apps/no_workspace/user_install/pyproject.toml b/test_apps/no_workspace/user_install/pyproject.toml new file mode 100644 index 00000000..5eb8004b --- /dev/null +++ b/test_apps/no_workspace/user_install/pyproject.toml @@ -0,0 +1,13 @@ +[tool.poetry] +name = "TestUserInstall" +version = "0.1.0" +description = "Origen Installation Test" +authors = ["Origen-SDK"] + +[tool.poetry.dependencies] +python = ">=3.7,<3.11" + +origen = { path = "../../../python/origen", develop = true } +origen_metal = { path = "../../../python/origen_metal", develop = true } +python_plugin = { path = "../../python_plugin", develop = true } +test_apps_shared_test_helpers = { path = "../../test_apps_shared_test_helpers", develop = true } diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 598c74e8..7f83ba8e 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -1,8 +1,11 @@ -import pytest, pathlib +import pytest, pathlib, sys import subprocess import os import origen +sys.path.insert(-1, str(pathlib.Path(__file__).parent.parent.parent.joinpath("no_workspace"))) +from t_invocation_env import T_InvocationBaseTests + from cli.tests__app_cmd_building import T_AppCmdBuilding from cli.tests__core_cmds import T_AppWorkspaceCoreCommands from cli.tests__cmd_exts_from_app import T_ExtendingFromAppCmds @@ -67,3 +70,10 @@ class TestAuxCommandsAreAdded: class TestModeOpts(): def test_(): fail + +class TestAppInvocation(T_InvocationBaseTests): + @classmethod + def set_params(cls): + cls.invocation = cls.PyProjectSrc.App + cls.cli_location = cls.debug_cli_loc + cls.target_pyproj_dir = pathlib.Path(__file__).parent.parent diff --git a/test_apps/python_no_app/tests/shared.py b/test_apps/python_no_app/tests/shared.py new file mode 100644 index 00000000..79c7e788 --- /dev/null +++ b/test_apps/python_no_app/tests/shared.py @@ -0,0 +1,5 @@ +from pathlib import Path + +tests_root = Path(__file__).parent +working_dir = Path(__file__).parent.parent +working_dir_config = working_dir.joinpath("origen.toml") diff --git a/test_apps/python_no_app/tests/test_configs.py b/test_apps/python_no_app/tests/test_configs.py index b2557d47..fab05146 100644 --- a/test_apps/python_no_app/tests/test_configs.py +++ b/test_apps/python_no_app/tests/test_configs.py @@ -1,4 +1,5 @@ import pytest, origen, shutil, os +from .shared import tests_root, working_dir, working_dir_config from pathlib import Path from origen.helpers.env import in_new_origen_proc, run_cli_cmd from tests import configs as config_funcs @@ -6,9 +7,9 @@ from test_apps_shared_test_helpers.cli import CLIShared class Common(CLIShared): - tests_root = Path(__file__).parent - working_dir = Path(__file__).parent.parent - working_dir_config = working_dir.joinpath("origen.toml") + tests_root = tests_root + working_dir = working_dir + working_dir_config = working_dir_config cli_config = CLIShared.cli_dir.joinpath("origen.toml") configs_dir = Path(__file__).parent.joinpath("configs") diff --git a/test_apps/python_no_app/tests/test_global_invocation.py b/test_apps/python_no_app/tests/test_global_invocation.py index 7e57fa72..30201aa7 100644 --- a/test_apps/python_no_app/tests/test_global_invocation.py +++ b/test_apps/python_no_app/tests/test_global_invocation.py @@ -1,4 +1,8 @@ -import origen, origen_metal, _origen, getpass, pytest +import origen, origen_metal, _origen, getpass, pytest, pathlib, sys +from .shared import working_dir + +sys.path.insert(-1, str(pathlib.Path(__file__).parent.parent.parent.joinpath("no_workspace"))) +from t_invocation_env import T_InvocationBaseTests def test_import(): assert "2." in origen.version @@ -11,6 +15,13 @@ def test_is_app_present(): assert _origen.is_app_present() is False assert origen.status["is_app_present"] is False +class TestWorkspaceInvocation(T_InvocationBaseTests): + @classmethod + def set_params(cls): + cls.invocation = cls.PyProjectSrc.Workspace + cls.cli_location = cls.debug_cli_loc + cls.target_pyproj_dir = working_dir + class TestGlobalFEIntegration: def test_frontend_is_accessible(self): assert (origen_metal.frontend.frontend() is not None) diff --git a/test_apps/test_apps_shared_test_helpers/pyproject.toml b/test_apps/test_apps_shared_test_helpers/pyproject.toml index 22f42005..8b7a9a00 100644 --- a/test_apps/test_apps_shared_test_helpers/pyproject.toml +++ b/test_apps/test_apps_shared_test_helpers/pyproject.toml @@ -6,6 +6,7 @@ authors = ["Origen-SDK"] [tool.poetry.dependencies] python = ">=3.7,<3.11" +pytest = ">=7.2.1" origen = { path = "../../python/origen", develop = true } pl_ext_cmds = { path = "../pl_ext_cmds", develop = true } From 1dcce4c1e6b0ae1b5efe3ce3e6d6345cbfdcc33d Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 24 Jun 2023 18:20:20 -0500 Subject: [PATCH 046/200] Add missing checkin --- .../python_plugin/commands/extensions/core.eval.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py b/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py index a77b60f5..9f477db0 100644 --- a/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py +++ b/test_apps/python_plugin/python_plugin/commands/extensions/core.eval.py @@ -1,10 +1,12 @@ import origen +from origen.boot import before_cmd, after_cmd -def before_cmd(): - print(origen.current_command.args) - if "say_hi_before_eval" in origen.current_command.args: +@before_cmd +def before_cmd(**ext_kwargs): + if "say_hi_before_eval" in ext_kwargs: print("Hi from python-plugin during 'eval'!") -def after_cmd(): - if "say_hi_before_eval" in origen.current_command.args: +@after_cmd +def after_cmd(**ext_kwargs): + if "say_hi_after_eval" in ext_kwargs: print("Hi again from python-plugin during 'eval'!") From ae15f17c24eb0c401fe3f9c9d84f505b0905b7cf Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 24 Jun 2023 19:11:33 -0500 Subject: [PATCH 047/200] Debugging regressions --- python/origen/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index 40e392b0..a1465970 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -18,7 +18,7 @@ script = "poetry_build.py" generate-setup-file = false [tool.poetry.scripts] -origen = 'origen.__bin__:run_origen' +o2 = 'origen.__bin__:run_origen' [tool.poetry.dependencies] python = ">=3.7,<3.11" From 03f2d3531e64e05ac05a9e1f58b7cc5c822ca01a Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 24 Jun 2023 19:55:15 -0500 Subject: [PATCH 048/200] Add jinja2 install --- .github/workflows/regression_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 01f9824f..350dc1b2 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -141,7 +141,7 @@ jobs: # Use a global pytest install for invocation tests - name: Install Pytest - run: pip install pytest==7.2.1 + run: pip install pytest==7.2.1 jinja2=3.1.2 - name: Get Pytest Version (Check Install) run: pytest --version From 17e26e6f1d56e7fdf64fce82b5d7e62b6e2d60ba Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 24 Jun 2023 20:51:07 -0500 Subject: [PATCH 049/200] Fix pip install in actions yml --- .github/workflows/regression_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 350dc1b2..99e7c7a6 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -141,7 +141,7 @@ jobs: # Use a global pytest install for invocation tests - name: Install Pytest - run: pip install pytest==7.2.1 jinja2=3.1.2 + run: pip install pytest==7.2.1 jinja2==3.1.2 - name: Get Pytest Version (Check Install) run: pytest --version From 8700aebce8f9ce68b913ae0e6a4ba1f0dece5960 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 25 Jun 2023 08:23:16 -0500 Subject: [PATCH 050/200] Try re-lock of user install invocation. --- .../no_workspace/user_install/poetry.lock | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test_apps/no_workspace/user_install/poetry.lock b/test_apps/no_workspace/user_install/poetry.lock index dfd75ab2..a448e9c4 100644 --- a/test_apps/no_workspace/user_install/poetry.lock +++ b/test_apps/no_workspace/user_install/poetry.lock @@ -1064,14 +1064,14 @@ url = "../../pl_ext_cmds" [[package]] name = "platformdirs" -version = "3.6.0" +version = "3.8.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.6.0-py3-none-any.whl", hash = "sha256:ffa199e3fbab8365778c4a10e1fbf1b9cd50707de826eb304b50e57ec0cc8d38"}, - {file = "platformdirs-3.6.0.tar.gz", hash = "sha256:57e28820ca8094678b807ff529196506d7a21e17156cb1cddb3e74cebce54640"}, + {file = "platformdirs-3.8.0-py3-none-any.whl", hash = "sha256:ca9ed98ce73076ba72e092b23d3c93ea6c4e186b3f1c3dad6edd98ff6ffcca2e"}, + {file = "platformdirs-3.8.0.tar.gz", hash = "sha256:b0cabcb11063d21a0b261d557acb0a9d2126350e63b70cdf7db6347baea456dc"}, ] [package.dependencies] @@ -1083,14 +1083,14 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest- [[package]] name = "pluggy" -version = "1.0.0" +version = "1.2.0" description = "plugin and hook calling mechanisms for python" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, + {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, + {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, ] [package.dependencies] @@ -1279,14 +1279,14 @@ files = [ [[package]] name = "pytest" -version = "7.3.2" +version = "7.4.0" description = "pytest: simple powerful testing with Python" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "pytest-7.3.2-py3-none-any.whl", hash = "sha256:cdcbd012c9312258922f8cd3f1b62a6580fdced17db6014896053d47cddf9295"}, - {file = "pytest-7.3.2.tar.gz", hash = "sha256:ee990a3cc55ba808b80795a79944756f315c67c12b56abd3ac993a7b8c17030b"}, + {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"}, + {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"}, ] [package.dependencies] From 2794bd2b2403145d881d72d6d90d5b12a0c690f4 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 25 Jun 2023 12:59:09 -0500 Subject: [PATCH 051/200] Debug tests on GA --- test_apps/no_workspace/t_invocation_env.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index 9185b399..8686e8dc 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -81,6 +81,7 @@ def setup(cls): target = cls.target_pyproj_dir.joinpath(toml) print(f"Moving pyproject {cls._pyproj_src_file} to {target}") shutil.copy(cls._pyproj_src_file, target) + subprocess.run(["poetry", "--version"], check=True, cwd=cls.target_pyproj_dir) subprocess.run(["poetry", "install"], check=True, cwd=cls.target_pyproj_dir) @classmethod From 2e0bbc1fec139236b6fd064db2e6fb81d5f02b1f Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 25 Jun 2023 16:41:55 -0500 Subject: [PATCH 052/200] (GA) Remove poetry update before OM tests --- .github/workflows/regression_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 99e7c7a6..f8559e42 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -121,10 +121,10 @@ jobs: - name: Build PyAPI - Metal run: origen origen build --metal - - name: Install Poetry - uses: abatilo/actions-poetry@v2.0.0 - with: - poetry-version: 1.1.14 + # - name: Install Poetry + # uses: abatilo/actions-poetry@v2.0.0 + # with: + # poetry-version: 1.3.2 - name: Setup Python Env - Metal working-directory: python/origen_metal From cffef7cee1fd299374b61dd7930241bc43ab282b Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 25 Jun 2023 19:50:39 -0500 Subject: [PATCH 053/200] GA debug - unordered PL compare --- test_apps/no_workspace/t_invocation_env.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index 8686e8dc..5c272c84 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -126,6 +126,7 @@ def test_plugins(self): code = f"print('{self.header}'); print(list(origen.plugins.keys()))" pls = self.eval_and_parse(code) if self.has_pls: - assert pls == ['python_plugin_the_second', 'pl_ext_cmds', 'test_apps_shared_test_helpers', 'python_plugin'] + # TODO consistent plugin loading + assert set(pls) == {'python_plugin_the_second', 'pl_ext_cmds', 'test_apps_shared_test_helpers', 'python_plugin'} else: assert pls == [] From 6f0b72aa57e0b7478167e5184ee1c69dc78a6071 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 25 Jun 2023 21:08:20 -0500 Subject: [PATCH 054/200] Add pytest rewrite for t_invocation_env in no_workspace --- test_apps/no_workspace/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test_apps/no_workspace/__init__.py b/test_apps/no_workspace/__init__.py index e69de29b..9f5919ba 100644 --- a/test_apps/no_workspace/__init__.py +++ b/test_apps/no_workspace/__init__.py @@ -0,0 +1,2 @@ +import pytest +pytest.register_assert_rewrite("no_workspace.t_invocation_env") From 6e6f8b60481c735943947a9469923dd44e44d6a6 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 26 Jun 2023 07:47:41 -0500 Subject: [PATCH 055/200] (GA Debug) Local env. was stale. --- test_apps/no_workspace/t_invocation_env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index 5c272c84..fcd4c36d 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -127,6 +127,6 @@ def test_plugins(self): pls = self.eval_and_parse(code) if self.has_pls: # TODO consistent plugin loading - assert set(pls) == {'python_plugin_the_second', 'pl_ext_cmds', 'test_apps_shared_test_helpers', 'python_plugin'} + assert set(pls) == {'pl_ext_cmds', 'test_apps_shared_test_helpers', 'python_plugin'} else: assert pls == [] From 5213de78fa5d3f2853cf1ba1702d8ff004941bd4 Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 30 Jun 2023 22:16:47 -0500 Subject: [PATCH 056/200] Have eval cmd support running from script files. --- python/origen/origen/boot.py | 8 +-- .../origen/origen/core/commands/__init__.py | 3 + python/origen/origen/core/commands/eval.py | 63 ++++++++++++++++++ .../origen/helpers/regressions/cli/origen.py | 16 ++++- rust/origen/cli/src/commands/eval.rs | 15 ++++- rust/origen/cli/src/commands/mod.rs | 30 ++++++++- rust/pyapi/src/current_command.rs | 20 +++++- rust/pyapi/src/extensions.rs | 16 ++++- .../tests/cli/tests__cmd_exts_from_app.py | 5 +- .../python_app/tests/cli/tests__core_cmds.py | 4 +- .../tests/cli/tests__reserved_opts.py | 4 +- .../tests/cli/tests__cmd__eval.py | 64 +++++++++++++++++-- .../cli/tests__cmd__eval__scripts/err.py | 2 + .../tests/cli/tests__cmd__eval__scripts/hi.py | 5 ++ .../override_preface.py | 1 + .../tests/cmd_exts/tests__ext_conflicts.py | 1 + .../tests/cmd_exts/tests__extending_cmds.py | 1 + test_apps/python_no_app/tests/shared.py | 8 +++ .../tests/test_plugin_loading.py | 2 + 19 files changed, 248 insertions(+), 20 deletions(-) create mode 100644 python/origen/origen/core/commands/eval.py create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/err.py create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/hi.py create mode 100644 test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/override_preface.py diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index 41abd8c0..a94956a2 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -15,7 +15,9 @@ def run_cmd(command, mode=None, debug=False, args=None, + arg_indices=None, ext_args=None, + ext_arg_indices=None, extensions=None, dispatch_root=None, dispatch_src=None, @@ -202,7 +204,7 @@ def run(func): if "on_load" in ext: getattr((ext["mod"]), ext["on_load"])(ext["mod"]) current_ext = None - _origen.current_command.set_command(command, subcmds, args, ext_args, extensions) + _origen.current_command.set_command(command, subcmds, args, ext_args, arg_indices, ext_arg_indices, extensions) def run_ext(phase, continue_on_fail=False): for ext in extensions: @@ -251,10 +253,6 @@ def run_ext(phase, continue_on_fail=False): interactive.interact(banner=f"Origen {origen.version}", context=origen.__interactive_context__()) - elif command == "eval": - for c in args['code']: - exec(c) - elif command == "web:build": _origen.set_operation("web") from origen.web import run_cmd diff --git a/python/origen/origen/core/commands/__init__.py b/python/origen/origen/core/commands/__init__.py index ec3377c5..6adf3d28 100644 --- a/python/origen/origen/core/commands/__init__.py +++ b/python/origen/origen/core/commands/__init__.py @@ -1,6 +1,7 @@ import importlib, origen creds = "credentials" +eval = "eval" _subcmds = None _base_cmd = None @@ -24,6 +25,8 @@ def run_core_cmd(base_cmd, sub_cmds, args): try: if base_cmd == creds: import_cmd(creds).run(args) + elif base_cmd == eval: + import_cmd(eval).run(args) else: return False return True diff --git a/python/origen/origen/core/commands/eval.py b/python/origen/origen/core/commands/eval.py new file mode 100644 index 00000000..500fd066 --- /dev/null +++ b/python/origen/origen/core/commands/eval.py @@ -0,0 +1,63 @@ +import origen, pathlib + +def run(args): + code = list(args.get('code', [])) + files = list(args.get('scripts', [])) + code_indices = list(origen.current_command.arg_indices.get('code', [])) + file_indices = list(origen.current_command.arg_indices.get('scripts', [])) + if len(code_indices) > 0: + code_idx = code_indices.pop() + else: + code_idx = None + if len(file_indices) > 0: + files_idx = file_indices.pop() + else: + files_idx = None + + # Build the run order based on where the given code or script file appear in the command line + to_run = [] + while (code_idx is not None) or (files_idx is not None): + if (code_idx or -1) > (files_idx or -1): + to_run.append(code.pop()) + if len(code_indices) > 0: + code_idx = code_indices.pop() + else: + code_idx = None + else: + p = pathlib.Path(files.pop()) + if not p.exists(): + msg = f"Could not find script file '{p}'" + origen.logger.error(msg) + exit(1) + to_run.append(p) + if len(file_indices) > 0: + files_idx = file_indices.pop() + else: + files_idx = None + + # Decouple run environment from boot environment, but assume origen is already imported + eval_locals = {"origen": origen} + eval_globals = {} + + # Above is actually built with highest index first, so iterate through in reverse + for code in reversed(to_run): + if isinstance(code, pathlib.Path): + c = open(code).read() + else: + c = code + + try: + exec(c, eval_globals, eval_locals) + except Exception as e: + # Doctor the traceback to remove the references to boot.py + # Cleans up the traceback to just what the user should care about + import traceback, sys + tb = e.__traceback__ + exc = traceback.format_exception(None, e, tb) + exc = [exc[0]] + exc[2:-1] + [exc[-1].strip()] + if isinstance(code, pathlib.Path): + origen.logger.error(f"Exception occurred evaluating from script '{code}'") + else: + origen.logger.error(f"Exception occurred evaluating code:\n{c}") + print(''.join(exc), file=sys.stderr) + exit(1) diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index b0a14d2d..07de3869 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -30,7 +30,21 @@ def eval_cmd(cls, add_opts=None): args=[ CmdArg("code", "Statements to evaluate", multi=True, required=True) ], - opts=add_opts, + opts=(add_opts or []) + [ + CmdOpt( + "scripts", + help="Evaluate from script files", + ln="scripts", + sn="s", + ln_aliases=["files"], + sn_aliases=["f"], + multi=True, + required=False, + ) + ], + h_opt_idx=0, + v_opt_idx=2, + vk_opt_idx=3, demos=[ CmdDemo( "minimal", diff --git a/rust/origen/cli/src/commands/eval.rs b/rust/origen/cli/src/commands/eval.rs index 2704e011..7f3a2339 100644 --- a/rust/origen/cli/src/commands/eval.rs +++ b/rust/origen/cli/src/commands/eval.rs @@ -13,7 +13,20 @@ gen_core_cmd_funcs!( .action(AppendArgs) .value_name("CODE") .multiple(true) - .required(true) + .required_unless_present("scripts") + ) + .arg( + Arg::new("scripts") + .help("Evaluate from script files") + .long("scripts") + .short('s') + .visible_alias("files") + .visible_short_alias('f') + .action(AppendArgs) + .value_name("SCRIPTS") + .multiple(true) + .use_value_delimiter(true) + .require_value_delimiter(true) ) }} ); diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index a8a05784..5685a8a4 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -111,9 +111,11 @@ pub fn launch(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: } let mut args: Vec = vec!(); + let mut arg_indices: Vec = vec!(); let mut opt_names = HashMap::new(); - let mut ext_args = HashMap::new(); + let mut ext_args: HashMap<&ExtensionSource, Vec> = HashMap::new(); + let mut ext_arg_indices: HashMap<&ExtensionSource, Vec> = HashMap::new(); if let Some(exts) = cmd_exts { for ext in exts { if let Some(opts) = ext.opts.as_ref() { @@ -121,6 +123,7 @@ pub fn launch(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: opt_names.insert(opt.full_name.as_ref().unwrap().as_str(), &ext.source); if !ext_args.contains_key(&ext.source) { ext_args.insert(&ext.source, vec!()); + ext_arg_indices.insert(&ext.source, vec!()); } } } @@ -182,10 +185,17 @@ pub fn launch(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: } } } + let indices_str = format!( + "r'{}': [{}]", + as_name!(arg_n), + invocation.indices_of(arg_n).unwrap().map(|i| i.to_string()).collect::>().join(", ") + ); if let Some(ext_src) = opt_names.get(arg_n) { ext_args.get_mut(ext_src).unwrap().push(arg_str); + ext_arg_indices.get_mut(ext_src).unwrap().push(indices_str); } else { args.push(arg_str); + arg_indices.push(indices_str); } } } @@ -194,37 +204,51 @@ pub fn launch(base_cmd: Option<&str>, subcmds: Option<&Vec>, invocation: if let Some(subs) = subcmds.as_ref() { cmd += &format!(", subcmds=[{}]", subs.iter().map( |s| format!("r'{}'", s) ).collect::>().join(", ")); } - cmd += &format!(", args={{{}}}", args.join(", ")); + cmd += &format!(", args={{{}}}, arg_indices={{{}}}", args.join(", "), arg_indices.join(", ")); let mut app_ext_str = "".to_string(); let mut pl_ext_str = "".to_string(); let mut aux_ext_str = "".to_string(); + let mut app_ext_indices_str = "".to_string(); + let mut pl_ext_indices_str = "".to_string(); + let mut aux_ext_indices_str = "".to_string(); if !ext_args.is_empty() { for ext in ext_args { match ext.0 { ExtensionSource::App => { app_ext_str = ext.1.join(", "); + app_ext_indices_str = ext_arg_indices[ext.0].join(", "); }, ExtensionSource::Plugin(ref pl_name) => { pl_ext_str += &format!(", '{}': {{{}}}", pl_name, ext.1.join(", ")); + pl_ext_indices_str += &format!(", '{}': {{{}}}", pl_name, ext_arg_indices[ext.0].join(", ")); }, ExtensionSource::Aux(ref ns, _) => { aux_ext_str += &format!(", '{}': {{{}}}", ns, ext.1.join(", ")); + aux_ext_indices_str += &format!(", '{}': {{{}}}", ns, ext_arg_indices[ext.0].join(", ")); }, } } if !pl_ext_str.is_empty() { pl_ext_str = pl_ext_str[2..].to_string(); + pl_ext_indices_str = pl_ext_indices_str[2..].to_string(); } if !aux_ext_str.is_empty() { aux_ext_str = aux_ext_str[2..].to_string(); + aux_ext_indices_str = aux_ext_indices_str[2..].to_string(); } } cmd += &format!( - ", ext_args={{'app': {{{}}}, 'plugin': {{{}}}, 'aux': {{{}}}}}", + concat!( + ", ext_args={{'app': {{{}}}, 'plugin': {{{}}}, 'aux': {{{}}}}}", + ", ext_arg_indices={{'app': {{{}}}, 'plugin': {{{}}}, 'aux': {{{}}}}}" + ), app_ext_str, pl_ext_str, aux_ext_str, + app_ext_indices_str, + pl_ext_indices_str, + aux_ext_indices_str, ); if let Some(exts) = cmd_exts { diff --git a/rust/pyapi/src/current_command.rs b/rust/pyapi/src/current_command.rs index 407ecec0..4636ce3f 100644 --- a/rust/pyapi/src/current_command.rs +++ b/rust/pyapi/src/current_command.rs @@ -20,12 +20,22 @@ pub fn get_command(py: Python) -> PyResult> { } #[pyfunction] -fn set_command(py: Python, base_cmd: String, subcmds: Vec, args: Py, ext_args: Py, exts: &PyList) -> PyResult<()> { +fn set_command( + py: Python, + base_cmd: String, + subcmds: Vec, + args: Py, + ext_args: Py, + arg_indices: Py, + ext_arg_indices: Py, + exts: &PyList +) -> PyResult<()> { let cmd = CurrentCommand { base: base_cmd, subcmds: subcmds, args: args, - exts: Py::new(py, Extensions::new(py, exts, ext_args)?)?, + arg_indices: arg_indices, + exts: Py::new(py, Extensions::new(py, exts, ext_args, ext_arg_indices)?)?, }; _origen!(py).setattr(ATTR_NAME, Py::new(py, cmd)?) } @@ -41,6 +51,7 @@ pub struct CurrentCommand { base: String, subcmds: Vec, args: Py, + arg_indices: Py, exts: Py, } @@ -74,4 +85,9 @@ impl CurrentCommand { pub fn args<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { Ok(self.args.as_ref(py)) } + + #[getter] + pub fn arg_indices<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { + Ok(self.arg_indices.as_ref(py)) + } } \ No newline at end of file diff --git a/rust/pyapi/src/extensions.rs b/rust/pyapi/src/extensions.rs index 41bcfb7a..fa18ff75 100644 --- a/rust/pyapi/src/extensions.rs +++ b/rust/pyapi/src/extensions.rs @@ -15,6 +15,7 @@ pub fn define(py: Python, m: &PyModule) -> PyResult<()> { pub struct Extension { name: String, args: Py, + arg_indices: Py, source: String, ext_mod: Option>, } @@ -31,6 +32,11 @@ impl Extension { Ok(self.args.as_ref(py)) } + #[getter] + pub fn arg_indices<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyDict> { + Ok(self.arg_indices.as_ref(py)) + } + #[getter] pub fn source(&self, py: Python) -> PyResult { Ok(pyapi_metal::pypath!(py, &self.source)) @@ -128,7 +134,7 @@ impl ExtensionsIter { } impl Extensions { - pub fn new<'py>(py: Python<'py>, exts: &PyList, ext_args: Py) -> PyResult { + pub fn new<'py>(py: Python<'py>, exts: &PyList, ext_args: Py, ext_arg_indices: Py) -> PyResult { let mut slf = Self { exts: IndexMap::new(), }; @@ -146,6 +152,7 @@ impl Extensions { ext_path = format!("{}.{}", source, ext_name); } let src_ext_args = PyAny::get_item(ext_args.as_ref(py), &source)?.extract::<&PyDict>()?; + let src_ext_args_indices = PyAny::get_item(ext_arg_indices.as_ref(py), &source)?.extract::<&PyDict>()?; let py_ext = Extension { args: { @@ -155,6 +162,13 @@ impl Extensions { PyAny::get_item(src_ext_args, &ext_name)?.extract::>()? } }, + arg_indices: { + if source == "app" { + src_ext_args_indices.into() + } else { + PyAny::get_item(src_ext_args_indices, &ext_name)?.extract::>()? + } + }, name: ext_name, source: ext_path.clone(), ext_mod: { diff --git a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py index bf924968..3b4809e8 100644 --- a/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py +++ b/test_apps/python_app/tests/cli/tests__cmd_exts_from_app.py @@ -83,10 +83,12 @@ def test_extending_global_cmds(self): cmd = self.core_cmd help = cmd.get_help_msg() help.assert_args(cmd.code) + opts = list(self.in_app_cmds.standard_opts()) + opts.insert(3, cmd.scripts) help.assert_opts( cmd.generic_app_ext_action, cmd.generic_app_ext_flag, - *self.in_app_cmds.standard_opts() + *opts ) assert help.aux_exts == None @@ -113,6 +115,7 @@ def test_stacking_pl_aux_and_app_ext(self): cmd.generic_app_ext_flag, "help", "mode", "no_targets", cmd.pl_ext_cmds_generic_ext, + cmd.scripts, "targets", "v", 'vk' ) assert help.aux_exts == ['core_cmd_exts'] diff --git a/test_apps/python_app/tests/cli/tests__core_cmds.py b/test_apps/python_app/tests/cli/tests__core_cmds.py index 4e8b79f9..cfda3c16 100644 --- a/test_apps/python_app/tests/cli/tests__core_cmds.py +++ b/test_apps/python_app/tests/cli/tests__core_cmds.py @@ -43,7 +43,9 @@ def test_help_msg(self, cmd, no_config_run_opts): help = cmd.get_help_msg(run_opts=no_config_run_opts) help.assert_summary(cmd.help) help.assert_args(cmd.code) - help.assert_bare_app_opts() + opts = list(self.in_app_cmds.standard_opts()) + opts.insert(3, cmd.scripts) + help.assert_opts(*opts) def test_basic_eval(self, cmd, no_config_run_opts): d = cmd.demos["multi_statement_single_arg"] diff --git a/test_apps/python_app/tests/cli/tests__reserved_opts.py b/test_apps/python_app/tests/cli/tests__reserved_opts.py index 73f7edbd..33ac9f69 100644 --- a/test_apps/python_app/tests/cli/tests__reserved_opts.py +++ b/test_apps/python_app/tests/cli/tests__reserved_opts.py @@ -261,7 +261,9 @@ def test_ext_opts_are_added_with_respect_to_errors(self): "m", cmd.conflicting_mode, cmd.conflicting_no_target, - "nt", "t", "v", "vk" + "nt", + cmd.scripts, + "t", "v", "vk" ) help.assert_subcmds(None) diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py index 105a3d20..bf1823cb 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py @@ -1,4 +1,4 @@ -import origen, pytest +import origen, pytest, pathlib from .shared import CLICommon class T_Eval(CLICommon): @@ -7,6 +7,10 @@ class T_Eval(CLICommon): "with_configs": CLICommon.configs.suppress_plugin_collecting_config, "bypass_config_lookup": True } + script_dir = pathlib.Path(__file__).parent.joinpath("tests__cmd__eval__scripts") + + def eval_script(self, name): + return self.script_dir.joinpath(f"{name}.py") @pytest.fixture def no_config_run_opts(self): @@ -14,9 +18,7 @@ def no_config_run_opts(self): def test_help_msg(self, cmd, no_config_run_opts): help = cmd.get_help_msg(run_opts=no_config_run_opts) - help.assert_summary(cmd.help) - help.assert_args(cmd.code) - help.assert_bare_opts() + help.assert_cmd(cmd) def test_with_single_statement(self, cmd, no_config_run_opts): d = cmd.demos["multi_statement_single_arg"] @@ -41,3 +43,57 @@ def test_clean_eval(self): eval_prefix = "Origen Version From Eval: " out = self.eval("print (f'" + eval_prefix + "{origen.version}' )") assert out == f"{eval_prefix}{origen.version}\n" + + def test_eval_with_script(self, cmd): + out = cmd.run(cmd.scripts.ln_to_cli(), self.eval_script("hi")) + assert out == "eval_script__say_hi: hi!\n" + + out = cmd.run( + cmd.scripts.ln_to_cli(), self.eval_script("override_preface"), + cmd.scripts.ln_to_cli(), self.eval_script("hi") + ) + assert out == "eval_script_override: hi!\n" + + def test_eval_context_persists_over_scripts(self, cmd): + out = cmd.run( + "preface='preface_override'", + cmd.scripts.ln_to_cli(), self.eval_script("hi"), + "print(hi)" + ) + assert out == "preface_override: hi!\nhi!\n" + + def test_error_in_script(self, cmd): + err = self.eval_script("err") + out = cmd.gen_error( + "print('test_error_in_script')", + cmd.scripts.ln_to_cli(), err, + return_full=True + ) + + stdout = out["stdout"] + errs = self.extract_logged_errors(stdout) + assert errs[0] == f"Exception occurred evaluating from script '{err}'" + assert len(errs) == 1 + + stdout = stdout.split("\n") + assert "test_error_in_script" in stdout[1] + assert stdout[2] == "tests__cmd__eval__scripts: gen error" + assert stdout[3] == '' + assert len(stdout) == 4 + + stderr = out["stderr"].split("\n") + assert "Traceback" in stderr[0] + assert "line 2" in stderr[1] + assert stderr[2] == "NameError: name 'hello' is not defined" + assert stdout[3] == '' + assert len(stderr) == 4 + + def test_eval_with_invalid_script(self, cmd): + invalid = self.eval_script("invalid") + out = cmd.gen_error( + "print('hi')", + cmd.scripts.ln_to_cli(), invalid, + return_full=True + ) + assert out["stderr"] == '' + assert f"Could not find script file '{invalid}'" in out['stdout'] diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/err.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/err.py new file mode 100644 index 00000000..0def8f75 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/err.py @@ -0,0 +1,2 @@ +print('tests__cmd__eval__scripts: gen error') +print(hello) diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/hi.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/hi.py new file mode 100644 index 00000000..ecbee244 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/hi.py @@ -0,0 +1,5 @@ +preface = locals().get("preface", None) +hi = "hi!" +if not preface: + preface = "eval_script__say_hi" +print(f"{preface}: {hi}") diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/override_preface.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/override_preface.py new file mode 100644 index 00000000..c3eb5426 --- /dev/null +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval__scripts/override_preface.py @@ -0,0 +1 @@ +preface = "eval_script_override" \ No newline at end of file diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py index 4c36ed7e..0fa15dc2 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__ext_conflicts.py @@ -279,6 +279,7 @@ def test_ext_arg_conflicts_with_core_cmd_help_msg(self): pl_code_opt, aux_code_opt, "help", + cmd.scripts, cmd.say_hi_during_cleanup, "v", "vk", diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py index a7f0c929..45e1e94e 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py @@ -554,6 +554,7 @@ def test_extending_origen_cmd_from_plugin(self): cmd.core_cmd_exts_generic_core_ext, "help", cmd.pl_ext_cmds_generic_ext, + cmd.scripts, "v", "vk", ) diff --git a/test_apps/python_no_app/tests/shared.py b/test_apps/python_no_app/tests/shared.py index 79c7e788..e8ae7ba2 100644 --- a/test_apps/python_no_app/tests/shared.py +++ b/test_apps/python_no_app/tests/shared.py @@ -3,3 +3,11 @@ tests_root = Path(__file__).parent working_dir = Path(__file__).parent.parent working_dir_config = working_dir.joinpath("origen.toml") + +def tmp_dir(offset=None): + t = Path(__file__).parent.parent.parent.joinpath('tmp/pytest') + if offset: + t = t.joinpath(offset) + if not t.exists(): + t.mkdir(parents=True, exist_ok=True) + return t diff --git a/test_apps/python_no_app/tests/test_plugin_loading.py b/test_apps/python_no_app/tests/test_plugin_loading.py index 781964c5..445306f7 100644 --- a/test_apps/python_no_app/tests/test_plugin_loading.py +++ b/test_apps/python_no_app/tests/test_plugin_loading.py @@ -25,11 +25,13 @@ def get_configs_and_plugins_from_cli(cls, configs=None, bypass_config_lookup=Fal def test_plugins_are_collected_by_default(self): retn = in_new_origen_proc(mod=config_funcs) assert retn['configs'] == [] + # TODO consistent plugin loading assert set(retn['plugins']) == set(self.plugins.python_no_app_collected_pl_names) # Test from CLI retn = self.get_configs_and_plugins_from_cli(bypass_config_lookup=True) assert retn['configs'] == [] + # TODO consistent plugin loading assert set(retn['plugins']) == set(self.plugins.python_no_app_collected_pl_names) def test_plugins_are_accessible(self): From 678494073b7a5428587802b7f75de5d858edcbf6 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 1 Jul 2023 21:13:45 -0500 Subject: [PATCH 057/200] Set indices to empty-dict if not given. Add test for arg indices. Fix typo in assertions filename. --- python/origen/origen/boot.py | 4 ++ .../tests/cmd_exts/tests__extending_cmds.py | 11 ------ .../tests/test_current_command.py | 38 +++++++++++++++++++ .../cli/__init__.py | 6 ++- .../cli/{asertions.py => assertions.py} | 0 .../cli/ext_helpers.py | 17 ++++++++- 6 files changed, 63 insertions(+), 13 deletions(-) rename test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/{asertions.py => assertions.py} (100%) diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index a94956a2..a5630c6f 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -43,6 +43,8 @@ def run_cmd(command, if args is None: args = {} + if arg_indices is None: + arg_indices = {} if command == dispatch_plugin_cmd: cmd_src = "plugin" @@ -144,6 +146,8 @@ def call_user_cmd(cmd_type): subcmds = [] if ext_args is None: ext_args = {} + if ext_arg_indices is None: + ext_arg_indices = {} if extensions is None: extensions = [] current_ext = None diff --git a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py index 45e1e94e..46bffb17 100644 --- a/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py +++ b/test_apps/python_no_app/tests/cmd_exts/tests__extending_cmds.py @@ -35,17 +35,6 @@ class TestExtensionOpts(Common): ext_mvd = ["mvd0", "mvd1"] ext_rv = ["no_action"] - def get_action_results(self, output, actions): - retn = {} - for action in actions: - a = {} - r = output.split(f"Start Action Before CMD: {action}")[1].strip() - a["Before"], r = r.split(f"End Action Before CMD: {action}") - r = output.split(f"Start Action After CMD: {action}")[1].strip() - a["After"], r = r.split(f"End Action After CMD: {action}") - retn[action] = a - return retn - def test_help_msg(self): help = self.cmd.get_help_msg() help.assert_args(self.sa, self.ma) diff --git a/test_apps/python_no_app/tests/test_current_command.py b/test_apps/python_no_app/tests/test_current_command.py index aaea3d1a..196d8063 100644 --- a/test_apps/python_no_app/tests/test_current_command.py +++ b/test_apps/python_no_app/tests/test_current_command.py @@ -41,6 +41,44 @@ def test_current_command_from_pl_cmd(self): {} ) + def test_arg_indices(self): + cmd = CLIShared.python_plugin.plugin_test_args.extend( + CLIShared.exts.exts["plugin.python_plugin.plugin_test_args"]["exts"], + from_configs=CLIShared.exts.exts_workout_cfg + ) + + ext_flag = cmd.flag_extension + ext_ha = cmd.hidden_opt + ext_action = cmd.exts_workout_action + + args = "show_arg_indices" + exts = "show_ext_arg_indices" + # Index 0 is the command name + # NOTE: per the clap API, when flags (options not accepting values) are used, only the last index is given + out = cmd.run( + "sv", "m0", "m1", "m2", # indices 1, 2-4 + ext_flag.ln_to_cli(), # 5 + cmd.opt_taking_value.ln_to_cli(), "opt_val", # 6 (opt name), 7 (value) + ext_flag.sn_to_cli(), # 8 + ext_ha.ln_to_cli(), # 9 + ext_action.ln_to_cli(), args, exts, # 10 (opt name), 11, 12 (values) + cmd.multi_val_delim_opt.ln_to_cli(), "d0,d1,d2" + ) + parsed = self.get_action_results(out, [args, exts]) + assert eval(parsed[args]["Before"]) == { + cmd.single_arg.name: [1], + cmd.multi_arg.name: [2, 3, 4], + cmd.opt_taking_value.name: [7] + } + assert eval(parsed[exts]["Before"]) == { + "aux.exts_workout": { + ext_flag.name: [8], + ext_ha.name: [9], + ext_action.name: [11, 12], + cmd.multi_val_delim_opt.name: [14, 15, 16], + } + } + @pytest.mark.skip def test_current_command_from_aux_cmd(self): # TEST_NEEDED Current Command core case diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index 9425d29d..25b2649f 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -9,7 +9,7 @@ from .cmd_models.plugins import Plugins from .error_cases import ErrorCases -from .asertions import AssertionHelpers +from .assertions import AssertionHelpers develop_origen = "develop_origen" def develop_origen_cmd(): @@ -103,6 +103,10 @@ class CLIShared(cli.CLI, AssertionHelpers): error_messages = ErrorCases() na = "no_action" + def get_action_results(self, *args): + from .ext_helpers import get_action_results as get_action_results_wrap + return get_action_results_wrap(*args) + @pytest.fixture def cmd(self): return self._cmd diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/asertions.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py similarity index 100% rename from test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/asertions.py rename to test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py index 17761bb1..70e0b547 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/ext_helpers.py @@ -86,8 +86,23 @@ def do_action(actions, phase): # TEST_NEEDED CLI check for extension mods for n, e in origen.current_command.exts.items(): print(f"{n}: {e.mod}") + elif action == "show_arg_indices": + print(origen.current_command.arg_indices) + elif action == "show_ext_arg_indices": + print({ n: v.arg_indices for n, v in origen.current_command.exts.items() }) elif action == "no_action": pass else: raise RuntimeError(f"No action '{action}' is known!") - print(f"End Action {p_out} CMD: {action}") \ No newline at end of file + print(f"End Action {p_out} CMD: {action}") + +def get_action_results(output, actions): + retn = {} + for action in actions: + a = {} + r = output.split(f"Start Action Before CMD: {action}")[1].strip() + a["Before"], r = r.split(f"End Action Before CMD: {action}") + r = output.split(f"Start Action After CMD: {action}")[1].strip() + a["After"], r = r.split(f"End Action After CMD: {action}") + retn[action] = a + return retn From c4d62873a5e1631321bbb9f4cecd8c983163e075 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 2 Jul 2023 08:20:50 -0500 Subject: [PATCH 058/200] Support auto-interpreting some args as strs in run_cli_cmd --- python/origen/origen/helpers/env.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index f554900b..279ee339 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -26,6 +26,14 @@ def run_cli_cmd(cmd, *, ): if isinstance(cmd, str): cmd = [cmd] + else: + def to_cmd(c): + if isinstance(c, pathlib.Path): + return str(c) + else: + return c + cmd = list(map(to_cmd, cmd)) + if (origen_exe is None) or isinstance(origen_exe, str): origen_exe = [origen_exe or 'origen'] if poetry_run: From 69242fa5662cd54e876bad295eb7ea14e0b8e0d8 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sun, 2 Jul 2023 20:50:52 -0500 Subject: [PATCH 059/200] Fix for windows path conversion with given as arg to run_cli_cmd --- python/origen/origen/helpers/env.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index 279ee339..23e1439d 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -29,7 +29,7 @@ def run_cli_cmd(cmd, *, else: def to_cmd(c): if isinstance(c, pathlib.Path): - return str(c) + return c.as_posix() else: return c cmd = list(map(to_cmd, cmd)) @@ -68,7 +68,9 @@ def to_cmd(c): cmd = ' '.join(cmd) raise RuntimeError(f"Expected cmd '{cmd}' to fail but received return code 0") else: - result = subprocess.run(cmd, shell=shell, check=check, capture_output=True, text=True, input=input, env=subp_env) + result = subprocess.run(cmd, shell=shell, check=False, capture_output=True, text=True, input=input, env=subp_env) + print(result.stderr) + print(result.stdout) if return_details: return { "stderr": result.stderr, From a9200fb770a70a502798d9ba3438da1d0ea60313 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sun, 2 Jul 2023 20:59:36 -0500 Subject: [PATCH 060/200] Accidentally left in some debug stuff --- python/origen/origen/helpers/env.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/origen/origen/helpers/env.py b/python/origen/origen/helpers/env.py index 23e1439d..716dd67e 100644 --- a/python/origen/origen/helpers/env.py +++ b/python/origen/origen/helpers/env.py @@ -68,9 +68,7 @@ def to_cmd(c): cmd = ' '.join(cmd) raise RuntimeError(f"Expected cmd '{cmd}' to fail but received return code 0") else: - result = subprocess.run(cmd, shell=shell, check=False, capture_output=True, text=True, input=input, env=subp_env) - print(result.stderr) - print(result.stdout) + result = subprocess.run(cmd, shell=shell, check=check, capture_output=True, text=True, input=input, env=subp_env) if return_details: return { "stderr": result.stderr, From 62cabad2c4fb57f1f5626abfda22c29dd65dee45 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 3 Jul 2023 21:02:39 -0500 Subject: [PATCH 061/200] Add no-workspace with/without plugins tests --- .github/workflows/regression_test.yml | 38 ++++++++-- python/origen/pyproject.toml | 2 +- rust/origen/cli/src/python.rs | 4 +- rust/origen/src/core/status.rs | 8 +- rust/pyapi/src/infrastructure/pyproject.rs | 4 +- .../eval_scripts/print_pl_names.py | 4 + .../no_workspace/eval_scripts/print_status.py | 4 + test_apps/no_workspace/t_invocation_env.py | 74 ++++++++++++++----- test_apps/no_workspace/test_no_workspace.py | 27 +++++++ test_apps/pl_ext_cmds/pyproject.toml | 2 +- 10 files changed, 131 insertions(+), 36 deletions(-) create mode 100644 test_apps/no_workspace/eval_scripts/print_pl_names.py create mode 100644 test_apps/no_workspace/eval_scripts/print_status.py create mode 100644 test_apps/no_workspace/test_no_workspace.py diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index f8559e42..41184b48 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -124,7 +124,7 @@ jobs: # - name: Install Poetry # uses: abatilo/actions-poetry@v2.0.0 # with: - # poetry-version: 1.3.2 + # poetry-version: 1.1.14 - name: Setup Python Env - Metal working-directory: python/origen_metal @@ -153,10 +153,34 @@ jobs: # TODO eventually want to move this into a poetry build step # For now, manually move the binary. Also keeps us from having to mess with the path across OSs # 'mv' command should be be fine for both linux & powershell - # - name: Move Origen executable (Linux) - # if: matrix.os == 'ubuntu-latest' - # run: mv rust/origen/target/debug/origen python/origen/origen/__bin__/bin + - name: Move Origen executable (Linux) + if: matrix.os == 'ubuntu-latest' + run: mv rust/origen/target/debug/origen python/origen/origen/__bin__/bin + - name: Move Origen executable (Windows) + if: matrix.os == 'windows-latest' + run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin + + - name: Install Origen Packages + run: + pip install python/origen + pip install python/origen_metal + + - name: Show Origen Binary Location (Linux) + run: which origen + - name: Show Origen Binary Location (Windows) + run: where.exe origen - # - name: Move Origen executable (Windows) - # if: matrix.os == 'windows-latest' - # run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin + # Should be no pyprojects in the root so far. Start with no-workspace tests + - name: Run No-Workspace-No-Plugins Tests + working-directory: test_apps/no_workspace + run: pytest test_no_workspace.py::TestNoWorkspaceNoPlugins -vv + + - name: Install Plugins + run: + pip install test_apps/test_apps_shared_test_helpers + pip install test_apps/python_plugin + pip install python/origen_metal + + - name: Run No-Workspace-With-Plugins Tests + working-directory: test_apps/no_workspace + run: pytest test_no_workspace.py::TestNoWorkspaceWithPlugins -vv diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index a1465970..40e392b0 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -18,7 +18,7 @@ script = "poetry_build.py" generate-setup-file = false [tool.poetry.scripts] -o2 = 'origen.__bin__:run_origen' +origen = 'origen.__bin__:run_origen' [tool.poetry.dependencies] python = ">=3.7,<3.11" diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index 1491ae3f..880c312d 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -105,7 +105,7 @@ pub fn resolve_pyproject() -> Result { } log_trace!("No pyproject found. Skipping Poetry invocations..."); - Ok(DependencySrc::None) + Ok(DependencySrc::NoneFound) } impl Config { @@ -125,7 +125,7 @@ impl Config { c.arg("-C"); c.arg(path); } - DependencySrc::None => {} + DependencySrc::NoneFound => {} } } else { log_error!("Dependency source has not been set - defaulting to global Python installation"); diff --git a/rust/origen/src/core/status.rs b/rust/origen/src/core/status.rs index 01d66434..d6beceb4 100644 --- a/rust/origen/src/core/status.rs +++ b/rust/origen/src/core/status.rs @@ -61,13 +61,13 @@ pub enum DependencySrc { Workspace(PathBuf), // current directory tree (in workspace) UserGlobal(PathBuf), // explicitly given by user, no workspace Global(PathBuf), // the origen CLI installation directory, no workspace - None, // None available. Use whatever is available in the same install environment as Origen itself + NoneFound, // None available. Use whatever is available in the same install environment as Origen itself } impl DependencySrc { pub fn src_available(&self) -> bool { match self { - Self::None => false, + Self::NoneFound => false, _ => true, } } @@ -75,7 +75,7 @@ impl DependencySrc { pub fn src_file(&self) -> Option<&PathBuf> { match self { Self::App(path) | Self::Workspace(path) | Self::UserGlobal(path) | Self::Global(path) => Some(path), - Self::None => None, + Self::NoneFound => None, } } } @@ -99,7 +99,7 @@ where S: AsRef { "Workspace" => gen_case!(Workspace), "UserGlobal" => gen_case!(UserGlobal), "Global" => gen_case!(Global), - "None" => Self::None, + "None" => Self::NoneFound, _ => bail!("Cannot convert value '{}' to dependency src type", value.0.as_ref()) }) } diff --git a/rust/pyapi/src/infrastructure/pyproject.rs b/rust/pyapi/src/infrastructure/pyproject.rs index 319e1f19..876bdd34 100644 --- a/rust/pyapi/src/infrastructure/pyproject.rs +++ b/rust/pyapi/src/infrastructure/pyproject.rs @@ -31,7 +31,7 @@ pub enum PyProjectSrc { Workspace, UserGlobal, Global, - None, + NoneFound, } impl PyProjectSrc { @@ -47,7 +47,7 @@ impl From<&DependencySrc> for PyProjectSrc { DependencySrc::Workspace(_) => Self::Workspace, DependencySrc::UserGlobal(_) => Self::UserGlobal, DependencySrc::Global(_) => Self::Global, - DependencySrc::None => Self::None, + DependencySrc::NoneFound => Self::NoneFound, } } } \ No newline at end of file diff --git a/test_apps/no_workspace/eval_scripts/print_pl_names.py b/test_apps/no_workspace/eval_scripts/print_pl_names.py new file mode 100644 index 00000000..4cb9d252 --- /dev/null +++ b/test_apps/no_workspace/eval_scripts/print_pl_names.py @@ -0,0 +1,4 @@ +import origen +header = "--Origen Eval--" +print(header) +print(list(origen.plugins.keys())) diff --git a/test_apps/no_workspace/eval_scripts/print_status.py b/test_apps/no_workspace/eval_scripts/print_status.py new file mode 100644 index 00000000..dd9606d5 --- /dev/null +++ b/test_apps/no_workspace/eval_scripts/print_status.py @@ -0,0 +1,4 @@ +import origen +header = "--Origen Eval--" +print(header) +print(origen.status) diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index fcd4c36d..d0d57b81 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -1,3 +1,4 @@ +# FOR_PR clean up # Use the dev version but actual tests should be done through 'eval'. import sys, pathlib p = pathlib.Path(__file__).parent.parent.parent.joinpath("python/origen") @@ -17,6 +18,9 @@ no_workspace_test_dir = pathlib.Path(__file__).parent o2_root = no_workspace_test_dir.parent.parent debug_cli_loc = o2_root.joinpath(f"rust/origen/target/debug/origen{'.exe' if origen.running_on_windows else ''}") +eval_scripts_dir = no_workspace_test_dir.joinpath("eval_scripts") +status_eval_script = eval_scripts_dir.joinpath("print_status.py") +pl_names_eval_script = eval_scripts_dir.joinpath("print_pl_names.py") # Assume pip is installed in 'site-packages' site_packages_dir = pathlib.Path(pip.__file__).parent.parent @@ -30,45 +34,69 @@ class T_InvocationBaseTests(CLI): @classmethod def setup(cls): cls.set_params() - cls.target_pyproj_toml = cls.target_pyproj_dir.joinpath(toml) - cls.target_poetry_lock = cls.target_pyproj_dir.joinpath(lockfile) + if cls.target_pyproj_dir: + cls.target_pyproj_toml = cls.target_pyproj_dir.joinpath(toml) + cls.target_poetry_lock = cls.target_pyproj_dir.joinpath(lockfile) + else: + cls.target_pyproj_toml = None + cls.target_poetry_lock = None + + if not hasattr(cls, "file_based_evals"): + cls.file_based_evals = False + cls.cli_location = cls.cli_dir.joinpath(f"origen{'.exe' if origen.running_on_windows else ''}") @property def header(self): return "--Origen Eval--" - def test_invocation_from_pytest(self): - assert origen.status["pyproject"] is None - assert origen.status["invocation"] is None - def eval_and_parse(self, code): # out = CLI.global_cmds.eval.run(code, "-vv", run_opts={"return_details": True}) - out = CLI.global_cmds.eval.run(code) + if isinstance(code, str): + code = [code] + print(code) + # out = CLI.global_cmds.eval.run(*code, run_opts={"return_details": True, "check": False}) + out = CLI.global_cmds.eval.run(*code) + print(out) out = out.split("\n") idx = out.index(self.header) return eval(out[idx+1]) + def get_status(self): + if self.file_based_evals: + return self.eval_and_parse(["-f", status_eval_script]) + else: + return self.eval_and_parse(f"print('{self.header}'); print(origen.status)") + + def test_invocation_from_pytest(self): + assert origen.status["pyproject"] is None + assert origen.status["invocation"] is None + def test_pyproject_and_invocation_set(self): - code = f"print('{self.header}'); print(origen.status)" + # code = f"print('{self.header}'); print(origen.status)" # code = r"print\(\\\"Origen\ Status:\\\"\) print\(origen.status\)" - status = self.eval_and_parse(code) + status = self.get_status() print(status) assert status["pyproject"] == self.target_pyproj_toml assert status["invocation"] == self.invocation def test_cli_location(self): - code = f"print('{self.header}'); print(origen.status)" - status = self.eval_and_parse(code) + # code = f"print('{self.header}'); print(origen.status)" + # status = self.eval_and_parse(code) + status = self.get_status() assert status['cli_location'] == self.cli_location class T_InvocationEnv(T_InvocationBaseTests): @classmethod - def setup(cls): + def setup_method(cls): super().setup() # cls.set_params() - cls._pyproj_src_file = cls.gen_pyproj() + if cls.target_pyproj_dir: + cls._pyproj_src_file = cls.gen_pyproj() if not hasattr(cls, "move_pyproject"): - cls.move_pyproject = True + if cls.target_pyproj_dir: + cls.move_pyproject = True + else: + cls.move_pyproject = False # TODO clear any existing pyproject/poetry.locks ? # cls._pyproj_lock = cls._pyproj_file.parent.joinpath("poetry.lock") # for d in origen_exe_loc.parents: @@ -81,11 +109,12 @@ def setup(cls): target = cls.target_pyproj_dir.joinpath(toml) print(f"Moving pyproject {cls._pyproj_src_file} to {target}") shutil.copy(cls._pyproj_src_file, target) - subprocess.run(["poetry", "--version"], check=True, cwd=cls.target_pyproj_dir) - subprocess.run(["poetry", "install"], check=True, cwd=cls.target_pyproj_dir) + if cls.target_pyproj_dir: + subprocess.run(["poetry", "--version"], check=True, cwd=cls.target_pyproj_dir) + subprocess.run(["poetry", "install"], check=True, cwd=cls.target_pyproj_dir) @classmethod - def teardown(cls): + def teardown_method(cls): if cls.move_pyproject: print(f"Cleaning pyproject and lockfile {cls.target_pyproj_toml}, {cls.target_poetry_lock}") cls.target_pyproj_toml.unlink() @@ -118,13 +147,20 @@ def gen_pyproj(cls): # # if id == "_origen_metal": # assert isinstance(origen_metal._origen_metal, ModuleType) + def get_plugin_names(self): + if self.file_based_evals: + return self.eval_and_parse(["-f", pl_names_eval_script]) + else: + return self.eval_and_parse(f"print('{self.header}'); print(list(origen.plugins.keys()))") + @pytest.mark.skip def test_origen_h(self): fail def test_plugins(self): - code = f"print('{self.header}'); print(list(origen.plugins.keys()))" - pls = self.eval_and_parse(code) + # code = f"print('{self.header}'); print(list(origen.plugins.keys()))" + pls = self.get_plugin_names() + # pls = self.eval_and_parse(code) if self.has_pls: # TODO consistent plugin loading assert set(pls) == {'pl_ext_cmds', 'test_apps_shared_test_helpers', 'python_plugin'} diff --git a/test_apps/no_workspace/test_no_workspace.py b/test_apps/no_workspace/test_no_workspace.py new file mode 100644 index 00000000..1d571779 --- /dev/null +++ b/test_apps/no_workspace/test_no_workspace.py @@ -0,0 +1,27 @@ +from .t_invocation_env import T_InvocationEnv, no_workspace_test_dir, PyProjectSrc, site_packages_dir + +class TestNoWorkspaceNoPlugins(T_InvocationEnv): + user_install_dir = no_workspace_test_dir.joinpath("user_install") + + @classmethod + def set_params(cls): + cls.target_pyproj_dir = None + cls.invocation = PyProjectSrc.NoneFound + cls.cli_dir = site_packages_dir.joinpath("origen/__bin__/bin") + cls.has_pls = False + + @classmethod + def setup_method(cls): + cls.file_based_evals = True + super().setup_method() + +class TestNoWorkspaceWithPlugins(TestNoWorkspaceNoPlugins): + @classmethod + def set_params(cls): + super().set_params() + cls.has_pls = True + + def test_exts_in_user_global_context(self): + out = self.global_cmds.eval.run("1==1", "-b", "-a") + assert "Hi from python-plugin during 'eval'!" in out + assert "Hi again from python-plugin during 'eval'!" in out diff --git a/test_apps/pl_ext_cmds/pyproject.toml b/test_apps/pl_ext_cmds/pyproject.toml index 9fc1d4dd..889ce813 100644 --- a/test_apps/pl_ext_cmds/pyproject.toml +++ b/test_apps/pl_ext_cmds/pyproject.toml @@ -7,7 +7,7 @@ authors = ["Origen-SDK"] [tool.poetry.dependencies] python = ">=3.7,<3.11" origen = { path = "../../python/origen", develop = true } -origen_metal = { path = "../../python/origen_metal", develop = true } +origen_metal = ">=0.0.0" [tool.poetry.dev-dependencies] pytest = "^3" From 8889c54a9c41b65a21fc989f96e85e1da11ea9c7 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 4 Jul 2023 07:22:09 -0500 Subject: [PATCH 062/200] Debug regression tests --- .github/workflows/regression_test.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 41184b48..89f9768f 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -45,12 +45,21 @@ jobs: - name: Add Origen to PATH (Linux) if: matrix.os == 'ubuntu-latest' - run: echo "${{ github.workspace }}/rust/origen/target/debug" >> $GITHUB_PATH + run: + echo "${{ github.workspace }}/rust/origen/target/debug" >> $GITHUB_PATH + echo "${{ github.workspace }}/rust/origen/target/debug" >> $PATH - name: Add Origen to PATH (Windows) if: matrix.os == 'windows-latest' - run: echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - + run: + echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:PATH -Encoding utf8 -Append + + - name: Show Origen Binary Location (Linux) + run: which origen + - name: Show Origen Binary Location (Windows) + run: where.exe origen + - name: Display Python Version run: python -c "import sys; print(sys.version)" @@ -67,7 +76,12 @@ jobs: - name: Display Origen App Version working-directory: test_apps/python_app run: origen -v - + + - name: Show Origen Binary Location (Linux) + run: which origen + - name: Show Origen Binary Location (Windows) + run: where.exe origen + - name: Display Poetry Version working-directory: test_apps/python_app run: poetry --version From 55c8b2706a1b77e046c3eb15de5dbc338ceee06e Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 4 Jul 2023 07:44:37 -0500 Subject: [PATCH 063/200] GA: fix multiple run steps --- .github/workflows/regression_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 89f9768f..d2d7a0c3 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -45,13 +45,13 @@ jobs: - name: Add Origen to PATH (Linux) if: matrix.os == 'ubuntu-latest' - run: + run: | echo "${{ github.workspace }}/rust/origen/target/debug" >> $GITHUB_PATH echo "${{ github.workspace }}/rust/origen/target/debug" >> $PATH - name: Add Origen to PATH (Windows) if: matrix.os == 'windows-latest' - run: + run: | echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:PATH -Encoding utf8 -Append @@ -175,7 +175,7 @@ jobs: run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin - name: Install Origen Packages - run: + run: | pip install python/origen pip install python/origen_metal @@ -190,7 +190,7 @@ jobs: run: pytest test_no_workspace.py::TestNoWorkspaceNoPlugins -vv - name: Install Plugins - run: + run: | pip install test_apps/test_apps_shared_test_helpers pip install test_apps/python_plugin pip install python/origen_metal From 2dcfcdb461b9f796bcf1fef29c178342af2f1990 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 4 Jul 2023 08:10:10 -0500 Subject: [PATCH 064/200] GA: More debug --- .github/workflows/regression_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index d2d7a0c3..25328e4d 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -47,13 +47,13 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | echo "${{ github.workspace }}/rust/origen/target/debug" >> $GITHUB_PATH - echo "${{ github.workspace }}/rust/origen/target/debug" >> $PATH + export PATH="${{ github.workspace }}/rust/origen/target/debug:$PATH" - name: Add Origen to PATH (Windows) if: matrix.os == 'windows-latest' run: | echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:PATH -Encoding utf8 -Append + $env:Path = "${{ github.workspace }}/rust/origen/target/debug;$env:Path" - name: Show Origen Binary Location (Linux) run: which origen From 8c472547aa8d97afd46defd0f3f56eaee5a738c2 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 4 Jul 2023 08:21:45 -0500 Subject: [PATCH 065/200] GA: More debug --- .github/workflows/regression_test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 25328e4d..50e14394 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -56,8 +56,10 @@ jobs: $env:Path = "${{ github.workspace }}/rust/origen/target/debug;$env:Path" - name: Show Origen Binary Location (Linux) + if: matrix.os == 'ubuntu-latest' run: which origen - name: Show Origen Binary Location (Windows) + if: matrix.os == 'windows-latest' run: where.exe origen - name: Display Python Version @@ -78,8 +80,10 @@ jobs: run: origen -v - name: Show Origen Binary Location (Linux) + if: matrix.os == 'ubuntu-latest' run: which origen - name: Show Origen Binary Location (Windows) + if: matrix.os == 'windows-latest' run: where.exe origen - name: Display Poetry Version @@ -180,8 +184,10 @@ jobs: pip install python/origen_metal - name: Show Origen Binary Location (Linux) + if: matrix.os == 'ubuntu-latest' run: which origen - name: Show Origen Binary Location (Windows) + if: matrix.os == 'windows-latest' run: where.exe origen # Should be no pyprojects in the root so far. Start with no-workspace tests From 013db4fa7faf6c4e4f63623d167379ac7bb648ba Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 4 Jul 2023 16:57:53 -0500 Subject: [PATCH 066/200] GA: More debug --- .github/workflows/regression_test.yml | 45 ++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 50e14394..5028609b 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -55,13 +55,6 @@ jobs: echo "${{ github.workspace }}/rust/origen/target/debug" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append $env:Path = "${{ github.workspace }}/rust/origen/target/debug;$env:Path" - - name: Show Origen Binary Location (Linux) - if: matrix.os == 'ubuntu-latest' - run: which origen - - name: Show Origen Binary Location (Windows) - if: matrix.os == 'windows-latest' - run: where.exe origen - - name: Display Python Version run: python -c "import sys; print(sys.version)" @@ -89,7 +82,43 @@ jobs: - name: Display Poetry Version working-directory: test_apps/python_app run: poetry --version - + + - name: Show Origen Binary Location (Linux) + if: matrix.os == 'ubuntu-latest' + working-directory: test_apps/python_app + run: | + which origen + poetry run which origen + - name: Show Origen Binary Location (Windows) + if: matrix.os == 'windows-latest' + working-directory: test_apps/python_app + run: | + where.exe origen + poetry run where.exe origen + + # TODO need to see why this is the case and come up with a better solution + - name: Remove Poetry's Origen Wrapper (Linux) + if: matrix.os == 'ubuntu-latest' + working-directory: test_apps/python_app + run: poetry run which origen | rm -f + - name: Remove Poetry's Origen Wrapper (Windows) + if: matrix.os == 'windows-latest' + working-directory: test_apps/python_app + run: poetry run where.exe origen | rm -f + + - name: Show Origen Binary Location (Linux) + if: matrix.os == 'ubuntu-latest' + working-directory: test_apps/python_app + run: | + which origen + poetry run which origen + - name: Show Origen Binary Location (Windows) + if: matrix.os == 'windows-latest' + working-directory: test_apps/python_app + run: | + where.exe origen + poetry run where.exe origen + - name: Run Python-App Unit Tests working-directory: test_apps/python_app run: origen exec pytest -vv From 0f16b7f88d1371fb4a5d624db2aa04d2e767d4d9 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 4 Jul 2023 20:00:05 -0500 Subject: [PATCH 067/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 5028609b..a56e79d7 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -94,17 +94,18 @@ jobs: working-directory: test_apps/python_app run: | where.exe origen + echo "" poetry run where.exe origen # TODO need to see why this is the case and come up with a better solution - name: Remove Poetry's Origen Wrapper (Linux) if: matrix.os == 'ubuntu-latest' working-directory: test_apps/python_app - run: poetry run which origen | rm -f + run: poetry run which origen | xargs rm - name: Remove Poetry's Origen Wrapper (Windows) if: matrix.os == 'windows-latest' working-directory: test_apps/python_app - run: poetry run where.exe origen | rm -f + run: poetry run where.exe origen | select -first 1 | rm - name: Show Origen Binary Location (Linux) if: matrix.os == 'ubuntu-latest' @@ -117,6 +118,7 @@ jobs: working-directory: test_apps/python_app run: | where.exe origen + echo "" poetry run where.exe origen - name: Run Python-App Unit Tests From 22c7f7c69d653d2d4668fe4e0b92dad64c904130 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 4 Jul 2023 21:04:42 -0500 Subject: [PATCH 068/200] Update from cli-loc to cli-dir in invocation tests --- test_apps/no_workspace/t_invocation_env.py | 4 ++-- test_apps/no_workspace/test_user_install.py | 2 +- test_apps/python_app/tests/cli_test.py | 2 +- test_apps/python_no_app/tests/test_global_invocation.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index d0d57b81..aea3d7ae 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -17,7 +17,7 @@ lockfile = "poetry.lock" no_workspace_test_dir = pathlib.Path(__file__).parent o2_root = no_workspace_test_dir.parent.parent -debug_cli_loc = o2_root.joinpath(f"rust/origen/target/debug/origen{'.exe' if origen.running_on_windows else ''}") +debug_cli_dir = o2_root.joinpath(f"rust/origen/target/debug") eval_scripts_dir = no_workspace_test_dir.joinpath("eval_scripts") status_eval_script = eval_scripts_dir.joinpath("print_status.py") pl_names_eval_script = eval_scripts_dir.joinpath("print_pl_names.py") @@ -28,7 +28,7 @@ class T_InvocationBaseTests(CLI): templates_dir = no_workspace_test_dir.joinpath("templates") templates_out_dir = templates_dir.joinpath("output") - debug_cli_loc = debug_cli_loc + debug_cli_dir = debug_cli_dir PyProjectSrc = PyProjectSrc @classmethod diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index 01dd7e25..b3f42a31 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -29,7 +29,7 @@ def set_params(cls): cls.target_pyproj_dir = cls.user_install_dir cls.move_pyproject = False cls.invocation = PyProjectSrc.UserGlobal - cls.cli_location = cls.debug_cli_loc + cls.cli_dir = cls.debug_cli_dir @classmethod def setup_method(cls): diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 7f83ba8e..04ea18cc 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -75,5 +75,5 @@ class TestAppInvocation(T_InvocationBaseTests): @classmethod def set_params(cls): cls.invocation = cls.PyProjectSrc.App - cls.cli_location = cls.debug_cli_loc + cls.cli_dir = cls.debug_cli_dir cls.target_pyproj_dir = pathlib.Path(__file__).parent.parent diff --git a/test_apps/python_no_app/tests/test_global_invocation.py b/test_apps/python_no_app/tests/test_global_invocation.py index 30201aa7..ec8778d4 100644 --- a/test_apps/python_no_app/tests/test_global_invocation.py +++ b/test_apps/python_no_app/tests/test_global_invocation.py @@ -19,7 +19,7 @@ class TestWorkspaceInvocation(T_InvocationBaseTests): @classmethod def set_params(cls): cls.invocation = cls.PyProjectSrc.Workspace - cls.cli_location = cls.debug_cli_loc + cls.cli_dir = cls.debug_cli_dir cls.target_pyproj_dir = working_dir class TestGlobalFEIntegration: From ba984750693846e45c61e237f799d9f66bd32864 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 5 Jul 2023 07:01:32 -0500 Subject: [PATCH 069/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index a56e79d7..b5b3a5e2 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -158,6 +158,44 @@ jobs: working-directory: test_apps/python_no_app run: poetry run origen -vvv + - name: Show Origen Binary Location (Linux) + if: matrix.os == 'ubuntu-latest' + working-directory: test_apps/python_no_app + run: | + which origen + poetry run which origen + - name: Show Origen Binary Location (Windows) + if: matrix.os == 'windows-latest' + working-directory: test_apps/python_no_app + run: | + where.exe origen + echo "" + poetry run where.exe origen + + # TODO need to see why this is the case and come up with a better solution + - name: Remove Poetry's Origen Wrapper (Linux) + if: matrix.os == 'ubuntu-latest' + working-directory: test_apps/python_no_app + run: poetry run which origen | xargs rm + - name: Remove Poetry's Origen Wrapper (Windows) + if: matrix.os == 'windows-latest' + working-directory: test_apps/python_no_app + run: poetry run where.exe origen | select -first 1 | rm + + - name: Show Origen Binary Location (Linux) + if: matrix.os == 'ubuntu-latest' + working-directory: test_apps/python_no_app + run: | + which origen + poetry run which origen + - name: Show Origen Binary Location (Windows) + if: matrix.os == 'windows-latest' + working-directory: test_apps/python_no_app + run: | + where.exe origen + echo "" + poetry run where.exe origen + - name: Run Python-No-App Unit Tests working-directory: test_apps/python_no_app run: poetry run pytest -vv From 2a1f0e100678242e24cb64644d1f42e579e201f4 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 5 Jul 2023 10:26:10 -0500 Subject: [PATCH 070/200] GA: Continued Debug --- test_apps/no_workspace/test_user_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index b3f42a31..0bf33202 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -33,7 +33,7 @@ def set_params(cls): @classmethod def setup_method(cls): - super().setup() + super().setup_method() os.environ["ORIGEN_PYPROJECT"] = str(cls.user_install_dir) @classmethod From 10268409a3c4e9cfefd7e43526e767a812fe8089 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 5 Jul 2023 13:42:54 -0500 Subject: [PATCH 071/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index b5b3a5e2..d5b0375b 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -247,6 +247,11 @@ jobs: if: matrix.os == 'windows-latest' run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin + # TODO not sure why, but the tmp directory in origen_metal causes some issues + # For now, just removing it. + - name: Remove origen_metal tmp Directory + run: rm python/origen_metal/tmp -r + - name: Install Origen Packages run: | pip install python/origen From be436202402ee6b43cb59958ed30ca736907a3e3 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 5 Jul 2023 14:31:48 -0500 Subject: [PATCH 072/200] GA: Continued Debug --- rust/origen/src/core/status.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/origen/src/core/status.rs b/rust/origen/src/core/status.rs index d6beceb4..a821268b 100644 --- a/rust/origen/src/core/status.rs +++ b/rust/origen/src/core/status.rs @@ -99,7 +99,7 @@ where S: AsRef { "Workspace" => gen_case!(Workspace), "UserGlobal" => gen_case!(UserGlobal), "Global" => gen_case!(Global), - "None" => Self::NoneFound, + "NoneFound" => Self::NoneFound, _ => bail!("Cannot convert value '{}' to dependency src type", value.0.as_ref()) }) } From 9c572965065863b0cec92a790894ef2a5804ae81 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 5 Jul 2023 16:59:06 -0500 Subject: [PATCH 073/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index d5b0375b..90fd7282 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -97,7 +97,7 @@ jobs: echo "" poetry run where.exe origen - # TODO need to see why this is the case and come up with a better solution + # TODO GA: Regressions: need to see why this is the case and come up with a better solution - name: Remove Poetry's Origen Wrapper (Linux) if: matrix.os == 'ubuntu-latest' working-directory: test_apps/python_app @@ -172,7 +172,7 @@ jobs: echo "" poetry run where.exe origen - # TODO need to see why this is the case and come up with a better solution + # TODO GA: Regressions: need to see why this is the case and come up with a better solution - name: Remove Poetry's Origen Wrapper (Linux) if: matrix.os == 'ubuntu-latest' working-directory: test_apps/python_no_app @@ -237,7 +237,7 @@ jobs: working-directory: test_apps/no_workspace run: pytest test_user_install.py -vv - # TODO eventually want to move this into a poetry build step + # TODO GA: Regressions: eventually want to move this into a poetry build step # For now, manually move the binary. Also keeps us from having to mess with the path across OSs # 'mv' command should be be fine for both linux & powershell - name: Move Origen executable (Linux) @@ -247,11 +247,18 @@ jobs: if: matrix.os == 'windows-latest' run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin - # TODO not sure why, but the tmp directory in origen_metal causes some issues + # TODO GA: Regressions: not sure why, but the tmp directory in origen_metal causes some issues # For now, just removing it. - name: Remove origen_metal tmp Directory run: rm python/origen_metal/tmp -r + # TODO GA: Regressions: Need to better handle this + # Issue being that working on a newer Python version than what's released will not resolve + # Workaround by removing origen_metal package from origen dependencies and installing separately + - name: Hack origen pyproject + working-directory: python/origen + run: poetry remove origen_metal + - name: Install Origen Packages run: | pip install python/origen From d5dcdb3360772fec9248054356362be910d8ed38 Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 6 Jul 2023 13:17:24 -0500 Subject: [PATCH 074/200] Add global workspace tests --- .github/workflows/regression_test.yml | 13 ++++++++ test_apps/no_workspace/t_invocation_env.py | 10 +++++- .../no_workspace/templates/pyproject.toml | 6 ++-- test_apps/no_workspace/test_global_install.py | 33 +++++++++++++++++++ 4 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 test_apps/no_workspace/test_global_install.py diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 90fd7282..b16854e6 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -285,3 +285,16 @@ jobs: - name: Run No-Workspace-With-Plugins Tests working-directory: test_apps/no_workspace run: pytest test_no_workspace.py::TestNoWorkspaceWithPlugins -vv + + # Leave the no-workspace setup. The global setup should override + - name: Run Global No-Plugins One Above Site-Packages Dir + working-directory: test_apps/no_workspace + run: pytest test_global_install.py::TestGlobalInstallNoPlugins -vv + + - name: Run Global With Plugins At Site-Packages Dir + working-directory: test_apps/no_workspace + run: pytest test_global_install.py::TestGlobalInstallWithPlugins -vv + + - name: Run Global No-Plugins At CLI Dir + working-directory: test_apps/no_workspace + run: pytest test_global_install.py::TestGlobalInstallAtCliDir -vv diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index aea3d7ae..d7c43914 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -24,8 +24,11 @@ # Assume pip is installed in 'site-packages' site_packages_dir = pathlib.Path(pip.__file__).parent.parent +site_cli_dir = site_packages_dir.joinpath("origen/__bin__/bin") class T_InvocationBaseTests(CLI): + site_packages_dir = site_packages_dir + site_cli_dir = site_cli_dir templates_dir = no_workspace_test_dir.joinpath("templates") templates_out_dir = templates_dir.joinpath("output") debug_cli_dir = debug_cli_dir @@ -129,7 +132,12 @@ def gen_pyproj(cls): cls.templates_out_dir.mkdir(exist_ok=True) pyproj = cls.templates_out_dir.joinpath(f"{cls.__name__}.{toml}") with open(pyproj, "w") as f: - f.write(t.render(local_origen=cls.local_origen, name=cls.__name__, o2_root=o2_root)) + f.write(t.render( + local_origen=cls.local_origen, + name=cls.__name__, + o2_root=o2_root, + has_pls=cls.has_pls, + )) return pyproj # TEST_NEEDED invocation origen/metal package locations diff --git a/test_apps/no_workspace/templates/pyproject.toml b/test_apps/no_workspace/templates/pyproject.toml index 7be3df09..d05e79ab 100644 --- a/test_apps/no_workspace/templates/pyproject.toml +++ b/test_apps/no_workspace/templates/pyproject.toml @@ -13,12 +13,12 @@ origen_metal = { path = "{{ o2_root }}/python/origen_metal", develop = true } origen = ">= 0.0.0" origen_metal = ">= 0.0.0" {% endif %} -{% if include_plugins %} +{% if has_pls %} {% if local_origen %} -pl_ext_cmds = { path = "{{ o2_root }}/test_apps/pl_ext_cmds", develop = true } +python_plugin = { path = "{{ o2_root }}/test_apps/python_plugin", develop = true } test_apps_shared_test_helpers = { path = "{{ o2_root }}/test_apps/test_apps_shared_test_helpers", develop = true } {% else %} -pl_ext_cmds = ">= 0.0.0" +python_plugin = ">= 0.0.0" test_apps_shared_test_helpers = ">= 0.0.0" {% endif %} {% endif %} \ No newline at end of file diff --git a/test_apps/no_workspace/test_global_install.py b/test_apps/no_workspace/test_global_install.py new file mode 100644 index 00000000..64a61523 --- /dev/null +++ b/test_apps/no_workspace/test_global_install.py @@ -0,0 +1,33 @@ +from .t_invocation_env import T_InvocationEnv, PyProjectSrc + +class GlobalInstalBase(T_InvocationEnv): + @classmethod + def set_params(cls): + cls.local_origen = True + cls.invocation = PyProjectSrc.Global + cls.cli_dir = cls.site_cli_dir + cls.file_based_evals = True + +# Pyproject closer to root - no plugins +class TestGlobalInstallNoPlugins(GlobalInstalBase): + @classmethod + def set_params(cls): + super().set_params() + cls.target_pyproj_dir = cls.site_packages_dir.parent + cls.has_pls = False + +# Pyproject at site-packages dir - with plugins +class TestGlobalInstallWithPlugins(GlobalInstalBase): + @classmethod + def set_params(cls): + super().set_params() + cls.target_pyproj_dir = cls.site_packages_dir + cls.has_pls = True + +# Pyproject at binary location - no plugins +class TestGlobalInstallAtCliDir(GlobalInstalBase): + @classmethod + def set_params(cls): + super().set_params() + cls.target_pyproj_dir = cls.site_cli_dir + cls.has_pls = False From 716ce8c7e19b5a5a3f8346d1ebe4161249ebd73e Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 6 Jul 2023 16:42:24 -0500 Subject: [PATCH 075/200] GA: Continued Debug --- test_apps/no_workspace/templates/pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_apps/no_workspace/templates/pyproject.toml b/test_apps/no_workspace/templates/pyproject.toml index d05e79ab..e36101b3 100644 --- a/test_apps/no_workspace/templates/pyproject.toml +++ b/test_apps/no_workspace/templates/pyproject.toml @@ -7,16 +7,16 @@ authors = ["Origen-SDK"] [tool.poetry.dependencies] python = ">=3.7,<3.11" {% if local_origen %} -origen = { path = "{{ o2_root }}/python/origen", develop = true } -origen_metal = { path = "{{ o2_root }}/python/origen_metal", develop = true } +origen = { path = "{{ o2_root.joinpath("python/origen").as_posix() }}", develop = true } +origen_metal = { path = "{{ o2_root.joinpath("python/origen_metal").as_posix() }}", develop = true } {% else %} origen = ">= 0.0.0" origen_metal = ">= 0.0.0" {% endif %} {% if has_pls %} {% if local_origen %} -python_plugin = { path = "{{ o2_root }}/test_apps/python_plugin", develop = true } -test_apps_shared_test_helpers = { path = "{{ o2_root }}/test_apps/test_apps_shared_test_helpers", develop = true } +python_plugin = { path = "{{ o2_root.joinpath("test_apps/python_plugin").as_posix() }}", develop = true } +test_apps_shared_test_helpers = { path = "{{ o2_root.joinpath("test_apps/test_apps_shared_test_helpers").as_posix() }}", develop = true } {% else %} python_plugin = ">= 0.0.0" test_apps_shared_test_helpers = ">= 0.0.0" From 62b82b7c3f9dd626b224a5d1946b873f1661b8b9 Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 6 Jul 2023 20:06:08 -0500 Subject: [PATCH 076/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index b16854e6..128762c1 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -24,7 +24,13 @@ jobs: toolchain: "nightly-2022-05-17" override: true #components: rustfmt, clippy - + + - name: Pre-Python Install Setup (Windows-Only) + if: matrix.os == 'windows-latest' + run: | + $env:RUNNER_TOOL_CACHE = ${{ github.workspace }} | Split-Path | Join-Path -ChildPath o2_GA_tools + mkdir $env:RUNNER_TOOL_CACHE + - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: From 34051fec94fc9339acf45249976cea4fa5194ddd Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 6 Jul 2023 20:25:50 -0500 Subject: [PATCH 077/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 128762c1..4da2136d 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -28,7 +28,7 @@ jobs: - name: Pre-Python Install Setup (Windows-Only) if: matrix.os == 'windows-latest' run: | - $env:RUNNER_TOOL_CACHE = ${{ github.workspace }} | Split-Path | Join-Path -ChildPath o2_GA_tools + $env:RUNNER_TOOL_CACHE = '${{ github.workspace }}' | Split-Path | Join-Path -ChildPath o2_GA_tools mkdir $env:RUNNER_TOOL_CACHE - name: Setup Python ${{ matrix.python-version }} From a4a95a5c4567da9c47ce7616bde5113b405d2318 Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 6 Jul 2023 21:29:50 -0500 Subject: [PATCH 078/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 4da2136d..2bfda709 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -29,6 +29,7 @@ jobs: if: matrix.os == 'windows-latest' run: | $env:RUNNER_TOOL_CACHE = '${{ github.workspace }}' | Split-Path | Join-Path -ChildPath o2_GA_tools + $env:AGENT_TOOLSDIRECTORY = $env:RUNNER_TOOL_CACHE mkdir $env:RUNNER_TOOL_CACHE - name: Setup Python ${{ matrix.python-version }} From 2509ae47d02e8a561a3bfb40d6ccdbcef159b501 Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 7 Jul 2023 08:22:53 -0500 Subject: [PATCH 079/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 2bfda709..e7719ac5 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -33,10 +33,18 @@ jobs: mkdir $env:RUNNER_TOOL_CACHE - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - name: Check Python Install + run: | + echo $AGENT_TOOLSDIRECTORY + echo $RUNNER_TOOL_CACHE + ls $AGENT_TOOLSDIRECTORY + python -c "import os; [print(f'{v}: {k}') for v,k in os.environ.items()];" + python -c "import os, sys; print(os.path.dirname(sys.executable))" + # Needed to compile keyring library # Install taken from keyring library: # https://github.com/hwchen/keyring-rs/blob/v0.10.1/.github/workflows/ci.yaml#L80-L84 From 2685b45cfe4159f6298eee70219a9e4bf3ca71f4 Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 7 Jul 2023 14:33:12 -0500 Subject: [PATCH 080/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index e7719ac5..269f74f9 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -31,17 +31,23 @@ jobs: $env:RUNNER_TOOL_CACHE = '${{ github.workspace }}' | Split-Path | Join-Path -ChildPath o2_GA_tools $env:AGENT_TOOLSDIRECTORY = $env:RUNNER_TOOL_CACHE mkdir $env:RUNNER_TOOL_CACHE + echo $env:AGENT_TOOLSDIRECTORY + echo $env:RUNNER_TOOL_CACHE + ls $env:AGENT_TOOLSDIRECTORY + echo "RUNNER_TOOL_CACHE=$env:RUNNER_TOOL_CACHE" >> $GITHUB_ENV + echo "AGENT_TOOLSDIRECTORY=$env:AGENT_TOOLSDIRECTORY" >> $GITHUB_ENV - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Check Python Install + - name: Check Python Install (Windows-Only) + if: matrix.os == 'windows-latest' run: | - echo $AGENT_TOOLSDIRECTORY - echo $RUNNER_TOOL_CACHE - ls $AGENT_TOOLSDIRECTORY + echo $env:AGENT_TOOLSDIRECTORY + echo $env:RUNNER_TOOL_CACHE + ls $env:AGENT_TOOLSDIRECTORY python -c "import os; [print(f'{v}: {k}') for v,k in os.environ.items()];" python -c "import os, sys; print(os.path.dirname(sys.executable))" From 3c6e3855392525de4f7db7dced7e53773529ec65 Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 7 Jul 2023 17:06:22 -0500 Subject: [PATCH 081/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 269f74f9..c7d29604 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -34,11 +34,23 @@ jobs: echo $env:AGENT_TOOLSDIRECTORY echo $env:RUNNER_TOOL_CACHE ls $env:AGENT_TOOLSDIRECTORY + echo "RUNNER_TOOL_CACHE=$env:RUNNER_TOOL_CACHE" + echo "AGENT_TOOLSDIRECTORY=$env:AGENT_TOOLSDIRECTORY" echo "RUNNER_TOOL_CACHE=$env:RUNNER_TOOL_CACHE" >> $GITHUB_ENV echo "AGENT_TOOLSDIRECTORY=$env:AGENT_TOOLSDIRECTORY" >> $GITHUB_ENV + - name: Check ENV Variables (Windows-Only) + if: matrix.os == 'windows-latest' + run: | + echo $env:AGENT_TOOLSDIRECTORY + echo $env:RUNNER_TOOL_CACHE + + - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v4 + env: + RUNNER_TOOL_CACHE: D:\a\o2\o2_GA_tools + AGENT_TOOLSDIRECTORY: D:\a\o2\o2_GA_tools with: python-version: ${{ matrix.python-version }} From dd92cf865010a1f809e12ed6044e1760cb34c175 Mon Sep 17 00:00:00 2001 From: Corey Date: Fri, 7 Jul 2023 22:17:00 -0500 Subject: [PATCH 082/200] Continued GA Debug --- .github/workflows/regression_test.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index c7d29604..2237f47e 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -44,19 +44,29 @@ jobs: run: | echo $env:AGENT_TOOLSDIRECTORY echo $env:RUNNER_TOOL_CACHE - + echo ${{ env.RUNNER_TOOL_CACHE }} + echo ${{ env.AGENT_TOOLSDIRECTORY }} - name: Setup Python ${{ matrix.python-version }} + if: matrix.os != 'windows-latest' + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Python ${{ matrix.python-version }} + if: matrix.os == 'windows-latest' uses: actions/setup-python@v4 env: - RUNNER_TOOL_CACHE: D:\a\o2\o2_GA_tools - AGENT_TOOLSDIRECTORY: D:\a\o2\o2_GA_tools + RUNNER_TOOL_CACHE: ${{ env.RUNNER_TOOL_CACHE }} + AGENT_TOOLSDIRECTORY: ${{ env.AGENT_TOOLSDIRECTORY }} with: python-version: ${{ matrix.python-version }} - name: Check Python Install (Windows-Only) if: matrix.os == 'windows-latest' run: | + echo ${{ env.RUNNER_TOOL_CACHE }} + echo ${{ env.AGENT_TOOLSDIRECTORY }} echo $env:AGENT_TOOLSDIRECTORY echo $env:RUNNER_TOOL_CACHE ls $env:AGENT_TOOLSDIRECTORY From 8d885d36f8337f0895c837478354a721fe46ea22 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 8 Jul 2023 07:40:16 -0500 Subject: [PATCH 083/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 2237f47e..81e239cb 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -44,8 +44,8 @@ jobs: run: | echo $env:AGENT_TOOLSDIRECTORY echo $env:RUNNER_TOOL_CACHE - echo ${{ env.RUNNER_TOOL_CACHE }} - echo ${{ env.AGENT_TOOLSDIRECTORY }} + echo $RUNNER_TOOL_CACHE + echo $AGENT_TOOLSDIRECTORY - name: Setup Python ${{ matrix.python-version }} if: matrix.os != 'windows-latest' @@ -65,8 +65,8 @@ jobs: - name: Check Python Install (Windows-Only) if: matrix.os == 'windows-latest' run: | - echo ${{ env.RUNNER_TOOL_CACHE }} - echo ${{ env.AGENT_TOOLSDIRECTORY }} + echo $RUNNER_TOOL_CACHE + echo $AGENT_TOOLSDIRECTORY echo $env:AGENT_TOOLSDIRECTORY echo $env:RUNNER_TOOL_CACHE ls $env:AGENT_TOOLSDIRECTORY From d1c471d4a016989d19572eeef24729e84f80f143 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 8 Jul 2023 07:59:01 -0500 Subject: [PATCH 084/200] GA: Continued Debug --- .github/workflows/regression_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 81e239cb..fd61960d 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -57,8 +57,8 @@ jobs: if: matrix.os == 'windows-latest' uses: actions/setup-python@v4 env: - RUNNER_TOOL_CACHE: ${{ env.RUNNER_TOOL_CACHE }} - AGENT_TOOLSDIRECTORY: ${{ env.AGENT_TOOLSDIRECTORY }} + RUNNER_TOOL_CACHE: D:\a\o2\o2_GA_tools + AGENT_TOOLSDIRECTORY: D:\a\o2\o2_GA_tools with: python-version: ${{ matrix.python-version }} From d54344ee4140e00b77ef2a03f22dbb0e8c7f8c94 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 8 Jul 2023 17:03:23 -0500 Subject: [PATCH 085/200] Some cleanup and add some context for Windows issue in GA --- .github/workflows/regression_test.yml | 5 +++++ test_apps/no_workspace/t_invocation_env.py | 16 ++++------------ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index fd61960d..86005503 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -25,6 +25,11 @@ jobs: override: true #components: rustfmt, clippy + # TODO Invocations: Currently some problem with poetry/pip on Windows where dependencies on drives/mounts separate + # from where the pyproject is located cannot be built. Can workaround this in Windows by updating the + # AGENT_TOOLSDIRECTORY/RUNNER_TOOL_CACHE environment variables, but I'm unable to get these to stick across steps + # in GA. Next few steps are all messiness to debug/work around that. + # Not an issue in Linux, so Windows only will be moved. linux will maintained across different drives. - name: Pre-Python Install Setup (Windows-Only) if: matrix.os == 'windows-latest' run: | diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index d7c43914..b92b11f0 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -1,5 +1,5 @@ # FOR_PR clean up -# Use the dev version but actual tests should be done through 'eval'. +# Use the local origen/origen_metal - actual tests should be done through 'eval', which will use the installed packages. import sys, pathlib p = pathlib.Path(__file__).parent.parent.parent.joinpath("python/origen") sys.path.append(str(p)) @@ -53,13 +53,9 @@ def header(self): return "--Origen Eval--" def eval_and_parse(self, code): - # out = CLI.global_cmds.eval.run(code, "-vv", run_opts={"return_details": True}) if isinstance(code, str): code = [code] - print(code) - # out = CLI.global_cmds.eval.run(*code, run_opts={"return_details": True, "check": False}) out = CLI.global_cmds.eval.run(*code) - print(out) out = out.split("\n") idx = out.index(self.header) return eval(out[idx+1]) @@ -75,16 +71,12 @@ def test_invocation_from_pytest(self): assert origen.status["invocation"] is None def test_pyproject_and_invocation_set(self): - # code = f"print('{self.header}'); print(origen.status)" - # code = r"print\(\\\"Origen\ Status:\\\"\) print\(origen.status\)" status = self.get_status() print(status) assert status["pyproject"] == self.target_pyproj_toml assert status["invocation"] == self.invocation def test_cli_location(self): - # code = f"print('{self.header}'); print(origen.status)" - # status = self.eval_and_parse(code) status = self.get_status() assert status['cli_location'] == self.cli_location @@ -113,6 +105,7 @@ def setup_method(cls): print(f"Moving pyproject {cls._pyproj_src_file} to {target}") shutil.copy(cls._pyproj_src_file, target) if cls.target_pyproj_dir: + subprocess.run(["pip", "--version"], check=True, cwd=cls.target_pyproj_dir) subprocess.run(["poetry", "--version"], check=True, cwd=cls.target_pyproj_dir) subprocess.run(["poetry", "install"], check=True, cwd=cls.target_pyproj_dir) @@ -140,7 +133,7 @@ def gen_pyproj(cls): )) return pyproj - # TEST_NEEDED invocation origen/metal package locations + # TEST_NEEDED Invocations: origen/metal package locations # class TestBareEnv(CLI): # @pytest.mark.parameterize( # [origen, origen._origen, origen_metal, origen._origen_metal], @@ -161,14 +154,13 @@ def get_plugin_names(self): else: return self.eval_and_parse(f"print('{self.header}'); print(list(origen.plugins.keys()))") + # TEST_NEEDED Invocations: check 'origen -h' in various contexts? @pytest.mark.skip def test_origen_h(self): fail def test_plugins(self): - # code = f"print('{self.header}'); print(list(origen.plugins.keys()))" pls = self.get_plugin_names() - # pls = self.eval_and_parse(code) if self.has_pls: # TODO consistent plugin loading assert set(pls) == {'pl_ext_cmds', 'test_apps_shared_test_helpers', 'python_plugin'} From 989d4e16ad07d11616d5b68e56d662de08a58252 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 8 Jul 2023 20:04:16 -0500 Subject: [PATCH 086/200] Minor cleanup --- test_apps/no_workspace/t_invocation_env.py | 1 - test_apps/no_workspace/test_user_install.py | 24 +-------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index b92b11f0..8340d1b4 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -1,4 +1,3 @@ -# FOR_PR clean up # Use the local origen/origen_metal - actual tests should be done through 'eval', which will use the installed packages. import sys, pathlib p = pathlib.Path(__file__).parent.parent.parent.joinpath("python/origen") diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index 0bf33202..c7030f70 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -1,24 +1,6 @@ import os from .t_invocation_env import T_InvocationEnv, no_workspace_test_dir, PyProjectSrc -# class TestGlobalNoPlugins(T_InvocationEnv): -# @classmethod -# def set_params(cls): -# cls.local_origen = True -# cls.has_pls = False -# cls.target_pyproj_dir = cls.site_packages_dir -# cls.invocation = PyProjectSrc.Global - -# class TestGlobalWithPluginsHigherLevel(T_InvocationEnv): -# @classmethod -# def set_params(cls): -# cls.local_origen = True -# cls.has_pls = False -# cls.target_pyproj_dir = cls.site_packages_dir.parent - -# class TestGlobalWithPlugins(T_InvocationEnv): -# ... - class TestUserInstall(T_InvocationEnv): user_install_dir = no_workspace_test_dir.joinpath("user_install") @@ -45,12 +27,8 @@ def test_exts_in_user_global_context(self): assert "Hi from python-plugin during 'eval'!" in out assert "Hi again from python-plugin during 'eval'!" in out -# class TestGlobalInstall(T_InvocationEnv): -# ... - -# class TestGlobalInstallWithPlugins(T_InvocationEnv): -# ... +# TEST_NEEDED User Invocations: Error Cases # @pytest.mark.skip # class TestErrorCases(T_InvocationEnv): # def test_origen_pkg_not_installed(self): From 5fd1692566db21ad2499fe124d94f12c63494cd9 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 10 Jul 2023 20:55:49 -0500 Subject: [PATCH 087/200] Add some error cases that may fall back to a global install --- .github/workflows/regression_test.yml | 5 + test_apps/no_workspace/t_invocation_env.py | 5 +- test_apps/no_workspace/test_user_install.py | 108 ++++++++++++++++++-- 3 files changed, 109 insertions(+), 9 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 86005503..f0aa61b1 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -346,3 +346,8 @@ jobs: - name: Run Global No-Plugins At CLI Dir working-directory: test_apps/no_workspace run: pytest test_global_install.py::TestGlobalInstallAtCliDir -vv + + # With global origen available, test user install errors which fall back to the global install + - name: Run User Install Errors - Falling Back To Global Install + working-directory: test_apps/no_workspace + run: pytest test_user_install.py::TestErrorCasesWithFallback -vv diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index 8340d1b4..56f9b453 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -45,6 +45,10 @@ def setup(cls): if not hasattr(cls, "file_based_evals"): cls.file_based_evals = False + if not hasattr(cls, "error_case"): + cls.error_case = False + cls.error_case_global_fallback = False + cls.cli_location = cls.cli_dir.joinpath(f"origen{'.exe' if origen.running_on_windows else ''}") @property @@ -71,7 +75,6 @@ def test_invocation_from_pytest(self): def test_pyproject_and_invocation_set(self): status = self.get_status() - print(status) assert status["pyproject"] == self.target_pyproj_toml assert status["invocation"] == self.invocation diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index c7030f70..66db4d06 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -1,5 +1,5 @@ import os -from .t_invocation_env import T_InvocationEnv, no_workspace_test_dir, PyProjectSrc +from .t_invocation_env import T_InvocationEnv, T_InvocationBaseTests, no_workspace_test_dir, PyProjectSrc class TestUserInstall(T_InvocationEnv): user_install_dir = no_workspace_test_dir.joinpath("user_install") @@ -12,6 +12,7 @@ def set_params(cls): cls.move_pyproject = False cls.invocation = PyProjectSrc.UserGlobal cls.cli_dir = cls.debug_cli_dir + cls.file_based_evals = True @classmethod def setup_method(cls): @@ -27,12 +28,103 @@ def test_exts_in_user_global_context(self): assert "Hi from python-plugin during 'eval'!" in out assert "Hi again from python-plugin during 'eval'!" in out +class TestErrorCasesWithFallback(): + class TestInvalidPyProjectDir(T_InvocationBaseTests): + invalid_install_dir = no_workspace_test_dir.joinpath("no_dir") -# TEST_NEEDED User Invocations: Error Cases -# @pytest.mark.skip -# class TestErrorCases(T_InvocationEnv): -# def test_origen_pkg_not_installed(self): -# fail + @classmethod + def set_params(cls): + cls.local_origen = True + cls.has_pls = True + cls.move_pyproject = False + cls.file_based_evals = True + cls.error_case = f"Errors encountered resolving pyproject: ORIGEN_PYPROJECT '{cls.invalid_install_dir}' does not exists!" + cls.error_case_global_fallback = True -# def test_missing_pyproject(self): -# fail + cls.invocation = None + cls.cli_dir = cls.site_cli_dir + cls.target_pyproj_dir = None + + + @classmethod + def setup_method(cls): + super().setup() + os.environ["ORIGEN_PYPROJECT"] = str(cls.invalid_install_dir) + + @classmethod + def teardown_method(cls): + del os.environ["ORIGEN_PYPROJECT"] + + def test_error_message(self): + out = self.global_cmds.eval.run("1==1") + errors = self.extract_logged_errors(out) + assert errors[0] == f"Errors encountered resolving pyproject: ORIGEN_PYPROJECT '{self.invalid_install_dir.as_posix()}' does not exists!" + assert errors[1] == "Dependency source has not been set - defaulting to global Python installation" + assert errors[2] == "Dependency source has not been set - defaulting to global Python installation" + assert len(errors) == 3 + + class TestMissingPyProject(T_InvocationBaseTests): + missing_pyproject = no_workspace_test_dir + + @classmethod + def set_params(cls): + cls.local_origen = True + cls.has_pls = True + cls.move_pyproject = False + cls.file_based_evals = True + cls.error_case = f"Errors encountered resolving pyproject: Could not locate pyproject.toml from ORIGEN_PYPROJECT {cls.missing_pyproject.joinpath('pyproject.toml').as_posix()}" + cls.error_case_global_fallback = True + + cls.invocation = None + cls.cli_dir = cls.site_cli_dir + cls.target_pyproj_dir = None + + @classmethod + def setup_method(cls): + super().setup() + os.environ["ORIGEN_PYPROJECT"] = str(cls.missing_pyproject) + + @classmethod + def teardown_method(cls): + del os.environ["ORIGEN_PYPROJECT"] + + def test_error_message(self): + out = self.global_cmds.eval.run("1==1") + errors = self.extract_logged_errors(out) + print(out) + assert errors[0] == f"Errors encountered resolving pyproject: Could not locate pyproject.toml from ORIGEN_PYPROJECT {self.missing_pyproject.joinpath('pyproject.toml').as_posix()}" + assert errors[1] == "Dependency source has not been set - defaulting to global Python installation" + assert errors[2] == "Dependency source has not been set - defaulting to global Python installation" + assert len(errors) == 3 + + class TestMalformedPyProject(): + # Use the template pyproject as an example of a malformed one + malformed_pyproject = no_workspace_test_dir.joinpath("templates") + + @classmethod + def set_params(cls): + cls.local_origen = True + cls.has_pls = True + cls.move_pyproject = False + cls.file_based_evals = True + + cls.invocation = None + cls.cli_dir = cls.site_cli_dir + cls.target_pyproj_dir = None + + @classmethod + def setup_method(cls): + os.environ["ORIGEN_PYPROJECT"] = str(cls.malformed_pyproject) + + @classmethod + def teardown_method(cls): + del os.environ["ORIGEN_PYPROJECT"] + + def test_error_message(self): + # Pyproject found but malformed should print the poetry errors as it tries to run. + # Should not fall back to global install, even if its available. Pyproject should be fixed. + out = T_InvocationBaseTests.global_cmds.eval.run("1==1", run_opts={"return_details": True}) + err = f"Invalid TOML file {self.malformed_pyproject.joinpath('pyproject.toml')}" + assert err in out["stderr"] + errors = T_InvocationBaseTests.extract_logged_errors(out["stdout"]) + assert err in errors[1] From 86644439f4a122e447608672eb5c0b3ec5740598 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 10 Jul 2023 21:42:33 -0500 Subject: [PATCH 088/200] GA: Debug --- .github/workflows/regression_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index f0aa61b1..c7ff8761 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -283,7 +283,7 @@ jobs: - name: Run User-Global Invocation Tests working-directory: test_apps/no_workspace - run: pytest test_user_install.py -vv + run: pytest test_user_install.py::TestUserInstall -vv # TODO GA: Regressions: eventually want to move this into a poetry build step # For now, manually move the binary. Also keeps us from having to mess with the path across OSs From 97b369c3f5a5170fdfc354e42726fcc61231f5d2 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 11 Jul 2023 07:10:14 -0500 Subject: [PATCH 089/200] GA: Debug --- test_apps/no_workspace/test_user_install.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index 66db4d06..7bc24ddd 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -58,7 +58,7 @@ def teardown_method(cls): def test_error_message(self): out = self.global_cmds.eval.run("1==1") errors = self.extract_logged_errors(out) - assert errors[0] == f"Errors encountered resolving pyproject: ORIGEN_PYPROJECT '{self.invalid_install_dir.as_posix()}' does not exists!" + assert errors[0] == f"Errors encountered resolving pyproject: ORIGEN_PYPROJECT '{self.invalid_install_dir}' does not exists!" assert errors[1] == "Dependency source has not been set - defaulting to global Python installation" assert errors[2] == "Dependency source has not been set - defaulting to global Python installation" assert len(errors) == 3 @@ -72,7 +72,7 @@ def set_params(cls): cls.has_pls = True cls.move_pyproject = False cls.file_based_evals = True - cls.error_case = f"Errors encountered resolving pyproject: Could not locate pyproject.toml from ORIGEN_PYPROJECT {cls.missing_pyproject.joinpath('pyproject.toml').as_posix()}" + cls.error_case = f"Errors encountered resolving pyproject: Could not locate pyproject.toml from ORIGEN_PYPROJECT {cls.missing_pyproject.joinpath('pyproject.toml')}" cls.error_case_global_fallback = True cls.invocation = None @@ -92,7 +92,7 @@ def test_error_message(self): out = self.global_cmds.eval.run("1==1") errors = self.extract_logged_errors(out) print(out) - assert errors[0] == f"Errors encountered resolving pyproject: Could not locate pyproject.toml from ORIGEN_PYPROJECT {self.missing_pyproject.joinpath('pyproject.toml').as_posix()}" + assert errors[0] == f"Errors encountered resolving pyproject: Could not locate pyproject.toml from ORIGEN_PYPROJECT {self.missing_pyproject.joinpath('pyproject.toml')}" assert errors[1] == "Dependency source has not been set - defaulting to global Python installation" assert errors[2] == "Dependency source has not been set - defaulting to global Python installation" assert len(errors) == 3 From 5fec1068094f0db74d5eef2bf47535a2d94ca9b0 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 11 Jul 2023 13:25:05 -0500 Subject: [PATCH 090/200] GA: Debug --- test_apps/no_workspace/test_user_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index 7bc24ddd..a7beea1e 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -124,7 +124,7 @@ def test_error_message(self): # Pyproject found but malformed should print the poetry errors as it tries to run. # Should not fall back to global install, even if its available. Pyproject should be fixed. out = T_InvocationBaseTests.global_cmds.eval.run("1==1", run_opts={"return_details": True}) - err = f"Invalid TOML file {self.malformed_pyproject.joinpath('pyproject.toml')}" + err = f"Invalid TOML file {self.malformed_pyproject.joinpath('pyproject.toml').as_posix()}" assert err in out["stderr"] errors = T_InvocationBaseTests.extract_logged_errors(out["stdout"]) assert err in errors[1] From a6fd4b039c86ee079fd50213bdee324ceb9b846c Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 11 Jul 2023 21:01:45 -0500 Subject: [PATCH 091/200] See about moving Python version to repo variable --- .github/workflows/regression_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index c7ff8761..33fc9fb4 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -6,7 +6,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python-version: [3.7, 3.8, 3.9, 3.10.5] + python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} runs-on: ${{ matrix.os }} env: From 1b0bc2dff98406a7d484b6807e2fa070fcffac1b Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 12 Jul 2023 08:02:41 -0500 Subject: [PATCH 092/200] Move more into repo variables --- .github/workflows/regression_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 33fc9fb4..295ae2f6 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: ${{ fromJSON(vars.SUPPORTED_OS) }} python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} runs-on: ${{ matrix.os }} @@ -21,7 +21,7 @@ jobs: - name: Install Rust uses: actions-rs/toolchain@v1 with: - toolchain: "nightly-2022-05-17" + toolchain: ${{ fromJSON(vars.RUST_VERSION) }} override: true #components: rustfmt, clippy From 367ec1a49d6e065493657533e8e450a567c0b52a Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 12 Jul 2023 17:01:29 -0500 Subject: [PATCH 093/200] Try new rust install as current one causes deprecation warnings and appears unmaintained --- .github/workflows/regression_test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 295ae2f6..ad70f539 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -19,11 +19,10 @@ jobs: git --version - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ fromJSON(vars.RUST_VERSION) }} - override: true - #components: rustfmt, clippy + - run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} # TODO Invocations: Currently some problem with poetry/pip on Windows where dependencies on drives/mounts separate # from where the pyproject is located cannot be built. Can workaround this in Windows by updating the From 3658eb4c51f2abe84885fbc2190f594a221a3c83 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 12 Jul 2023 18:06:45 -0500 Subject: [PATCH 094/200] GA: Debug New Rust Setup --- .github/workflows/regression_test.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index ad70f539..b08af082 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -22,7 +22,14 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ fromJSON(vars.RUST_VERSION) }} - - run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} + + - name: Override Project Rust Version + run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} + + - name: Check Rust Version + run: | + rustc --version + cargo --version # TODO Invocations: Currently some problem with poetry/pip on Windows where dependencies on drives/mounts separate # from where the pyproject is located cannot be built. Can workaround this in Windows by updating the From 70369bd11a700faae9abac85398c7e359731e451 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 12 Jul 2023 20:00:53 -0500 Subject: [PATCH 095/200] GA: Debug & Update checkout version --- .github/workflows/regression_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index b08af082..fc5670a6 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -12,7 +12,7 @@ jobs: env: RUST_BACKTRACE: full steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Show Git Version run : | @@ -22,6 +22,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: ${{ fromJSON(vars.RUST_VERSION) }} + rustflags: - name: Override Project Rust Version run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} From cb28b99d681fa4b33622fc5f48ece7996ffa96a1 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 15 Jul 2023 21:04:11 -0500 Subject: [PATCH 096/200] Update to pyo3 17.3 --- rust/origen/Cargo.toml | 2 +- rust/origen_metal/Cargo.toml | 2 +- rust/origen_metal/src/error.rs | 44 +++---- rust/pyapi/Cargo.lock | 59 ++++------ rust/pyapi/Cargo.toml | 2 +- rust/pyapi/src/application/mod.rs | 7 +- rust/pyapi/src/dut.rs | 20 ++-- rust/pyapi/src/file_handler.rs | 2 +- rust/pyapi/src/lib.rs | 46 +++----- rust/pyapi/src/pins.rs | 23 ++-- rust/pyapi/src/pins/pin_collection.rs | 4 +- rust/pyapi/src/pins/pin_group.rs | 4 +- rust/pyapi/src/producer.rs | 12 +- rust/pyapi/src/prog_gen/interface.rs | 7 +- rust/pyapi/src/prog_gen/mod.rs | 12 +- rust/pyapi/src/registers.rs | 16 ++- rust/pyapi/src/registers/bit_collection.rs | 2 +- rust/pyapi/src/services.rs | 14 +-- .../src/standard_sub_blocks/arm_debug.rs | 16 ++- rust/pyapi/src/standard_sub_blocks/mod.rs | 11 +- rust/pyapi/src/tester.rs | 16 ++- rust/pyapi/src/tester_apis/mod.rs | 9 +- rust/pyapi/src/timesets.rs | 27 ++--- rust/pyapi/src/utility/ldaps.rs | 2 +- rust/pyapi/src/utility/linter/mod.rs | 5 +- rust/pyapi/src/utility/mod.rs | 48 ++++---- rust/pyapi/src/utility/publisher/mod.rs | 7 +- rust/pyapi/src/utility/release_scribe/mod.rs | 8 ++ rust/pyapi/src/utility/results.rs | 11 +- .../pyapi/src/utility/revision_control/mod.rs | 7 +- rust/pyapi/src/utility/sessions.rs | 7 +- rust/pyapi/src/utility/unit_testers/mod.rs | 9 +- rust/pyapi/src/utility/website/mod.rs | 5 +- rust/pyapi_metal/Cargo.lock | 32 ++++-- rust/pyapi_metal/Cargo.toml | 2 +- rust/pyapi_metal/src/_helpers/macros.rs | 8 ++ rust/pyapi_metal/src/_helpers/mod.rs | 9 +- rust/pyapi_metal/src/_helpers/typed_value.rs | 108 +++++++++--------- rust/pyapi_metal/src/framework/users.rs | 5 +- rust/pyapi_metal/src/lib.rs | 17 ++- .../src/utils/revision_control/status.rs | 16 ++- 41 files changed, 332 insertions(+), 331 deletions(-) create mode 100644 rust/pyapi_metal/src/_helpers/macros.rs diff --git a/rust/origen/Cargo.toml b/rust/origen/Cargo.toml index b244039f..a419a1bd 100644 --- a/rust/origen/Cargo.toml +++ b/rust/origen/Cargo.toml @@ -45,7 +45,7 @@ git2 = "0.13" num-bigint = {version = "0.4.0", features = ["serde"]} # Enabling this feature stops the CLI from depending on libpython. PYO3 is only included # in origen to enable conversion of an Origen error to a PyErr. -pyo3 = {version = "0.16.5", features = ["extension-module", "auto-initialize"]} +pyo3 = {version = "0.17.3", features = ["extension-module", "auto-initialize"]} chrono = "0.4.11" origen-core-support = { version = "0.1.0-dev.1", path = "./origen-core-support" } whoami = "0.8" # TODO diff --git a/rust/origen_metal/Cargo.toml b/rust/origen_metal/Cargo.toml index 0cf933e1..09b0c49b 100644 --- a/rust/origen_metal/Cargo.toml +++ b/rust/origen_metal/Cargo.toml @@ -19,7 +19,7 @@ time = "0.1" termcolor = "1" regex = "1" tempfile = "3" -pyo3 = {version = "0.16.5", features = ["extension-module"]} +pyo3 = {version = "0.17.3", features = ["extension-module"]} serde = {version = "1.0", features = ["derive"]} toml = "0.5" git2 = "0.13" diff --git a/rust/origen_metal/src/error.rs b/rust/origen_metal/src/error.rs index eb31eb5d..66b47080 100644 --- a/rust/origen_metal/src/error.rs +++ b/rust/origen_metal/src/error.rs @@ -36,28 +36,28 @@ impl std::convert::From for pyo3::PyErr { impl std::convert::From for Error { fn from(err: pyo3::PyErr) -> Self { - let gil = pyo3::Python::acquire_gil(); - let py = gil.python(); - Error::new(&format!( - "Encountered Exception '{}' with message: {}{}", - err.get_type(py).name().unwrap(), - { - let r = err.value(py).call_method0("__str__").unwrap(); - r.extract::().unwrap() - }, - { - let tb = err.traceback(py); - let m = py.import("traceback").unwrap(); - let temp = pyo3::types::PyTuple::new(py, &[tb]); - let et = m.call_method1("extract_tb", temp).unwrap(); - - let temp = pyo3::types::PyTuple::new(py, &[et]); - let text_list = m.call_method1("format_list", temp).unwrap(); - let text = text_list.extract::>().unwrap(); - - format!("\nWith traceback:\n{}", text.join("")) - } - )) + pyo3::Python::with_gil(|py| { + Error::new(&format!( + "Encountered Exception '{}' with message: {}{}", + err.get_type(py).name().unwrap(), + { + let r = err.value(py).call_method0("__str__").unwrap(); + r.extract::().unwrap() + }, + { + let tb = err.traceback(py); + let m = py.import("traceback").unwrap(); + let temp = pyo3::types::PyTuple::new(py, &[tb]); + let et = m.call_method1("extract_tb", temp).unwrap(); + + let temp = pyo3::types::PyTuple::new(py, &[et]); + let text_list = m.call_method1("format_list", temp).unwrap(); + let text = text_list.extract::>().unwrap(); + + format!("\nWith traceback:\n{}", text.join("")) + } + )) + }) } } diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index eeb1778b..0e5c04a0 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -587,16 +587,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ctor" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e98e2ad1a782e33928b96fc3948e7c355e5af34ba4de7670fe8bac2a3b2006d" -dependencies = [ - "quote 1.0.9", - "syn 1.0.74", -] - [[package]] name = "ctr" version = "0.6.0" @@ -1177,17 +1167,6 @@ dependencies = [ "polyval", ] -[[package]] -name = "ghost" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c813ffb63e8fd3df6f1ac3cc1ea392c7612ac2de4d0b44dcbfe03e5c4bf94a" -dependencies = [ - "proc-macro2 1.0.28", - "quote 1.0.9", - "syn 1.0.74", -] - [[package]] name = "gimli" version = "0.24.0" @@ -1488,13 +1467,9 @@ dependencies = [ [[package]] name = "inventory" -version = "0.2.3" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84344c6e0b90a9e2b6f3f9abe5cc74402684e348df7b32adca28747e0cef091a" -dependencies = [ - "ctor", - "ghost", -] +checksum = "c38a87a1e0e2752433cd4b26019a469112a25fb43b30f5ee9b3b898925c5a0f9" [[package]] name = "ipnet" @@ -1755,6 +1730,15 @@ version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.16" @@ -2627,14 +2611,15 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6302e85060011447471887705bb7838f14aba43fcb06957d823739a496b3dc" +checksum = "268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543" dependencies = [ "cfg-if 1.0.0", "indoc", "inventory", "libc", + "memoffset", "num-bigint 0.4.0", "parking_lot", "pyo3-build-config", @@ -2645,9 +2630,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b65b546c35d8a3b1b2f0ddbac7c6a569d759f357f2b9df884f5d6b719152c8" +checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8" dependencies = [ "once_cell", "target-lexicon", @@ -2655,9 +2640,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c275a07127c1aca33031a563e384ffdd485aee34ef131116fcd58e3430d1742b" +checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc" dependencies = [ "libc", "pyo3-build-config", @@ -2665,9 +2650,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284fc4485bfbcc9850a6d661d627783f18d19c2ab55880b021671c4ba83e90f7" +checksum = "94144a1266e236b1c932682136dc35a9dee8d3589728f68130c7c3861ef96b28" dependencies = [ "proc-macro2 1.0.28", "pyo3-macros-backend", @@ -2677,9 +2662,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bda0f58f73f5c5429693c96ed57f7abdb38fdfc28ae06da4101a257adb7faf" +checksum = "c8df9be978a2d2f0cdebabb03206ed73b11314701a5bfe71b0d753b81997777f" dependencies = [ "proc-macro2 1.0.28", "quote 1.0.9", diff --git a/rust/pyapi/Cargo.toml b/rust/pyapi/Cargo.toml index 73cc3ba5..f76d94ee 100644 --- a/rust/pyapi/Cargo.toml +++ b/rust/pyapi/Cargo.toml @@ -32,7 +32,7 @@ curl-sys = { version = "0.4.34", features = ["static-curl"] } openssl = { version = "0.10", features = ["vendored"] } [dependencies.pyo3] -version = "0.16.5" +version = "0.17.3" features = ["extension-module", "num-bigint", "multiple-pymethods", "auto-initialize"] [build-dependencies] diff --git a/rust/pyapi/src/application/mod.rs b/rust/pyapi/src/application/mod.rs index 08b1a11c..a945483d 100644 --- a/rust/pyapi/src/application/mod.rs +++ b/rust/pyapi/src/application/mod.rs @@ -9,9 +9,10 @@ use pyo3::prelude::*; use pyo3::types::{PyDict, PyTuple}; use std::path::{Path, PathBuf}; -#[pymodule] -pub fn application(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "application")?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/dut.rs b/rust/pyapi/src/dut.rs index 4184344f..5a5824c6 100644 --- a/rust/pyapi/src/dut.rs +++ b/rust/pyapi/src/dut.rs @@ -6,10 +6,7 @@ use pyo3::prelude::*; use pyo3::types::{PyAny, PyBytes, PyDict, PyIterator, PyList, PySlice, PyTuple}; use pyo3::wrap_pymodule; -use crate::pins::__PYO3_PYMODULE_DEF_PINS; -use crate::registers::__PYO3_PYMODULE_DEF_REGISTERS; -use crate::timesets::__PYO3_PYMODULE_DEF_TIMESETS; - +//TODO is this needed/used? #[allow(dead_code)] pub fn get_pydut(py: Python) -> PyResult<&PyAny> { let locals = PyDict::new(py); @@ -17,14 +14,13 @@ pub fn get_pydut(py: Python) -> PyResult<&PyAny> { Ok(py.eval("origen.dut", Some(locals), None)?) } -/// Implements the module _origen.dut in Python which exposes all -/// DUT-related APIs -#[pymodule] -pub fn dut(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_wrapped(wrap_pymodule!(pins))?; - m.add_wrapped(wrap_pymodule!(registers))?; - m.add_wrapped(wrap_pymodule!(timesets))?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "dut")?; + subm.add_class::()?; + crate::pins::define(py, subm)?; + crate::registers::define(py, subm)?; + crate::timesets::define(py, subm)?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/file_handler.rs b/rust/pyapi/src/file_handler.rs index edb0447a..436b0541 100644 --- a/rust/pyapi/src/file_handler.rs +++ b/rust/pyapi/src/file_handler.rs @@ -2,7 +2,7 @@ use origen::core::file_handler::FileHandler as CoreFileHandler; use pyo3::prelude::*; use pyo3::wrap_pyfunction; -pub fn define(m: &PyModule) -> PyResult<()> { +pub fn define(_py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(file_handler))?; Ok(()) } diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index fccc92f3..8bc88565 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -28,7 +28,7 @@ mod application; mod producer; mod prog_gen; mod standard_sub_blocks; -mod tester; +pub mod tester; mod tester_apis; #[macro_use] mod utility; @@ -51,19 +51,6 @@ use utility::location::Location; use paste::paste; use origen::core::status::DependencySrc; -use crate::dut::__PYO3_PYMODULE_DEF_DUT; -use crate::tester::__PYO3_PYMODULE_DEF_TESTER; -use crate::tester_apis::__PYO3_PYMODULE_DEF_TESTER_APIS; -use crate::application::__PYO3_PYMODULE_DEF_APPLICATION; -use crate::prog_gen::interface::__PYO3_PYMODULE_DEF_INTERFACE; -use crate::producer::__PYO3_PYMODULE_DEF_PRODUCER; -use crate::services::__PYO3_PYMODULE_DEF_SERVICES; -use crate::utility::__PYO3_PYMODULE_DEF_UTILITY; -use crate::standard_sub_blocks::__PYO3_PYMODULE_DEF_STANDARD_SUB_BLOCKS; -use crate::prog_gen::__PYO3_PYMODULE_DEF_PROG_GEN; - -use pyapi_metal::__PYO3_PYMODULE_DEF__ORIGEN_METAL; - pub mod built_info { // The file has been placed there by the build script. include!(concat!(env!("OUT_DIR"), "/built.rs")); @@ -99,18 +86,17 @@ fn _origen(py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(set_operation))?; m.add_wrapped(wrap_pyfunction!(boot_users))?; - m.add_wrapped(wrap_pymodule!(dut))?; - m.add_wrapped(wrap_pymodule!(tester))?; - m.add_wrapped(wrap_pymodule!(application))?; - m.add_wrapped(wrap_pymodule!(interface))?; - m.add_wrapped(wrap_pymodule!(producer))?; - m.add_wrapped(wrap_pymodule!(services))?; - m.add_wrapped(wrap_pymodule!(utility))?; - m.add_wrapped(wrap_pymodule!(tester_apis))?; - m.add_wrapped(wrap_pymodule!(standard_sub_blocks))?; - m.add_wrapped(wrap_pymodule!(prog_gen))?; - - file_handler::define(m)?; + dut::define(py, m)?; + tester::define(py, m)?; + application::define(py, m)?; + prog_gen::interface::define(py, m)?; + producer::define(py, m)?; + services::define(py, m)?; + utility::define(py, m)?; + tester_apis::define(py, m)?; + standard_sub_blocks::define(py, m)?; + prog_gen::define(py, m)?; + file_handler::define(py, m)?; plugins::define(py, m)?; extensions::define(py, m)?; current_command::define(py, m)?; @@ -118,7 +104,7 @@ fn _origen(py: Python, m: &PyModule) -> PyResult<()> { // Compile the _origen_metal library along with this one // to allow re-use from that library - m.add_wrapped(wrap_pymodule!(_origen_metal))?; + pyapi_metal::define(py, m)?; m.setattr(current_command::ATTR_NAME, py.None())?; Ok(()) } @@ -802,7 +788,7 @@ pub fn boot_users(py: Python) -> PyResult // Set the data lookup hierarchy if let Some(hierarchy) = &crate::ORIGEN_CONFIG.user__data_lookup_hierarchy { - match users.set_data_lookup_hierarchy(hierarchy.to_owned()) { + match users.apply_data_lookup_hierarchy(hierarchy.to_owned()) { Ok(_) => {} Err(e) => { om::log_error!( @@ -811,7 +797,7 @@ pub fn boot_users(py: Python) -> PyResult ); om::log_error!("{}", e); om::log_error!("Forcing empty dataset lookup hierarchy..."); - users.set_data_lookup_hierarchy(vec![])?; + users.apply_data_lookup_hierarchy(vec![])?; } } } else { @@ -820,7 +806,7 @@ pub fn boot_users(py: Python) -> PyResult { // The config can only be read as an unordered hashmap. If multiple datasets are given, // clear the hierarchy if not explicitly given, otherwise will get non-deterministic behavior - users.set_data_lookup_hierarchy(vec![])?; + users.apply_data_lookup_hierarchy(vec![])?; } } diff --git a/rust/pyapi/src/pins.rs b/rust/pyapi/src/pins.rs index 227a72ed..6eda76e5 100644 --- a/rust/pyapi/src/pins.rs +++ b/rust/pyapi/src/pins.rs @@ -28,16 +28,19 @@ use pin_header::{PinHeader, PinHeaderContainer}; #[allow(unused_imports)] use pyo3::types::{PyAny, PyBytes, PyDict, PyIterator, PyList, PyTuple}; -#[pymodule] -/// Implements the module _origen.pins in Python -pub fn pins(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "pins")?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + + pyapi_metal::alias_method_apply_to_set!(subm, "PinGroup", "actions"); + pyapi_metal::alias_method_apply_to_set!(subm, "PinCollection", "actions"); + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/pins/pin_collection.rs b/rust/pyapi/src/pins/pin_collection.rs index 22940d7e..6eefbd37 100644 --- a/rust/pyapi/src/pins/pin_collection.rs +++ b/rust/pyapi/src/pins/pin_collection.rs @@ -46,12 +46,12 @@ impl PinCollection { impl PinCollection { #[setter] fn actions(slf: PyRefMut, actions: &PyAny) -> PyResult<()> { - Self::set_actions(slf, actions, None)?; + Self::apply_actions(slf, actions, None)?; Ok(()) } #[args(kwargs = "**")] - fn set_actions( + fn apply_actions( slf: PyRefMut, actions: &PyAny, kwargs: Option<&PyDict>, diff --git a/rust/pyapi/src/pins/pin_group.rs b/rust/pyapi/src/pins/pin_group.rs index a4b2d5c3..d895539c 100644 --- a/rust/pyapi/src/pins/pin_group.rs +++ b/rust/pyapi/src/pins/pin_group.rs @@ -75,12 +75,12 @@ impl PinGroup { #[setter] fn actions(slf: PyRef, actions: &PyAny) -> PyResult<()> { - Self::set_actions(slf, actions, None)?; + Self::apply_actions(slf, actions, None)?; Ok(()) } #[args(kwargs = "**")] - fn set_actions( + fn apply_actions( slf: PyRef, actions: &PyAny, kwargs: Option<&PyDict>, diff --git a/rust/pyapi/src/producer.rs b/rust/pyapi/src/producer.rs index 52feaca8..04c822b3 100644 --- a/rust/pyapi/src/producer.rs +++ b/rust/pyapi/src/producer.rs @@ -1,12 +1,12 @@ use pyo3::prelude::*; use std::path::{Path, PathBuf}; -#[pymodule] -pub fn producer(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "producer")?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/prog_gen/interface.rs b/rust/pyapi/src/prog_gen/interface.rs index 7f236367..6f369dde 100644 --- a/rust/pyapi/src/prog_gen/interface.rs +++ b/rust/pyapi/src/prog_gen/interface.rs @@ -12,9 +12,10 @@ use regex::Regex; use std::path::PathBuf; use std::str::FromStr; -#[pymodule] -pub fn interface(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "interface")?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/prog_gen/mod.rs b/rust/pyapi/src/prog_gen/mod.rs index a125c1aa..76582093 100644 --- a/rust/pyapi/src/prog_gen/mod.rs +++ b/rust/pyapi/src/prog_gen/mod.rs @@ -25,12 +25,12 @@ use std::thread; pub use test::Test; pub use test_invocation::TestInvocation; -#[pymodule] -/// Implements the module _origen.prog_gen in Python -pub fn prog_gen(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(start_new_flow))?; - m.add_wrapped(wrap_pyfunction!(end_flow))?; - m.add_wrapped(wrap_pyfunction!(render))?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "prog_gen")?; + subm.add_wrapped(wrap_pyfunction!(start_new_flow))?; + subm.add_wrapped(wrap_pyfunction!(end_flow))?; + subm.add_wrapped(wrap_pyfunction!(render))?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/registers.rs b/rust/pyapi/src/registers.rs index 2e5264e8..0176ef7e 100644 --- a/rust/pyapi/src/registers.rs +++ b/rust/pyapi/src/registers.rs @@ -11,15 +11,13 @@ use register::{Field, FieldEnum, ResetVal}; use origen::core::model::registers::register::Register; pub use register_collection::RegisterCollection; -#[pymodule] -/// Implements the module _origen.registers in Python -pub fn registers(_py: Python, m: &PyModule) -> PyResult<()> { - // Used to pass register field info from Python to Rust when defining regs - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - - m.add_wrapped(wrap_pyfunction!(create))?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "registers")?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_wrapped(wrap_pyfunction!(create))?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/registers/bit_collection.rs b/rust/pyapi/src/registers/bit_collection.rs index b27d6d67..8bd61108 100644 --- a/rust/pyapi/src/registers/bit_collection.rs +++ b/rust/pyapi/src/registers/bit_collection.rs @@ -1155,7 +1155,7 @@ impl BitCollection { if mp == "dut" { dut_checked = true; } - if ops.iter().all(|op| m.hasattr(op).unwrap()) { + if ops.iter().all(|op| m.hasattr(op.as_str()).unwrap()) { // Found the controller. Return this. return Ok(Some(m.to_object(py))); } else { diff --git a/rust/pyapi/src/services.rs b/rust/pyapi/src/services.rs index 7265562f..56046443 100644 --- a/rust/pyapi/src/services.rs +++ b/rust/pyapi/src/services.rs @@ -5,13 +5,11 @@ pub mod swd; use pyo3::prelude::*; -#[pymodule] -/// Implements the module _origen.services in Python -pub fn services(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - // m.add_class::()?; - +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "services")?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/standard_sub_blocks/arm_debug.rs b/rust/pyapi/src/standard_sub_blocks/arm_debug.rs index 23bb9313..1562a18b 100644 --- a/rust/pyapi/src/standard_sub_blocks/arm_debug.rs +++ b/rust/pyapi/src/standard_sub_blocks/arm_debug.rs @@ -12,15 +12,13 @@ use pyo3::prelude::*; use pyo3::types::{PyAny, PyDict, PyTuple, PyType}; use pyo3::ToPyObject; -#[pymodule] -/// Implements the module _origen.standard_sub_blocks in Python and ties together -/// the PyAPI with the Rust backend. -/// Put another way, this is the Python-side controller for the backend-side model/controller. -pub fn arm_debug(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "arm_debug")?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/standard_sub_blocks/mod.rs b/rust/pyapi/src/standard_sub_blocks/mod.rs index a34dacea..de211ca8 100644 --- a/rust/pyapi/src/standard_sub_blocks/mod.rs +++ b/rust/pyapi/src/standard_sub_blocks/mod.rs @@ -3,12 +3,9 @@ mod arm_debug; use pyo3::prelude::*; use pyo3::wrap_pymodule; -use crate::standard_sub_blocks::arm_debug::__PYO3_PYMODULE_DEF_ARM_DEBUG; - -#[pymodule] -/// Implements the module _origen.standard_sub_blocks in Python -pub fn standard_sub_blocks(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_wrapped(wrap_pymodule!(arm_debug))?; - +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "standard_sub_blocks")?; + arm_debug::define(py, subm)?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/tester.rs b/rust/pyapi/src/tester.rs index e7afbd3b..1ae8f17d 100644 --- a/rust/pyapi/src/tester.rs +++ b/rust/pyapi/src/tester.rs @@ -9,9 +9,13 @@ use pyo3::prelude::*; use pyo3::types::{PyAny, PyDict, PyTuple}; use std::collections::HashMap; -#[pymodule] -pub fn tester(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "tester")?; + subm.add_class::()?; + pyapi_metal::alias_method_apply_to_set!(subm, "PyTester", "timeset"); + pyapi_metal::alias_method_apply_to_set!(subm, "PyTester", "pin_header"); + + m.add_submodule(subm)?; Ok(()) } @@ -27,7 +31,7 @@ pub struct PyTester { #[pymethods] impl PyTester { #[new] - fn new() -> PyResult { + fn new(py: Python) -> PyResult { origen::tester().init()?; Ok(PyTester { python_testers: HashMap::new(), @@ -216,7 +220,7 @@ impl PyTester { /// * :meth:`timeset` /// * :class:`_origen.dut.timesets.Timeset` /// * :ref:`Timing ` - fn set_timeset(&self, timeset: &PyAny) -> PyResult { + fn apply_timeset(&self, timeset: &PyAny) -> PyResult { self.timeset(timeset)?; self.get_timeset() } @@ -277,7 +281,7 @@ impl PyTester { Ok(()) } - fn set_pin_header(&self, pin_header: &PyAny) -> PyResult { + fn apply_pin_header(&self, pin_header: &PyAny) -> PyResult { self.pin_header(pin_header)?; self.get_pin_header() } diff --git a/rust/pyapi/src/tester_apis/mod.rs b/rust/pyapi/src/tester_apis/mod.rs index 01bc4df3..fb8494bc 100644 --- a/rust/pyapi/src/tester_apis/mod.rs +++ b/rust/pyapi/src/tester_apis/mod.rs @@ -7,9 +7,10 @@ pub use v93k::V93K; use pyo3::prelude::*; -#[pymodule] -pub fn tester_apis(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "tester_apis")?; + subm.add_class::()?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/timesets.rs b/rust/pyapi/src/timesets.rs index 652b242c..cd58b7de 100644 --- a/rust/pyapi/src/timesets.rs +++ b/rust/pyapi/src/timesets.rs @@ -24,19 +24,20 @@ use timeset_container::{ EventContainer, TimesetContainer, WaveContainer, WaveGroupContainer, WavetableContainer, }; -#[pymodule] -pub fn timesets(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "timesets")?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/utility/ldaps.rs b/rust/pyapi/src/utility/ldaps.rs index 403d4ad6..f9c9e42f 100644 --- a/rust/pyapi/src/utility/ldaps.rs +++ b/rust/pyapi/src/utility/ldaps.rs @@ -4,7 +4,7 @@ use pyapi_metal::utils::ldap::import_frontend_ldap; use pyo3::prelude::*; use pyo3::wrap_pyfunction; -pub fn define(m: &PyModule) -> PyResult<()> { +pub fn define(_py: Python, m: &PyModule) -> PyResult<()> { m.add_wrapped(wrap_pyfunction!(ldaps))?; m.add_wrapped(wrap_pyfunction!(boot_ldaps))?; Ok(()) diff --git a/rust/pyapi/src/utility/linter/mod.rs b/rust/pyapi/src/utility/linter/mod.rs index 18f75a8c..2924302f 100644 --- a/rust/pyapi/src/utility/linter/mod.rs +++ b/rust/pyapi/src/utility/linter/mod.rs @@ -2,7 +2,8 @@ pub mod _frontend; use pyo3::prelude::*; -#[pymodule] -pub fn linter(_py: Python, _m: &PyModule) -> PyResult<()> { +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "linter")?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/utility/mod.rs b/rust/pyapi/src/utility/mod.rs index e8668ba2..5bde2587 100644 --- a/rust/pyapi/src/utility/mod.rs +++ b/rust/pyapi/src/utility/mod.rs @@ -28,33 +28,25 @@ use std::collections::HashMap; use std::path::PathBuf; use pyapi_metal::PyOutcome; -use crate::utility::revision_control::__PYO3_PYMODULE_DEF_REVISION_CONTROL; -use crate::utility::unit_testers::__PYO3_PYMODULE_DEF_UNIT_TESTERS; -use crate::utility::publisher::__PYO3_PYMODULE_DEF_PUBLISHER; -use crate::utility::linter::__PYO3_PYMODULE_DEF_LINTER; -use crate::utility::release_scribe::__PYO3_PYMODULE_DEF_RELEASE_SCRIBE; -use crate::utility::results::__PYO3_PYMODULE_DEF_RESULTS; -use crate::utility::website::__PYO3_PYMODULE_DEF_WEBSITE; -use crate::utility::sessions::__PYO3_PYMODULE_DEF_SESSIONS; - -#[pymodule] -pub fn utility(py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; - m.add_wrapped(wrap_pyfunction!(reverse_bits))?; - m.add_wrapped(wrap_pymodule!(sessions))?; - m.add_wrapped(wrap_pymodule!(revision_control))?; - m.add_wrapped(wrap_pymodule!(unit_testers))?; - m.add_wrapped(wrap_pymodule!(publisher))?; - m.add_wrapped(wrap_pymodule!(linter))?; - m.add_wrapped(wrap_pymodule!(release_scribe))?; - m.add_wrapped(wrap_pymodule!(results))?; - m.add_wrapped(wrap_pymodule!(website))?; - m.add_wrapped(wrap_pyfunction!(exec))?; - m.add_wrapped(wrap_pyfunction!(dispatch_workflow))?; - ldaps::define(m)?; - mailer::define(py, m)?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "utility")?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_wrapped(wrap_pyfunction!(reverse_bits))?; + subm.add_wrapped(wrap_pyfunction!(exec))?; + subm.add_wrapped(wrap_pyfunction!(dispatch_workflow))?; + sessions::define(py, subm)?; + revision_control::define(py, subm)?; + unit_testers::define(py, subm)?; + publisher::define(py, subm)?; + linter::define(py, subm)?; + release_scribe::define(py, subm)?; + results::define(py, subm)?; + website::define(py, subm)?; + ldaps::define(py, subm)?; + mailer::define(py, subm)?; + m.add_submodule(subm)?; Ok(()) } @@ -114,7 +106,7 @@ fn new_obj(py: Python, class: &str, kwargs: &PyDict) -> PyResult { locals.set_item("kwargs", kwargs)?; let mut class_mod = ""; if let Some(m) = split.get(1) { - locals.set_item("mod", py.import(m)?.to_object(py))?; + locals.set_item("mod", py.import(*m)?.to_object(py))?; class_mod = "mod." } diff --git a/rust/pyapi/src/utility/publisher/mod.rs b/rust/pyapi/src/utility/publisher/mod.rs index eba29772..d10af762 100644 --- a/rust/pyapi/src/utility/publisher/mod.rs +++ b/rust/pyapi/src/utility/publisher/mod.rs @@ -6,9 +6,10 @@ use origen::STATUS; use pyo3::prelude::*; use pyo3::wrap_pyfunction; -#[pymodule] -pub fn publisher(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(app_publisher))?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "publisher")?; + subm.add_wrapped(wrap_pyfunction!(app_publisher))?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/utility/release_scribe/mod.rs b/rust/pyapi/src/utility/release_scribe/mod.rs index 81ff932d..b83e3d3e 100644 --- a/rust/pyapi/src/utility/release_scribe/mod.rs +++ b/rust/pyapi/src/utility/release_scribe/mod.rs @@ -10,6 +10,14 @@ use pyo3::types::PyDict; use pyo3::wrap_pyfunction; use std::collections::HashMap; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "release_scribe")?; + subm.add_class::()?; + subm.add_wrapped(wrap_pyfunction!(app_release_scribe))?; + m.add_submodule(subm)?; + Ok(()) +} + #[pymodule] pub fn release_scribe(_py: Python, m: &PyModule) -> PyResult<()> { m.add_class::()?; diff --git a/rust/pyapi/src/utility/results.rs b/rust/pyapi/src/utility/results.rs index 4cb31d2f..01cc5ef4 100644 --- a/rust/pyapi/src/utility/results.rs +++ b/rust/pyapi/src/utility/results.rs @@ -14,11 +14,12 @@ macro_rules! incomplete_result_error { }}; } -#[pymodule] -pub fn results(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_class::()?; - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "results")?; + subm.add_class::()?; + subm.add_class::()?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/utility/revision_control/mod.rs b/rust/pyapi/src/utility/revision_control/mod.rs index 93a5e74f..e7da3009 100644 --- a/rust/pyapi/src/utility/revision_control/mod.rs +++ b/rust/pyapi/src/utility/revision_control/mod.rs @@ -9,9 +9,10 @@ use origen_metal::utils::revision_control::SupportedSystems; use crate::runtime_error; -#[pymodule] -pub fn revision_control(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_wrapped(wrap_pyfunction!(app_rc))?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "revision_control")?; + subm.add_wrapped(wrap_pyfunction!(app_rc))?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/utility/sessions.rs b/rust/pyapi/src/utility/sessions.rs index b20b32ee..79e6d729 100644 --- a/rust/pyapi/src/utility/sessions.rs +++ b/rust/pyapi/src/utility/sessions.rs @@ -6,9 +6,10 @@ use origen::{om, with_app_session, with_app_session_group}; use pyapi_metal::framework::sessions::{SessionGroup, SessionStore, Sessions}; use pyo3::prelude::*; -#[pymodule] -pub fn sessions(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "sessions")?; + subm.add_class::()?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/utility/unit_testers/mod.rs b/rust/pyapi/src/utility/unit_testers/mod.rs index 3b63c380..e7ad3852 100644 --- a/rust/pyapi/src/utility/unit_testers/mod.rs +++ b/rust/pyapi/src/utility/unit_testers/mod.rs @@ -9,10 +9,11 @@ use pyo3::wrap_pyfunction; use std::collections::HashMap; use origen_metal::{Outcome, OutcomeSubtypes}; -#[pymodule] -pub fn unit_testers(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - m.add_wrapped(wrap_pyfunction!(app_unit_tester))?; +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "unit_testers")?; + subm.add_class::()?; + subm.add_wrapped(wrap_pyfunction!(app_unit_tester))?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi/src/utility/website/mod.rs b/rust/pyapi/src/utility/website/mod.rs index 2f9f444a..f551dc06 100644 --- a/rust/pyapi/src/utility/website/mod.rs +++ b/rust/pyapi/src/utility/website/mod.rs @@ -2,7 +2,8 @@ pub mod _frontend; use pyo3::prelude::*; -#[pymodule] -pub fn website(_py: Python, _m: &PyModule) -> PyResult<()> { +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "website")?; + m.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi_metal/Cargo.lock b/rust/pyapi_metal/Cargo.lock index e3f07f2f..3e2d0beb 100644 --- a/rust/pyapi_metal/Cargo.lock +++ b/rust/pyapi_metal/Cargo.lock @@ -1199,6 +1199,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.16" @@ -1514,7 +1523,7 @@ dependencies = [ [[package]] name = "origen_metal" -version = "0.4.0" +version = "0.5.0" dependencies = [ "aes-gcm", "built", @@ -1732,13 +1741,14 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6302e85060011447471887705bb7838f14aba43fcb06957d823739a496b3dc" +checksum = "268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543" dependencies = [ "cfg-if 1.0.0", "indoc", "libc", + "memoffset", "num-bigint 0.4.3", "parking_lot", "pyo3-build-config", @@ -1749,9 +1759,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b65b546c35d8a3b1b2f0ddbac7c6a569d759f357f2b9df884f5d6b719152c8" +checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8" dependencies = [ "once_cell", "target-lexicon", @@ -1759,9 +1769,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c275a07127c1aca33031a563e384ffdd485aee34ef131116fcd58e3430d1742b" +checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc" dependencies = [ "libc", "pyo3-build-config", @@ -1769,9 +1779,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284fc4485bfbcc9850a6d661d627783f18d19c2ab55880b021671c4ba83e90f7" +checksum = "94144a1266e236b1c932682136dc35a9dee8d3589728f68130c7c3861ef96b28" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1781,9 +1791,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.16.5" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bda0f58f73f5c5429693c96ed57f7abdb38fdfc28ae06da4101a257adb7faf" +checksum = "c8df9be978a2d2f0cdebabb03206ed73b11314701a5bfe71b0d753b81997777f" dependencies = [ "proc-macro2", "quote", diff --git a/rust/pyapi_metal/Cargo.toml b/rust/pyapi_metal/Cargo.toml index d27e5208..d46bf402 100644 --- a/rust/pyapi_metal/Cargo.toml +++ b/rust/pyapi_metal/Cargo.toml @@ -23,7 +23,7 @@ curl-sys = { version = "0.4.34", features = ["static-curl"] } openssl = { version = "0.10", features = ["vendored"] } [dependencies.pyo3] -version = "0.16.5" +version = "0.17.3" features = ["extension-module", "num-bigint"] [build-dependencies] diff --git a/rust/pyapi_metal/src/_helpers/macros.rs b/rust/pyapi_metal/src/_helpers/macros.rs new file mode 100644 index 00000000..ab1f888b --- /dev/null +++ b/rust/pyapi_metal/src/_helpers/macros.rs @@ -0,0 +1,8 @@ +#[macro_export] +macro_rules! alias_method_apply_to_set { + ($m: expr, $cls: tt, $basename: tt) => {{ + let cls = $m.getattr($cls)?; + let func = cls.getattr(concat!("apply_", $basename))?; + cls.setattr(concat!("set_", $basename), func)?; + }}; +} diff --git a/rust/pyapi_metal/src/_helpers/mod.rs b/rust/pyapi_metal/src/_helpers/mod.rs index 69489c0f..6ea47502 100644 --- a/rust/pyapi_metal/src/_helpers/mod.rs +++ b/rust/pyapi_metal/src/_helpers/mod.rs @@ -9,6 +9,9 @@ pub mod config; #[macro_use] pub mod errors; +#[macro_use] +pub mod macros; + use crate::{pypath, runtime_error}; use indexmap::IndexMap; use pyo3::conversion::ToPyObject; @@ -53,9 +56,7 @@ pub fn new_py_obj<'p>( ) } -pub fn to_py_paths(paths: &Vec) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); +pub fn to_py_paths(py: Python, paths: &Vec) -> PyResult> { let mut retn: Vec = vec![]; for p in paths { retn.push(pypath!(py, format!("{}", p))); @@ -142,7 +143,7 @@ pub fn get_qualified_attr(s: &str) -> PyResult> { for component in remaining { current_str.push_str("."); current_str.push_str(component); - match PyModule::import(py, ¤t_str) { + match PyModule::import(py, &*current_str) { Ok(py_mod) => { current = py_mod.to_object(py); }, diff --git a/rust/pyapi_metal/src/_helpers/typed_value.rs b/rust/pyapi_metal/src/_helpers/typed_value.rs index e0387fc1..a37f4b63 100644 --- a/rust/pyapi_metal/src/_helpers/typed_value.rs +++ b/rust/pyapi_metal/src/_helpers/typed_value.rs @@ -12,69 +12,66 @@ pub fn typed_value_to_pyobj( key: Option<&str>, ) -> PyResult> { if let Some(d) = data { - let gil = Python::acquire_gil(); - let py = gil.python(); - match d { - TypedValue::None => Ok(None), - TypedValue::String(s) => Ok(Some(s.to_object(py))), - TypedValue::Usize(u) => Ok(Some(u.to_object(py))), - TypedValue::BigInt(big) => Ok(Some(big.to_object(py))), - TypedValue::BigUint(big) => Ok(Some(big.to_object(py))), - TypedValue::Bool(b) => Ok(Some(b.to_object(py))), - TypedValue::Float(f) => Ok(Some(f.to_object(py))), - TypedValue::Serialized(bytes, serializer, _class) => { - if let Some(s) = serializer { - if s == "Python-Pickle" { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let any = depickle(py, &bytes)?; - Ok(Some(any.into())) - } else if s == "Python-Frontend" { - let bytes = PyBytes::new(py, &bytes); - Ok(Some(bytes.into())) + Python::with_gil(|py| { + match d { + TypedValue::None => Ok(None), + TypedValue::String(s) => Ok(Some(s.to_object(py))), + TypedValue::Usize(u) => Ok(Some(u.to_object(py))), + TypedValue::BigInt(big) => Ok(Some(big.to_object(py))), + TypedValue::BigUint(big) => Ok(Some(big.to_object(py))), + TypedValue::Bool(b) => Ok(Some(b.to_object(py))), + TypedValue::Float(f) => Ok(Some(f.to_object(py))), + TypedValue::Serialized(bytes, serializer, _class) => { + if let Some(s) = serializer { + if s == "Python-Pickle" { + let any = depickle(py, &bytes)?; + Ok(Some(any.into())) + } else if s == "Python-Frontend" { + let bytes = PyBytes::new(py, &bytes); + Ok(Some(bytes.into())) + } else { + crate::runtime_error!(if let Some(k) = key { + format!( + "Unknown serializer {} for {}. \ + If this was manually serialized, use method 'get_serialized' \ + to get a byte-array and manually deserialize.", + k, s + ) + } else { + format!( + "Unknown serializer {}. \ + If this was manually serialized, use method 'get_serialized' \ + to get a byte-array and manually deserialize.", + s + ) + }) + } } else { crate::runtime_error!(if let Some(k) = key { format!( - "Unknown serializer {} for {}. \ + "No serializer provided for {}. \ If this was manually serialized, use method 'get_serialized' \ to get a byte-array and manually deserialize.", - k, s + k ) } else { - format!( - "Unknown serializer {}. \ - If this was manually serialized, use method 'get_serialized' \ - to get a byte-array and manually deserialize.", - s - ) + "No serializer provided. \ + If this was manually serialized, use method 'get_serialized' \ + to get a byte-array and manually deserialize." + .to_string() }) } - } else { - crate::runtime_error!(if let Some(k) = key { - format!( - "No serializer provided for {}. \ - If this was manually serialized, use method 'get_serialized' \ - to get a byte-array and manually deserialize.", - k - ) - } else { - "No serializer provided. \ - If this was manually serialized, use method 'get_serialized' \ - to get a byte-array and manually deserialize." - .to_string() - }) } - } - TypedValue::Vec(list) => { - let mut pylist: Vec = vec![]; - for l in list { - pylist.push(typed_value_to_pyobj(Some(l), None)?.unwrap()); + TypedValue::Vec(list) => { + let mut pylist: Vec = vec![]; + for l in list { + pylist.push(typed_value_to_pyobj(Some(l), None)?.unwrap()); + } + Ok(Some(pylist.to_object(py))) } - Ok(Some(pylist.to_object(py))) + TypedValue::Map(map) => Ok(Some(into_pydict(py, map)?.to_object(py))), } - TypedValue::Map(map) => Ok(Some(into_pydict(py, map)?.to_object(py))), - } + }) } else { Ok(None) } @@ -101,15 +98,14 @@ pub fn extract_as_typed_value(value: &PyAny) -> PyResult { } else if let Ok(f) = value.extract::() { data = TypedValue::Float(f); } else { - let gil = Python::acquire_gil(); - let py = gil.python(); - // Serialize the data data = TypedValue::Serialized( - pickle(py, value)?, + Python::with_gil(|py| { + pickle(py, value) + })?, Some("Python-Pickle".to_string()), Some(value.get_type().name()?.to_string()), - ); + ) } Ok(data) } diff --git a/rust/pyapi_metal/src/framework/users.rs b/rust/pyapi_metal/src/framework/users.rs index 0764d05f..25e59a49 100644 --- a/rust/pyapi_metal/src/framework/users.rs +++ b/rust/pyapi_metal/src/framework/users.rs @@ -46,6 +46,7 @@ pub(crate) fn define(py: Python, m: &PyModule) -> PyResult<()> { let users_class = subm.getattr("Users")?; users_class.setattr("current_user_as", wrap_instance_method(py, "current_user_as", Some(vec!("new_current")), None)?)?; + crate::alias_method_apply_to_set!(subm, "Users", "data_lookup_hierarchy"); Ok(()) } @@ -346,10 +347,10 @@ impl Users { #[setter] fn data_lookup_hierarchy(&self, new_hierarchy: Vec) -> PyResult<()> { - self.set_data_lookup_hierarchy(new_hierarchy) + self.apply_data_lookup_hierarchy(new_hierarchy) } - pub fn set_data_lookup_hierarchy(&self, new_hierarchy: Vec) -> PyResult<()> { + pub fn apply_data_lookup_hierarchy(&self, new_hierarchy: Vec) -> PyResult<()> { let mut users = om::users_mut(); Ok(users.set_default_data_lookup_hierarchy(new_hierarchy)?) } diff --git a/rust/pyapi_metal/src/lib.rs b/rust/pyapi_metal/src/lib.rs index 5ab0f1b6..92bbc8e8 100644 --- a/rust/pyapi_metal/src/lib.rs +++ b/rust/pyapi_metal/src/lib.rs @@ -1,3 +1,4 @@ +#[macro_use] pub mod _helpers; pub mod framework; pub mod frontend; @@ -21,8 +22,14 @@ pub mod built_info { include!(concat!(env!("OUT_DIR"), "/built.rs")); } -#[pymodule] -pub fn _origen_metal(py: Python, m: &PyModule) -> PyResult<()> { +pub fn define(py: Python, m: &PyModule) -> PyResult<()> { + let subm = PyModule::new(py, "_origen_metal")?; + _define(py, subm)?; + m.add_submodule(subm)?; + Ok(()) +} + +pub fn _define(py: Python, m: &PyModule) -> PyResult<()> { framework::define(py, m)?; utils::define(py, m)?; frontend::define(py, m)?; @@ -43,10 +50,14 @@ pub fn _origen_metal(py: Python, m: &PyModule) -> PyResult<()> { _helpers::define_tests(py, test_sm)?; m.add_submodule(test_sm)?; } - Ok(()) } +#[pymodule] +pub fn _origen_metal(py: Python, m: &PyModule) -> PyResult<()> { + _define(py, m) +} + fn py_submodule(py: Python, parent: &PyModule, path: &str, func: F) -> PyResult<()> where F: FnOnce(&PyModule) -> PyResult<()>, diff --git a/rust/pyapi_metal/src/utils/revision_control/status.rs b/rust/pyapi_metal/src/utils/revision_control/status.rs index f5baf76e..eca53630 100644 --- a/rust/pyapi_metal/src/utils/revision_control/status.rs +++ b/rust/pyapi_metal/src/utils/revision_control/status.rs @@ -11,9 +11,7 @@ pub struct Status { #[pymethods] impl Status { #[getter] - fn added(&self) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn added(&self, py: Python) -> PyResult> { let mut retn: Vec = vec![]; for added in self.stat.added.iter() { retn.push(pypath!(py, added.display())); @@ -22,18 +20,18 @@ impl Status { } #[getter] - fn removed(&self) -> PyResult> { - to_py_paths(&self.stat.removed.iter().map(|p| p.display()).collect()) + fn removed(&self, py: Python) -> PyResult> { + to_py_paths(py, &self.stat.removed.iter().map(|p| p.display()).collect()) } #[getter] - fn conflicted(&self) -> PyResult> { - to_py_paths(&self.stat.conflicted.iter().map(|p| p.display()).collect()) + fn conflicted(&self, py: Python) -> PyResult> { + to_py_paths(py, &self.stat.conflicted.iter().map(|p| p.display()).collect()) } #[getter] - fn changed(&self) -> PyResult> { - to_py_paths(&self.stat.changed.iter().map(|p| p.display()).collect()) + fn changed(&self, py: Python) -> PyResult> { + to_py_paths(py, &self.stat.changed.iter().map(|p| p.display()).collect()) } #[getter] From 4798684c411104182e0c0e167fda0cd4a1e0ce8a Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 16 Jul 2023 21:04:08 -0500 Subject: [PATCH 097/200] Clean up pyo3 17.3 warnings. Fix run_cmd calls in examples --- rust/pyapi/src/application/_frontend.rs | 10 +- rust/pyapi/src/application/mod.rs | 24 ++--- rust/pyapi/src/dut.rs | 22 ++-- rust/pyapi/src/lib.rs | 37 ++++--- .../src/meta/py_like_apis/dict_like_api.rs | 70 ++++++------ .../src/meta/py_like_apis/list_like_api.rs | 72 ++++++------- rust/pyapi/src/pins.rs | 49 +++------ rust/pyapi/src/pins/pin.rs | 29 ++--- rust/pyapi/src/pins/pin_actions.rs | 61 ++++------- rust/pyapi/src/pins/pin_collection.rs | 37 +++---- rust/pyapi/src/pins/pin_container.rs | 4 +- rust/pyapi/src/pins/pin_group.rs | 25 ++--- rust/pyapi/src/registers/address_block.rs | 4 +- rust/pyapi/src/registers/bit_collection.rs | 58 ++-------- rust/pyapi/src/registers/memory_map.rs | 4 +- .../src/standard_sub_blocks/arm_debug.rs | 33 ++---- rust/pyapi/src/standard_sub_blocks/mod.rs | 1 - rust/pyapi/src/tester.rs | 75 +++++-------- rust/pyapi/src/timesets.rs | 11 +- rust/pyapi/src/timesets/timeset.rs | 100 +++++------------- rust/pyapi/src/utility/caller.rs | 51 ++++----- rust/pyapi/src/utility/location.rs | 20 +--- rust/pyapi/src/utility/mod.rs | 11 +- rust/pyapi/src/utility/publisher/_frontend.rs | 46 ++++---- .../src/utility/release_scribe/_frontend.rs | 10 +- rust/pyapi/src/utility/release_scribe/mod.rs | 8 +- .../pyapi/src/utility/revision_control/mod.rs | 4 +- rust/pyapi/src/utility/transaction.rs | 27 ++--- .../src/utility/unit_testers/_frontend.rs | 20 ++-- rust/pyapi/src/utility/unit_testers/mod.rs | 74 ++++++------- rust/pyapi/src/utility/website/_frontend.rs | 14 +-- .../python_app/example/commands/examples.py | 12 ++- 32 files changed, 399 insertions(+), 624 deletions(-) diff --git a/rust/pyapi/src/application/_frontend.rs b/rust/pyapi/src/application/_frontend.rs index 88084fdb..05040d58 100644 --- a/rust/pyapi/src/application/_frontend.rs +++ b/rust/pyapi/src/application/_frontend.rs @@ -31,11 +31,11 @@ impl App { impl origen::core::frontend::App for App { fn check_production_status(&self) -> origen::Result { - let gil = Python::acquire_gil(); - let py = gil.python(); - let pyapp = get_pyapp(py)?; - let app = pyapp.borrow(py); - Ok(app.check_production_status()?) + Python::with_gil(|py| { + let pyapp = get_pyapp(py)?; + let app = pyapp.borrow(py); + Ok(app.check_production_status()?) + }) } fn publish(&self) -> origen::Result<()> { diff --git a/rust/pyapi/src/application/mod.rs b/rust/pyapi/src/application/mod.rs index a945483d..b7d52673 100644 --- a/rust/pyapi/src/application/mod.rs +++ b/rust/pyapi/src/application/mod.rs @@ -235,18 +235,18 @@ pub fn get_pyapp<'py>(py: Python<'py>) -> PyResult> { /// Note: this could have several methods overridden. Just check that the aforementioned /// class is one of the object's ancestors pub fn is_base_app(query: &PyAny) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - let locals = PyDict::new(py); - locals.set_item("origen", py.import("origen")?.to_object(py))?; - locals.set_item("builtins", py.import("builtins")?.to_object(py))?; - locals.set_item("query", query.to_object(py))?; - let result = py.eval( - "builtins.isinstance(query, origen.application.Base)", - Some(locals), - None, - )?; - Ok(result.extract::()?) + Python::with_gil(|py| { + let locals = PyDict::new(py); + locals.set_item("origen", py.import("origen")?.to_object(py))?; + locals.set_item("builtins", py.import("builtins")?.to_object(py))?; + locals.set_item("query", query.to_object(py))?; + let result = py.eval( + "builtins.isinstance(query, origen.application.Base)", + Some(locals), + None, + )?; + Ok(result.extract::()?) + }) } /// Return the name of the given app. Equivalent to `app.name` in Python diff --git a/rust/pyapi/src/dut.rs b/rust/pyapi/src/dut.rs index 5a5824c6..778808f5 100644 --- a/rust/pyapi/src/dut.rs +++ b/rust/pyapi/src/dut.rs @@ -4,7 +4,6 @@ use origen::Error; use pyo3::prelude::*; #[allow(unused_imports)] use pyo3::types::{PyAny, PyBytes, PyDict, PyIterator, PyList, PySlice, PyTuple}; -use pyo3::wrap_pymodule; //TODO is this needed/used? #[allow(dead_code)] @@ -59,17 +58,12 @@ impl PyDUT { /// push_metadata(self, item) /// Pushes metadata object onto the current DUT - pub fn push_metadata(&mut self, item: &PyAny) -> usize { - let gil = Python::acquire_gil(); - let py = gil.python(); - + pub fn push_metadata(&mut self, py: Python, item: &PyAny) -> usize { self.metadata.push(item.to_object(py)); self.metadata.len() - 1 } - pub fn override_metadata_at(&mut self, idx: usize, item: &PyAny) -> PyResult<()> { - let gil = Python::acquire_gil(); - let py = gil.python(); + pub fn override_metadata_at(&mut self, py: Python, idx: usize, item: &PyAny) -> PyResult<()> { if self.metadata.len() > idx { self.metadata[idx] = item.to_object(py); Ok(()) @@ -96,11 +90,11 @@ impl PyDUT { impl PyDUT { pub fn ensure_pins(model_path: &str) -> PyResult<()> { - let gil = Python::acquire_gil(); - let py = gil.python(); - let locals = PyDict::new(py); - locals.set_item("origen", py.import("origen")?.to_object(py))?; - py.eval(&format!("origen.{}.pins", model_path), Some(locals), None)?; - Ok(()) + Python::with_gil(|py| { + let locals = PyDict::new(py); + locals.set_item("origen", py.import("origen")?.to_object(py))?; + py.eval(&format!("origen.{}.pins", model_path), Some(locals), None)?; + Ok(()) + }) } } diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index 8bc88565..5b23b769 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -43,7 +43,7 @@ use pyapi_metal::{runtime_error, pypath}; use pyo3::conversion::AsPyPointer; use pyo3::prelude::*; use pyo3::types::{PyAny, PyBytes, PyDict}; -use pyo3::{wrap_pyfunction, wrap_pymodule}; +use pyo3::wrap_pyfunction; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::sync::MutexGuard; @@ -343,19 +343,19 @@ fn exit_pass() -> PyResult<()> { } fn origen_mod_path() -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - let locals = PyDict::new(py); - locals.set_item("importlib", py.import("importlib")?)?; - let p = PathBuf::from( - py.eval( - "importlib.util.find_spec('_origen').origin", - None, - Some(&locals), - )? - .extract::()?, - ); - Ok(p.parent().unwrap().to_path_buf()) + Python::with_gil(|py| { + let locals = PyDict::new(py); + locals.set_item("importlib", py.import("importlib")?)?; + let p = PathBuf::from( + py.eval( + "importlib.util.find_spec('_origen').origin", + None, + Some(&locals), + )? + .extract::()?, + ); + Ok(p.parent().unwrap().to_path_buf()) + }) } /// Called automatically when Origen is first loaded @@ -673,11 +673,10 @@ pub fn with_pycallbacks(mut func: F) -> PyResult where F: FnMut(Python, &PyAny) -> PyResult, { - let gil = Python::acquire_gil(); - let py = gil.python(); - - let pycallbacks = py.import("origen.callbacks")?; - func(py, pycallbacks) + Python::with_gil(|py| { + let pycallbacks = py.import("origen.callbacks")?; + func(py, pycallbacks) + }) } pub fn get_full_class_name(obj: &PyAny) -> PyResult { diff --git a/rust/pyapi/src/meta/py_like_apis/dict_like_api.rs b/rust/pyapi/src/meta/py_like_apis/dict_like_api.rs index ecece431..81e06c5a 100644 --- a/rust/pyapi/src/meta/py_like_apis/dict_like_api.rs +++ b/rust/pyapi/src/meta/py_like_apis/dict_like_api.rs @@ -65,13 +65,13 @@ pub trait DictLikeAPI { items = self.lookup_table(&dut); } - let gil = Python::acquire_gil(); - let py = gil.python(); - let mut v: Vec = Vec::new(); - for (n, _item) in items { - v.push(self.new_pyitem(py, &n, self.model_id())?); - } - Ok(v) + Python::with_gil(|py| { + let mut v: Vec = Vec::new(); + for (n, _item) in items { + v.push(self.new_pyitem(py, &n, self.model_id())?); + } + Ok(v) + }) } fn items(&self) -> PyResult> { @@ -81,43 +81,43 @@ pub trait DictLikeAPI { items = self.lookup_table(&dut); } - let gil = Python::acquire_gil(); - let py = gil.python(); - let mut _items: Vec<(String, PyObject)> = Vec::new(); - for (n, _item) in items.iter() { - _items.push((n.clone(), self.new_pyitem(py, &n, self.model_id())?)); - } - Ok(_items) + Python::with_gil(|py| { + let mut _items: Vec<(String, PyObject)> = Vec::new(); + for (n, _item) in items.iter() { + _items.push((n.clone(), self.new_pyitem(py, &n, self.model_id())?)); + } + Ok(_items) + }) } fn get(&self, name: &str) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - { - let dut = DUT.lock().unwrap(); - let items = self.lookup_table(&dut); - if items.get(name).is_none() { - return Ok(py.None()); + Python::with_gil(|py| { + { + let dut = DUT.lock().unwrap(); + let items = self.lookup_table(&dut); + if items.get(name).is_none() { + return Ok(py.None()); + } } - } - Ok(self.new_pyitem(py, name, self.model_id())?) + Ok(self.new_pyitem(py, name, self.model_id())?) + }) } // Functions for PyMappingProtocol fn __getitem__(&self, name: &str) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - { - let dut = DUT.lock().unwrap(); - let items = self.lookup_table(&dut); - if items.get(name).is_none() { - return Err(pyo3::exceptions::PyKeyError::new_err(format!( - "No item found for {}", - name - ))); + Python::with_gil(|py| { + { + let dut = DUT.lock().unwrap(); + let items = self.lookup_table(&dut); + if items.get(name).is_none() { + return Err(pyo3::exceptions::PyKeyError::new_err(format!( + "No item found for {}", + name + ))); + } } - } - Ok(self.new_pyitem(py, name, self.model_id())?) + Ok(self.new_pyitem(py, name, self.model_id())?) + }) } fn __len__(&self) -> PyResult { diff --git a/rust/pyapi/src/meta/py_like_apis/list_like_api.rs b/rust/pyapi/src/meta/py_like_apis/list_like_api.rs index 75fc2b95..0229a98b 100644 --- a/rust/pyapi/src/meta/py_like_apis/list_like_api.rs +++ b/rust/pyapi/src/meta/py_like_apis/list_like_api.rs @@ -42,9 +42,9 @@ pub trait ListLikeAPI { _idx = ((item_ids.len() as isize) + idx) as usize; } - let gil = Python::acquire_gil(); - let py = gil.python(); - Ok(self.new_pyitem(py, _idx)?) + Python::with_gil(|py| { + Ok(self.new_pyitem(py, _idx)?) + }) } fn ___getslice__(&self, slice: &PySlice) -> PyResult { @@ -55,22 +55,22 @@ pub trait ListLikeAPI { indices = slice.indices((item_ids.len() as i32).into())?; } - let gil = Python::acquire_gil(); - let py = gil.python(); - let mut rtn: Vec = vec![]; - let mut i = indices.start; - if indices.step > 0 { - while i < indices.stop { - rtn.push(self.new_pyitem(py, i as usize)?); - i += indices.step; + Python::with_gil(|py| { + let mut rtn: Vec = vec![]; + let mut i = indices.start; + if indices.step > 0 { + while i < indices.stop { + rtn.push(self.new_pyitem(py, i as usize)?); + i += indices.step; + } + } else if indices.step < 0 { + while i > indices.stop { + rtn.push(self.new_pyitem(py, i as usize)?); + i += indices.step; + } } - } else if indices.step < 0 { - while i > indices.stop { - rtn.push(self.new_pyitem(py, i as usize)?); - i += indices.step; - } - } - Ok(rtn.to_object(py)) + Ok(rtn.to_object(py)) + }) } fn __len__(&self) -> PyResult { @@ -138,29 +138,29 @@ pub trait GeneralizedListLikeAPI { _idx = ((self.items().len() as isize) + idx) as usize; } - let gil = Python::acquire_gil(); - let py = gil.python(); - Ok(self.new_pyitem(py, &self.items()[_idx], _idx)?) + Python::with_gil(|py| { + Ok(self.new_pyitem(py, &self.items()[_idx], _idx)?) + }) } fn ___getslice__(&self, slice: &PySlice) -> PyResult { let indices = slice.indices((self.items().len() as i32).into())?; - let gil = Python::acquire_gil(); - let py = gil.python(); - let mut rtn: Vec = vec![]; - let mut i = indices.start; - if indices.step > 0 { - while i < indices.stop { - rtn.push(self.new_pyitem(py, &self.items()[i as usize], i as usize)?); - i += indices.step; + Python::with_gil(|py| { + let mut rtn: Vec = vec![]; + let mut i = indices.start; + if indices.step > 0 { + while i < indices.stop { + rtn.push(self.new_pyitem(py, &self.items()[i as usize], i as usize)?); + i += indices.step; + } + } else if indices.step < 0 { + while i > indices.stop { + rtn.push(self.new_pyitem(py, &self.items()[i as usize], i as usize)?); + i += indices.step; + } } - } else if indices.step < 0 { - while i > indices.stop { - rtn.push(self.new_pyitem(py, &self.items()[i as usize], i as usize)?); - i += indices.step; - } - } - Ok(rtn.to_object(py)) + Ok(rtn.to_object(py)) + }) } fn __len__(&self) -> PyResult { diff --git a/rust/pyapi/src/pins.rs b/rust/pyapi/src/pins.rs index 6eda76e5..f1766cbf 100644 --- a/rust/pyapi/src/pins.rs +++ b/rust/pyapi/src/pins.rs @@ -147,12 +147,12 @@ pub fn pins_to_backend_lookup_fields( } pub fn vec_to_ppin_ids(dut: &origen::Dut, pins: Vec<&PyAny>) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); - let t = PyTuple::new(py, pins); - let pin_lookups = pins_to_backend_lookup_fields(py, t)?; - let flat_pins = dut._resolve_to_flattened_pins(&pin_lookups)?; - Ok(flat_pins.iter().map(|p| p.id).collect::>()) + Python::with_gil(|py| { + let t = PyTuple::new(py, pins); + let pin_lookups = pins_to_backend_lookup_fields(py, t)?; + let flat_pins = dut._resolve_to_flattened_pins(&pin_lookups)?; + Ok(flat_pins.iter().map(|p| p.id).collect::>()) + }) } // /// Similar to pins_to_backend_lookup_fields (and actually uses that) but goes @@ -171,7 +171,7 @@ pub fn vec_to_ppin_ids(dut: &origen::Dut, pins: Vec<&PyAny>) -> PyResult) -> PyResult { + fn add_pin(&self, py: Python, model_id: usize, name: &str, kwargs: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let (mut reset_action, mut width, mut offset, mut endianness): ( Option>, @@ -202,8 +202,6 @@ impl PyDUT { } dut.add_pin(model_id, name, width, offset, reset_action, endianness)?; - let gil = Python::acquire_gil(); - let py = gil.python(); match dut.get_pin_group(model_id, name) { Some(_p) => Ok(Py::new( py, @@ -218,11 +216,8 @@ impl PyDUT { } } - fn pin(&self, model_id: usize, name: &str) -> PyResult { + fn pin(&self, py: Python, model_id: usize, name: &str) -> PyResult { let dut = DUT.lock().unwrap(); - - let gil = Python::acquire_gil(); - let py = gil.python(); match dut.get_pin_group(model_id, name) { Some(_p) => Ok(Py::new( py, @@ -247,15 +242,14 @@ impl PyDUT { Ok(()) } - fn pins(&self, model_id: usize) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn pins(&self, py: Python, model_id: usize) -> PyResult> { Ok(Py::new(py, PinContainer { model_id: model_id }).unwrap()) } #[args(pins = "*", options = "**")] fn group_pins( &self, + py: Python, model_id: usize, name: &str, pins: &PyTuple, @@ -288,8 +282,6 @@ impl PyDUT { let mut dut = DUT.lock().unwrap(); dut.group_pins_by_name(model_id, name, name_strs, endianness)?; - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(Py::new( py, PinGroup { @@ -301,17 +293,12 @@ impl PyDUT { .to_object(py)) } - fn physical_pins(&self, model_id: usize) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn physical_pins(&self, py: Python, model_id: usize) -> PyResult> { Ok(Py::new(py, PhysicalPinContainer { model_id: model_id }).unwrap()) } - fn physical_pin(&self, model_id: usize, name: &str) -> PyResult { + fn physical_pin(&self, py: Python, model_id: usize, name: &str) -> PyResult { let dut = DUT.lock().unwrap(); - - let gil = Python::acquire_gil(); - let py = gil.python(); match dut.get_pin(model_id, name) { Some(_p) => Ok(Py::new( py, @@ -329,6 +316,7 @@ impl PyDUT { #[args(pins = "*")] fn add_pin_header( &self, + py: Python, model_id: usize, name: &str, pins: &PyTuple, @@ -336,8 +324,6 @@ impl PyDUT { let mut dut = DUT.lock().unwrap(); dut.create_pin_header(model_id, name, pins.extract::>()?)?; - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(Py::new( py, PinHeader { @@ -348,17 +334,12 @@ impl PyDUT { .unwrap()) } - fn pin_headers(&self, model_id: usize) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn pin_headers(&self, py: Python, model_id: usize) -> PyResult> { Ok(Py::new(py, PinHeaderContainer { model_id: model_id }).unwrap()) } - fn pin_header(&self, model_id: usize, name: &str) -> PyResult { + fn pin_header(&self, py: Python, model_id: usize, name: &str) -> PyResult { let dut = DUT.lock().unwrap(); - - let gil = Python::acquire_gil(); - let py = gil.python(); match dut.get_pin_header(model_id, name) { Some(_p) => Ok(Py::new( py, diff --git a/rust/pyapi/src/pins/pin.rs b/rust/pyapi/src/pins/pin.rs index 4ce2a4de..db0562a5 100644 --- a/rust/pyapi/src/pins/pin.rs +++ b/rust/pyapi/src/pins/pin.rs @@ -27,30 +27,26 @@ pub struct Pin { #[pymethods] impl Pin { - fn add_metadata(&self, id_str: &str, obj: &PyAny) -> PyResult<()> { + fn add_metadata(&self, py: Python, id_str: &str, obj: &PyAny) -> PyResult<()> { let mut dut = DUT.lock().unwrap(); let pin = dut._get_mut_pin(self.model_id, &self.name)?; - let gil = Python::acquire_gil(); - let py = gil.python(); let locals = [("origen", py.import("origen")?)].into_py_dict(py); let mut dut = py .eval("origen.dut.db", None, Some(&locals)) .unwrap() .extract::>()?; - let idx = dut.push_metadata(obj); + let idx = dut.push_metadata(py, obj); // Store the index of this object, returning an error if the pin.add_metadata_id(id_str, idx)?; Ok(()) } - fn set_metadata(&self, id_str: &str, obj: &PyAny) -> PyResult { + fn set_metadata(&self, py: Python, id_str: &str, obj: &PyAny) -> PyResult { let mut dut = DUT.lock().unwrap(); let pin = dut._get_mut_pin(self.model_id, &self.name)?; - let gil = Python::acquire_gil(); - let py = gil.python(); let locals = [("origen", py.import("origen")?)].into_py_dict(py); let mut dut = py .eval("origen.dut.db", None, Some(&locals)) @@ -58,22 +54,21 @@ impl Pin { .extract::>()?; match pin.get_metadata_id(id_str) { Some(idx) => { - dut.override_metadata_at(idx, obj)?; + dut.override_metadata_at(py, idx, obj)?; Ok(true) } None => { - let idx = dut.push_metadata(obj); + let idx = dut.push_metadata(py, obj); pin.add_metadata_id(id_str, idx)?; Ok(false) } } } - fn get_metadata(&self, id_str: &str) -> PyResult { + fn get_metadata(&self, py: Python, id_str: &str) -> PyResult { let dut = DUT.lock().unwrap(); let pin = dut._get_pin(self.model_id, &self.name)?; - let gil = Python::acquire_gil(); - let py = gil.python(); + match pin.metadata.get(id_str) { Some(idx) => { let locals = [("origen", py.import("origen")?)].into_py_dict(py); @@ -130,12 +125,9 @@ impl Pin { } #[getter] - fn get_reset_data(&self) -> PyResult { + fn get_reset_data(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let pin = dut._get_pin(self.model_id, &self.name)?; - - let gil = Python::acquire_gil(); - let py = gil.python(); match &pin.reset_action { Some(d) => Ok(d.to_logic()?.to_object(py)), None => Ok(py.None()), @@ -143,12 +135,9 @@ impl Pin { } #[getter] - fn get_reset_action(&self) -> PyResult { + fn get_reset_action(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let pin = dut._get_pin(self.model_id, &self.name)?; - - let gil = Python::acquire_gil(); - let py = gil.python(); match pin.reset_action.as_ref() { Some(a) => Ok(a.to_string().into_py(py)), None => Ok(py.None()), diff --git a/rust/pyapi/src/pins/pin_actions.rs b/rust/pyapi/src/pins/pin_actions.rs index 687d1d53..d1fd3ca2 100644 --- a/rust/pyapi/src/pins/pin_actions.rs +++ b/rust/pyapi/src/pins/pin_actions.rs @@ -69,9 +69,7 @@ pub struct PinActions { impl PinActions { #[allow(non_snake_case)] #[classmethod] - fn DriveHigh(_cls: &PyType) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn DriveHigh(_cls: &PyType, py: Python) -> PyResult { Ok(PinActions { actions: vec![OrigenPinAction::drive_high()], } @@ -80,9 +78,7 @@ impl PinActions { #[allow(non_snake_case)] #[classmethod] - fn DriveLow(_cls: &PyType) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn DriveLow(_cls: &PyType, py: Python) -> PyResult { Ok(PinActions { actions: vec![OrigenPinAction::drive_low()], } @@ -91,9 +87,7 @@ impl PinActions { #[allow(non_snake_case)] #[classmethod] - fn VerifyHigh(_cls: &PyType) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn VerifyHigh(_cls: &PyType, py: Python) -> PyResult { Ok(PinActions { actions: vec![OrigenPinAction::verify_high()], } @@ -102,9 +96,7 @@ impl PinActions { #[allow(non_snake_case)] #[classmethod] - fn VerifyLow(_cls: &PyType) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn VerifyLow(_cls: &PyType, py: Python) -> PyResult { Ok(PinActions { actions: vec![OrigenPinAction::verify_low()], } @@ -113,9 +105,7 @@ impl PinActions { #[allow(non_snake_case)] #[classmethod] - fn Capture(_cls: &PyType) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn Capture(_cls: &PyType, py: Python) -> PyResult { Ok(PinActions { actions: vec![OrigenPinAction::capture()], } @@ -124,9 +114,7 @@ impl PinActions { #[allow(non_snake_case)] #[classmethod] - fn HighZ(_cls: &PyType) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn HighZ(_cls: &PyType, py: Python) -> PyResult { Ok(PinActions { actions: vec![OrigenPinAction::highz()], } @@ -135,9 +123,7 @@ impl PinActions { #[allow(non_snake_case)] #[classmethod] - fn Multichar(_cls: &PyType, symbol: String) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn Multichar(_cls: &PyType, py: Python, symbol: String) -> PyResult { Ok(PinActions { actions: vec![OrigenPinAction::new(&symbol)], } @@ -145,16 +131,14 @@ impl PinActions { } #[classmethod] - fn standard_actions(cls: &PyType) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn standard_actions(cls: &PyType, py: Python) -> PyResult { let retn = PyDict::new(py); - retn.set_item("DriveHigh", Self::DriveHigh(cls)?)?; - retn.set_item("DriveLow", Self::DriveLow(cls)?)?; - retn.set_item("VerifyHigh", Self::VerifyHigh(cls)?)?; - retn.set_item("VerifyLow", Self::VerifyLow(cls)?)?; - retn.set_item("Capture", Self::Capture(cls)?)?; - retn.set_item("HighZ", Self::HighZ(cls)?)?; + retn.set_item("DriveHigh", Self::DriveHigh(cls, py)?)?; + retn.set_item("DriveLow", Self::DriveLow(cls, py)?)?; + retn.set_item("VerifyHigh", Self::VerifyHigh(cls, py)?)?; + retn.set_item("VerifyLow", Self::VerifyLow(cls, py)?)?; + retn.set_item("Capture", Self::Capture(cls, py)?)?; + retn.set_item("HighZ", Self::HighZ(cls, py)?)?; Ok(retn.into()) } @@ -198,10 +182,7 @@ impl PinActions { /// Comparisons are only valid for *equal* and *not equal*. Can't compare if one /// pin action is *greater than* or *less than* another. /// Example of richcmp: https://github.com/PyO3/pyo3/blob/a5e3d4e7c8d80f7020510cf630ab01001612c6a7/tests/test_arithmetics.rs#L358-L373 - fn __richcmp__(&self, other: &PyAny, op: CompareOp) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - + fn __richcmp__(&self, py: Python, other: &PyAny, op: CompareOp) -> PyResult { // Support comparing either to a str or another Actions object let other_string; if let Ok(s) = other.extract::() { @@ -283,9 +264,9 @@ impl GeneralizedListLikeAPI for PinActions { _idx = ((self.items().len() as isize) + idx) as usize; } - let gil = Python::acquire_gil(); - let py = gil.python(); - Ok(self.new_pyitem(py, &self.items()[_idx], _idx)?) + Python::with_gil(|py| { + self.new_pyitem(py, &self.items()[_idx], _idx) + }) } fn ___getslice__(&self, slice: &PySlice) -> PyResult { @@ -305,9 +286,9 @@ impl GeneralizedListLikeAPI for PinActions { } } } - let gil = Python::acquire_gil(); - let py = gil.python(); - Ok(PinActions { actions: actions }.into_py(py)) + Ok(Python::with_gil(|py| { + PinActions { actions: actions }.into_py(py) + })) } } diff --git a/rust/pyapi/src/pins/pin_collection.rs b/rust/pyapi/src/pins/pin_collection.rs index 6eefbd37..92bc083e 100644 --- a/rust/pyapi/src/pins/pin_collection.rs +++ b/rust/pyapi/src/pins/pin_collection.rs @@ -65,11 +65,8 @@ impl PinCollection { } #[getter] - fn get_actions(&self) -> PyResult { + fn get_actions(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); - let gil = Python::acquire_gil(); - let py = gil.python(); - let pin_actions = self.pin_collection.get_actions(&dut)?; Ok(PinActions { actions: pin_actions, @@ -147,10 +144,8 @@ impl PinCollection { } #[getter] - fn get_reset_actions(&self) -> PyResult { + fn get_reset_actions(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); - let gil = Python::acquire_gil(); - let py = gil.python(); let pin_actions = self.pin_collection.get_reset_actions(&dut)?; Ok(PinActions { actions: pin_actions, @@ -169,10 +164,7 @@ impl PinCollection { } #[args(kwargs = "**")] - fn cycle(slf: PyRef, kwargs: Option<&PyDict>) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); - + fn cycle(slf: PyRef, py: Python, kwargs: Option<&PyDict>) -> PyResult> { let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?)?; locals.set_item("kwargs", kwargs.to_object(py))?; @@ -185,10 +177,7 @@ impl PinCollection { Ok(slf.into()) } - fn repeat(slf: PyRef, count: usize) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); - + fn repeat(slf: PyRef, py: Python, count: usize) -> PyResult> { let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?)?; py.eval( @@ -271,15 +260,15 @@ impl ListLikeAPI for PinCollection { } } } - let gil = Python::acquire_gil(); - let py = gil.python(); - Ok(Py::new( - py, - PinCollection { - pin_collection: OrigenPinCollection::new(ids, None), - }, - )? - .to_object(py)) + Python::with_gil(|py| { + Ok(Py::new( + py, + PinCollection { + pin_collection: OrigenPinCollection::new(ids, None), + }, + )? + .to_object(py)) + }) } } diff --git a/rust/pyapi/src/pins/pin_container.rs b/rust/pyapi/src/pins/pin_container.rs index 681c9165..fd9fcd37 100644 --- a/rust/pyapi/src/pins/pin_container.rs +++ b/rust/pyapi/src/pins/pin_container.rs @@ -36,9 +36,7 @@ impl PinContainer { } #[args(names = "*", options = "**")] - fn collect(&self, names: &PyTuple, options: Option<&PyDict>) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn collect(&self, py: Python, names: &PyTuple, options: Option<&PyDict>) -> PyResult> { let mut endianness = Option::None; match options { Some(options) => { diff --git a/rust/pyapi/src/pins/pin_group.rs b/rust/pyapi/src/pins/pin_group.rs index d895539c..cdd62a1a 100644 --- a/rust/pyapi/src/pins/pin_group.rs +++ b/rust/pyapi/src/pins/pin_group.rs @@ -33,11 +33,8 @@ impl PinGroup { } #[getter] - fn get_actions(&self) -> PyResult { + fn get_actions(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); - let gil = Python::acquire_gil(); - let py = gil.python(); - let grp = dut._get_pin_group(self.model_id, &self.name)?; let pin_actions = grp.get_actions(&dut)?; Ok(PinActions { @@ -109,10 +106,8 @@ impl PinGroup { } #[getter] - fn get_reset_actions(&self) -> PyResult { + fn get_reset_actions(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); - let gil = Python::acquire_gil(); - let py = gil.python(); let grp = dut._get_pin_group(self.model_id, &self.name)?; let pin_actions = grp.get_reset_actions(&dut)?; Ok(PinActions { @@ -135,10 +130,7 @@ impl PinGroup { } #[args(kwargs = "**")] - fn cycle(slf: PyRef, kwargs: Option<&PyDict>) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); - + fn cycle(slf: PyRef, py: Python, kwargs: Option<&PyDict>) -> PyResult> { let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?)?; locals.set_item("kwargs", kwargs.to_object(py))?; @@ -151,10 +143,7 @@ impl PinGroup { Ok(slf.into()) } - fn repeat(slf: PyRef, count: usize) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); - + fn repeat(slf: PyRef, py: Python, count: usize) -> PyResult> { let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?)?; py.eval( @@ -276,8 +265,8 @@ impl ListLikeAPI for PinGroup { } } } - let gil = Python::acquire_gil(); - let py = gil.python(); - Ok(Py::new(py, PinCollection::from_ids_unchecked(ids, None))?.to_object(py)) + Python::with_gil(|py| { + Ok(Py::new(py, PinCollection::from_ids_unchecked(ids, None))?.to_object(py)) + }) } } diff --git a/rust/pyapi/src/registers/address_block.rs b/rust/pyapi/src/registers/address_block.rs index 9d3118e8..ffa6ff07 100644 --- a/rust/pyapi/src/registers/address_block.rs +++ b/rust/pyapi/src/registers/address_block.rs @@ -245,9 +245,7 @@ impl AddressBlock { } } - fn __getattr__(&self, query: &str) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn __getattr__(&self, py: Python, query: &str) -> PyResult { let dut = origen::dut(); if query == "regs" || query == "registers" { diff --git a/rust/pyapi/src/registers/bit_collection.rs b/rust/pyapi/src/registers/bit_collection.rs index 8bd61108..9038abfd 100644 --- a/rust/pyapi/src/registers/bit_collection.rs +++ b/rust/pyapi/src/registers/bit_collection.rs @@ -703,13 +703,11 @@ impl BitCollection { /// Locates the "closest" controller to this bitcollection. /// "Closest" being defined as the first subblock (or the DUT) which implements a "verify/write_register" /// that owns the memory map -> address block -> register -> bit collection <- self - fn controller_for(slf: &PyCell, operation: Option<&str>) -> PyResult { + fn controller_for(slf: &PyCell, py: Python, operation: Option<&str>) -> PyResult { let bc = slf.extract::>()?; - match bc._controller_for(operation)? { + match bc._controller_for(py, operation)? { Some(c) => Ok(c), None => { - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(py.None()) } } @@ -718,6 +716,7 @@ impl BitCollection { #[args(_kwargs = "**")] fn write( slf: &PyCell, + py: Python, data: Option, _kwargs: Option<&PyDict>, ) -> PyResult> { @@ -730,11 +729,9 @@ impl BitCollection { } // Attempt to find a controller which implements "write_register" - match bc._controller_for(Some("write_register"))? { + match bc._controller_for(py, Some("write_register"))? { Some(c) => { // If we've found a matching controller, write the register - let gil = Python::acquire_gil(); - let py = gil.python(); let args = PyTuple::new(py, &[slf.to_object(py)]); c.call_method(py, "write_register", args, None)?; }, @@ -749,6 +746,7 @@ impl BitCollection { #[args(_kwargs = "**")] fn verify( slf: &PyCell, + py: Python, data: Option, _kwargs: Option<&PyDict>, ) -> PyResult> { @@ -762,11 +760,9 @@ impl BitCollection { bc.set_verify_flag(None)?; // Attempt to find a controller which implements "verify_register" - match bc._controller_for(Some("verify_register"))? { + match bc._controller_for(py, Some("verify_register"))? { Some(c) => { // If we've found a matching controller, verify the register - let gil = Python::acquire_gil(); - let py = gil.python(); let args = PyTuple::new(py, &[slf.to_object(py)]); c.call_method(py, "verify_register", args, None)?; }, @@ -779,7 +775,7 @@ impl BitCollection { } #[args(kwargs = "**")] - fn capture(slf: &PyCell, kwargs: Option<&PyDict>) -> PyResult> { + fn capture(slf: &PyCell, py: Python, kwargs: Option<&PyDict>) -> PyResult> { // let bc = slf.extract::>()?; // bc.capture(); //slf.materialize(&origen::dut())?.capture(); @@ -790,11 +786,9 @@ impl BitCollection { let bc = slf.extract::>()?; // Attempt to find a controller which implements "capture_register" - match bc._controller_for(Some("capture_register"))? { + match bc._controller_for(py, Some("capture_register"))? { Some(c) => { // If we've found a matching controller, capture the register - let gil = Python::acquire_gil(); - let py = gil.python(); let args = PyTuple::new(py, &[slf.to_object(py)]); c.call_method(py, "capture_register", args, kwargs)?; } @@ -802,10 +796,8 @@ impl BitCollection { // No controller specifies a "capture_register" method, so fall back to // using verify with the capture bits set and no additional arguments which // may change its state. - match bc._controller_for(Some("verify_register"))? { + match bc._controller_for(py, Some("verify_register"))? { Some(c) => { - let gil = Python::acquire_gil(); - let py = gil.python(); let args = PyTuple::new(py, &[slf.to_object(py)]); c.call_method(py, "verify_register", args, None)?; } @@ -816,30 +808,6 @@ impl BitCollection { ))); } } - // match Self::verify(slf, None, None) { - // Ok(c) => {}, - // Err(e) => { - // let err = &e.pvalue; - // match err { - // pyo3::PyErrValue::Value(obj) =>{ - // let gil = Python::acquire_gil(); - // let py = gil.python(); - // let message = obj.extract::(py)?; - // if message.contains("No controller in the path") && message.contains("implements a 'verify_register'. Cannot verify this register.") { - // // Change the error message slightly as "capture_register" is also applicable - // return Err(PyErr::new::(format!( - // "No controller in the path {} implements a 'capture_register' or a 'verify_register'. Cannot capture this register.", - // bc.model_path()? - // ))); - // } else { - // // Some other error - // return Err(e); - // } - // }, - // _ => return Err(e) - // } - // } - // } } } @@ -939,9 +907,7 @@ impl BitCollection { } } - fn __getattr__(&self, query: &str) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn __getattr__(&self, py: Python, query: &str) -> PyResult { let dut = origen::dut(); // .bits returns a Python list containing individual bit objects wrapped in BCs if query == "bits" { @@ -1134,7 +1100,7 @@ impl BitCollection { } } - fn _controller_for(&self, operation: Option<&str>) -> PyResult> { + fn _controller_for(&self, py: Python, operation: Option<&str>) -> PyResult> { let mut ops: Vec = vec![]; if let Some(s) = operation { ops.push(s.to_string()); @@ -1143,8 +1109,6 @@ impl BitCollection { ops.push("read_register".to_string()); } let mut mp = self.model_path()?; - let gil = Python::acquire_gil(); - let py = gil.python(); let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?.to_object(py))?; locals.set_item("dut", py.eval("origen.dut", Some(locals.clone()), None)?)?; diff --git a/rust/pyapi/src/registers/memory_map.rs b/rust/pyapi/src/registers/memory_map.rs index 204f79bd..b215612a 100644 --- a/rust/pyapi/src/registers/memory_map.rs +++ b/rust/pyapi/src/registers/memory_map.rs @@ -220,9 +220,7 @@ pub struct MemoryMap { #[pymethods] impl MemoryMap { - fn __getattr__(&self, query: &str) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn __getattr__(&self, py: Python, query: &str) -> PyResult { let dut = origen::dut(); // Calling .regs on an individual memory map returns the regs in its default diff --git a/rust/pyapi/src/standard_sub_blocks/arm_debug.rs b/rust/pyapi/src/standard_sub_blocks/arm_debug.rs index 1562a18b..daab2634 100644 --- a/rust/pyapi/src/standard_sub_blocks/arm_debug.rs +++ b/rust/pyapi/src/standard_sub_blocks/arm_debug.rs @@ -24,9 +24,7 @@ pub fn define(py: Python, m: &PyModule) -> PyResult<()> { /// Checks for an SWD attribute on the DUT /// Note: this must be run after the DUT has loaded or else it'll cause a lockup -fn check_for_swd() -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); +fn check_for_swd(py: Python) -> PyResult> { let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?.to_object(py))?; locals.set_item("builtins", py.import("builtins")?.to_object(py))?; @@ -45,9 +43,7 @@ fn check_for_swd() -> PyResult> { } } -fn check_for_jtag() -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); +fn check_for_jtag(py: Python) -> PyResult> { let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?.to_object(py))?; locals.set_item("builtins", py.import("builtins")?.to_object(py))?; @@ -88,14 +84,12 @@ impl ArmDebug { } #[classmethod] - fn model_init(_cls: &PyType, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { + fn model_init(_cls: &PyType, py: Python, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { crate::dut::PyDUT::ensure_pins("dut")?; - let swd_id = check_for_swd()?; - let jtag_id = check_for_jtag()?; + let swd_id = check_for_swd(py)?; + let jtag_id = check_for_jtag(py)?; // Create the Arm Debug instance - let gil = Python::acquire_gil(); - let py = gil.python(); let arm_debug_id; { let model_id = instance.getattr("model_id")?.extract::()?; @@ -166,6 +160,7 @@ impl ArmDebug { let ap_opts_dict = ap_opts.downcast::()?; Self::add_mem_ap( instance.downcast::>()?, + py, &ap_name.extract::()?, { if let Some(ap_addr) = ap_opts_dict.get_item("ap") { @@ -190,13 +185,11 @@ impl ArmDebug { fn add_mem_ap( slf: &PyCell, + py: Python, name: &str, ap: Option, csw_reset: Option, ) -> PyResult<()> { - let gil = Python::acquire_gil(); - let py = gil.python(); - let args = PyTuple::new( py, &[name.to_object(py), "origen.arm_debug.mem_ap".to_object(py)], @@ -253,7 +246,7 @@ impl DP { #[classmethod] #[args(_block_options = "**")] - fn model_init(_cls: &PyType, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { + fn model_init(_cls: &PyType, py: Python, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { // Require an ArmDebug ID to tie this DP to an ArmDebug instance let arm_debug_id; if let Some(opts) = block_options { @@ -276,8 +269,6 @@ impl DP { )); } - let gil = Python::acquire_gil(); - let py = gil.python(); let obj = instance.to_object(py); let args = PyTuple::new(py, &["default".to_object(py), "default".to_object(py)]); let dp_id; @@ -357,7 +348,7 @@ impl JtagDP { #[classmethod] #[args(_block_options = "**")] - fn model_init(_cls: &PyType, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { + fn model_init(_cls: &PyType, py: Python, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { // Require an ArmDebug ID to tie this DP to an ArmDebug instance let arm_debug_id; if let Some(opts) = block_options { @@ -380,8 +371,6 @@ impl JtagDP { )); } - let gil = Python::acquire_gil(); - let py = gil.python(); let obj = instance.to_object(py); let args = PyTuple::new(py, &["default".to_object(py), "default".to_object(py)]); let id; @@ -515,7 +504,7 @@ impl MemAP { } #[classmethod] - fn model_init(_cls: &PyType, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { + fn model_init(_cls: &PyType, py: Python, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { // Require an ArmDebug ID to tie this DP to an ArmDebug instance let arm_debug_id; if let Some(opts) = block_options { @@ -550,8 +539,6 @@ impl MemAP { addr = 0; } - let gil = Python::acquire_gil(); - let py = gil.python(); let obj = instance.to_object(py); let args = PyTuple::new(py, &["default".to_object(py), "default".to_object(py)]); let mem_ap_id; diff --git a/rust/pyapi/src/standard_sub_blocks/mod.rs b/rust/pyapi/src/standard_sub_blocks/mod.rs index de211ca8..c153c487 100644 --- a/rust/pyapi/src/standard_sub_blocks/mod.rs +++ b/rust/pyapi/src/standard_sub_blocks/mod.rs @@ -1,7 +1,6 @@ mod arm_debug; use pyo3::prelude::*; -use pyo3::wrap_pymodule; pub fn define(py: Python, m: &PyModule) -> PyResult<()> { let subm = PyModule::new(py, "standard_sub_blocks")?; diff --git a/rust/pyapi/src/tester.rs b/rust/pyapi/src/tester.rs index 1ae8f17d..af307569 100644 --- a/rust/pyapi/src/tester.rs +++ b/rust/pyapi/src/tester.rs @@ -31,7 +31,7 @@ pub struct PyTester { #[pymethods] impl PyTester { #[new] - fn new(py: Python) -> PyResult { + fn new() -> PyResult { origen::tester().init()?; Ok(PyTester { python_testers: HashMap::new(), @@ -142,11 +142,9 @@ impl PyTester { /// * :meth:`set_timeset` /// * :class:`_origen.dut.timesets.Timeset` /// * :ref:`Timing ` - fn get_timeset(&self) -> PyResult { + fn get_timeset(&self, py: Python) -> PyResult { let tester = origen::tester(); let dut = origen::dut(); - let gil = Python::acquire_gil(); - let py = gil.python(); if let Some(t) = tester.get_timeset(&dut) { Ok(Py::new( py, @@ -164,7 +162,7 @@ impl PyTester { #[setter] // Note - do not add doc strings here. Add to get_timeset above. - fn timeset(&self, timeset: &PyAny) -> PyResult<()> { + fn timeset(&self, py: Python, timeset: &PyAny) -> PyResult<()> { let (model_id, timeset_name); // If the timeset is a string, assume its a timeset name on the DUT. @@ -179,11 +177,9 @@ impl PyTester { let mut tester = origen::TESTER.lock().unwrap(); tester.clear_timeset()?; } - self.issue_callbacks("clear_timeset")?; + self.issue_callbacks(py, "clear_timeset")?; return Ok(()); } else if timeset.get_type().name()?.to_string() == "Timeset" { - let gil = Python::acquire_gil(); - let py = gil.python(); let obj = timeset.to_object(py); model_id = obj .getattr(py, "__origen__model_id__")? @@ -200,7 +196,7 @@ impl PyTester { let dut = origen::DUT.lock().unwrap(); tester.set_timeset(&dut, model_id, ×et_name)?; } - self.issue_callbacks("set_timeset")?; + self.issue_callbacks(py, "set_timeset")?; } Ok(()) } @@ -220,17 +216,15 @@ impl PyTester { /// * :meth:`timeset` /// * :class:`_origen.dut.timesets.Timeset` /// * :ref:`Timing ` - fn apply_timeset(&self, timeset: &PyAny) -> PyResult { - self.timeset(timeset)?; - self.get_timeset() + fn apply_timeset(&self, py: Python, timeset: &PyAny) -> PyResult { + self.timeset(py, timeset)?; + self.get_timeset(py) } #[getter] - fn get_pin_header(&self) -> PyResult { + fn get_pin_header(&self, py: Python) -> PyResult { let tester = origen::tester(); let dut = origen::dut(); - let gil = Python::acquire_gil(); - let py = gil.python(); if let Some(header) = tester.get_pin_header(&dut) { Ok(Py::new( @@ -248,7 +242,7 @@ impl PyTester { } #[setter] - fn pin_header(&self, pin_header: &PyAny) -> PyResult<()> { + fn pin_header(&self, py: Python, pin_header: &PyAny) -> PyResult<()> { let (model_id, pin_header_name); if pin_header.get_type().name()?.to_string() == "NoneType" { @@ -256,11 +250,9 @@ impl PyTester { let mut tester = origen::TESTER.lock().unwrap(); tester.clear_pin_header()?; } - self.issue_callbacks("clear_pin_header")?; + self.issue_callbacks(py, "clear_pin_header")?; return Ok(()); } else if pin_header.get_type().name()?.to_string() == "PinHeader" { - let gil = Python::acquire_gil(); - let py = gil.python(); let obj = pin_header.to_object(py); model_id = obj .getattr(py, "__origen__model_id__")? @@ -276,14 +268,14 @@ impl PyTester { let dut = origen::DUT.lock().unwrap(); tester.set_pin_header(&dut, model_id, &pin_header_name)?; } - self.issue_callbacks("set_pin_header")?; + self.issue_callbacks(py, "set_pin_header")?; } Ok(()) } - fn apply_pin_header(&self, pin_header: &PyAny) -> PyResult { - self.pin_header(pin_header)?; - self.get_pin_header() + fn apply_pin_header(&self, py: Python, pin_header: &PyAny) -> PyResult { + self.pin_header(py, pin_header)?; + self.get_pin_header(py) } /// cc(comment: str) -> self @@ -299,12 +291,12 @@ impl PyTester { /// -------- /// * {{ link_to('prog-gen:comments', 'Commenting pattern source') }} /// * {{ link_to('pat-gen:comments', 'Commenting program source') }} - fn cc(slf: PyRef, comment: &str) -> PyResult> { + fn cc(slf: PyRef, py: Python, comment: &str) -> PyResult> { { let mut tester = origen::tester(); tester.cc(&comment)?; } - slf.issue_callbacks("cc")?; + slf.issue_callbacks(py, "cc")?; Ok(slf.into()) } @@ -328,7 +320,7 @@ impl PyTester { Ok(tester.end_pattern()?) } - fn issue_callbacks(&self, func: &str) -> PyResult<()> { + fn issue_callbacks(&self, py: Python, func: &str) -> PyResult<()> { // Get the current targeted testers let targets; { @@ -345,8 +337,6 @@ impl PyTester { Some(inst) => { // The tester here is a PyObject - a handle on the class itself. // Instantiate it and call its render method with the AST. - let gil = Python::acquire_gil(); - let py = gil.python(); let last_node = TEST.get(0).unwrap().to_pickle(); let args = PyTuple::new(py, &[func.to_object(py), last_node.to_object(py)]); @@ -375,7 +365,7 @@ impl PyTester { /// cycle(**kwargs) -> self #[args(kwargs = "**")] - fn cycle(slf: PyRef, kwargs: Option<&PyDict>) -> PyResult> { + fn cycle(slf: PyRef, py: Python, kwargs: Option<&PyDict>) -> PyResult> { { let mut tester = origen::tester(); let mut repeat = None; @@ -386,17 +376,15 @@ impl PyTester { } tester.cycle(repeat)?; } - slf.issue_callbacks("cycle")?; + slf.issue_callbacks(py, "cycle")?; Ok(slf.into()) } - fn repeat(slf: PyRef, count: usize) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn repeat(slf: PyRef, py: Python, count: usize) -> PyResult> { let kwargs = PyDict::new(py); kwargs.set_item("repeat", count)?; - Self::cycle(slf, Some(&kwargs)) + Self::cycle(slf, py, Some(&kwargs)) } #[args( @@ -408,6 +396,7 @@ impl PyTester { )] fn overlay( slf: PyRef, + py: Python, label: Option, symbol: Option, pins: Option>, @@ -428,13 +417,14 @@ impl PyTester { let tester = origen::tester(); tester.overlay(&origen::Overlay::new(label, symbol, cycles, mask, pin_ids)?)?; } - slf.issue_callbacks("overlay")?; + slf.issue_callbacks(py, "overlay")?; Ok(slf.into()) } #[args(symbol = "None", cycles = "None", mask = "None", pins = "None")] fn capture( slf: PyRef, + py: Python, symbol: Option, cycles: Option, mask: Option, @@ -454,14 +444,12 @@ impl PyTester { let tester = origen::tester(); tester.capture(&origen::Capture::new(symbol, cycles, mask, pin_ids)?)?; } - slf.issue_callbacks("capture")?; + slf.issue_callbacks(py, "capture")?; Ok(slf.into()) } - fn register_tester(&mut self, g: &PyAny) -> PyResult<()> { + fn register_tester(&mut self, py: Python, g: &PyAny) -> PyResult<()> { let mut tester = origen::tester(); - let gil = Python::acquire_gil(); - let py = gil.python(); let obj = g.to_object(py); let mut n = obj.getattr(py, "__module__")?.extract::(py)?; @@ -476,7 +464,7 @@ impl PyTester { } #[args(testers = "*")] - fn target(&mut self, testers: &PyTuple) -> PyResult> { + fn target(&mut self, py: Python, testers: &PyTuple) -> PyResult> { if testers.len() > 0 { let mut tester = origen::tester(); for g in testers.iter() { @@ -484,9 +472,6 @@ impl PyTester { if let Ok(name) = g.extract::() { tester.target(SupportedTester::new(&name)?)?; } else { - let gil = Python::acquire_gil(); - let py = gil.python(); - let obj = g.to_object(py); let mut n = obj.getattr(py, "__module__")?.extract::(py)?; n.push_str(&format!( @@ -522,7 +507,7 @@ impl PyTester { /// Continue on fail means that any errors will be logged but Origen will continue, if false /// it will blow up and immediately return an error to Python. #[args(continue_on_fail = false)] - fn render_pattern(&self, continue_on_fail: bool) -> PyResult> { + fn render_pattern(&self, py: Python, continue_on_fail: bool) -> PyResult> { if origen::LOGGER.has_keyword("show_unprocessed_ast") { origen::LOGGER.info("Showing Unprocessed AST"); origen::LOGGER.info(&format!("{:?}", origen::TEST)); @@ -541,8 +526,6 @@ impl PyTester { Some(inst) => { // The tester here is a PyObject - a handle on the class itself. // Instantiate it and call its render method with the AST. - let gil = Python::acquire_gil(); - let py = gil.python(); let _pat = inst.call_method0(py, "render_pattern")?; // TODO - How do we convert this to a path to do the diffing? } diff --git a/rust/pyapi/src/timesets.rs b/rust/pyapi/src/timesets.rs index cd58b7de..c11c337a 100644 --- a/rust/pyapi/src/timesets.rs +++ b/rust/pyapi/src/timesets.rs @@ -46,6 +46,7 @@ impl PyDUT { #[args(kwargs = "**")] fn add_timeset( &self, + py: Python, model_id: usize, name: &str, period: &PyAny, @@ -89,23 +90,17 @@ impl PyDUT { }, )?; - let gil = Python::acquire_gil(); - let py = gil.python(); let model = dut.get_mut_model(model_id)?; Ok(pytimeset!(py, model, model_id, name)?) } - fn timeset(&self, model_id: usize, name: &str) -> PyResult { + fn timeset(&self, py: Python, model_id: usize, name: &str) -> PyResult { let mut dut = DUT.lock().unwrap(); let model = dut.get_mut_model(model_id)?; - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(pytimeset_or_pynone!(py, model, model_id, name)) } - fn timesets(&self, model_id: usize) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn timesets(&self, py: Python, model_id: usize) -> PyResult> { Ok(pytimeset_container!(py, model_id)) } } diff --git a/rust/pyapi/src/timesets/timeset.rs b/rust/pyapi/src/timesets/timeset.rs index 7d9b6eba..4593e9b3 100644 --- a/rust/pyapi/src/timesets/timeset.rs +++ b/rust/pyapi/src/timesets/timeset.rs @@ -188,12 +188,10 @@ impl Timeset { } #[getter] - fn get_default_period(&self) -> PyResult { + fn get_default_period(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let timeset = dut._get_timeset(self.model_id, &self.name)?; - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(match timeset.default_period { Some(p) => p.to_object(py), None => py.None(), @@ -210,11 +208,9 @@ impl Timeset { #[allow(non_snake_case)] #[getter] - fn get___period__(&self) -> PyResult { + fn get___period__(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let timeset = dut._get_timeset(self.model_id, &self.name)?; - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(match ×et.period_as_string { Some(p) => p.clone().to_object(py), None => py.None(), @@ -222,18 +218,16 @@ impl Timeset { } #[getter] - fn wavetables(&self) -> PyResult> { + fn wavetables(&self, py: Python) -> PyResult> { let t_id; { t_id = self.get_origen_id()?; } - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(pywavetable_container!(py, self.model_id, t_id, &self.name)) } #[args(_kwargs = "**")] - fn add_wavetable(&self, name: &str, _kwargs: Option<&PyDict>) -> PyResult { + fn add_wavetable(&self, py: Python, name: &str, _kwargs: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let t_id; { @@ -241,14 +235,12 @@ impl Timeset { } dut.create_wavetable(t_id, name)?; - let gil = Python::acquire_gil(); - let py = gil.python(); let tset = dut._get_timeset(self.model_id, &self.name).unwrap(); Ok(pywavetable!(py, tset, t_id, name)?) } #[getter] - fn symbol_map(&self) -> PyResult { + fn symbol_map(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let t_id; { @@ -256,8 +248,6 @@ impl Timeset { } let tester = origen::tester(); - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(Py::new( py, crate::timesets::timeset::SymbolMap { @@ -275,7 +265,7 @@ impl Timeset { } #[getter] - fn symbol_maps(&self) -> PyResult> { + fn symbol_maps(&self, py: Python) -> PyResult> { let dut = DUT.lock().unwrap(); let t = dut._get_timeset(self.model_id, &self.name).unwrap(); let t_id; @@ -283,8 +273,6 @@ impl Timeset { t_id = t.id; } - let gil = Python::acquire_gil(); - let py = gil.python(); let retn = t .pin_action_resolvers .keys() @@ -331,7 +319,7 @@ pub struct Wavetable { #[pymethods] impl Wavetable { #[args(_kwargs = "**")] - fn add_waves(&self, name: &str, _kwargs: Option<&PyDict>) -> PyResult { + fn add_waves(&self, py: Python, name: &str, _kwargs: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let w_id; { @@ -339,25 +327,21 @@ impl Wavetable { } dut.create_wave_group(w_id, name, Option::None)?; - let gil = Python::acquire_gil(); - let py = gil.python(); let wt = dut.get_wavetable(self.timeset_id, &self.name).unwrap(); Ok(pywave_group!(py, wt, name)?) } #[args(_kwargs = "**")] - fn add_wave(&self, name: &str, _kwargs: Option<&PyDict>) -> PyResult { - self.add_waves(name, _kwargs) + fn add_wave(&self, py: Python, name: &str, _kwargs: Option<&PyDict>) -> PyResult { + self.add_waves(py, name, _kwargs) } #[getter] - fn get_waves(&self) -> PyResult> { + fn get_waves(&self, py: Python) -> PyResult> { let w_id; { w_id = self.get_origen_id()?; } - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(pywave_group_container!( py, self.model_id, @@ -391,24 +375,20 @@ impl Wavetable { /// } /// } /// - fn applied_waves(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn applied_waves(&self, py: Python) -> PyResult { let empty: [PyObject; 0] = []; let t = PyTuple::new(py, &empty); - self.applied_waves_for(t, None) + self.applied_waves_for(py, t, None) } /// Same as :meth:`applied_waves` but supports internal filtering of the return values. #[args(pins = "*")] fn applied_waves_for( &self, + py: Python, pins: &PyTuple, indicators: Option>, ) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - let dut = DUT.lock().unwrap(); let wt = dut._get_wavetable(self.timeset_id, &self.name)?; let waves = wt.applied_waves( @@ -420,9 +400,7 @@ impl Wavetable { } #[getter] - fn get_symbol_map(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn get_symbol_map(&self, py: Python) -> PyResult { let tester = origen::tester(); match tester.focused_tester_name() { Some(name) => Ok(Py::new(py, SymbolMap::new(self.timeset_id, name)) @@ -442,13 +420,11 @@ impl Wavetable { // Evaluates and returns the period. // Returns None if no period was specified or an error if it could not be evaluated. #[getter] - pub fn get_period(&self) -> PyResult { + pub fn get_period(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let wt = dut.get_wavetable(self.timeset_id, &self.name); let p = wt.unwrap().eval(Option::None)?; - let gil = Python::acquire_gil(); - let py = gil.python(); match p { Some(_p) => Ok(_p.to_object(py)), None => Ok(py.None()), @@ -476,13 +452,11 @@ impl Wavetable { // Returns the period as a string before evaluation. #[allow(non_snake_case)] #[getter] - pub fn get___period__(&self) -> PyResult { + pub fn get___period__(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let wt = dut.get_wavetable(self.timeset_id, &self.name); let p = &wt.unwrap().period; - let gil = Python::acquire_gil(); - let py = gil.python(); match p { Some(_p) => Ok(_p.to_object(py)), None => Ok(py.None()), @@ -518,7 +492,7 @@ pub struct WaveGroup { #[pymethods] impl WaveGroup { #[args(_kwargs = "**")] - fn add_wave(&self, name: &str, _kwargs: Option<&PyDict>) -> PyResult { + fn add_wave(&self, py: Python, name: &str, _kwargs: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let wgrp_id; { @@ -541,20 +515,16 @@ impl WaveGroup { } dut.create_wave(wgrp_id, name, derived_from)?; - let gil = Python::acquire_gil(); - let py = gil.python(); let wgrp = dut.get_wave_group(self.wavetable_id, &self.name).unwrap(); Ok(pywave!(py, wgrp, name)?) } #[getter] - fn get_waves(&self) -> PyResult> { + fn get_waves(&self, py: Python) -> PyResult> { let wgrp_id; { wgrp_id = self.get_origen_id()?; } - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(pywave_container!( py, self.model_id, @@ -603,9 +573,7 @@ pub struct Wave { #[pymethods] impl Wave { #[getter] - fn get_events(&self) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn get_events(&self, py: Python) -> PyResult> { let wave_id; { wave_id = self.get_origen_id()?; @@ -622,7 +590,7 @@ impl Wave { } #[args(event = "**")] - fn push_event(&self, event: Option<&PyDict>) -> PyResult { + fn push_event(&self, py: Python, event: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let (w_id, e_index); { @@ -697,9 +665,6 @@ impl Wave { } // Return the newly created event - let gil = Python::acquire_gil(); - let py = gil.python(); - let w = dut.get_wave(self.wave_group_id, &self.name).unwrap(); Ok(pyevent!(py, w, e_index)?) } @@ -720,11 +685,9 @@ impl Wave { } #[getter] - fn get_applied_to(&self) -> PyResult> { + fn get_applied_to(&self, py: Python) -> PyResult> { let dut = DUT.lock().unwrap(); let w = dut.get_wave(self.wave_group_id, &self.name).unwrap(); - let gil = Python::acquire_gil(); - let py = gil.python(); let mut pins: Vec = vec![]; for p in w.applied_pin_ids.iter() { @@ -741,7 +704,7 @@ impl Wave { } #[args(pins = "*")] - fn apply_to(&self, pins: Vec) -> PyResult { + fn apply_to(&self, py: Python, pins: Vec) -> PyResult { let mut dut = DUT.lock().unwrap(); let wid; { @@ -754,8 +717,6 @@ impl Wave { pins.iter().map(|pin| (0, pin.clone())).collect(); dut.apply_wave_id_to_pins(wid, &pins_with_model_id)?; - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(Py::new( py, crate::timesets::timeset::Wave { @@ -873,12 +834,10 @@ impl Event { } #[getter] - pub fn unit(&self) -> PyResult { + pub fn unit(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let e = dut.get_event(self.wave_id, self.index).unwrap(); - let gil = Python::acquire_gil(); - let py = gil.python(); match &e.unit { Some(unit) => Ok(unit.clone().to_object(py)), None => Ok(py.None()), @@ -886,12 +845,9 @@ impl Event { } #[getter] - pub fn at(&self) -> PyResult { + pub fn at(&self, py: Python) -> PyResult { let dut = DUT.lock().unwrap(); let e = dut.get_event(self.wave_id, self.index).unwrap(); - - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(e.eval(&dut, Option::None)?.to_object(py)) } @@ -1004,9 +960,7 @@ impl SymbolMap { .collect::>()) } - fn get(&self, action: &PyAny) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn get(&self, py: Python, action: &PyAny) -> PyResult { match self.__getitem__(action) { Ok(a) => Ok(a.into_py(py)), Err(_) => Ok(py.None()), @@ -1037,7 +991,7 @@ impl SymbolMap { } } - fn for_target(&self, target: String) -> PyResult { + fn for_target(&self, py: Python, target: String) -> PyResult { let dut = DUT.lock().unwrap(); { let t = &dut.timesets[self.timeset_id]; @@ -1050,8 +1004,6 @@ impl SymbolMap { } } - let gil = Python::acquire_gil(); - let py = gil.python(); Ok(Py::new( py, crate::timesets::timeset::SymbolMap { diff --git a/rust/pyapi/src/utility/caller.rs b/rust/pyapi/src/utility/caller.rs index cde24b1d..85a04b94 100644 --- a/rust/pyapi/src/utility/caller.rs +++ b/rust/pyapi/src/utility/caller.rs @@ -1,3 +1,4 @@ +// TODO any of this used/needed? //! Provides helper functions to get the caller information from Python #![allow(dead_code)] @@ -114,33 +115,33 @@ pub fn stack() -> Option> { } fn _get_stack(max_depth: Option, filter: Filter) -> Result, PyErr> { - let gil = Python::acquire_gil(); - let py = gil.python(); - let inspect = PyModule::import(py, "inspect")?; - let stack: Vec> = inspect.getattr("stack")?.call0()?.extract()?; - let mut frames: Vec = vec![]; - for f in stack { - let filename: String = f[1].extract()?; - let include = match filter { - Filter::None => true, - Filter::StartsWith(s) => filename.starts_with(s), - Filter::Contains(s) => filename.contains(s), - }; - if include { - frames.push(FrameInfo { - filename: filename, - lineno: f[2].extract()?, - function: f[3].extract()?, - code_context: f[4].extract()?, - index: f[5].extract()?, - }); + Python::with_gil(|py| { + let inspect = PyModule::import(py, "inspect")?; + let stack: Vec> = inspect.getattr("stack")?.call0()?.extract()?; + let mut frames: Vec = vec![]; + for f in stack { + let filename: String = f[1].extract()?; + let include = match filter { + Filter::None => true, + Filter::StartsWith(s) => filename.starts_with(s), + Filter::Contains(s) => filename.contains(s), + }; + if include { + frames.push(FrameInfo { + filename: filename, + lineno: f[2].extract()?, + function: f[3].extract()?, + code_context: f[4].extract()?, + index: f[5].extract()?, + }); - if let Some(x) = max_depth { - if x == frames.len() { - break; + if let Some(x) = max_depth { + if x == frames.len() { + break; + } } } } - } - Ok(frames) + Ok(frames) + }) } diff --git a/rust/pyapi/src/utility/location.rs b/rust/pyapi/src/utility/location.rs index 9f0ccdeb..16e804c7 100644 --- a/rust/pyapi/src/utility/location.rs +++ b/rust/pyapi/src/utility/location.rs @@ -26,9 +26,7 @@ impl Location { /// str: URL as a ``str``, if the Location points to a URL /// None: Otherwise #[getter] - fn url(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn url(&self, py: Python) -> PyResult { Ok(match self.location.url() { Some(url) => url.to_object(py), None => py.None(), @@ -45,9 +43,7 @@ impl Location { /// str: Repo URL as a ``str``, if the Location points to a Git repo /// None: Otherwise #[getter] - fn git(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn git(&self, py: Python) -> PyResult { Ok(match self.location.git() { Some(git) => git.to_object(py), None => py.None(), @@ -60,9 +56,7 @@ impl Location { /// str: Repo URL as a ``str``, if the Location points to a Git repo via HTTPS /// None: Otherwise #[getter] - fn git_https(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn git_https(&self, py: Python) -> PyResult { Ok(match self.location.git_https() { Some(git) => git.to_object(py), None => py.None(), @@ -75,9 +69,7 @@ impl Location { /// str: Repo URL as a ``str``, if the Location points to a Git repo via SSH /// None: Otherwise #[getter] - fn git_ssh(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn git_ssh(&self, py: Python) -> PyResult { Ok(match self.location.git_ssh() { Some(git) => git.to_object(py), None => py.None(), @@ -90,9 +82,7 @@ impl Location { /// pathlib.Path: Repo URL as a |pathlib.Path| object, if the Location points to a local path. /// None: Otherwise #[getter] - fn path(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn path(&self, py: Python) -> PyResult { Ok(match self.location.path() { Some(_path) => pypath!(py, self.location.location), None => py.None(), diff --git a/rust/pyapi/src/utility/mod.rs b/rust/pyapi/src/utility/mod.rs index 5bde2587..0494e2ef 100644 --- a/rust/pyapi/src/utility/mod.rs +++ b/rust/pyapi/src/utility/mod.rs @@ -16,7 +16,7 @@ pub mod website; use location::Location; use pyo3::prelude::*; -use pyo3::{wrap_pyfunction, wrap_pymodule}; +use pyo3::wrap_pyfunction; use transaction::Transaction; use version::Version; @@ -124,9 +124,6 @@ fn app_utility( default: Option<&str>, use_by_default: bool, ) -> PyResult> { - let gil = Python::acquire_gil(); - let py = gil.python(); - let system: &str; let conf_t: HashMap; let conf_; @@ -167,8 +164,10 @@ fn app_utility( let split = system.rsplitn(2, "."); if split.count() == 2 { // Have a class (hopefully) of the form 'a.b.Class' - let py_conf = pyapi_metal::_helpers::map_to_pydict(py, &mut conf_.iter())?; - Ok(Some(new_obj(py, system, py_conf.as_ref(py))?)) + Python::with_gil(|py| { + let py_conf = pyapi_metal::_helpers::map_to_pydict(py, &mut conf_.iter())?; + Ok(Some(new_obj(py, system, py_conf.as_ref(py))?)) + }) } else { // fall back to some enumerated systems if &system.to_lowercase() == "none" { diff --git a/rust/pyapi/src/utility/publisher/_frontend.rs b/rust/pyapi/src/utility/publisher/_frontend.rs index b43e439e..d86f040b 100644 --- a/rust/pyapi/src/utility/publisher/_frontend.rs +++ b/rust/pyapi/src/utility/publisher/_frontend.rs @@ -9,13 +9,13 @@ pub struct Publisher {} impl ofrontend::Publisher for Publisher { fn build_package(&self) -> Result { - let gil = Python::acquire_gil(); - let py = gil.python(); - let pyapp = get_pyapp(py)?; - let pb = PyApplication::_get_publisher(pyapp, py)?; - let py_pbr = pb.call_method0(py, "build_package")?; - let pbr = py_pbr.extract::>(py)?; - Ok(pbr.build_result()?.clone()) + Python::with_gil(|py| { + let pyapp = get_pyapp(py)?; + let pb = PyApplication::_get_publisher(pyapp, py)?; + let py_pbr = pb.call_method0(py, "build_package")?; + let pbr = py_pbr.extract::>(py)?; + Ok(pbr.build_result()?.clone()) + }) } fn upload( @@ -23,22 +23,22 @@ impl ofrontend::Publisher for Publisher { build_result: &Outcome, dry_run: bool, ) -> Result { - let gil = Python::acquire_gil(); - let py = gil.python(); - let pyapp = get_pyapp(py)?; - let pb = PyApplication::_get_publisher(pyapp, py)?; - let py_pbr = pb.call_method1( - py, - "upload", - PyTuple::new( + Python::with_gil(|py| { + let pyapp = get_pyapp(py)?; + let pb = PyApplication::_get_publisher(pyapp, py)?; + let py_pbr = pb.call_method1( py, - &[ - BuildResult::to_py(py, build_result)?.to_object(py), - dry_run.to_object(py), - ], - ), - )?; - let pur = py_pbr.extract::>(py)?; - Ok(pur.upload_result()?.clone()) + "upload", + PyTuple::new( + py, + &[ + BuildResult::to_py(py, build_result)?.to_object(py), + dry_run.to_object(py), + ], + ), + )?; + let pur = py_pbr.extract::>(py)?; + Ok(pur.upload_result()?.clone()) + }) } } diff --git a/rust/pyapi/src/utility/release_scribe/_frontend.rs b/rust/pyapi/src/utility/release_scribe/_frontend.rs index 1689710d..b1fb7c6e 100644 --- a/rust/pyapi/src/utility/release_scribe/_frontend.rs +++ b/rust/pyapi/src/utility/release_scribe/_frontend.rs @@ -80,10 +80,10 @@ impl ReleaseScribe { where F: FnMut(Python, PyObject) -> PyResult, { - let gil = Python::acquire_gil(); - let py = gil.python(); - let pyapp = get_pyapp(py)?; - let rs = PyApplication::_get_release_scribe(pyapp, py)?; - func(py, rs) + Python::with_gil(|py| { + let pyapp = get_pyapp(py)?; + let rs = PyApplication::_get_release_scribe(pyapp, py)?; + func(py, rs) + }) } } diff --git a/rust/pyapi/src/utility/release_scribe/mod.rs b/rust/pyapi/src/utility/release_scribe/mod.rs index b83e3d3e..41abbd43 100644 --- a/rust/pyapi/src/utility/release_scribe/mod.rs +++ b/rust/pyapi/src/utility/release_scribe/mod.rs @@ -67,9 +67,7 @@ impl ReleaseScribe { } #[getter] - fn release_note_file(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn release_note_file(&self, py: Python) -> PyResult { Ok(crate::pypath!( py, format!("{}", self.rs.release_file.display()) @@ -89,9 +87,7 @@ impl ReleaseScribe { } #[getter] - fn history_tracking_file(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn history_tracking_file(&self, py: Python) -> PyResult { Ok(crate::pypath!( py, format!("{}", self.rs.history_toml.display()) diff --git a/rust/pyapi/src/utility/revision_control/mod.rs b/rust/pyapi/src/utility/revision_control/mod.rs index e7da3009..680603b3 100644 --- a/rust/pyapi/src/utility/revision_control/mod.rs +++ b/rust/pyapi/src/utility/revision_control/mod.rs @@ -18,7 +18,7 @@ pub fn define(py: Python, m: &PyModule) -> PyResult<()> { /// Creates a RC driver from the application's ``config.toml`` #[pyfunction] -fn app_rc() -> PyResult> { +fn app_rc(py: Python) -> PyResult> { // Raise an error if we aren't in an application instance let app; match &STATUS.app { @@ -47,8 +47,6 @@ fn app_rc() -> PyResult> { } // fall back to Rust's lookup parameters - let gil = Python::acquire_gil(); - let py = gil.python(); let locals = PyDict::new(py); let py_rc_config = PyDict::new(py); for (k, v) in rc_config.iter() { diff --git a/rust/pyapi/src/utility/transaction.rs b/rust/pyapi/src/utility/transaction.rs index f45ce581..1a8143bf 100644 --- a/rust/pyapi/src/utility/transaction.rs +++ b/rust/pyapi/src/utility/transaction.rs @@ -63,10 +63,7 @@ impl Transaction { } #[getter] - fn address(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - + fn address(&self, py: Python) -> PyResult { if let Some(a) = &self.transaction.address { Ok(a.to_object(py)) } else { @@ -75,8 +72,8 @@ impl Transaction { } #[getter] - fn addr(&self) -> PyResult { - self.address() + fn addr(&self, py: Python) -> PyResult { + self.address(py) } #[getter] @@ -85,10 +82,7 @@ impl Transaction { } #[getter] - fn address_width(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - + fn address_width(&self, py: Python) -> PyResult { if let Some(a) = self.transaction.address_width { Ok(a.to_object(py)) } else { @@ -97,16 +91,13 @@ impl Transaction { } #[getter] - fn addr_width(&self) -> PyResult { - self.address_width() + fn addr_width(&self, py: Python) -> PyResult { + self.address_width(py) } #[getter] - fn register(&self) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); + fn register(&self, py: Python) -> PyResult { let dut = origen::dut(); - if let Some(id) = self.transaction.reg_id { Ok(crate::registers::bit_collection::BitCollection::from_reg_id(id, &dut).into_py(py)) } else { @@ -115,7 +106,7 @@ impl Transaction { } #[getter] - fn reg(&self) -> PyResult { - self.register() + fn reg(&self, py: Python) -> PyResult { + self.register(py) } } diff --git a/rust/pyapi/src/utility/unit_testers/_frontend.rs b/rust/pyapi/src/utility/unit_testers/_frontend.rs index bf42536a..cab16dff 100644 --- a/rust/pyapi/src/utility/unit_testers/_frontend.rs +++ b/rust/pyapi/src/utility/unit_testers/_frontend.rs @@ -8,15 +8,15 @@ pub struct UnitTester {} impl origen::core::frontend::UnitTester for UnitTester { fn run(&self) -> Result { - let gil = Python::acquire_gil(); - let py = gil.python(); - let pyapp = get_pyapp(py)?; - let ut = PyApplication::_get_ut(pyapp, py)?; - let pystat = ut.call_method0(py, "run")?; - let stat = pystat.extract::>(py)?; - match stat.orr.as_ref() { - Some(rr) => Ok(rr.clone()), - None => runtime_error!("Incomplete or Uninitialized RunResult encountered")?, - } + Python::with_gil(|py| { + let pyapp = get_pyapp(py)?; + let ut = PyApplication::_get_ut(pyapp, py)?; + let pystat = ut.call_method0(py, "run")?; + let stat = pystat.extract::>(py)?; + match stat.orr.as_ref() { + Some(rr) => Ok(rr.clone()), + None => runtime_error!("Incomplete or Uninitialized RunResult encountered")?, + } + }) } } diff --git a/rust/pyapi/src/utility/unit_testers/mod.rs b/rust/pyapi/src/utility/unit_testers/mod.rs index e7ad3852..9138768f 100644 --- a/rust/pyapi/src/utility/unit_testers/mod.rs +++ b/rust/pyapi/src/utility/unit_testers/mod.rs @@ -72,17 +72,17 @@ impl RunResult { // Returns a new pytest driver with the parameters from the app config pub fn new_pytest_driver(py_config: &PyDict) -> PyResult { - let gil = Python::acquire_gil(); - let py = gil.python(); - let locals = PyDict::new(py); - locals.set_item("py_config", py_config)?; - locals.set_item( - "origen_pytester", - py.import("origen.utility.unit_testers.pytest")? - .to_object(py), - )?; - let pytester = py.eval("origen_pytester.PyTest(py_config)", Some(locals), None)?; - Ok(pytester.to_object(py)) + Python::with_gil(|py| { + let locals = PyDict::new(py); + locals.set_item("py_config", py_config)?; + locals.set_item( + "origen_pytester", + py.import("origen.utility.unit_testers.pytest")? + .to_object(py), + )?; + let pytester = py.eval("origen_pytester.PyTest(py_config)", Some(locals), None)?; + Ok(pytester.to_object(py)) + }) } /// Creates a unit test driver from the application's ``config.toml`` @@ -100,35 +100,35 @@ fn app_unit_tester() -> PyResult> { } let config = app.config(); - let gil = Python::acquire_gil(); - let py = gil.python(); - if let Some(ut_config) = &config.unit_tester { - if let Some(c) = ut_config.get("system") { - // Get the module and try to import it - let split = c.rsplitn(1, "."); - if split.count() == 2 { - // Have a class (hopefully) of the form 'a.b.Class' - // let py_config = hashmap_to_pydict(py, ut_config)?; - // return runtime_error!("custom unit tester not supported yet!"); - todo!(); - } else { - // fall back to some enumerated systems - if &c.to_lowercase() == "pytest" { - let py_config = map_to_pydict(py, &mut ut_config.iter())?; - Ok(Some(new_pytest_driver(py_config.as_ref(py))?)) - } else if &c.to_lowercase() == "none" { - Ok(None) + Python::with_gil(|py| { + if let Some(ut_config) = &config.unit_tester { + if let Some(c) = ut_config.get("system") { + // Get the module and try to import it + let split = c.rsplitn(1, "."); + if split.count() == 2 { + // Have a class (hopefully) of the form 'a.b.Class' + // let py_config = hashmap_to_pydict(py, ut_config)?; + // return runtime_error!("custom unit tester not supported yet!"); + todo!(); } else { - return runtime_error!(format!("Unrecognized unit tester system '{}'", c)); + // fall back to some enumerated systems + if &c.to_lowercase() == "pytest" { + let py_config = map_to_pydict(py, &mut ut_config.iter())?; + Ok(Some(new_pytest_driver(py_config.as_ref(py))?)) + } else if &c.to_lowercase() == "none" { + Ok(None) + } else { + return runtime_error!(format!("Unrecognized unit tester system '{}'", c)); + } } + } else { + // Invalid config + return runtime_error!("Could not discern unit tester from app config"); } } else { - // Invalid config - return runtime_error!("Could not discern unit tester from app config"); + let temp = HashMap::::new(); + let py_config = map_to_pydict(py, &mut temp.iter())?; + Ok(Some(new_pytest_driver(py_config.as_ref(py))?)) } - } else { - let temp = HashMap::::new(); - let py_config = map_to_pydict(py, &mut temp.iter())?; - Ok(Some(new_pytest_driver(py_config.as_ref(py))?)) - } + }) } diff --git a/rust/pyapi/src/utility/website/_frontend.rs b/rust/pyapi/src/utility/website/_frontend.rs index 0d2bc890..84601686 100644 --- a/rust/pyapi/src/utility/website/_frontend.rs +++ b/rust/pyapi/src/utility/website/_frontend.rs @@ -8,12 +8,12 @@ pub struct Website {} impl ofrontend::Website for Website { fn build(&self) -> Result { - let gil = Python::acquire_gil(); - let py = gil.python(); - let pyapp = get_pyapp(py)?; - let web = PyApplication::_get_website(pyapp, py)?; - let py_pbr = web.call_method0(py, "build")?; - let pbr = py_pbr.extract::>(py)?; - Ok(pbr.build_result()?.clone()) + Python::with_gil(|py| { + let pyapp = get_pyapp(py)?; + let web = PyApplication::_get_website(pyapp, py)?; + let py_pbr = web.call_method0(py, "build")?; + let pbr = py_pbr.extract::>(py)?; + Ok(pbr.build_result()?.clone()) + }) } } diff --git a/test_apps/python_app/example/commands/examples.py b/test_apps/python_app/example/commands/examples.py index 25ad6b01..4dba3fad 100644 --- a/test_apps/python_app/example/commands/examples.py +++ b/test_apps/python_app/example/commands/examples.py @@ -9,13 +9,17 @@ def run(**kwargs): origen.boot.exit = False run_cmd("generate", - files=["example/patterns"], - reference_dir="approved", + args={ + "files": ["example/patterns"], + "reference_dir": "approved", + }, targets=["dut/eagle", "tester/v93k_smt7", "tester/j750"]) run_cmd("generate", - files=["example/flows/o1_testcases/prb1.py"], - reference_dir="approved", + args={ + "files": ["example/flows/o1_testcases/prb1.py"], + "reference_dir": "approved", + }, targets=["dut/o1_dut", "tester/v93k_smt7"]) stats = origen.tester.stats() From 60559007ee2bfa2db30476700e2bf8fe25676664 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 18 Jul 2023 20:04:01 -0500 Subject: [PATCH 098/200] Bump to pyo3 18.0 --- rust/origen/Cargo.toml | 2 +- rust/origen_metal/Cargo.toml | 2 +- rust/pyapi/Cargo.lock | 24 ++++---- rust/pyapi/Cargo.toml | 2 +- rust/pyapi/src/application/mod.rs | 10 ++-- rust/pyapi/src/dut.rs | 1 + rust/pyapi/src/lib.rs | 1 + .../src/meta/py_like_apis/list_like_api.rs | 4 +- rust/pyapi/src/pins.rs | 8 +-- rust/pyapi/src/pins/pin_actions.rs | 2 +- rust/pyapi/src/pins/pin_collection.rs | 8 +-- rust/pyapi/src/pins/pin_container.rs | 2 +- rust/pyapi/src/pins/pin_group.rs | 12 ++-- rust/pyapi/src/prog_gen/flow_options.rs | 4 +- rust/pyapi/src/prog_gen/interface.rs | 36 +++++------ rust/pyapi/src/registers.rs | 14 +++++ rust/pyapi/src/registers/bit_collection.rs | 27 ++++----- rust/pyapi/src/registers/register.rs | 11 ++++ rust/pyapi/src/services/jtag.rs | 8 +-- rust/pyapi/src/services/simple.rs | 4 +- rust/pyapi/src/services/swd.rs | 8 +-- .../src/standard_sub_blocks/arm_debug.rs | 24 ++++---- rust/pyapi/src/tester.rs | 22 +++---- .../src/tester_apis/igxl/prog_gen_api.rs | 8 +-- .../src/tester_apis/v93k/prog_gen_api.rs | 4 +- rust/pyapi/src/timesets.rs | 2 +- rust/pyapi/src/timesets/timeset.rs | 14 ++--- rust/pyapi/src/utility/mod.rs | 13 ++-- rust/pyapi/src/utility/release_scribe/mod.rs | 4 +- rust/pyapi/src/utility/results.rs | 6 +- rust/pyapi/src/utility/sessions.rs | 4 +- rust/pyapi/src/utility/transaction.rs | 6 +- rust/pyapi_metal/Cargo.lock | 24 ++++---- rust/pyapi_metal/Cargo.toml | 2 +- rust/pyapi_metal/src/framework/logger.rs | 45 ++++++++------ rust/pyapi_metal/src/framework/outcomes.rs | 4 +- rust/pyapi_metal/src/framework/users.rs | 59 ++++++++++--------- rust/pyapi_metal/src/frontend/mod.rs | 3 +- .../src/frontend/py_data_stores.rs | 2 +- rust/pyapi_metal/src/utils/differ.rs | 7 +-- rust/pyapi_metal/src/utils/ldap.rs | 7 +-- rust/pyapi_metal/src/utils/mailer/mailer.rs | 2 +- .../pyapi_metal/src/utils/mailer/maillists.rs | 2 +- .../src/utils/revision_control/mod.rs | 2 +- .../utils/revision_control/supported/git.rs | 9 +-- 45 files changed, 246 insertions(+), 219 deletions(-) diff --git a/rust/origen/Cargo.toml b/rust/origen/Cargo.toml index a419a1bd..b5b1e371 100644 --- a/rust/origen/Cargo.toml +++ b/rust/origen/Cargo.toml @@ -45,7 +45,7 @@ git2 = "0.13" num-bigint = {version = "0.4.0", features = ["serde"]} # Enabling this feature stops the CLI from depending on libpython. PYO3 is only included # in origen to enable conversion of an Origen error to a PyErr. -pyo3 = {version = "0.17.3", features = ["extension-module", "auto-initialize"]} +pyo3 = {version = "0.18.3", features = ["extension-module", "auto-initialize"]} chrono = "0.4.11" origen-core-support = { version = "0.1.0-dev.1", path = "./origen-core-support" } whoami = "0.8" # TODO diff --git a/rust/origen_metal/Cargo.toml b/rust/origen_metal/Cargo.toml index 09b0c49b..e894aeef 100644 --- a/rust/origen_metal/Cargo.toml +++ b/rust/origen_metal/Cargo.toml @@ -19,7 +19,7 @@ time = "0.1" termcolor = "1" regex = "1" tempfile = "3" -pyo3 = {version = "0.17.3", features = ["extension-module"]} +pyo3 = {version = "0.18.0", features = ["extension-module"]} serde = {version = "1.0", features = ["derive"]} toml = "0.5" git2 = "0.13" diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index 0e5c04a0..3d2d8272 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -1732,9 +1732,9 @@ checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -2611,9 +2611,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543" +checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109" dependencies = [ "cfg-if 1.0.0", "indoc", @@ -2630,9 +2630,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8" +checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3" dependencies = [ "once_cell", "target-lexicon", @@ -2640,9 +2640,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc" +checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c" dependencies = [ "libc", "pyo3-build-config", @@ -2650,9 +2650,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94144a1266e236b1c932682136dc35a9dee8d3589728f68130c7c3861ef96b28" +checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d" dependencies = [ "proc-macro2 1.0.28", "pyo3-macros-backend", @@ -2662,9 +2662,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8df9be978a2d2f0cdebabb03206ed73b11314701a5bfe71b0d753b81997777f" +checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918" dependencies = [ "proc-macro2 1.0.28", "quote 1.0.9", diff --git a/rust/pyapi/Cargo.toml b/rust/pyapi/Cargo.toml index f76d94ee..12a2e287 100644 --- a/rust/pyapi/Cargo.toml +++ b/rust/pyapi/Cargo.toml @@ -32,7 +32,7 @@ curl-sys = { version = "0.4.34", features = ["static-curl"] } openssl = { version = "0.10", features = ["vendored"] } [dependencies.pyo3] -version = "0.17.3" +version = "0.18.3" features = ["extension-module", "num-bigint", "multiple-pymethods", "auto-initialize"] [build-dependencies] diff --git a/rust/pyapi/src/application/mod.rs b/rust/pyapi/src/application/mod.rs index b7d52673..3c3592de 100644 --- a/rust/pyapi/src/application/mod.rs +++ b/rust/pyapi/src/application/mod.rs @@ -23,7 +23,8 @@ pub struct PyApplication {} #[pymethods] impl PyApplication { #[new] - fn new() -> Self { + #[pyo3(signature=(**_kwargs))] + fn new(_kwargs: Option<&PyDict>) -> Self { PyApplication {} } @@ -41,7 +42,7 @@ impl PyApplication { Ok(r.passed()) } - #[args(kwargs = "**")] + #[pyo3(signature=(**kwargs))] fn __publish__(&self, kwargs: Option<&PyDict>) -> PyResult { let mut dry_run = false; let mut rn: Option<&str> = None; @@ -83,6 +84,7 @@ impl PyApplication { Ok(Status::from_origen(origen::app().unwrap().rc_status()?)) } + #[pyo3(signature=(pathspecs, msg, dry_run))] fn __rc_checkin__( &self, pathspecs: Option>, @@ -107,14 +109,14 @@ impl PyApplication { )?)) } - #[args(_args = "*")] + #[pyo3(signature=(*_args))] fn __build_package__(&self, _args: &PyTuple) -> PyResult { Ok(BuildResult { build_result: Some(origen::app().unwrap().build_package()?), }) } - #[args(_args = "*")] + #[pyo3(signature=(*_args))] fn __run_publish_checks__(&self, _args: &PyTuple) -> PyResult { let r = origen::app().unwrap().run_publish_checks(false)?; Ok(r.passed()) diff --git a/rust/pyapi/src/dut.rs b/rust/pyapi/src/dut.rs index 778808f5..a00eb5ed 100644 --- a/rust/pyapi/src/dut.rs +++ b/rust/pyapi/src/dut.rs @@ -41,6 +41,7 @@ impl PyDUT { } /// Creates a new model at the given path + #[pyo3(signature=(parent_id, name, offset=None))] fn create_model( &self, parent_id: Option, diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index 5b23b769..9163a2a5 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -360,6 +360,7 @@ fn origen_mod_path() -> PyResult { /// Called automatically when Origen is first loaded #[pyfunction] +#[pyo3(signature=(log_verbosity, verbosity_keywords, cli_location, cli_version, fe_pkg_loc, fe_exe_loc, invocation))] fn initialize( py: Python, log_verbosity: Option, diff --git a/rust/pyapi/src/meta/py_like_apis/list_like_api.rs b/rust/pyapi/src/meta/py_like_apis/list_like_api.rs index 0229a98b..fcf3cb17 100644 --- a/rust/pyapi/src/meta/py_like_apis/list_like_api.rs +++ b/rust/pyapi/src/meta/py_like_apis/list_like_api.rs @@ -8,7 +8,7 @@ pub trait ListLikeAPI { fn __iter__(&self) -> PyResult; fn __getitem__(&self, idx: &PyAny) -> PyResult { - if let Ok(slice) = idx.cast_as::() { + if let Ok(slice) = idx.downcast::() { self.___getslice__(slice) } else { let i = idx.extract::()?; @@ -109,7 +109,7 @@ pub trait GeneralizedListLikeAPI { // fn __iter__(&self) -> PyResult; fn __getitem__(&self, idx: &PyAny) -> PyResult { - if let Ok(slice) = idx.cast_as::() { + if let Ok(slice) = idx.downcast::() { self.___getslice__(slice) } else { let i = idx.extract::()?; diff --git a/rust/pyapi/src/pins.rs b/rust/pyapi/src/pins.rs index f1766cbf..7d58c210 100644 --- a/rust/pyapi/src/pins.rs +++ b/rust/pyapi/src/pins.rs @@ -170,7 +170,7 @@ pub fn vec_to_ppin_ids(dut: &origen::Dut, pins: Vec<&PyAny>) -> PyResult) -> PyResult { let mut dut = DUT.lock().unwrap(); let (mut reset_action, mut width, mut offset, mut endianness): ( @@ -232,7 +232,7 @@ impl PyDUT { } } - #[args(aliases = "*")] + #[pyo3(signature=(model_id, name, *aliases))] fn add_pin_alias(&self, model_id: usize, name: &str, aliases: &PyTuple) -> PyResult<()> { let mut dut = DUT.lock().unwrap(); for alias in aliases { @@ -246,7 +246,7 @@ impl PyDUT { Ok(Py::new(py, PinContainer { model_id: model_id }).unwrap()) } - #[args(pins = "*", options = "**")] + #[pyo3(signature=(model_id, name, *pins, **options))] fn group_pins( &self, py: Python, @@ -313,7 +313,7 @@ impl PyDUT { } } - #[args(pins = "*")] + #[pyo3(signature=(model_id, name, *pins))] fn add_pin_header( &self, py: Python, diff --git a/rust/pyapi/src/pins/pin_actions.rs b/rust/pyapi/src/pins/pin_actions.rs index d1fd3ca2..66e5a472 100644 --- a/rust/pyapi/src/pins/pin_actions.rs +++ b/rust/pyapi/src/pins/pin_actions.rs @@ -143,7 +143,7 @@ impl PinActions { } #[new] - #[args(actions = "*", _kwargs = "**")] + #[pyo3(signature=(*actions, **_kwargs))] fn new(actions: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { let mut temp: Vec = vec![]; // if let Some(actions_) = actions { diff --git a/rust/pyapi/src/pins/pin_collection.rs b/rust/pyapi/src/pins/pin_collection.rs index 92bc083e..c8f3b7c0 100644 --- a/rust/pyapi/src/pins/pin_collection.rs +++ b/rust/pyapi/src/pins/pin_collection.rs @@ -50,7 +50,7 @@ impl PinCollection { Ok(()) } - #[args(kwargs = "**")] + #[pyo3(signature=(actions, **kwargs))] fn apply_actions( slf: PyRefMut, actions: &PyAny, @@ -99,7 +99,7 @@ impl PinCollection { Ok(()) } - #[args(label = "None", symbol = "None", cycles = "None", mask = "None")] + #[pyo3(signature=(label=None, symbol=None, cycles=None, mask=None))] fn overlay( slf: PyRef, label: Option, @@ -114,7 +114,7 @@ impl PinCollection { Ok(slf.into()) } - #[args(symbol = "None", cycles = "None", mask = "None")] + #[pyo3(signature=(symbol=None, cycles=None, mask=None))] fn capture( slf: PyRef, symbol: Option, @@ -163,7 +163,7 @@ impl PinCollection { Ok(self.pin_collection.is_little_endian()) } - #[args(kwargs = "**")] + #[pyo3(signature=(**kwargs))] fn cycle(slf: PyRef, py: Python, kwargs: Option<&PyDict>) -> PyResult> { let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?)?; diff --git a/rust/pyapi/src/pins/pin_container.rs b/rust/pyapi/src/pins/pin_container.rs index fd9fcd37..ffe4a9f1 100644 --- a/rust/pyapi/src/pins/pin_container.rs +++ b/rust/pyapi/src/pins/pin_container.rs @@ -35,7 +35,7 @@ impl PinContainer { self.keys() } - #[args(names = "*", options = "**")] + #[pyo3(signature=(*names, **options))] fn collect(&self, py: Python, names: &PyTuple, options: Option<&PyDict>) -> PyResult> { let mut endianness = Option::None; match options { diff --git a/rust/pyapi/src/pins/pin_group.rs b/rust/pyapi/src/pins/pin_group.rs index cdd62a1a..5e667ace 100644 --- a/rust/pyapi/src/pins/pin_group.rs +++ b/rust/pyapi/src/pins/pin_group.rs @@ -43,7 +43,7 @@ impl PinGroup { .into_py(py)) } - #[args(kwargs = "**")] + #[pyo3(signature=(data, **kwargs))] fn drive(slf: PyRef, data: BigUint, kwargs: Option<&PyDict>) -> PyResult> { let dut = DUT.lock().unwrap(); let grp = dut._get_pin_group(slf.model_id, &slf.name)?; @@ -53,7 +53,7 @@ impl PinGroup { Ok(slf.into()) } - #[args(kwargs = "**")] + #[pyo3(signature=(data, **kwargs))] fn verify(slf: PyRef, data: BigUint, kwargs: Option<&PyDict>) -> PyResult> { let dut = DUT.lock().unwrap(); let grp = dut._get_pin_group(slf.model_id, &slf.name)?; @@ -76,7 +76,7 @@ impl PinGroup { Ok(()) } - #[args(kwargs = "**")] + #[pyo3(signature=(actions, **kwargs))] fn apply_actions( slf: PyRef, actions: &PyAny, @@ -129,7 +129,7 @@ impl PinGroup { Ok(grp.is_little_endian()) } - #[args(kwargs = "**")] + #[pyo3(signature=(**kwargs))] fn cycle(slf: PyRef, py: Python, kwargs: Option<&PyDict>) -> PyResult> { let locals = PyDict::new(py); locals.set_item("origen", py.import("origen")?)?; @@ -154,7 +154,7 @@ impl PinGroup { Ok(slf.into()) } - #[args(label = "None", symbol = "None", cycles = "None", mask = "None")] + #[pyo3(signature=(label=None, symbol=None, cycles=None, mask=None))] fn overlay( slf: PyRef, label: Option, @@ -170,7 +170,7 @@ impl PinGroup { Ok(slf.into()) } - #[args(symbol = "None", cycles = "None", mask = "None")] + #[pyo3(signature=(symbol=None, cycles=None, mask=None))] fn capture( slf: PyRef, symbol: Option, diff --git a/rust/pyapi/src/prog_gen/flow_options.rs b/rust/pyapi/src/prog_gen/flow_options.rs index 52e9c42f..490a91c3 100644 --- a/rust/pyapi/src/prog_gen/flow_options.rs +++ b/rust/pyapi/src/prog_gen/flow_options.rs @@ -228,7 +228,7 @@ pub fn on_fail(fid: &FlowID, kwargs: Option<&PyDict>) -> Result<()> { if cont { flow_api::continue_on_fail(None)?; } - if let Ok(on_fail) = on_fail.cast_as::() { + if let Ok(on_fail) = on_fail.downcast::() { for (k, v) in on_fail { if let Ok(k) = k.extract::() { match k.as_str() { @@ -273,7 +273,7 @@ pub fn on_pass(fid: &FlowID, kwargs: Option<&PyDict>) -> Result<()> { if let Some(kwargs) = kwargs { if let Some(on_pass) = kwargs.get_item("on_pass") { let ref_id = flow_api::start_on_failed(fid.to_owned(), None)?; - if let Ok(on_pass) = on_pass.cast_as::() { + if let Ok(on_pass) = on_pass.downcast::() { for (k, v) in on_pass { if let Ok(k) = k.extract::() { match k.as_str() { diff --git a/rust/pyapi/src/prog_gen/interface.rs b/rust/pyapi/src/prog_gen/interface.rs index 6f369dde..53fdaf6c 100644 --- a/rust/pyapi/src/prog_gen/interface.rs +++ b/rust/pyapi/src/prog_gen/interface.rs @@ -77,7 +77,7 @@ impl PyInterface { } /// Add a test to the flow - #[args(kwargs = "**")] + #[pyo3(signature=(test_obj, **kwargs))] fn add_test(&self, test_obj: &PyAny, kwargs: Option<&PyDict>) -> PyResult<()> { let id = flow_options::get_flow_id(kwargs)?; let bin = flow_options::get_bin(kwargs)?; @@ -127,7 +127,7 @@ impl PyInterface { } /// Add a cz test to the flow - #[args(kwargs = "**")] + #[pyo3(signature=(test_obj, cz_setup, **kwargs))] fn add_cz_test( &self, test_obj: &PyAny, @@ -160,7 +160,7 @@ impl PyInterface { Ok(()) } - #[args(id = "None", kwargs = "**")] + #[pyo3(signature=(name, **kwargs))] fn group(&mut self, name: String, kwargs: Option<&PyDict>) -> PyResult { let id = flow_options::get_flow_id(kwargs)?; let (mut g, ref_ids) = flow_options::wrap_in_conditions(kwargs, true, || { @@ -176,7 +176,7 @@ impl PyInterface { Ok(r) } - #[args(jobs = "*", _kwargs = "**")] + #[pyo3(signature=(*jobs, **_kwargs))] fn if_job(&mut self, jobs: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(jobs) { Ok(v) => Ok(Condition::new(FlowCondition::IfJob(v))), @@ -184,7 +184,7 @@ impl PyInterface { } } - #[args(jobs = "*", _kwargs = "**")] + #[pyo3(signature=(*jobs, **_kwargs))] fn unless_job(&mut self, jobs: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(jobs) { Ok(v) => Ok(Condition::new(FlowCondition::UnlessJob(v))), @@ -192,7 +192,7 @@ impl PyInterface { } } - #[args(flags = "*", _kwargs = "**")] + #[pyo3(signature=(*flags, **_kwargs))] fn if_enable(&mut self, flags: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(flags) { Ok(v) => Ok(Condition::new(FlowCondition::IfEnable(v))), @@ -200,7 +200,7 @@ impl PyInterface { } } - #[args(flags = "*", _kwargs = "**")] + #[pyo3(signature=(*flags, **_kwargs))] fn unless_enable(&mut self, flags: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(flags) { Ok(v) => Ok(Condition::new(FlowCondition::UnlessEnable(v))), @@ -208,7 +208,7 @@ impl PyInterface { } } - #[args(flags = "*", _kwargs = "**")] + #[pyo3(signature=(*flags, **_kwargs))] fn if_enabled(&mut self, flags: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(flags) { Ok(v) => Ok(Condition::new(FlowCondition::IfEnable(v))), @@ -216,7 +216,7 @@ impl PyInterface { } } - #[args(flags = "*", _kwargs = "**")] + #[pyo3(signature=(*flags, **_kwargs))] fn unless_enabled(&mut self, flags: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(flags) { Ok(v) => Ok(Condition::new(FlowCondition::UnlessEnable(v))), @@ -224,7 +224,7 @@ impl PyInterface { } } - #[args(ids = "*", _kwargs = "**")] + #[pyo3(signature=(*ids, **_kwargs))] fn if_passed(&mut self, ids: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(ids) { Ok(v) => Ok(Condition::new(FlowCondition::IfPassed( @@ -234,7 +234,7 @@ impl PyInterface { } } - #[args(ids = "*", _kwargs = "**")] + #[pyo3(signature=(*ids, **_kwargs))] fn unless_passed(&mut self, ids: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(ids) { Ok(v) => Ok(Condition::new(FlowCondition::IfFailed( @@ -244,7 +244,7 @@ impl PyInterface { } } - #[args(ids = "*", _kwargs = "**")] + #[pyo3(signature=(*ids, **_kwargs))] fn if_failed(&mut self, ids: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(ids) { Ok(v) => Ok(Condition::new(FlowCondition::IfFailed( @@ -254,7 +254,7 @@ impl PyInterface { } } - #[args(ids = "*", _kwargs = "**")] + #[pyo3(signature=(*ids, **_kwargs))] fn unless_failed(&mut self, ids: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(ids) { Ok(v) => Ok(Condition::new(FlowCondition::IfPassed( @@ -264,7 +264,7 @@ impl PyInterface { } } - #[args(ids = "*", _kwargs = "**")] + #[pyo3(signature=(*ids, **_kwargs))] fn if_ran(&mut self, ids: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(ids) { Ok(v) => Ok(Condition::new(FlowCondition::IfRan( @@ -274,7 +274,7 @@ impl PyInterface { } } - #[args(ids = "*", _kwargs = "**")] + #[pyo3(signature=(*ids, **_kwargs))] fn unless_ran(&mut self, ids: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult { match extract_to_string_vec(ids) { Ok(v) => Ok(Condition::new(FlowCondition::UnlessRan( @@ -285,7 +285,7 @@ impl PyInterface { } /// Bin out - #[args(soft_bin = "None", softbin = "None", good = "false", kwargs = "**")] + #[pyo3(signature=(hard_bin, soft_bin=None, softbin=None, good=false, description=None, priority=None, **kwargs))] fn bin( &self, hard_bin: usize, @@ -327,7 +327,7 @@ impl PyInterface { .0) } - #[args(soft_bin = "None", softbin = "None", kwargs = "**")] + #[pyo3(signature=(hard_bin, soft_bin=None, softbin=None, description=None, priority=None, **kwargs))] fn good_die( &self, hard_bin: usize, @@ -348,7 +348,7 @@ impl PyInterface { ) } - #[args(soft_bin = "None", softbin = "None", kwargs = "**")] + #[pyo3(signature=(hard_bin, soft_bin=None, softbin=None, description=None, priority=None, **kwargs))] fn bad_die( &self, hard_bin: usize, diff --git a/rust/pyapi/src/registers.rs b/rust/pyapi/src/registers.rs index 0176ef7e..30f85a2f 100644 --- a/rust/pyapi/src/registers.rs +++ b/rust/pyapi/src/registers.rs @@ -23,6 +23,20 @@ pub fn define(py: Python, m: &PyModule) -> PyResult<()> { /// Create a new register, returning its ID #[pyfunction] +#[pyo3(signature=( + address_block_id, + register_file_id, + name, + offset, + size, + bit_order, + fields, + filename=None, + lineno=None, + description=None, + resets=None, + access=None, +))] fn create( address_block_id: usize, register_file_id: Option, diff --git a/rust/pyapi/src/registers/bit_collection.rs b/rust/pyapi/src/registers/bit_collection.rs index 9038abfd..5ee68ccf 100644 --- a/rust/pyapi/src/registers/bit_collection.rs +++ b/rust/pyapi/src/registers/bit_collection.rs @@ -99,7 +99,7 @@ impl BitCollection { } /// Returns a bit collection containing the given bit indices - #[args(args = "*")] + #[pyo3(signature=(*args))] fn subset(&self, args: &PyTuple) -> PyResult { let mut bc = self.clone(); let mut bit_ids: Vec = Vec::new(); @@ -250,13 +250,13 @@ impl BitCollection { Ok(self.clone()) } - #[args(shift_in = "0")] + #[pyo3(signature=(shift_in=0))] fn shift_left(&self, shift_in: u8) -> PyResult { let dut = origen::dut(); Ok(self.materialize(&dut)?.shift_left(shift_in)?) } - #[args(shift_in = "0")] + #[pyo3(signature=(shift_in=0))] fn shift_right(&self, shift_in: u8) -> PyResult { let dut = origen::dut(); Ok(self.materialize(&dut)?.shift_right(shift_in)?) @@ -296,7 +296,7 @@ impl BitCollection { Ok(self.clone()) } - #[args(label = "None", symbol = "None", mask = "None")] + #[pyo3(signature=(label=None, symbol=None, mask=None))] fn set_overlay( &self, label: Option, @@ -315,7 +315,6 @@ impl BitCollection { Ok(self.clone()) } - // #[args(kwargs = "**")] fn set_capture(&self) -> PyResult { self.materialize(&origen::dut())?.capture(); Ok(self.clone()) @@ -359,7 +358,7 @@ impl BitCollection { } } - #[args(enable = "None", preset = "false")] + #[pyo3(signature=(enable=None, preset=false))] /// Trigger a verify transaction on the register pub fn _internal_verify( &self, @@ -381,7 +380,7 @@ impl BitCollection { Ok(()) } - #[args(enable = "None")] + #[pyo3(signature=(enable=None))] /// Equivalent to calling verify() but without invoking a register transaction at the end, /// i.e. it will set the verify flag on the bits and optionally apply an enable mask when /// deciding what bit flags to set. @@ -539,7 +538,7 @@ impl BitCollection { } } - #[args(args = "*")] + #[pyo3(signature=(*args))] fn try_fields(&self, args: &PyTuple) -> PyResult { let dut = origen::dut(); @@ -713,7 +712,7 @@ impl BitCollection { } } - #[args(_kwargs = "**")] + #[pyo3(signature=(data=None, **_kwargs))] fn write( slf: &PyCell, py: Python, @@ -743,7 +742,7 @@ impl BitCollection { Ok(slf.into()) } - #[args(_kwargs = "**")] + #[pyo3(signature=(data=None, **_kwargs))] fn verify( slf: &PyCell, py: Python, @@ -774,7 +773,7 @@ impl BitCollection { Ok(slf.into()) } - #[args(kwargs = "**")] + #[pyo3(signature=(**kwargs))] fn capture(slf: &PyCell, py: Python, kwargs: Option<&PyDict>) -> PyResult> { // let bc = slf.extract::>()?; // bc.capture(); @@ -966,7 +965,7 @@ impl BitCollection { Some(x) => Some(x.to_string()), None => None, }; - if let Ok(slice) = idx.cast_as::() { + if let Ok(slice) = idx.downcast::() { // Indices requires (what I think is) a max size. Should be plenty. let indices = slice.indices(8192)?; // TODO: Should this support step size? @@ -991,7 +990,7 @@ impl BitCollection { let mut bc = self.smart_clone(bit_ids); bc.field = field; Ok(bc) - } else if let Ok(_int) = idx.cast_as::() { + } else if let Ok(_int) = idx.downcast::() { let i = idx.extract::().unwrap(); if i < self.bit_ids.len() { let mut bit_ids: Vec = Vec::new(); @@ -1008,7 +1007,7 @@ impl BitCollection { "The given bit index is out of range", )) } - } else if let Ok(_name) = idx.cast_as::() { + } else if let Ok(_name) = idx.downcast::() { if self.whole_reg { let name = idx.extract::<&str>().unwrap(); self.field(name) diff --git a/rust/pyapi/src/registers/register.rs b/rust/pyapi/src/registers/register.rs index d9a4b0cd..4335c880 100644 --- a/rust/pyapi/src/registers/register.rs +++ b/rust/pyapi/src/registers/register.rs @@ -21,6 +21,17 @@ pub struct Field { #[pymethods] impl Field { #[new] + #[pyo3(signature=( + name, + description, + offset, + width, + access, + resets, + enums, + filename=None, + lineno=None, + ))] fn new( name: String, description: Option, diff --git a/rust/pyapi/src/services/jtag.rs b/rust/pyapi/src/services/jtag.rs index 7cfa89a7..b6e2d13a 100644 --- a/rust/pyapi/src/services/jtag.rs +++ b/rust/pyapi/src/services/jtag.rs @@ -51,7 +51,7 @@ impl JTAG { Ok(()) } - #[args(width = "None", kwargs = "**")] + #[pyo3(signature=(bits_or_val, width=None, **kwargs))] fn write_dr( &self, bits_or_val: &PyAny, @@ -70,7 +70,7 @@ impl JTAG { Ok(self.clone()) } - #[args(width = "None", kwargs = "**")] + #[pyo3(signature=(bits_or_val, width=None, **kwargs))] fn verify_dr( &self, bits_or_val: &PyAny, @@ -89,7 +89,7 @@ impl JTAG { Ok(self.clone()) } - #[args(width = "None", kwargs = "**")] + #[pyo3(signature=(bits_or_val, width=None, **kwargs))] fn write_ir( &self, bits_or_val: &PyAny, @@ -108,7 +108,7 @@ impl JTAG { Ok(self.clone()) } - #[args(width = "None", kwargs = "**")] + #[pyo3(signature=(bits_or_val, width=None, **kwargs))] fn verify_ir( &self, bits_or_val: &PyAny, diff --git a/rust/pyapi/src/services/simple.rs b/rust/pyapi/src/services/simple.rs index da7d80f1..adad53c5 100644 --- a/rust/pyapi/src/services/simple.rs +++ b/rust/pyapi/src/services/simple.rs @@ -67,7 +67,7 @@ impl Simple { Ok(slf.into()) } - #[args(write_opts = "**")] + #[pyo3(signature=(bits_or_val, **write_opts))] fn write_register( slf: PyRef, bits_or_val: &PyAny, @@ -87,7 +87,7 @@ impl Simple { Ok(slf.into()) } - #[args(verify_opts = "**")] + #[pyo3(signature=(bits_or_val, **verify_opts))] fn verify_register( slf: PyRef, bits_or_val: &PyAny, diff --git a/rust/pyapi/src/services/swd.rs b/rust/pyapi/src/services/swd.rs index 862bc1c6..63a29584 100644 --- a/rust/pyapi/src/services/swd.rs +++ b/rust/pyapi/src/services/swd.rs @@ -32,7 +32,7 @@ impl SWD { Ok(self.clone()) } - #[args(kwargs = "**")] + #[pyo3(signature=(bits_or_val, **kwargs))] fn write_ap(&self, bits_or_val: &PyAny, kwargs: Option<&PyDict>) -> PyResult { let dut = origen::dut(); let mut services = origen::services(); @@ -52,7 +52,7 @@ impl SWD { Ok(self.clone()) } - #[args(kwargs = "**")] + #[pyo3(signature=(bits_or_val, **kwargs))] fn verify_ap(&self, bits_or_val: &PyAny, kwargs: Option<&PyDict>) -> PyResult { let dut = origen::dut(); let mut services = origen::services(); @@ -75,7 +75,7 @@ impl SWD { Ok(self.clone()) } - #[args(kwargs = "**")] + #[pyo3(signature=(bits_or_val, **kwargs))] fn write_dp(&self, bits_or_val: &PyAny, kwargs: Option<&PyDict>) -> PyResult { let dut = origen::dut(); let mut services = origen::services(); @@ -95,7 +95,7 @@ impl SWD { Ok(self.clone()) } - #[args(kwargs = "**")] + #[pyo3(signature=(bits_or_val, **kwargs))] fn verify_dp(&self, bits_or_val: &PyAny, kwargs: Option<&PyDict>) -> PyResult { let dut = origen::dut(); let mut services = origen::services(); diff --git a/rust/pyapi/src/standard_sub_blocks/arm_debug.rs b/rust/pyapi/src/standard_sub_blocks/arm_debug.rs index daab2634..337f8caa 100644 --- a/rust/pyapi/src/standard_sub_blocks/arm_debug.rs +++ b/rust/pyapi/src/standard_sub_blocks/arm_debug.rs @@ -245,7 +245,7 @@ impl DP { } #[classmethod] - #[args(_block_options = "**")] + #[pyo3(signature=(instance, block_options=None))] fn model_init(_cls: &PyType, py: Python, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { // Require an ArmDebug ID to tie this DP to an ArmDebug instance let arm_debug_id; @@ -284,7 +284,7 @@ impl DP { Ok(()) } - #[args(write_opts = "**")] + #[pyo3(signature=(bits, **_write_opts))] fn write_register(&self, bits: &PyAny, _write_opts: Option<&PyDict>) -> PyResult<()> { let bc = bits.extract::>()?; let dut = origen::dut(); @@ -294,7 +294,7 @@ impl DP { Ok(()) } - #[args(verify_opts = "**")] + #[pyo3(signature=(bits, **_verify_opts))] fn verify_register(&self, bits: &PyAny, _verify_opts: Option<&PyDict>) -> PyResult<()> { let bc = bits.extract::>()?; let dut = origen::dut(); @@ -347,7 +347,7 @@ impl JtagDP { } #[classmethod] - #[args(_block_options = "**")] + #[pyo3(signature=(instance, block_options=None))] fn model_init(_cls: &PyType, py: Python, instance: &PyAny, block_options: Option<&PyDict>) -> PyResult<()> { // Require an ArmDebug ID to tie this DP to an ArmDebug instance let arm_debug_id; @@ -357,17 +357,17 @@ impl JtagDP { arm_debug_id = id; } else { return Err(PyErr::new::( - "Subblock arm_debug.dp was given an arm_debug _id block option but could not extract it as an integer" + "Subblock jtagdp was given an arm_debug _id block option but could not extract it as an integer" )); } } else { return Err(PyErr::new::( - "Subblock arm_debug.dp was not given required block option 'arm_debug_id'", + "Subblock jtagdp was not given required block option 'arm_debug_id'", )); } } else { return Err(PyErr::new::( - "Subblock arm_debug.dp requires an arm_debug_id block option, but no block options were given." + "Subblock jtagdp requires an arm_debug_id block option, but no block options were given." )); } @@ -459,7 +459,7 @@ impl JtagDP { Ok(()) } - #[args(write_opts = "**")] + #[pyo3(signature=(bits, **write_opts))] fn write_register(&self, bits: &PyAny, write_opts: Option<&PyDict>) -> PyResult<()> { let dut = origen::dut(); let services = origen::services(); @@ -472,7 +472,7 @@ impl JtagDP { Ok(()) } - #[args(verify_opts = "**")] + #[pyo3(signature=(bits, **verify_opts))] fn verify_register(&self, bits: &PyAny, verify_opts: Option<&PyDict>) -> PyResult<()> { let dut = origen::dut(); let services = origen::services(); @@ -559,7 +559,7 @@ impl MemAP { /// a BitCollection). /// Assumes that all posturing has been completed - that is, the bits' data, overlay /// status, etc. is current. - #[args(write_opts = "**")] + #[pyo3(signature=(bits, **write_opts))] fn write_register(&self, bits: &PyAny, write_opts: Option<&PyDict>) -> PyResult<()> { let dut = origen::dut(); let services = origen::services(); @@ -574,7 +574,7 @@ impl MemAP { Ok(()) } - #[args(verify_opts = "**")] + #[pyo3(signature=(bits, **verify_opts))] fn verify_register(&self, bits: &PyAny, verify_opts: Option<&PyDict>) -> PyResult<()> { let dut = origen::dut(); let services = origen::services(); @@ -589,7 +589,7 @@ impl MemAP { Ok(()) } - #[args(capture_opts = "**")] + #[pyo3(signature=(bits, **capture_opts))] fn capture_register(&self, bits: &PyAny, capture_opts: Option<&PyDict>) -> PyResult<()> { let dut = origen::dut(); let services = origen::services(); diff --git a/rust/pyapi/src/tester.rs b/rust/pyapi/src/tester.rs index af307569..0ad6b680 100644 --- a/rust/pyapi/src/tester.rs +++ b/rust/pyapi/src/tester.rs @@ -364,7 +364,7 @@ impl PyTester { } /// cycle(**kwargs) -> self - #[args(kwargs = "**")] + #[pyo3(signature=(**kwargs))] fn cycle(slf: PyRef, py: Python, kwargs: Option<&PyDict>) -> PyResult> { { let mut tester = origen::tester(); @@ -387,13 +387,13 @@ impl PyTester { Self::cycle(slf, py, Some(&kwargs)) } - #[args( - label = "None", - symbol = "None", - cycles = "None", - mask = "None", - pins = "None" - )] + #[pyo3(signature=( + label = None, + symbol = None, + pins = None, + cycles = None, + mask = None, + ))] fn overlay( slf: PyRef, py: Python, @@ -421,7 +421,7 @@ impl PyTester { Ok(slf.into()) } - #[args(symbol = "None", cycles = "None", mask = "None", pins = "None")] + #[pyo3(signature=(symbol=None, cycles=None, mask=None, pins=None))] fn capture( slf: PyRef, py: Python, @@ -463,7 +463,7 @@ impl PyTester { Ok(()) } - #[args(testers = "*")] + #[pyo3(signature=(*testers))] fn target(&mut self, py: Python, testers: &PyTuple) -> PyResult> { if testers.len() > 0 { let mut tester = origen::tester(); @@ -506,7 +506,7 @@ impl PyTester { /// in case they are useful in future. /// Continue on fail means that any errors will be logged but Origen will continue, if false /// it will blow up and immediately return an error to Python. - #[args(continue_on_fail = false)] + #[pyo3(signature=(continue_on_fail=false))] fn render_pattern(&self, py: Python, continue_on_fail: bool) -> PyResult> { if origen::LOGGER.has_keyword("show_unprocessed_ast") { origen::LOGGER.info("Showing Unprocessed AST"); diff --git a/rust/pyapi/src/tester_apis/igxl/prog_gen_api.rs b/rust/pyapi/src/tester_apis/igxl/prog_gen_api.rs index 87526eae..9294182e 100644 --- a/rust/pyapi/src/tester_apis/igxl/prog_gen_api.rs +++ b/rust/pyapi/src/tester_apis/igxl/prog_gen_api.rs @@ -17,7 +17,7 @@ pub struct Patset { #[pymethods] impl IGXL { - #[args(library = "None", kwargs = "**")] + #[pyo3(signature=(name, template, library=None, **kwargs))] fn new_test_instance( &mut self, name: String, @@ -43,13 +43,13 @@ impl IGXL { Ok(t) } - #[args(kwargs = "**")] + #[pyo3(signature=(**kwargs))] pub fn new_flow_line(&mut self, kwargs: Option<&PyDict>) -> PyResult { let t = TestInvocation::new("_".to_owned(), self.tester.to_owned(), kwargs)?; Ok(t) } - #[args(pattern = "None", patterns = "None")] + #[pyo3(signature=(name, pattern=None, patterns=None))] fn new_patset( &mut self, name: String, @@ -71,7 +71,7 @@ impl IGXL { } // Set the cpu wait flags for the given test instance - #[args(flags = "*")] + #[pyo3(signature=(test_instance, *flags))] fn set_wait_flags(&mut self, test_instance: &Test, flags: &PyTuple) -> PyResult<()> { let mut clean_flags: Vec = vec![]; for fl in flags { diff --git a/rust/pyapi/src/tester_apis/v93k/prog_gen_api.rs b/rust/pyapi/src/tester_apis/v93k/prog_gen_api.rs index dca09fda..bd1894d8 100644 --- a/rust/pyapi/src/tester_apis/v93k/prog_gen_api.rs +++ b/rust/pyapi/src/tester_apis/v93k/prog_gen_api.rs @@ -6,7 +6,7 @@ use pyo3::types::PyDict; #[pymethods] impl V93K { - #[args(kwargs = "**")] + #[pyo3(signature=(name, library, **kwargs))] fn new_test_method( &mut self, name: String, @@ -17,7 +17,7 @@ impl V93K { Ok(t) } - #[args(kwargs = "**")] + #[pyo3(signature=(name, **kwargs))] fn new_test_suite( &mut self, name: String, diff --git a/rust/pyapi/src/timesets.rs b/rust/pyapi/src/timesets.rs index c11c337a..340e61a4 100644 --- a/rust/pyapi/src/timesets.rs +++ b/rust/pyapi/src/timesets.rs @@ -43,7 +43,7 @@ pub fn define(py: Python, m: &PyModule) -> PyResult<()> { #[pymethods] impl PyDUT { - #[args(kwargs = "**")] + #[pyo3(signature=(model_id, name, period, **kwargs))] fn add_timeset( &self, py: Python, diff --git a/rust/pyapi/src/timesets/timeset.rs b/rust/pyapi/src/timesets/timeset.rs index 4593e9b3..1525467e 100644 --- a/rust/pyapi/src/timesets/timeset.rs +++ b/rust/pyapi/src/timesets/timeset.rs @@ -226,7 +226,7 @@ impl Timeset { Ok(pywavetable_container!(py, self.model_id, t_id, &self.name)) } - #[args(_kwargs = "**")] + #[pyo3(signature=(name, **_kwargs))] fn add_wavetable(&self, py: Python, name: &str, _kwargs: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let t_id; @@ -318,7 +318,7 @@ pub struct Wavetable { #[pymethods] impl Wavetable { - #[args(_kwargs = "**")] + #[pyo3(signature=(name, **_kwargs))] fn add_waves(&self, py: Python, name: &str, _kwargs: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let w_id; @@ -331,7 +331,7 @@ impl Wavetable { Ok(pywave_group!(py, wt, name)?) } - #[args(_kwargs = "**")] + #[pyo3(signature=(name, **_kwargs))] fn add_wave(&self, py: Python, name: &str, _kwargs: Option<&PyDict>) -> PyResult { self.add_waves(py, name, _kwargs) } @@ -382,7 +382,7 @@ impl Wavetable { } /// Same as :meth:`applied_waves` but supports internal filtering of the return values. - #[args(pins = "*")] + #[pyo3(signature=(*pins, indicators))] fn applied_waves_for( &self, py: Python, @@ -491,7 +491,7 @@ pub struct WaveGroup { #[pymethods] impl WaveGroup { - #[args(_kwargs = "**")] + #[pyo3(signature=(name, **_kwargs))] fn add_wave(&self, py: Python, name: &str, _kwargs: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let wgrp_id; @@ -589,7 +589,7 @@ impl Wave { )) } - #[args(event = "**")] + #[pyo3(signature=(**event))] fn push_event(&self, py: Python, event: Option<&PyDict>) -> PyResult { let mut dut = DUT.lock().unwrap(); let (w_id, e_index); @@ -703,7 +703,7 @@ impl Wave { Ok(pins) } - #[args(pins = "*")] + #[pyo3(signature=(*pins))] fn apply_to(&self, py: Python, pins: Vec) -> PyResult { let mut dut = DUT.lock().unwrap(); let wid; diff --git a/rust/pyapi/src/utility/mod.rs b/rust/pyapi/src/utility/mod.rs index 0494e2ef..3c848f57 100644 --- a/rust/pyapi/src/utility/mod.rs +++ b/rust/pyapi/src/utility/mod.rs @@ -55,14 +55,8 @@ pub fn reverse_bits(_py: Python, num: BigUint, width: Option) -> PyResult, @@ -179,7 +173,8 @@ fn app_utility( } } -#[pyfunction(inputs = "None")] +#[pyfunction] +#[pyo3(signature=(owner, repo, workflow, git_ref, inputs=None))] pub fn dispatch_workflow( owner: &str, repo: &str, diff --git a/rust/pyapi/src/utility/release_scribe/mod.rs b/rust/pyapi/src/utility/release_scribe/mod.rs index 41abbd43..aaf10ee2 100644 --- a/rust/pyapi/src/utility/release_scribe/mod.rs +++ b/rust/pyapi/src/utility/release_scribe/mod.rs @@ -53,7 +53,7 @@ pub struct ReleaseScribe { #[pymethods] impl ReleaseScribe { #[new] - #[args(config = "**")] + #[pyo3(signature=(**config))] fn new(config: Option<&PyDict>) -> PyResult { let mut c: HashMap = HashMap::new(); if let Some(cfg) = config { @@ -94,7 +94,7 @@ impl ReleaseScribe { )) } - #[args(release = "None", title = "None", dry_run = "false")] + #[pyo3(signature=(body, title=None, release=None, dry_run=false))] fn append_history( &mut self, body: String, diff --git a/rust/pyapi/src/utility/results.rs b/rust/pyapi/src/utility/results.rs index 01cc5ef4..a6836199 100644 --- a/rust/pyapi/src/utility/results.rs +++ b/rust/pyapi/src/utility/results.rs @@ -33,7 +33,7 @@ pub struct BuildResult { #[pymethods] impl BuildResult { #[classmethod] - #[args(build_contents = "None", message = "None", metadata = "None")] + #[pyo3(signature=(instance, succeeded, build_contents=None, message=None, metadata=None))] fn __init__( _cls: &PyType, instance: &PyAny, @@ -115,7 +115,7 @@ pub struct UploadResult { #[pymethods] impl UploadResult { #[classmethod] - #[args(message = "None", metadata = "None")] + #[pyo3(signature=(instance, succeeded, message=None, metadata=None))] fn __init__( _cls: &PyType, instance: &PyAny, @@ -157,7 +157,7 @@ pub struct ExecResult { #[pymethods] impl ExecResult { #[classmethod] - #[args(stdout = "None", stderr = "None")] + #[pyo3(signature=(instance, exit_code, stdout=None, stderr=None))] fn __init__( _cls: &PyType, instance: &PyAny, diff --git a/rust/pyapi/src/utility/sessions.rs b/rust/pyapi/src/utility/sessions.rs index 79e6d729..63e9ea66 100644 --- a/rust/pyapi/src/utility/sessions.rs +++ b/rust/pyapi/src/utility/sessions.rs @@ -23,7 +23,7 @@ impl OrigenSessions { Ok((OrigenSessions {}, Sessions {})) } - #[args(session = "None")] + #[pyo3(signature=(session=None))] fn user_session(&self, session: Option<&PyAny>) -> PyResult { // Can accept: // None -> Top app's session @@ -53,7 +53,7 @@ impl OrigenSessions { })?) } - #[args(session = "None")] + #[pyo3(signature=(session=None))] fn app_session(&self, session: Option<&PyAny>) -> PyResult { let t; if let Some(s) = session { diff --git a/rust/pyapi/src/utility/transaction.rs b/rust/pyapi/src/utility/transaction.rs index 1a8143bf..e0c5ca7f 100644 --- a/rust/pyapi/src/utility/transaction.rs +++ b/rust/pyapi/src/utility/transaction.rs @@ -13,7 +13,7 @@ pub struct Transaction { #[pymethods] impl Transaction { #[new] - #[args(kwargs = "**")] + #[pyo3(signature=(bc_or_val, **kwargs))] fn new(bc_or_val: &PyAny, kwargs: Option<&PyDict>) -> PyResult { let dut = origen::dut(); Ok(Self { @@ -22,7 +22,7 @@ impl Transaction { } #[classmethod] - #[args(kwargs = "**")] + #[pyo3(signature=(bc_or_val, **kwargs))] fn new_write(_cls: &PyType, bc_or_val: &PyAny, kwargs: Option<&PyDict>) -> PyResult { let dut = origen::dut(); Ok(Self { @@ -36,7 +36,7 @@ impl Transaction { } #[classmethod] - #[args(kwargs = "**")] + #[pyo3(signature=(bc_or_val, **kwargs))] fn new_verify(_cls: &PyType, bc_or_val: &PyAny, kwargs: Option<&PyDict>) -> PyResult { let dut = origen::dut(); Ok(Self { diff --git a/rust/pyapi_metal/Cargo.lock b/rust/pyapi_metal/Cargo.lock index 3e2d0beb..1d87ab36 100644 --- a/rust/pyapi_metal/Cargo.lock +++ b/rust/pyapi_metal/Cargo.lock @@ -1201,9 +1201,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -1741,9 +1741,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543" +checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109" dependencies = [ "cfg-if 1.0.0", "indoc", @@ -1759,9 +1759,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8" +checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3" dependencies = [ "once_cell", "target-lexicon", @@ -1769,9 +1769,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc" +checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c" dependencies = [ "libc", "pyo3-build-config", @@ -1779,9 +1779,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94144a1266e236b1c932682136dc35a9dee8d3589728f68130c7c3861ef96b28" +checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1791,9 +1791,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.17.3" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8df9be978a2d2f0cdebabb03206ed73b11314701a5bfe71b0d753b81997777f" +checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918" dependencies = [ "proc-macro2", "quote", diff --git a/rust/pyapi_metal/Cargo.toml b/rust/pyapi_metal/Cargo.toml index d46bf402..a77b8776 100644 --- a/rust/pyapi_metal/Cargo.toml +++ b/rust/pyapi_metal/Cargo.toml @@ -23,7 +23,7 @@ curl-sys = { version = "0.4.34", features = ["static-curl"] } openssl = { version = "0.10", features = ["vendored"] } [dependencies.pyo3] -version = "0.17.3" +version = "0.18.0" features = ["extension-module", "num-bigint"] [build-dependencies] diff --git a/rust/pyapi_metal/src/framework/logger.rs b/rust/pyapi_metal/src/framework/logger.rs index 321baec3..9a934f60 100644 --- a/rust/pyapi_metal/src/framework/logger.rs +++ b/rust/pyapi_metal/src/framework/logger.rs @@ -38,54 +38,63 @@ macro_rules! pytuple_to_vector_str { }; } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn debug(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { LOGGER.debug_block(&pytuple_to_vector_str!(messages)); Ok(()) } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn deprecated(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { LOGGER.deprecated_block(&pytuple_to_vector_str!(messages)); Ok(()) } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn error(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { LOGGER.error_block(&pytuple_to_vector_str!(messages)); Ok(()) } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn info(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { LOGGER.info_block(&pytuple_to_vector_str!(messages)); Ok(()) } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn success(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { LOGGER.success_block(&pytuple_to_vector_str!(messages)); Ok(()) } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn warning(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { LOGGER.warning_block(&pytuple_to_vector_str!(messages)); Ok(()) } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn display(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { LOGGER.display_block(&pytuple_to_vector_str!(messages)); Ok(()) } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn log(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { display(_py, messages, _kwargs) } -#[pyfunction(messages = "*", _kwargs = "**")] +#[pyfunction] +#[pyo3(signature=(*messages, **_kwargs))] fn trace(_py: Python, messages: &PyTuple, _kwargs: Option<&PyDict>) -> PyResult<()> { LOGGER.trace_block(&pytuple_to_vector_str!(messages)); Ok(()) @@ -130,47 +139,47 @@ impl Logger { Self {} } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn debug(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { debug(py, messages, kwargs) } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn deprecated(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { deprecated(py, messages, kwargs) } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn error(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { error(py, messages, kwargs) } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn info(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { info(py, messages, kwargs) } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn success(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { success(py, messages, kwargs) } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn warning(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { warning(py, messages, kwargs) } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn display(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { display(py, messages, kwargs) } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn log(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { log(py, messages, kwargs) } - #[args(messages = "*", kwargs = "**")] + #[pyo3(signature=(*messages, **kwargs))] fn trace(&self, py: Python, messages: &PyTuple, kwargs: Option<&PyDict>) -> PyResult<()> { trace(py, messages, kwargs) } diff --git a/rust/pyapi_metal/src/framework/outcomes.rs b/rust/pyapi_metal/src/framework/outcomes.rs index 339b321c..15cc6fc5 100644 --- a/rust/pyapi_metal/src/framework/outcomes.rs +++ b/rust/pyapi_metal/src/framework/outcomes.rs @@ -53,7 +53,7 @@ impl Outcome { /// Provide an __init__ for typical Python subclass initialization. /// Otherwise, ``new`` will initialize. #[classmethod] - #[args(message = "None", metadata = "None", use_pass_fail = "false")] + #[pyo3(signature=(instance, succeeded, message = None, positional_results = None, keyword_results = None, use_pass_fail = false, metadata = None))] fn __init__( _cls: &PyType, mut instance: PyRefMut, @@ -76,7 +76,7 @@ impl Outcome { } #[new] - #[args(message = "None", metadata = "None", use_pass_fail = "false")] + #[pyo3(signature=(succeeded, message = None, positional_results = None, keyword_results = None, use_pass_fail = false, metadata = None))] fn new( succeeded: &PyAny, message: Option, diff --git a/rust/pyapi_metal/src/framework/users.rs b/rust/pyapi_metal/src/framework/users.rs index 25e59a49..92ff6509 100644 --- a/rust/pyapi_metal/src/framework/users.rs +++ b/rust/pyapi_metal/src/framework/users.rs @@ -201,6 +201,7 @@ impl Users { } #[allow(non_snake_case)] + #[pyo3(signature=(_yield_retn, _yield_context, old_user))] pub fn __exit__current_user_as(&self, _py: Python, _yield_retn: Option<&PyAny>, _yield_context: Option>, old_user: &PyAny) -> PyResult<()> { self.set_current_user(old_user)?; Ok(()) @@ -212,7 +213,7 @@ impl Users { Ok(DATA_FIELDS) } - #[args(update_current = "false")] + #[pyo3(signature=(update_current = false))] pub fn lookup_current_id(&self, update_current: bool) -> PyResult { if update_current { let r = om::try_lookup_and_set_current_user()?; @@ -309,14 +310,14 @@ impl Users { } } - #[args(config = "None")] + #[pyo3(signature=(name, config = None))] fn register_dataset(&self, name: &str, config: Option<&PyAny>) -> PyResult<()> { let mut users = om::users_mut(); users.register_default_dataset(name, UserDatasetConfig::into_om(config)?)?; Ok(()) } - #[args(config = "None", as_topmost = "true")] + #[pyo3(signature=(name, config = None, as_topmost = true))] pub fn add_dataset( &self, name: &str, @@ -328,7 +329,7 @@ impl Users { Ok(()) } - #[args(config = "None")] + #[pyo3(signature=(name, config = None))] pub fn override_default_dataset(&self, name: &str, config: Option<&PyAny>) -> PyResult<()> { let mut users = om::users_mut(); users.override_default_dataset(name, UserDatasetConfig::into_om(config)?)?; @@ -361,7 +362,7 @@ impl Users { Ok(map_to_pydict(py, &mut users.motive_mapping().iter())?) } - #[args(replace_existing = "false")] + #[pyo3(signature=(motive, dataset, replace_existing = false))] pub fn add_motive( &self, motive: &str, @@ -377,11 +378,11 @@ impl Users { Ok(users.dataset_for(motive)?.cloned()) } - #[args( - repopulate = "false", - continue_on_error = "false", - stop_on_failure = "false" - )] + #[pyo3(signature=( + repopulate = false, + continue_on_error = false, + stop_on_failure = false + ))] pub fn populate( &self, repopulate: bool, @@ -462,7 +463,7 @@ impl Users { Ok(retn) } - #[args(exclusive="false", required="false")] + #[pyo3(signature=(role, exclusive = false, required = false))] pub fn for_role(&self, role: &str, exclusive: bool, required: bool) -> PyResult> { let users = om::users(); let r = users.users_by_role(Some( &|_u, rn| rn == role ))?; @@ -489,7 +490,7 @@ impl Users { } } - #[args(required="false")] + #[pyo3(signature=(role, required = false))] pub fn for_exclusive_role(&self, role: &str, required: bool) -> PyResult> { Ok(self.for_role(role, true, required)?.pop()) } @@ -876,11 +877,11 @@ impl UserDataset { self.data_store() } - #[args( - repopulate = "false", - continue_on_error = "false", - stop_on_failure = "false" - )] + #[pyo3(signature=( + repopulate = false, + continue_on_error = false, + stop_on_failure = false + ))] pub fn populate( &self, repopulate: bool, @@ -1077,7 +1078,7 @@ impl UserDatasetConfig { // TODO rename to new? #[new] - #[args(category = "None", data_store = "None", auto_populate = "None")] + #[pyo3(signature=(category = None, data_store = None, auto_populate = None, should_validate_password = None))] fn py_new( category: Option, data_store: Option, @@ -1467,7 +1468,7 @@ impl User { // We can't get a optional None value (as least as far as I know...) // Passing in None on the Python side makes this look like the argument given, so can't // get a nested None. - #[args(kwargs = "**")] + #[pyo3(signature=(motive, **kwargs))] fn password_for(&self, motive: &str, kwargs: Option<&PyDict>) -> PyResult { let default: Option>; if let Some(opts) = kwargs { @@ -1500,7 +1501,7 @@ impl User { })?) } - #[args(replace_existing = "false")] + #[pyo3(signature=(motive, dataset, replace_existing = false))] fn add_motive( &self, motive: &str, @@ -1610,7 +1611,7 @@ impl User { })?) } - #[args(config = "None", replace_existing = "None", as_topmost = "true")] + #[pyo3(signature=(name, config = None, replace_existing = None, as_topmost = true))] pub fn add_dataset( &self, name: &str, @@ -1628,7 +1629,7 @@ impl User { Ok(UserDataset::new(&self.user_id, name)) } - #[args(config = "None", replace_existing = "None")] + #[pyo3(signature=(name, config = None, replace_existing = None))] pub fn register_dataset( &self, name: &str, @@ -1686,11 +1687,11 @@ impl User { self.data_store() } - #[args( - repopulate = "false", - continue_on_error = "false", - stop_on_failure = "false" - )] + #[pyo3(signature=( + repopulate = false, + continue_on_error = false, + stop_on_failure = false + ))] pub fn populate( &self, repopulate: bool, @@ -1809,7 +1810,7 @@ impl User { })?) } - #[args(roles="*")] + #[pyo3(signature=(*roles))] pub fn add_roles(&self, roles: &PyAny) -> PyResult> { let v: Vec; if let Ok(r) = roles.extract::() { @@ -1825,7 +1826,7 @@ impl User { })?) } - #[args(roles="*")] + #[pyo3(signature=(*roles))] pub fn remove_roles(&self, roles: &PyAny) -> PyResult> { let v: Vec; if let Ok(r) = roles.extract::() { diff --git a/rust/pyapi_metal/src/frontend/mod.rs b/rust/pyapi_metal/src/frontend/mod.rs index e804f2c8..0f475012 100644 --- a/rust/pyapi_metal/src/frontend/mod.rs +++ b/rust/pyapi_metal/src/frontend/mod.rs @@ -227,7 +227,8 @@ pub(crate) fn backend_get_category( } #[cfg(debug_assertions)] -#[pyfunction(opts = "**")] +#[pyfunction] +#[pyo3(signature=(category, data_store, **opts))] pub(crate) fn backend_get_class( _py: Python, category: &str, diff --git a/rust/pyapi_metal/src/frontend/py_data_stores.rs b/rust/pyapi_metal/src/frontend/py_data_stores.rs index e69bfa1d..5de34aeb 100644 --- a/rust/pyapi_metal/src/frontend/py_data_stores.rs +++ b/rust/pyapi_metal/src/frontend/py_data_stores.rs @@ -182,7 +182,7 @@ impl PyDataStoreCategory { } // Note: This will shallow-copy ``init_args`` and ``init_kwargs``, if given. - #[args(func_kwargs = "**")] + #[pyo3(signature=(name, cls, init_args=None, init_kwargs=None, **func_kwargs))] pub fn add( &mut self, py: Python, diff --git a/rust/pyapi_metal/src/utils/differ.rs b/rust/pyapi_metal/src/utils/differ.rs index 025ead9e..9f928d56 100644 --- a/rust/pyapi_metal/src/utils/differ.rs +++ b/rust/pyapi_metal/src/utils/differ.rs @@ -3,11 +3,8 @@ use origen_metal::utils::differ::{ASCIIDiffer, Differ}; use pyo3::prelude::*; use std::path::Path; -#[pyfunction( - ignore_comments = "None", - ignore_blocks = "None", - ignore_blank_lines = "true" -)] +#[pyfunction] +#[pyo3(signature=(file_a, file_b, ignore_comments = None, ignore_blocks = None, ignore_blank_lines = true))] pub fn has_diffs( file_a: &str, file_b: &str, diff --git a/rust/pyapi_metal/src/utils/ldap.rs b/rust/pyapi_metal/src/utils/ldap.rs index 35933ea9..65d10070 100644 --- a/rust/pyapi_metal/src/utils/ldap.rs +++ b/rust/pyapi_metal/src/utils/ldap.rs @@ -37,12 +37,7 @@ impl LDAP {} #[pymethods] impl LDAP { #[new] - #[args( - username = "None", - password = "None", - populate_user_config = "None", - timeout = "None" - )] + #[pyo3(signature=(name, server, base, auth=None, continuous_bind=None, populate_user_config=None, timeout=None))] fn new( name: &str, server: &str, diff --git a/rust/pyapi_metal/src/utils/mailer/mailer.rs b/rust/pyapi_metal/src/utils/mailer/mailer.rs index 869ac194..95924dc0 100644 --- a/rust/pyapi_metal/src/utils/mailer/mailer.rs +++ b/rust/pyapi_metal/src/utils/mailer/mailer.rs @@ -18,7 +18,7 @@ pub struct Mailer { #[pymethods] impl Mailer { #[new] - #[args(timeout="60")] + #[pyo3(signature=(server, port=None, domain=None, auth_method=None, timeout=60, user=None))] pub fn new(server: String, port: Option, domain: Option, auth_method: Option<&str>, timeout: Option, user: Option) -> PyResult { Ok(Self { mailer: OMailer::new(server, port, domain, auth_method, timeout, user)? diff --git a/rust/pyapi_metal/src/utils/mailer/maillists.rs b/rust/pyapi_metal/src/utils/mailer/maillists.rs index ce4c1be0..a140041b 100644 --- a/rust/pyapi_metal/src/utils/mailer/maillists.rs +++ b/rust/pyapi_metal/src/utils/mailer/maillists.rs @@ -16,7 +16,7 @@ pub struct Maillists { #[pymethods] impl Maillists { #[new] - #[args(dirs="*", continue_on_error="false")] + #[pyo3(signature=(n, *dirs, continue_on_error=false))] fn new(n: String, dirs: &PyTuple, continue_on_error: bool) -> PyResult { Ok(Self { om_mls: OrigenMLS::new( diff --git a/rust/pyapi_metal/src/utils/revision_control/mod.rs b/rust/pyapi_metal/src/utils/revision_control/mod.rs index d895697e..32ef4c1a 100644 --- a/rust/pyapi_metal/src/utils/revision_control/mod.rs +++ b/rust/pyapi_metal/src/utils/revision_control/mod.rs @@ -23,7 +23,7 @@ pub struct Base {} #[pymethods] impl Base { #[new] - #[args(_args = "*", _config = "**")] + #[pyo3(signature=(*_args, **_config))] fn new(_args: &PyTuple, _config: Option<&PyDict>) -> PyResult { Ok(Self {}) } diff --git a/rust/pyapi_metal/src/utils/revision_control/supported/git.rs b/rust/pyapi_metal/src/utils/revision_control/supported/git.rs index b1747218..a344a4db 100644 --- a/rust/pyapi_metal/src/utils/revision_control/supported/git.rs +++ b/rust/pyapi_metal/src/utils/revision_control/supported/git.rs @@ -39,7 +39,7 @@ impl Git { } #[new] - #[args(args = "*", config = "**")] + #[pyo3(signature=(*args, **config))] fn new(args: &PyTuple, config: Option<&PyDict>) -> PyResult<(Self, Base)> { let mut c: HashMap = HashMap::new(); if let Some(cfg) = config { @@ -54,6 +54,7 @@ impl Git { Ok(self.rc()?.populate(version)?) } + #[pyo3(signature=(force, path, version))] fn checkout(&self, force: bool, path: Option<&str>, version: &str) -> PyResult { let rusty_path; if let Some(p) = path { @@ -81,7 +82,7 @@ impl Git { }) } - #[args(kwargs = "**")] + #[pyo3(signature=(tagname, **kwargs))] fn tag(&self, tagname: &str, kwargs: Option<&PyDict>) -> PyResult<()> { let msg: Option<&str>; Ok(self.rc()?.tag( @@ -116,7 +117,7 @@ impl Git { Ok(self.rc()?.is_initialized()?) } - #[args(paths = "*", kwargs = "**")] + #[pyo3(signature=(*paths, **kwargs))] fn checkin(&self, paths: &PyTuple, kwargs: Option<&PyDict>) -> PyResult { let msg; let dry_run; @@ -149,7 +150,7 @@ impl Git { )?)) } - #[args(dry_run = "false")] + #[pyo3(signature=(msg, dry_run=false))] fn checkin_all(&self, msg: &str, dry_run: bool) -> PyResult { Ok(PyOutcome::from_origen( self.rc()?.checkin(None, msg, dry_run)?, From 76aee8bcb857a05a42e1e89b2f7e6624a2495260 Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 18 Jul 2023 21:09:04 -0500 Subject: [PATCH 099/200] Update to pyo3 19.1 (latest as of now) --- rust/origen/Cargo.toml | 2 +- rust/origen_metal/Cargo.toml | 2 +- rust/pyapi/Cargo.lock | 164 +++++++++--------- rust/pyapi/Cargo.toml | 2 +- .../src/standard_sub_blocks/arm_debug.rs | 2 - rust/pyapi_metal/Cargo.lock | 24 +-- rust/pyapi_metal/Cargo.toml | 2 +- .../src/frontend/py_data_stores.rs | 4 +- 8 files changed, 100 insertions(+), 102 deletions(-) diff --git a/rust/origen/Cargo.toml b/rust/origen/Cargo.toml index b5b1e371..76040238 100644 --- a/rust/origen/Cargo.toml +++ b/rust/origen/Cargo.toml @@ -45,7 +45,7 @@ git2 = "0.13" num-bigint = {version = "0.4.0", features = ["serde"]} # Enabling this feature stops the CLI from depending on libpython. PYO3 is only included # in origen to enable conversion of an Origen error to a PyErr. -pyo3 = {version = "0.18.3", features = ["extension-module", "auto-initialize"]} +pyo3 = {version = "0.19.1", features = ["extension-module", "auto-initialize"]} chrono = "0.4.11" origen-core-support = { version = "0.1.0-dev.1", path = "./origen-core-support" } whoami = "0.8" # TODO diff --git a/rust/origen_metal/Cargo.toml b/rust/origen_metal/Cargo.toml index e894aeef..f058444e 100644 --- a/rust/origen_metal/Cargo.toml +++ b/rust/origen_metal/Cargo.toml @@ -19,7 +19,7 @@ time = "0.1" termcolor = "1" regex = "1" tempfile = "3" -pyo3 = {version = "0.18.0", features = ["extension-module"]} +pyo3 = {version = "0.19.1", features = ["extension-module"]} serde = {version = "1.0", features = ["derive"]} toml = "0.5" git2 = "0.13" diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index 3d2d8272..1c749a9d 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -152,9 +152,9 @@ version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -345,11 +345,11 @@ dependencies = [ "atty", "onig", "prettyprint", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", "serde", "structopt", - "syn 1.0.74", + "syn 1.0.109", "syn-select", "syntect", "tempfile", @@ -652,9 +652,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -863,9 +863,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f16ef37b2a9b242295d61a154ee91ae884afff6b8b933b486b12481cc58310ca" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -876,10 +876,10 @@ checksum = "ed327f716d0d351d86c9fd3398d20ee39ad8f681873cc081da2ca1c10fed398a" dependencies = [ "enum-utils-from-str", "failure", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", "serde_derive_internals", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -888,7 +888,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49be08bad6e4ca87b2b8e74146987d4e5cb3b7512efa50ef505b51a22227ee1" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", ] @@ -908,9 +908,9 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -1078,9 +1078,9 @@ checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" dependencies = [ "autocfg", "proc-macro-hack", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -1732,9 +1732,9 @@ checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -2190,7 +2190,7 @@ name = "origen-core-support" version = "0.1.0-dev.1" dependencies = [ "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2359,9 +2359,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2405,9 +2405,9 @@ dependencies = [ "phf_generator", "phf_shared", "proc-macro-hack", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2434,9 +2434,9 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2548,9 +2548,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", "version_check", ] @@ -2560,7 +2560,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", "version_check", ] @@ -2583,16 +2583,16 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] name = "proc-macro2" -version = "1.0.28" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ - "unicode-xid 0.2.2", + "unicode-ident", ] [[package]] @@ -2611,9 +2611,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109" +checksum = "ffb88ae05f306b4bfcde40ac4a51dc0b05936a9207a4b75b798c7729c4258a59" dependencies = [ "cfg-if 1.0.0", "indoc", @@ -2630,9 +2630,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3" +checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" dependencies = [ "once_cell", "target-lexicon", @@ -2640,9 +2640,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c" +checksum = "922ede8759e8600ad4da3195ae41259654b9c55da4f7eec84a0ccc7d067a70a4" dependencies = [ "libc", "pyo3-build-config", @@ -2650,25 +2650,25 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d" +checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "pyo3-macros-backend", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] name = "pyo3-macros-backend" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918" +checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2692,7 +2692,7 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", ] [[package]] @@ -3102,9 +3102,9 @@ version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3113,9 +3113,9 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3144,9 +3144,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3254,9 +3254,9 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3306,9 +3306,9 @@ checksum = "7813934aecf5f51a54775e00068c237de98489463968231a51746bbbc03f9c10" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3327,9 +3327,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ "heck", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3346,18 +3346,18 @@ checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] name = "syn" -version = "1.0.74" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "unicode-xid 0.2.2", + "unicode-ident", ] [[package]] @@ -3366,7 +3366,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3918c65ff56396f0fb70664637e183410d273d93721bca514221ae3566dca0e" dependencies = [ - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3491,9 +3491,9 @@ version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3557,9 +3557,9 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3728,6 +3728,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + [[package]] name = "unicode-normalization" version = "0.1.19" @@ -3755,12 +3761,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - [[package]] name = "unindent" version = "0.1.7" @@ -3892,9 +3892,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -3926,9 +3926,9 @@ version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2657dd393f03aa2a659c25c6ae18a13a4048cebd220e147933ea837efc589f" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4065,9 +4065,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a482c56029e48681b89b92b5db3c446db0915e8dd1052c0328a574eda38d5f93" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -4097,7 +4097,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4ca5e22593eb4212382d60d26350065bf2a02c34b85bc850474a74b589a3de9" dependencies = [ "proc-macro-crate 1.1.3", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] diff --git a/rust/pyapi/Cargo.toml b/rust/pyapi/Cargo.toml index 12a2e287..b612d304 100644 --- a/rust/pyapi/Cargo.toml +++ b/rust/pyapi/Cargo.toml @@ -32,7 +32,7 @@ curl-sys = { version = "0.4.34", features = ["static-curl"] } openssl = { version = "0.10", features = ["vendored"] } [dependencies.pyo3] -version = "0.18.3" +version = "0.19.1" features = ["extension-module", "num-bigint", "multiple-pymethods", "auto-initialize"] [build-dependencies] diff --git a/rust/pyapi/src/standard_sub_blocks/arm_debug.rs b/rust/pyapi/src/standard_sub_blocks/arm_debug.rs index 337f8caa..c0b6150c 100644 --- a/rust/pyapi/src/standard_sub_blocks/arm_debug.rs +++ b/rust/pyapi/src/standard_sub_blocks/arm_debug.rs @@ -220,7 +220,6 @@ impl ArmDebug { } #[pyclass(subclass)] -#[pyo3(text_signature = "()")] #[allow(dead_code)] // Suppress the false dead-code warning for the "clone" derive #[derive(Clone)] struct DP { @@ -322,7 +321,6 @@ impl DP { } #[pyclass(subclass)] -#[pyo3(text_signature = "()")] #[allow(dead_code)] // Suppress the false dead-code warning for the "clone" derive #[derive(Clone)] struct JtagDP { diff --git a/rust/pyapi_metal/Cargo.lock b/rust/pyapi_metal/Cargo.lock index 1d87ab36..112ffde0 100644 --- a/rust/pyapi_metal/Cargo.lock +++ b/rust/pyapi_metal/Cargo.lock @@ -1201,9 +1201,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -1741,9 +1741,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b1ac5b3731ba34fdaa9785f8d74d17448cd18f30cf19e0c7e7b1fdb5272109" +checksum = "ffb88ae05f306b4bfcde40ac4a51dc0b05936a9207a4b75b798c7729c4258a59" dependencies = [ "cfg-if 1.0.0", "indoc", @@ -1759,9 +1759,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb946f5ac61bb61a5014924910d936ebd2b23b705f7a4a3c40b05c720b079a3" +checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" dependencies = [ "once_cell", "target-lexicon", @@ -1769,9 +1769,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4d7c5337821916ea2a1d21d1092e8443cf34879e53a0ac653fbb98f44ff65c" +checksum = "922ede8759e8600ad4da3195ae41259654b9c55da4f7eec84a0ccc7d067a70a4" dependencies = [ "libc", "pyo3-build-config", @@ -1779,9 +1779,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d39c55dab3fc5a4b25bbd1ac10a2da452c4aca13bb450f22818a002e29648d" +checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1791,9 +1791,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.18.3" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97daff08a4c48320587b5224cc98d609e3c27b6d437315bd40b605c98eeb5918" +checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" dependencies = [ "proc-macro2", "quote", diff --git a/rust/pyapi_metal/Cargo.toml b/rust/pyapi_metal/Cargo.toml index a77b8776..ceb049fa 100644 --- a/rust/pyapi_metal/Cargo.toml +++ b/rust/pyapi_metal/Cargo.toml @@ -23,7 +23,7 @@ curl-sys = { version = "0.4.34", features = ["static-curl"] } openssl = { version = "0.10", features = ["vendored"] } [dependencies.pyo3] -version = "0.18.0" +version = "0.19.1" features = ["extension-module", "num-bigint"] [build-dependencies] diff --git a/rust/pyapi_metal/src/frontend/py_data_stores.rs b/rust/pyapi_metal/src/frontend/py_data_stores.rs index 5de34aeb..84ead6c4 100644 --- a/rust/pyapi_metal/src/frontend/py_data_stores.rs +++ b/rust/pyapi_metal/src/frontend/py_data_stores.rs @@ -205,7 +205,7 @@ impl PyDataStoreCategory { let mut category_idx: Option = None; if let Some(fa) = func_kwargs { if let Some(pn) = fa.get_item("provide_name") { - if pn.is_instance_of::()? { + if pn.is_instance_of::() { provide_name = pn.extract::()?; } else { if let Ok(i) = pn.extract::() { @@ -219,7 +219,7 @@ impl PyDataStoreCategory { } } if let Some(pc) = fa.get_item("provide_category") { - if pc.is_instance_of::()? { + if pc.is_instance_of::() { provide_category = pc.extract::()?; } else { if let Ok(i) = pc.extract::() { From de5364b2f207aa4eff8339895e4d9068f43c1fdd Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 24 Jul 2023 17:07:42 -0500 Subject: [PATCH 100/200] Update pyprojects to support up to 3.12. add script to make this easier in future --- python/origen/poetry.lock | 1286 +++++++++-------- python/origen/pyproject.toml | 2 +- python/origen_metal/poetry.lock | 349 ++--- python/origen_metal/pyproject.toml | 2 +- rust/origen/Cargo.lock | 170 ++- rust/origen/cli/src/_generated/mod.rs | 1 + rust/origen/cli/src/_generated/python.rs | 12 + rust/origen/cli/src/bin.rs | 1 + .../cli/src/commands/develop_origen/mod.rs | 5 +- .../develop_origen/update_supported_python.rs | 84 ++ rust/origen/cli/src/python.rs | 12 +- rust/origen_metal/Cargo.lock | 30 +- .../no_workspace/templates/pyproject.toml | 2 +- .../no_workspace/user_install/pyproject.toml | 2 +- test_apps/pl_ext_cmds/pyproject.toml | 2 +- test_apps/python_app/poetry.lock | 91 +- test_apps/python_app/pyproject.toml | 6 +- test_apps/python_no_app/poetry.lock | 93 +- test_apps/python_no_app/pyproject.toml | 6 +- test_apps/python_plugin/pyproject.toml | 4 +- .../python_plugin_no_cmds/pyproject.toml | 2 +- .../python_plugin_the_second/pyproject.toml | 2 +- .../pyproject.toml | 2 +- 23 files changed, 1200 insertions(+), 966 deletions(-) create mode 100644 rust/origen/cli/src/_generated/mod.rs create mode 100644 rust/origen/cli/src/_generated/python.rs create mode 100644 rust/origen/cli/src/commands/develop_origen/update_supported_python.rs diff --git a/python/origen/poetry.lock b/python/origen/poetry.lock index fd689026..3520007b 100644 --- a/python/origen/poetry.lock +++ b/python/origen/poetry.lock @@ -1,10 +1,16 @@ +# This file is automatically @generated by Poetry and should not be changed by hand. + [[package]] name = "alabaster" -version = "0.7.12" +version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.6" +files = [ + {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, + {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, +] [[package]] name = "atomicwrites" @@ -13,31 +19,46 @@ description = "Atomic file writes." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] [[package]] name = "attrs" -version = "21.4.0" +version = "23.1.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" +files = [ + {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, + {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, +] + +[package.dependencies] +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] +cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]", "pre-commit"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] +tests = ["attrs[tests-no-zope]", "zope-interface"] +tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] [[package]] name = "babel" -version = "2.10.3" +version = "2.12.1" description = "Internationalization utilities" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "Babel-2.12.1-py3-none-any.whl", hash = "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610"}, + {file = "Babel-2.12.1.tar.gz", hash = "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"}, +] [package.dependencies] -pytz = ">=2015.7" +pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} [[package]] name = "beautifulsoup4" @@ -46,6 +67,11 @@ description = "Screen-scraping library" category = "main" optional = false python-versions = "*" +files = [ + {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, + {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, + {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, +] [package.dependencies] soupsieve = ">=1.2" @@ -61,17 +87,24 @@ description = "Dummy package for Beautiful Soup" category = "main" optional = false python-versions = "*" +files = [ + {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, +] [package.dependencies] beautifulsoup4 = "*" [[package]] name = "cachecontrol" -version = "0.12.11" +version = "0.12.14" description = "httplib2 caching for requests" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "CacheControl-0.12.14-py2.py3-none-any.whl", hash = "sha256:1c2939be362a70c4e5f02c6249462b3b7a24441e4f1ced5e9ef028172edf356a"}, + {file = "CacheControl-0.12.14.tar.gz", hash = "sha256:d1087f45781c0e00616479bfd282c78504371ca71da017b49df9f5365a95feba"}, +] [package.dependencies] lockfile = {version = ">=0.9", optional = true, markers = "extra == \"filecache\""} @@ -89,19 +122,27 @@ description = "Cachy provides a simple yet effective caching library." category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, + {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, +] [package.extras] -redis = ["redis (>=3.3.6,<4.0.0)"] memcached = ["python-memcached (>=1.59,<2.0)"] msgpack = ["msgpack-python (>=0.5,<0.6)"] +redis = ["redis (>=3.3.6,<4.0.0)"] [[package]] name = "certifi" -version = "2022.6.15" +version = "2023.5.7" description = "Python package for providing Mozilla's CA Bundle." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, + {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, +] [[package]] name = "cffi" @@ -110,20 +151,160 @@ description = "Foreign Function Interface for Python calling C code." category = "main" optional = false python-versions = "*" +files = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] [package.dependencies] pycparser = "*" [[package]] name = "charset-normalizer" -version = "2.1.0" +version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false -python-versions = ">=3.6.0" - -[package.extras] -unicode_backport = ["unicodedata2"] +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"}, + {file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"}, +] [[package]] name = "cleo" @@ -132,6 +313,10 @@ description = "Cleo allows you to create beautiful and testable command-line int category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, + {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, +] [package.dependencies] clikit = ">=0.6.0,<0.7.0" @@ -143,6 +328,10 @@ description = "CliKit is a group of utilities to build beautiful and testable co category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, + {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, +] [package.dependencies] crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} @@ -151,11 +340,15 @@ pylev = ">=1.3,<2.0" [[package]] name = "colorama" -version = "0.4.5" +version = "0.4.6" description = "Cross-platform colored terminal text." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] [[package]] name = "commonmark" @@ -164,6 +357,10 @@ description = "Python parser for the CommonMark Markdown spec" category = "main" optional = false python-versions = "*" +files = [ + {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, + {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, +] [package.extras] test = ["flake8 (==3.7.8)", "hypothesis (==3.55.3)"] @@ -175,53 +372,96 @@ description = "Manage Python errors with ease" category = "main" optional = false python-versions = ">=3.6,<4.0" +files = [ + {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, + {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, +] [[package]] name = "cryptography" -version = "37.0.4" +version = "41.0.2" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "cryptography-41.0.2-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:01f1d9e537f9a15b037d5d9ee442b8c22e3ae11ce65ea1f3316a41c78756b711"}, + {file = "cryptography-41.0.2-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:079347de771f9282fbfe0e0236c716686950c19dee1b76240ab09ce1624d76d7"}, + {file = "cryptography-41.0.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:439c3cc4c0d42fa999b83ded80a9a1fb54d53c58d6e59234cfe97f241e6c781d"}, + {file = "cryptography-41.0.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f14ad275364c8b4e525d018f6716537ae7b6d369c094805cae45300847e0894f"}, + {file = "cryptography-41.0.2-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:84609ade00a6ec59a89729e87a503c6e36af98ddcd566d5f3be52e29ba993182"}, + {file = "cryptography-41.0.2-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:49c3222bb8f8e800aead2e376cbef687bc9e3cb9b58b29a261210456a7783d83"}, + {file = "cryptography-41.0.2-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:d73f419a56d74fef257955f51b18d046f3506270a5fd2ac5febbfa259d6c0fa5"}, + {file = "cryptography-41.0.2-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:2a034bf7d9ca894720f2ec1d8b7b5832d7e363571828037f9e0c4f18c1b58a58"}, + {file = "cryptography-41.0.2-cp37-abi3-win32.whl", hash = "sha256:d124682c7a23c9764e54ca9ab5b308b14b18eba02722b8659fb238546de83a76"}, + {file = "cryptography-41.0.2-cp37-abi3-win_amd64.whl", hash = "sha256:9c3fe6534d59d071ee82081ca3d71eed3210f76ebd0361798c74abc2bcf347d4"}, + {file = "cryptography-41.0.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a719399b99377b218dac6cf547b6ec54e6ef20207b6165126a280b0ce97e0d2a"}, + {file = "cryptography-41.0.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:182be4171f9332b6741ee818ec27daff9fb00349f706629f5cbf417bd50e66fd"}, + {file = "cryptography-41.0.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:7a9a3bced53b7f09da251685224d6a260c3cb291768f54954e28f03ef14e3766"}, + {file = "cryptography-41.0.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:f0dc40e6f7aa37af01aba07277d3d64d5a03dc66d682097541ec4da03cc140ee"}, + {file = "cryptography-41.0.2-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:674b669d5daa64206c38e507808aae49904c988fa0a71c935e7006a3e1e83831"}, + {file = "cryptography-41.0.2-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:7af244b012711a26196450d34f483357e42aeddb04128885d95a69bd8b14b69b"}, + {file = "cryptography-41.0.2-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:9b6d717393dbae53d4e52684ef4f022444fc1cce3c48c38cb74fca29e1f08eaa"}, + {file = "cryptography-41.0.2-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:192255f539d7a89f2102d07d7375b1e0a81f7478925b3bc2e0549ebf739dae0e"}, + {file = "cryptography-41.0.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f772610fe364372de33d76edcd313636a25684edb94cee53fd790195f5989d14"}, + {file = "cryptography-41.0.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:b332cba64d99a70c1e0836902720887fb4529ea49ea7f5462cf6640e095e11d2"}, + {file = "cryptography-41.0.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:9a6673c1828db6270b76b22cc696f40cde9043eb90373da5c2f8f2158957f42f"}, + {file = "cryptography-41.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:342f3767e25876751e14f8459ad85e77e660537ca0a066e10e75df9c9e9099f0"}, + {file = "cryptography-41.0.2.tar.gz", hash = "sha256:7d230bf856164de164ecb615ccc14c7fc6de6906ddd5b491f3af90d3514c925c"}, +] [package.dependencies] cffi = ">=1.12" [package.extras] -docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"] -docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] -pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] -sdist = ["setuptools_rust (>=0.11.4)"] +docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] +docstest = ["pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"] +nox = ["nox"] +pep8test = ["black", "check-sdist", "mypy", "ruff"] +sdist = ["build"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"] +test = ["pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test-randomorder = ["pytest-randomly"] [[package]] name = "distlib" -version = "0.3.5" +version = "0.3.7" description = "Distribution utilities" category = "main" optional = false python-versions = "*" +files = [ + {file = "distlib-0.3.7-py2.py3-none-any.whl", hash = "sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057"}, + {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, +] [[package]] name = "docutils" -version = "0.19" +version = "0.20.1" description = "Docutils -- Python Documentation Utilities" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "docutils-0.20.1-py3-none-any.whl", hash = "sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6"}, + {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, +] [[package]] name = "filelock" -version = "3.7.1" +version = "3.12.2" description = "A platform independent file lock." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "filelock-3.12.2-py3-none-any.whl", hash = "sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec"}, + {file = "filelock-3.12.2.tar.gz", hash = "sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81"}, +] [package.extras] -docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] -testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] +docs = ["furo (>=2023.5.20)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] [[package]] name = "html5lib" @@ -230,24 +470,32 @@ description = "HTML parser based on the WHATWG HTML specification" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, + {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, +] [package.dependencies] six = ">=1.9" webencodings = "*" [package.extras] -all = ["genshi", "chardet (>=2.2)", "lxml"] +all = ["chardet (>=2.2)", "genshi", "lxml"] chardet = ["chardet (>=2.2)"] genshi = ["genshi"] lxml = ["lxml"] [[package]] name = "idna" -version = "3.3" +version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] [[package]] name = "imagesize" @@ -256,6 +504,10 @@ description = "Getting image size from png/jpeg/jpeg2000/gif file" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] [[package]] name = "importlib-metadata" @@ -264,21 +516,29 @@ description = "Read metadata from Python packages" category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +files = [ + {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, + {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, +] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["sphinx", "rst.linker"] -testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] +docs = ["rst.linker", "sphinx"] +testing = ["importlib-resources (>=1.3)", "packaging", "pep517"] [[package]] name = "iniconfig" -version = "1.1.1" -description = "iniconfig: brain-dead simple config-ini parsing" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] [[package]] name = "jeepney" @@ -287,10 +547,14 @@ description = "Low-level, pure Python DBus protocol wrapper." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, + {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, +] [package.extras] -test = ["pytest", "pytest-trio", "pytest-asyncio (>=0.17)", "testpath", "trio", "async-timeout"] -trio = ["trio", "async-generator"] +test = ["async-timeout", "pytest", "pytest-asyncio (>=0.17)", "pytest-trio", "testpath", "trio"] +trio = ["async_generator", "trio"] [[package]] name = "jinja2" @@ -299,6 +563,10 @@ description = "A very fast and expressive template engine." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] [package.dependencies] MarkupSafe = ">=2.0" @@ -313,6 +581,10 @@ description = "Store and access your passwords safely." category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, + {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, +] [package.dependencies] importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} @@ -321,8 +593,8 @@ pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_ SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["jaraco.packaging (>=8.2)", "rst.linker (>=1.9)", "sphinx"] +testing = ["pytest (>=4.6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=1.2.3)", "pytest-cov", "pytest-enabler", "pytest-flake8", "pytest-mypy"] [[package]] name = "lockfile" @@ -331,6 +603,10 @@ description = "Platform-independent file locking module" category = "main" optional = false python-versions = "*" +files = [ + {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, + {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, +] [[package]] name = "mako" @@ -339,25 +615,145 @@ description = "A super-fast templating language that borrows the best ideas fro category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, +] [package.dependencies] MarkupSafe = ">=0.9.2" [[package]] name = "markupsafe" -version = "2.1.1" +version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, +] [[package]] name = "msgpack" -version = "1.0.4" +version = "1.0.5" description = "MessagePack serializer" category = "main" optional = false python-versions = "*" +files = [ + {file = "msgpack-1.0.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:525228efd79bb831cf6830a732e2e80bc1b05436b086d4264814b4b2955b2fa9"}, + {file = "msgpack-1.0.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4f8d8b3bf1ff2672567d6b5c725a1b347fe838b912772aa8ae2bf70338d5a198"}, + {file = "msgpack-1.0.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:cdc793c50be3f01106245a61b739328f7dccc2c648b501e237f0699fe1395b81"}, + {file = "msgpack-1.0.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cb47c21a8a65b165ce29f2bec852790cbc04936f502966768e4aae9fa763cb7"}, + {file = "msgpack-1.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e42b9594cc3bf4d838d67d6ed62b9e59e201862a25e9a157019e171fbe672dd3"}, + {file = "msgpack-1.0.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:55b56a24893105dc52c1253649b60f475f36b3aa0fc66115bffafb624d7cb30b"}, + {file = "msgpack-1.0.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:1967f6129fc50a43bfe0951c35acbb729be89a55d849fab7686004da85103f1c"}, + {file = "msgpack-1.0.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20a97bf595a232c3ee6d57ddaadd5453d174a52594bf9c21d10407e2a2d9b3bd"}, + {file = "msgpack-1.0.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d25dd59bbbbb996eacf7be6b4ad082ed7eacc4e8f3d2df1ba43822da9bfa122a"}, + {file = "msgpack-1.0.5-cp310-cp310-win32.whl", hash = "sha256:382b2c77589331f2cb80b67cc058c00f225e19827dbc818d700f61513ab47bea"}, + {file = "msgpack-1.0.5-cp310-cp310-win_amd64.whl", hash = "sha256:4867aa2df9e2a5fa5f76d7d5565d25ec76e84c106b55509e78c1ede0f152659a"}, + {file = "msgpack-1.0.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9f5ae84c5c8a857ec44dc180a8b0cc08238e021f57abdf51a8182e915e6299f0"}, + {file = "msgpack-1.0.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:9e6ca5d5699bcd89ae605c150aee83b5321f2115695e741b99618f4856c50898"}, + {file = "msgpack-1.0.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5494ea30d517a3576749cad32fa27f7585c65f5f38309c88c6d137877fa28a5a"}, + {file = "msgpack-1.0.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1ab2f3331cb1b54165976a9d976cb251a83183631c88076613c6c780f0d6e45a"}, + {file = "msgpack-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28592e20bbb1620848256ebc105fc420436af59515793ed27d5c77a217477705"}, + {file = "msgpack-1.0.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe5c63197c55bce6385d9aee16c4d0641684628f63ace85f73571e65ad1c1e8d"}, + {file = "msgpack-1.0.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ed40e926fa2f297e8a653c954b732f125ef97bdd4c889f243182299de27e2aa9"}, + {file = "msgpack-1.0.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b2de4c1c0538dcb7010902a2b97f4e00fc4ddf2c8cda9749af0e594d3b7fa3d7"}, + {file = "msgpack-1.0.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bf22a83f973b50f9d38e55c6aade04c41ddda19b00c4ebc558930d78eecc64ed"}, + {file = "msgpack-1.0.5-cp311-cp311-win32.whl", hash = "sha256:c396e2cc213d12ce017b686e0f53497f94f8ba2b24799c25d913d46c08ec422c"}, + {file = "msgpack-1.0.5-cp311-cp311-win_amd64.whl", hash = "sha256:6c4c68d87497f66f96d50142a2b73b97972130d93677ce930718f68828b382e2"}, + {file = "msgpack-1.0.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:a2b031c2e9b9af485d5e3c4520f4220d74f4d222a5b8dc8c1a3ab9448ca79c57"}, + {file = "msgpack-1.0.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f837b93669ce4336e24d08286c38761132bc7ab29782727f8557e1eb21b2080"}, + {file = "msgpack-1.0.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1d46dfe3832660f53b13b925d4e0fa1432b00f5f7210eb3ad3bb9a13c6204a6"}, + {file = "msgpack-1.0.5-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:366c9a7b9057e1547f4ad51d8facad8b406bab69c7d72c0eb6f529cf76d4b85f"}, + {file = "msgpack-1.0.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:4c075728a1095efd0634a7dccb06204919a2f67d1893b6aa8e00497258bf926c"}, + {file = "msgpack-1.0.5-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:f933bbda5a3ee63b8834179096923b094b76f0c7a73c1cfe8f07ad608c58844b"}, + {file = "msgpack-1.0.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:36961b0568c36027c76e2ae3ca1132e35123dcec0706c4b7992683cc26c1320c"}, + {file = "msgpack-1.0.5-cp36-cp36m-win32.whl", hash = "sha256:b5ef2f015b95f912c2fcab19c36814963b5463f1fb9049846994b007962743e9"}, + {file = "msgpack-1.0.5-cp36-cp36m-win_amd64.whl", hash = "sha256:288e32b47e67f7b171f86b030e527e302c91bd3f40fd9033483f2cacc37f327a"}, + {file = "msgpack-1.0.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:137850656634abddfb88236008339fdaba3178f4751b28f270d2ebe77a563b6c"}, + {file = "msgpack-1.0.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0c05a4a96585525916b109bb85f8cb6511db1c6f5b9d9cbcbc940dc6b4be944b"}, + {file = "msgpack-1.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56a62ec00b636583e5cb6ad313bbed36bb7ead5fa3a3e38938503142c72cba4f"}, + {file = "msgpack-1.0.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ef8108f8dedf204bb7b42994abf93882da1159728a2d4c5e82012edd92c9da9f"}, + {file = "msgpack-1.0.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1835c84d65f46900920b3708f5ba829fb19b1096c1800ad60bae8418652a951d"}, + {file = "msgpack-1.0.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:e57916ef1bd0fee4f21c4600e9d1da352d8816b52a599c46460e93a6e9f17086"}, + {file = "msgpack-1.0.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:17358523b85973e5f242ad74aa4712b7ee560715562554aa2134d96e7aa4cbbf"}, + {file = "msgpack-1.0.5-cp37-cp37m-win32.whl", hash = "sha256:cb5aaa8c17760909ec6cb15e744c3ebc2ca8918e727216e79607b7bbce9c8f77"}, + {file = "msgpack-1.0.5-cp37-cp37m-win_amd64.whl", hash = "sha256:ab31e908d8424d55601ad7075e471b7d0140d4d3dd3272daf39c5c19d936bd82"}, + {file = "msgpack-1.0.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b72d0698f86e8d9ddf9442bdedec15b71df3598199ba33322d9711a19f08145c"}, + {file = "msgpack-1.0.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:379026812e49258016dd84ad79ac8446922234d498058ae1d415f04b522d5b2d"}, + {file = "msgpack-1.0.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:332360ff25469c346a1c5e47cbe2a725517919892eda5cfaffe6046656f0b7bb"}, + {file = "msgpack-1.0.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:476a8fe8fae289fdf273d6d2a6cb6e35b5a58541693e8f9f019bfe990a51e4ba"}, + {file = "msgpack-1.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a9985b214f33311df47e274eb788a5893a761d025e2b92c723ba4c63936b69b1"}, + {file = "msgpack-1.0.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48296af57cdb1d885843afd73c4656be5c76c0c6328db3440c9601a98f303d87"}, + {file = "msgpack-1.0.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:addab7e2e1fcc04bd08e4eb631c2a90960c340e40dfc4a5e24d2ff0d5a3b3edb"}, + {file = "msgpack-1.0.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:916723458c25dfb77ff07f4c66aed34e47503b2eb3188b3adbec8d8aa6e00f48"}, + {file = "msgpack-1.0.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:821c7e677cc6acf0fd3f7ac664c98803827ae6de594a9f99563e48c5a2f27eb0"}, + {file = "msgpack-1.0.5-cp38-cp38-win32.whl", hash = "sha256:1c0f7c47f0087ffda62961d425e4407961a7ffd2aa004c81b9c07d9269512f6e"}, + {file = "msgpack-1.0.5-cp38-cp38-win_amd64.whl", hash = "sha256:bae7de2026cbfe3782c8b78b0db9cbfc5455e079f1937cb0ab8d133496ac55e1"}, + {file = "msgpack-1.0.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:20c784e66b613c7f16f632e7b5e8a1651aa5702463d61394671ba07b2fc9e025"}, + {file = "msgpack-1.0.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:266fa4202c0eb94d26822d9bfd7af25d1e2c088927fe8de9033d929dd5ba24c5"}, + {file = "msgpack-1.0.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:18334484eafc2b1aa47a6d42427da7fa8f2ab3d60b674120bce7a895a0a85bdd"}, + {file = "msgpack-1.0.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:57e1f3528bd95cc44684beda696f74d3aaa8a5e58c816214b9046512240ef437"}, + {file = "msgpack-1.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:586d0d636f9a628ddc6a17bfd45aa5b5efaf1606d2b60fa5d87b8986326e933f"}, + {file = "msgpack-1.0.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a740fa0e4087a734455f0fc3abf5e746004c9da72fbd541e9b113013c8dc3282"}, + {file = "msgpack-1.0.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3055b0455e45810820db1f29d900bf39466df96ddca11dfa6d074fa47054376d"}, + {file = "msgpack-1.0.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:a61215eac016f391129a013c9e46f3ab308db5f5ec9f25811e811f96962599a8"}, + {file = "msgpack-1.0.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:362d9655cd369b08fda06b6657a303eb7172d5279997abe094512e919cf74b11"}, + {file = "msgpack-1.0.5-cp39-cp39-win32.whl", hash = "sha256:ac9dd47af78cae935901a9a500104e2dea2e253207c924cc95de149606dc43cc"}, + {file = "msgpack-1.0.5-cp39-cp39-win_amd64.whl", hash = "sha256:06f5174b5f8ed0ed919da0e62cbd4ffde676a374aba4020034da05fab67b9164"}, + {file = "msgpack-1.0.5.tar.gz", hash = "sha256:c075544284eadc5cddc70f4757331d99dcbc16b2bbd4849d15f8aae4cf36d31c"}, +] [[package]] name = "origen-autoapi" @@ -366,6 +762,10 @@ description = "Automatic API reference documentation generation for Sphinx inspi category = "main" optional = false python-versions = "*" +files = [ + {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, + {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, +] [package.dependencies] sphinx = "*" @@ -376,7 +776,8 @@ version = "0.4.0" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7" +files = [] develop = true [package.dependencies] @@ -395,6 +796,10 @@ description = "Core utilities for Python packages" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, + {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, +] [package.dependencies] pyparsing = ">=2.0.2" @@ -406,6 +811,10 @@ description = "Bring colors to your terminal." category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, + {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, +] [[package]] name = "pexpect" @@ -414,40 +823,59 @@ description = "Pexpect allows easy control of interactive console applications." category = "main" optional = false python-versions = "*" +files = [ + {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, + {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, +] [package.dependencies] ptyprocess = ">=0.5" [[package]] name = "pkginfo" -version = "1.8.3" -description = "Query metadatdata from sdists / bdists / installed packages." +version = "1.9.6" +description = "Query metadata from sdists / bdists / installed packages." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.6" +files = [ + {file = "pkginfo-1.9.6-py3-none-any.whl", hash = "sha256:4b7a555a6d5a22169fcc9cf7bfd78d296b0361adad412a346c1226849af5e546"}, + {file = "pkginfo-1.9.6.tar.gz", hash = "sha256:8fd5896e8718a4372f0ea9cc9d96f6417c9b986e23a4d116dda26b62cc29d046"}, +] [package.extras] -testing = ["nose", "coverage"] +testing = ["pytest", "pytest-cov"] [[package]] name = "platformdirs" -version = "2.5.2" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "2.6.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, + {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} [package.extras] -docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] -test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] +docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pluggy" -version = "1.0.0" +version = "1.2.0" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, + {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, +] [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} @@ -458,11 +886,15 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poetry" -version = "1.1.14" +version = "1.1.15" description = "Python dependency management and packaging made easy." category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "poetry-1.1.15-py2.py3-none-any.whl", hash = "sha256:2f8f68bc02006386dd640d08e0ae483231501c6e727842a8a799c9ee376b98c2"}, + {file = "poetry-1.1.15.tar.gz", hash = "sha256:a373848fd205f31b2f6bee6b87a201ea1e09ca573a2f40d0991539f564cedffd"}, +] [package.dependencies] cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"], markers = "python_version >= \"3.6\" and python_version < \"4.0\""} @@ -490,6 +922,10 @@ description = "Poetry PEP 517 Build Backend" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, + {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, +] [package.dependencies] importlib-metadata = {version = ">=1.7.0,<2.0.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.5\" and python_version < \"3.8\""} @@ -501,6 +937,10 @@ description = "Run a subprocess in a pseudo terminal" category = "main" optional = false python-versions = "*" +files = [ + {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, + {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, +] [[package]] name = "py" @@ -509,6 +949,10 @@ description = "library with cross-python path, ini-parsing, io, code, log facili category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] [[package]] name = "pycparser" @@ -517,14 +961,25 @@ description = "C parser in Python" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] [[package]] name = "pygments" -version = "2.12.0" +version = "2.15.1" description = "Pygments is a syntax highlighting package written in Python." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "Pygments-2.15.1-py3-none-any.whl", hash = "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1"}, + {file = "Pygments-2.15.1.tar.gz", hash = "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c"}, +] + +[package.extras] +plugins = ["importlib-metadata"] [[package]] name = "pylev" @@ -533,17 +988,25 @@ description = "A pure Python Levenshtein implementation that's not freaking GPL' category = "main" optional = false python-versions = "*" +files = [ + {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, + {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, +] [[package]] name = "pyparsing" -version = "3.0.9" +version = "3.1.0" description = "pyparsing module - Classes and methods to define and execute parsing grammars" category = "main" optional = false python-versions = ">=3.6.8" +files = [ + {file = "pyparsing-3.1.0-py3-none-any.whl", hash = "sha256:d554a96d1a7d3ddaf7183104485bc19fd80543ad6ac5bdb6426719d766fb06c1"}, + {file = "pyparsing-3.1.0.tar.gz", hash = "sha256:edb662d6fe322d6e990b1594b5feaeadf806803359e3d4d42f11e295e588f0ea"}, +] [package.extras] -diagrams = ["railroad-diagrams", "jinja2"] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pyreadline3" @@ -552,6 +1015,10 @@ description = "A python implementation of GNU readline." category = "main" optional = false python-versions = "*" +files = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] [[package]] name = "pytest" @@ -560,6 +1027,10 @@ description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, +] [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} @@ -577,19 +1048,27 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "pytz" -version = "2022.1" +version = "2023.3" description = "World timezone definitions, modern and historical" category = "main" optional = false python-versions = "*" +files = [ + {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, + {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, +] [[package]] name = "pywin32-ctypes" -version = "0.2.0" -description = "" +version = "0.2.2" +description = "A (partial) reimplementation of pywin32 using ctypes/cffi" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.6" +files = [ + {file = "pywin32-ctypes-0.2.2.tar.gz", hash = "sha256:3426e063bdd5fd4df74a14fa3cf80a0b42845a87e1d1e81f6549f9daec593a60"}, + {file = "pywin32_ctypes-0.2.2-py3-none-any.whl", hash = "sha256:bf490a1a709baf35d688fe0ecf980ed4de11d2b3e37b51e5442587a75d9957e7"}, +] [[package]] name = "recommonmark" @@ -598,6 +1077,10 @@ description = "A docutils-compatibility bridge to CommonMark, enabling you to wr category = "main" optional = false python-versions = "*" +files = [ + {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, + {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, +] [package.dependencies] commonmark = ">=0.8.1" @@ -606,21 +1089,25 @@ sphinx = ">=1.3.1" [[package]] name = "requests" -version = "2.28.1" +version = "2.31.0" description = "Python HTTP for Humans." category = "main" optional = false -python-versions = ">=3.7, <4" +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] [package.dependencies] certifi = ">=2017.4.17" -charset-normalizer = ">=2,<3" +charset-normalizer = ">=2,<4" idna = ">=2.5,<4" -urllib3 = ">=1.21.1,<1.27" +urllib3 = ">=1.21.1,<3" [package.extras] socks = ["PySocks (>=1.5.6,!=1.5.7)"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "requests-toolbelt" @@ -629,29 +1116,58 @@ description = "A utility belt for advanced users of python-requests" category = "main" optional = false python-versions = "*" +files = [ + {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, + {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, +] [package.dependencies] requests = ">=2.0.1,<3.0.0" [[package]] name = "secretstorage" -version = "3.3.2" +version = "3.3.3" description = "Python bindings to FreeDesktop.org Secret Service API" category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "SecretStorage-3.3.3-py3-none-any.whl", hash = "sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99"}, + {file = "SecretStorage-3.3.3.tar.gz", hash = "sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77"}, +] [package.dependencies] cryptography = ">=2.0" jeepney = ">=0.6" +[[package]] +name = "setuptools" +version = "68.0.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "setuptools-68.0.0-py3-none-any.whl", hash = "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f"}, + {file = "setuptools-68.0.0.tar.gz", hash = "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + [[package]] name = "shellingham" -version = "1.4.0" +version = "1.5.0.post1" description = "Tool to Detect Surrounding Shell" category = "main" optional = false -python-versions = "!=3.0,!=3.1,!=3.2,!=3.3,>=2.6" +python-versions = ">=3.7" +files = [ + {file = "shellingham-1.5.0.post1-py2.py3-none-any.whl", hash = "sha256:368bf8c00754fd4f55afb7bbb86e272df77e4dc76ac29dbcbb81a59e9fc15744"}, + {file = "shellingham-1.5.0.post1.tar.gz", hash = "sha256:823bc5fb5c34d60f285b624e7264f4dda254bc803a3774a147bf99c0e3004a28"}, +] [[package]] name = "six" @@ -660,6 +1176,10 @@ description = "Python 2 and 3 compatibility utilities" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] [[package]] name = "snowballstemmer" @@ -668,14 +1188,22 @@ description = "This package provides 29 stemmers for 28 languages generated from category = "main" optional = false python-versions = "*" +files = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] [[package]] name = "soupsieve" -version = "2.3.2.post1" +version = "2.4.1" description = "A modern CSS selector implementation for Beautiful Soup." category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "soupsieve-2.4.1-py3-none-any.whl", hash = "sha256:1c1bfee6819544a3447586c889157365a27e10d88cde3ad3da0cf0ddf646feb8"}, + {file = "soupsieve-2.4.1.tar.gz", hash = "sha256:89d12b2d5dfcd2c9e8c22326da9d9aa9cb3dfab0a83a024f05704076ee8d35ea"}, +] [[package]] name = "sphinx" @@ -684,6 +1212,10 @@ description = "Python documentation generator" category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, + {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, +] [package.dependencies] alabaster = ">=0.7,<0.8" @@ -695,6 +1227,7 @@ Jinja2 = ">=2.3" packaging = "*" Pygments = ">=2.0" requests = ">=2.5.0" +setuptools = "*" snowballstemmer = ">=1.1" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" @@ -705,8 +1238,8 @@ sphinxcontrib-serializinghtml = "*" [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)", "docutils-stubs"] -test = ["pytest", "pytest-cov", "html5lib", "typed-ast", "cython"] +lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-import-order", "mypy (>=0.770)"] +test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] [[package]] name = "sphinxbootstrap4theme" @@ -715,6 +1248,9 @@ description = "Sphinx Bootstrap4 Theme" category = "main" optional = false python-versions = "*" +files = [ + {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, +] [[package]] name = "sphinxcontrib-applehelp" @@ -723,9 +1259,13 @@ description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -735,9 +1275,13 @@ description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -747,10 +1291,14 @@ description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML h category = "main" optional = false python-versions = ">=3.6" +files = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] -test = ["pytest", "html5lib"] +lint = ["docutils-stubs", "flake8", "mypy"] +test = ["html5lib", "pytest"] [[package]] name = "sphinxcontrib-jsmath" @@ -759,9 +1307,13 @@ description = "A sphinx extension which renders display math in HTML via JavaScr category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] [package.extras] -test = ["pytest", "flake8", "mypy"] +test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" @@ -770,9 +1322,13 @@ description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp d category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] @@ -782,18 +1338,29 @@ description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs category = "main" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "termcolor" -version = "1.1.0" -description = "ANSII Color formatting for output in terminal." +version = "2.3.0" +description = "ANSI color formatting for output in terminal" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" +files = [ + {file = "termcolor-2.3.0-py3-none-any.whl", hash = "sha256:3afb05607b89aed0ffe25202399ee0867ad4d3cb4180d98aaf8eefa6a5f7d475"}, + {file = "termcolor-2.3.0.tar.gz", hash = "sha256:b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a"}, +] + +[package.extras] +tests = ["pytest", "pytest-cov"] [[package]] name = "toml" @@ -802,46 +1369,74 @@ description = "Python Library for Tom's Obvious, Minimal Language" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] [[package]] name = "tomlkit" -version = "0.11.1" +version = "0.11.8" description = "Style preserving TOML library" category = "main" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.7" +files = [ + {file = "tomlkit-0.11.8-py3-none-any.whl", hash = "sha256:8c726c4c202bdb148667835f68d68780b9a003a9ec34167b6c673b38eff2a171"}, + {file = "tomlkit-0.11.8.tar.gz", hash = "sha256:9330fc7faa1db67b541b28e62018c17d20be733177d290a13b24c62d1614e0c3"}, +] + +[[package]] +name = "typing-extensions" +version = "4.7.1" +description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, + {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, +] [[package]] name = "urllib3" -version = "1.26.10" +version = "2.0.4" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4" +python-versions = ">=3.7" +files = [ + {file = "urllib3-2.0.4-py3-none-any.whl", hash = "sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4"}, + {file = "urllib3-2.0.4.tar.gz", hash = "sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11"}, +] [package.extras] -brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] [[package]] name = "virtualenv" -version = "20.15.1" +version = "20.16.2" description = "Virtual Python Environment builder" category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" +files = [ + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, +] [package.dependencies] distlib = ">=0.3.1,<1" filelock = ">=3.2,<4" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} platformdirs = ">=2,<3" -six = ">=1.9.0,<2" [package.extras] docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "packaging (>=20.0)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)"] [[package]] name = "webencodings" @@ -850,6 +1445,10 @@ description = "Character encoding aliases for legacy web content" category = "main" optional = false python-versions = "*" +files = [ + {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, + {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, +] [[package]] name = "yapf" @@ -858,489 +1457,28 @@ description = "A formatter for Python code." category = "main" optional = false python-versions = "*" +files = [ + {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, + {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, +] [[package]] name = "zipp" -version = "3.8.1" +version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, + {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, +] [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [metadata] -lock-version = "1.1" -python-versions = ">=3.7,<3.11" -content-hash = "18baf3ee359431dbc5bd8bf887beae66316f67873dcef60c0a187819f81d188b" - -[metadata.files] -alabaster = [ - {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, - {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, -] -atomicwrites = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] -attrs = [ - {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, - {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, -] -babel = [ - {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, - {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, -] -beautifulsoup4 = [ - {file = "beautifulsoup4-4.8.2-py2-none-any.whl", hash = "sha256:e1505eeed31b0f4ce2dbb3bc8eb256c04cc2b3b72af7d551a4ab6efd5cbe5dae"}, - {file = "beautifulsoup4-4.8.2-py3-none-any.whl", hash = "sha256:9fbb4d6e48ecd30bcacc5b63b94088192dcda178513b2ae3c394229f8911b887"}, - {file = "beautifulsoup4-4.8.2.tar.gz", hash = "sha256:05fd825eb01c290877657a56df4c6e4c311b3965bda790c613a3d6fb01a5462a"}, -] -bs4 = [ - {file = "bs4-0.0.1.tar.gz", hash = "sha256:36ecea1fd7cc5c0c6e4a1ff075df26d50da647b75376626cc186e2212886dd3a"}, -] -cachecontrol = [ - {file = "CacheControl-0.12.11-py2.py3-none-any.whl", hash = "sha256:2c75d6a8938cb1933c75c50184549ad42728a27e9f6b92fd677c3151aa72555b"}, - {file = "CacheControl-0.12.11.tar.gz", hash = "sha256:a5b9fcc986b184db101aa280b42ecdcdfc524892596f606858e0b7a8b4d9e144"}, -] -cachy = [ - {file = "cachy-0.3.0-py2.py3-none-any.whl", hash = "sha256:338ca09c8860e76b275aff52374330efedc4d5a5e45dc1c5b539c1ead0786fe7"}, - {file = "cachy-0.3.0.tar.gz", hash = "sha256:186581f4ceb42a0bbe040c407da73c14092379b1e4c0e327fdb72ae4a9b269b1"}, -] -certifi = [ - {file = "certifi-2022.6.15-py3-none-any.whl", hash = "sha256:fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"}, - {file = "certifi-2022.6.15.tar.gz", hash = "sha256:84c85a9078b11105f04f3036a9482ae10e4621616db313fe045dd24743a0820d"}, -] -cffi = [ - {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, - {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, - {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, - {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, - {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, - {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, - {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, - {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, - {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, - {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, - {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, - {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, - {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, - {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, - {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, - {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, - {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, - {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, - {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, - {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, - {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, - {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, - {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, - {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, - {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, - {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, - {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, - {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, - {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, - {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, - {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, - {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, - {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, -] -charset-normalizer = [ - {file = "charset-normalizer-2.1.0.tar.gz", hash = "sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"}, - {file = "charset_normalizer-2.1.0-py3-none-any.whl", hash = "sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5"}, -] -cleo = [ - {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, - {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, -] -clikit = [ - {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, - {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, -] -colorama = [ - {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, - {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, -] -commonmark = [ - {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, - {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, -] -crashtest = [ - {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, - {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, -] -cryptography = [ - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:549153378611c0cca1042f20fd9c5030d37a72f634c9326e225c9f666d472884"}, - {file = "cryptography-37.0.4-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:a958c52505c8adf0d3822703078580d2c0456dd1d27fabfb6f76fe63d2971cd6"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f721d1885ecae9078c3f6bbe8a88bc0786b6e749bf32ccec1ef2b18929a05046"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:3d41b965b3380f10e4611dbae366f6dc3cefc7c9ac4e8842a806b9672ae9add5"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80f49023dd13ba35f7c34072fa17f604d2f19bf0989f292cedf7ab5770b87a0b"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2dcb0b3b63afb6df7fd94ec6fbddac81b5492513f7b0436210d390c14d46ee8"}, - {file = "cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl", hash = "sha256:b7f8dd0d4c1f21759695c05a5ec8536c12f31611541f8904083f3dc582604280"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:30788e070800fec9bbcf9faa71ea6d8068f5136f60029759fd8c3efec3c9dcb3"}, - {file = "cryptography-37.0.4-cp36-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:190f82f3e87033821828f60787cfa42bff98404483577b591429ed99bed39d59"}, - {file = "cryptography-37.0.4-cp36-abi3-win32.whl", hash = "sha256:b62439d7cd1222f3da897e9a9fe53bbf5c104fff4d60893ad1355d4c14a24157"}, - {file = "cryptography-37.0.4-cp36-abi3-win_amd64.whl", hash = "sha256:f7a6de3e98771e183645181b3627e2563dcde3ce94a9e42a3f427d2255190327"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bc95ed67b6741b2607298f9ea4932ff157e570ef456ef7ff0ef4884a134cc4b"}, - {file = "cryptography-37.0.4-pp37-pypy37_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:f8c0a6e9e1dd3eb0414ba320f85da6b0dcbd543126e30fcc546e7372a7fbf3b9"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:e007f052ed10cc316df59bc90fbb7ff7950d7e2919c9757fd42a2b8ecf8a5f67"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bc997818309f56c0038a33b8da5c0bfbb3f1f067f315f9abd6fc07ad359398d"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:d204833f3c8a33bbe11eda63a54b1aad7aa7456ed769a982f21ec599ba5fa282"}, - {file = "cryptography-37.0.4-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:75976c217f10d48a8b5a8de3d70c454c249e4b91851f6838a4e48b8f41eb71aa"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:7099a8d55cd49b737ffc99c17de504f2257e3787e02abe6d1a6d136574873441"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be53f9f5505673eeda5f2736bea736c40f051a739bfae2f92d18aed1eb54596"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-manylinux_2_24_x86_64.whl", hash = "sha256:91ce48d35f4e3d3f1d83e29ef4a9267246e6a3be51864a5b7d2247d5086fa99a"}, - {file = "cryptography-37.0.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:4c590ec31550a724ef893c50f9a97a0c14e9c851c85621c5650d699a7b88f7ab"}, - {file = "cryptography-37.0.4.tar.gz", hash = "sha256:63f9c17c0e2474ccbebc9302ce2f07b55b3b3fcb211ded18a42d5764f5c10a82"}, -] -distlib = [ - {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, - {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, -] -docutils = [ - {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, - {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, -] -filelock = [ - {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, - {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, -] -html5lib = [ - {file = "html5lib-1.1-py2.py3-none-any.whl", hash = "sha256:0d78f8fde1c230e99fe37986a60526d7049ed4bf8a9fadbad5f00e22e58e041d"}, - {file = "html5lib-1.1.tar.gz", hash = "sha256:b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f"}, -] -idna = [ - {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, - {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, -] -imagesize = [ - {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, - {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, -] -importlib-metadata = [ - {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, - {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, -] -iniconfig = [ - {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, - {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, -] -jeepney = [ - {file = "jeepney-0.8.0-py3-none-any.whl", hash = "sha256:c0a454ad016ca575060802ee4d590dd912e35c122fa04e70306de3d076cce755"}, - {file = "jeepney-0.8.0.tar.gz", hash = "sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806"}, -] -jinja2 = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, -] -keyring = [ - {file = "keyring-22.3.0-py3-none-any.whl", hash = "sha256:2bc8363ebdd63886126a012057a85c8cb6e143877afa02619ac7dbc9f38a207b"}, - {file = "keyring-22.3.0.tar.gz", hash = "sha256:16927a444b2c73f983520a48dec79ddab49fe76429ea05b8d528d778c8339522"}, -] -lockfile = [ - {file = "lockfile-0.12.2-py2.py3-none-any.whl", hash = "sha256:6c3cb24f344923d30b2785d5ad75182c8ea7ac1b6171b08657258ec7429d50fa"}, - {file = "lockfile-0.12.2.tar.gz", hash = "sha256:6aed02de03cba24efabcd600b30540140634fc06cfa603822d508d5361e9f799"}, -] -mako = [ - {file = "Mako-1.1.0.tar.gz", hash = "sha256:a36919599a9b7dc5d86a7a8988f23a9a3a3d083070023bab23d64f7f1d1e0a4b"}, -] -markupsafe = [ - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, - {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, -] -msgpack = [ - {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4ab251d229d10498e9a2f3b1e68ef64cb393394ec477e3370c457f9430ce9250"}, - {file = "msgpack-1.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:112b0f93202d7c0fef0b7810d465fde23c746a2d482e1e2de2aafd2ce1492c88"}, - {file = "msgpack-1.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:002b5c72b6cd9b4bafd790f364b8480e859b4712e91f43014fe01e4f957b8467"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35bc0faa494b0f1d851fd29129b2575b2e26d41d177caacd4206d81502d4c6a6"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4733359808c56d5d7756628736061c432ded018e7a1dff2d35a02439043321aa"}, - {file = "msgpack-1.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb514ad14edf07a1dbe63761fd30f89ae79b42625731e1ccf5e1f1092950eaa6"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c23080fdeec4716aede32b4e0ef7e213c7b1093eede9ee010949f2a418ced6ba"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:49565b0e3d7896d9ea71d9095df15b7f75a035c49be733051c34762ca95bbf7e"}, - {file = "msgpack-1.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca0f1644d6b5a73eb3e74d4d64d5d8c6c3d577e753a04c9e9c87d07692c58db"}, - {file = "msgpack-1.0.4-cp310-cp310-win32.whl", hash = "sha256:0dfe3947db5fb9ce52aaea6ca28112a170db9eae75adf9339a1aec434dc954ef"}, - {file = "msgpack-1.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dea20515f660aa6b7e964433b1808d098dcfcabbebeaaad240d11f909298075"}, - {file = "msgpack-1.0.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:e83f80a7fec1a62cf4e6c9a660e39c7f878f603737a0cdac8c13131d11d97f52"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3c11a48cf5e59026ad7cb0dc29e29a01b5a66a3e333dc11c04f7e991fc5510a9"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1276e8f34e139aeff1c77a3cefb295598b504ac5314d32c8c3d54d24fadb94c9"}, - {file = "msgpack-1.0.4-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c9566f2c39ccced0a38d37c26cc3570983b97833c365a6044edef3574a00c08"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fcb8a47f43acc113e24e910399376f7277cf8508b27e5b88499f053de6b115a8"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:76ee788122de3a68a02ed6f3a16bbcd97bc7c2e39bd4d94be2f1821e7c4a64e6"}, - {file = "msgpack-1.0.4-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0a68d3ac0104e2d3510de90a1091720157c319ceeb90d74f7b5295a6bee51bae"}, - {file = "msgpack-1.0.4-cp36-cp36m-win32.whl", hash = "sha256:85f279d88d8e833ec015650fd15ae5eddce0791e1e8a59165318f371158efec6"}, - {file = "msgpack-1.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c1683841cd4fa45ac427c18854c3ec3cd9b681694caf5bff04edb9387602d661"}, - {file = "msgpack-1.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a75dfb03f8b06f4ab093dafe3ddcc2d633259e6c3f74bb1b01996f5d8aa5868c"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9667bdfdf523c40d2511f0e98a6c9d3603be6b371ae9a238b7ef2dc4e7a427b0"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11184bc7e56fd74c00ead4f9cc9a3091d62ecb96e97653add7a879a14b003227"}, - {file = "msgpack-1.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac5bd7901487c4a1dd51a8c58f2632b15d838d07ceedaa5e4c080f7190925bff"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1e91d641d2bfe91ba4c52039adc5bccf27c335356055825c7f88742c8bb900dd"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:2a2df1b55a78eb5f5b7d2a4bb221cd8363913830145fad05374a80bf0877cb1e"}, - {file = "msgpack-1.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:545e3cf0cf74f3e48b470f68ed19551ae6f9722814ea969305794645da091236"}, - {file = "msgpack-1.0.4-cp37-cp37m-win32.whl", hash = "sha256:2cc5ca2712ac0003bcb625c96368fd08a0f86bbc1a5578802512d87bc592fe44"}, - {file = "msgpack-1.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:eba96145051ccec0ec86611fe9cf693ce55f2a3ce89c06ed307de0e085730ec1"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:7760f85956c415578c17edb39eed99f9181a48375b0d4a94076d84148cf67b2d"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:449e57cc1ff18d3b444eb554e44613cffcccb32805d16726a5494038c3b93dab"}, - {file = "msgpack-1.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d603de2b8d2ea3f3bcb2efe286849aa7a81531abc52d8454da12f46235092bcb"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48f5d88c99f64c456413d74a975bd605a9b0526293218a3b77220a2c15458ba9"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6916c78f33602ecf0509cc40379271ba0f9ab572b066bd4bdafd7434dee4bc6e"}, - {file = "msgpack-1.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:81fc7ba725464651190b196f3cd848e8553d4d510114a954681fd0b9c479d7e1"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:d5b5b962221fa2c5d3a7f8133f9abffc114fe218eb4365e40f17732ade576c8e"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:77ccd2af37f3db0ea59fb280fa2165bf1b096510ba9fe0cc2bf8fa92a22fdb43"}, - {file = "msgpack-1.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b17be2478b622939e39b816e0aa8242611cc8d3583d1cd8ec31b249f04623243"}, - {file = "msgpack-1.0.4-cp38-cp38-win32.whl", hash = "sha256:2bb8cdf50dd623392fa75525cce44a65a12a00c98e1e37bf0fb08ddce2ff60d2"}, - {file = "msgpack-1.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:26b8feaca40a90cbe031b03d82b2898bf560027160d3eae1423f4a67654ec5d6"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:462497af5fd4e0edbb1559c352ad84f6c577ffbbb708566a0abaaa84acd9f3ae"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2999623886c5c02deefe156e8f869c3b0aaeba14bfc50aa2486a0415178fce55"}, - {file = "msgpack-1.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f0029245c51fd9473dc1aede1160b0a29f4a912e6b1dd353fa6d317085b219da"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed6f7b854a823ea44cf94919ba3f727e230da29feb4a99711433f25800cf747f"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0df96d6eaf45ceca04b3f3b4b111b86b33785683d682c655063ef8057d61fd92"}, - {file = "msgpack-1.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6a4192b1ab40f8dca3f2877b70e63799d95c62c068c84dc028b40a6cb03ccd0f"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0e3590f9fb9f7fbc36df366267870e77269c03172d086fa76bb4eba8b2b46624"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1576bd97527a93c44fa856770197dec00d223b0b9f36ef03f65bac60197cedf8"}, - {file = "msgpack-1.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:63e29d6e8c9ca22b21846234913c3466b7e4ee6e422f205a2988083de3b08cae"}, - {file = "msgpack-1.0.4-cp39-cp39-win32.whl", hash = "sha256:fb62ea4b62bfcb0b380d5680f9a4b3f9a2d166d9394e9bbd9666c0ee09a3645c"}, - {file = "msgpack-1.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:4d5834a2a48965a349da1c5a79760d94a1a0172fbb5ab6b5b33cbf8447e109ce"}, - {file = "msgpack-1.0.4.tar.gz", hash = "sha256:f5d869c18f030202eb412f08b28d2afeea553d6613aee89e200d7aca7ef01f5f"}, -] -origen-autoapi = [ - {file = "origen_autoapi-2.0.1-py3-none-any.whl", hash = "sha256:2807aaa7c861e54679a572bdf36d5c77ea4f26f61464b5dba293f44dd4db8dca"}, - {file = "origen_autoapi-2.0.1.tar.gz", hash = "sha256:df282703e9a430a4242299684d69d0631ea8c6e323c920e57580dc04d78c0c3d"}, -] -origen-metal = [] -packaging = [ - {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, - {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, -] -pastel = [ - {file = "pastel-0.2.1-py2.py3-none-any.whl", hash = "sha256:4349225fcdf6c2bb34d483e523475de5bb04a5c10ef711263452cb37d7dd4364"}, - {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, -] -pexpect = [ - {file = "pexpect-4.8.0-py2.py3-none-any.whl", hash = "sha256:0b48a55dcb3c05f3329815901ea4fc1537514d6ba867a152b581d69ae3710937"}, - {file = "pexpect-4.8.0.tar.gz", hash = "sha256:fc65a43959d153d0114afe13997d439c22823a27cefceb5ff35c2178c6784c0c"}, -] -pkginfo = [ - {file = "pkginfo-1.8.3-py2.py3-none-any.whl", hash = "sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594"}, - {file = "pkginfo-1.8.3.tar.gz", hash = "sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c"}, -] -platformdirs = [ - {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, - {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, -] -pluggy = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] -poetry = [ - {file = "poetry-1.1.14-py2.py3-none-any.whl", hash = "sha256:fbd0b2536b730cd1d7a1fabb3a292a2cc423c5da3d59c4db44335a449f5acd9a"}, - {file = "poetry-1.1.14.tar.gz", hash = "sha256:8b5a7676cda9b9e85c71743c672352cabcb6e2f647b6b88fa95e4f374bc8edce"}, -] -poetry-core = [ - {file = "poetry-core-1.0.8.tar.gz", hash = "sha256:951fc7c1f8d710a94cb49019ee3742125039fc659675912ea614ac2aa405b118"}, - {file = "poetry_core-1.0.8-py2.py3-none-any.whl", hash = "sha256:54b0fab6f7b313886e547a52f8bf52b8cf43e65b2633c65117f8755289061924"}, -] -ptyprocess = [ - {file = "ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35"}, - {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, -] -py = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] -pycparser = [ - {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, - {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, -] -pygments = [ - {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, - {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, -] -pylev = [ - {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, - {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, -] -pyparsing = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, -] -pyreadline3 = [ - {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, - {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, -] -pytest = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, -] -pytz = [ - {file = "pytz-2022.1-py2.py3-none-any.whl", hash = "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"}, - {file = "pytz-2022.1.tar.gz", hash = "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7"}, -] -pywin32-ctypes = [ - {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, - {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, -] -recommonmark = [ - {file = "recommonmark-0.7.1-py2.py3-none-any.whl", hash = "sha256:1b1db69af0231efce3fa21b94ff627ea33dee7079a01dd0a7f8482c3da148b3f"}, - {file = "recommonmark-0.7.1.tar.gz", hash = "sha256:bdb4db649f2222dcd8d2d844f0006b958d627f732415d399791ee436a3686d67"}, -] -requests = [ - {file = "requests-2.28.1-py3-none-any.whl", hash = "sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"}, - {file = "requests-2.28.1.tar.gz", hash = "sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983"}, -] -requests-toolbelt = [ - {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, - {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, -] -secretstorage = [ - {file = "SecretStorage-3.3.2-py3-none-any.whl", hash = "sha256:755dc845b6ad76dcbcbc07ea3da75ae54bb1ea529eb72d15f83d26499a5df319"}, - {file = "SecretStorage-3.3.2.tar.gz", hash = "sha256:0a8eb9645b320881c222e827c26f4cfcf55363e8b374a021981ef886657a912f"}, -] -shellingham = [ - {file = "shellingham-1.4.0-py2.py3-none-any.whl", hash = "sha256:536b67a0697f2e4af32ab176c00a50ac2899c5a05e0d8e2dadac8e58888283f9"}, - {file = "shellingham-1.4.0.tar.gz", hash = "sha256:4855c2458d6904829bd34c299f11fdeed7cfefbf8a2c522e4caea6cd76b3171e"}, -] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -snowballstemmer = [ - {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, - {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, -] -soupsieve = [ - {file = "soupsieve-2.3.2.post1-py3-none-any.whl", hash = "sha256:3b2503d3c7084a42b1ebd08116e5f81aadfaea95863628c80a3b774a11b7c759"}, - {file = "soupsieve-2.3.2.post1.tar.gz", hash = "sha256:fc53893b3da2c33de295667a0e19f078c14bf86544af307354de5fcf12a3f30d"}, -] -sphinx = [ - {file = "Sphinx-3.0.2-py3-none-any.whl", hash = "sha256:3145d87d0962366d4c5264c39094eae3f5788d01d4b1a12294051bfe4271d91b"}, - {file = "Sphinx-3.0.2.tar.gz", hash = "sha256:d7c6e72c6aa229caf96af82f60a0d286a1521d42496c226fe37f5a75dcfe2941"}, -] -sphinxbootstrap4theme = [ - {file = "sphinxbootstrap4theme-0.6.0.tar.gz", hash = "sha256:d3b2e413785afc74aa178872aa553d7b4156206037fdb39b7ff1490c7926d138"}, -] -sphinxcontrib-applehelp = [ - {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, - {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, -] -sphinxcontrib-devhelp = [ - {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, - {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, -] -sphinxcontrib-htmlhelp = [ - {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, - {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, -] -sphinxcontrib-jsmath = [ - {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, - {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, -] -sphinxcontrib-qthelp = [ - {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, - {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, -] -sphinxcontrib-serializinghtml = [ - {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, - {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, -] -termcolor = [ - {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, -] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -tomlkit = [ - {file = "tomlkit-0.11.1-py3-none-any.whl", hash = "sha256:1c5bebdf19d5051e2e1de6cf70adfc5948d47221f097fcff7a3ffc91e953eaf5"}, - {file = "tomlkit-0.11.1.tar.gz", hash = "sha256:61901f81ff4017951119cd0d1ed9b7af31c821d6845c8c477587bbdcd5e5854e"}, -] -urllib3 = [ - {file = "urllib3-1.26.10-py2.py3-none-any.whl", hash = "sha256:8298d6d56d39be0e3bc13c1c97d133f9b45d797169a0e11cdd0e0489d786f7ec"}, - {file = "urllib3-1.26.10.tar.gz", hash = "sha256:879ba4d1e89654d9769ce13121e0f94310ea32e8d2f8cf587b77c08bbcdb30d6"}, -] -virtualenv = [ - {file = "virtualenv-20.15.1-py2.py3-none-any.whl", hash = "sha256:b30aefac647e86af6d82bfc944c556f8f1a9c90427b2fb4e3bfbf338cb82becf"}, - {file = "virtualenv-20.15.1.tar.gz", hash = "sha256:288171134a2ff3bfb1a2f54f119e77cd1b81c29fc1265a2356f3e8d14c7d58c4"}, -] -webencodings = [ - {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, - {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, -] -yapf = [ - {file = "yapf-0.30.0-py2.py3-none-any.whl", hash = "sha256:3abf61ba67cf603069710d30acbc88cfe565d907e16ad81429ae90ce9651e0c9"}, - {file = "yapf-0.30.0.tar.gz", hash = "sha256:3000abee4c28daebad55da6c85f3cd07b8062ce48e2e9943c8da1b9667d48427"}, -] -zipp = [ - {file = "zipp-3.8.1-py3-none-any.whl", hash = "sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009"}, - {file = "zipp-3.8.1.tar.gz", hash = "sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2"}, -] +lock-version = "2.0" +python-versions = ">=3.7" +content-hash = "9a11375abf60489c9f422629fad1da5484c67b97c61e44435234ff58c0e8cda5" diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index 40e392b0..9a35f584 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -21,7 +21,7 @@ generate-setup-file = false origen = 'origen.__bin__:run_origen' [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" origen_metal = "= 0.4.0" termcolor = ">= 1.1.0" colorama = "^0.4" diff --git a/python/origen_metal/poetry.lock b/python/origen_metal/poetry.lock index dd4a5796..2ca9d2df 100644 --- a/python/origen_metal/poetry.lock +++ b/python/origen_metal/poetry.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Poetry and should not be changed by hand. + [[package]] name = "astunparse" version = "1.6.3" @@ -5,64 +7,92 @@ description = "An AST unparser for Python" category = "dev" optional = false python-versions = "*" +files = [ + {file = "astunparse-1.6.3-py2.py3-none-any.whl", hash = "sha256:c2652417f2c8b5bb325c885ae329bdf3f86424075c4fd1a128674bc6fba4b8e8"}, + {file = "astunparse-1.6.3.tar.gz", hash = "sha256:5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872"}, +] [package.dependencies] six = ">=1.6.1,<2.0" +wheel = ">=0.23.0,<1.0" [[package]] name = "atomicwrites" -version = "1.4.0" +version = "1.4.1" description = "Atomic file writes." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, +] [[package]] name = "attrs" -version = "21.4.0" +version = "23.1.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" +files = [ + {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, + {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, +] + +[package.dependencies] +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] +cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] +dev = ["attrs[docs,tests]", "pre-commit"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] +tests = ["attrs[tests-no-zope]", "zope-interface"] +tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] [[package]] name = "colorama" -version = "0.4.4" +version = "0.4.6" description = "Cross-platform colored terminal text." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] [[package]] name = "importlib-metadata" -version = "4.11.4" +version = "6.7.0" description = "Read metadata from Python packages" category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, + {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, +] [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] [[package]] name = "iniconfig" -version = "1.1.1" -description = "iniconfig: brain-dead simple config-ini parsing" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] [[package]] name = "jinja2" @@ -71,6 +101,10 @@ description = "A very fast and expressive template engine." category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] [package.dependencies] MarkupSafe = ">=2.0" @@ -80,22 +114,75 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "markupsafe" -version = "2.1.1" +version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, +] [[package]] name = "packaging" -version = "21.3" +version = "23.1" description = "Core utilities for Python packages" category = "dev" optional = false -python-versions = ">=3.6" - -[package.dependencies] -pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" +python-versions = ">=3.7" +files = [ + {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, + {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, +] [[package]] name = "pdoc" @@ -104,6 +191,9 @@ description = "API Documentation for Python Projects" category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "pdoc-7.4.0-py3-none-any.whl", hash = "sha256:681a2f243e4ca51bedd0645c2d18275b8b83444e9b6e42b502882ec45369e679"}, +] [package.dependencies] astunparse = {version = "*", markers = "python_version < \"3.9\""} @@ -116,11 +206,15 @@ dev = ["flake8", "hypothesis", "mypy", "pytest", "pytest-cov", "pytest-timeout", [[package]] name = "pluggy" -version = "1.0.0" +version = "1.2.0" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, + {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, +] [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} @@ -136,25 +230,25 @@ description = "library with cross-python path, ini-parsing, io, code, log facili category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +files = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] [[package]] name = "pygments" -version = "2.12.0" +version = "2.15.1" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false -python-versions = ">=3.6" - -[[package]] -name = "pyparsing" -version = "3.0.9" -description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "dev" -optional = false -python-versions = ">=3.6.8" +python-versions = ">=3.7" +files = [ + {file = "Pygments-2.15.1-py3-none-any.whl", hash = "sha256:db2db3deb4b4179f399a09054b023b6a586b76499d36965813c71aa8ed7b5fd1"}, + {file = "Pygments-2.15.1.tar.gz", hash = "sha256:8ace4d3c1dd481894b2005f560ead0f9f19ee64fe983366be1a21e171d12775c"}, +] [package.extras] -diagrams = ["railroad-diagrams", "jinja2"] +plugins = ["importlib-metadata"] [[package]] name = "pyreadline3" @@ -163,6 +257,10 @@ description = "A python implementation of GNU readline." category = "main" optional = false python-versions = "*" +files = [ + {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, + {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, +] [[package]] name = "pytest" @@ -171,6 +269,10 @@ description = "pytest: simple powerful testing with Python" category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, +] [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} @@ -193,14 +295,25 @@ description = "Python 2 and 3 compatibility utilities" category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] [[package]] name = "termcolor" -version = "1.1.0" -description = "ANSII Color formatting for output in terminal." +version = "2.3.0" +description = "ANSI color formatting for output in terminal" category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7" +files = [ + {file = "termcolor-2.3.0-py3-none-any.whl", hash = "sha256:3afb05607b89aed0ffe25202399ee0867ad4d3cb4180d98aaf8eefa6a5f7d475"}, + {file = "termcolor-2.3.0.tar.gz", hash = "sha256:b5b08f68937f138fe92f6c089b99f1e2da0ae56c52b78bf7075fd95420fd9a5a"}, +] + +[package.extras] +tests = ["pytest", "pytest-cov"] [[package]] name = "toml" @@ -209,149 +322,55 @@ description = "Python Library for Tom's Obvious, Minimal Language" category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] [[package]] name = "typing-extensions" -version = "4.2.0" +version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, + {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, +] + +[[package]] +name = "wheel" +version = "0.41.0" +description = "A built-package format for Python" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "wheel-0.41.0-py3-none-any.whl", hash = "sha256:7e9be3bbd0078f6147d82ed9ed957e323e7708f57e134743d2edef3a7b7972a9"}, + {file = "wheel-0.41.0.tar.gz", hash = "sha256:55a0f0a5a84869bce5ba775abfd9c462e3a6b1b7b7ec69d72c0b83d673a5114d"}, +] + +[package.extras] +test = ["pytest (>=6.0.0)", "setuptools (>=65)"] [[package]] name = "zipp" -version = "3.8.0" +version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "dev" optional = false python-versions = ">=3.7" +files = [ + {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, + {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, +] [package.extras] -docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [metadata] -lock-version = "1.1" -python-versions = ">=3.7,<3.11" -content-hash = "1360e7bccec2348e9d5b23ac7bd54505acc8555ad15cd81aeba3d1048d7fd5af" - -[metadata.files] -astunparse = [ - {file = "astunparse-1.6.3-py2.py3-none-any.whl", hash = "sha256:c2652417f2c8b5bb325c885ae329bdf3f86424075c4fd1a128674bc6fba4b8e8"}, - {file = "astunparse-1.6.3.tar.gz", hash = "sha256:5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872"}, -] -atomicwrites = [ - {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, - {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, -] -attrs = [ - {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, - {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, -] -colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, -] -importlib-metadata = [ - {file = "importlib_metadata-4.11.4-py3-none-any.whl", hash = "sha256:c58c8eb8a762858f49e18436ff552e83914778e50e9d2f1660535ffb364552ec"}, - {file = "importlib_metadata-4.11.4.tar.gz", hash = "sha256:5d26852efe48c0a32b0509ffbc583fda1a2266545a78d104a6f4aff3db17d700"}, -] -iniconfig = [ - {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, - {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, -] -jinja2 = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, -] -markupsafe = [ - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, - {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, - {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, - {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, - {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, - {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, -] -packaging = [ - {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, - {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, -] -pdoc = [ - {file = "pdoc-7.4.0-py3-none-any.whl", hash = "sha256:681a2f243e4ca51bedd0645c2d18275b8b83444e9b6e42b502882ec45369e679"}, -] -pluggy = [ - {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, - {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, -] -py = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] -pygments = [ - {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, - {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, -] -pyparsing = [ - {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, - {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, -] -pyreadline3 = [ - {file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"}, - {file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"}, -] -pytest = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, -] -six = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] -termcolor = [ - {file = "termcolor-1.1.0.tar.gz", hash = "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"}, -] -toml = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] -typing-extensions = [ - {file = "typing_extensions-4.2.0-py3-none-any.whl", hash = "sha256:6657594ee297170d19f67d55c05852a874e7eb634f4f753dbd667855e07c1708"}, - {file = "typing_extensions-4.2.0.tar.gz", hash = "sha256:f1c24655a0da0d1b67f07e17a5e6b2a105894e6824b92096378bb3668ef02376"}, -] -zipp = [ - {file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"}, - {file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"}, -] +lock-version = "2.0" +python-versions = ">=3.7.0,<=3.12" +content-hash = "68694abde59ff574b5a699ef94857ad3003f0a8afd56f577eb4cb272ac87bbd0" diff --git a/python/origen_metal/pyproject.toml b/python/origen_metal/pyproject.toml index 38d13a2a..60eb7bfe 100644 --- a/python/origen_metal/pyproject.toml +++ b/python/origen_metal/pyproject.toml @@ -5,7 +5,7 @@ description = "Bare metal APIs for the Origen SDK" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" pyreadline3 = { version="^3.3", platform="win32" } termcolor = ">= 1.1.0" colorama = ">= 0.4.4" # Note: colorama is usually installed on the system already, but it isn't actually required (e.g. WSL won't have this by default) diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index 54e49752..92896993 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -152,9 +152,9 @@ version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -371,11 +371,11 @@ dependencies = [ "atty", "onig", "prettyprint", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", "serde", "structopt", - "syn 1.0.74", + "syn 1.0.109", "syn-select", "syntect", "tempfile", @@ -704,7 +704,7 @@ dependencies = [ "crossbeam-utils 0.7.2", "lazy_static", "maybe-uninit", - "memoffset", + "memoffset 0.5.6", "scopeguard", ] @@ -800,9 +800,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -1017,9 +1017,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f16ef37b2a9b242295d61a154ee91ae884afff6b8b933b486b12481cc58310ca" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -1030,10 +1030,10 @@ checksum = "ed327f716d0d351d86c9fd3398d20ee39ad8f681873cc081da2ca1c10fed398a" dependencies = [ "enum-utils-from-str", "failure", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", "serde_derive_internals", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -1042,7 +1042,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49be08bad6e4ca87b2b8e74146987d4e5cb3b7512efa50ef505b51a22227ee1" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", ] @@ -1062,9 +1062,9 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -1104,9 +1104,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", "synstructure", ] @@ -1295,9 +1295,9 @@ checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" dependencies = [ "autocfg 1.0.1", "proc-macro-hack", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2070,6 +2070,15 @@ dependencies = [ "autocfg 1.0.1", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg 1.0.1", +] + [[package]] name = "mime" version = "0.3.16" @@ -2535,7 +2544,7 @@ name = "origen-core-support" version = "0.1.0-dev.1" dependencies = [ "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2715,9 +2724,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2761,9 +2770,9 @@ dependencies = [ "phf_generator", "phf_shared", "proc-macro-hack", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2790,9 +2799,9 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -2904,9 +2913,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", "version_check", ] @@ -2916,7 +2925,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", "version_check", ] @@ -2944,11 +2953,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.28" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ - "unicode-xid 0.2.2", + "unicode-ident", ] [[package]] @@ -2963,13 +2972,14 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6302e85060011447471887705bb7838f14aba43fcb06957d823739a496b3dc" +checksum = "ffb88ae05f306b4bfcde40ac4a51dc0b05936a9207a4b75b798c7729c4258a59" dependencies = [ "cfg-if 1.0.0", "indoc", "libc", + "memoffset 0.9.0", "parking_lot 0.11.1", "pyo3-build-config", "pyo3-ffi", @@ -2979,9 +2989,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b65b546c35d8a3b1b2f0ddbac7c6a569d759f357f2b9df884f5d6b719152c8" +checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" dependencies = [ "once_cell", "target-lexicon", @@ -2989,9 +2999,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c275a07127c1aca33031a563e384ffdd485aee34ef131116fcd58e3430d1742b" +checksum = "922ede8759e8600ad4da3195ae41259654b9c55da4f7eec84a0ccc7d067a70a4" dependencies = [ "libc", "pyo3-build-config", @@ -2999,25 +3009,25 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284fc4485bfbcc9850a6d661d627783f18d19c2ab55880b021671c4ba83e90f7" +checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "pyo3-macros-backend", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] name = "pyo3-macros-backend" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bda0f58f73f5c5429693c96ed57f7abdb38fdfc28ae06da4101a257adb7faf" +checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3041,7 +3051,7 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", ] [[package]] @@ -3609,9 +3619,9 @@ version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3620,9 +3630,9 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3651,9 +3661,9 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3788,9 +3798,9 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3855,9 +3865,9 @@ checksum = "7813934aecf5f51a54775e00068c237de98489463968231a51746bbbc03f9c10" dependencies = [ "heck", "proc-macro-error", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3876,9 +3886,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ "heck", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3900,13 +3910,13 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.74" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1873d832550d4588c3dbc20f01361ab00bfe741048f71e3fecf145a7cc18b29c" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "unicode-xid 0.2.2", + "unicode-ident", ] [[package]] @@ -3915,7 +3925,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3918c65ff56396f0fb70664637e183410d273d93721bca514221ae3566dca0e" dependencies = [ - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -3924,9 +3934,9 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", "unicode-xid 0.2.2", ] @@ -4069,9 +4079,9 @@ version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -4196,9 +4206,9 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -4448,6 +4458,12 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +[[package]] +name = "unicode-ident" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" + [[package]] name = "unicode-normalization" version = "0.1.19" @@ -4643,9 +4659,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -4677,9 +4693,9 @@ version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2657dd393f03aa2a659c25c6ae18a13a4048cebd220e147933ea837efc589f" dependencies = [ - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4856,9 +4872,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a482c56029e48681b89b92b5db3c446db0915e8dd1052c0328a574eda38d5f93" dependencies = [ "proc-macro-crate 0.1.5", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] [[package]] @@ -4888,7 +4904,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4ca5e22593eb4212382d60d26350065bf2a02c34b85bc850474a74b589a3de9" dependencies = [ "proc-macro-crate 1.1.3", - "proc-macro2 1.0.28", + "proc-macro2 1.0.66", "quote 1.0.9", - "syn 1.0.74", + "syn 1.0.109", ] diff --git a/rust/origen/cli/src/_generated/mod.rs b/rust/origen/cli/src/_generated/mod.rs new file mode 100644 index 00000000..91c47b7b --- /dev/null +++ b/rust/origen/cli/src/_generated/mod.rs @@ -0,0 +1 @@ +pub (crate) mod python; \ No newline at end of file diff --git a/rust/origen/cli/src/_generated/python.rs b/rust/origen/cli/src/_generated/python.rs new file mode 100644 index 00000000..d1edf698 --- /dev/null +++ b/rust/origen/cli/src/_generated/python.rs @@ -0,0 +1,12 @@ +// THIS IS AN AUTO GENERATED FILE FROM CMD update_supported_python +pub const MIN_PYTHON_VERSION: &str = "3.7.0"; +pub const PYTHONS: &[&str] = &[ + "python", + "python3", + "python3.7", + "python3.8", + "python3.9", + "python3.10", + "python3.11", + "python3.12", +]; diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index fa97994a..ae4ff1f5 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -8,6 +8,7 @@ extern crate origen_metal; mod framework; mod commands; mod python; +mod _generated; use clap::Command; use indexmap::map::IndexMap; diff --git a/rust/origen/cli/src/commands/develop_origen/mod.rs b/rust/origen/cli/src/commands/develop_origen/mod.rs index 74bf2862..8804853a 100644 --- a/rust/origen/cli/src/commands/develop_origen/mod.rs +++ b/rust/origen/cli/src/commands/develop_origen/mod.rs @@ -1,5 +1,6 @@ mod build; mod fmt; +mod update_supported_python; use origen::Result; use super::_prelude::*; @@ -12,7 +13,8 @@ gen_core_cmd_funcs__no_exts__no_app_opts!( cmd.arg_required_else_help(true).visible_alias("origen") }}, build::build_cmd(), - fmt::fmt_cmd() + fmt::fmt_cmd(), + update_supported_python::update_supported_python_cmd() ); pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { @@ -20,6 +22,7 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { match n { build::BASE_CMD => build::run(subcmd), fmt::BASE_CMD => fmt::run(), + update_supported_python::BASE_CMD => update_supported_python::run(subcmd), _ => unreachable_invalid_subc!(n) } } \ No newline at end of file diff --git a/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs b/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs new file mode 100644 index 00000000..36c6469e --- /dev/null +++ b/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs @@ -0,0 +1,84 @@ +use std::path::Path; +use std::fs::File; +use std::io::Write; +use crate::STATUS; +use crate::commands::_prelude::*; +pub const BASE_CMD: &'static str = "update_supported_python"; + +pub (crate) fn update_supported_python_cmd<'a>() -> SubCmd<'a> { + core_subcmd__no_exts__no_app_opts!( + BASE_CMD, + "Update supported python versions in all pyproject files", + { |cmd| { + cmd.arg(Arg::new("min_version") + .takes_value(true) + .required(true) + ) + .arg(Arg::new("max_version") + .takes_value(true) + .required(true) + ) + } } + ) +} + +pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { + let min = invocation.get_one::("min_version").unwrap(); + let max = invocation.get_one::("max_version").unwrap(); + let version_str = format!("python = \">={min},<={max}\""); + let mv_min = min.split('.').collect::>()[1].parse::()?; + let mv_max = max.split('.').collect::>()[1].parse::()?; + + // Update pyprojects + // origen/metal pyproject + let p = &STATUS.origen_wksp_root.join("python"); + update_pyproject(&p.join("origen_metal"), &version_str)?; + update_pyproject(&p.join("origen"),&version_str)?; + + // Various app pyprojects, outside of no-workspace + let p = &STATUS.origen_wksp_root.join("test_apps"); + update_pyproject(&p.join("pl_ext_cmds"),&version_str)?; + update_pyproject(&p.join("python_app"),&version_str)?; + update_pyproject(&p.join("python_no_app"),&version_str)?; + update_pyproject(&p.join("python_plugin"),&version_str)?; + update_pyproject(&p.join("python_plugin_no_cmds"),&version_str)?; + update_pyproject(&p.join("python_plugin_the_second"),&version_str)?; + update_pyproject(&p.join("test_apps_shared_test_helpers"),&version_str)?; + + // No-workspace pyprojects + let p = &STATUS.origen_wksp_root.join("test_apps/no_workspace"); + update_pyproject(&p.join("user_install"),&version_str)?; + update_pyproject(&p.join("templates"),&version_str)?; + + // Write rust CLI python settings + let p = &STATUS.origen_wksp_root.join("rust/origen/cli/src/_generated/python.rs"); + println!("Creating python rs file {}", p.display()); + let mut f = File::create(p)?; + f.write_fmt(format_args!("// THIS IS AN AUTO GENERATED FILE FROM CMD {}\n", BASE_CMD))?; + f.write_fmt(format_args!("pub const MIN_PYTHON_VERSION: &str = \"{}\";\n", min))?; + f.write(b"pub const PYTHONS: &[&str] = &[\n")?; + f.write(b" \"python\",\n")?; + f.write(b" \"python3\",\n")?; + for v in mv_min..(mv_max+1) { + f.write_fmt(format_args!(" \"python3.{}\",\n", v))?; + } + f.write(b"];\n")?; + + Ok(()) +} + +fn update_pyproject(path: &Path, version_str: &str) -> Result<()> { + let n = path.join("pyproject.toml"); + println!("Updating pyproject: {}", n.display()); + + let content = std::fs::read_to_string(&n)?; + let mut lines: Vec<&str> = content.split("\n").collect(); + let i = lines.iter().position( |l| l.starts_with("python = ")).unwrap(); + lines[i] = version_str; + + // Write out file + let mut f = File::create(n)?; + f.write_all(lines.join("\n").as_bytes())?; + + Ok(()) +} \ No newline at end of file diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index 880c312d..bf2d27e8 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -7,16 +7,8 @@ use semver::Version; use std::env; use std::path::PathBuf; use std::process::{Command, ExitStatus, Stdio}; - -const PYTHONS: &[&str] = &[ - "python", - "python3", - "python3.10", - "python3.9", - "python3.8", - "python3.7", -]; -pub const MIN_PYTHON_VERSION: &str = "3.7.0"; +use crate::_generated::python::PYTHONS; +pub use crate::_generated::python::MIN_PYTHON_VERSION; #[macro_export] macro_rules! strs_to_cli_arr { diff --git a/rust/origen_metal/Cargo.lock b/rust/origen_metal/Cargo.lock index 87b2065f..06c593d8 100644 --- a/rust/origen_metal/Cargo.lock +++ b/rust/origen_metal/Cargo.lock @@ -1184,6 +1184,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.16" @@ -1693,13 +1702,14 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6302e85060011447471887705bb7838f14aba43fcb06957d823739a496b3dc" +checksum = "ffb88ae05f306b4bfcde40ac4a51dc0b05936a9207a4b75b798c7729c4258a59" dependencies = [ "cfg-if 1.0.0", "indoc", "libc", + "memoffset", "parking_lot", "pyo3-build-config", "pyo3-ffi", @@ -1709,9 +1719,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b65b546c35d8a3b1b2f0ddbac7c6a569d759f357f2b9df884f5d6b719152c8" +checksum = "554db24f0b3c180a9c0b1268f91287ab3f17c162e15b54caaae5a6b3773396b0" dependencies = [ "once_cell", "target-lexicon", @@ -1719,9 +1729,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c275a07127c1aca33031a563e384ffdd485aee34ef131116fcd58e3430d1742b" +checksum = "922ede8759e8600ad4da3195ae41259654b9c55da4f7eec84a0ccc7d067a70a4" dependencies = [ "libc", "pyo3-build-config", @@ -1729,9 +1739,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284fc4485bfbcc9850a6d661d627783f18d19c2ab55880b021671c4ba83e90f7" +checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -1741,9 +1751,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.16.5" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bda0f58f73f5c5429693c96ed57f7abdb38fdfc28ae06da4101a257adb7faf" +checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" dependencies = [ "proc-macro2", "quote", diff --git a/test_apps/no_workspace/templates/pyproject.toml b/test_apps/no_workspace/templates/pyproject.toml index e36101b3..28c749a4 100644 --- a/test_apps/no_workspace/templates/pyproject.toml +++ b/test_apps/no_workspace/templates/pyproject.toml @@ -5,7 +5,7 @@ description = "Origen Installation Test" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" {% if local_origen %} origen = { path = "{{ o2_root.joinpath("python/origen").as_posix() }}", develop = true } origen_metal = { path = "{{ o2_root.joinpath("python/origen_metal").as_posix() }}", develop = true } diff --git a/test_apps/no_workspace/user_install/pyproject.toml b/test_apps/no_workspace/user_install/pyproject.toml index 5eb8004b..5a87074b 100644 --- a/test_apps/no_workspace/user_install/pyproject.toml +++ b/test_apps/no_workspace/user_install/pyproject.toml @@ -5,7 +5,7 @@ description = "Origen Installation Test" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" origen = { path = "../../../python/origen", develop = true } origen_metal = { path = "../../../python/origen_metal", develop = true } diff --git a/test_apps/pl_ext_cmds/pyproject.toml b/test_apps/pl_ext_cmds/pyproject.toml index 889ce813..c157e96a 100644 --- a/test_apps/pl_ext_cmds/pyproject.toml +++ b/test_apps/pl_ext_cmds/pyproject.toml @@ -5,7 +5,7 @@ description = "Plugin Extending Cmds" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" origen = { path = "../../python/origen", develop = true } origen_metal = ">=0.0.0" diff --git a/test_apps/python_app/poetry.lock b/test_apps/python_app/poetry.lock index f22327ee..f9681264 100644 --- a/test_apps/python_app/poetry.lock +++ b/test_apps/python_app/poetry.lock @@ -12,17 +12,6 @@ files = [ {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, ] -[[package]] -name = "atomicwrites" -version = "1.4.1" -description = "Atomic file writes." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] - [[package]] name = "attrs" version = "22.2.0" @@ -516,6 +505,21 @@ https = ["urllib3 (>=1.24.1)"] paramiko = ["paramiko"] pgp = ["gpg"] +[[package]] +name = "exceptiongroup" +version = "1.1.2" +description = "Backport of PEP 654 (exception groups)" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"}, + {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "filelock" version = "3.9.0" @@ -622,7 +626,7 @@ testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-chec name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -888,7 +892,7 @@ version = "2.0.0.dev5" description = "Semiconductor Developer's Kit" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -933,7 +937,7 @@ version = "0.4.0" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -1006,13 +1010,13 @@ version = "0.1.0" description = "Plugin Extending Cmds" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} -origen_metal = {path = "../../python/origen_metal", develop = true} +origen_metal = ">=0.0.0" [package.source] type = "directory" @@ -1041,7 +1045,7 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest- name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1142,18 +1146,6 @@ files = [ {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, ] -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] - [[package]] name = "pycparser" version = "2.21" @@ -1232,29 +1224,27 @@ files = [ [[package]] name = "pytest" -version = "6.2.5" +version = "7.4.0" description = "pytest: simple powerful testing with Python" -category = "dev" +category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, + {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"}, + {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"}, ] [package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" -py = ">=1.8.2" -toml = "*" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "python-plugin" @@ -1262,7 +1252,7 @@ version = "0.1.0" description = "Example Origen Plugin" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -1279,7 +1269,7 @@ version = "0.1.0" description = "Example Origen Plugin Without Any Commands" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -1715,30 +1705,19 @@ version = "0.1.0" description = "Shared Regression Test Helpers for Test Apps" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} pl_ext_cmds = {path = "../pl_ext_cmds", develop = true} +pytest = ">=7.2.1" [package.source] type = "directory" url = "../test_apps_shared_test_helpers" -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] - [[package]] name = "tomli" version = "2.0.1" @@ -1974,5 +1953,5 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" -python-versions = ">=3.7,<3.11" -content-hash = "321b436680a0eeca2b6cd2f6818c80b05cf1120111e8e1545d882690ec9d6056" +python-versions = ">=3.7.0,<=3.12" +content-hash = "be00203c85f7dc3c6161189133d21ba3a91ce2fc13811a4bbdae08e32e94383a" diff --git a/test_apps/python_app/pyproject.toml b/test_apps/python_app/pyproject.toml index a66e0f68..a7b9d3a9 100644 --- a/test_apps/python_app/pyproject.toml +++ b/test_apps/python_app/pyproject.toml @@ -5,14 +5,14 @@ description = "" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" origen = "= 2.0.0.dev5" python_plugin = { path = "../python_plugin", develop = true } test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true } python_plugin_no_cmds = { path = "../python_plugin_no_cmds", develop = true } [tool.poetry.dev-dependencies] -pytest = "^6.0" +pytest = ">= 6.0" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } @@ -27,4 +27,4 @@ addopts = "--strict-markers" markers = [ "online: marks tests as requiring an internet connection", "ldap: marks tests requiring/using the external ldap", -] +] \ No newline at end of file diff --git a/test_apps/python_no_app/poetry.lock b/test_apps/python_no_app/poetry.lock index 52106d08..2804dd37 100644 --- a/test_apps/python_no_app/poetry.lock +++ b/test_apps/python_no_app/poetry.lock @@ -12,17 +12,6 @@ files = [ {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] -[[package]] -name = "atomicwrites" -version = "1.4.1" -description = "Atomic file writes." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] - [[package]] name = "attrs" version = "22.2.0" @@ -436,6 +425,21 @@ https = ["urllib3 (>=1.24.1)"] paramiko = ["paramiko"] pgp = ["gpg"] +[[package]] +name = "exceptiongroup" +version = "1.1.2" +description = "Backport of PEP 654 (exception groups)" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "exceptiongroup-1.1.2-py3-none-any.whl", hash = "sha256:e346e69d186172ca7cf029c8c1d16235aa0e04035e5750b4b95039e65204328f"}, + {file = "exceptiongroup-1.1.2.tar.gz", hash = "sha256:12c3e887d6485d16943a309616de20ae5582633e0a2eda17f4e10fd61c1e8af5"}, +] + +[package.extras] +test = ["pytest (>=6)"] + [[package]] name = "filelock" version = "3.9.0" @@ -542,7 +546,7 @@ testing = ["flake8 (<5)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-chec name = "iniconfig" version = "1.1.1" description = "iniconfig: brain-dead simple config-ini parsing" -category = "dev" +category = "main" optional = false python-versions = "*" files = [ @@ -808,7 +812,7 @@ version = "2.0.0.dev5" description = "Semiconductor Developer's Kit" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -853,7 +857,7 @@ version = "0.4.0" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -926,13 +930,13 @@ version = "0.1.0" description = "Plugin Extending Cmds" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} -origen_metal = {path = "../../python/origen_metal", develop = true} +origen_metal = ">=0.0.0" [package.source] type = "directory" @@ -961,7 +965,7 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest- name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1062,18 +1066,6 @@ files = [ {file = "ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220"}, ] -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -files = [ - {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, - {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, -] - [[package]] name = "pycparser" version = "2.21" @@ -1147,29 +1139,27 @@ files = [ [[package]] name = "pytest" -version = "6.2.5" +version = "7.4.0" description = "pytest: simple powerful testing with Python" -category = "dev" +category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, + {file = "pytest-7.4.0-py3-none-any.whl", hash = "sha256:78bf16451a2eb8c7a2ea98e32dc119fd2aa758f1d5d66dbf0a59d69a3969df32"}, + {file = "pytest-7.4.0.tar.gz", hash = "sha256:b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a"}, ] [package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" -py = ">=1.8.2" -toml = "*" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "python-plugin" @@ -1177,7 +1167,7 @@ version = "0.1.0" description = "Example Origen Plugin" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -1194,7 +1184,7 @@ version = "0.1.0" description = "Example Origen Plugin Without Any Commands" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -1212,7 +1202,7 @@ version = "0.1.0" description = "Another Example Origen Plugin" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true @@ -1648,30 +1638,19 @@ version = "0.1.0" description = "Shared Regression Test Helpers for Test Apps" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<=3.12" files = [] develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} pl_ext_cmds = {path = "../pl_ext_cmds", develop = true} +pytest = ">=7.2.1" [package.source] type = "directory" url = "../test_apps_shared_test_helpers" -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, - {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, -] - [[package]] name = "tomli" version = "2.0.1" @@ -1907,5 +1886,5 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" -python-versions = ">=3.7,<3.11" -content-hash = "26480da255683b8b3fa427275d60c56838bea009549dbeec10ceac16960d7b9e" +python-versions = ">=3.7.0,<=3.12" +content-hash = "914252389b3db8f1eaa81c1453f6b803fe9a75692661356c129058a52d1aeae3" diff --git a/test_apps/python_no_app/pyproject.toml b/test_apps/python_no_app/pyproject.toml index b4a28a96..d96626ca 100644 --- a/test_apps/python_no_app/pyproject.toml +++ b/test_apps/python_no_app/pyproject.toml @@ -5,7 +5,7 @@ description = "O2 workspace without an application" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } python_plugin = { path = "../python_plugin", develop = true } @@ -14,7 +14,7 @@ python_plugin_no_cmds = { path = "../python_plugin_no_cmds", develop = true } test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true } [tool.poetry.dev-dependencies] -pytest = "^6.0" +pytest = ">=6.0" [tool.pytest.ini_options] -addopts = "--ignore=tests/cmd_building/cmd_testers" +addopts = "--ignore=tests/cmd_building/cmd_testers" \ No newline at end of file diff --git a/test_apps/python_plugin/pyproject.toml b/test_apps/python_plugin/pyproject.toml index 25b5c749..a1ed5c9a 100644 --- a/test_apps/python_plugin/pyproject.toml +++ b/test_apps/python_plugin/pyproject.toml @@ -5,7 +5,7 @@ description = "Example Origen Plugin" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" origen = { path = "../../python/origen", develop = true } [tool.poetry.dev-dependencies] @@ -13,4 +13,4 @@ pytest = "^3" [build-system] requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +build-backend = "poetry.core.masonry.api" \ No newline at end of file diff --git a/test_apps/python_plugin_no_cmds/pyproject.toml b/test_apps/python_plugin_no_cmds/pyproject.toml index 58ced09e..0c72fcf4 100644 --- a/test_apps/python_plugin_no_cmds/pyproject.toml +++ b/test_apps/python_plugin_no_cmds/pyproject.toml @@ -5,7 +5,7 @@ description = "Example Origen Plugin Without Any Commands" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } diff --git a/test_apps/python_plugin_the_second/pyproject.toml b/test_apps/python_plugin_the_second/pyproject.toml index c029c5ff..d46101d9 100644 --- a/test_apps/python_plugin_the_second/pyproject.toml +++ b/test_apps/python_plugin_the_second/pyproject.toml @@ -5,7 +5,7 @@ description = "Another Example Origen Plugin" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } diff --git a/test_apps/test_apps_shared_test_helpers/pyproject.toml b/test_apps/test_apps_shared_test_helpers/pyproject.toml index 8b7a9a00..a26874ea 100644 --- a/test_apps/test_apps_shared_test_helpers/pyproject.toml +++ b/test_apps/test_apps_shared_test_helpers/pyproject.toml @@ -5,7 +5,7 @@ description = "Shared Regression Test Helpers for Test Apps" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7,<3.11" +python = ">=3.7.0,<=3.12" pytest = ">=7.2.1" origen = { path = "../../python/origen", develop = true } pl_ext_cmds = { path = "../pl_ext_cmds", develop = true } From 000eb6688e5b8c826b5254db9bd9aeb6a1b01fda Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 24 Jul 2023 19:58:14 -0500 Subject: [PATCH 101/200] Try bumping pip version for python 3.12 --- rust/origen/cli/src/commands/env.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/origen/cli/src/commands/env.rs b/rust/origen/cli/src/commands/env.rs index 229d5697..df1cd557 100644 --- a/rust/origen/cli/src/commands/env.rs +++ b/rust/origen/cli/src/commands/env.rs @@ -14,7 +14,7 @@ use std::process::Command; pub const BASE_CMD: &'static str = "env"; -static MINIMUM_PIP_VERSION: &str = "22.0.4"; +static MINIMUM_PIP_VERSION: &str = "23.1.2"; static MINIMUM_POETRY_VERSION: &str = "1.3.2"; gen_core_cmd_funcs__no_exts__no_app_opts!( From bde62f004da1d7e697bb967011f979ed1d2f724a Mon Sep 17 00:00:00 2001 From: Corey Date: Tue, 25 Jul 2023 07:22:21 -0500 Subject: [PATCH 102/200] GA: Test for for python 3.12 --- test_apps/python_no_app/tests/cli/tests__cmd__eval.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py index bf1823cb..ec2f789d 100644 --- a/test_apps/python_no_app/tests/cli/tests__cmd__eval.py +++ b/test_apps/python_no_app/tests/cli/tests__cmd__eval.py @@ -1,4 +1,4 @@ -import origen, pytest, pathlib +import origen, pytest, pathlib, sys from .shared import CLICommon class T_Eval(CLICommon): @@ -84,7 +84,11 @@ def test_error_in_script(self, cmd): stderr = out["stderr"].split("\n") assert "Traceback" in stderr[0] assert "line 2" in stderr[1] - assert stderr[2] == "NameError: name 'hello' is not defined" + err = "NameError: name 'hello' is not defined" + if sys.version_info.minor >= 12: + assert stderr[2] == f"{err}. Did you mean: 'help'?" + else: + assert stderr[2] == err assert stdout[3] == '' assert len(stderr) == 4 From 6e979444705a89e5142e8f4ed8f7381b5212a821 Mon Sep 17 00:00:00 2001 From: origen Date: Tue, 1 Aug 2023 20:27:46 -0500 Subject: [PATCH 103/200] Support later rust --- .../origen_metal/tests/utils/test_mailer.py | 19 +- rust/origen/Cargo.lock | 1118 +++++++++++------ rust/origen/Cargo.toml | 5 +- rust/origen/cli/Cargo.toml | 2 +- .../src/core/model/registers/register.rs | 2 +- .../generator/processors/cycle_combiner.rs | 4 +- .../processors/final_model_extract.rs | 2 +- rust/origen/src/utility/github.rs | 53 +- rust/origen/src/utility/sessions.rs | 2 +- rust/origen_metal/Cargo.lock | 928 +++++++++----- rust/origen_metal/Cargo.toml | 9 +- rust/origen_metal/src/error.rs | 6 + rust/origen_metal/src/lib.rs | 1 + rust/origen_metal/src/utils/mailer/mailer.rs | 6 +- .../origen_metal/src/utils/mailer/maillist.rs | 2 + rust/pyapi/Cargo.lock | 970 ++++++++------ rust/pyapi/Cargo.toml | 2 +- rust/pyapi/src/lib.rs | 2 +- rust/pyapi_metal/Cargo.lock | 939 +++++++++----- rust/pyapi_metal/Cargo.toml | 2 +- test_apps/no_workspace/t_invocation_env.py | 4 +- test_apps/no_workspace/test_user_install.py | 4 +- 22 files changed, 2569 insertions(+), 1513 deletions(-) diff --git a/python/origen_metal/tests/utils/test_mailer.py b/python/origen_metal/tests/utils/test_mailer.py index 3f0b6360..7d892873 100644 --- a/python/origen_metal/tests/utils/test_mailer.py +++ b/python/origen_metal/tests/utils/test_mailer.py @@ -414,8 +414,7 @@ def test_appending_domain_when_applicable(self): ] def test_invalid_recipient_resolution(self): - invalid_email_err_msg = "Missing domain or user" - invalid_domain_err_msg = "Invalid email domain" + invalid_email_err_msg = "Missing separator character '@'." r = ["u", "u2"] ml = self.new_ml("ml", recipients=r) assert ml.recipients == r @@ -430,22 +429,6 @@ def test_invalid_recipient_resolution(self): with pytest.raises(RuntimeError, match=invalid_email_err_msg): ml.resolve_recipients() - r = ["u", "u2@origen.org"] - domain= "blah!" - ml = self.new_ml("ml", recipients=r, domain=domain) - assert ml.recipients == r - assert ml.domain == domain - with pytest.raises(RuntimeError, match=invalid_domain_err_msg): - ml.resolve_recipients() - - r = ["u@origen!", "u2@origen.org"] - domain= "blah!" - ml = self.new_ml("ml", recipients=r, domain=domain) - assert ml.recipients == r - assert ml.domain == domain - with pytest.raises(RuntimeError, match=invalid_domain_err_msg): - ml.resolve_recipients() - def test_audience_resolution(self): ml = self.new_ml("t", [], audience="prod") assert ml.audience == "production" diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index 92896993..fed20970 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -148,13 +148,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.51" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] @@ -176,9 +176,9 @@ checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -210,6 +210,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + [[package]] name = "base64-url" version = "1.4.10" @@ -235,16 +241,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "bitvec" -version = "0.19.5" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "blake2b_simd" @@ -314,9 +314,9 @@ dependencies = [ [[package]] name = "built" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f346b6890a0dfa7266974910e7df2d5088120dd54721b9b0e5aae1ae5e05715" +checksum = "5b9c056b9ed43aee5e064b683aa1ec783e19c6acec7559e3ae931b7490472fbe" dependencies = [ "cargo-lock", ] @@ -352,9 +352,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.0.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cache-padded" @@ -372,7 +372,7 @@ dependencies = [ "onig", "prettyprint", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "serde", "structopt", "syn 1.0.109", @@ -386,14 +386,14 @@ dependencies = [ [[package]] name = "cargo-lock" -version = "7.0.1" +version = "8.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb04b88bd5b2036e30704f95c6ee16f3b5ca3b4ca307da2889d9006648e5c88" +checksum = "031718ddb8f78aa5def78a09e90defe30151d1f6c672f937af4dd916429ed996" dependencies = [ "semver 1.0.4", "serde", "toml", - "url 2.2.2", + "url 2.4.0", ] [[package]] @@ -427,7 +427,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time", + "time 0.1.44", "winapi 0.3.9", ] @@ -458,7 +458,7 @@ checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap 0.11.0", "unicode-width", @@ -472,7 +472,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", - "bitflags", + "bitflags 1.3.2", "clap_lex", "indexmap", "strsim 0.10.0", @@ -512,7 +512,7 @@ dependencies = [ "tar", "tempfile", "tera", - "time", + "time 0.1.44", "toml", "walkdir", ] @@ -535,7 +535,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -556,7 +556,7 @@ dependencies = [ "async-trait", "json5", "lazy_static", - "nom 7.1.1", + "nom", "pathdiff 0.2.1", "ron", "rust-ini", @@ -577,7 +577,7 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "parking_lot 0.11.1", + "parking_lot 0.12.1", "regex", "termios", "unicode-width", @@ -620,7 +620,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" dependencies = [ - "time", + "time 0.1.44", "url 1.7.2", ] @@ -637,7 +637,7 @@ dependencies = [ "publicsuffix", "serde", "serde_json", - "time", + "time 0.1.44", "try_from", "url 1.7.2", ] @@ -699,7 +699,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "cfg-if 0.1.10", "crossbeam-utils 0.7.2", "lazy_static", @@ -725,7 +725,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "cfg-if 0.1.10", "lazy_static", ] @@ -794,6 +794,12 @@ dependencies = [ "syn 0.15.44", ] +[[package]] +name = "deranged" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8810e7e2cf385b1e9b50d68264908ec367ba642c96d02edfe61c39e88e2a3c01" + [[package]] name = "derivative" version = "2.2.0" @@ -801,7 +807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -928,9 +934,25 @@ checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" [[package]] name = "either" -version = "1.6.1" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "email-encoding" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" +dependencies = [ + "base64 0.21.2", + "memchr", +] + +[[package]] +name = "email_address" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" [[package]] name = "encode_unicode" @@ -1018,7 +1040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f16ef37b2a9b242295d61a154ee91ae884afff6b8b933b486b12481cc58310ca" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -1031,7 +1053,7 @@ dependencies = [ "enum-utils-from-str", "failure", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "serde_derive_internals", "syn 1.0.109", ] @@ -1043,7 +1065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49be08bad6e4ca87b2b8e74146987d4e5cb3b7512efa50ef505b51a22227ee1" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", ] [[package]] @@ -1063,7 +1085,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -1105,7 +1127,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", "synstructure", ] @@ -1172,12 +1194,11 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "matches", - "percent-encoding 2.1.0", + "percent-encoding 2.3.0", ] [[package]] @@ -1192,7 +1213,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" dependencies = [ - "bitflags", + "bitflags 1.3.2", "fuchsia-zircon-sys", ] @@ -1202,12 +1223,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "futures" version = "0.1.31" @@ -1216,9 +1231,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1231,9 +1246,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1241,9 +1256,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-cpupool" @@ -1257,9 +1272,9 @@ dependencies = [ [[package]] name = "futures-executor" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1268,9 +1283,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" @@ -1289,36 +1304,33 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ - "autocfg 1.0.1", - "proc-macro-hack", "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] name = "futures-sink" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ - "autocfg 1.0.1", "futures-channel", "futures-core", "futures-io", @@ -1328,8 +1340,6 @@ dependencies = [ "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -1396,13 +1406,13 @@ version = "0.13.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "659cd14835e75b64d9dba5b660463506763cf0aa6cb640aeeb0e98d841093490" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", "openssl-probe", "openssl-sys", - "url 2.2.2", + "url 2.4.0", ] [[package]] @@ -1430,7 +1440,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "ignore", "walkdir", ] @@ -1455,19 +1465,19 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.3" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ - "bytes 1.0.1", + "bytes 1.4.0", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.4", + "http 0.2.9", "indexmap", "slab", - "tokio 1.10.0", + "tokio 1.29.1", "tokio-util", "tracing", ] @@ -1496,6 +1506,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1544,18 +1560,18 @@ checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" dependencies = [ "bytes 0.4.12", "fnv", - "itoa", + "itoa 0.4.7", ] [[package]] name = "http" -version = "0.2.4" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.0.1", + "bytes 1.4.0", "fnv", - "itoa", + "itoa 1.0.9", ] [[package]] @@ -1572,26 +1588,32 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.0.1", - "http 0.2.4", + "bytes 1.4.0", + "http 0.2.9", "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" -version = "1.3.6" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc35c995b9d93ec174cf9a27d425c7892722101e14993cd227fdb51d70cf9589" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "0.3.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humansize" @@ -1622,11 +1644,11 @@ dependencies = [ "http-body 0.1.0", "httparse", "iovec", - "itoa", + "itoa 0.4.7", "log", "net2", "rustc_version", - "time", + "time 0.1.44", "tokio 0.1.22", "tokio-buf", "tokio-executor", @@ -1640,28 +1662,56 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.5" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf09f61b52cfcf4c00de50df88ae423d6c02354e385a86341133b5338630ad1" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.0.1", + "bytes 1.4.0", "futures-channel", "futures-core", "futures-util", - "h2 0.3.3", - "http 0.2.4", - "http-body 0.4.3", + "h2 0.3.20", + "http 0.2.9", + "http-body 0.4.5", "httparse", "httpdate", - "itoa", - "pin-project", + "itoa 1.0.9", + "pin-project-lite", "socket2", - "tokio 1.10.0", + "tokio 1.29.1", "tower-service", "tracing", "want 0.3.0", ] +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http 0.2.9", + "hyper 0.14.27", + "log", + "rustls", + "rustls-native-certs", + "tokio 1.29.1", + "tokio-rustls", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper 0.14.27", + "pin-project-lite", + "tokio 1.29.1", + "tokio-io-timeout", +] + [[package]] name = "hyper-tls" version = "0.3.2" @@ -1681,30 +1731,13 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.0.1", - "hyper 0.14.5", + "bytes 1.4.0", + "hyper 0.14.27", "native-tls", - "tokio 1.10.0", + "tokio 1.29.1", "tokio-native-tls", ] -[[package]] -name = "hyperx" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82566a1ace7f56f604d83b7b2c259c78e243d99c565f23d7b4ae34466442c5a2" -dependencies = [ - "base64 0.13.0", - "bytes 1.0.1", - "http 0.2.4", - "httparse", - "httpdate", - "language-tags", - "mime", - "percent-encoding 2.1.0", - "unicase", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -1733,6 +1766,26 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "ignore" version = "0.4.18" @@ -1757,7 +1810,7 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "hashbrown 0.11.2", "serde", ] @@ -1804,6 +1857,12 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + [[package]] name = "jobserver" version = "0.1.23" @@ -1833,6 +1892,20 @@ dependencies = [ "serde", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.2", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -1855,12 +1928,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.4.0" @@ -1875,68 +1942,66 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "lber" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a99b520993b21a6faab32643cf4726573dc18ca4cf2d48cbeb24d248c86c930" +checksum = "2df7f9fd9f64cf8f59e1a4a0753fe7d575a5b38d3d7ac5758dcee9357d83ef0a" dependencies = [ - "byteorder", - "bytes 1.0.1", - "nom 2.2.1", + "bytes 1.4.0", + "nom", ] [[package]] name = "ldap3" -version = "0.9.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683c23f989ee30a01a605ca2f01d3e24cf06d611558edc6f9f7a0467293f01c" +checksum = "6dceb52eac140c8679326f619b963577ccf5a4ab025fe5e6db424d2fd3e4f400" dependencies = [ "async-trait", - "bytes 1.0.1", - "futures 0.3.16", + "bytes 1.4.0", + "futures 0.3.28", "futures-util", "lazy_static", "lber", "log", - "maplit", "native-tls", - "nom 2.2.1", - "percent-encoding 2.1.0", + "nom", + "percent-encoding 2.3.0", "thiserror", - "tokio 1.10.0", + "tokio 1.29.1", "tokio-native-tls", "tokio-stream", "tokio-util", - "url 2.2.2", + "url 2.4.0", ] [[package]] name = "lettre" -version = "0.10.0-alpha.4" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc8c2fc7873920aca23647e5e86d44ff3f40bbc5a5efaab445c9eb0e001c9f71" +checksum = "76bd09637ae3ec7bd605b8e135e757980b3968430ff2b1a4a94fb7769e50166d" dependencies = [ - "base64 0.13.0", + "base64 0.21.2", + "email-encoding", + "email_address", + "fastrand", + "futures-util", "hostname", - "hyperx", - "idna 0.2.3", + "httpdate", + "idna 0.3.0", "mime", "native-tls", - "nom 6.2.1", + "nom", "once_cell", "quoted_printable", - "r2d2", - "rand 0.7.3", - "regex", - "serde", - "serde_json", - "uuid 0.8.2", + "socket2", + "tokio 1.29.1", ] [[package]] name = "libc" -version = "0.2.124" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" @@ -2004,21 +2069,19 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.4" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ + "autocfg 1.1.0", "scopeguard", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "maplit" @@ -2067,7 +2130,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", ] [[package]] @@ -2076,7 +2139,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", ] [[package]] @@ -2108,7 +2171,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", - "autocfg 1.0.1", + "autocfg 1.1.0", ] [[package]] @@ -2124,7 +2187,7 @@ dependencies = [ "kernel32-sys", "libc", "log", - "miow 0.2.2", + "miow", "net2", "slab", "winapi 0.2.8", @@ -2132,15 +2195,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.13" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", - "miow 0.3.7", - "ntapi", - "winapi 0.3.9", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] @@ -2155,20 +2216,11 @@ dependencies = [ "ws2_32-sys", ] -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -2209,31 +2261,13 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if 0.1.10", "libc", "void", ] -[[package]] -name = "nom" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf51a729ecf40266a2368ad335a5fdde43471f545a967109cd62146ecf8b66ff" - -[[package]] -name = "nom" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6" -dependencies = [ - "bitvec", - "funty", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.1" @@ -2253,15 +2287,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "num" version = "0.3.1" @@ -2282,7 +2307,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-integer", "num-traits", ] @@ -2293,7 +2318,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e0d047c1062aa51e256408c560894e5251f08925980e53cf1aa5bd00eec6512" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-integer", "num-traits", "serde", @@ -2314,7 +2339,7 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-traits", ] @@ -2324,7 +2349,7 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-integer", "num-traits", ] @@ -2335,7 +2360,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-bigint 0.3.2", "num-integer", "num-traits", @@ -2347,7 +2372,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", ] [[package]] @@ -2368,30 +2393,46 @@ checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" [[package]] name = "octocrab" -version = "0.9.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c564a454a4124b45eb0170398624efcc75783b079034e7af13202575580e1db5" +checksum = "0943920a77d028b66ebe4407813733ad4d0ebe7b12dafd608ddec8478e5fef0b" dependencies = [ "arc-swap", "async-trait", - "base64 0.13.0", - "bytes 1.0.1", + "base64 0.21.2", + "bytes 1.4.0", + "cfg-if 1.0.0", "chrono", - "hyperx", + "either", + "futures 0.3.28", + "futures-util", + "http 0.2.9", + "http-body 0.4.5", + "hyper 0.14.27", + "hyper-rustls", + "hyper-timeout", + "jsonwebtoken", "once_cell", - "reqwest 0.11.4", + "percent-encoding 2.3.0", + "pin-project", + "secrecy", "serde", "serde_json", "serde_path_to_error", + "serde_urlencoded 0.7.1", "snafu", - "url 2.2.2", + "tokio 1.29.1", + "tower", + "tower-http", + "tracing", + "url 2.4.0", ] [[package]] name = "once_cell" -version = "1.8.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "onig" @@ -2399,7 +2440,7 @@ version = "4.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8518fcb2b1b8c2f45f0ad499df4fda6087fc3475ca69a185c173b8315d2fb383" dependencies = [ - "bitflags", + "bitflags 1.3.2", "lazy_static", "libc", "onig_sys", @@ -2442,7 +2483,7 @@ version = "0.10.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -2471,7 +2512,7 @@ version = "0.9.65" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "cc", "libc", "openssl-src", @@ -2501,7 +2542,7 @@ dependencies = [ "dirs 2.0.2", "enum-utils", "eval", - "futures 0.3.16", + "futures 0.3.28", "git2", "indexmap", "lazy_static", @@ -2510,7 +2551,6 @@ dependencies = [ "num", "num-bigint 0.4.0", "num-traits", - "octocrab", "openssl", "origen-core-support", "origen_metal", @@ -2531,8 +2571,8 @@ dependencies = [ "tempfile", "tera", "termcolor", - "time", - "tokio 1.10.0", + "time 0.1.44", + "tokio 1.29.1", "toml", "wait-timeout", "walkdir", @@ -2543,7 +2583,7 @@ dependencies = [ name = "origen-core-support" version = "0.1.0-dev.1" dependencies = [ - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -2583,7 +2623,7 @@ dependencies = [ "shellexpand", "tempfile", "termcolor", - "time", + "time 0.1.44", "toml", "wait-timeout", "whoami 1.2.1", @@ -2614,13 +2654,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", - "lock_api 0.4.4", - "parking_lot_core 0.8.3", + "lock_api 0.4.10", + "parking_lot_core 0.9.8", ] [[package]] @@ -2640,16 +2679,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.3" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if 1.0.0", - "instant", "libc", - "redox_syscall 0.2.10", + "redox_syscall 0.3.5", "smallvec 1.6.1", - "winapi 0.3.9", + "windows-targets", ] [[package]] @@ -2685,6 +2723,15 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.0", +] + [[package]] name = "percent-encoding" version = "1.0.1" @@ -2693,9 +2740,9 @@ checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" @@ -2725,7 +2772,7 @@ dependencies = [ "pest", "pest_meta", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -2771,7 +2818,7 @@ dependencies = [ "phf_shared", "proc-macro-hack", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -2786,29 +2833,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.8" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.8" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2914,7 +2961,7 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", "version_check", ] @@ -2926,7 +2973,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "version_check", ] @@ -2936,12 +2983,6 @@ version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" version = "0.4.30" @@ -2967,7 +3008,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95b4ce31ff0a27d93c8de1849cf58162283752f065a90d508f1105fa6c9a213f" dependencies = [ "idna 0.2.3", - "url 2.2.2", + "url 2.4.0", ] [[package]] @@ -2980,7 +3021,7 @@ dependencies = [ "indoc", "libc", "memoffset 0.9.0", - "parking_lot 0.11.1", + "parking_lot 0.12.1", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -3015,7 +3056,7 @@ checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" dependencies = [ "proc-macro2 1.0.66", "pyo3-macros-backend", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3026,7 +3067,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3047,35 +3088,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.9" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2 1.0.66", ] [[package]] name = "quoted_printable" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1238256b09923649ec89b08104c4dfe9f6cb2fea734a5db5384e44916d59e9c5" - -[[package]] -name = "r2d2" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" -dependencies = [ - "log", - "parking_lot 0.11.1", - "scheduled-thread-pool", -] - -[[package]] -name = "radium" -version = "0.5.3" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" +checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" [[package]] name = "rand" @@ -3295,7 +3319,16 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -3368,14 +3401,14 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded 0.5.5", - "time", + "time 0.1.44", "tokio 0.1.22", "tokio-executor", "tokio-io", "tokio-threadpool", "tokio-timer", "url 1.7.2", - "uuid 0.7.4", + "uuid", "winreg 0.6.2", ] @@ -3386,13 +3419,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" dependencies = [ "base64 0.13.0", - "bytes 1.0.1", + "bytes 1.4.0", "encoding_rs", "futures-core", "futures-util", - "http 0.2.4", - "http-body 0.4.3", - "hyper 0.14.5", + "http 0.2.9", + "http-body 0.4.5", + "hyper 0.14.27", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -3400,20 +3433,35 @@ dependencies = [ "log", "mime", "native-tls", - "percent-encoding 2.1.0", + "percent-encoding 2.3.0", "pin-project-lite", "serde", "serde_json", - "serde_urlencoded 0.7.0", - "tokio 1.10.0", + "serde_urlencoded 0.7.1", + "tokio 1.29.1", "tokio-native-tls", - "url 2.2.2", + "url 2.4.0", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "winreg 0.7.0", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi 0.3.9", +] + [[package]] name = "ron" version = "0.7.0" @@ -3421,7 +3469,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b861ecaade43ac97886a512b360d01d66be9f41f3c61088b42cedf92e03d678" dependencies = [ "base64 0.13.0", - "bitflags", + "bitflags 1.3.2", "serde", ] @@ -3472,6 +3520,49 @@ dependencies = [ "semver 0.9.0", ] +[[package]] +name = "rustls" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.5" @@ -3503,15 +3594,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "scheduled-thread-pool" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" -dependencies = [ - "parking_lot 0.11.1", -] - [[package]] name = "scoped-tls" version = "1.0.0" @@ -3524,6 +3606,25 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + [[package]] name = "secret-service" version = "2.0.1" @@ -3550,7 +3651,7 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -3620,7 +3721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3631,7 +3732,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3641,7 +3742,7 @@ version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" dependencies = [ - "itoa", + "itoa 0.4.7", "ryu", "serde", ] @@ -3662,7 +3763,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3673,19 +3774,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" dependencies = [ "dtoa", - "itoa", + "itoa 0.4.7", "serde", "url 1.7.2", ] [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.9", "ryu", "serde", ] @@ -3745,6 +3846,18 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc47a29ce97772ca5c927f75bac34866b16d64e07f330c3248e2d7226623901b" +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.0", + "num-traits", + "thiserror", + "time 0.3.24", +] + [[package]] name = "siphasher" version = "0.3.6" @@ -3783,9 +3896,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "snafu" -version = "0.6.10" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" +checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" dependencies = [ "backtrace", "doc-comment", @@ -3794,25 +3907,32 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.6.10" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" +checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" dependencies = [ + "heck 0.4.1", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] [[package]] name = "socket2" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi 0.3.9", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3863,10 +3983,10 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7813934aecf5f51a54775e00068c237de98489463968231a51746bbbc03f9c10" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro-error", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3885,9 +4005,9 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3915,7 +4035,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", "unicode-ident", ] @@ -3935,7 +4066,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", "unicode-xid 0.2.2", ] @@ -3947,7 +4078,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e80b8831c5a543192ffc3727f01cf0e57579c6ac15558e3048bfb5708892167b" dependencies = [ "bincode", - "bitflags", + "bitflags 1.3.2", "flate2", "fnv", "lazy_static", @@ -3962,12 +4093,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tar" version = "0.4.37" @@ -4010,7 +4135,7 @@ dependencies = [ "globwalk", "humansize", "lazy_static", - "percent-encoding 2.1.0", + "percent-encoding 2.3.0", "pest", "pest_derive", "rand 0.8.4", @@ -4066,22 +4191,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.26" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.26" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] @@ -4104,6 +4229,34 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "time" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b79eabcd964882a646b3584543ccabeae7869e9ac32a46f6f22b7a5bd405308b" +dependencies = [ + "deranged", + "itoa 1.0.9", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +dependencies = [ + "time-core", +] + [[package]] name = "tinyvec" version = "1.3.1" @@ -4140,22 +4293,22 @@ dependencies = [ [[package]] name = "tokio" -version = "1.10.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cf844b23c6131f624accf65ce0e4e9956a8bb329400ea5bcc26ae3a5c20b0b" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ - "autocfg 1.0.1", - "bytes 1.0.1", + "autocfg 1.1.0", + "backtrace", + "bytes 1.4.0", "libc", - "memchr", - "mio 0.7.13", + "mio 0.8.8", "num_cpus", - "once_cell", - "parking_lot 0.11.1", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", + "socket2", "tokio-macros", - "winapi 0.3.9", + "windows-sys", ] [[package]] @@ -4200,15 +4353,25 @@ dependencies = [ "log", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio 1.29.1", +] + [[package]] name = "tokio-macros" -version = "1.3.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] @@ -4218,7 +4381,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ "native-tls", - "tokio 1.10.0", + "tokio 1.29.1", ] [[package]] @@ -4240,15 +4403,25 @@ dependencies = [ "tokio-sync", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio 1.29.1", +] + [[package]] name = "tokio-stream" -version = "0.1.8" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", - "tokio 1.10.0", + "tokio 1.29.1", ] [[package]] @@ -4306,16 +4479,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes 1.0.1", + "bytes 1.4.0", "futures-core", "futures-sink", - "log", "pin-project-lite", - "tokio 1.10.0", + "tokio 1.29.1", + "tracing", ] [[package]] @@ -4340,6 +4513,48 @@ dependencies = [ "walkdir", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio 1.29.1", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +dependencies = [ + "bitflags 2.3.3", + "bytes 1.4.0", + "futures-core", + "futures-util", + "http 0.2.9", + "http-body 0.4.5", + "http-range-header", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.1" @@ -4348,22 +4563,35 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.26" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", + "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 2.0.27", +] + [[package]] name = "tracing-core" -version = "0.1.18" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -4454,9 +4682,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.6" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" @@ -4466,9 +4694,9 @@ checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] @@ -4513,6 +4741,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" version = "1.7.2" @@ -4526,14 +4760,13 @@ dependencies = [ [[package]] name = "url" -version = "2.2.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna 0.2.3", - "matches", - "percent-encoding 2.1.0", + "idna 0.4.0", + "percent-encoding 2.3.0", "serde", ] @@ -4546,15 +4779,6 @@ dependencies = [ "rand 0.6.5", ] -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.3", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -4638,6 +4862,12 @@ version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + [[package]] name = "wasm-bindgen" version = "0.2.75" @@ -4660,7 +4890,7 @@ dependencies = [ "lazy_static", "log", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", "wasm-bindgen-shared", ] @@ -4683,7 +4913,7 @@ version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "171ebf0ed9e1458810dfcb31f2e766ad6b3a89dbda42d8901f2b268277e5f09c" dependencies = [ - "quote 1.0.9", + "quote 1.0.32", "wasm-bindgen-macro-support", ] @@ -4694,7 +4924,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2657dd393f03aa2a659c25c6ae18a13a4048cebd220e147933ea837efc589f" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -4784,6 +5014,72 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winreg" version = "0.6.2" @@ -4812,12 +5108,6 @@ dependencies = [ "winapi-build", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "xattr" version = "0.2.2" @@ -4853,7 +5143,7 @@ dependencies = [ "derivative", "enumflags2", "fastrand", - "futures 0.3.16", + "futures 0.3.28", "nb-connect", "nix", "once_cell", @@ -4873,7 +5163,7 @@ checksum = "a482c56029e48681b89b92b5db3c446db0915e8dd1052c0328a574eda38d5f93" dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -4905,6 +5195,6 @@ checksum = "e4ca5e22593eb4212382d60d26350065bf2a02c34b85bc850474a74b589a3de9" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] diff --git a/rust/origen/Cargo.toml b/rust/origen/Cargo.toml index 76040238..4a6552f7 100644 --- a/rust/origen/Cargo.toml +++ b/rust/origen/Cargo.toml @@ -63,13 +63,12 @@ normpath = "0.2.0" cfg-if = "1" dialoguer = "0.8.0" wait-timeout = "0.2.0" -octocrab = "0.9.1" futures = {version = "0.3.15", features = ["executor"]} -tokio = {version = "1.7", features = ["full"] } +tokio = {version = "1.29", features = ["full"] } reqwest = {version = "0.11.3", features = ["blocking", "json"]} [build-dependencies] -built = "0.5.1" +built = "0.5.2" walkdir = "2" # Additional items required to build a full self-contained origen CLI binary for Linux diff --git a/rust/origen/cli/Cargo.toml b/rust/origen/cli/Cargo.toml index ae4eb636..3e9606b7 100644 --- a/rust/origen/cli/Cargo.toml +++ b/rust/origen/cli/Cargo.toml @@ -35,4 +35,4 @@ phf = { version = "0.8.0", features = ["macros"] } [build-dependencies] walkdir = "2" -built = "0.5.1" +built = "0.5.2" diff --git a/rust/origen/src/core/model/registers/register.rs b/rust/origen/src/core/model/registers/register.rs index e1e84870..d5225a57 100644 --- a/rust/origen/src/core/model/registers/register.rs +++ b/rust/origen/src/core/model/registers/register.rs @@ -673,7 +673,7 @@ impl Register { lineno: lineno, }; if self.fields.contains_key(name) { - let mut orig = self.fields.get_mut(name).unwrap(); + let orig = self.fields.get_mut(name).unwrap(); orig.related_fields += 1; let key = format!("{}{}", name, orig.related_fields); self.fields.insert(key.clone(), f); diff --git a/rust/origen/src/generator/processors/cycle_combiner.rs b/rust/origen/src/generator/processors/cycle_combiner.rs index c4a8ba1b..9357e2f8 100644 --- a/rust/origen/src/generator/processors/cycle_combiner.rs +++ b/rust/origen/src/generator/processors/cycle_combiner.rs @@ -225,7 +225,7 @@ impl Processor for UnpackCaptures { let mut finished_overlays: Vec<(Option, Option)> = vec![]; // Decrease the cycle count for all captures - for (pin_id, mut cap) in self.capturing.iter_mut() { + for (pin_id, cap) in self.capturing.iter_mut() { if cap.0 <= this_repeat { // This capture will be exhausted by the end of this node // Remove it from the list to capture @@ -242,7 +242,7 @@ impl Processor for UnpackCaptures { } // Do the same for overlays - for (pin_id, mut ovl) in self.overlaying.iter_mut() { + for (pin_id, ovl) in self.overlaying.iter_mut() { if ovl.0 <= this_repeat { // This overlay will be exhausted by the end of this node // Remove it from the list to overlay diff --git a/rust/origen/src/prog_gen/processors/final_model_extract.rs b/rust/origen/src/prog_gen/processors/final_model_extract.rs index 463f6355..1620b1ad 100644 --- a/rust/origen/src/prog_gen/processors/final_model_extract.rs +++ b/rust/origen/src/prog_gen/processors/final_model_extract.rs @@ -129,7 +129,7 @@ impl Processor for ExtractToModel { }; collection.insert(*number, b); } else { - let mut b = collection.get_mut(number).unwrap(); + let b = collection.get_mut(number).unwrap(); if let Some(d) = description { b.description = Some(d.to_owned()); } diff --git a/rust/origen/src/utility/github.rs b/rust/origen/src/utility/github.rs index 89808f78..bebb7341 100644 --- a/rust/origen/src/utility/github.rs +++ b/rust/origen/src/utility/github.rs @@ -1,5 +1,4 @@ -use origen_metal::{Result, Outcome}; -use octocrab; +use origen_metal::{Result, Outcome, octocrab}; use std::collections::HashMap; pub fn lookup_pat() -> Result { @@ -36,30 +35,32 @@ pub fn dispatch_workflow( git_ref: &str, inputs: Option>, ) -> Result { - let o = octocrab::OctocrabBuilder::new() - .personal_token(lookup_pat()?) - .add_header( - reqwest::header::ACCEPT, - "application/vnd.github.v3+json".to_string(), - ) - .build()?; - let r = tokio::runtime::Runtime::new().unwrap(); - let _guard = r.enter(); + // FOR_PR + todo!(); + // let o = octocrab::OctocrabBuilder::new() + // .personal_token(lookup_pat()?) + // .add_header( + // reqwest::header::ACCEPT, + // "application/vnd.github.v3+json".to_string(), + // ) + // .build()?; + // let r = tokio::runtime::Runtime::new().unwrap(); + // let _guard = r.enter(); - let response = futures::executor::block_on(o._post( - format!( - "https://api.github.com/repos/{}/{}/actions/workflows/{}/dispatches", - owner, repo, workflow - ), - Some(&DispatchWorkflowRequest::new(git_ref, inputs)), - ))?; - let headers = response.headers().clone(); - let status = response.status().as_u16() as usize; - let body = futures::executor::block_on(response.text())?; + // let response = futures::executor::block_on(o._post( + // format!( + // "https://api.github.com/repos/{}/{}/actions/workflows/{}/dispatches", + // owner, repo, workflow + // ), + // Some(&DispatchWorkflowRequest::new(git_ref, inputs)), + // ))?; + // let headers = response.headers().clone(); + // let status = response.status().as_u16() as usize; + // let body = futures::executor::block_on(response.body())?; - let mut res = Outcome::new_success_or_fail(body.is_empty()); - res.set_msg(body); - res.add_metadata("header", format!("{:?}", headers)); - res.add_metadata("status", status); - Ok(res) + // let mut res = Outcome::new_success_or_fail(body.is_empty()); + // res.set_msg(body); + // res.add_metadata("header", format!("{:?}", headers)); + // res.add_metadata("status", status); + // Ok(res) } diff --git a/rust/origen/src/utility/sessions.rs b/rust/origen/src/utility/sessions.rs index 9babd61a..f13afd84 100644 --- a/rust/origen/src/utility/sessions.rs +++ b/rust/origen/src/utility/sessions.rs @@ -15,7 +15,7 @@ pub fn setup_sessions() -> om::Result<()> { log_trace!("Setting up user session..."); if let Some(r) = &ORIGEN_CONFIG.session__user_root { let mut users = om::users_mut(); - let mut sc = users.default_session_config_mut(); + let sc = users.default_session_config_mut(); sc.root = Some(PathBuf::from(r)); } diff --git a/rust/origen_metal/Cargo.lock b/rust/origen_metal/Cargo.lock index 06c593d8..7e50dde0 100644 --- a/rust/origen_metal/Cargo.lock +++ b/rust/origen_metal/Cargo.lock @@ -77,7 +77,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.6", + "getrandom", "once_cell", "version_check", ] @@ -118,13 +118,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] @@ -154,6 +154,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + [[package]] name = "bitflags" version = "1.3.2" @@ -161,16 +167,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "bitvec" -version = "0.19.6" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "block-buffer" @@ -220,9 +220,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "built" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f346b6890a0dfa7266974910e7df2d5088120dd54721b9b0e5aae1ae5e05715" +checksum = "5b9c056b9ed43aee5e064b683aa1ec783e19c6acec7559e3ae931b7490472fbe" dependencies = [ "cargo-lock", ] @@ -247,9 +247,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cache-padded" @@ -259,9 +259,9 @@ checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" [[package]] name = "cargo-lock" -version = "7.1.0" +version = "8.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c408da54db4c50d4693f7e649c299bc9de9c23ead86249e5368830bb32a734b" +checksum = "031718ddb8f78aa5def78a09e90defe30151d1f6c672f937af4dd916429ed996" dependencies = [ "semver", "serde", @@ -300,7 +300,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time", + "time 0.1.44", "winapi", ] @@ -331,7 +331,7 @@ dependencies = [ "async-trait", "json5", "lazy_static", - "nom 7.1.1", + "nom", "pathdiff", "ron", "rust-ini", @@ -399,7 +399,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -453,6 +453,28 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "email-encoding" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" +dependencies = [ + "base64 0.21.2", + "memchr", +] + +[[package]] +name = "email_address" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" + [[package]] name = "encoding_rs" version = "0.8.31" @@ -470,7 +492,7 @@ checksum = "f16ef37b2a9b242295d61a154ee91ae884afff6b8b933b486b12481cc58310ca" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -484,7 +506,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn", + "syn 1.0.93", ] [[package]] @@ -515,7 +537,7 @@ checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -565,25 +587,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "matches", "percent-encoding", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "futures" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -596,9 +611,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -606,15 +621,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -623,9 +638,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" @@ -644,32 +659,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -702,17 +717,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.6" @@ -746,7 +750,7 @@ version = "0.13.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -776,7 +780,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.7.1", + "tokio-util", "tracing", ] @@ -795,6 +799,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -848,15 +858,21 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" version = "1.7.1" @@ -893,6 +909,34 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -907,28 +951,21 @@ dependencies = [ ] [[package]] -name = "hyperx" -version = "1.4.0" +name = "idna" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5617e92fc2f2501c3e2bc6ce547cad841adba2bae5b921c7e52510beca6d084c" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "base64", - "bytes", - "http", - "httpdate", - "language-tags", - "mime", - "percent-encoding", - "unicase", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "idna" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -1006,6 +1043,20 @@ dependencies = [ "serde", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.2", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "keyring" version = "1.1.2" @@ -1018,12 +1069,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "language-tags" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" - [[package]] name = "lazy_static" version = "1.4.0" @@ -1032,20 +1077,19 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lber" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a99b520993b21a6faab32643cf4726573dc18ca4cf2d48cbeb24d248c86c930" +checksum = "2df7f9fd9f64cf8f59e1a4a0753fe7d575a5b38d3d7ac5758dcee9357d83ef0a" dependencies = [ - "byteorder", "bytes", - "nom 2.2.1", + "nom", ] [[package]] name = "ldap3" -version = "0.9.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683c23f989ee30a01a605ca2f01d3e24cf06d611558edc6f9f7a0467293f01c" +checksum = "6dceb52eac140c8679326f619b963577ccf5a4ab025fe5e6db424d2fd3e4f400" dependencies = [ "async-trait", "bytes", @@ -1054,39 +1098,38 @@ dependencies = [ "lazy_static", "lber", "log", - "maplit", "native-tls", - "nom 2.2.1", + "nom", "percent-encoding", "thiserror", "tokio", "tokio-native-tls", "tokio-stream", - "tokio-util 0.6.9", + "tokio-util", "url", ] [[package]] name = "lettre" -version = "0.10.0-alpha.4" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc8c2fc7873920aca23647e5e86d44ff3f40bbc5a5efaab445c9eb0e001c9f71" +checksum = "76bd09637ae3ec7bd605b8e135e757980b3968430ff2b1a4a94fb7769e50166d" dependencies = [ - "base64", + "base64 0.21.2", + "email-encoding", + "email_address", + "fastrand", + "futures-util", "hostname", - "hyperx", - "idna", + "httpdate", + "idna 0.3.0", "mime", "native-tls", - "nom 6.1.2", + "nom", "once_cell", "quoted_printable", - "r2d2", - "rand 0.7.3", - "regex", - "serde", - "serde_json", - "uuid", + "socket2", + "tokio", ] [[package]] @@ -1172,12 +1215,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "memchr" version = "2.5.0" @@ -1216,21 +1253,21 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.3" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "native-tls" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -1260,31 +1297,13 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if 0.1.10", "libc", "void", ] -[[package]] -name = "nom" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf51a729ecf40266a2368ad335a5fdde43471f545a967109cd62146ecf8b66ff" - -[[package]] -name = "nom" -version = "6.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" -dependencies = [ - "bitvec", - "funty", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.1" @@ -1404,30 +1423,46 @@ dependencies = [ [[package]] name = "octocrab" -version = "0.9.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c564a454a4124b45eb0170398624efcc75783b079034e7af13202575580e1db5" +checksum = "0943920a77d028b66ebe4407813733ad4d0ebe7b12dafd608ddec8478e5fef0b" dependencies = [ "arc-swap", "async-trait", - "base64", + "base64 0.21.2", "bytes", + "cfg-if 1.0.0", "chrono", - "hyperx", + "either", + "futures", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-timeout", + "jsonwebtoken", "once_cell", - "reqwest", + "percent-encoding", + "pin-project", + "secrecy", "serde", "serde_json", "serde_path_to_error", + "serde_urlencoded", "snafu", + "tokio", + "tower", + "tower-http", + "tracing", "url", ] [[package]] name = "once_cell" -version = "1.10.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -1447,7 +1482,7 @@ version = "0.10.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -1464,7 +1499,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -1521,7 +1556,7 @@ dependencies = [ "pest", "pest_derive", "pyo3", - "rand 0.8.5", + "rand", "regex", "reqwest", "rpassword", @@ -1532,7 +1567,7 @@ dependencies = [ "shellexpand", "tempfile", "termcolor", - "time", + "time 0.1.44", "toml", "wait-timeout", "whoami", @@ -1575,11 +1610,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.0", +] + [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" @@ -1610,7 +1654,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -1624,6 +1668,26 @@ dependencies = [ "sha-1", ] +[[package]] +name = "pin-project" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.27", +] + [[package]] name = "pin-project-lite" version = "0.2.9" @@ -1693,11 +1757,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.38" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9027b48e9d4c9175fa2218adf3557f91c1137021739951d4932f5f8268ac48aa" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1746,7 +1810,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -1757,53 +1821,23 @@ checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] name = "quote" -version = "1.0.18" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] [[package]] name = "quoted_printable" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fee2dce59f7a43418e3382c766554c614e06a552d53a8f07ef499ea4b332c0f" - -[[package]] -name = "r2d2" -version = "0.8.9" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" -dependencies = [ - "log", - "parking_lot", - "scheduled-thread-pool", -] - -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] +checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" [[package]] name = "rand" @@ -1812,18 +1846,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -1833,16 +1857,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -1851,16 +1866,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.6", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -1869,7 +1875,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1878,7 +1884,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.6", + "getrandom", "redox_syscall", "thiserror", ] @@ -1915,7 +1921,7 @@ version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ - "base64", + "base64 0.13.0", "bytes", "encoding_rs", "futures-core", @@ -1945,14 +1951,29 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + [[package]] name = "ron" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b861ecaade43ac97886a512b360d01d66be9f41f3c61088b42cedf92e03d678" dependencies = [ - "base64", - "bitflags", + "base64 0.13.0", + "bitflags 1.3.2", "serde", ] @@ -1982,6 +2003,49 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +[[package]] +name = "rustls" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.9" @@ -1998,15 +2062,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "scheduled-thread-pool" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" -dependencies = [ - "parking_lot", -] - [[package]] name = "scoped-tls" version = "1.0.0" @@ -2019,6 +2074,25 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + [[package]] name = "secret-service" version = "2.0.1" @@ -2030,7 +2104,7 @@ dependencies = [ "hkdf", "lazy_static", "num", - "rand 0.8.5", + "rand", "serde", "sha2", "zbus", @@ -2045,7 +2119,7 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2101,7 +2175,7 @@ checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2112,7 +2186,7 @@ checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2143,7 +2217,7 @@ checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2192,6 +2266,18 @@ dependencies = [ "dirs", ] +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.3", + "num-traits", + "thiserror", + "time 0.3.23", +] + [[package]] name = "slab" version = "0.4.6" @@ -2206,9 +2292,9 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "snafu" -version = "0.6.10" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" +checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" dependencies = [ "backtrace", "doc-comment", @@ -2217,13 +2303,14 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.6.10" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" +checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" dependencies = [ + "heck", "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2236,6 +2323,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "static_assertions" version = "1.1.0" @@ -2260,10 +2353,15 @@ dependencies = [ ] [[package]] -name = "tap" -version = "1.0.1" +name = "syn" +version = "2.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] name = "target-lexicon" @@ -2296,22 +2394,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] @@ -2325,6 +2423,33 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +dependencies = [ + "itoa", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +dependencies = [ + "time-core", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2342,20 +2467,30 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.18.2" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ + "autocfg", "bytes", "libc", "memchr", "mio", "num_cpus", - "once_cell", "pin-project-lite", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.45.0", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", ] [[package]] @@ -2366,7 +2501,7 @@ checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2380,35 +2515,31 @@ dependencies = [ ] [[package]] -name = "tokio-stream" -version = "0.1.8" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "futures-core", - "pin-project-lite", + "rustls", "tokio", ] [[package]] -name = "tokio-util" -version = "0.6.9" +name = "tokio-stream" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ - "bytes", "futures-core", - "futures-sink", - "log", "pin-project-lite", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -2427,6 +2558,48 @@ dependencies = [ "serde", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +dependencies = [ + "bitflags 2.3.3", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.1" @@ -2435,11 +2608,12 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2447,22 +2621,22 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.21" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.27", ] [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -2484,25 +2658,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] -name = "unicase" -version = "2.6.0" +name = "unicode-bidi" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] -name = "unicode-bidi" -version = "0.3.8" +name = "unicode-ident" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] @@ -2529,28 +2700,24 @@ dependencies = [ "subtle", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" -version = "2.2.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna", - "matches", + "idna 0.4.0", "percent-encoding", "serde", ] -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.6", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -2594,12 +2761,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" @@ -2633,7 +2794,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 1.0.93", "wasm-bindgen-shared", ] @@ -2667,7 +2828,7 @@ checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2740,46 +2901,135 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows-targets 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winreg" @@ -2790,12 +3040,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "yaml-rust" version = "0.4.5" @@ -2837,9 +3081,15 @@ dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" + [[package]] name = "zvariant" version = "2.10.0" @@ -2863,5 +3113,5 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] diff --git a/rust/origen_metal/Cargo.toml b/rust/origen_metal/Cargo.toml index f058444e..942e5ae6 100644 --- a/rust/origen_metal/Cargo.toml +++ b/rust/origen_metal/Cargo.toml @@ -28,7 +28,7 @@ wait-timeout = "0.2.0" chrono = "0.4.11" indexmap = { version = "1.6.0", features = ["serde-1"] } config = "0.13.1" -ldap3 = "0.9.3" +ldap3 = "0.11.3" cfg-if = "1" enum-display-derive = "0.1.1" whoami = "1.2.1" @@ -43,12 +43,13 @@ keyring = "1" num-bigint = {version = "0.4.0", features = ["serde"]} num-traits = "0.2.15" serde_json = "1.0" -octocrab = "0.9.1" +octocrab = "0.28.0" reqwest = {version = "0.11.3", features = ["blocking", "json"]} -lettre = {version = "=0.10.0-alpha.4", features = ["builder"]} +lettre = {version = "=0.10.4", features = ["builder"]} aes-gcm = "0.8" semver = "1.0.1" glob = "0.3.0" +email_address = "0.2.4" [build-dependencies] -built = "0.5.1" +built = "0.5.2" diff --git a/rust/origen_metal/src/error.rs b/rust/origen_metal/src/error.rs index 66b47080..5d914320 100644 --- a/rust/origen_metal/src/error.rs +++ b/rust/origen_metal/src/error.rs @@ -127,6 +127,12 @@ impl std::convert::From for Error { } } +impl std::convert::From for Error { + fn from(err: email_address::Error) -> Self { + Error::new(&err.to_string()) + } +} + impl std::convert::From for Error { fn from(err: toml::de::Error) -> Self { Error::new(&err.to_string()) diff --git a/rust/origen_metal/src/lib.rs b/rust/origen_metal/src/lib.rs index d5cea02f..3e186155 100644 --- a/rust/origen_metal/src/lib.rs +++ b/rust/origen_metal/src/lib.rs @@ -3,6 +3,7 @@ pub extern crate lazy_static; pub extern crate config; pub extern crate indexmap; pub extern crate glob; +pub extern crate octocrab; #[macro_use] extern crate serde; #[macro_use] diff --git a/rust/origen_metal/src/utils/mailer/mailer.rs b/rust/origen_metal/src/utils/mailer/mailer.rs index 8aa06aa7..15c88ebd 100644 --- a/rust/origen_metal/src/utils/mailer/mailer.rs +++ b/rust/origen_metal/src/utils/mailer/mailer.rs @@ -166,11 +166,9 @@ impl Mailer { pub fn html_singlepart(body: &str) -> Result { Ok(SinglePart::builder() - .header(header::ContentType( - "text/html; charset=utf8".parse().unwrap(), - )) + .header(header::ContentType::TEXT_HTML) .header(header::ContentTransferEncoding::QuotedPrintable) - .body(body)) + .body(body.to_string())) } pub fn compose( diff --git a/rust/origen_metal/src/utils/mailer/maillist.rs b/rust/origen_metal/src/utils/mailer/maillist.rs index 8f503edc..471c0e6e 100644 --- a/rust/origen_metal/src/utils/mailer/maillist.rs +++ b/rust/origen_metal/src/utils/mailer/maillist.rs @@ -231,6 +231,8 @@ impl Maillist { email_str = r.to_string(); } } + use std::str::FromStr; + let em = email_address::EmailAddress::from_str(&email_str)?; retn.push(email_str.parse()?); } Ok(retn) diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index 1c749a9d..33212cc7 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -148,13 +148,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.51" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] @@ -170,9 +170,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -204,6 +204,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + [[package]] name = "bincode" version = "1.3.3" @@ -220,16 +226,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "bitvec" -version = "0.19.5" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "blake2b_simd" @@ -299,9 +299,9 @@ dependencies = [ [[package]] name = "built" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f346b6890a0dfa7266974910e7df2d5088120dd54721b9b0e5aae1ae5e05715" +checksum = "5b9c056b9ed43aee5e064b683aa1ec783e19c6acec7559e3ae931b7490472fbe" dependencies = [ "cargo-lock", ] @@ -326,9 +326,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.0.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cache-padded" @@ -346,7 +346,7 @@ dependencies = [ "onig", "prettyprint", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "serde", "structopt", "syn 1.0.109", @@ -360,9 +360,9 @@ dependencies = [ [[package]] name = "cargo-lock" -version = "7.0.1" +version = "8.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb04b88bd5b2036e30704f95c6ee16f3b5ca3b4ca307da2889d9006648e5c88" +checksum = "031718ddb8f78aa5def78a09e90defe30151d1f6c672f937af4dd916429ed996" dependencies = [ "semver 1.0.4", "serde", @@ -401,7 +401,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time", + "time 0.1.44", "winapi", ] @@ -432,7 +432,7 @@ checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "textwrap", "unicode-width", @@ -469,7 +469,7 @@ dependencies = [ "async-trait", "json5", "lazy_static", - "nom 7.1.1", + "nom", "pathdiff 0.2.1", "ron", "rust-ini", @@ -646,6 +646,12 @@ dependencies = [ "syn 0.15.44", ] +[[package]] +name = "deranged" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8810e7e2cf385b1e9b50d68264908ec367ba642c96d02edfe61c39e88e2a3c01" + [[package]] name = "derivative" version = "2.2.0" @@ -653,7 +659,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -774,9 +780,25 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.6.1" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "email-encoding" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" +dependencies = [ + "base64 0.21.2", + "memchr", +] + +[[package]] +name = "email_address" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" [[package]] name = "encode_unicode" @@ -864,7 +886,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f16ef37b2a9b242295d61a154ee91ae884afff6b8b933b486b12481cc58310ca" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -877,7 +899,7 @@ dependencies = [ "enum-utils-from-str", "failure", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "serde_derive_internals", "syn 1.0.109", ] @@ -889,7 +911,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49be08bad6e4ca87b2b8e74146987d4e5cb3b7512efa50ef505b51a22227ee1" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", ] [[package]] @@ -909,7 +931,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -993,25 +1015,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "matches", "percent-encoding", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "futures" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1024,9 +1039,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1034,15 +1049,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1051,9 +1066,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" @@ -1072,36 +1087,33 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ - "autocfg", - "proc-macro-hack", "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] name = "futures-sink" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.16" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ - "autocfg", "futures-channel", "futures-core", "futures-io", @@ -1111,8 +1123,6 @@ dependencies = [ "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] @@ -1179,7 +1189,7 @@ version = "0.13.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "659cd14835e75b64d9dba5b660463506763cf0aa6cb640aeeb0e98d841093490" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -1213,16 +1223,16 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "ignore", "walkdir", ] [[package]] name = "h2" -version = "0.3.3" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1261,6 +1271,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1303,37 +1319,43 @@ dependencies = [ [[package]] name = "http" -version = "0.2.4" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.9", ] [[package]] name = "http-body" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" -version = "1.3.6" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc35c995b9d93ec174cf9a27d425c7892722101e14993cd227fdb51d70cf9589" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "0.3.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humansize" @@ -1352,9 +1374,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.5" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf09f61b52cfcf4c00de50df88ae423d6c02354e385a86341133b5338630ad1" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1365,8 +1387,8 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", - "pin-project", + "itoa 1.0.9", + "pin-project-lite", "socket2", "tokio", "tower-service", @@ -1375,33 +1397,44 @@ dependencies = [ ] [[package]] -name = "hyper-tls" -version = "0.5.0" +name = "hyper-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ - "bytes", + "futures-util", + "http", "hyper", - "native-tls", + "log", + "rustls", + "rustls-native-certs", "tokio", - "tokio-native-tls", + "tokio-rustls", ] [[package]] -name = "hyperx" -version = "1.3.0" +name = "hyper-timeout" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82566a1ace7f56f604d83b7b2c259c78e243d99c565f23d7b4ae34466442c5a2" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "base64 0.13.0", "bytes", - "http", - "httparse", - "httpdate", - "language-tags", - "mime", - "percent-encoding", - "unicase", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", ] [[package]] @@ -1412,11 +1445,20 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "idna" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -1498,6 +1540,12 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + [[package]] name = "jobserver" version = "0.1.23" @@ -1527,6 +1575,20 @@ dependencies = [ "serde", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.2", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "keyring" version = "1.1.2" @@ -1539,12 +1601,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - [[package]] name = "lazy_static" version = "1.4.0" @@ -1559,20 +1615,19 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "lber" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a99b520993b21a6faab32643cf4726573dc18ca4cf2d48cbeb24d248c86c930" +checksum = "2df7f9fd9f64cf8f59e1a4a0753fe7d575a5b38d3d7ac5758dcee9357d83ef0a" dependencies = [ - "byteorder", "bytes", - "nom 2.2.1", + "nom", ] [[package]] name = "ldap3" -version = "0.9.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683c23f989ee30a01a605ca2f01d3e24cf06d611558edc6f9f7a0467293f01c" +checksum = "6dceb52eac140c8679326f619b963577ccf5a4ab025fe5e6db424d2fd3e4f400" dependencies = [ "async-trait", "bytes", @@ -1581,9 +1636,8 @@ dependencies = [ "lazy_static", "lber", "log", - "maplit", "native-tls", - "nom 2.2.1", + "nom", "percent-encoding", "thiserror", "tokio", @@ -1595,32 +1649,32 @@ dependencies = [ [[package]] name = "lettre" -version = "0.10.0-alpha.4" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc8c2fc7873920aca23647e5e86d44ff3f40bbc5a5efaab445c9eb0e001c9f71" +checksum = "76bd09637ae3ec7bd605b8e135e757980b3968430ff2b1a4a94fb7769e50166d" dependencies = [ - "base64 0.13.0", + "base64 0.21.2", + "email-encoding", + "email_address", + "fastrand", + "futures-util", "hostname", - "hyperx", - "idna", + "httpdate", + "idna 0.3.0", "mime", "native-tls", - "nom 6.2.1", + "nom", "once_cell", "quoted_printable", - "r2d2", - "rand 0.7.3", - "regex", - "serde", - "serde_json", - "uuid", + "socket2", + "tokio", ] [[package]] name = "libc" -version = "0.2.124" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" @@ -1679,21 +1733,19 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "lock_api" -version = "0.4.4" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" [[package]] name = "maplit" @@ -1707,12 +1759,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "md-5" version = "0.9.1" @@ -1763,31 +1809,20 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.13" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -1817,31 +1852,13 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if 0.1.10", "libc", "void", ] -[[package]] -name = "nom" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf51a729ecf40266a2368ad335a5fdde43471f545a967109cd62146ecf8b66ff" - -[[package]] -name = "nom" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6" -dependencies = [ - "bitvec", - "funty", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.1" @@ -1861,15 +1878,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - [[package]] name = "num" version = "0.2.1" @@ -2023,30 +2031,46 @@ checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" [[package]] name = "octocrab" -version = "0.9.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c564a454a4124b45eb0170398624efcc75783b079034e7af13202575580e1db5" +checksum = "0943920a77d028b66ebe4407813733ad4d0ebe7b12dafd608ddec8478e5fef0b" dependencies = [ "arc-swap", "async-trait", - "base64 0.13.0", + "base64 0.21.2", "bytes", + "cfg-if 1.0.0", "chrono", - "hyperx", + "either", + "futures", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-timeout", + "jsonwebtoken", "once_cell", - "reqwest", + "percent-encoding", + "pin-project", + "secrecy", "serde", "serde_json", "serde_path_to_error", + "serde_urlencoded", "snafu", + "tokio", + "tower", + "tower-http", + "tracing", "url", ] [[package]] name = "once_cell" -version = "1.8.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "onig" @@ -2054,7 +2078,7 @@ version = "4.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8518fcb2b1b8c2f45f0ad499df4fda6087fc3475ca69a185c173b8315d2fb383" dependencies = [ - "bitflags", + "bitflags 1.3.2", "lazy_static", "libc", "onig_sys", @@ -2088,7 +2112,7 @@ version = "0.10.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549430950c79ae24e6d02e0b7404534ecf311d94cc9f861e9e4020187d13d885" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -2156,7 +2180,6 @@ dependencies = [ "num 0.3.1", "num-bigint 0.4.0", "num-traits", - "octocrab", "openssl", "origen-core-support", "origen_metal", @@ -2177,7 +2200,7 @@ dependencies = [ "tempfile", "tera", "termcolor", - "time", + "time 0.1.44", "tokio", "toml", "wait-timeout", @@ -2189,7 +2212,7 @@ dependencies = [ name = "origen-core-support" version = "0.1.0-dev.1" dependencies = [ - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -2229,7 +2252,7 @@ dependencies = [ "shellexpand", "tempfile", "termcolor", - "time", + "time 0.1.44", "toml", "wait-timeout", "whoami 1.2.1", @@ -2264,27 +2287,25 @@ checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" [[package]] name = "parking_lot" -version = "0.11.1" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.3" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if 1.0.0", - "instant", "libc", - "redox_syscall 0.2.10", + "redox_syscall 0.3.5", "smallvec", - "winapi", + "windows-targets", ] [[package]] @@ -2326,11 +2347,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.0", +] + [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" @@ -2360,7 +2390,7 @@ dependencies = [ "pest", "pest_meta", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -2406,7 +2436,7 @@ dependencies = [ "phf_shared", "proc-macro-hack", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -2421,29 +2451,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.8" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.8" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2549,7 +2579,7 @@ checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", "version_check", ] @@ -2561,7 +2591,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "version_check", ] @@ -2571,12 +2601,6 @@ version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" version = "0.4.30" @@ -2656,7 +2680,7 @@ checksum = "8a5caec6a1dd355964a841fcbeeb1b89fe4146c87295573f94228911af3cc5a2" dependencies = [ "proc-macro2 1.0.66", "pyo3-macros-backend", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -2667,7 +2691,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -2688,35 +2712,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.9" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2 1.0.66", ] [[package]] name = "quoted_printable" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1238256b09923649ec89b08104c4dfe9f6cb2fea734a5db5384e44916d59e9c5" - -[[package]] -name = "r2d2" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" -dependencies = [ - "log", - "parking_lot", - "scheduled-thread-pool", -] - -[[package]] -name = "radium" -version = "0.5.3" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" +checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" [[package]] name = "rand" @@ -2821,7 +2828,16 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" dependencies = [ - "bitflags", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", ] [[package]] @@ -2906,6 +2922,21 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + [[package]] name = "ron" version = "0.7.0" @@ -2913,7 +2944,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b861ecaade43ac97886a512b360d01d66be9f41f3c61088b42cedf92e03d678" dependencies = [ "base64 0.13.0", - "bitflags", + "bitflags 1.3.2", "serde", ] @@ -2955,6 +2986,49 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" +[[package]] +name = "rustls" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.5" @@ -2986,15 +3060,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "scheduled-thread-pool" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" -dependencies = [ - "parking_lot", -] - [[package]] name = "scoped-tls" version = "1.0.0" @@ -3007,6 +3072,25 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + [[package]] name = "secret-service" version = "2.0.1" @@ -3033,7 +3117,7 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -3103,7 +3187,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a024926d3432516606328597e0f224a51355a493b49fdd67e9209187cbe55ecc" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3114,7 +3198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3124,7 +3208,7 @@ version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" dependencies = [ - "itoa", + "itoa 0.4.7", "ryu", "serde", ] @@ -3145,18 +3229,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.9", "ryu", "serde", ] @@ -3210,6 +3294,18 @@ dependencies = [ "libc", ] +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.0", + "num-traits", + "thiserror", + "time 0.3.24", +] + [[package]] name = "siphasher" version = "0.3.6" @@ -3239,9 +3335,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "snafu" -version = "0.6.10" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" +checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" dependencies = [ "backtrace", "doc-comment", @@ -3250,25 +3346,32 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.6.10" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" +checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" dependencies = [ + "heck 0.4.1", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] [[package]] name = "socket2" -version = "0.4.1" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "static_assertions" version = "1.1.0" @@ -3304,10 +3407,10 @@ version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7813934aecf5f51a54775e00068c237de98489463968231a51746bbbc03f9c10" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro-error", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3326,9 +3429,9 @@ version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -3356,7 +3459,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", "unicode-ident", ] @@ -3376,7 +3490,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e80b8831c5a543192ffc3727f01cf0e57579c6ac15558e3048bfb5708892167b" dependencies = [ "bincode", - "bitflags", + "bitflags 1.3.2", "flate2", "fnv", "lazy_static", @@ -3391,12 +3505,6 @@ dependencies = [ "yaml-rust", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "target-lexicon" version = "0.12.4" @@ -3478,22 +3586,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.26" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93119e4feac1cbe6c798c34d3a53ea0026b0b1de6a120deef895137c0529bfe2" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.26" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060d69a0afe7796bf42e9e2ff91f5ee691fb15c53d38b4b62a9a53eb23164745" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] @@ -3516,6 +3624,34 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b79eabcd964882a646b3584543ccabeae7869e9ac32a46f6f22b7a5bd405308b" +dependencies = [ + "deranged", + "itoa 1.0.9", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +dependencies = [ + "time-core", +] + [[package]] name = "tinyvec" version = "1.3.1" @@ -3533,33 +3669,43 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.10.0" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cf844b23c6131f624accf65ce0e4e9956a8bb329400ea5bcc26ae3a5c20b0b" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", - "memchr", "mio", "num_cpus", - "once_cell", "parking_lot", "pin-project-lite", "signal-hook-registry", + "socket2", "tokio-macros", - "winapi", + "windows-sys", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", ] [[package]] name = "tokio-macros" -version = "1.3.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", - "syn 1.0.109", + "quote 1.0.32", + "syn 2.0.27", ] [[package]] @@ -3572,11 +3718,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + [[package]] name = "tokio-stream" -version = "0.1.8" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -3585,16 +3741,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] @@ -3619,6 +3775,48 @@ dependencies = [ "walkdir", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +dependencies = [ + "bitflags 2.3.3", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.1" @@ -3627,22 +3825,35 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.26" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", + "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2 1.0.66", + "quote 1.0.32", + "syn 2.0.27", +] + [[package]] name = "tracing-core" -version = "0.1.18" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -3713,20 +3924,11 @@ dependencies = [ "unic-common", ] -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" -version = "0.3.6" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" @@ -3736,9 +3938,9 @@ checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] @@ -3777,28 +3979,24 @@ dependencies = [ "subtle", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" -version = "2.2.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna", - "matches", + "idna 0.4.0", "percent-encoding", "serde", ] -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.3", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -3871,6 +4069,12 @@ version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + [[package]] name = "wasm-bindgen" version = "0.2.75" @@ -3893,7 +4097,7 @@ dependencies = [ "lazy_static", "log", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", "wasm-bindgen-shared", ] @@ -3916,7 +4120,7 @@ version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "171ebf0ed9e1458810dfcb31f2e766ad6b3a89dbda42d8901f2b268277e5f09c" dependencies = [ - "quote 1.0.9", + "quote 1.0.32", "wasm-bindgen-macro-support", ] @@ -3927,7 +4131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c2657dd393f03aa2a659c25c6ae18a13a4048cebd220e147933ea837efc589f" dependencies = [ "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", @@ -4005,6 +4209,72 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winreg" version = "0.7.0" @@ -4014,12 +4284,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "xml-rs" version = "0.8.4" @@ -4066,7 +4330,7 @@ checksum = "a482c56029e48681b89b92b5db3c446db0915e8dd1052c0328a574eda38d5f93" dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] @@ -4098,6 +4362,6 @@ checksum = "e4ca5e22593eb4212382d60d26350065bf2a02c34b85bc850474a74b589a3de9" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2 1.0.66", - "quote 1.0.9", + "quote 1.0.32", "syn 1.0.109", ] diff --git a/rust/pyapi/Cargo.toml b/rust/pyapi/Cargo.toml index b612d304..1fe5910f 100644 --- a/rust/pyapi/Cargo.toml +++ b/rust/pyapi/Cargo.toml @@ -36,4 +36,4 @@ version = "0.19.1" features = ["extension-module", "num-bigint", "multiple-pymethods", "auto-initialize"] [build-dependencies] -built = "0.5.1" \ No newline at end of file +built = "0.5.2" \ No newline at end of file diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index 9163a2a5..5bb9d269 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -701,7 +701,7 @@ pub fn boot_users(py: Python) -> PyResult if let Some(r) = &ORIGEN_CONFIG.session__user_root { log_trace!("Setting user session root to {}", r); let mut users = om::users_mut(); - let mut sc = users.default_session_config_mut(); + let sc = users.default_session_config_mut(); sc.root = Some(PathBuf::from(r)); } diff --git a/rust/pyapi_metal/Cargo.lock b/rust/pyapi_metal/Cargo.lock index 112ffde0..204d2108 100644 --- a/rust/pyapi_metal/Cargo.lock +++ b/rust/pyapi_metal/Cargo.lock @@ -77,7 +77,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.6", + "getrandom", "once_cell", "version_check", ] @@ -118,13 +118,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.28", ] [[package]] @@ -154,6 +154,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" + [[package]] name = "bitflags" version = "1.3.2" @@ -161,16 +167,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "bitvec" -version = "0.19.6" +name = "bitflags" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" [[package]] name = "block-buffer" @@ -220,9 +220,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "built" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f346b6890a0dfa7266974910e7df2d5088120dd54721b9b0e5aae1ae5e05715" +checksum = "5b9c056b9ed43aee5e064b683aa1ec783e19c6acec7559e3ae931b7490472fbe" dependencies = [ "cargo-lock", ] @@ -247,9 +247,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cache-padded" @@ -259,9 +259,9 @@ checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" [[package]] name = "cargo-lock" -version = "7.1.0" +version = "8.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c408da54db4c50d4693f7e649c299bc9de9c23ead86249e5368830bb32a734b" +checksum = "031718ddb8f78aa5def78a09e90defe30151d1f6c672f937af4dd916429ed996" dependencies = [ "semver", "serde", @@ -300,7 +300,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time", + "time 0.1.44", "winapi", ] @@ -331,7 +331,7 @@ dependencies = [ "async-trait", "json5", "lazy_static", - "nom 7.1.1", + "nom", "pathdiff", "ron", "rust-ini", @@ -406,6 +406,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "deranged" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8810e7e2cf385b1e9b50d68264908ec367ba642c96d02edfe61c39e88e2a3c01" + [[package]] name = "derivative" version = "2.2.0" @@ -414,7 +420,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -468,6 +474,31 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "email-encoding" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbfb21b9878cf7a348dcb8559109aabc0ec40d69924bd706fa5149846c4fef75" +dependencies = [ + "base64 0.21.2", + "memchr", +] + +[[package]] +name = "email_address" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" +dependencies = [ + "serde", +] + [[package]] name = "encoding_rs" version = "0.8.31" @@ -485,7 +516,7 @@ checksum = "f16ef37b2a9b242295d61a154ee91ae884afff6b8b933b486b12481cc58310ca" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -499,7 +530,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn", + "syn 1.0.93", ] [[package]] @@ -530,7 +561,7 @@ checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -580,25 +611,18 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "matches", "percent-encoding", ] -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "futures" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -611,9 +635,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -621,15 +645,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -638,9 +662,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" @@ -659,32 +683,32 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.28", ] [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -717,17 +741,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.6" @@ -761,7 +774,7 @@ version = "0.13.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -791,7 +804,7 @@ dependencies = [ "indexmap", "slab", "tokio", - "tokio-util 0.7.1", + "tokio-util", "tracing", ] @@ -810,6 +823,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -863,15 +882,21 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" version = "1.7.1" @@ -908,6 +933,34 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" +dependencies = [ + "futures-util", + "http", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -922,28 +975,21 @@ dependencies = [ ] [[package]] -name = "hyperx" -version = "1.4.0" +name = "idna" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5617e92fc2f2501c3e2bc6ce547cad841adba2bae5b921c7e52510beca6d084c" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "base64", - "bytes", - "http", - "httpdate", - "language-tags", - "mime", - "percent-encoding", - "unicase", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "idna" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -1021,6 +1067,20 @@ dependencies = [ "serde", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.2", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "keyring" version = "1.1.2" @@ -1033,12 +1093,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "language-tags" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" - [[package]] name = "lazy_static" version = "1.4.0" @@ -1047,20 +1101,19 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lber" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a99b520993b21a6faab32643cf4726573dc18ca4cf2d48cbeb24d248c86c930" +checksum = "2df7f9fd9f64cf8f59e1a4a0753fe7d575a5b38d3d7ac5758dcee9357d83ef0a" dependencies = [ - "byteorder", "bytes", - "nom 2.2.1", + "nom", ] [[package]] name = "ldap3" -version = "0.9.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683c23f989ee30a01a605ca2f01d3e24cf06d611558edc6f9f7a0467293f01c" +checksum = "6dceb52eac140c8679326f619b963577ccf5a4ab025fe5e6db424d2fd3e4f400" dependencies = [ "async-trait", "bytes", @@ -1069,39 +1122,38 @@ dependencies = [ "lazy_static", "lber", "log", - "maplit", "native-tls", - "nom 2.2.1", + "nom", "percent-encoding", "thiserror", "tokio", "tokio-native-tls", "tokio-stream", - "tokio-util 0.6.9", + "tokio-util", "url", ] [[package]] name = "lettre" -version = "0.10.0-alpha.4" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc8c2fc7873920aca23647e5e86d44ff3f40bbc5a5efaab445c9eb0e001c9f71" +checksum = "76bd09637ae3ec7bd605b8e135e757980b3968430ff2b1a4a94fb7769e50166d" dependencies = [ - "base64", + "base64 0.21.2", + "email-encoding", + "email_address", + "fastrand", + "futures-util", "hostname", - "hyperx", - "idna", + "httpdate", + "idna 0.3.0", "mime", "native-tls", - "nom 6.1.2", + "nom", "once_cell", "quoted_printable", - "r2d2", - "rand 0.7.3", - "regex", - "serde", - "serde_json", - "uuid", + "socket2", + "tokio", ] [[package]] @@ -1187,12 +1239,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "memchr" version = "2.5.0" @@ -1231,21 +1277,21 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.3" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] name = "native-tls" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -1275,31 +1321,13 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cc", "cfg-if 0.1.10", "libc", "void", ] -[[package]] -name = "nom" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf51a729ecf40266a2368ad335a5fdde43471f545a967109cd62146ecf8b66ff" - -[[package]] -name = "nom" -version = "6.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" -dependencies = [ - "bitvec", - "funty", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.1" @@ -1419,30 +1447,46 @@ dependencies = [ [[package]] name = "octocrab" -version = "0.9.1" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c564a454a4124b45eb0170398624efcc75783b079034e7af13202575580e1db5" +checksum = "0943920a77d028b66ebe4407813733ad4d0ebe7b12dafd608ddec8478e5fef0b" dependencies = [ "arc-swap", "async-trait", - "base64", + "base64 0.21.2", "bytes", + "cfg-if 1.0.0", "chrono", - "hyperx", + "either", + "futures", + "futures-util", + "http", + "http-body", + "hyper", + "hyper-rustls", + "hyper-timeout", + "jsonwebtoken", "once_cell", - "reqwest", + "percent-encoding", + "pin-project", + "secrecy", "serde", "serde_json", "serde_path_to_error", + "serde_urlencoded", "snafu", + "tokio", + "tower", + "tower-http", + "tracing", "url", ] [[package]] name = "once_cell" -version = "1.10.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -1462,7 +1506,7 @@ version = "0.10.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -1479,7 +1523,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -1531,6 +1575,7 @@ dependencies = [ "chrono", "config", "dirs", + "email_address", "enum-display-derive", "enum-utils", "git2", @@ -1546,7 +1591,7 @@ dependencies = [ "pest", "pest_derive", "pyo3", - "rand 0.8.5", + "rand", "regex", "reqwest", "rpassword", @@ -1557,7 +1602,7 @@ dependencies = [ "shellexpand", "tempfile", "termcolor", - "time", + "time 0.1.44", "toml", "wait-timeout", "whoami", @@ -1600,11 +1645,20 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.0", +] + [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" @@ -1635,7 +1689,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -1649,6 +1703,26 @@ dependencies = [ "sha-1", ] +[[package]] +name = "pin-project" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.28", +] + [[package]] name = "pin-project-lite" version = "0.2.9" @@ -1718,11 +1792,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.38" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9027b48e9d4c9175fa2218adf3557f91c1137021739951d4932f5f8268ac48aa" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1786,7 +1860,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -1797,53 +1871,23 @@ checksum = "e0b78ccbb160db1556cdb6fd96c50334c5d4ec44dc5e0a968d0a1208fa0efa8b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] name = "quote" -version = "1.0.18" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] [[package]] name = "quoted_printable" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fee2dce59f7a43418e3382c766554c614e06a552d53a8f07ef499ea4b332c0f" - -[[package]] -name = "r2d2" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" -dependencies = [ - "log", - "parking_lot", - "scheduled-thread-pool", -] - -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] +checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" [[package]] name = "rand" @@ -1852,18 +1896,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -1873,16 +1907,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -1891,16 +1916,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.6", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -1909,7 +1925,7 @@ version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1918,7 +1934,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.6", + "getrandom", "redox_syscall", "thiserror", ] @@ -1955,7 +1971,7 @@ version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a1f7aa4f35e5e8b4160449f51afc758f0ce6454315a9fa7d0d113e958c41eb" dependencies = [ - "base64", + "base64 0.13.0", "bytes", "encoding_rs", "futures-core", @@ -1985,14 +2001,29 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + [[package]] name = "ron" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b861ecaade43ac97886a512b360d01d66be9f41f3c61088b42cedf92e03d678" dependencies = [ - "base64", - "bitflags", + "base64 0.13.0", + "bitflags 1.3.2", "serde", ] @@ -2022,6 +2053,49 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +[[package]] +name = "rustls" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79ea77c539259495ce8ca47f53e66ae0330a8819f67e23ac96ca02f50e7b7d36" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +dependencies = [ + "base64 0.21.2", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513722fd73ad80a71f72b61009ea1b584bcfa1483ca93949c8f290298837fa59" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "ryu" version = "1.0.9" @@ -2038,15 +2112,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "scheduled-thread-pool" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" -dependencies = [ - "parking_lot", -] - [[package]] name = "scoped-tls" version = "1.0.0" @@ -2059,6 +2124,25 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "secrecy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +dependencies = [ + "zeroize", +] + [[package]] name = "secret-service" version = "2.0.1" @@ -2070,7 +2154,7 @@ dependencies = [ "hkdf", "lazy_static", "num", - "rand 0.8.5", + "rand", "serde", "sha2", "zbus", @@ -2085,7 +2169,7 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -2141,7 +2225,7 @@ checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2152,7 +2236,7 @@ checksum = "1dbab34ca63057a1f15280bdf3c39f2b1eb1b54c17e98360e511637aef7418c6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2183,7 +2267,7 @@ checksum = "a2ad84e47328a31223de7fed7a4f5087f2d6ddfe586cf3ca25b7a165bc0a5aed" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2232,6 +2316,18 @@ dependencies = [ "dirs", ] +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.3", + "num-traits", + "thiserror", + "time 0.3.24", +] + [[package]] name = "slab" version = "0.4.6" @@ -2246,9 +2342,9 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "snafu" -version = "0.6.10" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" +checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" dependencies = [ "backtrace", "doc-comment", @@ -2257,13 +2353,14 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.6.10" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" +checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" dependencies = [ + "heck", "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2276,6 +2373,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "static_assertions" version = "1.1.0" @@ -2300,10 +2403,15 @@ dependencies = [ ] [[package]] -name = "tap" -version = "1.0.1" +name = "syn" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] [[package]] name = "target-lexicon" @@ -2336,22 +2444,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.28", ] [[package]] @@ -2365,6 +2473,34 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b79eabcd964882a646b3584543ccabeae7869e9ac32a46f6f22b7a5bd405308b" +dependencies = [ + "deranged", + "itoa", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +dependencies = [ + "time-core", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2382,20 +2518,30 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.18.2" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ + "autocfg", "bytes", "libc", "memchr", "mio", "num_cpus", - "once_cell", "pin-project-lite", "socket2", "tokio-macros", - "winapi", + "windows-sys 0.45.0", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", ] [[package]] @@ -2406,7 +2552,7 @@ checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] [[package]] @@ -2420,35 +2566,31 @@ dependencies = [ ] [[package]] -name = "tokio-stream" -version = "0.1.8" +name = "tokio-rustls" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "futures-core", - "pin-project-lite", + "rustls", "tokio", ] [[package]] -name = "tokio-util" -version = "0.6.9" +name = "tokio-stream" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ - "bytes", "futures-core", - "futures-sink", - "log", "pin-project-lite", "tokio", ] [[package]] name = "tokio-util" -version = "0.7.1" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -2467,6 +2609,48 @@ dependencies = [ "serde", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" +dependencies = [ + "bitflags 2.3.3", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.1" @@ -2475,11 +2659,12 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.34" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0ecdcb44a79f0fe9844f0c4f33a342cbcbb5117de8001e6ba0dc2351327d09" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2487,22 +2672,22 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.21" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.28", ] [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -2524,25 +2709,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] -name = "unicase" -version = "2.6.0" +name = "unicode-bidi" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] -name = "unicode-bidi" -version = "0.3.8" +name = "unicode-ident" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] @@ -2569,28 +2751,24 @@ dependencies = [ "subtle", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "url" -version = "2.2.2" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", - "idna", - "matches", + "idna 0.4.0", "percent-encoding", "serde", ] -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.6", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -2634,12 +2812,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" @@ -2673,7 +2845,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn", + "syn 1.0.93", "wasm-bindgen-shared", ] @@ -2707,7 +2879,7 @@ checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.93", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2780,46 +2952,135 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-targets" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winreg" @@ -2830,12 +3091,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "yaml-rust" version = "0.4.5" @@ -2877,9 +3132,15 @@ dependencies = [ "proc-macro-crate 0.1.5", "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] +[[package]] +name = "zeroize" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" + [[package]] name = "zvariant" version = "2.10.0" @@ -2903,5 +3164,5 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn", + "syn 1.0.93", ] diff --git a/rust/pyapi_metal/Cargo.toml b/rust/pyapi_metal/Cargo.toml index ceb049fa..1398f659 100644 --- a/rust/pyapi_metal/Cargo.toml +++ b/rust/pyapi_metal/Cargo.toml @@ -27,7 +27,7 @@ version = "0.19.1" features = ["extension-module", "num-bigint"] [build-dependencies] -built = "0.5.1" +built = "0.5.2" [package.metadata.maturin] name = "origen_metal._origen_metal" diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index 56f9b453..b0ebecbb 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -34,7 +34,7 @@ class T_InvocationBaseTests(CLI): PyProjectSrc = PyProjectSrc @classmethod - def setup(cls): + def setup_method(cls): cls.set_params() if cls.target_pyproj_dir: cls.target_pyproj_toml = cls.target_pyproj_dir.joinpath(toml) @@ -85,7 +85,7 @@ def test_cli_location(self): class T_InvocationEnv(T_InvocationBaseTests): @classmethod def setup_method(cls): - super().setup() + super().setup_method() # cls.set_params() if cls.target_pyproj_dir: cls._pyproj_src_file = cls.gen_pyproj() diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index a7beea1e..fc846c89 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -48,7 +48,7 @@ def set_params(cls): @classmethod def setup_method(cls): - super().setup() + super().setup_method() os.environ["ORIGEN_PYPROJECT"] = str(cls.invalid_install_dir) @classmethod @@ -81,7 +81,7 @@ def set_params(cls): @classmethod def setup_method(cls): - super().setup() + super().setup_method() os.environ["ORIGEN_PYPROJECT"] = str(cls.missing_pyproject) @classmethod From 8cabaddd37134d1691b751a5aef26578db8730fe Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sat, 5 Aug 2023 11:12:11 -0400 Subject: [PATCH 104/200] Support stable rust --- rust/origen/Cargo.lock | 4 +++ rust/origen/src/lib.rs | 1 - rust/origen/src/testers/smt/v93k/smt7/mod.rs | 8 ++--- rust/origen/src/testers/vector_based/mod.rs | 34 +++++++++---------- .../origen_metal/src/utils/mailer/maillist.rs | 2 +- rust/pyapi/Cargo.lock | 4 +++ 6 files changed, 29 insertions(+), 24 deletions(-) diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index fed20970..764f0407 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -953,6 +953,9 @@ name = "email_address" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" +dependencies = [ + "serde", +] [[package]] name = "encode_unicode" @@ -2597,6 +2600,7 @@ dependencies = [ "chrono", "config", "dirs 2.0.2", + "email_address", "enum-display-derive", "enum-utils", "git2", diff --git a/rust/origen/src/lib.rs b/rust/origen/src/lib.rs index 118147fd..25ef6079 100644 --- a/rust/origen/src/lib.rs +++ b/rust/origen/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(specialization)] #![allow(incomplete_features)] #[macro_use] extern crate lazy_static; diff --git a/rust/origen/src/testers/smt/v93k/smt7/mod.rs b/rust/origen/src/testers/smt/v93k/smt7/mod.rs index 4a43e8a1..66b9270e 100644 --- a/rust/origen/src/testers/smt/v93k/smt7/mod.rs +++ b/rust/origen/src/testers/smt/v93k/smt7/mod.rs @@ -1,4 +1,4 @@ -use crate::core::tester::{Interceptor, TesterAPI, TesterID}; +use crate::core::tester::{Interceptor, TesterID}; use crate::generator::PAT; use crate::prog_gen::Model; use crate::testers::vector_based::pattern_renderer::Renderer; @@ -95,12 +95,10 @@ impl VectorBased for SMT7 { _ => None, } } -} - -impl Interceptor for SMT7 {} -impl TesterAPI for SMT7 { fn render_program(&mut self) -> crate::Result<(Vec, Model)> { crate::prog_gen::advantest::smt7::render_test_program(&self) } } + +impl Interceptor for SMT7 {} diff --git a/rust/origen/src/testers/vector_based/mod.rs b/rust/origen/src/testers/vector_based/mod.rs index 654565cc..c06d97e2 100644 --- a/rust/origen/src/testers/vector_based/mod.rs +++ b/rust/origen/src/testers/vector_based/mod.rs @@ -65,21 +65,26 @@ pub trait VectorBased: label.as_ref().unwrap_or(&"".to_string()) ))) } + + fn render_program(&mut self) -> crate::Result<(Vec, Model)> { + log_debug!("Tester '{}' does not implement render_program", &self.id()); + Ok((vec![], Model::new(self.id()))) + } } impl pattern_renderer::RendererAPI for T where T: VectorBased, { - default fn file_ext(&self) -> &str { + fn file_ext(&self) -> &str { VectorBased::file_ext(self) } - default fn comment_str(&self) -> &str { + fn comment_str(&self) -> &str { VectorBased::comment_str(self) } - default fn print_vector( + fn print_vector( &self, renderer: &mut pattern_renderer::Renderer, repeat: u32, @@ -88,21 +93,21 @@ where VectorBased::print_vector(self, renderer, repeat, compressable) } - default fn print_pinlist( + fn print_pinlist( &self, renderer: &mut pattern_renderer::Renderer, ) -> Option> { VectorBased::print_pinlist(self, renderer) } - default fn print_pattern_end( + fn print_pattern_end( &self, renderer: &mut pattern_renderer::Renderer, ) -> Option> { VectorBased::print_pattern_end(self, renderer) } - default fn start_overlay( + fn start_overlay( &self, renderer: &mut pattern_renderer::Renderer, overlay: &Overlay, @@ -110,7 +115,7 @@ where VectorBased::start_overlay(self, renderer, overlay) } - default fn end_overlay( + fn end_overlay( &self, renderer: &mut pattern_renderer::Renderer, label: &Option, @@ -132,32 +137,27 @@ impl TesterAPI for T where T: VectorBased, { - default fn render_pattern(&mut self, node: &Node) -> Result> { + fn render_pattern(&mut self, node: &Node) -> Result> { pattern_renderer::Renderer::run(self, node) } - default fn pattern_differ(&self, pat_a: &Path, pat_b: &Path) -> Option> { + fn pattern_differ(&self, pat_a: &Path, pat_b: &Path) -> Option> { let mut d = ASCIIDiffer::new(pat_a, pat_b); let _ = d.ignore_comments(self.comment_str()); Some(Box::new(d)) } - default fn program_differ(&self, pat_a: &Path, pat_b: &Path) -> Option> { + fn program_differ(&self, pat_a: &Path, pat_b: &Path) -> Option> { let mut d = ASCIIDiffer::new(pat_a, pat_b); let _ = d.ignore_comments(self.comment_str()); Some(Box::new(d)) } - default fn pin_action_resolver(&self) -> Option { + fn pin_action_resolver(&self) -> Option { VectorBased::pin_action_resolver(self) } - default fn render_program(&mut self) -> crate::Result<(Vec, Model)> { - log_debug!("Tester '{}' does not implement render_program", &self.id()); - Ok((vec![], Model::new(self.id()))) - } - - default fn output_dir(&self) -> Result { + fn output_dir(&self) -> Result { let dir = crate::STATUS.output_dir().join(&self.name().to_lowercase()); if !dir.exists() { std::fs::create_dir_all(&dir)?; diff --git a/rust/origen_metal/src/utils/mailer/maillist.rs b/rust/origen_metal/src/utils/mailer/maillist.rs index 471c0e6e..e7179bd4 100644 --- a/rust/origen_metal/src/utils/mailer/maillist.rs +++ b/rust/origen_metal/src/utils/mailer/maillist.rs @@ -232,7 +232,7 @@ impl Maillist { } } use std::str::FromStr; - let em = email_address::EmailAddress::from_str(&email_str)?; + let _em = email_address::EmailAddress::from_str(&email_str)?; retn.push(email_str.parse()?); } Ok(retn) diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index 33212cc7..e9ab3f5e 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -799,6 +799,9 @@ name = "email_address" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" +dependencies = [ + "serde", +] [[package]] name = "encode_unicode" @@ -2226,6 +2229,7 @@ dependencies = [ "chrono", "config", "dirs 2.0.2", + "email_address", "enum-display-derive", "enum-utils", "git2", From e897f1f4ef180f79fd84580b92fc2d3c8b9ae92a Mon Sep 17 00:00:00 2001 From: origen Date: Wed, 18 Oct 2023 08:00:57 -0500 Subject: [PATCH 105/200] Support generating a new workspace (not full app, just workspace). Some robustness updates for launching windows commands. --- .../origen/helpers/regressions/cli/origen.py | 10 +- rust/origen/Cargo.lock | 2 +- rust/origen/cli/Cargo.toml | 1 - rust/origen/cli/src/bin.rs | 19 +- rust/origen/cli/src/commands/_prelude/mod.rs | 1 + rust/origen/cli/src/commands/mod.rs | 2 +- rust/origen/cli/src/commands/new/mod.rs | 214 ++++++++++-------- .../commands/new/templates/shared/.gitignore | 29 +++ .../new/templates/shared/origen.toml.tera | 14 ++ .../new/templates/shared/pyproject.toml.tera | 16 ++ .../new/templates/workspace/.gitignore.tera | 1 + .../new/templates/workspace/origen.toml.tera | 1 + .../templates/workspace/pyproject.toml.tera | 1 + .../cli/src/framework/cmd_gen_helpers.rs | 26 +++ rust/origen/cli/src/framework/mod.rs | 1 + rust/origen/cli/src/framework/plugins.rs | 13 +- rust/origen/cli/src/python.rs | 15 +- rust/origen_metal/Cargo.toml | 1 + rust/origen_metal/src/error.rs | 6 + rust/origen_metal/src/lib.rs | 1 + rust/origen_metal/src/utils/command.rs | 13 ++ 21 files changed, 267 insertions(+), 120 deletions(-) create mode 100644 rust/origen/cli/src/commands/new/templates/shared/.gitignore create mode 100644 rust/origen/cli/src/commands/new/templates/shared/origen.toml.tera create mode 100644 rust/origen/cli/src/commands/new/templates/shared/pyproject.toml.tera create mode 100644 rust/origen/cli/src/commands/new/templates/workspace/.gitignore.tera create mode 100644 rust/origen/cli/src/commands/new/templates/workspace/origen.toml.tera create mode 100644 rust/origen/cli/src/commands/new/templates/workspace/pyproject.toml.tera create mode 100644 rust/origen/cli/src/framework/cmd_gen_helpers.rs diff --git a/python/origen/origen/helpers/regressions/cli/origen.py b/python/origen/origen/helpers/regressions/cli/origen.py index 07de3869..ff812646 100644 --- a/python/origen/origen/helpers/regressions/cli/origen.py +++ b/python/origen/origen/helpers/regressions/cli/origen.py @@ -226,7 +226,10 @@ class Names: pls = _CommonNames.pls_cmd() pl = _CommonNames.pl_cmd() # proj = Cmd(names.proj) - # new = Cmd(names.new) + new = Cmd( + names.new, + help="Create a new origen environment (e.g., app, workspace)", + ) creds = _CommonNames.creds_cmd() i = _CommonNames.interactive_cmd() # fmt = Cmd(names.fmt) @@ -234,9 +237,8 @@ class Names: v = _CommonNames.v_cmd() commands = [ - # proj, new, creds, eval, exec, i, - # pls, pl, aux_cmds, fmt, build - creds, eval, exec, i, + # proj, fmt, build + creds, eval, exec, i, new, pls, pl, aux_cmds, ] cmds = commands diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index 764f0407..1ec8d2a3 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -511,7 +511,6 @@ dependencies = [ "sha2", "tar", "tempfile", - "tera", "time 0.1.44", "toml", "walkdir", @@ -2626,6 +2625,7 @@ dependencies = [ "serde_json", "shellexpand", "tempfile", + "tera", "termcolor", "time 0.1.44", "toml", diff --git a/rust/origen/cli/Cargo.toml b/rust/origen/cli/Cargo.toml index 3e9606b7..e526f8b9 100644 --- a/rust/origen/cli/Cargo.toml +++ b/rust/origen/cli/Cargo.toml @@ -24,7 +24,6 @@ lazy_static = "1.4.0" regex = "1" toml = "0.5" serde = {version = "1.0", features = ["derive"]} -tera = "1" indexmap = {version = "1.3.0", features = ["serde-1"]} flate2 = "1.0" tempfile = "3" diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index ae4ff1f5..f3b888c2 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -228,8 +228,17 @@ fn main() -> Result<()> { let plugins = match Plugins::new(&mut extensions) { Ok(pl) => pl, Err(e) => { - log_error!("Failed to collect plugins. Encountered error: {}", e); - None + if python::is_backend_origen_mod_missing_err(&e) { + // _origen is available but plugins failed to load + log_error!("Failed to collect plugins. Encountered error: {}", e); + None + } else { + // _origen isn't available. This could be an error is retrieving plugins. + // Print a warning instead of error, while logging the error + log_trace!("Failed to collect plugins. Encountered error: {}", e); + log_warning!("Failed to collect plugins: _origen module missing"); + None + } } }; let aux_cmds = AuxCmds::new(&mut extensions)?; @@ -428,6 +437,8 @@ fn main() -> Result<()> { commands::env::add_helps(&mut helps); commands::generate::add_helps(&mut helps); commands::target::add_helps(&mut helps); + } else { + commands::new::add_helps(&mut helps); } if STATUS.is_origen_present { @@ -789,6 +800,8 @@ fn main() -> Result<()> { // .help("Update all CHANGED file references from the last generate run"), // ), // ); + } else { + app = commands::new::add_commands(app, &helps, &extensions)?; } let mut all_cmds_and_aliases = vec![]; @@ -1021,7 +1034,7 @@ fn main() -> Result<()> { match matches.subcommand_name() { Some(commands::app::BASE_CMD) => commands::app::run(matches.subcommand_matches(commands::app::BASE_CMD).unwrap(), &app, &extensions, plugins.as_ref(), &app_cmds.as_ref().unwrap())?, - // Some("new") => commands::new::run(matches.subcommand_matches("new").unwrap()), + Some(commands::new::BASE_CMD) => run_non_ext_cmd_match_case!(new), // Some("proj") => commands::proj::run(matches.subcommand_matches("proj").unwrap()), Some(commands::env::BASE_CMD) => run_non_ext_cmd_match_case!(env), Some(commands::eval::BASE_CMD) => run_cmd_match_case!(eval), diff --git a/rust/origen/cli/src/commands/_prelude/mod.rs b/rust/origen/cli/src/commands/_prelude/mod.rs index 55584813..ee9a17de 100644 --- a/rust/origen/cli/src/commands/_prelude/mod.rs +++ b/rust/origen/cli/src/commands/_prelude/mod.rs @@ -10,6 +10,7 @@ pub use crate::framework::{ }; pub use crate::framework::core_cmds::SubCmd; pub use crate::{output_dir_opt, ref_dir_opt}; +pub use crate::{req_sv_arg, sv_opt}; // TODO clap4.0 remove after update to next clap version pub type RunInput<'a> = &'a clap::ArgMatches; diff --git a/rust/origen/cli/src/commands/mod.rs b/rust/origen/cli/src/commands/mod.rs index 5685a8a4..2f487e46 100644 --- a/rust/origen/cli/src/commands/mod.rs +++ b/rust/origen/cli/src/commands/mod.rs @@ -4,7 +4,7 @@ pub mod exec; // pub mod fmt; pub mod interactive; // pub mod mode; -// pub mod new; +pub mod new; // pub mod proj; // pub mod save_ref; pub mod target; diff --git a/rust/origen/cli/src/commands/new/mod.rs b/rust/origen/cli/src/commands/new/mod.rs index 7fbf2f0e..4a14b3cc 100644 --- a/rust/origen/cli/src/commands/new/mod.rs +++ b/rust/origen/cli/src/commands/new/mod.rs @@ -1,14 +1,16 @@ -// This implements the new application command, for the code generators, e.g. 'origen new dut' etc., -// see new_resource.rs +use crate::commands::_prelude::*; +use origen_metal::tera::{Context, Tera}; +use std::process::exit; +use std::env; +use std::fs::{create_dir, File}; +use std::path::PathBuf; +use crate::_generated::python::PYTHONS; -mod new_resource; +pub const BASE_CMD: &'static str = "new"; +pub const WS_CMD: &'static str = "workspace"; +pub const APP_CMD: &'static str = "application"; -use clap::ArgMatches; -use origen::STATUS; -use phf::map::Map; use phf::phf_map; -use std::path::PathBuf; -use tera::{Context, Tera}; // This includes a map of all template files, it is built by cli/build.rs at compile time. // All files in each sub-directory of commands/new/templates are accessible via a map named after the @@ -19,102 +21,116 @@ use tera::{Context, Tera}; // automatically be picked up and included in the new app. include!(concat!(env!("OUT_DIR"), "/new_app_templates.rs")); -struct App { - name: String, - dir: PathBuf, -} - -pub fn run(matches: &ArgMatches) { - if STATUS.is_app_present { - new_resource::run(matches); - return; - } - let name = matches.get_one::<&str>("name").unwrap(); - if &name.to_lowercase() != name { - display_red!("ERROR: "); - displayln!("The application name must be lowercased"); - std::process::exit(1); - } - let app_dir = std::env::current_dir().unwrap().join(name); - - if app_dir.exists() { - if !app_dir.read_dir().unwrap().next().is_none() { - display_red!("ERROR: "); - displayln!("A directory with that name already exists and is not empty, please delete it or use a new name and try again"); - std::process::exit(1); - } - } else { - std::fs::create_dir(&app_dir) - .expect("Could you create the new application directory, do you have permission?"); - } +gen_core_cmd_funcs__no_exts__no_app_opts!( + BASE_CMD, + "Create a new origen environment (e.g., app, workspace)", + { |cmd: App<'a>| { + cmd.arg_required_else_help(true) + }}, + core_subcmd__no_exts__no_app_opts!(WS_CMD, "Create a new workspace", { |cmd: App| { + cmd.visible_alias("ws") + .arg(req_sv_arg!("name", "NAME", "Workspace name")) + .arg(sv_opt!("desc", "DESC", "Description of the workspace").visible_alias("description")) + .arg(sv_opt!("path", "PATH", "Path to build the new workspace").short('p')) + }}) + // TODO origen new - support new app + // core_subcmd__no_exts__no_app_opts!(APP_CMD, "Create a new application", { |cmd: App| { + // cmd.visible_alias("app") + // }}) +); + +pub fn run(invocation: &clap::ArgMatches) -> origen::Result<()> { + if let Some((n, subcmd)) = invocation.subcommand() { + match n { + WS_CMD => { + let mut tera = match Tera::new("templates/workspace/*.tera") { + Ok(t) => t, + Err(e) => { + println!("Failed to parse workspace templates: {}", e); + exit(1); + } + }; + let mut context = Context::new(); + let name = subcmd.get_one::("name").unwrap(); + + let mut out_dir; + if let Some(p) = subcmd.get_one::("path") { + if p.is_relative() { + out_dir = env::current_dir()?; + out_dir.push(p); + } else { + out_dir = p.to_path_buf(); + } + } else { + out_dir = env::current_dir()?; + out_dir.push(&name); + } - let mut context = Context::new(); - //// Converting this to a vector here as the template was printing out the package list - //// in reverse order when given the index map - //let packages: Vec<&Package> = bom.packages.iter().map(|(_id, pkg)| pkg).collect(); - context.insert("app_name", name); - context.insert("origen_version", &origen::STATUS.origen_version.to_string()); - let mut user_info = "".to_string(); - let users = crate::om::users(); - if let Ok(u) = users.current_user() { - if let Ok(username) = u.username() { - user_info += &username; - match u.get_email() { - Ok(e) => { - if let Some(email) = e { - user_info += &format!(" <{}>", &email); + if out_dir.exists() { + // Check directory is empty + if !out_dir.read_dir()?.next().is_none() { + log_error!("Target directory {} is not empty!", &out_dir.display()); + exit(1); } + } else { + create_dir(&out_dir)?; } - Err(e) => { - display_redln!("{}", e.msg); + println!("Creating new workspace at {}", &out_dir.display()); + + context.insert("name", name); + context.insert("desc", subcmd.get_one::("desc").unwrap_or(&"".to_string())); + context.insert("app_gen", &false); + + let users = origen_metal::users(); + let mut author = "".to_string(); + context.insert("python_version", &format!( + ">={},<={}", + PYTHONS[2].strip_prefix("python").unwrap(), + PYTHONS.last().unwrap().strip_prefix("python").unwrap() + )); + if let Ok(u) = users.current_user() { + match u.username() { + Ok(username) => { + match u.get_email() { + Ok(e) => { + if let Some(email) = e { + author += &format!("{} <{}>", &username, &email); + } + } + Err(e) => { + log_warning!("Cannot retrieve current user's email: {}", e.msg); + } + } + }, + Err(e) => { + log_warning!("Cannot retrieve current user: {}", e.msg); + } + } + } else { + log_warning!("Cannot populate current user"); } - } - } - } - context.insert("user_info", &user_info); + context.insert("author", &author); + context.insert("origen_version", &origen::STATUS.origen_version.to_string()); + // TODO origen new - find a better way than hard-coding pytest version + context.insert("pytest_version", "^7"); - let new_app = App { - name: name.to_string(), - dir: app_dir, - }; - - new_app.apply_template(&PY_APP, &context); - - if !matches.contains_id("no-setup") { - new_app.setup(); - } -} - -impl App { - fn apply_template(&self, template: &Map<&str, &str>, context: &Context) { - let mut tera = Tera::default(); - - for (file, content) in template.entries() { - let contents = tera.render_str(content, &context).unwrap(); - - let file = file.replace("app_namespace_dir", &self.name); - let path = self.dir.join(file.clone()); - - if !path.parent().unwrap().exists() { - std::fs::create_dir_all(&path.parent().unwrap()) - .expect("Couldn't create dir within the new app"); - } - - display_green!(" create "); - displayln!("{}", &file); + for (n, contents) in SHARED.entries() { + tera.add_raw_template(&format!("shared/{}", n), contents)?; + } + for (n, contents) in WORKSPACE.entries() { + tera.add_raw_template(&format!("workspace/{}", n), contents)?; + } - std::fs::write(&path, &contents).expect("Couldn't create a file within the new app"); + for (n, _) in WORKSPACE.entries() { + let f = File::create(out_dir.join(n))?; + tera.render_to(&format!("workspace/{}", n), &context, f)?; + } + Ok(()) + }, + APP_CMD => todo!(), // TODO origen enw - support new app + _ => unreachable_invalid_subc!(n) } + } else { + unreachable!() } - - fn setup(&self) { - std::env::set_current_dir(&self.dir).expect("Couldn't cd to the new app"); - - let _ = std::process::Command::new("origen") - .arg("env") - .arg("setup") - .spawn() - .expect("Couldn't execute origen setup") - .wait(); - } -} +} \ No newline at end of file diff --git a/rust/origen/cli/src/commands/new/templates/shared/.gitignore b/rust/origen/cli/src/commands/new/templates/shared/.gitignore new file mode 100644 index 00000000..e54bd4e1 --- /dev/null +++ b/rust/origen/cli/src/commands/new/templates/shared/.gitignore @@ -0,0 +1,29 @@ +# Workspace directories +/.origen +/tmp +/.ref +/log +/.session + +# Output directories +/output +/web/source/_static/build +/web/source/interbuild +/dist + +{% if app_gen -%} +# Release scribe dry-run output and release notes +config/history.generated.dry_run.toml +release_note.txt +{% endif -%} + +# Cache directories +__pycache__ +.pytest_cache + +# Editor cruft +*.swp +*.swo +*~ +*.pylintrc +.vscode \ No newline at end of file diff --git a/rust/origen/cli/src/commands/new/templates/shared/origen.toml.tera b/rust/origen/cli/src/commands/new/templates/shared/origen.toml.tera new file mode 100644 index 00000000..eee0cdec --- /dev/null +++ b/rust/origen/cli/src/commands/new/templates/shared/origen.toml.tera @@ -0,0 +1,14 @@ +# Use this to define your application-specific Origen configuration +# Do not delete it even if you don't use it since it is also used by the Origen +# command line interface to determine when it is in an Origen application workspace + +# Specify what command should be used to invoke python, if not specified +# Origen will try python, python3, python3.8, etc. until one is found that +# satisfies the minimum Python version requirement +#python_cmd = "mypython" + +# If your company has an internal package server enter it here: +#pkg_server = "https://pkgs.company.net:9292" +# or here, if you need to use different urls for push and pull (write and read): +#pkg_server_push = "https://pkgs.company.net:9292" +#pkg_server_pull = "https://pkgs.company.net:9292" \ No newline at end of file diff --git a/rust/origen/cli/src/commands/new/templates/shared/pyproject.toml.tera b/rust/origen/cli/src/commands/new/templates/shared/pyproject.toml.tera new file mode 100644 index 00000000..3b54596a --- /dev/null +++ b/rust/origen/cli/src/commands/new/templates/shared/pyproject.toml.tera @@ -0,0 +1,16 @@ +[tool.poetry] +name = "{{name}}" +version = "0.1.0" +description = "{{desc}}" +authors = ["{{author}}"] + +[tool.poetry.dependencies] +python = "{{python_version}}" +origen = "{{origen_version}}" + +[tool.poetry.dev-dependencies] +pytest = "{{pytest_version}}" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" \ No newline at end of file diff --git a/rust/origen/cli/src/commands/new/templates/workspace/.gitignore.tera b/rust/origen/cli/src/commands/new/templates/workspace/.gitignore.tera new file mode 100644 index 00000000..4f7b7da8 --- /dev/null +++ b/rust/origen/cli/src/commands/new/templates/workspace/.gitignore.tera @@ -0,0 +1 @@ +{% extends "shared/.gitignore" %} \ No newline at end of file diff --git a/rust/origen/cli/src/commands/new/templates/workspace/origen.toml.tera b/rust/origen/cli/src/commands/new/templates/workspace/origen.toml.tera new file mode 100644 index 00000000..290d0f81 --- /dev/null +++ b/rust/origen/cli/src/commands/new/templates/workspace/origen.toml.tera @@ -0,0 +1 @@ +{% extends "shared/origen.toml" %} \ No newline at end of file diff --git a/rust/origen/cli/src/commands/new/templates/workspace/pyproject.toml.tera b/rust/origen/cli/src/commands/new/templates/workspace/pyproject.toml.tera new file mode 100644 index 00000000..c8818d8b --- /dev/null +++ b/rust/origen/cli/src/commands/new/templates/workspace/pyproject.toml.tera @@ -0,0 +1 @@ +{% extends "shared/pyproject.toml" %} \ No newline at end of file diff --git a/rust/origen/cli/src/framework/cmd_gen_helpers.rs b/rust/origen/cli/src/framework/cmd_gen_helpers.rs new file mode 100644 index 00000000..ebbf6a50 --- /dev/null +++ b/rust/origen/cli/src/framework/cmd_gen_helpers.rs @@ -0,0 +1,26 @@ +/// Generate a required, single-value arg +#[macro_export] +macro_rules! req_sv_arg { + ($name: expr, $value_name: expr, $help: expr) => {{ + clap::Arg::new($name) + .help($help) + .action(crate::commands::_prelude::clap_arg_actions::SetArg) + .value_name($value_name) + .multiple(false) + .required(true) + }} +} + +/// Generate an optional, single-value option +#[macro_export] +macro_rules! sv_opt { + ($name: expr, $value_name: expr, $help: expr) => {{ + clap::Arg::new($name) + .long($name) + .help($help) + .action(crate::commands::_prelude::clap_arg_actions::SetArg) + .value_name($value_name) + .multiple(false) + .required(false) + }} +} \ No newline at end of file diff --git a/rust/origen/cli/src/framework/mod.rs b/rust/origen/cli/src/framework/mod.rs index 51df3d90..be694f1d 100644 --- a/rust/origen/cli/src/framework/mod.rs +++ b/rust/origen/cli/src/framework/mod.rs @@ -4,6 +4,7 @@ pub mod plugins; pub mod aux_cmds; pub mod app_cmds; pub mod core_cmds; +pub mod cmd_gen_helpers; use std::collections::HashMap; use origen_metal::indexmap::IndexMap; diff --git a/rust/origen/cli/src/framework/plugins.rs b/rust/origen/cli/src/framework/plugins.rs index d605cf9c..f6278130 100644 --- a/rust/origen/cli/src/framework/plugins.rs +++ b/rust/origen/cli/src/framework/plugins.rs @@ -64,21 +64,22 @@ impl Plugins { slf.plugins.insert(name.to_string(), pl); }, Err(e) => { - log_error!("{}", e); - log_error!("Unable to collect plugin {}", path); + log_trace!("Error collecting plugins: Unable to collect plugin {}: {}", path, e); } } } else { - log_error!("Malformed output when collecting plugin roots (post status): {}", result) + log_trace!("Error collecting plugins: Malformed output when collecting plugin roots (post status): {}", result) } }, - _ => log_error!("Unknown status when collecting plugin roots: {}", status) + _ => log_trace!("Error collecting plugins: Unknown status when collecting plugin roots: {}", status) } } else { - log_error!("Malformed output encountered when collecting plugin roots: {}", line); + log_trace!("Error collecting plugins: Malformed output encountered when collecting plugin roots: {}", line); } }), - None, + Some(&mut |line| { + log_trace!("Error when collecting plugins: {}", line); + }), )?; Ok(Some(slf)) } else { diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index bf2d27e8..cb26d9d9 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -3,6 +3,7 @@ use crate::built_info; use origen::{Result, STATUS}; use origen::core::status::DependencySrc; use origen_metal::utils::file::search_backwards_for_first; +use origen_metal::new_cmd; use semver::Version; use std::env; use std::path::PathBuf; @@ -103,7 +104,7 @@ pub fn resolve_pyproject() -> Result { impl Config { pub fn base_cmd(&self) -> Command { let dep_src = STATUS.dependency_src(); - let mut c = Command::new(&self.command); + let mut c = new_cmd!(&self.command); if let Some(dep_src) = dep_src.as_ref() { match dep_src { @@ -207,10 +208,12 @@ impl Default for Config { Err(e) => log_error!("Errors encountered resolving pyproject: {}", e) } for cmd in PYTHONS.iter() { + log_trace!("Searching for installed python at '{}'", cmd); match get_version(cmd) { Some(version) => { available = true; if version >= Version::parse(MIN_PYTHON_VERSION).unwrap() { + log_trace!("Found python version '{}'", cmd); return Config { available: true, command: cmd.to_string(), @@ -228,7 +231,7 @@ impl Default for Config { } Config { available: false, - command: String::new(), + command: String::from("python"), version: Version::parse("0.0.0").unwrap(), error: msg, } @@ -258,7 +261,7 @@ pub fn virtual_env() -> Result { /// Get the Python version from the given command fn get_version(command: &str) -> Option { - match Command::new(command).arg("--version").output() { + match new_cmd!(command).arg("--version").output() { Ok(output) => return extract_version(std::str::from_utf8(&output.stdout).unwrap()), Err(_e) => return None, } @@ -266,8 +269,6 @@ fn get_version(command: &str) -> Option { /// Returns the version of poetry (obtained from running "poetry --version") pub fn poetry_version() -> Option { - //log_trace!("Executing command: {} --version", &PYTHON_CONFIG.poetry_command); - //match Command::new(&PYTHON_CONFIG.poetry_command) match &PYTHON_CONFIG.poetry_command().arg("--version").output() { Ok(output) => { let text = std::str::from_utf8(&output.stdout).unwrap(); @@ -388,6 +389,10 @@ pub fn add_origen_env(cmd: &mut Command) { } } +pub fn is_backend_origen_mod_missing_err(err: &origen::Error) -> bool { + err.to_string().contains("ModuleNotFoundError: No module named '_origen'") +} + #[cfg(test)] mod tests { use super::*; diff --git a/rust/origen_metal/Cargo.toml b/rust/origen_metal/Cargo.toml index 942e5ae6..e0c83596 100644 --- a/rust/origen_metal/Cargo.toml +++ b/rust/origen_metal/Cargo.toml @@ -50,6 +50,7 @@ aes-gcm = "0.8" semver = "1.0.1" glob = "0.3.0" email_address = "0.2.4" +tera = "1" [build-dependencies] built = "0.5.2" diff --git a/rust/origen_metal/src/error.rs b/rust/origen_metal/src/error.rs index 5d914320..b68cf68d 100644 --- a/rust/origen_metal/src/error.rs +++ b/rust/origen_metal/src/error.rs @@ -233,3 +233,9 @@ impl std::convert::From for Error { Error::new(&err.to_string()) } } + +impl std::convert::From for Error { + fn from(err: tera::Error) -> Self { + Error::new(&err.to_string()) + } +} diff --git a/rust/origen_metal/src/lib.rs b/rust/origen_metal/src/lib.rs index 3e186155..c6b7fae7 100644 --- a/rust/origen_metal/src/lib.rs +++ b/rust/origen_metal/src/lib.rs @@ -4,6 +4,7 @@ pub extern crate config; pub extern crate indexmap; pub extern crate glob; pub extern crate octocrab; +pub extern crate tera; #[macro_use] extern crate serde; #[macro_use] diff --git a/rust/origen_metal/src/utils/command.rs b/rust/origen_metal/src/utils/command.rs index a2b70af3..45e2037e 100644 --- a/rust/origen_metal/src/utils/command.rs +++ b/rust/origen_metal/src/utils/command.rs @@ -94,6 +94,19 @@ pub fn log_stderr(process: &mut std::process::Child, mut callback: Option<&mut d }); } +#[macro_export] +macro_rules! new_cmd { + ($base_cmd:expr) => {{ + if cfg!(windows) { + let mut c = Command::new("cmd"); + c.arg(r"/c").arg($base_cmd); + c + } else { + Command::new($base_cmd) + } + }}; +} + pub fn exec + Clone>( cmd: Vec, capture: bool, From 0973471f54282d95597ddf0e6cb4e267c1a0b230 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Fri, 20 Oct 2023 07:26:17 -0500 Subject: [PATCH 106/200] Attempt: Fix regression tests --- test_apps/no_workspace/t_invocation_env.py | 2 +- test_apps/no_workspace/test_user_install.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index b0ebecbb..683bb391 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -60,7 +60,7 @@ def eval_and_parse(self, code): code = [code] out = CLI.global_cmds.eval.run(*code) out = out.split("\n") - idx = out.index(self.header) + idx = next(i for i, l in enumerate(out) if l.endswith(self.header)) return eval(out[idx+1]) def get_status(self): diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index fc846c89..364e0062 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -126,5 +126,5 @@ def test_error_message(self): out = T_InvocationBaseTests.global_cmds.eval.run("1==1", run_opts={"return_details": True}) err = f"Invalid TOML file {self.malformed_pyproject.joinpath('pyproject.toml').as_posix()}" assert err in out["stderr"] - errors = T_InvocationBaseTests.extract_logged_errors(out["stdout"]) - assert err in errors[1] + assert out["stdout"] == '' + From e4b0e6a0f4f22ea6fb4724d29bf7c012490a2e4b Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sat, 21 Oct 2023 16:45:41 -0500 Subject: [PATCH 107/200] Support workflow dispatch for regressions --- .github/workflows/regression_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index fc5670a6..c26c674f 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -1,5 +1,5 @@ name: Regression Tests -on: [push] +on: [push, workflow_dispatch] jobs: build: strategy: From be773b73f664c542a59db2d2cc7f172c6a793cb1 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sat, 21 Oct 2023 20:46:48 -0500 Subject: [PATCH 108/200] Add readme for no-workspace regressions --- test_apps/no_workspace/README.md | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 test_apps/no_workspace/README.md diff --git a/test_apps/no_workspace/README.md b/test_apps/no_workspace/README.md new file mode 100644 index 00000000..22efe777 --- /dev/null +++ b/test_apps/no_workspace/README.md @@ -0,0 +1,49 @@ +No-Workspace tests require some setup to run. This can custom pyenv can be setup for this, or manual changes can be made. A similar sequence is contained in `regression_test.yml`. + +### Ensure the origen plugin is up to date with the latest executable and `pyapi`: +~~~ +cd rust/origen +cargo build --workspace +cp target/debug/origen ../../python/origen/origen/__bin__/bin/ +cd ../pyapi +cargo build +# For linux +cp target/debug/lib_origen.so ../../python/origen/_origen.so +~~~ + +### Clean origen_metal tmp/ directory +For some reason, this confuses `pip`, but is an easy workaround: + +~~~ +rm python/origen_metal/tmp -r +~~~ + +### Remove Origen-Metal Dependency from Origen +Origen Metal version will likely not be checked in during development. Get around this by removing it as a dependency from Origen +Origen Metal can be installed manually afterwards. + +~~~ +cd python/origen +poetry remove origen_metal +~~~ + +### Install Origen & Origen Metal + +~~~ +pip install python/origen +pip install python/origen_metal +~~~ + +### Install Pytest +`pytest` is currently just a development dependency. Need to instal it manually: + +~~~ +pip install pytest==7.2.1 +~~~ + +### Run Som Tests +~~~ +pytest test_no_workspace.py::TestNoWorkspaceNoPlugins -vv +~~~ + +See the `regression_test.yml` for more tests to run in this setup. \ No newline at end of file From 6f852dea7306d30a07daf79a22d81451135086e5 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 21 Oct 2023 20:54:45 -0500 Subject: [PATCH 109/200] Update README.md Fix typo --- test_apps/no_workspace/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_apps/no_workspace/README.md b/test_apps/no_workspace/README.md index 22efe777..0915725d 100644 --- a/test_apps/no_workspace/README.md +++ b/test_apps/no_workspace/README.md @@ -41,9 +41,9 @@ pip install python/origen_metal pip install pytest==7.2.1 ~~~ -### Run Som Tests +### Run Some Tests ~~~ pytest test_no_workspace.py::TestNoWorkspaceNoPlugins -vv ~~~ -See the `regression_test.yml` for more tests to run in this setup. \ No newline at end of file +See the `regression_test.yml` for more tests to run in this setup. From 25021b8534d9a3de48a9430c2404313b80dd51b5 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 4 Nov 2023 16:50:43 -0500 Subject: [PATCH 110/200] WIP: publish action --- .github/workflows/publish.yml | 114 +++++---- .gitignore | 9 +- python/origen/build_helpers/__init__.py | 21 ++ python/origen/poetry_build.py | 77 +++--- python/origen_metal/poetry_build.py | 33 +++ python/origen_metal/pyproject.toml | 10 +- rust/origen_metal/Cargo.lock | 296 +++++++++++++++++++++++- rust/pyapi/Cargo.lock | 1 + rust/pyapi_metal/Cargo.lock | 292 ++++++++++++++++++++++- 9 files changed, 750 insertions(+), 103 deletions(-) create mode 100644 python/origen/build_helpers/__init__.py create mode 100644 python/origen_metal/poetry_build.py diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8366c81c..2e30a341 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,6 +2,12 @@ name: Publish Packages on: workflow_dispatch: inputs: + origen_metal_python_package: + description: Publish the Origen Metal python package + default: "false" + origen_python_package: + description: Publish the Origen python package + default: "false" # build_for_debug_target: # description: If 'true', does not use the '--release' switch when building Rust libraries # required: false @@ -23,25 +29,40 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] - python-version: [3.6, 3.7, 3.8, 3.9] + os: ${{ fromJSON(vars.SUPPORTED_OS) }} + python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - toolchain: "nightly-2020-11-01" - override: true - #components: rustfmt, clippy - + toolchain: ${{ fromJSON(vars.RUST_VERSION) }} + rustflags: + + - name: Override Project Rust Version + run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} + + - name: Check Rust Version + run: | + rustc --version + cargo --version + - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - name: Display Python Version + run: python -c "import sys; print(sys.version)" + + - name: Install Poetry + run: | + pip install poetry==1.3.2 + poetry --version + # Needed to compile keyring library # Install taken from keyring library: # https://github.com/hwchen/keyring-rs/blob/v0.10.1/.github/workflows/ci.yaml#L80-L84 @@ -51,49 +72,60 @@ jobs: sudo apt install libdbus-1-dev if: contains(matrix.os, 'ubuntu') - - name: Build Origen CLI - working-directory: rust/origen/cli - run: cargo build --bins --release + - name: Build Origen Metal Python Package + working-directory: python/origen_metal + run: poetry build --format wheel + + - name: Display Dist Directory + working-directory: python/origen_metal/dist + run: ls + + - name: Upload Origen Metal Python Package Artifact + uses: actions/upload-artifact@v2 + with: + name: origen-metal-wheels + path: python/origen_metal/dist/origen_metal* + + # - name: Build Origen CLI + # working-directory: rust/origen/cli + # run: cargo build --bins --release - - name: Add Origen to PATH (Linux) - if: matrix.os == 'ubuntu-latest' - run: echo "${{ github.workspace }}/rust/origen/target/release" >> $GITHUB_PATH - - - name: Add Origen to PATH (Windows) - if: matrix.os == 'windows-latest' - run: echo "${{ github.workspace }}/rust/origen/target/release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - - name: Display Python Version - run: python -c "import sys; print(sys.version)" + # - name: Add Origen to PATH (Linux) + # if: matrix.os == 'ubuntu-latest' + # run: echo "${{ github.workspace }}/rust/origen/target/release" >> $GITHUB_PATH - - name: Display Origen CLI Version - run: origen -v + # - name: Add Origen to PATH (Windows) + # if: matrix.os == 'windows-latest' + # run: echo "${{ github.workspace }}/rust/origen/target/release" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - name: Build PyAPI - working-directory: rust/pyapi - run: cargo build --release + # - name: Display Origen CLI Version + # run: origen -v - - name: Setup App Env - working-directory: python - run: origen env setup + # - name: Build PyAPI + # working-directory: rust/pyapi + # run: cargo build --release - - name: Display Origen App Version - working-directory: python - run: origen -v + # - name: Setup App Env + # working-directory: python + # run: origen env setup - - name: Build The Package - working-directory: python + # - name: Display Origen App Version + # working-directory: python + # run: origen -v + + - name: Build Origen Python Package + working-directory: python/origen run: poetry build --format wheel - - name: Display Dist Directory (Windows) - if: matrix.os == 'windows-latest' - working-directory: python/dist + - name: Display Dist Directory + working-directory: python/origen/dist run: ls - - name: Display Dist Directory (Others) - if: matrix.os != 'windows-latest' - working-directory: python/dist - run: ls -al + - name: Upload Origen Python Package Artifact + uses: actions/upload-artifact@v2 + with: + name: origen-wheels + path: python/origen/dist/origen* # - name: "Publish To PyPi" # if: ${{ github.event.inputs.publish_pypi }} == true diff --git a/.gitignore b/.gitignore index deb10ffb..a27c3f24 100755 --- a/.gitignore +++ b/.gitignore @@ -14,9 +14,6 @@ log/ .vscode /test_apps/python_app/example/templates/dut_info.txt /test_apps/**/.session -/python/origen/dist -/python/origen_metal/dist -/python/origen_metal/build rls/ .pytest_cache @@ -39,6 +36,12 @@ rls/ python/origen/templates/dut_info.txt test_apps/no_workspace/templates/output/ +# Packaging artifacts +/python/origen/dist +/python/origen/1.0.0 +/python/origen_metal/dist +/python/origen_metal/build + # Bin directory for packaging python/origen/origen/__bin__/bin/* !python/origen/origen/__bin__/bin/.keep diff --git a/python/origen/build_helpers/__init__.py b/python/origen/build_helpers/__init__.py new file mode 100644 index 00000000..da814645 --- /dev/null +++ b/python/origen/build_helpers/__init__.py @@ -0,0 +1,21 @@ +import platform, subprocess, sys + +windows = platform.system() == 'Windows' + +def compile_rust(dir, target=None, workspace=False): + cmd = ['cargo', 'build'] + if workspace: + cmd.append("--workspace") + if target: + cmd.append(f"--{target}") + print(f"Building Src At: {dir}: {(' ').join(cmd)}") + compile_result = subprocess.run( + cmd, + stderr=sys.stderr, + stdout=sys.stdout, + cwd=dir, + shell=True, + ) + if compile_result.returncode != 0: + print(f"Failed to build target from {dir}. Received return code {compile_result.returncode}") + exit(1) diff --git a/python/origen/poetry_build.py b/python/origen/poetry_build.py index bc16cd4d..a9b09eca 100644 --- a/python/origen/poetry_build.py +++ b/python/origen/poetry_build.py @@ -1,54 +1,39 @@ -import pathlib, shutil, os +import pathlib, shutil, os, platform +from build_helpers import windows, compile_rust if __name__ == '__main__': - # Not needed during regression testing - if os.getenv("GITHUB_WORKFLOW", "") == "publish": - current = pathlib.Path(__file__).parent.absolute() - rust_build_target = os.getenv("ORIGEN__BUILD_TARGET", "release") - copy_build_target = os.getenv("ORIGEN__COPY_BUILD_TARGET", True) - if copy_build_target == "0": - copy_build_target = False + # if os.getenv("GITHUB_WORKFLOW", "") == "publish": + origen_pkg_root = pathlib.Path(__file__).parent.absolute() + origen_pkg_lib = origen_pkg_root.joinpath(f"_origen.{'pyd' if windows else 'so'}") - # Package the CLI - cli_src = current.joinpath(f"../rust/origen/target/{rust_build_target}") - if cli_src.joinpath("origen.exe").exists(): - # Windows - cli_src = cli_src.joinpath("origen.exe") - elif cli_src.joinpath("origen").exists(): - cli_src = cli_src.joinpath("origen") - else: - raise RuntimeError(f"Could not locate built CLI in {cli_src}") - cli_pkg_dir = current.joinpath("origen/__bin__/bin") - cli_pkg_dir.mkdir(parents=True, exist_ok=True) + rust_build_target = os.getenv("ORIGEN__BUILD_TARGET", "release") + build_lib = os.getenv("ORIGEN__BUILD_LIB", True) + copy_lib = os.getenv("ORIGEN__COPY_LIB", True) + if copy_lib == "0": + copy_lib = False + origen_lib_src = origen_pkg_root.joinpath("../../rust/pyapi") + origen_lib_target = origen_lib_src.joinpath(f"target/{rust_build_target}/_origen.{'dll' if windows else 'so'}") + build_cli = os.getenv("ORIGEN__BUILD_CLI", True) + copy_cli = os.getenv("ORIGEN__COPY_CLI", True) + if copy_cli == "0": + copy_cli = False + origen_cli_src = origen_pkg_root.joinpath("../../rust/origen") + origen_cli_target = origen_cli_src.joinpath(f"target/{rust_build_target}/origen{'.exe' if windows else ''}") + origen_cli_pkg_dir = origen_pkg_root.joinpath("origen/__bin__/bin") - print(f"Copying CLI for packaging ({cli_src} to {cli_pkg_dir})") - shutil.copy2(cli_src, cli_pkg_dir) - - # Package the _origen compiled library - # For debugging the process locally, especially when we just want to make sure - # the process is more or less working, we can't override the running library - # with the target one. So, just assume all is well when running for debugging reasons, - # or run the poetry build command manually to build the package. - if copy_build_target: - _origen_src = current.joinpath( - f"../rust/pyapi/target/{rust_build_target}") - if _origen_src.joinpath("_origen.dll").exists(): - # Windows - _origen_pkg = current.joinpath("_origen.pyd") - _origen_src = _origen_src.joinpath("_origen.dll") - elif _origen_src.joinpath("lib_origen.so").exists(): - _origen_pkg = current.joinpath("_origen.so") - _origen_src = _origen_src.joinpath("lib_origen.so") - else: - raise RuntimeError( - f"Could not locate compiled library in {_origen_src}") - print( - f"Copying _origen library for packaging ({_origen_src} to {_origen_pkg})" - ) - shutil.copy2(_origen_src, _origen_pkg) - else: - print("Skipping copy of built library") + # Build and copy Origen CLI + if build_cli: + compile_rust(origen_cli_src, rust_build_target, True) + if copy_cli: + print(f"Copying CLI for packaging from ({origen_cli_target} to {origen_cli_pkg_dir})") + shutil.copy2(origen_cli_target, origen_cli_pkg_dir) + # Build and copy Origen library + if build_lib: + compile_rust(origen_lib_src, rust_build_target, False) + if copy_lib: + print(f"Copying CLI for packaging ({origen_lib_target} to {origen_pkg_lib})") + shutil.copy2(origen_lib_target, origen_pkg_lib) def build(arg): # This method is called during install. Very important this is defined and diff --git a/python/origen_metal/poetry_build.py b/python/origen_metal/poetry_build.py new file mode 100644 index 00000000..bd74249c --- /dev/null +++ b/python/origen_metal/poetry_build.py @@ -0,0 +1,33 @@ +import pathlib, shutil, os, sys + +sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("origen"))) +from build_helpers import windows, compile_rust + +if __name__ == '__main__': + om_pkg_root = pathlib.Path(__file__).parent.absolute() + om_lib = om_pkg_root.joinpath('origen_metal').joinpath(f"_origen_metal.{'pyd' if windows else 'so'}") + + rust_build_target = os.getenv("ORIGEN_METAL__BUILD_TARGET", "release") + copy_build_target = os.getenv("ORIGEN_METAL__COPY_BUILD_TARGET", True) + if copy_build_target == "0": + copy_build_target = False + om_lib_src = om_pkg_root.joinpath("../../rust/pyapi_metal") + om_lib_target = om_lib_src.joinpath(f"target/{rust_build_target}") + om_lib_target = om_lib_target.joinpath(f"origen_metal.{'dll' if windows else 'so'}") + compile_lib = os.getenv("ORIGEN_METAL__COMPILE_LIB", True) + + if compile_lib: + compile_rust(om_lib_src, rust_build_target, False) + if copy_build_target: + print(f"Copying compiled library '{om_lib_target}' to '{om_lib}'") + shutil.copy2(om_lib_target, om_lib) + + # Final check that compiled library is present + if not om_lib.exists(): + print(f"No OM library found. Expected: {om_lib}") + exit(1) + +def build(arg): + # This method is called during install. Very important this is defined and + # does nothing. + pass diff --git a/python/origen_metal/pyproject.toml b/python/origen_metal/pyproject.toml index 60eb7bfe..2f93cc44 100644 --- a/python/origen_metal/pyproject.toml +++ b/python/origen_metal/pyproject.toml @@ -3,6 +3,10 @@ name = "origen_metal" version = "0.4.0" description = "Bare metal APIs for the Origen SDK" authors = ["Origen-SDK"] +include = [ + "origen_metal/_origen_metal.pyd", # Windows + "origen_metal/_origen_metal.so", # Linux +] [tool.poetry.dependencies] python = ">=3.7.0,<=3.12" @@ -21,4 +25,8 @@ addopts = "--strict-markers" markers = [ "online: marks tests as requiring an internet connection", "ldap: marks tests requiring/using the external ldap", -] \ No newline at end of file +] + +[tool.poetry.build] +script = "poetry_build.py" +generate-setup-file = false diff --git a/rust/origen_metal/Cargo.lock b/rust/origen_metal/Cargo.lock index 7e50dde0..b2255007 100644 --- a/rust/origen_metal/Cargo.lock +++ b/rust/origen_metal/Cargo.lock @@ -84,9 +84,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -218,6 +218,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "bstr" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "built" version = "0.5.2" @@ -304,6 +314,28 @@ dependencies = [ "winapi", ] +[[package]] +name = "chrono-tz" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c39203181991a7dd4343b8005bd804e7a9a37afb8ac070e43771e8c820bbde" +dependencies = [ + "chrono", + "chrono-tz-build", + "phf", +] + +[[package]] +name = "chrono-tz-build" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f509c3a87b33437b05e2458750a0700e5bdd6956176773e6c7d6dd15a283a0c" +dependencies = [ + "parse-zoneinfo", + "phf", + "phf_codegen", +] + [[package]] name = "cipher" version = "0.2.5" @@ -402,6 +434,21 @@ dependencies = [ "syn 1.0.93", ] +[[package]] +name = "deunicode" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71dbf1bf89c23e9cd1baf5e654f622872655f195b36588dc9dc38f7eda30758c" +dependencies = [ + "deunicode 1.4.1", +] + +[[package]] +name = "deunicode" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1abaf4d861455be59f64fd2b55606cb151fce304ede7165f410243ce96bde6" + [[package]] name = "digest" version = "0.8.1" @@ -474,6 +521,9 @@ name = "email_address" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2153bd83ebc09db15bcbdc3e2194d901804952e3dc96967e1cd3b0c5c32d112" +dependencies = [ + "serde", +] [[package]] name = "encoding_rs" @@ -765,6 +815,30 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "globset" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "globwalk" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +dependencies = [ + "bitflags 1.3.2", + "ignore", + "walkdir", +] + [[package]] name = "h2" version = "0.3.13" @@ -885,6 +959,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +[[package]] +name = "humansize" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" + [[package]] name = "hyper" version = "0.14.18" @@ -970,6 +1050,23 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "ignore" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +dependencies = [ + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + [[package]] name = "indexmap" version = "1.8.1" @@ -1541,6 +1638,7 @@ dependencies = [ "chrono", "config", "dirs", + "email_address", "enum-display-derive", "enum-utils", "git2", @@ -1566,6 +1664,7 @@ dependencies = [ "serde_json", "shellexpand", "tempfile", + "tera", "termcolor", "time 0.1.44", "toml", @@ -1604,6 +1703,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "parse-zoneinfo" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" +dependencies = [ + "regex", +] + [[package]] name = "pathdiff" version = "0.2.1" @@ -1668,6 +1776,45 @@ dependencies = [ "sha-1", ] +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", + "uncased", +] + [[package]] name = "pin-project" version = "1.1.2" @@ -1891,9 +2038,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", @@ -1902,9 +2061,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "remove_dir_all" @@ -2052,6 +2211,15 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.19" @@ -2278,12 +2446,27 @@ dependencies = [ "time 0.3.23", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "slab" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +[[package]] +name = "slug" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" +dependencies = [ + "deunicode 0.4.5", +] + [[package]] name = "smallvec" version = "1.8.0" @@ -2383,6 +2566,28 @@ dependencies = [ "winapi", ] +[[package]] +name = "tera" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9783d6ff395ae80cf17ed9a25360e7ba37742a79fa8fddabb073c5c7c8856d" +dependencies = [ + "chrono", + "chrono-tz", + "globwalk", + "humansize", + "lazy_static", + "percent-encoding", + "pest", + "pest_derive", + "rand", + "regex", + "serde", + "serde_json", + "slug", + "unic-segment", +] + [[package]] name = "termcolor" version = "1.1.3" @@ -2412,6 +2617,16 @@ dependencies = [ "syn 2.0.27", ] +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", +] + [[package]] name = "time" version = "0.1.44" @@ -2657,6 +2872,65 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +[[package]] +name = "uncased" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b9bc53168a4be7402ab86c3aad243a84dd7381d09be0eddc81280c1da95ca68" +dependencies = [ + "version_check", +] + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" +dependencies = [ + "unic-ucd-segment", +] + +[[package]] +name = "unic-ucd-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + [[package]] name = "unicode-bidi" version = "0.3.13" @@ -2751,6 +3025,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.0" diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index e9ab3f5e..2c6d8eec 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -2255,6 +2255,7 @@ dependencies = [ "serde_json", "shellexpand", "tempfile", + "tera", "termcolor", "time 0.1.44", "toml", diff --git a/rust/pyapi_metal/Cargo.lock b/rust/pyapi_metal/Cargo.lock index 204d2108..2a574b15 100644 --- a/rust/pyapi_metal/Cargo.lock +++ b/rust/pyapi_metal/Cargo.lock @@ -84,9 +84,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -218,6 +218,16 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "bstr" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "built" version = "0.5.2" @@ -304,6 +314,28 @@ dependencies = [ "winapi", ] +[[package]] +name = "chrono-tz" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c39203181991a7dd4343b8005bd804e7a9a37afb8ac070e43771e8c820bbde" +dependencies = [ + "chrono", + "chrono-tz-build", + "phf", +] + +[[package]] +name = "chrono-tz-build" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f509c3a87b33437b05e2458750a0700e5bdd6956176773e6c7d6dd15a283a0c" +dependencies = [ + "parse-zoneinfo", + "phf", + "phf_codegen", +] + [[package]] name = "cipher" version = "0.2.5" @@ -423,6 +455,21 @@ dependencies = [ "syn 1.0.93", ] +[[package]] +name = "deunicode" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71dbf1bf89c23e9cd1baf5e654f622872655f195b36588dc9dc38f7eda30758c" +dependencies = [ + "deunicode 1.4.1", +] + +[[package]] +name = "deunicode" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1abaf4d861455be59f64fd2b55606cb151fce304ede7165f410243ce96bde6" + [[package]] name = "digest" version = "0.8.1" @@ -789,6 +836,30 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +[[package]] +name = "globset" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" +dependencies = [ + "aho-corasick", + "bstr", + "fnv", + "log", + "regex", +] + +[[package]] +name = "globwalk" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" +dependencies = [ + "bitflags 1.3.2", + "ignore", + "walkdir", +] + [[package]] name = "h2" version = "0.3.13" @@ -909,6 +980,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +[[package]] +name = "humansize" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" + [[package]] name = "hyper" version = "0.14.18" @@ -994,6 +1071,23 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "ignore" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" +dependencies = [ + "globset", + "lazy_static", + "log", + "memchr", + "regex", + "same-file", + "thread_local", + "walkdir", + "winapi-util", +] + [[package]] name = "indexmap" version = "1.8.1" @@ -1601,6 +1695,7 @@ dependencies = [ "serde_json", "shellexpand", "tempfile", + "tera", "termcolor", "time 0.1.44", "toml", @@ -1639,6 +1734,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "parse-zoneinfo" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" +dependencies = [ + "regex", +] + [[package]] name = "pathdiff" version = "0.2.1" @@ -1703,6 +1807,45 @@ dependencies = [ "sha-1", ] +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", + "uncased", +] + [[package]] name = "pin-project" version = "1.1.2" @@ -1941,9 +2084,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.5" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", @@ -1952,9 +2107,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "remove_dir_all" @@ -2102,6 +2257,15 @@ version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.19" @@ -2328,12 +2492,27 @@ dependencies = [ "time 0.3.24", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "slab" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +[[package]] +name = "slug" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" +dependencies = [ + "deunicode 0.4.5", +] + [[package]] name = "smallvec" version = "1.8.0" @@ -2433,6 +2612,28 @@ dependencies = [ "winapi", ] +[[package]] +name = "tera" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9783d6ff395ae80cf17ed9a25360e7ba37742a79fa8fddabb073c5c7c8856d" +dependencies = [ + "chrono", + "chrono-tz", + "globwalk", + "humansize", + "lazy_static", + "percent-encoding", + "pest", + "pest_derive", + "rand", + "regex", + "serde", + "serde_json", + "slug", + "unic-segment", +] + [[package]] name = "termcolor" version = "1.1.3" @@ -2462,6 +2663,16 @@ dependencies = [ "syn 2.0.28", ] +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if 1.0.0", + "once_cell", +] + [[package]] name = "time" version = "0.1.44" @@ -2708,6 +2919,65 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +[[package]] +name = "uncased" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b9bc53168a4be7402ab86c3aad243a84dd7381d09be0eddc81280c1da95ca68" +dependencies = [ + "version_check", +] + +[[package]] +name = "unic-char-property" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" +dependencies = [ + "unic-char-range", +] + +[[package]] +name = "unic-char-range" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" + +[[package]] +name = "unic-common" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" + +[[package]] +name = "unic-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" +dependencies = [ + "unic-ucd-segment", +] + +[[package]] +name = "unic-ucd-segment" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" +dependencies = [ + "unic-char-property", + "unic-char-range", + "unic-ucd-version", +] + +[[package]] +name = "unic-ucd-version" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" +dependencies = [ + "unic-common", +] + [[package]] name = "unicode-bidi" version = "0.3.13" @@ -2802,6 +3072,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.0" From 763abefe3b283160a26e58e6e76b24ed350e97e3 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 5 Nov 2023 13:20:32 -0600 Subject: [PATCH 111/200] (origen/OM publishing) Add check for when full publishing script should be run --- python/origen/build_helpers/__init__.py | 13 ++++- python/origen/poetry_build.py | 66 +++++++++++++------------ python/origen_metal/poetry_build.py | 44 +++++++++-------- 3 files changed, 70 insertions(+), 53 deletions(-) diff --git a/python/origen/build_helpers/__init__.py b/python/origen/build_helpers/__init__.py index da814645..e66f1cda 100644 --- a/python/origen/build_helpers/__init__.py +++ b/python/origen/build_helpers/__init__.py @@ -1,6 +1,15 @@ -import platform, subprocess, sys +import platform, subprocess, sys, os windows = platform.system() == 'Windows' +origen_publish_step_env = os.getenv("ORIGEN_PUBLISH_STEP", None) +if origen_publish_step_env == 0: + publish_step = False +elif origen_publish_step_env == 1 : + publish_step = True +else: + publish_step = \ + os.getenv("GITHUB_WORKFLOW", "") == "publish" \ + or "PEP517_BUILD_BACKEND" not in os.environ def compile_rust(dir, target=None, workspace=False): cmd = ['cargo', 'build'] @@ -14,7 +23,7 @@ def compile_rust(dir, target=None, workspace=False): stderr=sys.stderr, stdout=sys.stdout, cwd=dir, - shell=True, + shell=windows, ) if compile_result.returncode != 0: print(f"Failed to build target from {dir}. Received return code {compile_result.returncode}") diff --git a/python/origen/poetry_build.py b/python/origen/poetry_build.py index a9b09eca..0697cc4c 100644 --- a/python/origen/poetry_build.py +++ b/python/origen/poetry_build.py @@ -1,39 +1,43 @@ -import pathlib, shutil, os, platform -from build_helpers import windows, compile_rust +import pathlib, shutil, os +from build_helpers import windows, compile_rust, publish_step if __name__ == '__main__': - # if os.getenv("GITHUB_WORKFLOW", "") == "publish": - origen_pkg_root = pathlib.Path(__file__).parent.absolute() - origen_pkg_lib = origen_pkg_root.joinpath(f"_origen.{'pyd' if windows else 'so'}") + if publish_step: + print("Building libraries for packaging...") + origen_pkg_root = pathlib.Path(__file__).parent.absolute() + origen_pkg_lib = origen_pkg_root.joinpath(f"_origen.{'pyd' if windows else 'so'}") - rust_build_target = os.getenv("ORIGEN__BUILD_TARGET", "release") - build_lib = os.getenv("ORIGEN__BUILD_LIB", True) - copy_lib = os.getenv("ORIGEN__COPY_LIB", True) - if copy_lib == "0": - copy_lib = False - origen_lib_src = origen_pkg_root.joinpath("../../rust/pyapi") - origen_lib_target = origen_lib_src.joinpath(f"target/{rust_build_target}/_origen.{'dll' if windows else 'so'}") - build_cli = os.getenv("ORIGEN__BUILD_CLI", True) - copy_cli = os.getenv("ORIGEN__COPY_CLI", True) - if copy_cli == "0": - copy_cli = False - origen_cli_src = origen_pkg_root.joinpath("../../rust/origen") - origen_cli_target = origen_cli_src.joinpath(f"target/{rust_build_target}/origen{'.exe' if windows else ''}") - origen_cli_pkg_dir = origen_pkg_root.joinpath("origen/__bin__/bin") + rust_build_target = os.getenv("ORIGEN__BUILD_TARGET", "release") + build_lib = os.getenv("ORIGEN__BUILD_LIB", True) + copy_lib = os.getenv("ORIGEN__COPY_LIB", True) + if copy_lib == "0": + copy_lib = False + origen_lib_src = origen_pkg_root.joinpath("../../rust/pyapi") + origen_lib_target = origen_lib_src.joinpath(f"target/{rust_build_target}/_origen.{'dll' if windows else 'so'}") + build_cli = os.getenv("ORIGEN__BUILD_CLI", True) + copy_cli = os.getenv("ORIGEN__COPY_CLI", True) + if copy_cli == "0": + copy_cli = False + origen_cli_src = origen_pkg_root.joinpath("../../rust/origen") + origen_cli_target = origen_cli_src.joinpath(f"target/{rust_build_target}/origen{'.exe' if windows else ''}") + origen_cli_pkg_dir = origen_pkg_root.joinpath("origen/__bin__/bin") - # Build and copy Origen CLI - if build_cli: - compile_rust(origen_cli_src, rust_build_target, True) - if copy_cli: - print(f"Copying CLI for packaging from ({origen_cli_target} to {origen_cli_pkg_dir})") - shutil.copy2(origen_cli_target, origen_cli_pkg_dir) + # Build and copy Origen CLI + if build_cli: + compile_rust(origen_cli_src, rust_build_target, True) + if copy_cli: + print(f"Copying CLI for packaging from ({origen_cli_target} to {origen_cli_pkg_dir})") + shutil.copy2(origen_cli_target, origen_cli_pkg_dir) - # Build and copy Origen library - if build_lib: - compile_rust(origen_lib_src, rust_build_target, False) - if copy_lib: - print(f"Copying CLI for packaging ({origen_lib_target} to {origen_pkg_lib})") - shutil.copy2(origen_lib_target, origen_pkg_lib) + # Build and copy Origen library + if build_lib: + compile_rust(origen_lib_src, rust_build_target, False) + if copy_lib: + print(f"Copying CLI for packaging ({origen_lib_target} to {origen_pkg_lib})") + shutil.copy2(origen_lib_target, origen_pkg_lib) + print("Libraries built!") + else: + print("Skipping library build steps when run as a dependency") def build(arg): # This method is called during install. Very important this is defined and diff --git a/python/origen_metal/poetry_build.py b/python/origen_metal/poetry_build.py index bd74249c..26aa856b 100644 --- a/python/origen_metal/poetry_build.py +++ b/python/origen_metal/poetry_build.py @@ -1,31 +1,35 @@ import pathlib, shutil, os, sys sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("origen"))) -from build_helpers import windows, compile_rust +from build_helpers import windows, compile_rust, publish_step if __name__ == '__main__': - om_pkg_root = pathlib.Path(__file__).parent.absolute() - om_lib = om_pkg_root.joinpath('origen_metal').joinpath(f"_origen_metal.{'pyd' if windows else 'so'}") + if publish_step: + print("Building libraries for packaging...") + om_pkg_root = pathlib.Path(__file__).parent.absolute() + om_lib = om_pkg_root.joinpath('origen_metal').joinpath(f"_origen_metal.{'pyd' if windows else 'so'}") - rust_build_target = os.getenv("ORIGEN_METAL__BUILD_TARGET", "release") - copy_build_target = os.getenv("ORIGEN_METAL__COPY_BUILD_TARGET", True) - if copy_build_target == "0": - copy_build_target = False - om_lib_src = om_pkg_root.joinpath("../../rust/pyapi_metal") - om_lib_target = om_lib_src.joinpath(f"target/{rust_build_target}") - om_lib_target = om_lib_target.joinpath(f"origen_metal.{'dll' if windows else 'so'}") - compile_lib = os.getenv("ORIGEN_METAL__COMPILE_LIB", True) + rust_build_target = os.getenv("ORIGEN_METAL__BUILD_TARGET", "release") + copy_build_target = os.getenv("ORIGEN_METAL__COPY_BUILD_TARGET", True) + if copy_build_target == "0": + copy_build_target = False + om_lib_src = om_pkg_root.joinpath("../../rust/pyapi_metal") + om_lib_target = om_lib_src.joinpath(f"target/{rust_build_target}") + om_lib_target = om_lib_target.joinpath(f"origen_metal.{'dll' if windows else 'so'}") + compile_lib = os.getenv("ORIGEN_METAL__COMPILE_LIB", True) - if compile_lib: - compile_rust(om_lib_src, rust_build_target, False) - if copy_build_target: - print(f"Copying compiled library '{om_lib_target}' to '{om_lib}'") - shutil.copy2(om_lib_target, om_lib) + if compile_lib: + compile_rust(om_lib_src, rust_build_target, False) + if copy_build_target: + print(f"Copying compiled library '{om_lib_target}' to '{om_lib}'") + shutil.copy2(om_lib_target, om_lib) - # Final check that compiled library is present - if not om_lib.exists(): - print(f"No OM library found. Expected: {om_lib}") - exit(1) + # Final check that compiled library is present + if not om_lib.exists(): + print(f"No OM library found. Expected: {om_lib}") + exit(1) + else: + print("Skipping library build steps when run as a dependency") def build(arg): # This method is called during install. Very important this is defined and From ebc3dd8bf368bf2579a8c5b5add1db049f3e97ee Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 5 Nov 2023 14:48:39 -0600 Subject: [PATCH 112/200] WiP: publishing --- python/origen/build_helpers/__init__.py | 14 ++++++++++++-- python/origen/poetry_build.py | 4 +++- python/origen_metal/poetry_build.py | 3 ++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/python/origen/build_helpers/__init__.py b/python/origen/build_helpers/__init__.py index e66f1cda..5d1c4275 100644 --- a/python/origen/build_helpers/__init__.py +++ b/python/origen/build_helpers/__init__.py @@ -8,8 +8,8 @@ publish_step = True else: publish_step = \ - os.getenv("GITHUB_WORKFLOW", "") == "publish" \ - or "PEP517_BUILD_BACKEND" not in os.environ + os.getenv("GITHUB_WORKFLOW", "") == "publish" + # or "PEP517_BUILD_BACKEND" not in os.environ def compile_rust(dir, target=None, workspace=False): cmd = ['cargo', 'build'] @@ -28,3 +28,13 @@ def compile_rust(dir, target=None, workspace=False): if compile_result.returncode != 0: print(f"Failed to build target from {dir}. Received return code {compile_result.returncode}") exit(1) + +def ls_dir(dir): + print(f"Showing directory: {dir}") + subprocess.run( + ["dir" if windows else "ls"], + stderr=sys.stderr, + stdout=sys.stdout, + cwd=dir, + shell=windows, + ) diff --git a/python/origen/poetry_build.py b/python/origen/poetry_build.py index 0697cc4c..8f544275 100644 --- a/python/origen/poetry_build.py +++ b/python/origen/poetry_build.py @@ -1,5 +1,5 @@ import pathlib, shutil, os -from build_helpers import windows, compile_rust, publish_step +from build_helpers import windows, compile_rust, publish_step, ls_dir if __name__ == '__main__': if publish_step: @@ -27,6 +27,7 @@ compile_rust(origen_cli_src, rust_build_target, True) if copy_cli: print(f"Copying CLI for packaging from ({origen_cli_target} to {origen_cli_pkg_dir})") + ls_dir(origen_cli_target.parent) shutil.copy2(origen_cli_target, origen_cli_pkg_dir) # Build and copy Origen library @@ -34,6 +35,7 @@ compile_rust(origen_lib_src, rust_build_target, False) if copy_lib: print(f"Copying CLI for packaging ({origen_lib_target} to {origen_pkg_lib})") + ls_dir(origen_lib_target.parent) shutil.copy2(origen_lib_target, origen_pkg_lib) print("Libraries built!") else: diff --git a/python/origen_metal/poetry_build.py b/python/origen_metal/poetry_build.py index 26aa856b..d6504652 100644 --- a/python/origen_metal/poetry_build.py +++ b/python/origen_metal/poetry_build.py @@ -1,7 +1,7 @@ import pathlib, shutil, os, sys sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("origen"))) -from build_helpers import windows, compile_rust, publish_step +from build_helpers import windows, compile_rust, publish_step, ls_dir if __name__ == '__main__': if publish_step: @@ -22,6 +22,7 @@ compile_rust(om_lib_src, rust_build_target, False) if copy_build_target: print(f"Copying compiled library '{om_lib_target}' to '{om_lib}'") + ls_dir(om_lib_target.parent) shutil.copy2(om_lib_target, om_lib) # Final check that compiled library is present From 910636c75eb3e562c682fe41202f3a3f3791746f Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 5 Nov 2023 16:40:45 -0600 Subject: [PATCH 113/200] WiP: publishing --- python/origen/build_helpers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/origen/build_helpers/__init__.py b/python/origen/build_helpers/__init__.py index 5d1c4275..1bcdf4cb 100644 --- a/python/origen/build_helpers/__init__.py +++ b/python/origen/build_helpers/__init__.py @@ -8,7 +8,7 @@ publish_step = True else: publish_step = \ - os.getenv("GITHUB_WORKFLOW", "") == "publish" + os.getenv("GITHUB_WORKFLOW", "") == "Publish Packages" # or "PEP517_BUILD_BACKEND" not in os.environ def compile_rust(dir, target=None, workspace=False): From ad9e0e4c2c9a40dce752a9b1469f6c22e5401f1c Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 5 Nov 2023 16:56:07 -0600 Subject: [PATCH 114/200] WiP: publishing --- python/origen/poetry_build.py | 2 +- python/origen_metal/poetry_build.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/origen/poetry_build.py b/python/origen/poetry_build.py index 8f544275..3090ac45 100644 --- a/python/origen/poetry_build.py +++ b/python/origen/poetry_build.py @@ -13,7 +13,7 @@ if copy_lib == "0": copy_lib = False origen_lib_src = origen_pkg_root.joinpath("../../rust/pyapi") - origen_lib_target = origen_lib_src.joinpath(f"target/{rust_build_target}/_origen.{'dll' if windows else 'so'}") + origen_lib_target = origen_lib_src.joinpath(f"target/{rust_build_target}/{'' if windows else 'lib'}_origen.{'dll' if windows else 'so'}") build_cli = os.getenv("ORIGEN__BUILD_CLI", True) copy_cli = os.getenv("ORIGEN__COPY_CLI", True) if copy_cli == "0": diff --git a/python/origen_metal/poetry_build.py b/python/origen_metal/poetry_build.py index d6504652..504d8a6a 100644 --- a/python/origen_metal/poetry_build.py +++ b/python/origen_metal/poetry_build.py @@ -1,6 +1,7 @@ import pathlib, shutil, os, sys sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("origen"))) +import build_helpers from build_helpers import windows, compile_rust, publish_step, ls_dir if __name__ == '__main__': @@ -15,7 +16,7 @@ copy_build_target = False om_lib_src = om_pkg_root.joinpath("../../rust/pyapi_metal") om_lib_target = om_lib_src.joinpath(f"target/{rust_build_target}") - om_lib_target = om_lib_target.joinpath(f"origen_metal.{'dll' if windows else 'so'}") + om_lib_target = om_lib_target.joinpath(f"{'' if windows else 'lib'}origen_metal.{'dll' if windows else 'so'}") compile_lib = os.getenv("ORIGEN_METAL__COMPILE_LIB", True) if compile_lib: From 14e9b2cc3afc8b8e08924505c2d584d93f73a941 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 5 Nov 2023 19:53:39 -0600 Subject: [PATCH 115/200] WiP: publishing --- python/origen_metal/poetry_build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/origen_metal/poetry_build.py b/python/origen_metal/poetry_build.py index 504d8a6a..c92aadc6 100644 --- a/python/origen_metal/poetry_build.py +++ b/python/origen_metal/poetry_build.py @@ -1,6 +1,7 @@ import pathlib, shutil, os, sys sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("origen"))) +sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("origen").joinpath("build_helpers"))) import build_helpers from build_helpers import windows, compile_rust, publish_step, ls_dir From fbb26b0748e573661b987f35f8ab3f70e9004560 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 5 Nov 2023 20:57:45 -0600 Subject: [PATCH 116/200] WiP: publishing --- python/origen_metal/poetry_build.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/origen_metal/poetry_build.py b/python/origen_metal/poetry_build.py index c92aadc6..2be84c17 100644 --- a/python/origen_metal/poetry_build.py +++ b/python/origen_metal/poetry_build.py @@ -1,8 +1,6 @@ import pathlib, shutil, os, sys -sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("origen"))) -sys.path.insert(0, str(pathlib.Path(__file__).parent.parent.joinpath("origen").joinpath("build_helpers"))) -import build_helpers +sys.path.insert(0, str(pathlib.Path(os.path.abspath(__file__)).parent.parent.joinpath("origen"))) from build_helpers import windows, compile_rust, publish_step, ls_dir if __name__ == '__main__': From 698ef9383f229ba653871a858ad6b84b3427370b Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 7 Nov 2023 06:46:58 -0600 Subject: [PATCH 117/200] Robustness/usage fixes for 'run_origen' poetry wrapper --- python/origen/origen/__bin__/__init__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/python/origen/origen/__bin__/__init__.py b/python/origen/origen/__bin__/__init__.py index b83e499f..95fb00c8 100644 --- a/python/origen/origen/__bin__/__init__.py +++ b/python/origen/origen/__bin__/__init__.py @@ -2,9 +2,8 @@ import subprocess import pathlib - def run_origen(): - subprocess.run(str( - pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath( - "origen")) + " " + " ".join(sys.argv[1:]), - shell=True) + subprocess.run([ + pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen"), + *sys.argv[1:] + ], shell=True) From 4b84cd77dc5eae712a375bc68b98eef8422c3643 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Tue, 7 Nov 2023 16:52:01 -0600 Subject: [PATCH 118/200] Debug: Robustness/usage fixes for 'run_origen' poetry wrapper --- python/origen/origen/__bin__/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/origen/origen/__bin__/__init__.py b/python/origen/origen/__bin__/__init__.py index 95fb00c8..f4c95e3d 100644 --- a/python/origen/origen/__bin__/__init__.py +++ b/python/origen/origen/__bin__/__init__.py @@ -1,9 +1,11 @@ import sys import subprocess import pathlib +import platform +on_windows = platform.system() == 'Windows' def run_origen(): subprocess.run([ pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen"), *sys.argv[1:] - ], shell=True) + ], shell=on_windows) From bed413e6f9206fa718396e1d983e7db7e7d693b7 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Tue, 7 Nov 2023 19:43:11 -0600 Subject: [PATCH 119/200] Debug: Robustness/usage fixes for 'run_origen' poetry wrapper --- python/origen/origen/__bin__/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/origen/origen/__bin__/__init__.py b/python/origen/origen/__bin__/__init__.py index f4c95e3d..499df83a 100644 --- a/python/origen/origen/__bin__/__init__.py +++ b/python/origen/origen/__bin__/__init__.py @@ -6,6 +6,6 @@ def run_origen(): subprocess.run([ - pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen"), + str(pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen")), *sys.argv[1:] ], shell=on_windows) From 17f0dcac722294d3bb8375f6c02a400be0bdadfc Mon Sep 17 00:00:00 2001 From: coreyeng Date: Wed, 8 Nov 2023 13:17:17 -0600 Subject: [PATCH 120/200] Debug: Try reverting run cmd for Linux. --- python/origen/origen/__bin__/__init__.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/python/origen/origen/__bin__/__init__.py b/python/origen/origen/__bin__/__init__.py index 499df83a..fed02f1e 100644 --- a/python/origen/origen/__bin__/__init__.py +++ b/python/origen/origen/__bin__/__init__.py @@ -5,7 +5,13 @@ on_windows = platform.system() == 'Windows' def run_origen(): - subprocess.run([ - str(pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen")), - *sys.argv[1:] - ], shell=on_windows) + if on_windows: + subprocess.run([ + str(pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen")), + *sys.argv[1:] + ], shell=on_windows) + else: + subprocess.run(str( + pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath( + "origen")) + " " + " ".join(sys.argv[1:]), + shell=True) From 38d10a7560af4f36e00e0d04b25e5579acbebf27 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Wed, 8 Nov 2023 19:47:26 -0600 Subject: [PATCH 121/200] Try removing _origen copy step --- .github/workflows/regression_test.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index c26c674f..191298cd 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -192,17 +192,17 @@ jobs: working-directory: test_apps/python_no_app run: poetry --version - # Copy _origen - - name: Copy Origen Metal (Windows) - if: matrix.os == 'windows-latest' - working-directory: .\rust\pyapi\ - run: cp .\target\debug\_origen.dll ..\..\python\origen\_origen.pyd - - # Copy _origen - - name: Copy Origen Metal (Linux) - if: matrix.os == 'ubuntu-latest' - working-directory: rust/pyapi - run: cp target/debug/lib_origen.so ../../python/origen/_origen.so + # # Copy _origen + # - name: Copy Origen Metal (Windows) + # if: matrix.os == 'windows-latest' + # working-directory: .\rust\pyapi\ + # run: cp .\target\debug\_origen.dll ..\..\python\origen\_origen.pyd + + # # Copy _origen + # - name: Copy Origen Metal (Linux) + # if: matrix.os == 'ubuntu-latest' + # working-directory: rust/pyapi + # run: cp target/debug/lib_origen.so ../../python/origen/_origen.so # Debug - name: Display python/origen directory From 4eb378215114a8f78376bb58e42723f543fa9a84 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Wed, 8 Nov 2023 20:57:18 -0600 Subject: [PATCH 122/200] Add copy step back. Slight reorder of no-app check to after CLI manipulation. --- .github/workflows/regression_test.yml | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 191298cd..e41de082 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -192,27 +192,23 @@ jobs: working-directory: test_apps/python_no_app run: poetry --version - # # Copy _origen - # - name: Copy Origen Metal (Windows) - # if: matrix.os == 'windows-latest' - # working-directory: .\rust\pyapi\ - # run: cp .\target\debug\_origen.dll ..\..\python\origen\_origen.pyd - - # # Copy _origen - # - name: Copy Origen Metal (Linux) - # if: matrix.os == 'ubuntu-latest' - # working-directory: rust/pyapi - # run: cp target/debug/lib_origen.so ../../python/origen/_origen.so + # Copy _origen + - name: Copy Origen Library (Windows) + if: matrix.os == 'windows-latest' + working-directory: .\rust\pyapi\ + run: cp .\target\debug\_origen.dll ..\..\python\origen\_origen.pyd + + # Copy _origen + - name: Copy Origen Library (Linux) + if: matrix.os == 'ubuntu-latest' + working-directory: rust/pyapi + run: cp target/debug/lib_origen.so ../../python/origen/_origen.so # Debug - name: Display python/origen directory working-directory: test_apps/python_no_app run: ls ../../python/origen - - name: Display Origen No-App Version - working-directory: test_apps/python_no_app - run: poetry run origen -vvv - - name: Show Origen Binary Location (Linux) if: matrix.os == 'ubuntu-latest' working-directory: test_apps/python_no_app @@ -251,6 +247,10 @@ jobs: echo "" poetry run where.exe origen + - name: Display Origen No-App Version + working-directory: test_apps/python_no_app + run: poetry run origen -vvv + - name: Run Python-No-App Unit Tests working-directory: test_apps/python_no_app run: poetry run pytest -vv From 0def459acbf086d5d3b696edb65cff7e3a6b3063 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Thu, 9 Nov 2023 08:09:35 -0600 Subject: [PATCH 123/200] Retry robustness update in run_origen --- python/origen/origen/__bin__/__init__.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/python/origen/origen/__bin__/__init__.py b/python/origen/origen/__bin__/__init__.py index fed02f1e..499df83a 100644 --- a/python/origen/origen/__bin__/__init__.py +++ b/python/origen/origen/__bin__/__init__.py @@ -5,13 +5,7 @@ on_windows = platform.system() == 'Windows' def run_origen(): - if on_windows: - subprocess.run([ - str(pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen")), - *sys.argv[1:] - ], shell=on_windows) - else: - subprocess.run(str( - pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath( - "origen")) + " " + " ".join(sys.argv[1:]), - shell=True) + subprocess.run([ + str(pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen")), + *sys.argv[1:] + ], shell=on_windows) From dc4ba22a3eb9a8f6d867c7c157673e985c4499fa Mon Sep 17 00:00:00 2001 From: coreyeng Date: Thu, 9 Nov 2023 12:54:01 -0600 Subject: [PATCH 124/200] Try using poetry's wrapper for regressions. --- .github/workflows/regression_test.yml | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index e41de082..93a52484 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -152,15 +152,15 @@ jobs: echo "" poetry run where.exe origen - # TODO GA: Regressions: need to see why this is the case and come up with a better solution - - name: Remove Poetry's Origen Wrapper (Linux) - if: matrix.os == 'ubuntu-latest' - working-directory: test_apps/python_app - run: poetry run which origen | xargs rm - - name: Remove Poetry's Origen Wrapper (Windows) - if: matrix.os == 'windows-latest' - working-directory: test_apps/python_app - run: poetry run where.exe origen | select -first 1 | rm + # # TODO GA: Regressions: need to see why this is the case and come up with a better solution + # - name: Remove Poetry's Origen Wrapper (Linux) + # if: matrix.os == 'ubuntu-latest' + # working-directory: test_apps/python_app + # run: poetry run which origen | xargs rm + # - name: Remove Poetry's Origen Wrapper (Windows) + # if: matrix.os == 'windows-latest' + # working-directory: test_apps/python_app + # run: poetry run where.exe origen | select -first 1 | rm - name: Show Origen Binary Location (Linux) if: matrix.os == 'ubuntu-latest' @@ -223,15 +223,15 @@ jobs: echo "" poetry run where.exe origen - # TODO GA: Regressions: need to see why this is the case and come up with a better solution - - name: Remove Poetry's Origen Wrapper (Linux) - if: matrix.os == 'ubuntu-latest' - working-directory: test_apps/python_no_app - run: poetry run which origen | xargs rm - - name: Remove Poetry's Origen Wrapper (Windows) - if: matrix.os == 'windows-latest' - working-directory: test_apps/python_no_app - run: poetry run where.exe origen | select -first 1 | rm + # # TODO GA: Regressions: need to see why this is the case and come up with a better solution + # - name: Remove Poetry's Origen Wrapper (Linux) + # if: matrix.os == 'ubuntu-latest' + # working-directory: test_apps/python_no_app + # run: poetry run which origen | xargs rm + # - name: Remove Poetry's Origen Wrapper (Windows) + # if: matrix.os == 'windows-latest' + # working-directory: test_apps/python_no_app + # run: poetry run where.exe origen | select -first 1 | rm - name: Show Origen Binary Location (Linux) if: matrix.os == 'ubuntu-latest' From fd621b9399b312b8de2c4f39207cacebd95c373c Mon Sep 17 00:00:00 2001 From: coreyeng Date: Thu, 9 Nov 2023 17:01:47 -0600 Subject: [PATCH 125/200] Copy origen binary, imitating full build step --- .github/workflows/regression_test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 93a52484..43d4e977 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -152,6 +152,14 @@ jobs: echo "" poetry run where.exe origen + # TODO GA: Add to build script? + - name: Move Origen executable (Linux) + if: matrix.os == 'ubuntu-latest' + run: cp rust/origen/target/debug/origen python/origen/origen/__bin__/bin + - name: Move Origen executable (Windows) + if: matrix.os == 'windows-latest' + run: cp rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin + # # TODO GA: Regressions: need to see why this is the case and come up with a better solution # - name: Remove Poetry's Origen Wrapper (Linux) # if: matrix.os == 'ubuntu-latest' From a831575529f71d2ae8e590b0364ecee44af0e428 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sun, 12 Nov 2023 13:05:50 -0600 Subject: [PATCH 126/200] Update CLI dirs. --- python/origen/origen/__bin__/__init__.py | 5 +++-- test_apps/no_workspace/t_invocation_env.py | 9 +++++---- test_apps/no_workspace/test_user_install.py | 1 - test_apps/python_app/tests/cli_test.py | 3 ++- .../python_no_app/tests/test_global_invocation.py | 1 - .../test_apps_shared_test_helpers/cli/__init__.py | 10 ++++++---- .../test_apps_shared_test_helpers/cli/dirs.py | 8 ++++++++ 7 files changed, 24 insertions(+), 13 deletions(-) create mode 100644 test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py diff --git a/python/origen/origen/__bin__/__init__.py b/python/origen/origen/__bin__/__init__.py index 499df83a..cde91624 100644 --- a/python/origen/origen/__bin__/__init__.py +++ b/python/origen/origen/__bin__/__init__.py @@ -5,7 +5,8 @@ on_windows = platform.system() == 'Windows' def run_origen(): - subprocess.run([ + return subprocess.run([ str(pathlib.Path(__file__).parent.absolute().joinpath("bin").joinpath("origen")), *sys.argv[1:] - ], shell=on_windows) + ], shell=on_windows, check=False).returncode + diff --git a/test_apps/no_workspace/t_invocation_env.py b/test_apps/no_workspace/t_invocation_env.py index 683bb391..e3339931 100644 --- a/test_apps/no_workspace/t_invocation_env.py +++ b/test_apps/no_workspace/t_invocation_env.py @@ -11,12 +11,13 @@ from types import ModuleType from pathlib import Path, PosixPath, WindowsPath +sys.path.append(str(pathlib.Path(__file__).parent.parent.joinpath("test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli"))) +from dirs import o2_root, cli_dir + PyProjectSrc = _origen.infrastructure.pyproject.PyProjectSrc toml = "pyproject.toml" lockfile = "poetry.lock" no_workspace_test_dir = pathlib.Path(__file__).parent -o2_root = no_workspace_test_dir.parent.parent -debug_cli_dir = o2_root.joinpath(f"rust/origen/target/debug") eval_scripts_dir = no_workspace_test_dir.joinpath("eval_scripts") status_eval_script = eval_scripts_dir.joinpath("print_status.py") pl_names_eval_script = eval_scripts_dir.joinpath("print_pl_names.py") @@ -30,7 +31,7 @@ class T_InvocationBaseTests(CLI): site_cli_dir = site_cli_dir templates_dir = no_workspace_test_dir.joinpath("templates") templates_out_dir = templates_dir.joinpath("output") - debug_cli_dir = debug_cli_dir + cli_dir = cli_dir PyProjectSrc = PyProjectSrc @classmethod @@ -159,7 +160,7 @@ def get_plugin_names(self): # TEST_NEEDED Invocations: check 'origen -h' in various contexts? @pytest.mark.skip def test_origen_h(self): - fail + raise NotImplementedError def test_plugins(self): pls = self.get_plugin_names() diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index 364e0062..8fdd2332 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -11,7 +11,6 @@ def set_params(cls): cls.target_pyproj_dir = cls.user_install_dir cls.move_pyproject = False cls.invocation = PyProjectSrc.UserGlobal - cls.cli_dir = cls.debug_cli_dir cls.file_based_evals = True @classmethod diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index 04ea18cc..b357612f 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -3,6 +3,8 @@ import os import origen +pytest.register_assert_rewrite("t_invocation_env") + sys.path.insert(-1, str(pathlib.Path(__file__).parent.parent.parent.joinpath("no_workspace"))) from t_invocation_env import T_InvocationBaseTests @@ -75,5 +77,4 @@ class TestAppInvocation(T_InvocationBaseTests): @classmethod def set_params(cls): cls.invocation = cls.PyProjectSrc.App - cls.cli_dir = cls.debug_cli_dir cls.target_pyproj_dir = pathlib.Path(__file__).parent.parent diff --git a/test_apps/python_no_app/tests/test_global_invocation.py b/test_apps/python_no_app/tests/test_global_invocation.py index ec8778d4..e33b1c84 100644 --- a/test_apps/python_no_app/tests/test_global_invocation.py +++ b/test_apps/python_no_app/tests/test_global_invocation.py @@ -19,7 +19,6 @@ class TestWorkspaceInvocation(T_InvocationBaseTests): @classmethod def set_params(cls): cls.invocation = cls.PyProjectSrc.Workspace - cls.cli_dir = cls.debug_cli_dir cls.target_pyproj_dir = working_dir class TestGlobalFEIntegration: diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py index 25b2649f..09d6a629 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/__init__.py @@ -8,6 +8,7 @@ from .cmd_models.exts import ExtensionDrivers from .cmd_models.plugins import Plugins from .error_cases import ErrorCases +from . import dirs from .assertions import AssertionHelpers @@ -142,7 +143,8 @@ def add_no_pl_aux_cfg(cls, cmd): configs = Configs() - project_dir = Path(__file__).parent.parent.parent.parent.parent - cli_dir = project_dir.joinpath("rust/origen/target/debug") - test_apps_dir = project_dir.joinpath("test_apps") - plugins_dir = test_apps_dir # Currently the same but may change if test_apps dir is re-organized \ No newline at end of file + project_dir = dirs.project_dir + cli_dir = dirs.cli_dir + rust_build_cli_dir = dirs.rust_build_cli_dir + test_apps_dir = dirs.test_apps_dir + plugins_dir = dirs.plugins_dir \ No newline at end of file diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py new file mode 100644 index 00000000..4a899e14 --- /dev/null +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py @@ -0,0 +1,8 @@ +from pathlib import Path + +project_dir = Path(__file__).parent.parent.parent.parent.parent +o2_root = project_dir +cli_dir = project_dir.joinpath(f"python/origen/origen/__bin__/bin") +rust_build_cli_dir = project_dir.joinpath(f"rust/origen/target/debug") +test_apps_dir = project_dir.joinpath("test_apps") +plugins_dir = test_apps_dir # Currently the same but may change if test_apps dir is re-organized \ No newline at end of file From 9af92745ad5698f37894a6db749d53967878d83d Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sun, 12 Nov 2023 14:37:13 -0600 Subject: [PATCH 127/200] Try moving origen CLI earlier --- .github/workflows/regression_test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 43d4e977..0d4d6141 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -296,9 +296,9 @@ jobs: - name: Get Pytest Version (Check Install) run: pytest --version - - name: Run User-Global Invocation Tests - working-directory: test_apps/no_workspace - run: pytest test_user_install.py::TestUserInstall -vv + # - name: Run User-Global Invocation Tests + # working-directory: test_apps/no_workspace + # run: pytest test_user_install.py::TestUserInstall -vv # TODO GA: Regressions: eventually want to move this into a poetry build step # For now, manually move the binary. Also keeps us from having to mess with the path across OSs @@ -310,6 +310,10 @@ jobs: if: matrix.os == 'windows-latest' run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin + - name: Run User-Global Invocation Tests + working-directory: test_apps/no_workspace + run: pytest test_user_install.py::TestUserInstall -vv + # TODO GA: Regressions: not sure why, but the tmp directory in origen_metal causes some issues # For now, just removing it. - name: Remove origen_metal tmp Directory From 1585119eca03cbfd26d052da9d9b4412782953a7 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sun, 12 Nov 2023 19:51:57 -0600 Subject: [PATCH 128/200] Move user install tests to after global origen install --- .github/workflows/regression_test.yml | 8 ++++---- test_apps/no_workspace/test_user_install.py | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 0d4d6141..0b07d1b7 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -310,10 +310,6 @@ jobs: if: matrix.os == 'windows-latest' run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin - - name: Run User-Global Invocation Tests - working-directory: test_apps/no_workspace - run: pytest test_user_install.py::TestUserInstall -vv - # TODO GA: Regressions: not sure why, but the tmp directory in origen_metal causes some issues # For now, just removing it. - name: Remove origen_metal tmp Directory @@ -338,6 +334,10 @@ jobs: if: matrix.os == 'windows-latest' run: where.exe origen + - name: Run User-Global Invocation Tests + working-directory: test_apps/no_workspace + run: pytest test_user_install.py::TestUserInstall -vv + # Should be no pyprojects in the root so far. Start with no-workspace tests - name: Run No-Workspace-No-Plugins Tests working-directory: test_apps/no_workspace diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index 8fdd2332..8287ed41 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -12,6 +12,7 @@ def set_params(cls): cls.move_pyproject = False cls.invocation = PyProjectSrc.UserGlobal cls.file_based_evals = True + cls.cli_dir = cls.site_cli_dir @classmethod def setup_method(cls): From c458a1a0cfd3944208a3c69541974f0c3aa58b60 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sun, 12 Nov 2023 20:53:48 -0600 Subject: [PATCH 129/200] Regressions debug --- .github/workflows/regression_test.yml | 9 +++++---- test_apps/no_workspace/test_user_install.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 0b07d1b7..29223bde 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -303,12 +303,13 @@ jobs: # TODO GA: Regressions: eventually want to move this into a poetry build step # For now, manually move the binary. Also keeps us from having to mess with the path across OSs # 'mv' command should be be fine for both linux & powershell - - name: Move Origen executable (Linux) + # Update: remove binary since it is being copied earlier. + - name: Remove Origen executable (Linux) if: matrix.os == 'ubuntu-latest' - run: mv rust/origen/target/debug/origen python/origen/origen/__bin__/bin - - name: Move Origen executable (Windows) + run: rm rust/origen/target/debug/origen python/origen/origen/__bin__/bin + - name: Remove Origen executable (Windows) if: matrix.os == 'windows-latest' - run: mv rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin + run: rm rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin # TODO GA: Regressions: not sure why, but the tmp directory in origen_metal causes some issues # For now, just removing it. diff --git a/test_apps/no_workspace/test_user_install.py b/test_apps/no_workspace/test_user_install.py index 8287ed41..a491eae6 100644 --- a/test_apps/no_workspace/test_user_install.py +++ b/test_apps/no_workspace/test_user_install.py @@ -123,7 +123,7 @@ def teardown_method(cls): def test_error_message(self): # Pyproject found but malformed should print the poetry errors as it tries to run. # Should not fall back to global install, even if its available. Pyproject should be fixed. - out = T_InvocationBaseTests.global_cmds.eval.run("1==1", run_opts={"return_details": True}) + out = T_InvocationBaseTests.global_cmds.eval.gen_error("1==1", run_opts={"return_details": True}, return_full=True) err = f"Invalid TOML file {self.malformed_pyproject.joinpath('pyproject.toml').as_posix()}" assert err in out["stderr"] assert out["stdout"] == '' From 6e5bbfc38938200d1006bdedb87378c4209a1a06 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sun, 12 Nov 2023 21:37:33 -0600 Subject: [PATCH 130/200] Regressions debug --- .github/workflows/regression_test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 29223bde..c82636e3 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -306,10 +306,12 @@ jobs: # Update: remove binary since it is being copied earlier. - name: Remove Origen executable (Linux) if: matrix.os == 'ubuntu-latest' - run: rm rust/origen/target/debug/origen python/origen/origen/__bin__/bin + run: rm rust/origen/target/debug/origen +# run: rm rust/origen/target/debug/origen python/origen/origen/__bin__/bin - name: Remove Origen executable (Windows) if: matrix.os == 'windows-latest' - run: rm rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin + run: rm rust/origen/target/debug/origen.exe +# run: rm rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin # TODO GA: Regressions: not sure why, but the tmp directory in origen_metal causes some issues # For now, just removing it. From ff8907b689e5a6a603f902343706a51b7223800b Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 13 Nov 2023 07:13:15 -0600 Subject: [PATCH 131/200] WiP: Github release during publish --- .github/workflows/publish.yml | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2e30a341..d1fc2110 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,10 +20,14 @@ on: description: Publish To PyPI Test Server required: true default: "false" - # publish_github_release: - # description: Publish built packages to Github Release page - # required: true - # default: false + publish_github_release: + description: Publish built packages to Github Release page + required: true + default: "false" + prerelease: + description: Indicate that any release is a pre/dev release + required: true + default: "true" jobs: build: strategy: @@ -83,7 +87,7 @@ jobs: - name: Upload Origen Metal Python Package Artifact uses: actions/upload-artifact@v2 with: - name: origen-metal-wheels + name: wheels path: python/origen_metal/dist/origen_metal* # - name: Build Origen CLI @@ -124,7 +128,7 @@ jobs: - name: Upload Origen Python Package Artifact uses: actions/upload-artifact@v2 with: - name: origen-wheels + name: wheels path: python/origen/dist/origen* # - name: "Publish To PyPi" @@ -159,3 +163,22 @@ jobs: # run: | # echo "Publishing to Github Releases" # # ... + release: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: wheels + path: wheels + + - name: Check wheels directory + run: ls -al ./wheels + + - name: Generate Github Release + if: ${{ github.event.inputs.publish_pypi_test == 'true' }} + uses: ncipollo/release-action@v1 + with: + artifacts: ./wheels + artifactErrorsFailBuild: true + prerelease: ${{ github.event.inputs.prerelease == 'true' }} From e165ee295152da055111535ab2647218bb2402e2 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 13 Nov 2023 12:56:00 -0600 Subject: [PATCH 132/200] Fix GH release condition --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d1fc2110..a78d893a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -176,7 +176,7 @@ jobs: run: ls -al ./wheels - name: Generate Github Release - if: ${{ github.event.inputs.publish_pypi_test == 'true' }} + if: ${{ github.event.inputs.publish_github_release == 'true' }} uses: ncipollo/release-action@v1 with: artifacts: ./wheels From 9eef87f446b68cf93ecd164f19c496ec96c8c93c Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 13 Nov 2023 15:18:23 -0600 Subject: [PATCH 133/200] Try adding a checkout to see if the github release action picks up git ref. --- .github/workflows/publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a78d893a..de43074d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -167,6 +167,8 @@ jobs: needs: build runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 + - uses: actions/download-artifact@v3 with: name: wheels From b41ca4c13b417cdb4623a4aeffcdcb13e7e1db76 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 13 Nov 2023 16:47:03 -0600 Subject: [PATCH 134/200] Try adding commit to release --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index de43074d..a997cb60 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -184,3 +184,4 @@ jobs: artifacts: ./wheels artifactErrorsFailBuild: true prerelease: ${{ github.event.inputs.prerelease == 'true' }} + commit: ${{ github.sha }} From 6078384ffc0a571909ff934490ecb36e98263147 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 14 Nov 2023 07:26:47 -0600 Subject: [PATCH 135/200] Try adding commit-based tag. --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a997cb60..753f6927 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -185,3 +185,4 @@ jobs: artifactErrorsFailBuild: true prerelease: ${{ github.event.inputs.prerelease == 'true' }} commit: ${{ github.sha }} + tag: $(git rev-parse --short HEAD) \ No newline at end of file From c9f05d7c8c1f408def4c5be3cc3810c6080d30e7 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 14 Nov 2023 13:12:03 -0600 Subject: [PATCH 136/200] WiP: Publish GH Release --- .github/workflows/publish.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 753f6927..23704791 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -174,8 +174,13 @@ jobs: name: wheels path: wheels - - name: Check wheels directory - run: ls -al ./wheels + + - name: Figure Out Tag + run: | + echo "tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + + - name: Display Tag + run: echo ${{ env.tag }} - name: Generate Github Release if: ${{ github.event.inputs.publish_github_release == 'true' }} @@ -185,4 +190,4 @@ jobs: artifactErrorsFailBuild: true prerelease: ${{ github.event.inputs.prerelease == 'true' }} commit: ${{ github.sha }} - tag: $(git rev-parse --short HEAD) \ No newline at end of file + tag: ${{ env.tag }} \ No newline at end of file From 85b7fbdd82a19d6b648ea0539c35dddecb37e4f9 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 14 Nov 2023 16:44:36 -0600 Subject: [PATCH 137/200] WiP: GH Release. Zip wheels for release upload. --- .github/workflows/publish.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 23704791..bb578968 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -174,6 +174,14 @@ jobs: name: wheels path: wheels + - name: Check wheels directory + run: ls -al ./wheels + + - uses: vimtor/action-zip@v1.1 + with: + files: wheels + dest: wheels.zip + - name: Figure Out Tag run: | @@ -186,7 +194,7 @@ jobs: if: ${{ github.event.inputs.publish_github_release == 'true' }} uses: ncipollo/release-action@v1 with: - artifacts: ./wheels + artifacts: ./wheels.zip artifactErrorsFailBuild: true prerelease: ${{ github.event.inputs.prerelease == 'true' }} commit: ${{ github.sha }} From 7418339ef207cd4b76a7f1065e6bcbd6a8bf6571 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 14 Nov 2023 19:43:20 -0600 Subject: [PATCH 138/200] Add commit preface to tag. Bump upload artifact version --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bb578968..23bff88d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -85,7 +85,7 @@ jobs: run: ls - name: Upload Origen Metal Python Package Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: wheels path: python/origen_metal/dist/origen_metal* @@ -126,7 +126,7 @@ jobs: run: ls - name: Upload Origen Python Package Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: wheels path: python/origen/dist/origen* @@ -188,7 +188,7 @@ jobs: echo "tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Display Tag - run: echo ${{ env.tag }} + run: echo commit-${{ env.tag }} - name: Generate Github Release if: ${{ github.event.inputs.publish_github_release == 'true' }} From 14a1254d98b3015b2cd8cd5adc2c140071af90ab Mon Sep 17 00:00:00 2001 From: coreyeng Date: Tue, 14 Nov 2023 20:55:58 -0600 Subject: [PATCH 139/200] Clean up dead code in regressions. Run metal tests across python versions --- .github/workflows/regression_test.yml | 40 --------------------------- 1 file changed, 40 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index c82636e3..6f0a2750 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -160,16 +160,6 @@ jobs: if: matrix.os == 'windows-latest' run: cp rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin - # # TODO GA: Regressions: need to see why this is the case and come up with a better solution - # - name: Remove Poetry's Origen Wrapper (Linux) - # if: matrix.os == 'ubuntu-latest' - # working-directory: test_apps/python_app - # run: poetry run which origen | xargs rm - # - name: Remove Poetry's Origen Wrapper (Windows) - # if: matrix.os == 'windows-latest' - # working-directory: test_apps/python_app - # run: poetry run where.exe origen | select -first 1 | rm - - name: Show Origen Binary Location (Linux) if: matrix.os == 'ubuntu-latest' working-directory: test_apps/python_app @@ -217,30 +207,6 @@ jobs: working-directory: test_apps/python_no_app run: ls ../../python/origen - - name: Show Origen Binary Location (Linux) - if: matrix.os == 'ubuntu-latest' - working-directory: test_apps/python_no_app - run: | - which origen - poetry run which origen - - name: Show Origen Binary Location (Windows) - if: matrix.os == 'windows-latest' - working-directory: test_apps/python_no_app - run: | - where.exe origen - echo "" - poetry run where.exe origen - - # # TODO GA: Regressions: need to see why this is the case and come up with a better solution - # - name: Remove Poetry's Origen Wrapper (Linux) - # if: matrix.os == 'ubuntu-latest' - # working-directory: test_apps/python_no_app - # run: poetry run which origen | xargs rm - # - name: Remove Poetry's Origen Wrapper (Windows) - # if: matrix.os == 'windows-latest' - # working-directory: test_apps/python_no_app - # run: poetry run where.exe origen | select -first 1 | rm - - name: Show Origen Binary Location (Linux) if: matrix.os == 'ubuntu-latest' working-directory: test_apps/python_no_app @@ -271,11 +237,6 @@ jobs: - name: Build PyAPI - Metal run: origen origen build --metal - # - name: Install Poetry - # uses: abatilo/actions-poetry@v2.0.0 - # with: - # poetry-version: 1.1.14 - - name: Setup Python Env - Metal working-directory: python/origen_metal run: poetry install @@ -285,7 +246,6 @@ jobs: run: poetry run pytest -vv - name: Run Rust Tests - Metal - if: matrix.python-version == 3.8 working-directory: rust/origen_metal run: cargo test From 9ef28f88d35cc08ed1bcd34c83d3b552f2981eb4 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 14 Nov 2023 21:01:23 -0600 Subject: [PATCH 140/200] Fix commit tag during GH release. Add boolean options --- .github/workflows/publish.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 23bff88d..b15e99ab 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,9 +5,17 @@ on: origen_metal_python_package: description: Publish the Origen Metal python package default: "false" + type: choice + options: + - true + - false origen_python_package: description: Publish the Origen python package default: "false" + type: choice + options: + - true + - false # build_for_debug_target: # description: If 'true', does not use the '--release' switch when building Rust libraries # required: false @@ -20,14 +28,26 @@ on: description: Publish To PyPI Test Server required: true default: "false" + type: choice + options: + - true + - false publish_github_release: description: Publish built packages to Github Release page required: true default: "false" + type: choice + options: + - true + - false prerelease: description: Indicate that any release is a pre/dev release required: true default: "true" + type: choice + options: + - true + - false jobs: build: strategy: @@ -185,10 +205,10 @@ jobs: - name: Figure Out Tag run: | - echo "tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV + echo "tag=commit-$(git rev-parse --short HEAD)" >> $GITHUB_ENV - name: Display Tag - run: echo commit-${{ env.tag }} + run: echo ${{ env.tag }} - name: Generate Github Release if: ${{ github.event.inputs.publish_github_release == 'true' }} From eef3d78122fb4e6d33e9ce3f7b18346225fa56a0 Mon Sep 17 00:00:00 2001 From: coreyeng Date: Wed, 15 Nov 2023 16:43:33 -0600 Subject: [PATCH 141/200] Prototype using 'retry' action for finicky steps --- .github/workflows/regression_test.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 6f0a2750..91497e0d 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -175,16 +175,22 @@ jobs: poetry run where.exe origen - name: Run Python-App Unit Tests - working-directory: test_apps/python_app - run: origen exec pytest -vv - + uses: Wandalen/wretry.action@v1.3.0 + with: + attempt_limit: 2 + current_path: test_apps/python_app + command: origen exec pytest -vv + - name: Run Python-App Diff Tests working-directory: test_apps/python_app run: origen examples - name: Setup No-App Env - working-directory: test_apps/python_no_app - run: poetry install + uses: Wandalen/wretry.action@v1.3.0 + with: + attempt_limit: 2 + current_path: test_apps/python_no_app + command: poetry install - name: Display Poetry Version (No-App) working-directory: test_apps/python_no_app From 330b70910431101ec8939373424fc9f9c0f6dc5f Mon Sep 17 00:00:00 2001 From: corey Date: Fri, 17 Nov 2023 13:13:54 -0600 Subject: [PATCH 142/200] WiP: Start larger publishing effort --- .github/workflows/publish.yml | 128 +++++++++++++++++++++++++++++----- 1 file changed, 109 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b15e99ab..2cce86fa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -107,9 +107,19 @@ jobs: - name: Upload Origen Metal Python Package Artifact uses: actions/upload-artifact@v3 with: - name: wheels + name: om_wheels path: python/origen_metal/dist/origen_metal* + - name: Get OM Python Package Version + working-directory: python/origen_metal + run: poetry version -s > om_version.txt + + - name: Upload OM Python Package Version + uses: actions/upload-artifact@v3 + with: + name: om_version + path: python/origen_metal/om_version.txt + # - name: Build Origen CLI # working-directory: rust/origen/cli # run: cargo build --bins --release @@ -148,9 +158,19 @@ jobs: - name: Upload Origen Python Package Artifact uses: actions/upload-artifact@v3 with: - name: wheels + name: origen_wheels path: python/origen/dist/origen* + - name: Get Origen Python Package Version + working-directory: python/origen + run: poetry version -s > origen_version.txt + + - name: Upload Origen Python Package Version + uses: actions/upload-artifact@v3 + with: + name: origen_version + path: python/origen/origen_version.txt + # - name: "Publish To PyPi" # if: ${{ github.event.inputs.publish_pypi }} == true # working_directory: python @@ -158,14 +178,14 @@ jobs: # echo "Publishing to PyPi" # # poetry publish ... - - name: "Publish To PyPi Test Server" - if: ${{ github.event.inputs.publish_pypi_test == 'true' }} - working-directory: python - run: | - echo "Publishing to PyPi Test Server" - poetry config repositories.pypi-test https://test.pypi.org/legacy/ - poetry config pypi-token.pypi-test ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} - poetry publish -r pypi-test + # - name: "Publish To PyPi Test Server" + # if: ${{ github.event.inputs.publish_pypi_test == 'true' }} + # working-directory: python + # run: | + # echo "Publishing to PyPi Test Server" + # poetry config repositories.pypi-test https://test.pypi.org/legacy/ + # poetry config pypi-token.pypi-test ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} + # poetry publish -r pypi-test # - name: pypi-publish # if: ${{ github.event.inputs.publish_pypi_test == 'true' }} @@ -183,25 +203,90 @@ jobs: # run: | # echo "Publishing to Github Releases" # # ... + + puublish_to_pypi_test: + needs: build + runs-on: ubuntu-latest + if: ${{ github.event.inputs.publish_pypi_test == 'true' }} + steps: + - name: Retrieve Wheels + uses: actions/download-artifact@v3 + with: + name: om_wheels + path: om_wheels + + - name: List OM Wheels + run: ls -al ./om_wheels + + - name: Push To PyPi Test Server + uses: pypa/gh-action-pypi-publish@v1.8.10 + with: + packages-dir: om_wheels + # user: __token__ + password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ + + - name: Push To PyPi Test Server + uses: pypa/gh-action-pypi-publish@v1.8.10 + with: + packages-dir: origen_wheels + # user: __token__ + password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} + repository-url: https://test.pypi.org/legacy/ + release: needs: build runs-on: ubuntu-latest + if: ${{ github.event.inputs.publish_github_release == 'true' }} steps: - uses: actions/checkout@v2 - uses: actions/download-artifact@v3 with: - name: wheels - path: wheels + name: om_wheels + path: origen_metal + + - uses: actions/download-artifact@v3 + with: + name: origen_wheels + path: origen + + - name: Check wheels directories + run: | + ls -al ./origen_metal + ls -al ./oigen - - name: Check wheels directory - run: ls -al ./wheels + - uses: actions/download-artifact@v3 + with: + name: om_version + path: ./ + + - uses: actions/download-artifact@v3 + with: + name: origen_version + path: ./ - uses: vimtor/action-zip@v1.1 with: - files: wheels - dest: wheels.zip + files: om_wheels + dest: om_wheels.zip + - uses: vimtor/action-zip@v1.1 + with: + files: origen_wheels + dest: origen_wheels.zip + + - name: Get OM/Origen Versions + run: | + echo cat ./om_version + echo cat ./origen_version + echo "om_version=$(cat ./om_version)" >> $GITHUB_ENV + echo "origen_version=$(cat ./origen_version)" >> $GITHUB_ENV + + - name: Show Versions + run: | + run: echo ${{ env.om_version }} + run: echo ${{ env.origen_version }} - name: Figure Out Tag run: | @@ -211,11 +296,16 @@ jobs: run: echo ${{ env.tag }} - name: Generate Github Release - if: ${{ github.event.inputs.publish_github_release == 'true' }} uses: ncipollo/release-action@v1 with: - artifacts: ./wheels.zip + artifacts: ./om_wheels.zip, ./origen_wheels.zip artifactErrorsFailBuild: true prerelease: ${{ github.event.inputs.prerelease == 'true' }} commit: ${{ github.sha }} - tag: ${{ env.tag }} \ No newline at end of file + tag: ${{ env.tag }} + cleanup: + needs: [build, puublish_to_pypi_test, release] + runs-on: ubuntu-latest + if: ${{ always() }} + steps: + - run: echo Begin Clean Up... \ No newline at end of file From 581515eb1229b346cbe5ed51f63c87c564a19dc1 Mon Sep 17 00:00:00 2001 From: corey Date: Fri, 17 Nov 2023 19:42:54 -0600 Subject: [PATCH 143/200] Publishing: bugfix in GH release. Try not validating wheel metadata --- .github/workflows/publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2cce86fa..2425981d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -225,6 +225,7 @@ jobs: # user: __token__ password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ + verify_metadata: false - name: Push To PyPi Test Server uses: pypa/gh-action-pypi-publish@v1.8.10 @@ -233,6 +234,7 @@ jobs: # user: __token__ password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ + verify_metadata: false release: needs: build @@ -254,7 +256,7 @@ jobs: - name: Check wheels directories run: | ls -al ./origen_metal - ls -al ./oigen + ls -al ./origen - uses: actions/download-artifact@v3 with: From 96210d230983b89f5b2c3936c55f45efc4897385 Mon Sep 17 00:00:00 2001 From: corey Date: Fri, 17 Nov 2023 20:54:54 -0600 Subject: [PATCH 144/200] Publishing: Debug action --- .github/workflows/publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2425981d..ad14543b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -223,7 +223,7 @@ jobs: with: packages-dir: om_wheels # user: __token__ - password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} + password: ${{ secrets.PYPI_ORIGEN_METAL }} repository-url: https://test.pypi.org/legacy/ verify_metadata: false @@ -280,15 +280,15 @@ jobs: - name: Get OM/Origen Versions run: | - echo cat ./om_version - echo cat ./origen_version + cat ./om_version.txt + cat ./origen_version.txt echo "om_version=$(cat ./om_version)" >> $GITHUB_ENV echo "origen_version=$(cat ./origen_version)" >> $GITHUB_ENV - name: Show Versions run: | - run: echo ${{ env.om_version }} - run: echo ${{ env.origen_version }} + echo ${{ env.om_version }} + echo ${{ env.origen_version }} - name: Figure Out Tag run: | From dc9b5f3c9598cd8ab7f4087cda91315fb4648859 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 18 Nov 2023 07:31:54 -0600 Subject: [PATCH 145/200] Publishing: Try just releasing origen to test server. Debug getting info to release job --- .github/workflows/publish.yml | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ad14543b..0e8fc57f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -218,14 +218,14 @@ jobs: - name: List OM Wheels run: ls -al ./om_wheels - - name: Push To PyPi Test Server - uses: pypa/gh-action-pypi-publish@v1.8.10 - with: - packages-dir: om_wheels - # user: __token__ - password: ${{ secrets.PYPI_ORIGEN_METAL }} - repository-url: https://test.pypi.org/legacy/ - verify_metadata: false + # - name: Push To PyPi Test Server + # uses: pypa/gh-action-pypi-publish@v1.8.10 + # with: + # packages-dir: om_wheels + # # user: __token__ + # password: ${{ secrets.PYPI_ORIGEN_METAL }} + # repository-url: https://test.pypi.org/legacy/ + # verify_metadata: false - name: Push To PyPi Test Server uses: pypa/gh-action-pypi-publish@v1.8.10 @@ -261,12 +261,10 @@ jobs: - uses: actions/download-artifact@v3 with: name: om_version - path: ./ - uses: actions/download-artifact@v3 with: name: origen_version - path: ./ - uses: vimtor/action-zip@v1.1 with: @@ -280,6 +278,7 @@ jobs: - name: Get OM/Origen Versions run: | + ls -al cat ./om_version.txt cat ./origen_version.txt echo "om_version=$(cat ./om_version)" >> $GITHUB_ENV @@ -297,14 +296,14 @@ jobs: - name: Display Tag run: echo ${{ env.tag }} - - name: Generate Github Release - uses: ncipollo/release-action@v1 - with: - artifacts: ./om_wheels.zip, ./origen_wheels.zip - artifactErrorsFailBuild: true - prerelease: ${{ github.event.inputs.prerelease == 'true' }} - commit: ${{ github.sha }} - tag: ${{ env.tag }} + # - name: Generate Github Release + # uses: ncipollo/release-action@v1 + # with: + # artifacts: ./om_wheels.zip, ./origen_wheels.zip + # artifactErrorsFailBuild: true + # prerelease: ${{ github.event.inputs.prerelease == 'true' }} + # commit: ${{ github.sha }} + # tag: ${{ env.tag }} cleanup: needs: [build, puublish_to_pypi_test, release] runs-on: ubuntu-latest From f768b78ca00439743b35116d8b5e6cf8f685e371 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 18 Nov 2023 13:32:07 -0600 Subject: [PATCH 146/200] Publishing: WiP --- .github/workflows/publish.yml | 38 +++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0e8fc57f..535dfac7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,6 +48,9 @@ on: options: - true - false +env: + om_ver_file: om_version + origen_ver_file: origen_version jobs: build: strategy: @@ -112,13 +115,13 @@ jobs: - name: Get OM Python Package Version working-directory: python/origen_metal - run: poetry version -s > om_version.txt + run: poetry version -s > ${{ env.om_ver_file }} - name: Upload OM Python Package Version uses: actions/upload-artifact@v3 with: - name: om_version - path: python/origen_metal/om_version.txt + name: ${{ env.om_ver_file }} + path: python/origen_metal/${{ env.om_ver_file }} # - name: Build Origen CLI # working-directory: rust/origen/cli @@ -163,13 +166,13 @@ jobs: - name: Get Origen Python Package Version working-directory: python/origen - run: poetry version -s > origen_version.txt + run: poetry version -s > ${{ env.origen_ver_file }} - name: Upload Origen Python Package Version uses: actions/upload-artifact@v3 with: - name: origen_version - path: python/origen/origen_version.txt + name: ${{ env.origen_ver_file }} + path: python/origen/${{ env.origen_ver_file }} # - name: "Publish To PyPi" # if: ${{ github.event.inputs.publish_pypi }} == true @@ -227,6 +230,15 @@ jobs: # repository-url: https://test.pypi.org/legacy/ # verify_metadata: false + - name: Retrieve Wheels + uses: actions/download-artifact@v3 + with: + name: origen_wheels + path: origen_wheels + + - name: List Origen Wheels + run: ls -al ./origen_wheels + - name: Push To PyPi Test Server uses: pypa/gh-action-pypi-publish@v1.8.10 with: @@ -234,7 +246,7 @@ jobs: # user: __token__ password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ - verify_metadata: false + verify-metadata: false release: needs: build @@ -260,11 +272,11 @@ jobs: - uses: actions/download-artifact@v3 with: - name: om_version + name: ${{ env.om_ver_file }} - uses: actions/download-artifact@v3 with: - name: origen_version + name: ${{ env.origen_ver_file }} - uses: vimtor/action-zip@v1.1 with: @@ -279,10 +291,10 @@ jobs: - name: Get OM/Origen Versions run: | ls -al - cat ./om_version.txt - cat ./origen_version.txt - echo "om_version=$(cat ./om_version)" >> $GITHUB_ENV - echo "origen_version=$(cat ./origen_version)" >> $GITHUB_ENV + cat ./${{ env.om_ver_file }} + cat ./${{ env.origen_ver_file }} + echo "om_version=$(cat ./${{ env.om_ver_file }})" >> $GITHUB_ENV + echo "origen_version=$(cat ./${{ env.origen_ver_file }})" >> $GITHUB_ENV - name: Show Versions run: | From 0c442fa2a6a094d4979333ec67906e32b8e373b9 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 9 Dec 2023 16:55:39 -0600 Subject: [PATCH 147/200] WiP O2 Publishing: Bump git2 version. Support getting/increment versions in pyprojects. Additional GA support. Start publishing O2 python package command. --- rust/origen/Cargo.lock | 103 ++++++--- rust/origen/Cargo.toml | 2 - .../cli/src/commands/develop_origen/mod.rs | 5 +- .../src/commands/develop_origen/publish.rs | 185 +++++++++++++++++ rust/origen/src/utility/github.rs | 195 ++++++++++++++---- rust/origen/src/utility/release_scribe.rs | 2 +- rust/origen/src/utility/version.rs | 143 ++++++++++++- rust/origen_metal/Cargo.toml | 4 +- rust/origen_metal/src/lib.rs | 2 + .../utils/revision_control/supported/git.rs | 28 ++- rust/origen_metal/src/utils/terminal.rs | 28 +++ 11 files changed, 618 insertions(+), 79 deletions(-) create mode 100644 rust/origen/cli/src/commands/develop_origen/publish.rs diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index 1ec8d2a3..d2886918 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -77,7 +77,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.11", "once_cell", "version_check", ] @@ -398,11 +398,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.69" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -474,7 +475,7 @@ dependencies = [ "atty", "bitflags 1.3.2", "clap_lex", - "indexmap", + "indexmap 1.7.0", "strsim 0.10.0", "termcolor", "textwrap 0.16.0", @@ -497,7 +498,7 @@ dependencies = [ "built", "clap 3.2.23", "flate2", - "indexmap", + "indexmap 1.7.0", "lazy_static", "online", "origen", @@ -1091,6 +1092,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "error-chain" version = "0.12.4" @@ -1377,13 +1384,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -1404,11 +1411,11 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "git2" -version = "0.13.21" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659cd14835e75b64d9dba5b660463506763cf0aa6cb640aeeb0e98d841093490" +checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.3.3", "libc", "libgit2-sys", "log", @@ -1458,7 +1465,7 @@ dependencies = [ "fnv", "futures 0.1.31", "http 0.1.21", - "indexmap", + "indexmap 1.7.0", "log", "slab", "string", @@ -1477,7 +1484,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.9", - "indexmap", + "indexmap 1.7.0", "slab", "tokio 1.29.1", "tokio-util", @@ -1499,6 +1506,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" + [[package]] name = "heck" version = "0.3.3" @@ -1817,6 +1830,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.2", +] + [[package]] name = "indoc" version = "1.0.6" @@ -2001,15 +2024,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "libgit2-sys" -version = "0.12.22+1.1.0" +version = "0.16.1+1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c53ac117c44f7042ad8d8f5681378dfbc6010e49ec2c0d1f11dfedc7a4a1c3" +checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" dependencies = [ "cc", "libc", @@ -2021,9 +2044,9 @@ dependencies = [ [[package]] name = "libssh2-sys" -version = "0.2.21" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0186af0d8f171ae6b9c4c90ec51898bad5d08a2d5e470903a50d9ad8959cbee" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" dependencies = [ "cc", "libc", @@ -2122,9 +2145,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.3.4" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" @@ -2540,13 +2563,11 @@ dependencies = [ "cargo-expand", "cfg-if 1.0.0", "chrono", - "dialoguer", "dirs 2.0.2", "enum-utils", "eval", "futures 0.3.28", - "git2", - "indexmap", + "indexmap 1.7.0", "lazy_static", "md-5", "normpath", @@ -2598,13 +2619,14 @@ dependencies = [ "cfg-if 1.0.0", "chrono", "config", + "dialoguer", "dirs 2.0.2", "email_address", "enum-display-derive", "enum-utils", "git2", "glob", - "indexmap", + "indexmap 1.7.0", "keyring", "lazy_static", "ldap3", @@ -2629,6 +2651,7 @@ dependencies = [ "termcolor", "time 0.1.44", "toml", + "toml_edit", "wait-timeout", "whoami 1.2.1", ] @@ -3210,7 +3233,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.11", ] [[package]] @@ -3352,7 +3375,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.11", "redox_syscall 0.2.10", ] @@ -4504,6 +4527,23 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "toolchain_find" version = "0.1.4" @@ -5084,6 +5124,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winnow" +version = "0.5.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.6.2" diff --git a/rust/origen/Cargo.toml b/rust/origen/Cargo.toml index 4a6552f7..65e45316 100644 --- a/rust/origen/Cargo.toml +++ b/rust/origen/Cargo.toml @@ -41,7 +41,6 @@ enum-utils = "0.1.2" shellexpand = "1.1.1" # Need to be careful with this version, couldn't build on RHEL6 with versions greater # than this. Can probably drop this constraint once NXP transitions to RHEL7. -git2 = "0.13" num-bigint = {version = "0.4.0", features = ["serde"]} # Enabling this feature stops the CLI from depending on libpython. PYO3 is only included # in origen to enable conversion of an Origen error to a PyErr. @@ -61,7 +60,6 @@ strum = { version = "0.20", features = ["derive"] } md-5 = "0.9" normpath = "0.2.0" cfg-if = "1" -dialoguer = "0.8.0" wait-timeout = "0.2.0" futures = {version = "0.3.15", features = ["executor"]} tokio = {version = "1.29", features = ["full"] } diff --git a/rust/origen/cli/src/commands/develop_origen/mod.rs b/rust/origen/cli/src/commands/develop_origen/mod.rs index 8804853a..13e10cbe 100644 --- a/rust/origen/cli/src/commands/develop_origen/mod.rs +++ b/rust/origen/cli/src/commands/develop_origen/mod.rs @@ -1,6 +1,7 @@ mod build; mod fmt; mod update_supported_python; +mod publish; use origen::Result; use super::_prelude::*; @@ -14,7 +15,8 @@ gen_core_cmd_funcs__no_exts__no_app_opts!( }}, build::build_cmd(), fmt::fmt_cmd(), - update_supported_python::update_supported_python_cmd() + update_supported_python::update_supported_python_cmd(), + publish::publish_cmd() ); pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { @@ -23,6 +25,7 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { build::BASE_CMD => build::run(subcmd), fmt::BASE_CMD => fmt::run(), update_supported_python::BASE_CMD => update_supported_python::run(subcmd), + publish::BASE_CMD => publish::run(subcmd), _ => unreachable_invalid_subc!(n) } } \ No newline at end of file diff --git a/rust/origen/cli/src/commands/develop_origen/publish.rs b/rust/origen/cli/src/commands/develop_origen/publish.rs new file mode 100644 index 00000000..2ef351f2 --- /dev/null +++ b/rust/origen/cli/src/commands/develop_origen/publish.rs @@ -0,0 +1,185 @@ +use crate::commands::_prelude::*; +use crate::STATUS; +use origen::utility::version::{Version, ReleaseType, VersionWithTOML}; +use origen::utility::github::{dispatch_workflow, get_latest_workflow_dispatch}; +use origen_metal::utils::terminal::confirm_or_exit; +use origen_metal::utils::revision_control::RevisionControlAPI; + +pub const BASE_CMD: &'static str = "publish"; + +pub const USE_CURRENT: &'static str = "current"; +pub const NO_RELEASE: &'static str = "none"; +const RELEASE_TYPES: [&str; 6] = [NO_RELEASE, USE_CURRENT, "major", "minor", "patch", "dev"]; + +pub (crate) fn publish_cmd<'a>() -> SubCmd<'a> { + core_subcmd__no_exts__no_app_opts!( + BASE_CMD, + "Release Origen and/or Origen Metal Rust Libraries and/or Python Packages", + { |cmd: App| { + cmd.arg( + Arg::new("origen_release_type") + .long("origen_release_type") + .visible_alias("origen") + .value_parser(RELEASE_TYPES) + .takes_value(true) + .help("Specify Origen Python Package's release type") + ) + .arg( + Arg::new("om_release_type") + .long("origen_metal_release_type") + .visible_alias("om") + .visible_alias("metal") + .value_parser(RELEASE_TYPES) + .takes_value(true) + .help("Specify Origen Metal Python Package's release type") + ) + .arg( + Arg::new("test_pypi") + .long("pypi_test_server") + .action(SetArgTrue) + .help("Release to PyPi test instance (https://test.pypi.org/)") + ) + .arg( + Arg::new("github_release") + .long("github_release") + .visible_alias("gh_rel") + .action(SetArgTrue) + .help("Create a GitHub release (https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases)") + ) + }} + ) +} + +use std::process::exit; +use origen_metal::utils::terminal::redln; +pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { + // TODO PublishO2 + // Make sure no other publishing actions are running + + // TODO PublishO2 + // Lock master branch + // Need to wrap below steps to ensure master will be unlocked even if there's a problem with another check + + // Check currently on master branch with attached HEAD + let git = origen_metal::utils::revision_control::RevisionControl::git(&STATUS.origen_wksp_root, vec!("git@github.com:Origen-SDK/o2.git"), None); + if !git.on_branch("master")? { + redln("Publishing must be done on the master branch!"); + exit(1); + } + + // TODO PublishO2 + // Ensure no local changes + // let status = git.status(None)?; + // if status.is_modified() { + // status.summarize(); + // redln("Changes found in workspace. Please check in your changes or stash them before rerunning"); + // exit(1); + // } + + // TODO PublishO2 + // Ensure up-to-date with remote + // Currently issues with git2-rs - cannot authenticate + // git.fetch(None)?; + // git.list_refs(None)?; + + // TODO PublishO2 Ensure a regression test passed with this commit + + // Get current versions + let om_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen_metal").join("pyproject.toml"); + let origen_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen").join("pyproject.toml"); + let mut py_om_ver = Version::from_pyproject_with_toml_handle(om_pyproject_path)?; + let mut py_origen_ver = Version::from_pyproject_with_toml_handle(origen_pyproject_path)?; + + // Extract release types + fn extract_release(invoc: &clap::ArgMatches, cli_name: &str, ver: &mut VersionWithTOML) -> Result { + if let Some(rel_type) = invoc.get_one::(cli_name) { + match rel_type.as_str() { + USE_CURRENT => Ok(true), + NO_RELEASE => Ok(false), + _ => { + ver.increment(ReleaseType::try_from(rel_type.as_str())?)?; + Ok(true) + } + } + } else { + Ok(false) + } + } + let release_py_om = extract_release(invocation, "om_release_type", &mut py_om_ver)?; + let release_py_origen = extract_release(invocation, "origen_release_type", &mut py_origen_ver)?; + + // Bump releases if needed and summarize to user + fn summarize_release(name: &str, release: bool, ver: &VersionWithTOML) -> bool { + if release { + if ver.was_version_updated() { + displayln!( + "{}: Releasing '{}' Version: {} (from {})", + name, + ver.rel_type().expect("Expected version should have been updated"), + ver.version(), + ver.orig_version() + ); + true + } else { + displayln!("{}: Releasing Current Version: {}", ver.version(), name); + false + } + } else { + displayln!("{}: No release", name); + false + } + } + displayln!("Release Summary:"); + let update_om_package = summarize_release("Origen Metal Python Package", release_py_om, &py_om_ver); + let update_origen_package = summarize_release("Origen Python Package", release_py_origen, &py_origen_ver); + confirm_or_exit(Some("Proceed with release?"), Some("Exiting without sending release request!"), None)?; + + // Update the TOMLs + // Make sure all versions updated successfully before any checking in + fn update_toml(should_update: bool, ver: &mut VersionWithTOML) -> Result<()> { + if should_update { + ver.write()?; + displayln!("Updated version in {}", ver.source().display()); + } + Ok(()) + } + displayln!("Updating versions in TOML files..."); + update_toml(update_om_package, &mut py_om_ver)?; + update_toml(update_origen_package, &mut py_origen_ver)?; + + // TODO PublishO2 Check in updated files + // if update_om_package { + // // git.checkin()?; + // } + // if update_origen_package { + // // git.checkin()?; + // } + // For now, if updating occurred, user must manually push updates and re-run publishing with updated master + // let status = git.status(None)?; + // if status.is_modified() { + // status.summarize(); + // redln("Automation is incomplete. Please check in updated files and rerun using 'current' package versions"); + // exit(1); + // } + + // TODO PublishO2 Cancel regressions if a push occurred + // If a push to master occurred, cancel the run: + // Will likely fail if libraries/packages were updated with to-be-released versions + // May delay the start of the publishing action + + // TODO PublishO2 Send Github actions request to build and release + // displayln!("Sending request to GitHub Actions to build and release the following:"); + // let inputs = std::collections::HashMap::new(); + // let res = dispatch_workflow("Origen-SDK", "o2", "publish.yml", "master", Some(inputs))?; + // let res = get_latest_workflow_dispatch("Origen-SDK", "o2", Some("publish.yml"))?; + // res.cancel()?; + // TODO PublishingO2 debug stuff to remove + // let res = origen::utility::github::get_workflow_run_by_id("Origen-SDK", "o2", 7041427651)?; + // println!("Result: {:?}", res); + // let res = get_latest_workflow_dispatch("Origen-SDK", "o2", Some("publish.yml"))?; + // println!("Result: {:?}", res); + // res.refresh()?; + redln("Automation is incomplete"); + + Ok(()) +} \ No newline at end of file diff --git a/rust/origen/src/utility/github.rs b/rust/origen/src/utility/github.rs index bebb7341..bc858e85 100644 --- a/rust/origen/src/utility/github.rs +++ b/rust/origen/src/utility/github.rs @@ -1,33 +1,153 @@ use origen_metal::{Result, Outcome, octocrab}; use std::collections::HashMap; +pub fn with_blocking_calls(mut f: F) -> Result +where + F: FnMut() -> Result, +{ + let r = tokio::runtime::Runtime::new().unwrap(); + let _guard = r.enter(); + f() +} + +macro_rules! block_on { + ($call:expr) => { + futures::executor::block_on($call) + } +} + pub fn lookup_pat() -> Result { - // Tie this back to the user object at some point. + // TODO Publishing Tie this back to the user object at some point. Ok(std::env::var("github_pat")?) } -#[derive(Serialize)] -pub struct DispatchWorkflowRequest { - r#ref: String, - inputs: HashMap, +#[derive(Deserialize, Debug)] +pub struct Actor { + pub login: String, + pub id: usize, + pub r#type: String, } -impl DispatchWorkflowRequest { - pub fn new(git_ref: &str, inputs: Option>) -> Self { - Self { - r#ref: git_ref.to_string(), - inputs: { - if let Some(ins) = inputs { - ins - } else { - let h: HashMap = HashMap::new(); - h - } - }, +#[derive(Deserialize, Debug)] +pub struct WorkflowRuns { + pub total_count: usize, + workflow_runs: Vec +} + +impl WorkflowRuns { + pub fn get_only(mut self) -> Result { + let l = self.workflow_runs.len(); + if l != 1 { + bail!("Expected a single workflow run but found {}", l) } + Ok(self.workflow_runs.pop().unwrap()) } } +#[derive(Deserialize, Debug)] +pub struct WorkflowRun { + pub id: u64, + pub name: String, + pub head_branch: String, + pub head_sha: String, + pub status: String, + pub conclusion: String, + pub url: String, + pub html_url: String, + pub run_attempt: u8, + pub path: String, + pub event: String, + // TODO parse these as DATETIMEs? use time::PrimitiveDateTime as DateTime; + pub created_at: String, + pub updated_at: String, + pub run_started_at: String, + pub triggering_actor: Actor, + pub cancel_url: String, + pub rerun_url: String, +} + +impl WorkflowRun { + pub fn was_cancelled(&self) -> bool { + self.conclusion == "cancelled" + } + + pub fn cancel(&self) -> Result<()> { + send_post_request(|| { Ok(octocrab::OctocrabBuilder::new().personal_token(lookup_pat()?).build()?) }, &self.cancel_url, None::<()>)?; + Ok(()) + } + + pub fn completed(&self) -> bool { + self.status == "completed" + } + + pub fn refresh(&self) -> Result { + Ok(serde_json::from_str(&send_get_request(|| new_crab(None), &self.url)?)?) + } +} + +pub fn send_get_request(crab: F, uri: &str) -> Result +where + F: Fn() -> Result, +{ + with_blocking_calls( || { + let c = crab()?; + log_trace!("Sending GET request to GA: {}", uri); + let response = futures::executor::block_on(c._get(uri))?; + let body = futures::executor::block_on(c.body_to_string(response))?; + log_trace!("Received pre-processed body:\n{}", body); + Ok(body) + }) +} + +pub fn send_post_request(crab: F, uri: &str, inputs: Option) -> Result +where + F: Fn() -> Result, + H: serde::Serialize + Sized +{ + with_blocking_calls( || { + let c = crab()?; + log_trace!("Sending POST request to GA: {}", uri); + let response = block_on!(c._post(uri, inputs.as_ref()))?; + let body = block_on!(c.body_to_string(response))?; + log_trace!("Received pre-processed body:\n{}", body); + Ok(body) + }) +} + +pub enum GithubAuth { + PersonalAccessToken +} + +pub fn new_crab(auth: Option) -> Result { + Ok(if let Some(a) = auth { + match a { + GithubAuth::PersonalAccessToken => octocrab::Octocrab::builder().personal_token(lookup_pat()?).build()? + } + } else { + octocrab::OctocrabBuilder::new().build()? + }) +} + +pub fn get_latest_workflow_dispatch(owner: &str, repo: &str, workflow: Option<&str>) -> Result { + let mut uri = "https://api.github.com/repos".to_string(); + if let Some(w) = workflow { + uri = format!("{}/{}/{}/actions/workflows/{}/runs", uri, owner, repo, w); + } else { + uri = format!("{}/{}/{}/actions/runs", uri, owner, repo); + } + uri += "?per_page=1"; + let body = send_get_request(|| new_crab(None), &uri)?; + let runs = serde_json::from_str::(&body)?; + runs.get_only() +} + +pub fn get_workflow_run_by_id(owner: &str, repo: &str, run_id: u64) -> Result { + Ok(serde_json::from_str(&send_get_request( + || new_crab(None), + &format!("https://api.github.com/repos/{}/{}/actions/runs/{}", owner, repo, run_id) + )?)?) +} + pub fn dispatch_workflow( owner: &str, repo: &str, @@ -35,32 +155,17 @@ pub fn dispatch_workflow( git_ref: &str, inputs: Option>, ) -> Result { - // FOR_PR - todo!(); - // let o = octocrab::OctocrabBuilder::new() - // .personal_token(lookup_pat()?) - // .add_header( - // reqwest::header::ACCEPT, - // "application/vnd.github.v3+json".to_string(), - // ) - // .build()?; - // let r = tokio::runtime::Runtime::new().unwrap(); - // let _guard = r.enter(); - - // let response = futures::executor::block_on(o._post( - // format!( - // "https://api.github.com/repos/{}/{}/actions/workflows/{}/dispatches", - // owner, repo, workflow - // ), - // Some(&DispatchWorkflowRequest::new(git_ref, inputs)), - // ))?; - // let headers = response.headers().clone(); - // let status = response.status().as_u16() as usize; - // let body = futures::executor::block_on(response.body())?; - - // let mut res = Outcome::new_success_or_fail(body.is_empty()); - // res.set_msg(body); - // res.add_metadata("header", format!("{:?}", headers)); - // res.add_metadata("status", status); - // Ok(res) + with_blocking_calls(|| { + let crab = new_crab(Some(GithubAuth::PersonalAccessToken))?; + let actions = crab.actions(); + let mut workflow = actions.create_workflow_dispatch(owner, repo, workflow, git_ref); + if let Some(ins) = inputs.as_ref() { + workflow = workflow.inputs(serde_json::json!(ins)); + } + // TODO PublishingO2 Add checks for errors in response + block_on!(workflow.send())?; + Ok(()) + })?; + let res = Outcome::new_success(); + Ok(res) } diff --git a/rust/origen/src/utility/release_scribe.rs b/rust/origen/src/utility/release_scribe.rs index 30782204..3042071e 100644 --- a/rust/origen/src/utility/release_scribe.rs +++ b/rust/origen/src/utility/release_scribe.rs @@ -1,6 +1,6 @@ use crate::utility::version::Version; use crate::{Result, STATUS}; -use dialoguer::{Input, Select}; +use origen_metal::dialoguer::{Input, Select}; use std::collections::HashMap; use std::fs::File; use std::io::prelude::*; diff --git a/rust/origen/src/utility/version.rs b/rust/origen/src/utility/version.rs index 858de8de..6d4d7c1b 100644 --- a/rust/origen/src/utility/version.rs +++ b/rust/origen/src/utility/version.rs @@ -5,7 +5,14 @@ use crate::Result; use regex::Regex; use semver; use std::fmt; +use std::fs; use std::path::PathBuf; +use origen_metal::{toml_edit, dialoguer}; +use origen_metal::toml_edit::Document; + +lazy_static! { + static ref PYPROJECT_PATH: [&'static str; 3] = ["tool", "poetry", "version"]; +} const BETA: &str = "beta"; const ALPHA: &str = "alpha"; @@ -298,6 +305,20 @@ impl Version { Ok(self) } + pub fn increment(&self, release_type: &ReleaseType) -> Result { + Ok(match release_type { + ReleaseType::Major => self.next_major(), + ReleaseType::Minor => self.next_minor(), + ReleaseType::Patch => self.next_patch(), + ReleaseType::Beta => self.next_beta()?, + ReleaseType::Alpha => self.next_alpha()?, + ReleaseType::Dev => self.next_dev()?, + ReleaseType::DevCustom | ReleaseType::AlphaCustom | ReleaseType::BetaCustom => { + return Err("Error: Cannot use custom release: dialogue unavailable".into()) + } + }) + } + pub fn update_dialogue(&self) -> Result { let release_type = ReleaseType::from_idx( dialoguer::Select::new() @@ -350,11 +371,14 @@ impl Version { .interact()?, )) } + + pub fn from_pyproject_with_toml_handle(pyproject: PathBuf) -> Result { + VersionWithTOML::new(pyproject, &*PYPROJECT_PATH) + } } impl fmt::Display for Version { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - // Customize so only `x` and `y` are denoted. match self.spec { VersionSpec::Semver => self.semver.fmt(f), VersionSpec::Pep440 => { @@ -446,6 +470,123 @@ impl ReleaseType { } } +impl fmt::Display for ReleaseType { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", self.to_string()) + } +} + +impl TryFrom<&str> for ReleaseType { + type Error = String; + + fn try_from(value: &str) -> std::result::Result { + Ok(match value.to_lowercase().as_str() { + "major" => Self::Major, + "minor" => Self::Minor, + "patch" => Self::Patch, + "beta" => Self::Beta, + "alpha" => Self::Alpha, + "dev" => Self::Dev, + // Self::BetaCustom => "Beta (Custom)", + // Self::AlphaCustom => "Alpha (Custom)", + // Self::DevCustom => "Dev (Custom)", + _ => return Err(format!("Unrecognized Release Type '{}'", value)) + }) + } +} + +pub struct VersionWithTOML { + toml: Document, + source: PathBuf, + orig_version: Version, + new_version: Option, + rel_type: Option, + written: bool, + version_path: &'static [&'static str], +} + +impl VersionWithTOML { + pub fn new(source: PathBuf, version_path: &'static [&'static str]) -> Result { + if version_path.is_empty() { + bail!("Version path should not be empty!"); + } + + let content = std::fs::read_to_string(&source)?; + let toml = content.parse::().unwrap(); + let mut i: &toml_edit::Item = &toml[version_path[0]]; + for p in version_path[1..].iter() { + i = &i[p]; + } + let current = Version::new_pep440({ + match i.as_str() { + Some(v) => v, + None => bail!("Failed to parse version from TOML '{}'. 'version' not found or could not be parsed as a string", source.display()) + } + })?; + + Ok(Self { + orig_version: current, + toml: toml, + source: source, + new_version: None, + rel_type: None, + written: false, + version_path: version_path, + }) + } + + pub fn increment(&mut self, increment: ReleaseType) -> Result<()> { + self.new_version = Some(self.orig_version.increment(&increment)?); + self.rel_type = Some(increment); + Ok(()) + } + + pub fn was_version_updated(&self) -> bool { + self.new_version.is_some() + } + + pub fn orig_version(&self) -> &Version { + &self.orig_version + } + + pub fn new_version(&self) -> Option<&Version> { + self.new_version.as_ref() + } + + pub fn rel_type(&self) -> Option<&ReleaseType> { + self.rel_type.as_ref() + } + + pub fn source(&self) -> &PathBuf { + &self.source + } + + pub fn version(&self) -> &Version { + if let Some(v) = self.new_version.as_ref() { + v + } else { + &self.orig_version + } + } + + pub fn write(&mut self) -> Result<()> { + if let Some(v) = self.new_version() { + let ver = v.to_string(); + let mut i: &mut toml_edit::Item = &mut self.toml[self.version_path[0]]; + for p in self.version_path[1..].iter() { + i = &mut i[p]; + } + + *i = toml_edit::value(ver); + fs::write(&self.source, self.toml.to_string())?; + self.written = true; + Ok(()) + } else { + bail!("Version has not been updated! Nothing to update!"); + } + } +} + pub fn set_version_in_toml(toml_file: &PathBuf, version: &Version) -> Result<()> { let r = Regex::new(r#"^\s*version\s*=\s*['"]"#).unwrap(); fa::remove_line(&toml_file, &r)?; diff --git a/rust/origen_metal/Cargo.toml b/rust/origen_metal/Cargo.toml index e0c83596..38773f40 100644 --- a/rust/origen_metal/Cargo.toml +++ b/rust/origen_metal/Cargo.toml @@ -22,7 +22,9 @@ tempfile = "3" pyo3 = {version = "0.19.1", features = ["extension-module"]} serde = {version = "1.0", features = ["derive"]} toml = "0.5" -git2 = "0.13" +toml_edit = "0.21.0" +dialoguer = "0.8.0" +git2 = "0.18" dirs = "2.0" wait-timeout = "0.2.0" chrono = "0.4.11" diff --git a/rust/origen_metal/src/lib.rs b/rust/origen_metal/src/lib.rs index c6b7fae7..ef001c06 100644 --- a/rust/origen_metal/src/lib.rs +++ b/rust/origen_metal/src/lib.rs @@ -5,6 +5,8 @@ pub extern crate indexmap; pub extern crate glob; pub extern crate octocrab; pub extern crate tera; +pub extern crate toml_edit; +pub extern crate dialoguer; #[macro_use] extern crate serde; #[macro_use] diff --git a/rust/origen_metal/src/utils/revision_control/supported/git.rs b/rust/origen_metal/src/utils/revision_control/supported/git.rs index 452828d9..6b71b8ed 100644 --- a/rust/origen_metal/src/utils/revision_control/supported/git.rs +++ b/rust/origen_metal/src/utils/revision_control/supported/git.rs @@ -891,7 +891,8 @@ impl Git { // let cfg = Config::open_default()?; let repo = Repository::open(&self.local)?; let cfg = repo.config()?; - for entry in &cfg.entries(Some("user*"))? { + let mut entries = cfg.entries(Some("user*"))?; + while let Some(entry) = entries.next() { let entry = entry?; if let Some(n) = entry.name() { let v = match entry.value() { @@ -926,6 +927,31 @@ impl Git { } Ok(Outcome::new_success()) } + + pub fn on_branch(&self, query: &str) -> Result { + let repo = Repository::open(&self.local)?; + let head = repo.head()?; + if let Some(n) = head.shorthand() { + Ok(head.is_branch() && (n == query) && !repo.head_detached()?) + } else { + Ok(false) + } + } + + // TODO Publishing + // pub fn list_refs(&self, remote_name: Option<&str>) -> Result { + // let mut repo = Repository::open(&self.local)?; + // // println!("remotes") + // let mut remote = repo.find_remote(remote_name.unwrap_or("origin"))?; + // let mut cb = RemoteCallbacks::new(); + // cb.credentials(|url, username_from_url, allowed_types| { + // self.credentials_callback(url, username_from_url, allowed_types) + // }); + // remote.connect_auth(Direction::Fetch, Some(cb), None)?; + + // println!("{:?}", remote.list()?.iter().map( |r| [r.name().to_string(), r.oid().to_string()]).collect::>()); + // todo!(); + // } } fn ssh_keys() -> Vec { diff --git a/rust/origen_metal/src/utils/terminal.rs b/rust/origen_metal/src/utils/terminal.rs index bfd4cf6b..511182e8 100644 --- a/rust/origen_metal/src/utils/terminal.rs +++ b/rust/origen_metal/src/utils/terminal.rs @@ -3,6 +3,9 @@ use std::io::Write; use termcolor::{Color, ColorChoice, ColorSpec, StandardStream, WriteColor}; +use std::process::exit; +use crate::Result; +use dialoguer::Select; pub fn green(msg: &str) { print(msg, Color::Green); @@ -90,3 +93,28 @@ fn print(msg: &str, color: Color) { let _ = stdout.reset(); print!("{}", msg); } + +pub fn confirm_with_user(prompt: Option) -> Result +where S: Into +{ + let mut dialogue = Select::new(); + dialogue.item("Yes").item("No").default(1); + if let Some(p) = prompt { + dialogue.with_prompt(p); + } + Ok(dialogue.interact()? == 0) +} + +pub fn confirm_or_exit(prompt: Option, exit_dialogue: Option, exit_code: Option) -> Result<()> +where + S: Into, + D: std::fmt::Display +{ + if !confirm_with_user(prompt)? { + if let Some(d) = exit_dialogue { + println!("{}", d); + } + exit(exit_code.unwrap_or(0)); + } + Ok(()) +} \ No newline at end of file From 35bcaabfa9917b468ec1d74d2612d7d2804be730 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 9 Dec 2023 19:44:50 -0600 Subject: [PATCH 148/200] Support any Python 3.12 version --- python/origen/pyproject.toml | 2 +- python/origen_metal/pyproject.toml | 2 +- test_apps/no_workspace/templates/pyproject.toml | 2 +- test_apps/no_workspace/user_install/pyproject.toml | 2 +- test_apps/pl_ext_cmds/pyproject.toml | 2 +- test_apps/python_app/pyproject.toml | 2 +- test_apps/python_no_app/pyproject.toml | 2 +- test_apps/python_plugin/pyproject.toml | 2 +- test_apps/python_plugin_no_cmds/pyproject.toml | 2 +- test_apps/python_plugin_the_second/pyproject.toml | 2 +- test_apps/test_apps_shared_test_helpers/pyproject.toml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index 9a35f584..ea0ff3f9 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -21,7 +21,7 @@ generate-setup-file = false origen = 'origen.__bin__:run_origen' [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" origen_metal = "= 0.4.0" termcolor = ">= 1.1.0" colorama = "^0.4" diff --git a/python/origen_metal/pyproject.toml b/python/origen_metal/pyproject.toml index 2f93cc44..a89a2954 100644 --- a/python/origen_metal/pyproject.toml +++ b/python/origen_metal/pyproject.toml @@ -9,7 +9,7 @@ include = [ ] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" pyreadline3 = { version="^3.3", platform="win32" } termcolor = ">= 1.1.0" colorama = ">= 0.4.4" # Note: colorama is usually installed on the system already, but it isn't actually required (e.g. WSL won't have this by default) diff --git a/test_apps/no_workspace/templates/pyproject.toml b/test_apps/no_workspace/templates/pyproject.toml index 28c749a4..7cdee75a 100644 --- a/test_apps/no_workspace/templates/pyproject.toml +++ b/test_apps/no_workspace/templates/pyproject.toml @@ -5,7 +5,7 @@ description = "Origen Installation Test" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" {% if local_origen %} origen = { path = "{{ o2_root.joinpath("python/origen").as_posix() }}", develop = true } origen_metal = { path = "{{ o2_root.joinpath("python/origen_metal").as_posix() }}", develop = true } diff --git a/test_apps/no_workspace/user_install/pyproject.toml b/test_apps/no_workspace/user_install/pyproject.toml index 5a87074b..705a292d 100644 --- a/test_apps/no_workspace/user_install/pyproject.toml +++ b/test_apps/no_workspace/user_install/pyproject.toml @@ -5,7 +5,7 @@ description = "Origen Installation Test" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" origen = { path = "../../../python/origen", develop = true } origen_metal = { path = "../../../python/origen_metal", develop = true } diff --git a/test_apps/pl_ext_cmds/pyproject.toml b/test_apps/pl_ext_cmds/pyproject.toml index c157e96a..40c7d1d4 100644 --- a/test_apps/pl_ext_cmds/pyproject.toml +++ b/test_apps/pl_ext_cmds/pyproject.toml @@ -5,7 +5,7 @@ description = "Plugin Extending Cmds" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" origen = { path = "../../python/origen", develop = true } origen_metal = ">=0.0.0" diff --git a/test_apps/python_app/pyproject.toml b/test_apps/python_app/pyproject.toml index a7b9d3a9..d2754356 100644 --- a/test_apps/python_app/pyproject.toml +++ b/test_apps/python_app/pyproject.toml @@ -5,7 +5,7 @@ description = "" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" origen = "= 2.0.0.dev5" python_plugin = { path = "../python_plugin", develop = true } test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true } diff --git a/test_apps/python_no_app/pyproject.toml b/test_apps/python_no_app/pyproject.toml index d96626ca..7a0fcf58 100644 --- a/test_apps/python_no_app/pyproject.toml +++ b/test_apps/python_no_app/pyproject.toml @@ -5,7 +5,7 @@ description = "O2 workspace without an application" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } python_plugin = { path = "../python_plugin", develop = true } diff --git a/test_apps/python_plugin/pyproject.toml b/test_apps/python_plugin/pyproject.toml index a1ed5c9a..7d0c8890 100644 --- a/test_apps/python_plugin/pyproject.toml +++ b/test_apps/python_plugin/pyproject.toml @@ -5,7 +5,7 @@ description = "Example Origen Plugin" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" origen = { path = "../../python/origen", develop = true } [tool.poetry.dev-dependencies] diff --git a/test_apps/python_plugin_no_cmds/pyproject.toml b/test_apps/python_plugin_no_cmds/pyproject.toml index 0c72fcf4..48a4a6a7 100644 --- a/test_apps/python_plugin_no_cmds/pyproject.toml +++ b/test_apps/python_plugin_no_cmds/pyproject.toml @@ -5,7 +5,7 @@ description = "Example Origen Plugin Without Any Commands" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } diff --git a/test_apps/python_plugin_the_second/pyproject.toml b/test_apps/python_plugin_the_second/pyproject.toml index d46101d9..4de67d3c 100644 --- a/test_apps/python_plugin_the_second/pyproject.toml +++ b/test_apps/python_plugin_the_second/pyproject.toml @@ -5,7 +5,7 @@ description = "Another Example Origen Plugin" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } diff --git a/test_apps/test_apps_shared_test_helpers/pyproject.toml b/test_apps/test_apps_shared_test_helpers/pyproject.toml index a26874ea..f6a3a814 100644 --- a/test_apps/test_apps_shared_test_helpers/pyproject.toml +++ b/test_apps/test_apps_shared_test_helpers/pyproject.toml @@ -5,7 +5,7 @@ description = "Shared Regression Test Helpers for Test Apps" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12" +python = ">=3.7.0,<=3.12.*" pytest = ">=7.2.1" origen = { path = "../../python/origen", develop = true } pl_ext_cmds = { path = "../pl_ext_cmds", develop = true } From 323344eb41e5d4033bfce306b9b8755fabb4c294 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 9 Dec 2023 21:09:00 -0600 Subject: [PATCH 149/200] Update python versions again. Change script to non-inclusive max. --- python/origen/pyproject.toml | 2 +- python/origen_metal/pyproject.toml | 2 +- .../develop_origen/update_supported_python.rs | 14 ++++++++++---- test_apps/no_workspace/templates/pyproject.toml | 2 +- test_apps/no_workspace/user_install/pyproject.toml | 2 +- test_apps/pl_ext_cmds/pyproject.toml | 2 +- test_apps/python_app/pyproject.toml | 2 +- test_apps/python_no_app/pyproject.toml | 2 +- test_apps/python_plugin/pyproject.toml | 2 +- test_apps/python_plugin_no_cmds/pyproject.toml | 2 +- test_apps/python_plugin_the_second/pyproject.toml | 2 +- .../test_apps_shared_test_helpers/pyproject.toml | 2 +- 12 files changed, 21 insertions(+), 15 deletions(-) diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index ea0ff3f9..729e7a6e 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -21,7 +21,7 @@ generate-setup-file = false origen = 'origen.__bin__:run_origen' [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" origen_metal = "= 0.4.0" termcolor = ">= 1.1.0" colorama = "^0.4" diff --git a/python/origen_metal/pyproject.toml b/python/origen_metal/pyproject.toml index a89a2954..1dc01f4f 100644 --- a/python/origen_metal/pyproject.toml +++ b/python/origen_metal/pyproject.toml @@ -9,7 +9,7 @@ include = [ ] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" pyreadline3 = { version="^3.3", platform="win32" } termcolor = ">= 1.1.0" colorama = ">= 0.4.4" # Note: colorama is usually installed on the system already, but it isn't actually required (e.g. WSL won't have this by default) diff --git a/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs b/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs index 36c6469e..910ceb62 100644 --- a/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs +++ b/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs @@ -14,7 +14,7 @@ pub (crate) fn update_supported_python_cmd<'a>() -> SubCmd<'a> { .takes_value(true) .required(true) ) - .arg(Arg::new("max_version") + .arg(Arg::new("non_inclusive_max_version") .takes_value(true) .required(true) ) @@ -24,10 +24,16 @@ pub (crate) fn update_supported_python_cmd<'a>() -> SubCmd<'a> { pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { let min = invocation.get_one::("min_version").unwrap(); - let max = invocation.get_one::("max_version").unwrap(); - let version_str = format!("python = \">={min},<={max}\""); + let max = invocation.get_one::("non_inclusive_max_version").unwrap(); + let version_str = format!("python = \">={min},<{max}\""); let mv_min = min.split('.').collect::>()[1].parse::()?; - let mv_max = max.split('.').collect::>()[1].parse::()?; + let max_parts = max.split('.').collect::>(); + let mv_max; + if max_parts.len() == 2 { + mv_max = max_parts[1].parse::()? - 1; + } else { + mv_max = max_parts[1].parse::()?; + } // Update pyprojects // origen/metal pyproject diff --git a/test_apps/no_workspace/templates/pyproject.toml b/test_apps/no_workspace/templates/pyproject.toml index 7cdee75a..41709614 100644 --- a/test_apps/no_workspace/templates/pyproject.toml +++ b/test_apps/no_workspace/templates/pyproject.toml @@ -5,7 +5,7 @@ description = "Origen Installation Test" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" {% if local_origen %} origen = { path = "{{ o2_root.joinpath("python/origen").as_posix() }}", develop = true } origen_metal = { path = "{{ o2_root.joinpath("python/origen_metal").as_posix() }}", develop = true } diff --git a/test_apps/no_workspace/user_install/pyproject.toml b/test_apps/no_workspace/user_install/pyproject.toml index 705a292d..5c530980 100644 --- a/test_apps/no_workspace/user_install/pyproject.toml +++ b/test_apps/no_workspace/user_install/pyproject.toml @@ -5,7 +5,7 @@ description = "Origen Installation Test" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" origen = { path = "../../../python/origen", develop = true } origen_metal = { path = "../../../python/origen_metal", develop = true } diff --git a/test_apps/pl_ext_cmds/pyproject.toml b/test_apps/pl_ext_cmds/pyproject.toml index 40c7d1d4..2188c26e 100644 --- a/test_apps/pl_ext_cmds/pyproject.toml +++ b/test_apps/pl_ext_cmds/pyproject.toml @@ -5,7 +5,7 @@ description = "Plugin Extending Cmds" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" origen = { path = "../../python/origen", develop = true } origen_metal = ">=0.0.0" diff --git a/test_apps/python_app/pyproject.toml b/test_apps/python_app/pyproject.toml index d2754356..1910ac27 100644 --- a/test_apps/python_app/pyproject.toml +++ b/test_apps/python_app/pyproject.toml @@ -5,7 +5,7 @@ description = "" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" origen = "= 2.0.0.dev5" python_plugin = { path = "../python_plugin", develop = true } test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true } diff --git a/test_apps/python_no_app/pyproject.toml b/test_apps/python_no_app/pyproject.toml index 7a0fcf58..7d631271 100644 --- a/test_apps/python_no_app/pyproject.toml +++ b/test_apps/python_no_app/pyproject.toml @@ -5,7 +5,7 @@ description = "O2 workspace without an application" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } python_plugin = { path = "../python_plugin", develop = true } diff --git a/test_apps/python_plugin/pyproject.toml b/test_apps/python_plugin/pyproject.toml index 7d0c8890..7cd51b25 100644 --- a/test_apps/python_plugin/pyproject.toml +++ b/test_apps/python_plugin/pyproject.toml @@ -5,7 +5,7 @@ description = "Example Origen Plugin" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" origen = { path = "../../python/origen", develop = true } [tool.poetry.dev-dependencies] diff --git a/test_apps/python_plugin_no_cmds/pyproject.toml b/test_apps/python_plugin_no_cmds/pyproject.toml index 48a4a6a7..1b1dbbcb 100644 --- a/test_apps/python_plugin_no_cmds/pyproject.toml +++ b/test_apps/python_plugin_no_cmds/pyproject.toml @@ -5,7 +5,7 @@ description = "Example Origen Plugin Without Any Commands" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } diff --git a/test_apps/python_plugin_the_second/pyproject.toml b/test_apps/python_plugin_the_second/pyproject.toml index 4de67d3c..c1058842 100644 --- a/test_apps/python_plugin_the_second/pyproject.toml +++ b/test_apps/python_plugin_the_second/pyproject.toml @@ -5,7 +5,7 @@ description = "Another Example Origen Plugin" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" origen = { path = "../../python/origen", develop = true } origen_metal = { path = "../../python/origen_metal", develop = true } diff --git a/test_apps/test_apps_shared_test_helpers/pyproject.toml b/test_apps/test_apps_shared_test_helpers/pyproject.toml index f6a3a814..013eb91b 100644 --- a/test_apps/test_apps_shared_test_helpers/pyproject.toml +++ b/test_apps/test_apps_shared_test_helpers/pyproject.toml @@ -5,7 +5,7 @@ description = "Shared Regression Test Helpers for Test Apps" authors = ["Origen-SDK"] [tool.poetry.dependencies] -python = ">=3.7.0,<=3.12.*" +python = ">=3.7.0,<3.13" pytest = ">=7.2.1" origen = { path = "../../python/origen", develop = true } pl_ext_cmds = { path = "../pl_ext_cmds", develop = true } From e4db777f24e755d0fb20e5c747a14b2c5ce07c03 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 10 Dec 2023 08:22:11 -0600 Subject: [PATCH 150/200] Update lock file for new python --- .../develop_origen/update_supported_python.rs | 2 ++ .../no_workspace/user_install/poetry.lock | 16 ++++++++-------- test_apps/python_app/poetry.lock | 16 ++++++++-------- test_apps/python_no_app/poetry.lock | 18 +++++++++--------- 4 files changed, 27 insertions(+), 25 deletions(-) diff --git a/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs b/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs index 910ceb62..bbe33adf 100644 --- a/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs +++ b/rust/origen/cli/src/commands/develop_origen/update_supported_python.rs @@ -70,6 +70,8 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { } f.write(b"];\n")?; + // TODO O2DevScripts Need to add running 'poetry lock --no-update' in python_app, python_no_app, no_workspace/user_install to update Python versions in lock files. + Ok(()) } diff --git a/test_apps/no_workspace/user_install/poetry.lock b/test_apps/no_workspace/user_install/poetry.lock index a448e9c4..8f338af3 100644 --- a/test_apps/no_workspace/user_install/poetry.lock +++ b/test_apps/no_workspace/user_install/poetry.lock @@ -932,7 +932,7 @@ version = "2.0.0.dev5" description = "Semiconductor Developer's Kit" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -977,7 +977,7 @@ version = "0.4.0" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1050,13 +1050,13 @@ version = "0.1.0" description = "Plugin Extending Cmds" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<3.13" files = [] develop = true [package.dependencies] origen = {path = "../../python/origen", develop = true} -origen_metal = {path = "../../python/origen_metal", develop = true} +origen_metal = ">=0.0.0" [package.source] type = "directory" @@ -1307,7 +1307,7 @@ version = "0.1.0" description = "Example Origen Plugin" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1745,7 +1745,7 @@ version = "0.1.0" description = "Shared Regression Test Helpers for Test Apps" category = "main" optional = false -python-versions = ">=3.7,<3.11" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1972,5 +1972,5 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" -python-versions = ">=3.7,<3.11" -content-hash = "152a296654d05ccfbaadc5b03711b43e486f70748ba5433d0e8197128cfb5df6" +python-versions = ">=3.7.0,<3.13" +content-hash = "29a2150544681b9aa667a228c0adebe0f07915aa2fadda56a30e117782811b20" diff --git a/test_apps/python_app/poetry.lock b/test_apps/python_app/poetry.lock index f9681264..741f5bd8 100644 --- a/test_apps/python_app/poetry.lock +++ b/test_apps/python_app/poetry.lock @@ -892,7 +892,7 @@ version = "2.0.0.dev5" description = "Semiconductor Developer's Kit" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -937,7 +937,7 @@ version = "0.4.0" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1010,7 +1010,7 @@ version = "0.1.0" description = "Plugin Extending Cmds" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1252,7 +1252,7 @@ version = "0.1.0" description = "Example Origen Plugin" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1269,7 +1269,7 @@ version = "0.1.0" description = "Example Origen Plugin Without Any Commands" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1705,7 +1705,7 @@ version = "0.1.0" description = "Shared Regression Test Helpers for Test Apps" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1953,5 +1953,5 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" -python-versions = ">=3.7.0,<=3.12" -content-hash = "be00203c85f7dc3c6161189133d21ba3a91ce2fc13811a4bbdae08e32e94383a" +python-versions = ">=3.7.0,<3.13" +content-hash = "e2d100b8756a96e46645a55813391a59072b82534807b640a0805a18664fecd3" diff --git a/test_apps/python_no_app/poetry.lock b/test_apps/python_no_app/poetry.lock index 2804dd37..d930210b 100644 --- a/test_apps/python_no_app/poetry.lock +++ b/test_apps/python_no_app/poetry.lock @@ -812,7 +812,7 @@ version = "2.0.0.dev5" description = "Semiconductor Developer's Kit" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -857,7 +857,7 @@ version = "0.4.0" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -930,7 +930,7 @@ version = "0.1.0" description = "Plugin Extending Cmds" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1167,7 +1167,7 @@ version = "0.1.0" description = "Example Origen Plugin" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1184,7 +1184,7 @@ version = "0.1.0" description = "Example Origen Plugin Without Any Commands" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1202,7 +1202,7 @@ version = "0.1.0" description = "Another Example Origen Plugin" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1638,7 +1638,7 @@ version = "0.1.0" description = "Shared Regression Test Helpers for Test Apps" category = "main" optional = false -python-versions = ">=3.7.0,<=3.12" +python-versions = ">=3.7.0,<3.13" files = [] develop = true @@ -1886,5 +1886,5 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" -python-versions = ">=3.7.0,<=3.12" -content-hash = "914252389b3db8f1eaa81c1453f6b803fe9a75692661356c129058a52d1aeae3" +python-versions = ">=3.7.0,<3.13" +content-hash = "ace8ccb0aa8b785147b25c0985ba9ca6752fd11d59091a05a7e34a4688248b79" From c64eca16bc505dc45cf0813af4779de5371c53a0 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 10 Dec 2023 13:20:18 -0600 Subject: [PATCH 151/200] Resume WiP on publishing action --- .github/workflows/publish.yml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 535dfac7..6cd87a7e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,10 +20,14 @@ on: # description: If 'true', does not use the '--release' switch when building Rust libraries # required: false # default: "false" - # publish_pypi: - # description: Publish built packages to PyPi - # required: true - # default: false + publish_pypi: + description: Publish built packages to PyPi + required: true + default: "false" + type: choice + options: + - true + - false publish_pypi_test: description: Publish To PyPI Test Server required: true @@ -220,15 +224,15 @@ jobs: - name: List OM Wheels run: ls -al ./om_wheels - - # - name: Push To PyPi Test Server - # uses: pypa/gh-action-pypi-publish@v1.8.10 - # with: - # packages-dir: om_wheels - # # user: __token__ - # password: ${{ secrets.PYPI_ORIGEN_METAL }} - # repository-url: https://test.pypi.org/legacy/ - # verify_metadata: false + + - name: Push To PyPi Test Server + uses: pypa/gh-action-pypi-publish@v1.8.10 + with: + packages-dir: om_wheels + # user: __token__ + password: ${{ secrets.PYPI_ORIGEN_METAL }} + repository-url: https://test.pypi.org/legacy/ + verify-metadata: false - name: Retrieve Wheels uses: actions/download-artifact@v3 From 8ea05f1f073c480b9aa2ad7aed4b4b43a2727d65 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 10 Dec 2023 14:56:31 -0600 Subject: [PATCH 152/200] Add OM test server publishing token --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6cd87a7e..17fecc0b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -230,7 +230,7 @@ jobs: with: packages-dir: om_wheels # user: __token__ - password: ${{ secrets.PYPI_ORIGEN_METAL }} + password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN_OM }} repository-url: https://test.pypi.org/legacy/ verify-metadata: false From 318c3704e81af6a8ea41f12c033c960f0c3af39c Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 10 Dec 2023 15:11:42 -0600 Subject: [PATCH 153/200] WiP: Debug publishing --- .github/workflows/publish.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 17fecc0b..2ceec82f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -226,6 +226,7 @@ jobs: run: ls -al ./om_wheels - name: Push To PyPi Test Server + if: ${{ github.event.inputs.origen_metal_python_package == 'true' }} uses: pypa/gh-action-pypi-publish@v1.8.10 with: packages-dir: om_wheels @@ -244,6 +245,7 @@ jobs: run: ls -al ./origen_wheels - name: Push To PyPi Test Server + if: ${{ github.event.inputs.origen_python_package == 'true' }} uses: pypa/gh-action-pypi-publish@v1.8.10 with: packages-dir: origen_wheels @@ -312,14 +314,14 @@ jobs: - name: Display Tag run: echo ${{ env.tag }} - # - name: Generate Github Release - # uses: ncipollo/release-action@v1 - # with: - # artifacts: ./om_wheels.zip, ./origen_wheels.zip - # artifactErrorsFailBuild: true - # prerelease: ${{ github.event.inputs.prerelease == 'true' }} - # commit: ${{ github.sha }} - # tag: ${{ env.tag }} + - name: Generate Github Release + uses: ncipollo/release-action@v1 + with: + artifacts: ./om_wheels.zip, ./origen_wheels.zip + artifactErrorsFailBuild: true + prerelease: ${{ github.event.inputs.prerelease == 'true' }} + commit: ${{ github.sha }} + tag: ${{ env.tag }} cleanup: needs: [build, puublish_to_pypi_test, release] runs-on: ubuntu-latest From a49061ebf79dfb6ea63b944544c50792263bd25c Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 10 Dec 2023 16:48:04 -0600 Subject: [PATCH 154/200] WiP: Publishing: Bugfix for GH release --- .github/workflows/publish.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2ceec82f..5c6a9c3b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -230,7 +230,6 @@ jobs: uses: pypa/gh-action-pypi-publish@v1.8.10 with: packages-dir: om_wheels - # user: __token__ password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN_OM }} repository-url: https://test.pypi.org/legacy/ verify-metadata: false @@ -249,7 +248,6 @@ jobs: uses: pypa/gh-action-pypi-publish@v1.8.10 with: packages-dir: origen_wheels - # user: __token__ password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ verify-metadata: false @@ -286,13 +284,13 @@ jobs: - uses: vimtor/action-zip@v1.1 with: - files: om_wheels - dest: om_wheels.zip + files: origen_metal + dest: origen_metal.zip - uses: vimtor/action-zip@v1.1 with: - files: origen_wheels - dest: origen_wheels.zip + files: origen + dest: origen.zip - name: Get OM/Origen Versions run: | @@ -317,7 +315,7 @@ jobs: - name: Generate Github Release uses: ncipollo/release-action@v1 with: - artifacts: ./om_wheels.zip, ./origen_wheels.zip + artifacts: ./origen_metal.zip, ./origen.zip artifactErrorsFailBuild: true prerelease: ${{ github.event.inputs.prerelease == 'true' }} commit: ${{ github.sha }} From b40239bb90dbab1b6bcf88a31695aaad6b7f2681 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 11 Dec 2023 07:27:56 -0600 Subject: [PATCH 155/200] WiP: PublishingO2: Bump OM/Origen versions. Some scripting to assist with this. --- python/origen/pyproject.toml | 4 ++-- python/origen_metal/pyproject.toml | 2 +- .../cli/src/commands/develop_origen/publish.rs | 14 ++++++++++++++ rust/origen/src/utility/version.rs | 2 +- test_apps/python_app/poetry.lock | 8 ++++---- test_apps/python_app/pyproject.toml | 5 ++--- 6 files changed, 24 insertions(+), 11 deletions(-) diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index 729e7a6e..fa896f5c 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "origen" -version = "2.0.0.dev5" +version = "2.0.0.dev6" description = "Semiconductor Developer's Kit" homepage = "https://origen-sdk.org/o2" license = "MIT" @@ -22,7 +22,7 @@ origen = 'origen.__bin__:run_origen' [tool.poetry.dependencies] python = ">=3.7.0,<3.13" -origen_metal = "= 0.4.0" +origen_metal = "0.4.1.dev0" termcolor = ">= 1.1.0" colorama = "^0.4" bs4 = "0.0.1" diff --git a/python/origen_metal/pyproject.toml b/python/origen_metal/pyproject.toml index 1dc01f4f..03e83274 100644 --- a/python/origen_metal/pyproject.toml +++ b/python/origen_metal/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "origen_metal" -version = "0.4.0" +version = "0.4.1.dev0" description = "Bare metal APIs for the Origen SDK" authors = ["Origen-SDK"] include = [ diff --git a/rust/origen/cli/src/commands/develop_origen/publish.rs b/rust/origen/cli/src/commands/develop_origen/publish.rs index 2ef351f2..fe063f14 100644 --- a/rust/origen/cli/src/commands/develop_origen/publish.rs +++ b/rust/origen/cli/src/commands/develop_origen/publish.rs @@ -46,6 +46,13 @@ pub (crate) fn publish_cmd<'a>() -> SubCmd<'a> { .action(SetArgTrue) .help("Create a GitHub release (https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases)") ) + .arg( + Arg::new("bump_origen_om_req") + .long("bump_origen_om_req") + .visible_alias("bump_o_req") + .action(SetArgTrue) + .help("Set Origen's OM requirement to this OM version") + ) }} ) } @@ -85,6 +92,7 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { // TODO PublishO2 Ensure a regression test passed with this commit // Get current versions + // TODO PublishO2 Cleanup - move paths to shared location let om_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen_metal").join("pyproject.toml"); let origen_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen").join("pyproject.toml"); let mut py_om_ver = Version::from_pyproject_with_toml_handle(om_pyproject_path)?; @@ -145,6 +153,12 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { } displayln!("Updating versions in TOML files..."); update_toml(update_om_package, &mut py_om_ver)?; + if *invocation.get_one::("bump_origen_om_req").unwrap() { + // TODO PublishingO2 this should be automatically set on an OM + Origen release + let prev_ver = py_origen_ver.toml["tool"]["poetry"]["dependencies"]["origen_metal"].to_string(); + displayln!("Bumping Origen's 'origen_metal' requirement from {} to {}", prev_ver, py_om_ver.version()); + py_origen_ver.toml["tool"]["poetry"]["dependencies"]["origen_metal"] = origen_metal::toml_edit::value(py_om_ver.version().to_string()); + } update_toml(update_origen_package, &mut py_origen_ver)?; // TODO PublishO2 Check in updated files diff --git a/rust/origen/src/utility/version.rs b/rust/origen/src/utility/version.rs index 6d4d7c1b..046325c5 100644 --- a/rust/origen/src/utility/version.rs +++ b/rust/origen/src/utility/version.rs @@ -496,7 +496,7 @@ impl TryFrom<&str> for ReleaseType { } pub struct VersionWithTOML { - toml: Document, + pub toml: Document, source: PathBuf, orig_version: Version, new_version: Option, diff --git a/test_apps/python_app/poetry.lock b/test_apps/python_app/poetry.lock index 741f5bd8..5f609790 100644 --- a/test_apps/python_app/poetry.lock +++ b/test_apps/python_app/poetry.lock @@ -888,7 +888,7 @@ files = [ [[package]] name = "origen" -version = "2.0.0.dev5" +version = "2.0.0.dev6" description = "Semiconductor Developer's Kit" category = "main" optional = false @@ -904,7 +904,7 @@ importlib-metadata = ">= 1.7.0" Jinja2 = "^3" mako = "1.1.0" origen_autoapi = "2.0.1" -origen_metal = "= 0.4.0" +origen_metal = "0.4.1.dev0" poetry = "^1.1.14" recommonmark = ">= 0" sphinx = "3.0.2" @@ -933,7 +933,7 @@ sphinx = "*" [[package]] name = "origen-metal" -version = "0.4.0" +version = "0.4.1.dev0" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false @@ -1954,4 +1954,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" python-versions = ">=3.7.0,<3.13" -content-hash = "e2d100b8756a96e46645a55813391a59072b82534807b640a0805a18664fecd3" +content-hash = "1bff1af9ab1d51fced868030f3c5390423dde811e48e184ff50aa5a636049601" diff --git a/test_apps/python_app/pyproject.toml b/test_apps/python_app/pyproject.toml index 1910ac27..47da1f9a 100644 --- a/test_apps/python_app/pyproject.toml +++ b/test_apps/python_app/pyproject.toml @@ -6,15 +6,14 @@ authors = ["Origen-SDK"] [tool.poetry.dependencies] python = ">=3.7.0,<3.13" -origen = "= 2.0.0.dev5" +origen = { path = "../../python/origen", develop = true } +origen_metal = { path = "../../python/origen_metal", develop = true } python_plugin = { path = "../python_plugin", develop = true } test_apps_shared_test_helpers = { path = "../test_apps_shared_test_helpers", develop = true } python_plugin_no_cmds = { path = "../python_plugin_no_cmds", develop = true } [tool.poetry.dev-dependencies] pytest = ">= 6.0" -origen = { path = "../../python/origen", develop = true } -origen_metal = { path = "../../python/origen_metal", develop = true } [build-system] requires = ["poetry-core>=1.0.0"] From 9536b907c6c59e17399f7f0017e8c69cf4fe7928 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 11 Dec 2023 13:16:50 -0600 Subject: [PATCH 156/200] WiP: Publishing: Add pypi job. Add verbose setting to pypi uploads --- .github/workflows/publish.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5c6a9c3b..8bf88cab 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -233,6 +233,7 @@ jobs: password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN_OM }} repository-url: https://test.pypi.org/legacy/ verify-metadata: false + verbose: true - name: Retrieve Wheels uses: actions/download-artifact@v3 @@ -251,6 +252,48 @@ jobs: password: ${{ secrets.PYPI_TEST_SERVER_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ verify-metadata: false + verbose: true + + puublish_to_pypi: + needs: build + runs-on: ubuntu-latest + if: ${{ github.event.inputs.publish_pypi == 'true' }} + steps: + - name: Retrieve Wheels + uses: actions/download-artifact@v3 + with: + name: om_wheels + path: om_wheels + + - name: List OM Wheels + run: ls -al ./om_wheels + + - name: Push To PyPi Test Server + if: ${{ github.event.inputs.origen_metal_python_package == 'true' }} + uses: pypa/gh-action-pypi-publish@v1.8.10 + with: + packages-dir: om_wheels + password: ${{ secrets.PYPI_OM_API_TOKEN }} + verify-metadata: false + verbose: true + + - name: Retrieve Wheels + uses: actions/download-artifact@v3 + with: + name: origen_wheels + path: origen_wheels + + - name: List Origen Wheels + run: ls -al ./origen_wheels + + - name: Push To PyPi Test Server + if: ${{ github.event.inputs.origen_python_package == 'true' }} + uses: pypa/gh-action-pypi-publish@v1.8.10 + with: + packages-dir: origen_wheels + password: ${{ secrets.PYPI_ORIGEN_API_TOKEN }} + verify-metadata: false + verbose: true release: needs: build From 1c454185078a58e448f70461806adf3f3b1af9a2 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 11 Dec 2023 13:20:23 -0600 Subject: [PATCH 157/200] WiP: Publishing: Ensure cleanup after release to pypi --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8bf88cab..9d966d4e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -364,7 +364,7 @@ jobs: commit: ${{ github.sha }} tag: ${{ env.tag }} cleanup: - needs: [build, puublish_to_pypi_test, release] + needs: [build, puublish_to_pypi_test, puublish_to_pypi, release] runs-on: ubuntu-latest if: ${{ always() }} steps: From 03e4a365507ef8db48adc7224feb917bf64d81e7 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 11 Dec 2023 14:30:14 -0600 Subject: [PATCH 158/200] WiP: Publishing: Fix some typos --- .github/workflows/publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9d966d4e..6e2d794a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -211,7 +211,7 @@ jobs: # echo "Publishing to Github Releases" # # ... - puublish_to_pypi_test: + publish_to_pypi_test: needs: build runs-on: ubuntu-latest if: ${{ github.event.inputs.publish_pypi_test == 'true' }} @@ -254,7 +254,7 @@ jobs: verify-metadata: false verbose: true - puublish_to_pypi: + publish_to_pypi: needs: build runs-on: ubuntu-latest if: ${{ github.event.inputs.publish_pypi == 'true' }} @@ -268,7 +268,7 @@ jobs: - name: List OM Wheels run: ls -al ./om_wheels - - name: Push To PyPi Test Server + - name: Push To PyPi Server if: ${{ github.event.inputs.origen_metal_python_package == 'true' }} uses: pypa/gh-action-pypi-publish@v1.8.10 with: @@ -286,7 +286,7 @@ jobs: - name: List Origen Wheels run: ls -al ./origen_wheels - - name: Push To PyPi Test Server + - name: Push To PyPi Server if: ${{ github.event.inputs.origen_python_package == 'true' }} uses: pypa/gh-action-pypi-publish@v1.8.10 with: @@ -364,7 +364,7 @@ jobs: commit: ${{ github.sha }} tag: ${{ env.tag }} cleanup: - needs: [build, puublish_to_pypi_test, puublish_to_pypi, release] + needs: [build, publish_to_pypi_test, publish_to_pypi, release] runs-on: ubuntu-latest if: ${{ always() }} steps: From 2ecb0a819148f37fb38b8df8e8cd9b0e1d3de128 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 9 Jan 2024 07:03:45 -0600 Subject: [PATCH 159/200] Experiment with publish checks in publish action --- .github/workflows/publish.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6e2d794a..946db411 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -56,12 +56,50 @@ env: om_ver_file: om_version origen_ver_file: origen_version jobs: + precheck: + # Need to make sure that only one publish action is running at a time to avoid releases stepping on each other. + # GA's concurrency only allows for this job replacing previous jobs, but we want the opposite, otherwise we might end up + # with imcomplete or duplicate releases. + runs-on: ubuntu-latest + steps: + - name: Query Concurrency + id: query-concurrency + uses: fkirc/skip-duplicate-actions@v5 + with: + concurrent_skipping: 'always' + - name: Check Concurrency + uses: actions/github-script@v7 + if: ${{ steps.query-concurrency.outputs.should_skip == 'true' }} + with: + script: | + core.setFailed('Found existing publish workflow: ${{ steps.query-concurrency.outputs.skipped_by.htmlUrl }}') + + lock_master: + needs: [precheck] + runs-on: ubuntu-latest + steps: + - name: Check Master Lock Status + uses: actions/github-script@v7 + with: + script: | + const result = await octokit.rest.repos.getBranchProtection({ + owner: context.repo.owner, + repo: context.repo.repo, + branch: master + }) + console.log(result) + console.log(result.lock_branch.enabled) + if (result.lock_branch.enabled) { + core.setFailed('Master branch is unexpectedly locked!') + } + build: strategy: fail-fast: false matrix: os: ${{ fromJSON(vars.SUPPORTED_OS) }} python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} + needs: [lock_master] runs-on: ${{ matrix.os }} steps: From 15b3f101e116848497668034e9faf4df69eab0eb Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 9 Jan 2024 20:42:39 -0600 Subject: [PATCH 160/200] WiP: Publishing Checks --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 946db411..b6d37594 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -67,6 +67,7 @@ jobs: uses: fkirc/skip-duplicate-actions@v5 with: concurrent_skipping: 'always' + do_not_skip: '[]' - name: Check Concurrency uses: actions/github-script@v7 if: ${{ steps.query-concurrency.outputs.should_skip == 'true' }} @@ -82,7 +83,7 @@ jobs: uses: actions/github-script@v7 with: script: | - const result = await octokit.rest.repos.getBranchProtection({ + const result = await github.rest.repos.getBranchProtection({ owner: context.repo.owner, repo: context.repo.repo, branch: master From 6eb2c4e28df8245810bf37f3f5e7eb71f2af41d0 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 9 Jan 2024 20:46:03 -0600 Subject: [PATCH 161/200] WiP: Publishing Checks --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b6d37594..7ad06f8f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -86,7 +86,7 @@ jobs: const result = await github.rest.repos.getBranchProtection({ owner: context.repo.owner, repo: context.repo.repo, - branch: master + branch: 'master' }) console.log(result) console.log(result.lock_branch.enabled) From af6ad8aa8f27078fde5ca0cd40c018fa27ce3e3f Mon Sep 17 00:00:00 2001 From: corey Date: Wed, 10 Jan 2024 19:34:05 -0600 Subject: [PATCH 162/200] WiP: Publishing Checks: Try updating lock_master job permissions. --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7ad06f8f..2d5e930d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -78,6 +78,7 @@ jobs: lock_master: needs: [precheck] runs-on: ubuntu-latest + permissions: write-all steps: - name: Check Master Lock Status uses: actions/github-script@v7 From 8c2eb0f0ffb4c31125e5d07f233d17e3556c575d Mon Sep 17 00:00:00 2001 From: corey Date: Fri, 12 Jan 2024 20:54:03 -0600 Subject: [PATCH 163/200] WiP: Publishing: Experiment with Docker image for manylinux --- .github/workflows/publish.yml | 142 ++++++++++++++++++++++++++++++---- 1 file changed, 126 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2d5e930d..540699d6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -52,6 +52,10 @@ on: options: - true - false + # id: + # description: Set the run ID to a known value + # required: false + # type: number env: om_ver_file: om_version origen_ver_file: origen_version @@ -78,23 +82,125 @@ jobs: lock_master: needs: [precheck] runs-on: ubuntu-latest - permissions: write-all + # steps: + # - name: Check Master Lock Status + # uses: actions/github-script@v7 + # with: + # github-token: ${{ secrets.O2_PAT }} + # script: | + # const result = await github.rest.repos.getBranchProtection({ + # owner: context.repo.owner, + # repo: context.repo.repo, + # branch: 'master' + # }) + # console.log(result) + # console.log(result.lock_branch.enabled) + # if (result.lock_branch.enabled) { + # core.setFailed('Master branch is unexpectedly locked!') + # } + + # const check_master_url = "https://api.github.com/repos/${{ github.repository }}/branches/BRANCH/protection" + # const result = await github.request(url) + # console.log(result) + # - id: lock-master + # uses: actions/github-script@v7 + # if: ${{ always() }} + # with: + # script: | + # github.rest.repo. + + build_manylinux: + strategy: + fail-fast: false + matrix: + python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} + needs: [lock_master] + runs-on: ubuntu-latest + container: + image: pypa/manylinux2010_x86_64 steps: - - name: Check Master Lock Status - uses: actions/github-script@v7 + - uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - script: | - const result = await github.rest.repos.getBranchProtection({ - owner: context.repo.owner, - repo: context.repo.repo, - branch: 'master' - }) - console.log(result) - console.log(result.lock_branch.enabled) - if (result.lock_branch.enabled) { - core.setFailed('Master branch is unexpectedly locked!') - } + toolchain: ${{ fromJSON(vars.RUST_VERSION) }} + rustflags: + + - name: Override Project Rust Version + run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} + + - name: Check Rust Version + run: | + rustc --version + cargo --version + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Display Python Version + run: python -c "import sys; print(sys.version)" + + - name: Install Poetry + run: | + pip install poetry==1.3.2 + poetry --version + + - name: install libdbus + run: | + sudo apt update + sudo apt install libdbus-1-dev + if: contains(matrix.os, 'ubuntu') + + - name: Build Origen Metal Python Package + working-directory: python/origen_metal + run: poetry build --format wheel + + - name: Display Dist Directory + working-directory: python/origen_metal/dist + run: ls + - name: Upload Origen Metal Python Package Artifact + uses: actions/upload-artifact@v3 + with: + name: om_wheels + path: python/origen_metal/dist/origen_metal* + + - name: Get OM Python Package Version + working-directory: python/origen_metal + run: poetry version -s > ${{ env.om_ver_file }} + + - name: Upload OM Python Package Version + uses: actions/upload-artifact@v3 + with: + name: ${{ env.om_ver_file }} + path: python/origen_metal/${{ env.om_ver_file }} + + - name: Build Origen Python Package + working-directory: python/origen + run: poetry build --format wheel + + - name: Display Dist Directory + working-directory: python/origen/dist + run: ls + + - name: Upload Origen Python Package Artifact + uses: actions/upload-artifact@v3 + with: + name: origen_wheels + path: python/origen/dist/origen* + + - name: Get Origen Python Package Version + working-directory: python/origen + run: poetry version -s > ${{ env.origen_ver_file }} + + - name: Upload Origen Python Package Version + uses: actions/upload-artifact@v3 + with: + name: ${{ env.origen_ver_file }} + path: python/origen/${{ env.origen_ver_file }} + build: strategy: fail-fast: false @@ -102,6 +208,8 @@ jobs: os: ${{ fromJSON(vars.SUPPORTED_OS) }} python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} needs: [lock_master] + # Temporarily disable this while working with manylinux image + if: ${{ 0 == 1 }} runs-on: ${{ matrix.os }} steps: @@ -334,7 +442,7 @@ jobs: password: ${{ secrets.PYPI_ORIGEN_API_TOKEN }} verify-metadata: false verbose: true - + release: needs: build runs-on: ubuntu-latest @@ -408,4 +516,6 @@ jobs: runs-on: ubuntu-latest if: ${{ always() }} steps: - - run: echo Begin Clean Up... \ No newline at end of file + - run: echo Begin Clean Up... + + # - name: Unlock Master Branch From 489d2c58d7e0a5cf7cda07f856d7f24418c79413 Mon Sep 17 00:00:00 2001 From: corey Date: Fri, 12 Jan 2024 20:58:18 -0600 Subject: [PATCH 164/200] WiP: Publishing Manylinux --- .github/workflows/publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 540699d6..53aeba73 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -82,6 +82,9 @@ jobs: lock_master: needs: [precheck] runs-on: ubuntu-latest + steps: + - name: no-op + run: echo "hi" # steps: # - name: Check Master Lock Status # uses: actions/github-script@v7 From a406070a4637c65f1d465c788fdfcfc81967a97a Mon Sep 17 00:00:00 2001 From: corey Date: Fri, 12 Jan 2024 21:01:36 -0600 Subject: [PATCH 165/200] WiP: Publishing Manylinux --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 53aeba73..501308e5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -120,7 +120,7 @@ jobs: needs: [lock_master] runs-on: ubuntu-latest container: - image: pypa/manylinux2010_x86_64 + image: quay.io/pypa/manylinux2010_x86_64 steps: - uses: actions/checkout@v2 From a2df13161e2af057639f1d2e2bebeabc167ecc18 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 13 Jan 2024 07:02:26 -0600 Subject: [PATCH 166/200] WiP: Publishing Manylinux --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 501308e5..d53030a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -121,6 +121,7 @@ jobs: runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux2010_x86_64 + options: --user root steps: - uses: actions/checkout@v2 From 5500ecb9c69dcb5474125a36e867b843abc90435 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 13 Jan 2024 07:12:27 -0600 Subject: [PATCH 167/200] WiP: Publishing, try manylinux2014 image --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d53030a0..4bd18378 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -120,7 +120,7 @@ jobs: needs: [lock_master] runs-on: ubuntu-latest container: - image: quay.io/pypa/manylinux2010_x86_64 + image: quay.io/pypa/manylinux2014_x86_64 options: --user root steps: - uses: actions/checkout@v2 From 66ddea8446fd58cf6b4fd664437efa7c929a7ff2 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 13 Jan 2024 07:36:13 -0600 Subject: [PATCH 168/200] WiP: Publishing: Momentarily skip Rust install --- .github/workflows/publish.yml | 37 ++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4bd18378..4145834c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -131,17 +131,22 @@ jobs: toolchain: ${{ fromJSON(vars.RUST_VERSION) }} rustflags: - - name: Override Project Rust Version - run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} + # - name: Update CURL + # run: | + # curl --version - - name: Check Rust Version - run: | - rustc --version - cargo --version - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} + # - name: Override Project Rust Version + # run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} + + # - name: Check Rust Version + # run: | + # rustc --version + # cargo --version + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} - name: Display Python Version run: python -c "import sys; print(sys.version)" @@ -151,11 +156,11 @@ jobs: pip install poetry==1.3.2 poetry --version - - name: install libdbus - run: | - sudo apt update - sudo apt install libdbus-1-dev - if: contains(matrix.os, 'ubuntu') + - name: install libdbus + # if: contains(matrix.os, 'ubuntu') + run: | + sudo apt update + sudo apt install libdbus-1-dev - name: Build Origen Metal Python Package working-directory: python/origen_metal @@ -204,7 +209,7 @@ jobs: with: name: ${{ env.origen_ver_file }} path: python/origen/${{ env.origen_ver_file }} - + build: strategy: fail-fast: false From 701a1e5ac4b1cbf4772820aa8558b229acb94f74 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 13 Jan 2024 07:39:09 -0600 Subject: [PATCH 169/200] WiP: Publishing: Actually try rust skip --- .github/workflows/publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4145834c..8575afc1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -125,11 +125,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: ${{ fromJSON(vars.RUST_VERSION) }} - rustflags: + # - name: Install Rust + # uses: actions-rust-lang/setup-rust-toolchain@v1 + # with: + # toolchain: ${{ fromJSON(vars.RUST_VERSION) }} + # rustflags: # - name: Update CURL # run: | From e4bab83aacb9be00cb1d3821af71a809ab5fd19b Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 16 Jan 2024 16:39:59 -0600 Subject: [PATCH 170/200] WiP: Publishing: manylinux --- .github/workflows/publish.yml | 115 +++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 51 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8575afc1..d5473346 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -125,56 +125,71 @@ jobs: steps: - uses: actions/checkout@v2 - # - name: Install Rust - # uses: actions-rust-lang/setup-rust-toolchain@v1 - # with: - # toolchain: ${{ fromJSON(vars.RUST_VERSION) }} - # rustflags: - - # - name: Update CURL - # run: | - # curl --version - - # - name: Override Project Rust Version - # run: rustup override set ${{ fromJSON(vars.RUST_VERSION) }} + - name: Install Rust + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + source "$HOME/.cargo/env" + rustup install ${{ fromJSON(vars.RUST_VERSION) }} + rustup default ${{ fromJSON(vars.RUST_VERSION) }} - # - name: Check Rust Version - # run: | - # rustc --version - # cargo --version + - name: Check Rust Version + run: | + rustc --version + cargo --version - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} + # TODO: For now use pre-installed python version. + # In future, will probably want to download latest version + - name: Set Python Version (3.7 Path) + if: ${{ fromJSON(matrix.python-version) == 3.7 }} + run: | + PYVER=$(echo $VER | sed -e "s/\.//g") + PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER\m/bin + export PATH=$PATH_TO_PY:$PATH + - name: Set Python Version + if: ${{ fromJSON(matrix.python-version) != 3.7 }} + run: | + PYVER=$(echo $VER | sed -e "s/\.//g") + PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER/bin + export PATH=$PATH_TO_PY:$PATH - name: Display Python Version - run: python -c "import sys; print(sys.version)" + run: + python --version + pip --version - name: Install Poetry run: | pip install poetry==1.3.2 poetry --version - - name: install libdbus - # if: contains(matrix.os, 'ubuntu') + - name: Install Auditwheel run: | - sudo apt update - sudo apt install libdbus-1-dev + pip install auditwheel + auditwheel --version - name: Build Origen Metal Python Package working-directory: python/origen_metal run: poetry build --format wheel - - name: Display Dist Directory - working-directory: python/origen_metal/dist - run: ls + - name: Display OM Dist Directory + working-directory: python/origen_metal + run: ls dist + + - name: Repair OM Wheel + working-directory: python/origen_metal + run: | + auditwheel show dist/* + auditwheel repair dist/* + + - name: Display OM Wheelhouse Directory + working-directory: python/origen_metal + run: ls wheelhouse - name: Upload Origen Metal Python Package Artifact uses: actions/upload-artifact@v3 with: name: om_wheels - path: python/origen_metal/dist/origen_metal* + path: python/origen_metal/wheelhouse/* - name: Get OM Python Package Version working-directory: python/origen_metal @@ -190,15 +205,25 @@ jobs: working-directory: python/origen run: poetry build --format wheel - - name: Display Dist Directory - working-directory: python/origen/dist - run: ls + - name: Display Origen Dist Directory + working-directory: python/origen + run: ls dist + + - name: Repair Origen Wheel + working-directory: python/origen + run: | + auditwheel show dist/* + auditwheel repair dist/* + + - name: Display OM Wheelhouse Directory + working-directory: python/origen + run: ls wheelhouse - name: Upload Origen Python Package Artifact uses: actions/upload-artifact@v3 with: name: origen_wheels - path: python/origen/dist/origen* + path: python/origen/wheelhouse/* - name: Get Origen Python Package Version working-directory: python/origen @@ -210,17 +235,14 @@ jobs: name: ${{ env.origen_ver_file }} path: python/origen/${{ env.origen_ver_file }} - build: + build_windows: strategy: fail-fast: false matrix: - os: ${{ fromJSON(vars.SUPPORTED_OS) }} python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} needs: [lock_master] - # Temporarily disable this while working with manylinux image - if: ${{ 0 == 1 }} - runs-on: ${{ matrix.os }} + runs-on: windows-latest steps: - uses: actions/checkout@v2 @@ -251,15 +273,6 @@ jobs: pip install poetry==1.3.2 poetry --version - # Needed to compile keyring library - # Install taken from keyring library: - # https://github.com/hwchen/keyring-rs/blob/v0.10.1/.github/workflows/ci.yaml#L80-L84 - - name: install libdbus - run: | - sudo apt update - sudo apt install libdbus-1-dev - if: contains(matrix.os, 'ubuntu') - - name: Build Origen Metal Python Package working-directory: python/origen_metal run: poetry build --format wheel @@ -369,7 +382,7 @@ jobs: # # ... publish_to_pypi_test: - needs: build + needs: [build_manylinux, build_windows] runs-on: ubuntu-latest if: ${{ github.event.inputs.publish_pypi_test == 'true' }} steps: @@ -412,7 +425,7 @@ jobs: verbose: true publish_to_pypi: - needs: build + needs: [build_manylinux, build_windows] runs-on: ubuntu-latest if: ${{ github.event.inputs.publish_pypi == 'true' }} steps: @@ -453,7 +466,7 @@ jobs: verbose: true release: - needs: build + needs: [build_manylinux, build_windows] runs-on: ubuntu-latest if: ${{ github.event.inputs.publish_github_release == 'true' }} steps: @@ -521,7 +534,7 @@ jobs: commit: ${{ github.sha }} tag: ${{ env.tag }} cleanup: - needs: [build, publish_to_pypi_test, publish_to_pypi, release] + needs: [lock_master, build_manylinux, build_windows, publish_to_pypi_test, publish_to_pypi, release] runs-on: ubuntu-latest if: ${{ always() }} steps: From 78fb3a8579c8ce7c87b7aa0354c0e52907ff1887 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 16 Jan 2024 19:42:37 -0600 Subject: [PATCH 171/200] WiP: Publishing: manylinux --- .github/workflows/publish.yml | 42 ++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d5473346..18ffb9be 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -128,7 +128,7 @@ jobs: - name: Install Rust run: | curl https://sh.rustup.rs -sSf | sh -s -- -y - source "$HOME/.cargo/env" + echo "$HOME/.cargo/bin" >> $GITHUB_PATH rustup install ${{ fromJSON(vars.RUST_VERSION) }} rustup default ${{ fromJSON(vars.RUST_VERSION) }} @@ -140,17 +140,21 @@ jobs: # TODO: For now use pre-installed python version. # In future, will probably want to download latest version - name: Set Python Version (3.7 Path) - if: ${{ fromJSON(matrix.python-version) == 3.7 }} + if: ${{ matrix.python-version == 3.7 }} run: | - PYVER=$(echo $VER | sed -e "s/\.//g") + PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g") + echo $PYVER PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER\m/bin - export PATH=$PATH_TO_PY:$PATH + echo $PATH_TO_PY + echo "$PATH_TO_PY" >> $GITHUB_PATH - name: Set Python Version - if: ${{ fromJSON(matrix.python-version) != 3.7 }} + if: ${{ matrix.python-version != 3.7 }} run: | - PYVER=$(echo $VER | sed -e "s/\.//g") + PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g") + echo $PYVER PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER/bin - export PATH=$PATH_TO_PY:$PATH + echo $PATH_TO_PY + echo "$PATH_TO_PY" >> $GITHUB_PATH - name: Display Python Version run: @@ -381,6 +385,28 @@ jobs: # echo "Publishing to Github Releases" # # ... + show_wheels: + needs: [build_manylinux, build_windows] + runs-on: ubuntu-latest + steps: + - name: Retrieve OM Wheels + uses: actions/download-artifact@v3 + with: + name: om_wheels + path: om_wheels + + - name: List OM Wheels + run: ls -al ./om_wheels + + - name: Retrieve Origen Wheels + uses: actions/download-artifact@v3 + with: + name: origen_wheels + path: origen_wheels + + - name: List Origen Wheels + run: ls -al ./origen_wheels + publish_to_pypi_test: needs: [build_manylinux, build_windows] runs-on: ubuntu-latest @@ -534,7 +560,7 @@ jobs: commit: ${{ github.sha }} tag: ${{ env.tag }} cleanup: - needs: [lock_master, build_manylinux, build_windows, publish_to_pypi_test, publish_to_pypi, release] + needs: [lock_master, build_manylinux, build_windows, publish_to_pypi_test, publish_to_pypi, release, show_wheels] runs-on: ubuntu-latest if: ${{ always() }} steps: From 56fcb19f3581b6250da83cb482fa49699c8de26f Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 16 Jan 2024 20:13:40 -0600 Subject: [PATCH 172/200] WiP: Publishing: manylinux --- .github/workflows/publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 18ffb9be..84571c99 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -129,6 +129,9 @@ jobs: run: | curl https://sh.rustup.rs -sSf | sh -s -- -y echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Set Rust Version + run: | rustup install ${{ fromJSON(vars.RUST_VERSION) }} rustup default ${{ fromJSON(vars.RUST_VERSION) }} From 8199c5c119f55b390ae8f3afb9f33f7abe255435 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 20 Jan 2024 15:12:02 -0600 Subject: [PATCH 173/200] WiP: Publishing manylinux --- .github/workflows/publish.yml | 78 +++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 84571c99..f2ee82a1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -116,7 +116,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} + python-version: ${{ fromJSON(vars.PYTHON_VERSIONS_FOR_RELEASE) }} needs: [lock_master] runs-on: ubuntu-latest container: @@ -140,27 +140,69 @@ jobs: rustc --version cargo --version - # TODO: For now use pre-installed python version. - # In future, will probably want to download latest version - - name: Set Python Version (3.7 Path) - if: ${{ matrix.python-version == 3.7 }} + - name: Install Newer OpenSSL run: | - PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g") - echo $PYVER - PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER\m/bin - echo $PATH_TO_PY - echo "$PATH_TO_PY" >> $GITHUB_PATH - - name: Set Python Version - if: ${{ matrix.python-version != 3.7 }} + curl -O https://www.openssl.org/source/openssl-1.1.1l.tar.gz + tar zxf openssl-1.1.1l.tar.gz + cd openssl-1.1.1l + ./config + make + make install + + - name: Install Python run: | - PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g") - echo $PYVER - PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER/bin - echo $PATH_TO_PY - echo "$PATH_TO_PY" >> $GITHUB_PATH + curl -O https://www.python.org/ftp/python/${{ matrix.python-version }}/Python-$PY_VER.tgz + tar zxf Python-${{ matrix.python-version }}.tgz + cd Python-${{ matrix.python-version }} + ./configure --with-openssl=/openssl-1.1.1l --prefix=/root/python --enable-optimizations --enable-shared + make altinstall + + - name: Update LD_LIBRARY_PATH + run: | + echo $LD_LIBRARY_PATH + echo "LD_LIBRARY_PATH=/Python-${{ matrix.python-version }}:$LD_LIBRARY_PATH" >> $GITHUB_ENV + + - name: Check LD_LIBRARY_PATH + run: | + echo $LD_LIBRARY_PATH + + - name: Alias Python and Pip binaries + run: | + IFS='.' read -r -a SPLIT_VER <<< ${{ matrix.python-version }} + M_VER=${SPLIT_VER[0]}.${SPLIT_VER[1]} + echo $M_VER + ls /root/python/bin + ln -s /root/python/bin/python$M_VER /root/python/bin/python + ln -s /root/python/bin/pip$M_VER /root/python/bin/pip + ls /root/python/bin + + - name: Update $PATH + run: | + echo /root/python/bin >> $GITHUB_PATH + + # # TODO: For now use pre-installed python version. + # # In future, will probably want to download latest version + # - name: Set Python Version (3.7 Path) + # if: ${{ matrix.python-version == 3.7 }} + # run: | + # PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g") + # echo $PYVER + # PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER\m/bin + # echo $PATH_TO_PY + # echo "$PATH_TO_PY" >> $GITHUB_PATH + # - name: Set Python Version + # if: ${{ matrix.python-version != 3.7 }} + # run: | + # PYVER=$(echo ${{ matrix.python-version }} | sed -e "s/\.//g") + # echo $PYVER + # PATH_TO_PY=/opt/python/cp$PYVER-cp$PYVER/bin + # echo $PATH_TO_PY + # echo "$PATH_TO_PY" >> $GITHUB_PATH - name: Display Python Version run: + which python + which pip python --version pip --version @@ -246,7 +288,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} + python-version: ${{ fromJSON(vars.PYTHON_VERSIONS_FOR_RELEASE) }} needs: [lock_master] runs-on: windows-latest From f6f4bf720009ebd0f9cf81919f4f5dc09f545c41 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 20 Jan 2024 16:27:46 -0600 Subject: [PATCH 174/200] WiP: Publishing. Revert windows release to same versions as regressions. Update openssl version from 'l' to 'w' --- .github/workflows/publish.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f2ee82a1..0cbae564 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -142,9 +142,10 @@ jobs: - name: Install Newer OpenSSL run: | - curl -O https://www.openssl.org/source/openssl-1.1.1l.tar.gz - tar zxf openssl-1.1.1l.tar.gz - cd openssl-1.1.1l + curl -O https://www.openssl.org/source/openssl-1.1.1w.tar.gz + ls -al openssl-1.1.1w.tar.gz + tar zxf openssl-1.1.1w.tar.gz + cd openssl-1.1.1w ./config make make install @@ -154,7 +155,7 @@ jobs: curl -O https://www.python.org/ftp/python/${{ matrix.python-version }}/Python-$PY_VER.tgz tar zxf Python-${{ matrix.python-version }}.tgz cd Python-${{ matrix.python-version }} - ./configure --with-openssl=/openssl-1.1.1l --prefix=/root/python --enable-optimizations --enable-shared + ./configure --with-openssl=/openssl-1.1.1w --prefix=/root/python --enable-optimizations --enable-shared make altinstall - name: Update LD_LIBRARY_PATH @@ -288,7 +289,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ${{ fromJSON(vars.PYTHON_VERSIONS_FOR_RELEASE) }} + python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} needs: [lock_master] runs-on: windows-latest From 621fba4a0189489efa2682a73888413c2aa0d0c1 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 20 Jan 2024 16:36:22 -0600 Subject: [PATCH 175/200] WiP: Publishing manylinux. Bugfix for python URL --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0cbae564..b916e110 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -152,7 +152,7 @@ jobs: - name: Install Python run: | - curl -O https://www.python.org/ftp/python/${{ matrix.python-version }}/Python-$PY_VER.tgz + curl -O https://www.python.org/ftp/python/${{ matrix.python-version }}/Python-${{ matrix.python-version }}.tgz tar zxf Python-${{ matrix.python-version }}.tgz cd Python-${{ matrix.python-version }} ./configure --with-openssl=/openssl-1.1.1w --prefix=/root/python --enable-optimizations --enable-shared From 852310f57de9ac3d4a1d7c1a081f3e9c5a15ac03 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 20 Jan 2024 18:04:13 -0600 Subject: [PATCH 176/200] WiP: Publishing manylinux --- .github/workflows/publish.yml | 39 +++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b916e110..9aa6fc1f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -150,6 +150,13 @@ jobs: make make install + - name: Save Minor Python Version + run: | + IFS='.' read -r -a SPLIT_VER <<< ${{ matrix.python-version }} + M_VER=${SPLIT_VER[0]}.${SPLIT_VER[1]} + echo $M_VER + echo "PY_M_VER=$M_VER" >> $GITHUB_ENV + - name: Install Python run: | curl -O https://www.python.org/ftp/python/${{ matrix.python-version }}/Python-${{ matrix.python-version }}.tgz @@ -158,10 +165,22 @@ jobs: ./configure --with-openssl=/openssl-1.1.1w --prefix=/root/python --enable-optimizations --enable-shared make altinstall - - name: Update LD_LIBRARY_PATH + + - name: Copy Python Shared Library (Python 3.7) + if: ${{ matrix.python-version == '3.7.17' }} run: | - echo $LD_LIBRARY_PATH - echo "LD_LIBRARY_PATH=/Python-${{ matrix.python-version }}:$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo $PY_M_VER + cp libpython$PY_M_VERm.so.1.0 /usr/local/lib64/ + - name: Copy Python Shared Library (Python 3.8+ Versions) + if: ${{ matrix.python-version != '3.7.17' }} + run: | + echo $PY_M_VER + cp libpython$PY_M_VER.so.1.0 /usr/local/lib64/ + + # - name: Update LD_LIBRARY_PATH + # run: | + # echo $LD_LIBRARY_PATH + # echo "LD_LIBRARY_PATH=/Python-${{ matrix.python-version }}:$LD_LIBRARY_PATH" >> $GITHUB_ENV - name: Check LD_LIBRARY_PATH run: | @@ -169,12 +188,10 @@ jobs: - name: Alias Python and Pip binaries run: | - IFS='.' read -r -a SPLIT_VER <<< ${{ matrix.python-version }} - M_VER=${SPLIT_VER[0]}.${SPLIT_VER[1]} - echo $M_VER + echo $PY_M_VER ls /root/python/bin - ln -s /root/python/bin/python$M_VER /root/python/bin/python - ln -s /root/python/bin/pip$M_VER /root/python/bin/pip + ln -s /root/python/bin/python$PY_M_VER /root/python/bin/python + ln -s /root/python/bin/pip$PY_M_VER /root/python/bin/pip ls /root/python/bin - name: Update $PATH @@ -201,7 +218,7 @@ jobs: # echo "$PATH_TO_PY" >> $GITHUB_PATH - name: Display Python Version - run: + run: | which python which pip python --version @@ -537,7 +554,7 @@ jobs: verify-metadata: false verbose: true - release: + publish_github_release: needs: [build_manylinux, build_windows] runs-on: ubuntu-latest if: ${{ github.event.inputs.publish_github_release == 'true' }} @@ -606,7 +623,7 @@ jobs: commit: ${{ github.sha }} tag: ${{ env.tag }} cleanup: - needs: [lock_master, build_manylinux, build_windows, publish_to_pypi_test, publish_to_pypi, release, show_wheels] + needs: [lock_master, build_manylinux, build_windows, publish_to_pypi_test, publish_to_pypi, publish_github_release, show_wheels] runs-on: ubuntu-latest if: ${{ always() }} steps: From e4ea98f591f16b4a2024ddb75d27732c8fe63fdb Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 20 Jan 2024 19:40:26 -0600 Subject: [PATCH 177/200] WiP: Publishing manylinux --- .github/workflows/publish.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9aa6fc1f..a2bed675 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -165,16 +165,19 @@ jobs: ./configure --with-openssl=/openssl-1.1.1w --prefix=/root/python --enable-optimizations --enable-shared make altinstall - - name: Copy Python Shared Library (Python 3.7) if: ${{ matrix.python-version == '3.7.17' }} run: | echo $PY_M_VER - cp libpython$PY_M_VERm.so.1.0 /usr/local/lib64/ + cd Python-${{ matrix.python-version }} + ls + cp libpython$PY_M_VER\m.so.1.0 /usr/local/lib64/ - name: Copy Python Shared Library (Python 3.8+ Versions) if: ${{ matrix.python-version != '3.7.17' }} run: | echo $PY_M_VER + cd Python-${{ matrix.python-version }} + ls cp libpython$PY_M_VER.so.1.0 /usr/local/lib64/ # - name: Update LD_LIBRARY_PATH From 81f6c82d68d9ce7b196b74b2488adb2984b3db2b Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 20 Jan 2024 20:18:07 -0600 Subject: [PATCH 178/200] WiP: Publishing manylinux --- .github/workflows/publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2bed675..8f2d86a0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -123,6 +123,11 @@ jobs: image: quay.io/pypa/manylinux2014_x86_64 options: --user root steps: + - name: Show Path + run: | + pwd + echo "ROOT_DIR=$PWD" >> $GITHUB_ENV + - uses: actions/checkout@v2 - name: Install Rust @@ -159,10 +164,11 @@ jobs: - name: Install Python run: | + ls /ROOT_DIR/openssl-1.1.1w curl -O https://www.python.org/ftp/python/${{ matrix.python-version }}/Python-${{ matrix.python-version }}.tgz tar zxf Python-${{ matrix.python-version }}.tgz cd Python-${{ matrix.python-version }} - ./configure --with-openssl=/openssl-1.1.1w --prefix=/root/python --enable-optimizations --enable-shared + ./configure --with-openssl=$ROOT_DIR/openssl-1.1.1w --prefix=/root/python --enable-optimizations --enable-shared make altinstall - name: Copy Python Shared Library (Python 3.7) From 96c916e2f1fda3e017d47434f7687de122e2a037 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 20 Jan 2024 20:29:39 -0600 Subject: [PATCH 179/200] WiP: Publishing manylinux --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8f2d86a0..7d69736f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -164,7 +164,7 @@ jobs: - name: Install Python run: | - ls /ROOT_DIR/openssl-1.1.1w + ls $ROOT_DIR/openssl-1.1.1w curl -O https://www.python.org/ftp/python/${{ matrix.python-version }}/Python-${{ matrix.python-version }}.tgz tar zxf Python-${{ matrix.python-version }}.tgz cd Python-${{ matrix.python-version }} From ed98e7ed50cb405c6b1070384b822b3ff9962df1 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 21 Jan 2024 13:15:28 -0600 Subject: [PATCH 180/200] WiP: Publishing manylinux --- .github/workflows/publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7d69736f..8e94585c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -162,6 +162,12 @@ jobs: echo $M_VER echo "PY_M_VER=$M_VER" >> $GITHUB_ENV + - name: Install libffi for Python 3.12+ + if: ${{ fromJSON(env.PY_M_VER) >= 3.12 }} + run: | + yum install libffi-devel -y + ldconfig + - name: Install Python run: | ls $ROOT_DIR/openssl-1.1.1w @@ -291,7 +297,7 @@ jobs: auditwheel show dist/* auditwheel repair dist/* - - name: Display OM Wheelhouse Directory + - name: Display Origen Wheelhouse Directory working-directory: python/origen run: ls wheelhouse From 578f3f130fbc7cc3ed96e07cc05a20af7524a6a0 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 21 Jan 2024 15:10:54 -0600 Subject: [PATCH 181/200] WiP: Publishing manylinux --- .github/workflows/publish.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8e94585c..91cdc111 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -123,10 +123,12 @@ jobs: image: quay.io/pypa/manylinux2014_x86_64 options: --user root steps: - - name: Show Path + - name: Show Env run: | pwd echo "ROOT_DIR=$PWD" >> $GITHUB_ENV + env + echo "HOME=/root" >> $GITHUB_ENV - uses: actions/checkout@v2 @@ -246,6 +248,7 @@ jobs: - name: Install Auditwheel run: | + pip install setuptools pip install auditwheel auditwheel --version From 243bdeda5a4bbbc127f3dcdd22150990cf294d05 Mon Sep 17 00:00:00 2001 From: corey Date: Thu, 1 Feb 2024 16:30:00 -0600 Subject: [PATCH 182/200] Move version wrapper to OM. Add some version tests. Support version function from OM. --- python/origen_metal/origen_metal/__init__.py | 6 + .../origen_metal/_helpers/__init__.py | 29 +++++ .../origen_metal/utils/version.py | 4 + python/origen_metal/poetry.lock | 10 +- python/origen_metal/pyproject.toml | 3 +- python/origen_metal/tests/__init__.py | 3 + .../origen_metal/tests/utils/test_version.py | 67 ++++++++++ .../cli/src/commands/develop_origen/build.rs | 2 +- .../src/commands/develop_origen/publish.rs | 2 +- rust/origen/src/core/application.rs | 7 +- rust/origen/src/core/frontend/mod.rs | 2 +- rust/origen/src/core/status.rs | 2 +- rust/origen/src/utility/mod.rs | 1 - rust/origen/src/utility/release_scribe.rs | 2 +- rust/origen_metal/Cargo.toml | 2 +- rust/origen_metal/src/utils/mod.rs | 3 +- .../src/utils}/version.rs | 26 ++-- rust/pyapi/Cargo.lock | 80 +++++++++--- rust/pyapi/src/application/mod.rs | 4 +- rust/pyapi/src/lib.rs | 2 +- rust/pyapi/src/utility/mod.rs | 3 - .../src/utility/release_scribe/_frontend.rs | 2 +- rust/pyapi/src/utility/release_scribe/mod.rs | 2 +- rust/pyapi/src/utility/version.rs | 17 --- rust/pyapi_metal/Cargo.lock | 119 ++++++++++++++++-- rust/pyapi_metal/src/_helpers/errors.rs | 10 ++ rust/pyapi_metal/src/utils/mod.rs | 3 + rust/pyapi_metal/src/utils/version.rs | 52 ++++++++ 28 files changed, 384 insertions(+), 81 deletions(-) create mode 100644 python/origen_metal/origen_metal/utils/version.py create mode 100644 python/origen_metal/tests/utils/test_version.py rename rust/{origen/src/utility => origen_metal/src/utils}/version.rs (98%) delete mode 100644 rust/pyapi/src/utility/version.rs create mode 100644 rust/pyapi_metal/src/utils/version.rs diff --git a/python/origen_metal/origen_metal/__init__.py b/python/origen_metal/origen_metal/__init__.py index 0237747f..c8a81553 100644 --- a/python/origen_metal/origen_metal/__init__.py +++ b/python/origen_metal/origen_metal/__init__.py @@ -21,5 +21,11 @@ def __getattr__(name): if name == "current_user": return users.current_user + elif name == "version": + from origen_metal.utils.version import Version + return Version(__getattr__("__version__")) + elif name == "__version__": + import importlib_metadata + return importlib_metadata.version(__name__) else: raise AttributeError(f"module '{__name__}' has no attribute '{name}'") diff --git a/python/origen_metal/origen_metal/_helpers/__init__.py b/python/origen_metal/origen_metal/_helpers/__init__.py index 7cfe0ba6..cbd830e5 100644 --- a/python/origen_metal/origen_metal/_helpers/__init__.py +++ b/python/origen_metal/origen_metal/_helpers/__init__.py @@ -1,5 +1,34 @@ import inspect import multiprocessing as mp +import subprocess as sp +from typing import Any + +PACKAGE_NOT_FOUND_MESSAGE = "Package(s) not found:" + +# TODO pip_show: add some basic tests +class PipShowReturn: + def __init__(self, output): + self.fields = dict([l.strip().split(":", 1) for l in output.split("\n")[:-1]]) + self.fields = dict([k.strip(), v.strip()] for k, v in self.fields.items()) + self._field_names = dict([f.lower().replace('-', '_'), f] for f in self.fields.keys()) + + def __getattr__(self, name: str) -> Any: + if name in self._field_names: + return self.fields[self._field_names[name]] + return object.__getattribute__(self, name) + +def pip_show(package, *, no_parse=False, wrap_poetry=False): + if wrap_poetry: + cmd = ["poetry", "run"] + else: + cmd = [] + cmd += ["pip", "show", package] + result = sp.run(cmd, capture_output=True, text=True) + if no_parse: + return result + if PACKAGE_NOT_FOUND_MESSAGE in result.stderr: + return None + return PipShowReturn(result.stdout) # TODO swap out assert? diff --git a/python/origen_metal/origen_metal/utils/version.py b/python/origen_metal/origen_metal/utils/version.py new file mode 100644 index 00000000..bedd8a53 --- /dev/null +++ b/python/origen_metal/origen_metal/utils/version.py @@ -0,0 +1,4 @@ +from origen_metal import _origen_metal +Version = _origen_metal.utils.Version +from_pyproject = _origen_metal.utils.Version.from_pyproject +from_cargo = _origen_metal.utils.Version.from_cargo diff --git a/python/origen_metal/poetry.lock b/python/origen_metal/poetry.lock index 2ca9d2df..e5162a0f 100644 --- a/python/origen_metal/poetry.lock +++ b/python/origen_metal/poetry.lock @@ -65,7 +65,7 @@ files = [ name = "importlib-metadata" version = "6.7.0" description = "Read metadata from Python packages" -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -331,7 +331,7 @@ files = [ name = "typing-extensions" version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -358,7 +358,7 @@ test = ["pytest (>=6.0.0)", "setuptools (>=65)"] name = "zipp" version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" +category = "main" optional = false python-versions = ">=3.7" files = [ @@ -372,5 +372,5 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" -python-versions = ">=3.7.0,<=3.12" -content-hash = "68694abde59ff574b5a699ef94857ad3003f0a8afd56f577eb4cb272ac87bbd0" +python-versions = ">=3.7.0,<3.13" +content-hash = "1972e64b2e47e1b12a5020124e331c949b64e0c1f39ebb56d228b88a065d15db" diff --git a/python/origen_metal/pyproject.toml b/python/origen_metal/pyproject.toml index 03e83274..df3903d8 100644 --- a/python/origen_metal/pyproject.toml +++ b/python/origen_metal/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "origen_metal" -version = "0.4.1.dev0" +version = "0.4.1.dev1" description = "Bare metal APIs for the Origen SDK" authors = ["Origen-SDK"] include = [ @@ -13,6 +13,7 @@ python = ">=3.7.0,<3.13" pyreadline3 = { version="^3.3", platform="win32" } termcolor = ">= 1.1.0" colorama = ">= 0.4.4" # Note: colorama is usually installed on the system already, but it isn't actually required (e.g. WSL won't have this by default) +importlib-metadata = ">= 6.7.0" # For use with Python pre-3.8 [tool.poetry.dev-dependencies] pytest = "^6.2.4" diff --git a/python/origen_metal/tests/__init__.py b/python/origen_metal/tests/__init__.py index ef0f0f4c..c1b370c3 100644 --- a/python/origen_metal/tests/__init__.py +++ b/python/origen_metal/tests/__init__.py @@ -1,6 +1,9 @@ import pytest +from pathlib import Path # Have pytest's assert rewriting take over: # https://docs.pytest.org/en/stable/writing_plugins.html#assertion-rewriting pytest.register_assert_rewrite("tests.shared") pytest.register_assert_rewrite("tests.framework.users") + +test_dir = Path(__file__).parent \ No newline at end of file diff --git a/python/origen_metal/tests/utils/test_version.py b/python/origen_metal/tests/utils/test_version.py new file mode 100644 index 00000000..3f30ad38 --- /dev/null +++ b/python/origen_metal/tests/utils/test_version.py @@ -0,0 +1,67 @@ +import origen_metal +import pytest +from origen_metal._helpers import pip_show +from origen_metal.utils import version +from origen_metal.utils.version import Version +from pathlib import Path +from tests import test_dir + +class TestVersion: + ''' + Only need to test the Python API. + Other tests of Version itself are handled on the Rust side + ''' + + pyproject_path = test_dir.parent.joinpath("pyproject.toml") + cargo_path = test_dir.parent.parent.parent.joinpath("rust/pyapi_metal/Cargo.toml") + + def test_version_form_string(self): + v = "1.2.3.dev4" + ver = Version(v) + assert isinstance(ver, Version) + assert str(ver) == v + + def test_invalid_version_from_string(self): + with pytest.raises(ValueError, match=r"unexpected character 'b' while parsing minor version number"): + Version("1.b.c") + + def test_version_from_pyproject(self): + # path as string + v = version.from_pyproject(str(self.pyproject_path)) + assert str(v) == current_version() + + # path as pathlib.Path + v = version.from_pyproject(self.pyproject_path) + assert str(v) == current_version() + + def test_invalid_pyproject_path(self): + with pytest.raises(RuntimeError, match=r"The system cannot find the path specified"): + version.from_pyproject("path/to/nowhere/pyproject.toml") + + def test_version_from_cargo(self): + print(self.cargo_path) + # path as string + v = version.from_cargo(str(self.cargo_path)) + assert str(v) == origen_metal._origen_metal.__version__ + + # path as pathlib.Path + v = version.from_cargo(self.cargo_path) + assert str(v) == origen_metal._origen_metal.__version__ + + def test_invalid_cargo_path(self): + with pytest.raises(RuntimeError, match=r"The system cannot find the path specified"): + version.from_cargo("path/to/nowhere/cargo.toml") + +_current_version = None +def current_version(): + global _current_version + if _current_version is None: + _current_version = pip_show('origen_metal', wrap_poetry=True).version + return _current_version + +def test_om_version(): + assert isinstance(origen_metal.version, Version) + assert str(origen_metal.version) == current_version() + +def test_om_version_str(): + assert origen_metal.__version__ == current_version() diff --git a/rust/origen/cli/src/commands/develop_origen/build.rs b/rust/origen/cli/src/commands/develop_origen/build.rs index 82d22065..aa8c54a7 100644 --- a/rust/origen/cli/src/commands/develop_origen/build.rs +++ b/rust/origen/cli/src/commands/develop_origen/build.rs @@ -1,6 +1,6 @@ use clap::{App, Arg, ArgMatches}; use origen::core::file_handler::File; -use origen::utility::version::Version; +use origen_metal::utils::version::Version; use origen::{Result, STATUS}; use origen_metal::utils::file::with_dir; use origen_metal::utils::file::{cd, symlink}; diff --git a/rust/origen/cli/src/commands/develop_origen/publish.rs b/rust/origen/cli/src/commands/develop_origen/publish.rs index fe063f14..72fd2bea 100644 --- a/rust/origen/cli/src/commands/develop_origen/publish.rs +++ b/rust/origen/cli/src/commands/develop_origen/publish.rs @@ -1,6 +1,6 @@ use crate::commands::_prelude::*; use crate::STATUS; -use origen::utility::version::{Version, ReleaseType, VersionWithTOML}; +use origen_metal::utils::version::{Version, ReleaseType, VersionWithTOML}; use origen::utility::github::{dispatch_workflow, get_latest_workflow_dispatch}; use origen_metal::utils::terminal::confirm_or_exit; use origen_metal::utils::revision_control::RevisionControlAPI; diff --git a/rust/origen/src/core/application.rs b/rust/origen/src/core/application.rs index b2ab2cf9..b2c7f7ca 100644 --- a/rust/origen/src/core/application.rs +++ b/rust/origen/src/core/application.rs @@ -2,7 +2,7 @@ pub mod config; pub mod target; use super::application::config::Config; -use crate::utility::version::{set_version_in_toml, Version}; +use origen_metal::utils::version::Version; use crate::Result; use indexmap::IndexMap; use origen_metal::framework::reference_files; @@ -75,7 +75,10 @@ impl Application { "Updating version file: '{}'", self.version_file().into_os_string().into_string()? ); - set_version_in_toml(&self.version_file(), version) + let mut v = Version::from_pyproject_with_toml_handle(self.version_file())?; + v.set_new_version(version.clone())?; + v.write()?; + Ok(()) } /// Execute the given function with a reference to the application config. diff --git a/rust/origen/src/core/frontend/mod.rs b/rust/origen/src/core/frontend/mod.rs index 966cbf34..569cdd47 100644 --- a/rust/origen/src/core/frontend/mod.rs +++ b/rust/origen/src/core/frontend/mod.rs @@ -1,7 +1,7 @@ use crate::Result; pub mod callbacks; -use crate::utility::version::Version; +use origen_metal::utils::version::Version; use std::path::PathBuf; use origen_metal::{Outcome, TypedValueVec, TypedValueMap}; diff --git a/rust/origen/src/core/status.rs b/rust/origen/src/core/status.rs index a821268b..bf8b8c61 100644 --- a/rust/origen/src/core/status.rs +++ b/rust/origen/src/core/status.rs @@ -2,7 +2,7 @@ extern crate time; use crate::built_info; use crate::core::application::Application; use crate::testers::SupportedTester; -use crate::utility::version::Version; +use origen_metal::utils::version::Version; use crate::Result as OrigenResult; use origen_metal::utils::file::with_dir; use regex::Regex; diff --git a/rust/origen/src/utility/mod.rs b/rust/origen/src/utility/mod.rs index 0ead029f..72e8ba80 100644 --- a/rust/origen/src/utility/mod.rs +++ b/rust/origen/src/utility/mod.rs @@ -7,7 +7,6 @@ pub mod github; pub mod num_helpers; pub mod release_scribe; pub mod sessions; -pub mod version; use crate::{Result, STATUS}; use std::path::{Path, PathBuf}; diff --git a/rust/origen/src/utility/release_scribe.rs b/rust/origen/src/utility/release_scribe.rs index 3042071e..d1380459 100644 --- a/rust/origen/src/utility/release_scribe.rs +++ b/rust/origen/src/utility/release_scribe.rs @@ -1,4 +1,4 @@ -use crate::utility::version::Version; +use origen_metal::utils::version::Version; use crate::{Result, STATUS}; use origen_metal::dialoguer::{Input, Select}; use std::collections::HashMap; diff --git a/rust/origen_metal/Cargo.toml b/rust/origen_metal/Cargo.toml index 38773f40..656b8792 100644 --- a/rust/origen_metal/Cargo.toml +++ b/rust/origen_metal/Cargo.toml @@ -24,7 +24,7 @@ serde = {version = "1.0", features = ["derive"]} toml = "0.5" toml_edit = "0.21.0" dialoguer = "0.8.0" -git2 = "0.18" +git2 = "0.18.1" dirs = "2.0" wait-timeout = "0.2.0" chrono = "0.4.11" diff --git a/rust/origen_metal/src/utils/mod.rs b/rust/origen_metal/src/utils/mod.rs index ec7795e1..fc79b1b5 100644 --- a/rust/origen_metal/src/utils/mod.rs +++ b/rust/origen_metal/src/utils/mod.rs @@ -9,4 +9,5 @@ pub mod os; pub mod outcome; pub mod revision_control; pub mod terminal; -pub mod mailer; \ No newline at end of file +pub mod mailer; +pub mod version; \ No newline at end of file diff --git a/rust/origen/src/utility/version.rs b/rust/origen_metal/src/utils/version.rs similarity index 98% rename from rust/origen/src/utility/version.rs rename to rust/origen_metal/src/utils/version.rs index 046325c5..c11f1838 100644 --- a/rust/origen/src/utility/version.rs +++ b/rust/origen_metal/src/utils/version.rs @@ -1,17 +1,16 @@ //! Utility functions for dealing with app/Origen version numbers -use crate::utility::file_actions as fa; use crate::Result; -use regex::Regex; use semver; use std::fmt; use std::fs; use std::path::PathBuf; -use origen_metal::{toml_edit, dialoguer}; -use origen_metal::toml_edit::Document; +use crate::{toml_edit, dialoguer}; +use crate::toml_edit::Document; lazy_static! { static ref PYPROJECT_PATH: [&'static str; 3] = ["tool", "poetry", "version"]; + static ref CARGO_PATH: [&'static str; 2] = ["package", "version"]; } const BETA: &str = "beta"; @@ -375,6 +374,10 @@ impl Version { pub fn from_pyproject_with_toml_handle(pyproject: PathBuf) -> Result { VersionWithTOML::new(pyproject, &*PYPROJECT_PATH) } + + pub fn from_cargo_with_toml_handle(cargo_toml: PathBuf) -> Result { + VersionWithTOML::new(cargo_toml, &*CARGO_PATH) + } } impl fmt::Display for Version { @@ -569,6 +572,11 @@ impl VersionWithTOML { } } + pub fn set_new_version(&mut self, new: Version) -> Result<()> { + self.new_version = Some(new); + Ok(()) + } + pub fn write(&mut self) -> Result<()> { if let Some(v) = self.new_version() { let ver = v.to_string(); @@ -587,16 +595,6 @@ impl VersionWithTOML { } } -pub fn set_version_in_toml(toml_file: &PathBuf, version: &Version) -> Result<()> { - let r = Regex::new(r#"^\s*version\s*=\s*['"]"#).unwrap(); - fa::remove_line(&toml_file, &r)?; - - let r = Regex::new(r#"^\s*name\s*=\s+['"].*$"#).unwrap(); - let line = format!("\nversion = \"{}\"", version.to_string()); - fa::insert_after(&toml_file, &r, &line)?; - Ok(()) -} - #[cfg(test)] mod tests { use super::*; diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index 2c6d8eec..07c74919 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -938,6 +938,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "error-chain" version = "0.12.4" @@ -1188,11 +1194,11 @@ checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" [[package]] name = "git2" -version = "0.13.21" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "659cd14835e75b64d9dba5b660463506763cf0aa6cb640aeeb0e98d841093490" +checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.3.3", "libc", "libgit2-sys", "log", @@ -1243,7 +1249,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.7.0", "slab", "tokio", "tokio-util", @@ -1265,6 +1271,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.3.3" @@ -1495,6 +1507,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + [[package]] name = "indoc" version = "1.0.6" @@ -1681,9 +1703,9 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libgit2-sys" -version = "0.12.22+1.1.0" +version = "0.16.1+1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c53ac117c44f7042ad8d8f5681378dfbc6010e49ec2c0d1f11dfedc7a4a1c3" +checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" dependencies = [ "cc", "libc", @@ -1695,9 +1717,9 @@ dependencies = [ [[package]] name = "libssh2-sys" -version = "0.2.21" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0186af0d8f171ae6b9c4c90ec51898bad5d08a2d5e470903a50d9ad8959cbee" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" dependencies = [ "cc", "libc", @@ -1775,9 +1797,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.3.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "memoffset" @@ -2170,13 +2192,11 @@ dependencies = [ "cargo-expand", "cfg-if 1.0.0", "chrono", - "dialoguer", "dirs 2.0.2", "enum-utils", "eval", "futures", - "git2", - "indexmap", + "indexmap 1.7.0", "lazy_static", "md-5", "normpath", @@ -2228,13 +2248,14 @@ dependencies = [ "cfg-if 1.0.0", "chrono", "config", + "dialoguer", "dirs 2.0.2", "email_address", "enum-display-derive", "enum-utils", "git2", "glob", - "indexmap", + "indexmap 1.7.0", "keyring", "lazy_static", "ldap3", @@ -2259,6 +2280,7 @@ dependencies = [ "termcolor", "time 0.1.44", "toml", + "toml_edit", "wait-timeout", "whoami 1.2.1", ] @@ -2269,7 +2291,7 @@ version = "2.0.0-dev.5" dependencies = [ "built", "curl-sys", - "indexmap", + "indexmap 1.7.0", "itertools", "libz-sys", "num 0.2.1", @@ -2630,7 +2652,7 @@ version = "0.4.0" dependencies = [ "built", "curl-sys", - "indexmap", + "indexmap 1.7.0", "libz-sys", "num-bigint 0.4.0", "openssl", @@ -3767,6 +3789,23 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "toolchain_find" version = "0.1.4" @@ -4280,6 +4319,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winnow" +version = "0.5.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.7.0" diff --git a/rust/pyapi/src/application/mod.rs b/rust/pyapi/src/application/mod.rs index 3c3592de..c59cd783 100644 --- a/rust/pyapi/src/application/mod.rs +++ b/rust/pyapi/src/application/mod.rs @@ -2,7 +2,7 @@ pub mod _frontend; use crate::runtime_error; use crate::utility::results::{BuildResult}; -use origen::utility::version::Version as OVersion; +use origen_metal::utils::version::Version as OVersion; use pyapi_metal::prelude::*; use pyapi_metal::utils::revision_control::status::Status; use pyo3::prelude::*; @@ -33,7 +33,7 @@ impl PyApplication { let v = origen::app().unwrap().version()?.to_string(); Ok(format!( "{}", - origen::utility::version::Version::new_pep440(&v)?.to_string() + OVersion::new_pep440(&v)?.to_string() )) } diff --git a/rust/pyapi/src/lib.rs b/rust/pyapi/src/lib.rs index 5bb9d269..29a765cb 100644 --- a/rust/pyapi/src/lib.rs +++ b/rust/pyapi/src/lib.rs @@ -535,7 +535,7 @@ fn status(py: Python) -> PyResult { #[pyfunction] fn version() -> PyResult { Ok( - origen::utility::version::Version::new_pep440(&STATUS.origen_version.to_string())? + origen_metal::utils::version::Version::new_pep440(&STATUS.origen_version.to_string())? .to_string(), ) } diff --git a/rust/pyapi/src/utility/mod.rs b/rust/pyapi/src/utility/mod.rs index 3c848f57..d87ad95e 100644 --- a/rust/pyapi/src/utility/mod.rs +++ b/rust/pyapi/src/utility/mod.rs @@ -11,14 +11,12 @@ pub mod revision_control; pub mod sessions; pub mod transaction; pub mod unit_testers; -pub mod version; pub mod website; use location::Location; use pyo3::prelude::*; use pyo3::wrap_pyfunction; use transaction::Transaction; -use version::Version; use crate::runtime_error; use num_bigint::BigUint; @@ -32,7 +30,6 @@ pub fn define(py: Python, m: &PyModule) -> PyResult<()> { let subm = PyModule::new(py, "utility")?; subm.add_class::()?; subm.add_class::()?; - subm.add_class::()?; subm.add_wrapped(wrap_pyfunction!(reverse_bits))?; subm.add_wrapped(wrap_pyfunction!(exec))?; subm.add_wrapped(wrap_pyfunction!(dispatch_workflow))?; diff --git a/rust/pyapi/src/utility/release_scribe/_frontend.rs b/rust/pyapi/src/utility/release_scribe/_frontend.rs index b1fb7c6e..ecb3db3c 100644 --- a/rust/pyapi/src/utility/release_scribe/_frontend.rs +++ b/rust/pyapi/src/utility/release_scribe/_frontend.rs @@ -1,5 +1,5 @@ use crate::application::{get_pyapp, PyApplication}; -use origen::utility::version::Version as OVersion; +use origen_metal::utils::version::Version as OVersion; use origen::Result as OResult; use pyo3::prelude::*; use pyo3::types::PyDict; diff --git a/rust/pyapi/src/utility/release_scribe/mod.rs b/rust/pyapi/src/utility/release_scribe/mod.rs index aaf10ee2..c5cb78f6 100644 --- a/rust/pyapi/src/utility/release_scribe/mod.rs +++ b/rust/pyapi/src/utility/release_scribe/mod.rs @@ -3,7 +3,7 @@ pub mod _frontend; use super::app_utility; use crate::runtime_error; use origen::utility::release_scribe::ReleaseScribe as OrigenRS; -use origen::utility::version::Version as OVersion; +use origen_metal::utils::version::Version as OVersion; use origen::STATUS; use pyo3::prelude::*; use pyo3::types::PyDict; diff --git a/rust/pyapi/src/utility/version.rs b/rust/pyapi/src/utility/version.rs deleted file mode 100644 index 1ae3fc2d..00000000 --- a/rust/pyapi/src/utility/version.rs +++ /dev/null @@ -1,17 +0,0 @@ -use origen::utility::version::Version as OrigenVersion; -use pyo3::prelude::*; - -#[pyclass] -pub struct Version { - _origen_version: OrigenVersion, -} - -#[pymethods] -impl Version { - #[new] - fn new(ver: &str) -> PyResult { - Ok(Self { - _origen_version: OrigenVersion::new_pep440(ver)?, - }) - } -} diff --git a/rust/pyapi_metal/Cargo.lock b/rust/pyapi_metal/Cargo.lock index 2a574b15..e44b3732 100644 --- a/rust/pyapi_metal/Cargo.lock +++ b/rust/pyapi_metal/Cargo.lock @@ -373,6 +373,21 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "console" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "regex", + "terminal_size", + "unicode-width", + "winapi", +] + [[package]] name = "core-foundation" version = "0.9.3" @@ -470,6 +485,18 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a1abaf4d861455be59f64fd2b55606cb151fce304ede7165f410243ce96bde6" +[[package]] +name = "dialoguer" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9dd058f8b65922819fabb4a41e7d1964e56344042c26efbccd465202c23fa0c" +dependencies = [ + "console", + "lazy_static", + "tempfile", + "zeroize", +] + [[package]] name = "digest" version = "0.8.1" @@ -546,6 +573,12 @@ dependencies = [ "serde", ] +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encoding_rs" version = "0.8.31" @@ -611,6 +644,12 @@ dependencies = [ "syn 1.0.93", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "failure" version = "0.1.8" @@ -817,11 +856,11 @@ checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" [[package]] name = "git2" -version = "0.13.25" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6" +checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.3.3", "libc", "libgit2-sys", "log", @@ -872,7 +911,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.8.1", "slab", "tokio", "tokio-util", @@ -894,6 +933,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.4.1" @@ -1099,6 +1144,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + [[package]] name = "indoc" version = "1.0.6" @@ -1258,9 +1313,9 @@ checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" [[package]] name = "libgit2-sys" -version = "0.12.26+1.3.0" +version = "0.16.1+1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e1c899248e606fbfe68dcb31d8b0176ebab833b103824af31bddf4b7457494" +checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" dependencies = [ "cc", "libc", @@ -1272,9 +1327,9 @@ dependencies = [ [[package]] name = "libssh2-sys" -version = "0.2.23" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" dependencies = [ "cc", "libc", @@ -1668,13 +1723,14 @@ dependencies = [ "cfg-if 1.0.0", "chrono", "config", + "dialoguer", "dirs", "email_address", "enum-display-derive", "enum-utils", "git2", "glob", - "indexmap", + "indexmap 1.8.1", "keyring", "lazy_static", "ldap3", @@ -1699,6 +1755,7 @@ dependencies = [ "termcolor", "time 0.1.44", "toml", + "toml_edit", "wait-timeout", "whoami", ] @@ -1948,7 +2005,7 @@ version = "0.4.0" dependencies = [ "built", "curl-sys", - "indexmap", + "indexmap 1.8.1", "libz-sys", "num-bigint 0.4.3", "openssl", @@ -2643,6 +2700,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "thiserror" version = "1.0.44" @@ -2820,6 +2887,23 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.1.0", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -2999,6 +3083,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + [[package]] name = "unicode-xid" version = "0.2.3" @@ -3362,6 +3452,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winnow" +version = "0.5.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" diff --git a/rust/pyapi_metal/src/_helpers/errors.rs b/rust/pyapi_metal/src/_helpers/errors.rs index 1e13fc15..63c91cf4 100644 --- a/rust/pyapi_metal/src/_helpers/errors.rs +++ b/rust/pyapi_metal/src/_helpers/errors.rs @@ -58,3 +58,13 @@ macro_rules! not_implemented_error { ))) }; } + +#[macro_export] +macro_rules! value_error { + ($message:expr) => { + Err(pyo3::exceptions::PyValueError::new_err(format!( + "{}", + $message + ))) + }; +} diff --git a/rust/pyapi_metal/src/utils/mod.rs b/rust/pyapi_metal/src/utils/mod.rs index 630d993c..9a9899b3 100644 --- a/rust/pyapi_metal/src/utils/mod.rs +++ b/rust/pyapi_metal/src/utils/mod.rs @@ -2,8 +2,10 @@ mod differ; pub mod ldap; pub mod revision_control; pub mod mailer; +pub mod version; use pyo3::prelude::*; +use version::Version; pub(crate) fn define(py: Python, parent: &PyModule) -> PyResult<()> { let subm = PyModule::new(py, "utils")?; @@ -11,6 +13,7 @@ pub(crate) fn define(py: Python, parent: &PyModule) -> PyResult<()> { ldap::define(py, subm)?; differ::define(py, subm)?; mailer::define(py, subm)?; + subm.add_class::()?; parent.add_submodule(subm)?; Ok(()) } diff --git a/rust/pyapi_metal/src/utils/version.rs b/rust/pyapi_metal/src/utils/version.rs new file mode 100644 index 00000000..64da3096 --- /dev/null +++ b/rust/pyapi_metal/src/utils/version.rs @@ -0,0 +1,52 @@ +use origen_metal::utils::version::Version as OMVersion; +use pyo3::prelude::*; +use pyo3::types::PyType; +use std::path::PathBuf; + +#[pyclass] +pub struct Version { + _origen_version: OMVersion, +} + +impl Version { + fn coerce_error_type(err: Result) -> PyResult { + match err { + Ok(v) => Ok(v), + Err(e) => if e.msg.starts_with("unexpected character '") { + value_error!(e.msg) + } else { + runtime_error!(e.msg) + } + } + } +} + +#[pymethods] +impl Version { + #[new] + fn new(ver: &str) -> PyResult { + Ok(Self { + _origen_version: { + Self::coerce_error_type(OMVersion::new_pep440(ver))? + } + }) + } + + #[classmethod] + fn from_pyproject(_cls: &PyType, pyproject: PathBuf) -> PyResult { + Ok( Self { + _origen_version: OMVersion::from_pyproject_with_toml_handle(pyproject)?.orig_version().clone() + }) + } + + #[classmethod] + fn from_cargo(_cls: &PyType, cargo_toml: PathBuf) -> PyResult { + Ok( Self { + _origen_version: OMVersion::from_cargo_with_toml_handle(cargo_toml)?.orig_version().clone() + }) + } + + fn __str__(&self) -> PyResult { + Ok(self._origen_version.to_string()) + } +} From 44f1db9912dc0a3cf966f915c583db00ca64e2e1 Mon Sep 17 00:00:00 2001 From: corey Date: Thu, 1 Feb 2024 19:50:54 -0600 Subject: [PATCH 183/200] Debug regressions --- .../origen_metal/tests/utils/test_version.py | 10 +- rust/origen/src/core/application.rs | 2 +- rust/origen_metal/Cargo.lock | 117 ++++++++++++++++-- rust/origen_metal/src/utils/version.rs | 3 + 4 files changed, 118 insertions(+), 14 deletions(-) diff --git a/python/origen_metal/tests/utils/test_version.py b/python/origen_metal/tests/utils/test_version.py index 3f30ad38..5cec59fc 100644 --- a/python/origen_metal/tests/utils/test_version.py +++ b/python/origen_metal/tests/utils/test_version.py @@ -35,8 +35,9 @@ def test_version_from_pyproject(self): assert str(v) == current_version() def test_invalid_pyproject_path(self): - with pytest.raises(RuntimeError, match=r"The system cannot find the path specified"): - version.from_pyproject("path/to/nowhere/pyproject.toml") + f = "path/to/nowhere/pyproject.toml" + with pytest.raises(RuntimeError, match=f"Source file '{f}' does not exist!"): + version.from_pyproject(f) def test_version_from_cargo(self): print(self.cargo_path) @@ -49,8 +50,9 @@ def test_version_from_cargo(self): assert str(v) == origen_metal._origen_metal.__version__ def test_invalid_cargo_path(self): - with pytest.raises(RuntimeError, match=r"The system cannot find the path specified"): - version.from_cargo("path/to/nowhere/cargo.toml") + f = "path/to/nowhere/cargo.toml" + with pytest.raises(RuntimeError, match=f"Source file '{f}' does not exist!"): + version.from_cargo(f) _current_version = None def current_version(): diff --git a/rust/origen/src/core/application.rs b/rust/origen/src/core/application.rs index b2c7f7ca..57f21886 100644 --- a/rust/origen/src/core/application.rs +++ b/rust/origen/src/core/application.rs @@ -448,7 +448,7 @@ impl ProductionStatus { #[cfg(test)] mod tests { use crate::core::application::Application; - use crate::utility::version::Version; + use origen_metal::utils::version::Version; use crate::STATUS; #[test] diff --git a/rust/origen_metal/Cargo.lock b/rust/origen_metal/Cargo.lock index b2255007..f37fa4cf 100644 --- a/rust/origen_metal/Cargo.lock +++ b/rust/origen_metal/Cargo.lock @@ -373,6 +373,21 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "console" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "regex", + "terminal_size", + "unicode-width", + "winapi", +] + [[package]] name = "core-foundation" version = "0.9.3" @@ -449,6 +464,18 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a1abaf4d861455be59f64fd2b55606cb151fce304ede7165f410243ce96bde6" +[[package]] +name = "dialoguer" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9dd058f8b65922819fabb4a41e7d1964e56344042c26efbccd465202c23fa0c" +dependencies = [ + "console", + "lazy_static", + "tempfile", + "zeroize", +] + [[package]] name = "digest" version = "0.8.1" @@ -525,6 +552,12 @@ dependencies = [ "serde", ] +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "encoding_rs" version = "0.8.31" @@ -590,6 +623,12 @@ dependencies = [ "syn 1.0.93", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "failure" version = "0.1.8" @@ -796,11 +835,11 @@ checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" [[package]] name = "git2" -version = "0.13.25" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6" +checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.3.3", "libc", "libgit2-sys", "log", @@ -851,7 +890,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.8.1", "slab", "tokio", "tokio-util", @@ -873,6 +912,12 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.4.1" @@ -1078,6 +1123,16 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + [[package]] name = "indoc" version = "1.0.6" @@ -1237,9 +1292,9 @@ checksum = "5916d2ae698f6de9bfb891ad7a8d65c09d232dc58cc4ac433c7da3b2fd84bc2b" [[package]] name = "libgit2-sys" -version = "0.12.26+1.3.0" +version = "0.16.1+1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e1c899248e606fbfe68dcb31d8b0176ebab833b103824af31bddf4b7457494" +checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" dependencies = [ "cc", "libc", @@ -1251,9 +1306,9 @@ dependencies = [ [[package]] name = "libssh2-sys" -version = "0.2.23" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" dependencies = [ "cc", "libc", @@ -1637,13 +1692,14 @@ dependencies = [ "cfg-if 1.0.0", "chrono", "config", + "dialoguer", "dirs", "email_address", "enum-display-derive", "enum-utils", "git2", "glob", - "indexmap", + "indexmap 1.8.1", "keyring", "lazy_static", "ldap3", @@ -1668,6 +1724,7 @@ dependencies = [ "termcolor", "time 0.1.44", "toml", + "toml_edit", "wait-timeout", "whoami", ] @@ -2597,6 +2654,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "terminal_size" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "thiserror" version = "1.0.44" @@ -2773,6 +2840,23 @@ dependencies = [ "serde", ] +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.2.2", + "toml_datetime", + "winnow", +] + [[package]] name = "tower" version = "0.4.13" @@ -2952,6 +3036,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + [[package]] name = "unicode-xid" version = "0.2.3" @@ -3315,6 +3405,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winnow" +version = "0.5.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "818ce546a11a9986bc24f93d0cdf38a8a1a400f1473ea8c82e59f6e0ffab9249" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" diff --git a/rust/origen_metal/src/utils/version.rs b/rust/origen_metal/src/utils/version.rs index c11f1838..eb42b927 100644 --- a/rust/origen_metal/src/utils/version.rs +++ b/rust/origen_metal/src/utils/version.rs @@ -513,6 +513,9 @@ impl VersionWithTOML { if version_path.is_empty() { bail!("Version path should not be empty!"); } + if !source.is_file() { + bail!("Source file '{}' does not exist!", source.display()); + } let content = std::fs::read_to_string(&source)?; let toml = content.parse::().unwrap(); From be52e43a53ad7de39f72347a4ea892de6884751a Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 5 Feb 2024 20:50:10 -0600 Subject: [PATCH 184/200] Add equivalent origen version support from OM. Bump origen version to dev7. --- python/origen/origen/__init__.py | 17 +++++++++++++++-- python/origen/pyproject.toml | 2 +- rust/origen/Cargo.lock | 4 ++-- rust/origen/Cargo.toml | 2 +- rust/origen/cli/Cargo.toml | 2 +- rust/pyapi/Cargo.lock | 4 ++-- rust/pyapi/Cargo.toml | 2 +- test_apps/python_app/poetry.lock | 2 +- .../python_app/templates/dut_info.txt.mako | 2 +- test_apps/python_app/tests/compiler_test.py | 6 +++--- test_apps/python_app/tests/version_test.py | 18 ++++++++++++++++++ .../tests/test_global_invocation.py | 8 ++++++-- 12 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 test_apps/python_app/tests/version_test.py diff --git a/python/origen/origen/__init__.py b/python/origen/origen/__init__.py index c5de3c1d..547f5980 100644 --- a/python/origen/origen/__init__.py +++ b/python/origen/origen/__init__.py @@ -1,6 +1,8 @@ import sys import re import os, pathlib +import importlib_metadata + init_verbosity = 0 cli_path = None cli_ver = None @@ -96,6 +98,7 @@ def __getattr__(name: str): from origen.tester import Tester, DummyTester from origen.producer import Producer +from origen_metal.utils.version import Version import origen.target targets = origen.target @@ -149,12 +152,22 @@ def __getattr__(name: str): bool ''' -version = _origen.version() -''' Returns the version of the Origen executable. +__version__ = importlib_metadata.version(__name__) +''' Returns the version of Origen. Returns: str: Origen executable version + >>> __origen__.version + '{{ origen_version }}' +''' + +version = Version(__version__) +''' Returns the version of Origen. + + Returns: + origen_metal.utils.version.Version: Origen version + >>> origen.version '{{ origen_version }}' ''' diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index fa896f5c..10c67f60 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "origen" -version = "2.0.0.dev6" +version = "2.0.0.dev7" description = "Semiconductor Developer's Kit" homepage = "https://origen-sdk.org/o2" license = "MIT" diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index d2886918..4cb51126 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -492,7 +492,7 @@ dependencies = [ [[package]] name = "cli" -version = "2.0.0-dev.5" +version = "2.0.0-dev.7" dependencies = [ "base64-url", "built", @@ -2557,7 +2557,7 @@ dependencies = [ [[package]] name = "origen" -version = "2.0.0-dev.5" +version = "2.0.0-dev7" dependencies = [ "built", "cargo-expand", diff --git a/rust/origen/Cargo.toml b/rust/origen/Cargo.toml index 65e45316..0f01e61b 100644 --- a/rust/origen/Cargo.toml +++ b/rust/origen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "origen" -version = "2.0.0-dev.5" +version = "2.0.0-dev7" authors = ["Origen-SDK"] license = "MIT" edition = "2021" diff --git a/rust/origen/cli/Cargo.toml b/rust/origen/cli/Cargo.toml index e526f8b9..4cad2d3a 100644 --- a/rust/origen/cli/Cargo.toml +++ b/rust/origen/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli" -version = "2.0.0-dev.5" +version = "2.0.0-dev.7" authors = ["Origen-SDK"] edition = "2021" workspace = ".." diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index 07c74919..200605ba 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -2186,7 +2186,7 @@ dependencies = [ [[package]] name = "origen" -version = "2.0.0-dev.5" +version = "2.0.0-dev7" dependencies = [ "built", "cargo-expand", @@ -2287,7 +2287,7 @@ dependencies = [ [[package]] name = "origen_pyapi" -version = "2.0.0-dev.5" +version = "2.0.0-dev7" dependencies = [ "built", "curl-sys", diff --git a/rust/pyapi/Cargo.toml b/rust/pyapi/Cargo.toml index 1fe5910f..2b1fce66 100644 --- a/rust/pyapi/Cargo.toml +++ b/rust/pyapi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "origen_pyapi" -version = "2.0.0-dev.5" +version = "2.0.0-dev7" authors = ["Origen-SDK"] edition = "2021" diff --git a/test_apps/python_app/poetry.lock b/test_apps/python_app/poetry.lock index 5f609790..27d19718 100644 --- a/test_apps/python_app/poetry.lock +++ b/test_apps/python_app/poetry.lock @@ -888,7 +888,7 @@ files = [ [[package]] name = "origen" -version = "2.0.0.dev6" +version = "2.0.0.dev7" description = "Semiconductor Developer's Kit" category = "main" optional = false diff --git a/test_apps/python_app/templates/dut_info.txt.mako b/test_apps/python_app/templates/dut_info.txt.mako index 5284a037..9d896aee 100644 --- a/test_apps/python_app/templates/dut_info.txt.mako +++ b/test_apps/python_app/templates/dut_info.txt.mako @@ -1,3 +1,3 @@ -Hello from Origen version ${origen.version}! +Hello from Origen version ${origen.__version__}! Hello from template compiler "${test_renderer_name}"! The application name is "${origen.app.name}" \ No newline at end of file diff --git a/test_apps/python_app/tests/compiler_test.py b/test_apps/python_app/tests/compiler_test.py index 8d4042ed..8b438586 100644 --- a/test_apps/python_app/tests/compiler_test.py +++ b/test_apps/python_app/tests/compiler_test.py @@ -73,9 +73,9 @@ def expected_str_render(self): @property def expected_str_render_with_standard_context(self): # Make sure origen.version isn't woefully broken - assert isinstance(origen.version, str) - assert len(origen.version) > 0 - return f"Hello from Origen version {origen.version}!" + assert isinstance(origen.__version__, str) + assert len(origen.__version__) > 0 + return f"Hello from Origen version {origen.__version__}!" @property def expected_str_render_with_additional_context(self): diff --git a/test_apps/python_app/tests/version_test.py b/test_apps/python_app/tests/version_test.py new file mode 100644 index 00000000..e4788e50 --- /dev/null +++ b/test_apps/python_app/tests/version_test.py @@ -0,0 +1,18 @@ +import origen +from origen_metal.utils.version import Version +from origen_metal._helpers import pip_show + +class TestOrigenVersion: + _current_version = None + + def current_version(self): + if self._current_version is None: + self._current_version = pip_show('origen', wrap_poetry=True).version + return self._current_version + + def test_origen_version(self): + assert isinstance(origen.version, Version) + assert str(origen.version) == self.current_version() + + def test_origen_version_str(self): + assert origen.__version__ == self.current_version() diff --git a/test_apps/python_no_app/tests/test_global_invocation.py b/test_apps/python_no_app/tests/test_global_invocation.py index e33b1c84..0f4acca2 100644 --- a/test_apps/python_no_app/tests/test_global_invocation.py +++ b/test_apps/python_no_app/tests/test_global_invocation.py @@ -1,11 +1,12 @@ import origen, origen_metal, _origen, getpass, pytest, pathlib, sys from .shared import working_dir +from python_app_tests.version_test import TestOrigenVersion as T_OrigenVersion sys.path.insert(-1, str(pathlib.Path(__file__).parent.parent.parent.joinpath("no_workspace"))) from t_invocation_env import T_InvocationBaseTests def test_import(): - assert "2." in origen.version + assert "2." in str(origen.version) def test_app_is_none(): assert origen.app is None @@ -31,4 +32,7 @@ def test_current_user_is_available(self): @pytest.mark.skip def test_datastores_are_available(self): # TEST_NEEDED Datastores in global invocation - assert origen.datastores.keys() == ['ldaps'] \ No newline at end of file + assert origen.datastores.keys() == ['ldaps'] + +class TestVersion(T_OrigenVersion): + pass \ No newline at end of file From aa81da35830eeddff018fe4ea8556e0a52581d1e Mon Sep 17 00:00:00 2001 From: corey Date: Thu, 15 Feb 2024 16:58:07 -0600 Subject: [PATCH 185/200] Bump Origen version. Add consistency to user-facing versions. Change origen's OM requirement to a minimum release instead of an absolute. --- python/origen/origen/boot.py | 16 +- python/origen/pyproject.toml | 4 +- python/origen_metal/pyproject.toml | 7 + rust/origen/cli/src/bin.rs | 242 +++++++------ rust/origen/cli/src/python.rs | 4 + rust/origen_metal/src/utils/version.rs | 22 ++ test_apps/python_app/poetry.lock | 327 +++++++++-------- test_apps/python_app/tests/cli_test.py | 6 +- test_apps/python_no_app/poetry.lock | 335 ++++++++++-------- .../cli/assertions.py | 10 +- .../test_apps_shared_test_helpers/cli/dirs.py | 9 +- 11 files changed, 568 insertions(+), 414 deletions(-) diff --git a/python/origen/origen/boot.py b/python/origen/origen/boot.py index a5630c6f..02452585 100644 --- a/python/origen/origen/boot.py +++ b/python/origen/origen/boot.py @@ -331,14 +331,6 @@ def run_ext(phase, continue_on_fail=False): def tabify(message): return "\n".join([f"\t{l}" for l in message.split("\n")]) - try: - if origen.app: - print(f"App\nSuccess\n{tabify(origen.app.version)}") - except Exception as e: - print("App") - print("Error") - print(tabify(repr(e))) - if origen.__in_origen_core_app: origen.logger.info("Running in Origen core application") else: @@ -350,6 +342,14 @@ def tabify(message): print("Error") print(tabify(repr(e))) + try: + if origen.app: + print(f"App\nSuccess\n{tabify(origen.app.version)}") + except Exception as e: + print("App") + print("Error") + print(tabify(repr(e))) + print("_ CLI") try: print(f"Success\n{tabify(origen.status['cli_version'])}") diff --git a/python/origen/pyproject.toml b/python/origen/pyproject.toml index 10c67f60..9ee13769 100644 --- a/python/origen/pyproject.toml +++ b/python/origen/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "origen" -version = "2.0.0.dev7" +version = "2.0.0.dev8" description = "Semiconductor Developer's Kit" homepage = "https://origen-sdk.org/o2" license = "MIT" @@ -22,7 +22,7 @@ origen = 'origen.__bin__:run_origen' [tool.poetry.dependencies] python = ">=3.7.0,<3.13" -origen_metal = "0.4.1.dev0" +origen_metal = "~0.4.1.dev1" termcolor = ">= 1.1.0" colorama = "^0.4" bs4 = "0.0.1" diff --git a/python/origen_metal/pyproject.toml b/python/origen_metal/pyproject.toml index df3903d8..44236c52 100644 --- a/python/origen_metal/pyproject.toml +++ b/python/origen_metal/pyproject.toml @@ -2,6 +2,9 @@ name = "origen_metal" version = "0.4.1.dev1" description = "Bare metal APIs for the Origen SDK" +homepage = "https://origen-sdk.org/o2" +license = "MIT" +readme = "README.md" authors = ["Origen-SDK"] include = [ "origen_metal/_origen_metal.pyd", # Windows @@ -31,3 +34,7 @@ markers = [ [tool.poetry.build] script = "poetry_build.py" generate-setup-file = false + +[build-system] +requires = ["setuptools", "poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index f3b888c2..71e19000 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -1200,126 +1200,158 @@ fn main() -> Result<()> { } // To get here means the user has typed "origen -v", which officially means // verbosity level 1 with no command, but really want version with verbosity level 0 - let mut max_len = 0; + let mut max_len = 6; //'Origen' by default let mut versions: IndexMap = IndexMap::new(); - if STATUS.is_app_present { - let cmd = "from origen.boot import run_cmd; run_cmd('_version_');"; - let mut output_lines = "".to_string(); - - let res = python::run_with_callbacks( - cmd, - Some(&mut |line| { - output_lines += &format!("{}\n", line); - }), - None, - ); - output_lines.pop(); - - match res { - Ok(_) => { - let lines = output_lines.split("\n").collect::>(); - if lines.len() == 0 || lines.len() == 1 { - log_error!( - "Unable to parse in-application version output. Expected newlines:" - ); - log_error!("{}", output_lines); - } else { - let mut phase = 0; - let mut current = "".to_string(); - let mut is_private = false; - let mut is_okay = false; - let mut ver_or_message = "".to_string(); - for l in lines { - if phase == 0 { - let ver = parse_version_token(l); - current = ver.0; - is_private = ver.1; - if !is_private && current.len() > max_len { - max_len = current.len(); - } - phase += 1; - } else if phase == 1 { - match origen::utility::status_to_bool(l) { - Ok(stat) => is_okay = stat, - Err(e) => { - log_error!("{}", e.msg); - log_error!("Unable to parse version information"); - break; - } + + let cmd = "from origen.boot import run_cmd; run_cmd('_version_');"; + let mut output_lines = "".to_string(); + let mut error_lines = "".to_string(); + + let res = python::run_with_callbacks( + cmd, + Some(&mut |line| { + output_lines += &format!("{}\n", line); + }), + Some(&mut |line| { + error_lines += &format!("{}\n", line); + }), + ); + output_lines.pop(); + match res { + Ok(_) => { + let lines = output_lines.split("\n").collect::>(); + if lines.len() == 0 || lines.len() == 1 { + log_error!( + "Unable to parse in-application version output. Expected newlines:" + ); + log_error!("{}", output_lines); + } else { + let mut phase = 0; + let mut current = "".to_string(); + let mut is_private = false; + let mut is_okay = false; + let mut ver_or_message = "".to_string(); + for l in lines { + if phase == 0 { + let ver = parse_version_token(l); + current = ver.0; + is_private = ver.1; + if !is_private && current.len() > max_len { + max_len = current.len(); + } + phase += 1; + } else if phase == 1 { + match origen::utility::status_to_bool(l) { + Ok(stat) => is_okay = stat, + Err(e) => { + log_error!("{}", e.msg); + log_error!("Unable to parse version information"); + break; } - phase += 1; - } else if phase == 2 { - match l.chars().next() { - Some(t) => { - if t == '\t' { - ver_or_message += &l[1..]; - } else { - versions.insert( - current.to_string(), - ( - is_okay, - is_private, - ver_or_message.to_string(), - ), - ); - let ver = parse_version_token(l); - current = ver.0; - is_private = ver.1; - if !is_private && current.len() > max_len { - max_len = current.len(); - } - ver_or_message = "".to_string(); - phase = 1; + } + phase += 1; + } else if phase == 2 { + match l.chars().next() { + Some(t) => { + if t == '\t' { + ver_or_message += &l[1..]; + } else { + versions.insert( + current.to_string(), + ( + is_okay, + is_private, + ver_or_message.to_string(), + ), + ); + let ver = parse_version_token(l); + current = ver.0; + is_private = ver.1; + if !is_private && current.len() > max_len { + max_len = current.len(); } - } - None => { - log_error!("Unable to parse in-application version output - unexpected empty line:"); - log_error!("{}", output_lines); + ver_or_message = "".to_string(); + phase = 1; } } - } else { - log_error!("Unable to parse in-application version output:"); - log_error!("{}", output_lines); + None => { + log_error!("Unable to parse in-application version output - unexpected empty line:"); + log_error!("{}", output_lines); + } } - } - - if phase == 2 { - versions.insert( - current.clone(), - (is_okay, is_private, ver_or_message.clone()), - ); } else { - log_error!("Unable to parse in-application version output - unexpected format:"); + log_error!("Unable to parse in-application version output:"); log_error!("{}", output_lines); } } + + if phase == 2 { + versions.insert( + current.clone(), + (is_okay, is_private, ver_or_message.clone()), + ); + } else { + log_error!("Unable to parse in-application version output - unexpected format:"); + log_error!("{}", output_lines); + } } - Err(e) => { - log_error!( - "Couldn't boot app to determine the in-application Origen version" + versions.insert( + "CLI".to_string(), + (true, STATUS.is_app_present, STATUS.cli_version().unwrap().to_pep440()?.to_string()), + ); + } + Err(e) => { + if error_lines.contains(*python::NO_ORIGEN_BOOT_MODULE_ERROR) { + // Module not found error + if STATUS.is_app_present { + // Inside an app. This is problematic - origen should be available here + for err in error_lines.lines() { + log_error!("{}", err); + } + + versions.insert( + "Origen".to_string(), + (true, false, "No Origen Module Available".to_string()), + ); + versions.insert( + "App".to_string(), + (true, false, "Unable To Parse Version Information".to_string()), + ); + } else { + // Outside of an app + // If the CLI only is used, this will be expected. + // In this case, treat it as info, not an error. + // Log the error for verbose output though. + for err in error_lines.lines() { + log_debug!("{}", err); + } + + versions.insert( + "Origen".to_string(), + (true, false, "No Origen Module Available".to_string()), + ); + } + } else { + // Unrecognized error + for err in error_lines.lines() { + log_error!("{}", err); + } + versions.insert( + "Origen".to_string(), + (true, false, "Errors Encountered Retrieving Origen Version Info".to_string()), ); - log_error!("Received Error:"); - log_error!(""); - log_error!("{}", e); - if output_lines != "" { - log_error!(""); - log_error!("The following was also captured:"); - log_error!(""); - log_error!("{}", output_lines); + if STATUS.is_app_present { + versions.insert( + "App".to_string(), + (true, false, "Unable To Parse Version Information".to_string()), + ); } - exit(1); } + versions.insert( + "CLI".to_string(), + (true, STATUS.is_app_present, STATUS.cli_version().unwrap().to_pep440()?.to_string()), + ); } - } else { - versions.insert( - "Origen".to_string(), - (true, false, STATUS.origen_version.to_string()), - ); - versions.insert( - "CLI".to_string(), - (true, false, built_info::PKG_VERSION.to_string()), - ); - max_len = 6; // 'Origen' } for (n, v) in versions.iter() { diff --git a/rust/origen/cli/src/python.rs b/rust/origen/cli/src/python.rs index cb26d9d9..683a2489 100644 --- a/rust/origen/cli/src/python.rs +++ b/rust/origen/cli/src/python.rs @@ -36,6 +36,10 @@ macro_rules! user_env_str { const PYPROJECT: &'static str = pyproject_str!(); const USER_ENV: &'static str = user_env_str!(); +lazy_static! { + pub static ref NO_ORIGEN_BOOT_MODULE_ERROR: &'static str = "ModuleNotFoundError: No module named 'origen.boot'"; +} + pub struct Config { pub available: bool, pub command: String, diff --git a/rust/origen_metal/src/utils/version.rs b/rust/origen_metal/src/utils/version.rs index eb42b927..a967e04a 100644 --- a/rust/origen_metal/src/utils/version.rs +++ b/rust/origen_metal/src/utils/version.rs @@ -378,6 +378,10 @@ impl Version { pub fn from_cargo_with_toml_handle(cargo_toml: PathBuf) -> Result { VersionWithTOML::new(cargo_toml, &*CARGO_PATH) } + + pub fn to_pep440(&self) -> Result { + Self::new_pep440(&self.to_string()) + } } impl fmt::Display for Version { @@ -580,6 +584,24 @@ impl VersionWithTOML { Ok(()) } + pub fn get_other(&self, path: &'static [&'static str]) -> Result<&toml_edit::Item> { + let mut i: &toml_edit::Item = &self.toml[path[0]]; + for p in path[1..].iter() { + i = &i[p]; + } + Ok(i) + } + + pub fn set_other(&mut self, path: &'static [&'static str], value: impl Into) -> Result { + let mut i: &mut toml_edit::Item = &mut self.toml[path[0]]; + for p in path[1..].iter() { + i = &mut i[p]; + } + let retn = i.clone(); + *i = toml_edit::value(value); + Ok(retn) + } + pub fn write(&mut self) -> Result<()> { if let Some(v) = self.new_version() { let ver = v.to_string(); diff --git a/test_apps/python_app/poetry.lock b/test_apps/python_app/poetry.lock index 27d19718..054317e4 100644 --- a/test_apps/python_app/poetry.lock +++ b/test_apps/python_app/poetry.lock @@ -92,6 +92,31 @@ files = [ [package.dependencies] beautifulsoup4 = "*" +[[package]] +name = "build" +version = "0.10.0" +description = "A simple, correct Python build frontend" +category = "main" +optional = false +python-versions = ">= 3.7" +files = [ + {file = "build-0.10.0-py3-none-any.whl", hash = "sha256:af266720050a66c893a6096a2f410989eeac74ff9a68ba194b3f6473e8e26171"}, + {file = "build-0.10.0.tar.gz", hash = "sha256:d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "os_name == \"nt\""} +importlib-metadata = {version = ">=0.22", markers = "python_version < \"3.8\""} +packaging = ">=19.0" +pyproject_hooks = "*" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} + +[package.extras] +docs = ["furo (>=2021.08.31)", "sphinx (>=4.0,<5.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)"] +test = ["filelock (>=3)", "pytest (>=6.2.4)", "pytest-cov (>=2.12)", "pytest-mock (>=2)", "pytest-rerunfailures (>=9.1)", "pytest-xdist (>=1.34)", "setuptools (>=42.0.0)", "setuptools (>=56.0.0)", "toml (>=0.10.0)", "wheel (>=0.36.0)"] +typing = ["importlib-metadata (>=5.1)", "mypy (==0.991)", "tomli", "typing-extensions (>=3.7.4.3)"] +virtualenv = ["virtualenv (>=20.0.35)"] + [[package]] name = "cachecontrol" version = "0.12.11" @@ -401,14 +426,14 @@ test = ["hypothesis (>=1.11.4,!=3.79.2)", "iso8601", "pretend", "pytest (>=6.2.0 [[package]] name = "distlib" -version = "0.3.6" +version = "0.3.8" description = "Distribution utilities" category = "main" optional = false python-versions = "*" files = [ - {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, - {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, + {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"}, + {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"}, ] [[package]] @@ -425,78 +450,85 @@ files = [ [[package]] name = "dulwich" -version = "0.20.50" +version = "0.21.7" description = "Python Git Library" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:97f02f8d500d4af08dc022d697c56e8539171acc3f575c2fe9acf3b078e5c8c9"}, - {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7301773e5cc16d521bc6490e73772a86a4d1d0263de506f08b54678cc4e2f061"}, - {file = "dulwich-0.20.50-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b70106580ed11f45f4c32d2831d0c9c9f359bc2415fff4a6be443e3a36811398"}, - {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f9c4f2455f966cad94648278fa9972e4695b35d04f82792fa58e1ea15dd83f0"}, - {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9163fbb021a8ad9c35a0814a5eedf45a8eb3a0b764b865d7016d901fc5a947fc"}, - {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:322ff8ff6aa4d6d36294cd36de1c84767eb1903c7db3e7b4475ad091febf5363"}, - {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5d3290a45651c8e534f8e83ae2e30322aefdd162f0f338bae2e79a6ee5a87513"}, - {file = "dulwich-0.20.50-cp310-cp310-win32.whl", hash = "sha256:80ab07131a6e68594441f5c4767e9e44e87fceafc3e347e541c928a18c679bd8"}, - {file = "dulwich-0.20.50-cp310-cp310-win_amd64.whl", hash = "sha256:eefe786a6010f8546baac4912113eeed4e397ddb8c433a345b548a04d4176496"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:df3562dde3079d57287c233d45b790bc967c5aae975c9a7b07ca30e60e055512"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e1ae18d5805f0c0c5dac65795f8d48660437166b12ee2c0ffea95bfdbf9c1051"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d2f7df39bd1378d3b0bfb3e7fc930fd0191924af1f0ef587bcd9946afe076c06"}, - {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:731e7f319b34251fadeb362ada1d52cc932369d9cdfa25c0e41150cda28773d0"}, - {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d11d44176e5d2fa8271fc86ad1e0a8731b9ad8f77df64c12846b30e16135eb"}, - {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7aaabb8e4beadd53f75f853a981caaadef3ef130e5645c902705704eaf136daa"}, - {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3dc9f97ec8d3db08d9723b9fd06f3e52c15b84c800d153cfb59b0a3dc8b8d40"}, - {file = "dulwich-0.20.50-cp311-cp311-win32.whl", hash = "sha256:3b1964fa80cafd5a1fd71615b0313daf6f3295c6ab05656ea0c1d2423539904a"}, - {file = "dulwich-0.20.50-cp311-cp311-win_amd64.whl", hash = "sha256:a24a3893108f3b97beb958670d5f3f2a3bec73a1fe18637a572a85abd949a1c4"}, - {file = "dulwich-0.20.50-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6d409a282f8848fd6c8d7c7545ad2f75c16de5d5977de202642f1d50fdaac554"}, - {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5411d0f1092152e1c0bb916ae490fe181953ae1b8d13f4e68661253e10b78dbb"}, - {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6343569f998ce429e2a5d813c56768ac51b496522401db950f0aa44240bfa901"}, - {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a405cd236766060894411614a272cfb86fe86cde5ca73ef264fc4fa5a715fff4"}, - {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:ee0f9b02019c0ea84cdd31c00a0c283669b771c85612997a911715cf84e33d99"}, - {file = "dulwich-0.20.50-cp36-cp36m-win32.whl", hash = "sha256:2644466270267270f2157ea6f1c0aa224f6f3bf06a307fc39954e6b4b3d82bae"}, - {file = "dulwich-0.20.50-cp36-cp36m-win_amd64.whl", hash = "sha256:d4629635a97e3af1b5da48071e00c8e70fad85f3266fadabe1f5a8f49172c507"}, - {file = "dulwich-0.20.50-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0e4862f318d99cc8a500e3622a89613a88c07d957a0f628cdc2ed86addff790f"}, - {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c96e3fb9d48c0454dc242c7accc7819780c9a7f29e441a9eff12361ed0fa35f9"}, - {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc6092a4f0bbbff2e553e87a9c6325955b64ea43fca21297c8182e19ae8a43c"}, - {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:519b627d49d273e2fd01c79d09e578675ca6cd05193c1787e9ef165c9a1d66ea"}, - {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a75cab01b909c4c683c2083e060e378bc01701b7366b5a7d9846ef6d3b9e3d5"}, - {file = "dulwich-0.20.50-cp37-cp37m-win32.whl", hash = "sha256:ea8ffe26d91dbcd5580dbd5a07270a12ea57b091604d77184da0a0d9fad50ed3"}, - {file = "dulwich-0.20.50-cp37-cp37m-win_amd64.whl", hash = "sha256:8f3af857f94021cae1322d86925bfc0dd31e501e885ab5db275473bfac0bb39d"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3fb35cedb1243bc420d885ef5b4afd642c6ac8f07ddfc7fdbca1becf9948bf7e"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4bb23a9cec63e16c0e432335f068169b73dd44fa9318dd7cd7a4ca83607ff367"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5267619b34ddaf8d9a6b841492cd17a971fd25bf9a5657f2de928385c3a08b94"}, - {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9091f1d53a3c0747cbf0bd127c64e7f09b770264d8fb53e284383fcdf69154e7"}, - {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6ec7c8fea2b44187a3b545e6c11ab9947ffb122647b07abcdb7cc3aaa770c0e"}, - {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:11b180b80363b4fc70664197028181a17ae4c52df9965a29b62a6c52e40c2dbe"}, - {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c83e7840d9d0a94d7033bc109efe0c22dfcdcd816bcd4469085e42809e3bf5ba"}, - {file = "dulwich-0.20.50-cp38-cp38-win32.whl", hash = "sha256:c075f69c2de19d9fd97e3b70832d2b42c6a4a5d909b3ffd1963b67d86029f95f"}, - {file = "dulwich-0.20.50-cp38-cp38-win_amd64.whl", hash = "sha256:06775c5713cfeda778c7c67d4422b5e7554d3a7f644f1dde646cdf486a30285a"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:49f66f1c057c18d7d60363f461f4ab8329320fbe1f02a7a33c255864a7d3c942"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4e541cd690a5e3d55082ed51732d755917e933cddeb4b0204f2a5ec5d5d7b60b"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:80e8750ee2fa0ab2784a095956077758e5f6107de27f637c4b9d18406652c22c"}, - {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbb6368f18451dc44c95c55e1a609d1a01d3821f7ed480b22b2aea1baca0f4a7"}, - {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3ee45001411b638641819b7b3b33f31f13467c84066e432256580fcab7d8815"}, - {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4842e22ed863a776b36ef8ffe9ed7b772eb452b42c8d02975c29d27e3bc50ab4"}, - {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:790e4a641284a7fb4d56ebdaf8b324a5826fbbb9c54307c06f586f9f6a5e56db"}, - {file = "dulwich-0.20.50-cp39-cp39-win32.whl", hash = "sha256:f08406b6b789dea5c95ba1130a0801d8748a67f18be940fe7486a8b481fde875"}, - {file = "dulwich-0.20.50-cp39-cp39-win_amd64.whl", hash = "sha256:78c388ad421199000fb7b5ed5f0c7b509b3e31bd7cad303786a4d0bf89b82f60"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:cb194c53109131bcbcd1ca430fcd437cdaf2d33e204e45fbe121c47eaa43e9af"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7542a72c5640dd0620862d6df8688f02a6c336359b5af9b3fcfe11b7fa6652f"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4aa1d0861517ebbbe0e0084cc9ab4f7ab720624a3eda2bd10e45f774ab858db8"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:583c6bbc27f13fe2e41a19f6987a42681c6e4f6959beae0a6e5bb033b8b081a8"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0c61c193d02c0e1e0d758cdd57ae76685c368d09a01f00d704ba88bd96767cfe"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2edbff3053251985f10702adfafbee118298d383ef5b5b432a5f22d1f1915df"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a344230cadfc5d315752add6ce9d4cfcfc6c85e36bbf57fce9444bcc7c6ea8fb"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:57bff9bde0b6b05b00c6acbb1a94357caddb2908ed7026a48c715ff50d220335"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e29a3c2037761fa816aa556e78364dfc8e3f44b873db2d17aed96f9b06ac83a3"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2aa2a4a84029625bf9c63771f8a628db1f3be2d2ea3cb8b17942cd4317797152"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd9fa00971ecf059bb358085a942ecac5be4ff71acdf299f44c8cbc45c18659f"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:af4adac92fb95671ea3a24f2f8e5e5e8f638711ce9c33a3ca6cd68bf1ff7d99f"}, - {file = "dulwich-0.20.50.tar.gz", hash = "sha256:50a941796b2c675be39be728d540c16b5b7ce77eb9e1b3f855650ece6832d2be"}, + {file = "dulwich-0.21.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d4c0110798099bb7d36a110090f2688050703065448895c4f53ade808d889dd3"}, + {file = "dulwich-0.21.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2bc12697f0918bee324c18836053644035362bb3983dc1b210318f2fed1d7132"}, + {file = "dulwich-0.21.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:471305af74790827fcbafe330fc2e8bdcee4fb56ca1177c8c481b1c8f806c4a4"}, + {file = "dulwich-0.21.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d54c9d0e845be26f65f954dff13a1cd3f2b9739820c19064257b8fd7435ab263"}, + {file = "dulwich-0.21.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12d61334a575474e707614f2e93d6ed4cdae9eb47214f9277076d9e5615171d3"}, + {file = "dulwich-0.21.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e274cebaf345f0b1e3b70197f2651de92b652386b68020cfd3bf61bc30f6eaaa"}, + {file = "dulwich-0.21.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:817822f970e196e757ae01281ecbf21369383285b9f4a83496312204cf889b8c"}, + {file = "dulwich-0.21.7-cp310-cp310-win32.whl", hash = "sha256:7836da3f4110ce684dcd53489015fb7fa94ed33c5276e3318b8b1cbcb5b71e08"}, + {file = "dulwich-0.21.7-cp310-cp310-win_amd64.whl", hash = "sha256:4a043b90958cec866b4edc6aef5fe3c2c96a664d0b357e1682a46f6c477273c4"}, + {file = "dulwich-0.21.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ce8db196e79c1f381469410d26fb1d8b89c6b87a4e7f00ff418c22a35121405c"}, + {file = "dulwich-0.21.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:62bfb26bdce869cd40be443dfd93143caea7089b165d2dcc33de40f6ac9d812a"}, + {file = "dulwich-0.21.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c01a735b9a171dcb634a97a3cec1b174cfbfa8e840156870384b633da0460f18"}, + {file = "dulwich-0.21.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fa4d14767cf7a49c9231c2e52cb2a3e90d0c83f843eb6a2ca2b5d81d254cf6b9"}, + {file = "dulwich-0.21.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bca4b86e96d6ef18c5bc39828ea349efb5be2f9b1f6ac9863f90589bac1084d"}, + {file = "dulwich-0.21.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a7b5624b02ef808cdc62dabd47eb10cd4ac15e8ac6df9e2e88b6ac6b40133673"}, + {file = "dulwich-0.21.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3a539b4696a42fbdb7412cb7b66a4d4d332761299d3613d90a642923c7560e1"}, + {file = "dulwich-0.21.7-cp311-cp311-win32.whl", hash = "sha256:675a612ce913081beb0f37b286891e795d905691dfccfb9bf73721dca6757cde"}, + {file = "dulwich-0.21.7-cp311-cp311-win_amd64.whl", hash = "sha256:460ba74bdb19f8d498786ae7776745875059b1178066208c0fd509792d7f7bfc"}, + {file = "dulwich-0.21.7-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:4c51058ec4c0b45dc5189225b9e0c671b96ca9713c1daf71d622c13b0ab07681"}, + {file = "dulwich-0.21.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4bc4c5366eaf26dda3fdffe160a3b515666ed27c2419f1d483da285ac1411de0"}, + {file = "dulwich-0.21.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a0650ec77d89cb947e3e4bbd4841c96f74e52b4650830112c3057a8ca891dc2f"}, + {file = "dulwich-0.21.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f18f0a311fb7734b033a3101292b932158cade54b74d1c44db519e42825e5a2"}, + {file = "dulwich-0.21.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c589468e5c0cd84e97eb7ec209ab005a2cb69399e8c5861c3edfe38989ac3a8"}, + {file = "dulwich-0.21.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d62446797163317a397a10080c6397ffaaca51a7804c0120b334f8165736c56a"}, + {file = "dulwich-0.21.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e84cc606b1f581733df4350ca4070e6a8b30be3662bbb81a590b177d0c996c91"}, + {file = "dulwich-0.21.7-cp312-cp312-win32.whl", hash = "sha256:c3d1685f320907a52c40fd5890627945c51f3a5fa4bcfe10edb24fec79caadec"}, + {file = "dulwich-0.21.7-cp312-cp312-win_amd64.whl", hash = "sha256:6bd69921fdd813b7469a3c77bc75c1783cc1d8d72ab15a406598e5a3ba1a1503"}, + {file = "dulwich-0.21.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7d8ab29c660125db52106775caa1f8f7f77a69ed1fe8bc4b42bdf115731a25bf"}, + {file = "dulwich-0.21.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0d2e4485b98695bf95350ce9d38b1bb0aaac2c34ad00a0df789aa33c934469b"}, + {file = "dulwich-0.21.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e138d516baa6b5bafbe8f030eccc544d0d486d6819b82387fc0e285e62ef5261"}, + {file = "dulwich-0.21.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f34bf9b9fa9308376263fd9ac43143c7c09da9bc75037bb75c6c2423a151b92c"}, + {file = "dulwich-0.21.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2e2c66888207b71cd1daa2acb06d3984a6bc13787b837397a64117aa9fc5936a"}, + {file = "dulwich-0.21.7-cp37-cp37m-win32.whl", hash = "sha256:10893105c6566fc95bc2a67b61df7cc1e8f9126d02a1df6a8b2b82eb59db8ab9"}, + {file = "dulwich-0.21.7-cp37-cp37m-win_amd64.whl", hash = "sha256:460b3849d5c3d3818a80743b4f7a0094c893c559f678e56a02fff570b49a644a"}, + {file = "dulwich-0.21.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:74700e4c7d532877355743336c36f51b414d01e92ba7d304c4f8d9a5946dbc81"}, + {file = "dulwich-0.21.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c92e72c43c9e9e936b01a57167e0ea77d3fd2d82416edf9489faa87278a1cdf7"}, + {file = "dulwich-0.21.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d097e963eb6b9fa53266146471531ad9c6765bf390849230311514546ed64db2"}, + {file = "dulwich-0.21.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:808e8b9cc0aa9ac74870b49db4f9f39a52fb61694573f84b9c0613c928d4caf8"}, + {file = "dulwich-0.21.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1957b65f96e36c301e419d7adaadcff47647c30eb072468901bb683b1000bc5"}, + {file = "dulwich-0.21.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4b09bc3a64fb70132ec14326ecbe6e0555381108caff3496898962c4136a48c6"}, + {file = "dulwich-0.21.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5882e70b74ac3c736a42d3fdd4f5f2e6570637f59ad5d3e684760290b58f041"}, + {file = "dulwich-0.21.7-cp38-cp38-win32.whl", hash = "sha256:29bb5c1d70eba155ded41ed8a62be2f72edbb3c77b08f65b89c03976292f6d1b"}, + {file = "dulwich-0.21.7-cp38-cp38-win_amd64.whl", hash = "sha256:25c3ab8fb2e201ad2031ddd32e4c68b7c03cb34b24a5ff477b7a7dcef86372f5"}, + {file = "dulwich-0.21.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8929c37986c83deb4eb500c766ee28b6670285b512402647ee02a857320e377c"}, + {file = "dulwich-0.21.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cc1e11be527ac06316539b57a7688bcb1b6a3e53933bc2f844397bc50734e9ae"}, + {file = "dulwich-0.21.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0fc3078a1ba04c588fabb0969d3530efd5cd1ce2cf248eefb6baf7cbc15fc285"}, + {file = "dulwich-0.21.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40dcbd29ba30ba2c5bfbab07a61a5f20095541d5ac66d813056c122244df4ac0"}, + {file = "dulwich-0.21.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8869fc8ec3dda743e03d06d698ad489b3705775fe62825e00fa95aa158097fc0"}, + {file = "dulwich-0.21.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d96ca5e0dde49376fbcb44f10eddb6c30284a87bd03bb577c59bb0a1f63903fa"}, + {file = "dulwich-0.21.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0064363bd5e814359657ae32517fa8001e8573d9d040bd997908d488ab886ed"}, + {file = "dulwich-0.21.7-cp39-cp39-win32.whl", hash = "sha256:869eb7be48243e695673b07905d18b73d1054a85e1f6e298fe63ba2843bb2ca1"}, + {file = "dulwich-0.21.7-cp39-cp39-win_amd64.whl", hash = "sha256:404b8edeb3c3a86c47c0a498699fc064c93fa1f8bab2ffe919e8ab03eafaaad3"}, + {file = "dulwich-0.21.7-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e598d743c6c0548ebcd2baf94aa9c8bfacb787ea671eeeb5828cfbd7d56b552f"}, + {file = "dulwich-0.21.7-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4a2d76c96426e791556836ef43542b639def81be4f1d6d4322cd886c115eae1"}, + {file = "dulwich-0.21.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6c88acb60a1f4d31bd6d13bfba465853b3df940ee4a0f2a3d6c7a0778c705b7"}, + {file = "dulwich-0.21.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ecd315847dea406a4decfa39d388a2521e4e31acde3bd9c2609c989e817c6d62"}, + {file = "dulwich-0.21.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d05d3c781bc74e2c2a2a8f4e4e2ed693540fbe88e6ac36df81deac574a6dad99"}, + {file = "dulwich-0.21.7-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6de6f8de4a453fdbae8062a6faa652255d22a3d8bce0cd6d2d6701305c75f2b3"}, + {file = "dulwich-0.21.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e25953c7acbbe4e19650d0225af1c0c0e6882f8bddd2056f75c1cc2b109b88ad"}, + {file = "dulwich-0.21.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:4637cbd8ed1012f67e1068aaed19fcc8b649bcf3e9e26649826a303298c89b9d"}, + {file = "dulwich-0.21.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:858842b30ad6486aacaa607d60bab9c9a29e7c59dc2d9cb77ae5a94053878c08"}, + {file = "dulwich-0.21.7-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:739b191f61e1c4ce18ac7d520e7a7cbda00e182c3489552408237200ce8411ad"}, + {file = "dulwich-0.21.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:274c18ec3599a92a9b67abaf110e4f181a4f779ee1aaab9e23a72e89d71b2bd9"}, + {file = "dulwich-0.21.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:2590e9b431efa94fc356ae33b38f5e64f1834ec3a94a6ac3a64283b206d07aa3"}, + {file = "dulwich-0.21.7-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ed60d1f610ef6437586f7768254c2a93820ccbd4cfdac7d182cf2d6e615969bb"}, + {file = "dulwich-0.21.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8278835e168dd097089f9e53088c7a69c6ca0841aef580d9603eafe9aea8c358"}, + {file = "dulwich-0.21.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffc27fb063f740712e02b4d2f826aee8bbed737ed799962fef625e2ce56e2d29"}, + {file = "dulwich-0.21.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:61e3451bd3d3844f2dca53f131982553be4d1b1e1ebd9db701843dd76c4dba31"}, + {file = "dulwich-0.21.7.tar.gz", hash = "sha256:a9e9c66833cea580c3ac12927e4b9711985d76afca98da971405d414de60e968"}, ] [package.dependencies] +typing-extensions = {version = "*", markers = "python_version <= \"3.7\""} urllib3 = ">=1.25" [package.extras] @@ -522,19 +554,19 @@ test = ["pytest (>=6)"] [[package]] name = "filelock" -version = "3.9.0" +version = "3.12.2" description = "A platform independent file lock." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, - {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, + {file = "filelock-3.12.2-py3-none-any.whl", hash = "sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec"}, + {file = "filelock-3.12.2.tar.gz", hash = "sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81"}, ] [package.extras] -docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] -testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] +docs = ["furo (>=2023.5.20)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] [[package]] name = "html5lib" @@ -584,14 +616,14 @@ files = [ [[package]] name = "importlib-metadata" -version = "4.13.0" +version = "6.7.0" description = "Read metadata from Python packages" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, - {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, + {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, + {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, ] [package.dependencies] @@ -599,9 +631,9 @@ typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] [[package]] name = "importlib-resources" @@ -634,6 +666,18 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] +[[package]] +name = "installer" +version = "0.7.0" +description = "A library for installing Python wheels." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "installer-0.7.0-py3-none-any.whl", hash = "sha256:05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53"}, + {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, +] + [[package]] name = "jaraco-classes" version = "3.2.3" @@ -888,7 +932,7 @@ files = [ [[package]] name = "origen" -version = "2.0.0.dev7" +version = "2.0.0.dev8" description = "Semiconductor Developer's Kit" category = "main" optional = false @@ -904,7 +948,7 @@ importlib-metadata = ">= 1.7.0" Jinja2 = "^3" mako = "1.1.0" origen_autoapi = "2.0.1" -origen_metal = "0.4.1.dev0" +origen_metal = "~0.4.1.dev1" poetry = "^1.1.14" recommonmark = ">= 0" sphinx = "3.0.2" @@ -933,7 +977,7 @@ sphinx = "*" [[package]] name = "origen-metal" -version = "0.4.1.dev0" +version = "0.4.1.dev1" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false @@ -943,6 +987,7 @@ develop = true [package.dependencies] colorama = ">= 0.4.4" +importlib-metadata = ">= 6.7.0" pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} termcolor = ">= 1.1.0" @@ -1024,22 +1069,22 @@ url = "../pl_ext_cmds" [[package]] name = "platformdirs" -version = "2.6.2" +version = "3.11.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, - {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, + {file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"}, + {file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"}, ] [package.dependencies] -typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} +typing-extensions = {version = ">=4.7.1", markers = "python_version < \"3.8\""} [package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] [[package]] name = "pluggy" @@ -1062,57 +1107,57 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poetry" -version = "1.3.2" +version = "1.5.1" description = "Python dependency management and packaging made easy." category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "poetry-1.3.2-py3-none-any.whl", hash = "sha256:41980d557954b1418fa503de7a8fb25f19c03c0223a171666b305f05a45fc206"}, - {file = "poetry-1.3.2.tar.gz", hash = "sha256:26ded25f0cf67943243ca4f0aafd47ec4668bdb62845dbb8c2b0e3d9cd280bf4"}, + {file = "poetry-1.5.1-py3-none-any.whl", hash = "sha256:dfc7ce3a38ae216c0465694e2e674bef6eb1a2ba81aa47a26f9dc03362fe2f5f"}, + {file = "poetry-1.5.1.tar.gz", hash = "sha256:cc7ea4524d1a11558006224bfe8ba8ed071417d4eb5ef6c89decc6a37d437eeb"}, ] [package.dependencies] "backports.cached-property" = {version = ">=1.0.2,<2.0.0", markers = "python_version < \"3.8\""} +build = ">=0.10.0,<0.11.0" cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"]} cleo = ">=2.0.0,<3.0.0" crashtest = ">=0.4.1,<0.5.0" -dulwich = ">=0.20.46,<0.21.0" +dulwich = ">=0.21.2,<0.22.0" filelock = ">=3.8.0,<4.0.0" html5lib = ">=1.0,<2.0" -importlib-metadata = {version = ">=4.4,<5.0", markers = "python_version < \"3.10\""} +importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} +installer = ">=0.7.0,<0.8.0" jsonschema = ">=4.10.0,<5.0.0" keyring = ">=23.9.0,<24.0.0" lockfile = ">=0.12.2,<0.13.0" packaging = ">=20.4" pexpect = ">=4.7.0,<5.0.0" -pkginfo = ">=1.5,<2.0" -platformdirs = ">=2.5.2,<3.0.0" -poetry-core = "1.4.0" -poetry-plugin-export = ">=1.2.0,<2.0.0" +pkginfo = ">=1.9.4,<2.0.0" +platformdirs = ">=3.0.0,<4.0.0" +poetry-core = "1.6.1" +poetry-plugin-export = ">=1.4.0,<2.0.0" +pyproject-hooks = ">=1.0.0,<2.0.0" requests = ">=2.18,<3.0" -requests-toolbelt = ">=0.9.1,<0.11.0" +requests-toolbelt = ">=0.9.1,<2" shellingham = ">=1.5,<2.0" tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} -tomlkit = ">=0.11.1,<0.11.2 || >0.11.2,<0.11.3 || >0.11.3,<1.0.0" +tomlkit = ">=0.11.4,<1.0.0" trove-classifiers = ">=2022.5.19" urllib3 = ">=1.26.0,<2.0.0" -virtualenv = [ - {version = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6,<21.0.0", markers = "sys_platform != \"win32\" or python_version != \"3.9\""}, - {version = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6,<20.16.6", markers = "sys_platform == \"win32\" and python_version == \"3.9\""}, -] +virtualenv = ">=20.22.0,<21.0.0" xattr = {version = ">=0.10.0,<0.11.0", markers = "sys_platform == \"darwin\""} [[package]] name = "poetry-core" -version = "1.4.0" +version = "1.6.1" description = "Poetry PEP 517 Build Backend" category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "poetry_core-1.4.0-py3-none-any.whl", hash = "sha256:5559ab80384ac021db329ef317086417e140ee1176bcfcb3a3838b544e213c8e"}, - {file = "poetry_core-1.4.0.tar.gz", hash = "sha256:514bd33c30e0bf56b0ed44ee15e120d7e47b61ad908b2b1011da68c48a84ada9"}, + {file = "poetry_core-1.6.1-py3-none-any.whl", hash = "sha256:70707340447dee0e7f334f9495ae652481c67b32d8d218f296a376ac2ed73573"}, + {file = "poetry_core-1.6.1.tar.gz", hash = "sha256:0f9b0de39665f36d6594657e7d57b6f463cc10f30c28e6d1c3b9ff54c26c9ac3"}, ] [package.dependencies] @@ -1120,19 +1165,19 @@ importlib-metadata = {version = ">=1.7.0", markers = "python_version < \"3.8\""} [[package]] name = "poetry-plugin-export" -version = "1.2.0" +version = "1.4.0" description = "Poetry plugin to export the dependencies to various formats" category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "poetry_plugin_export-1.2.0-py3-none-any.whl", hash = "sha256:109fb43ebfd0e79d8be2e7f9d43ba2ae357c4975a18dfc0cfdd9597dd086790e"}, - {file = "poetry_plugin_export-1.2.0.tar.gz", hash = "sha256:9a1dd42765408931d7831738749022651d43a2968b67c988db1b7a567dfe41ef"}, + {file = "poetry_plugin_export-1.4.0-py3-none-any.whl", hash = "sha256:5d9186d6f77cf2bf35fc96bd11fe650cc7656e515b17d99cb65018d50ba22589"}, + {file = "poetry_plugin_export-1.4.0.tar.gz", hash = "sha256:f16974cd9f222d4ef640fa97a8d661b04d4fb339e51da93973f1bc9d578e183f"}, ] [package.dependencies] -poetry = ">=1.2.2,<2.0.0" -poetry-core = ">=1.3.0,<2.0.0" +poetry = ">=1.5.0,<2.0.0" +poetry-core = ">=1.6.0,<2.0.0" [[package]] name = "ptyprocess" @@ -1173,6 +1218,21 @@ files = [ [package.extras] plugins = ["importlib-metadata"] +[[package]] +name = "pyproject-hooks" +version = "1.0.0" +description = "Wrappers to call pyproject.toml-based build backend hooks." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyproject_hooks-1.0.0-py3-none-any.whl", hash = "sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8"}, + {file = "pyproject_hooks-1.0.0.tar.gz", hash = "sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5"}, +] + +[package.dependencies] +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} + [[package]] name = "pyreadline3" version = "3.4.1" @@ -1756,14 +1816,14 @@ files = [ [[package]] name = "typing-extensions" -version = "4.4.0" +version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, + {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, + {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, ] [[package]] @@ -1785,46 +1845,25 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.16.5" +version = "20.25.0" description = "Virtual Python Environment builder" category = "main" optional = false -python-versions = ">=3.6" -files = [ - {file = "virtualenv-20.16.5-py3-none-any.whl", hash = "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27"}, - {file = "virtualenv-20.16.5.tar.gz", hash = "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da"}, -] - -[package.dependencies] -distlib = ">=0.3.5,<1" -filelock = ">=3.4.1,<4" -platformdirs = ">=2.4,<3" - -[package.extras] -docs = ["proselint (>=0.13)", "sphinx (>=5.1.1)", "sphinx-argparse (>=0.3.1)", "sphinx-rtd-theme (>=1)", "towncrier (>=21.9)"] -testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] - -[[package]] -name = "virtualenv" -version = "20.17.1" -description = "Virtual Python Environment builder" -category = "main" -optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, - {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, + {file = "virtualenv-20.25.0-py3-none-any.whl", hash = "sha256:4238949c5ffe6876362d9c0180fc6c3a824a7b12b80604eeb8085f2ed7460de3"}, + {file = "virtualenv-20.25.0.tar.gz", hash = "sha256:bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b"}, ] [package.dependencies] -distlib = ">=0.3.6,<1" -filelock = ">=3.4.1,<4" -importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.8\""} -platformdirs = ">=2.4,<3" +distlib = ">=0.3.7,<1" +filelock = ">=3.12.2,<4" +importlib-metadata = {version = ">=6.6", markers = "python_version < \"3.8\""} +platformdirs = ">=3.9.1,<5" [package.extras] -docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] -testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] [[package]] name = "webencodings" diff --git a/test_apps/python_app/tests/cli_test.py b/test_apps/python_app/tests/cli_test.py index b357612f..af963548 100644 --- a/test_apps/python_app/tests/cli_test.py +++ b/test_apps/python_app/tests/cli_test.py @@ -52,10 +52,10 @@ def test_origen_v(): # Process is done # Read std out first_stdout_line = process.stdout.readline() - assert "App:" in first_stdout_line + assert "Origen" in first_stdout_line + assert " 2." in first_stdout_line second_stdout_line = process.stdout.readline() - assert "Origen" in second_stdout_line - assert " 2." in second_stdout_line + assert "App:" in second_stdout_line def test_bad_command(): process = subprocess.Popen([f'{origen_cli}', 'thisisnotacommand'], diff --git a/test_apps/python_no_app/poetry.lock b/test_apps/python_no_app/poetry.lock index d930210b..c17a3534 100644 --- a/test_apps/python_no_app/poetry.lock +++ b/test_apps/python_no_app/poetry.lock @@ -92,6 +92,31 @@ files = [ [package.dependencies] beautifulsoup4 = "*" +[[package]] +name = "build" +version = "0.10.0" +description = "A simple, correct Python build frontend" +category = "main" +optional = false +python-versions = ">= 3.7" +files = [ + {file = "build-0.10.0-py3-none-any.whl", hash = "sha256:af266720050a66c893a6096a2f410989eeac74ff9a68ba194b3f6473e8e26171"}, + {file = "build-0.10.0.tar.gz", hash = "sha256:d5b71264afdb5951d6704482aac78de887c80691c52b88a9ad195983ca2c9269"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "os_name == \"nt\""} +importlib-metadata = {version = ">=0.22", markers = "python_version < \"3.8\""} +packaging = ">=19.0" +pyproject_hooks = "*" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} + +[package.extras] +docs = ["furo (>=2021.08.31)", "sphinx (>=4.0,<5.0)", "sphinx-argparse-cli (>=1.5)", "sphinx-autodoc-typehints (>=1.10)"] +test = ["filelock (>=3)", "pytest (>=6.2.4)", "pytest-cov (>=2.12)", "pytest-mock (>=2)", "pytest-rerunfailures (>=9.1)", "pytest-xdist (>=1.34)", "setuptools (>=42.0.0)", "setuptools (>=56.0.0)", "toml (>=0.10.0)", "wheel (>=0.36.0)"] +typing = ["importlib-metadata (>=5.1)", "mypy (==0.991)", "tomli", "typing-extensions (>=3.7.4.3)"] +virtualenv = ["virtualenv (>=20.0.35)"] + [[package]] name = "cachecontrol" version = "0.12.12" @@ -321,14 +346,14 @@ test = ["hypothesis (>=1.11.4,!=3.79.2)", "iso8601", "pretend", "pytest (>=6.2.0 [[package]] name = "distlib" -version = "0.3.6" +version = "0.3.8" description = "Distribution utilities" category = "main" optional = false python-versions = "*" files = [ - {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, - {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, + {file = "distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784"}, + {file = "distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64"}, ] [[package]] @@ -345,78 +370,85 @@ files = [ [[package]] name = "dulwich" -version = "0.20.50" +version = "0.21.7" description = "Python Git Library" category = "main" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:97f02f8d500d4af08dc022d697c56e8539171acc3f575c2fe9acf3b078e5c8c9"}, - {file = "dulwich-0.20.50-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7301773e5cc16d521bc6490e73772a86a4d1d0263de506f08b54678cc4e2f061"}, - {file = "dulwich-0.20.50-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b70106580ed11f45f4c32d2831d0c9c9f359bc2415fff4a6be443e3a36811398"}, - {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f9c4f2455f966cad94648278fa9972e4695b35d04f82792fa58e1ea15dd83f0"}, - {file = "dulwich-0.20.50-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9163fbb021a8ad9c35a0814a5eedf45a8eb3a0b764b865d7016d901fc5a947fc"}, - {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:322ff8ff6aa4d6d36294cd36de1c84767eb1903c7db3e7b4475ad091febf5363"}, - {file = "dulwich-0.20.50-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5d3290a45651c8e534f8e83ae2e30322aefdd162f0f338bae2e79a6ee5a87513"}, - {file = "dulwich-0.20.50-cp310-cp310-win32.whl", hash = "sha256:80ab07131a6e68594441f5c4767e9e44e87fceafc3e347e541c928a18c679bd8"}, - {file = "dulwich-0.20.50-cp310-cp310-win_amd64.whl", hash = "sha256:eefe786a6010f8546baac4912113eeed4e397ddb8c433a345b548a04d4176496"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:df3562dde3079d57287c233d45b790bc967c5aae975c9a7b07ca30e60e055512"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e1ae18d5805f0c0c5dac65795f8d48660437166b12ee2c0ffea95bfdbf9c1051"}, - {file = "dulwich-0.20.50-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d2f7df39bd1378d3b0bfb3e7fc930fd0191924af1f0ef587bcd9946afe076c06"}, - {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:731e7f319b34251fadeb362ada1d52cc932369d9cdfa25c0e41150cda28773d0"}, - {file = "dulwich-0.20.50-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b4d11d44176e5d2fa8271fc86ad1e0a8731b9ad8f77df64c12846b30e16135eb"}, - {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7aaabb8e4beadd53f75f853a981caaadef3ef130e5645c902705704eaf136daa"}, - {file = "dulwich-0.20.50-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3dc9f97ec8d3db08d9723b9fd06f3e52c15b84c800d153cfb59b0a3dc8b8d40"}, - {file = "dulwich-0.20.50-cp311-cp311-win32.whl", hash = "sha256:3b1964fa80cafd5a1fd71615b0313daf6f3295c6ab05656ea0c1d2423539904a"}, - {file = "dulwich-0.20.50-cp311-cp311-win_amd64.whl", hash = "sha256:a24a3893108f3b97beb958670d5f3f2a3bec73a1fe18637a572a85abd949a1c4"}, - {file = "dulwich-0.20.50-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6d409a282f8848fd6c8d7c7545ad2f75c16de5d5977de202642f1d50fdaac554"}, - {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5411d0f1092152e1c0bb916ae490fe181953ae1b8d13f4e68661253e10b78dbb"}, - {file = "dulwich-0.20.50-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6343569f998ce429e2a5d813c56768ac51b496522401db950f0aa44240bfa901"}, - {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a405cd236766060894411614a272cfb86fe86cde5ca73ef264fc4fa5a715fff4"}, - {file = "dulwich-0.20.50-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:ee0f9b02019c0ea84cdd31c00a0c283669b771c85612997a911715cf84e33d99"}, - {file = "dulwich-0.20.50-cp36-cp36m-win32.whl", hash = "sha256:2644466270267270f2157ea6f1c0aa224f6f3bf06a307fc39954e6b4b3d82bae"}, - {file = "dulwich-0.20.50-cp36-cp36m-win_amd64.whl", hash = "sha256:d4629635a97e3af1b5da48071e00c8e70fad85f3266fadabe1f5a8f49172c507"}, - {file = "dulwich-0.20.50-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0e4862f318d99cc8a500e3622a89613a88c07d957a0f628cdc2ed86addff790f"}, - {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c96e3fb9d48c0454dc242c7accc7819780c9a7f29e441a9eff12361ed0fa35f9"}, - {file = "dulwich-0.20.50-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cc6092a4f0bbbff2e553e87a9c6325955b64ea43fca21297c8182e19ae8a43c"}, - {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:519b627d49d273e2fd01c79d09e578675ca6cd05193c1787e9ef165c9a1d66ea"}, - {file = "dulwich-0.20.50-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:6a75cab01b909c4c683c2083e060e378bc01701b7366b5a7d9846ef6d3b9e3d5"}, - {file = "dulwich-0.20.50-cp37-cp37m-win32.whl", hash = "sha256:ea8ffe26d91dbcd5580dbd5a07270a12ea57b091604d77184da0a0d9fad50ed3"}, - {file = "dulwich-0.20.50-cp37-cp37m-win_amd64.whl", hash = "sha256:8f3af857f94021cae1322d86925bfc0dd31e501e885ab5db275473bfac0bb39d"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3fb35cedb1243bc420d885ef5b4afd642c6ac8f07ddfc7fdbca1becf9948bf7e"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4bb23a9cec63e16c0e432335f068169b73dd44fa9318dd7cd7a4ca83607ff367"}, - {file = "dulwich-0.20.50-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5267619b34ddaf8d9a6b841492cd17a971fd25bf9a5657f2de928385c3a08b94"}, - {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9091f1d53a3c0747cbf0bd127c64e7f09b770264d8fb53e284383fcdf69154e7"}, - {file = "dulwich-0.20.50-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6ec7c8fea2b44187a3b545e6c11ab9947ffb122647b07abcdb7cc3aaa770c0e"}, - {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:11b180b80363b4fc70664197028181a17ae4c52df9965a29b62a6c52e40c2dbe"}, - {file = "dulwich-0.20.50-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c83e7840d9d0a94d7033bc109efe0c22dfcdcd816bcd4469085e42809e3bf5ba"}, - {file = "dulwich-0.20.50-cp38-cp38-win32.whl", hash = "sha256:c075f69c2de19d9fd97e3b70832d2b42c6a4a5d909b3ffd1963b67d86029f95f"}, - {file = "dulwich-0.20.50-cp38-cp38-win_amd64.whl", hash = "sha256:06775c5713cfeda778c7c67d4422b5e7554d3a7f644f1dde646cdf486a30285a"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:49f66f1c057c18d7d60363f461f4ab8329320fbe1f02a7a33c255864a7d3c942"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4e541cd690a5e3d55082ed51732d755917e933cddeb4b0204f2a5ec5d5d7b60b"}, - {file = "dulwich-0.20.50-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:80e8750ee2fa0ab2784a095956077758e5f6107de27f637c4b9d18406652c22c"}, - {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fbb6368f18451dc44c95c55e1a609d1a01d3821f7ed480b22b2aea1baca0f4a7"}, - {file = "dulwich-0.20.50-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d3ee45001411b638641819b7b3b33f31f13467c84066e432256580fcab7d8815"}, - {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4842e22ed863a776b36ef8ffe9ed7b772eb452b42c8d02975c29d27e3bc50ab4"}, - {file = "dulwich-0.20.50-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:790e4a641284a7fb4d56ebdaf8b324a5826fbbb9c54307c06f586f9f6a5e56db"}, - {file = "dulwich-0.20.50-cp39-cp39-win32.whl", hash = "sha256:f08406b6b789dea5c95ba1130a0801d8748a67f18be940fe7486a8b481fde875"}, - {file = "dulwich-0.20.50-cp39-cp39-win_amd64.whl", hash = "sha256:78c388ad421199000fb7b5ed5f0c7b509b3e31bd7cad303786a4d0bf89b82f60"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:cb194c53109131bcbcd1ca430fcd437cdaf2d33e204e45fbe121c47eaa43e9af"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7542a72c5640dd0620862d6df8688f02a6c336359b5af9b3fcfe11b7fa6652f"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4aa1d0861517ebbbe0e0084cc9ab4f7ab720624a3eda2bd10e45f774ab858db8"}, - {file = "dulwich-0.20.50-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:583c6bbc27f13fe2e41a19f6987a42681c6e4f6959beae0a6e5bb033b8b081a8"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0c61c193d02c0e1e0d758cdd57ae76685c368d09a01f00d704ba88bd96767cfe"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c2edbff3053251985f10702adfafbee118298d383ef5b5b432a5f22d1f1915df"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a344230cadfc5d315752add6ce9d4cfcfc6c85e36bbf57fce9444bcc7c6ea8fb"}, - {file = "dulwich-0.20.50-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:57bff9bde0b6b05b00c6acbb1a94357caddb2908ed7026a48c715ff50d220335"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e29a3c2037761fa816aa556e78364dfc8e3f44b873db2d17aed96f9b06ac83a3"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2aa2a4a84029625bf9c63771f8a628db1f3be2d2ea3cb8b17942cd4317797152"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd9fa00971ecf059bb358085a942ecac5be4ff71acdf299f44c8cbc45c18659f"}, - {file = "dulwich-0.20.50-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:af4adac92fb95671ea3a24f2f8e5e5e8f638711ce9c33a3ca6cd68bf1ff7d99f"}, - {file = "dulwich-0.20.50.tar.gz", hash = "sha256:50a941796b2c675be39be728d540c16b5b7ce77eb9e1b3f855650ece6832d2be"}, + {file = "dulwich-0.21.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d4c0110798099bb7d36a110090f2688050703065448895c4f53ade808d889dd3"}, + {file = "dulwich-0.21.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2bc12697f0918bee324c18836053644035362bb3983dc1b210318f2fed1d7132"}, + {file = "dulwich-0.21.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:471305af74790827fcbafe330fc2e8bdcee4fb56ca1177c8c481b1c8f806c4a4"}, + {file = "dulwich-0.21.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d54c9d0e845be26f65f954dff13a1cd3f2b9739820c19064257b8fd7435ab263"}, + {file = "dulwich-0.21.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12d61334a575474e707614f2e93d6ed4cdae9eb47214f9277076d9e5615171d3"}, + {file = "dulwich-0.21.7-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e274cebaf345f0b1e3b70197f2651de92b652386b68020cfd3bf61bc30f6eaaa"}, + {file = "dulwich-0.21.7-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:817822f970e196e757ae01281ecbf21369383285b9f4a83496312204cf889b8c"}, + {file = "dulwich-0.21.7-cp310-cp310-win32.whl", hash = "sha256:7836da3f4110ce684dcd53489015fb7fa94ed33c5276e3318b8b1cbcb5b71e08"}, + {file = "dulwich-0.21.7-cp310-cp310-win_amd64.whl", hash = "sha256:4a043b90958cec866b4edc6aef5fe3c2c96a664d0b357e1682a46f6c477273c4"}, + {file = "dulwich-0.21.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ce8db196e79c1f381469410d26fb1d8b89c6b87a4e7f00ff418c22a35121405c"}, + {file = "dulwich-0.21.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:62bfb26bdce869cd40be443dfd93143caea7089b165d2dcc33de40f6ac9d812a"}, + {file = "dulwich-0.21.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c01a735b9a171dcb634a97a3cec1b174cfbfa8e840156870384b633da0460f18"}, + {file = "dulwich-0.21.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fa4d14767cf7a49c9231c2e52cb2a3e90d0c83f843eb6a2ca2b5d81d254cf6b9"}, + {file = "dulwich-0.21.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bca4b86e96d6ef18c5bc39828ea349efb5be2f9b1f6ac9863f90589bac1084d"}, + {file = "dulwich-0.21.7-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a7b5624b02ef808cdc62dabd47eb10cd4ac15e8ac6df9e2e88b6ac6b40133673"}, + {file = "dulwich-0.21.7-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c3a539b4696a42fbdb7412cb7b66a4d4d332761299d3613d90a642923c7560e1"}, + {file = "dulwich-0.21.7-cp311-cp311-win32.whl", hash = "sha256:675a612ce913081beb0f37b286891e795d905691dfccfb9bf73721dca6757cde"}, + {file = "dulwich-0.21.7-cp311-cp311-win_amd64.whl", hash = "sha256:460ba74bdb19f8d498786ae7776745875059b1178066208c0fd509792d7f7bfc"}, + {file = "dulwich-0.21.7-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:4c51058ec4c0b45dc5189225b9e0c671b96ca9713c1daf71d622c13b0ab07681"}, + {file = "dulwich-0.21.7-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:4bc4c5366eaf26dda3fdffe160a3b515666ed27c2419f1d483da285ac1411de0"}, + {file = "dulwich-0.21.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a0650ec77d89cb947e3e4bbd4841c96f74e52b4650830112c3057a8ca891dc2f"}, + {file = "dulwich-0.21.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f18f0a311fb7734b033a3101292b932158cade54b74d1c44db519e42825e5a2"}, + {file = "dulwich-0.21.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c589468e5c0cd84e97eb7ec209ab005a2cb69399e8c5861c3edfe38989ac3a8"}, + {file = "dulwich-0.21.7-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d62446797163317a397a10080c6397ffaaca51a7804c0120b334f8165736c56a"}, + {file = "dulwich-0.21.7-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e84cc606b1f581733df4350ca4070e6a8b30be3662bbb81a590b177d0c996c91"}, + {file = "dulwich-0.21.7-cp312-cp312-win32.whl", hash = "sha256:c3d1685f320907a52c40fd5890627945c51f3a5fa4bcfe10edb24fec79caadec"}, + {file = "dulwich-0.21.7-cp312-cp312-win_amd64.whl", hash = "sha256:6bd69921fdd813b7469a3c77bc75c1783cc1d8d72ab15a406598e5a3ba1a1503"}, + {file = "dulwich-0.21.7-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:7d8ab29c660125db52106775caa1f8f7f77a69ed1fe8bc4b42bdf115731a25bf"}, + {file = "dulwich-0.21.7-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0d2e4485b98695bf95350ce9d38b1bb0aaac2c34ad00a0df789aa33c934469b"}, + {file = "dulwich-0.21.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e138d516baa6b5bafbe8f030eccc544d0d486d6819b82387fc0e285e62ef5261"}, + {file = "dulwich-0.21.7-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:f34bf9b9fa9308376263fd9ac43143c7c09da9bc75037bb75c6c2423a151b92c"}, + {file = "dulwich-0.21.7-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:2e2c66888207b71cd1daa2acb06d3984a6bc13787b837397a64117aa9fc5936a"}, + {file = "dulwich-0.21.7-cp37-cp37m-win32.whl", hash = "sha256:10893105c6566fc95bc2a67b61df7cc1e8f9126d02a1df6a8b2b82eb59db8ab9"}, + {file = "dulwich-0.21.7-cp37-cp37m-win_amd64.whl", hash = "sha256:460b3849d5c3d3818a80743b4f7a0094c893c559f678e56a02fff570b49a644a"}, + {file = "dulwich-0.21.7-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:74700e4c7d532877355743336c36f51b414d01e92ba7d304c4f8d9a5946dbc81"}, + {file = "dulwich-0.21.7-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:c92e72c43c9e9e936b01a57167e0ea77d3fd2d82416edf9489faa87278a1cdf7"}, + {file = "dulwich-0.21.7-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d097e963eb6b9fa53266146471531ad9c6765bf390849230311514546ed64db2"}, + {file = "dulwich-0.21.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:808e8b9cc0aa9ac74870b49db4f9f39a52fb61694573f84b9c0613c928d4caf8"}, + {file = "dulwich-0.21.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e1957b65f96e36c301e419d7adaadcff47647c30eb072468901bb683b1000bc5"}, + {file = "dulwich-0.21.7-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:4b09bc3a64fb70132ec14326ecbe6e0555381108caff3496898962c4136a48c6"}, + {file = "dulwich-0.21.7-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5882e70b74ac3c736a42d3fdd4f5f2e6570637f59ad5d3e684760290b58f041"}, + {file = "dulwich-0.21.7-cp38-cp38-win32.whl", hash = "sha256:29bb5c1d70eba155ded41ed8a62be2f72edbb3c77b08f65b89c03976292f6d1b"}, + {file = "dulwich-0.21.7-cp38-cp38-win_amd64.whl", hash = "sha256:25c3ab8fb2e201ad2031ddd32e4c68b7c03cb34b24a5ff477b7a7dcef86372f5"}, + {file = "dulwich-0.21.7-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8929c37986c83deb4eb500c766ee28b6670285b512402647ee02a857320e377c"}, + {file = "dulwich-0.21.7-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:cc1e11be527ac06316539b57a7688bcb1b6a3e53933bc2f844397bc50734e9ae"}, + {file = "dulwich-0.21.7-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0fc3078a1ba04c588fabb0969d3530efd5cd1ce2cf248eefb6baf7cbc15fc285"}, + {file = "dulwich-0.21.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40dcbd29ba30ba2c5bfbab07a61a5f20095541d5ac66d813056c122244df4ac0"}, + {file = "dulwich-0.21.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8869fc8ec3dda743e03d06d698ad489b3705775fe62825e00fa95aa158097fc0"}, + {file = "dulwich-0.21.7-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d96ca5e0dde49376fbcb44f10eddb6c30284a87bd03bb577c59bb0a1f63903fa"}, + {file = "dulwich-0.21.7-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0064363bd5e814359657ae32517fa8001e8573d9d040bd997908d488ab886ed"}, + {file = "dulwich-0.21.7-cp39-cp39-win32.whl", hash = "sha256:869eb7be48243e695673b07905d18b73d1054a85e1f6e298fe63ba2843bb2ca1"}, + {file = "dulwich-0.21.7-cp39-cp39-win_amd64.whl", hash = "sha256:404b8edeb3c3a86c47c0a498699fc064c93fa1f8bab2ffe919e8ab03eafaaad3"}, + {file = "dulwich-0.21.7-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:e598d743c6c0548ebcd2baf94aa9c8bfacb787ea671eeeb5828cfbd7d56b552f"}, + {file = "dulwich-0.21.7-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d4a2d76c96426e791556836ef43542b639def81be4f1d6d4322cd886c115eae1"}, + {file = "dulwich-0.21.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f6c88acb60a1f4d31bd6d13bfba465853b3df940ee4a0f2a3d6c7a0778c705b7"}, + {file = "dulwich-0.21.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ecd315847dea406a4decfa39d388a2521e4e31acde3bd9c2609c989e817c6d62"}, + {file = "dulwich-0.21.7-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d05d3c781bc74e2c2a2a8f4e4e2ed693540fbe88e6ac36df81deac574a6dad99"}, + {file = "dulwich-0.21.7-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6de6f8de4a453fdbae8062a6faa652255d22a3d8bce0cd6d2d6701305c75f2b3"}, + {file = "dulwich-0.21.7-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e25953c7acbbe4e19650d0225af1c0c0e6882f8bddd2056f75c1cc2b109b88ad"}, + {file = "dulwich-0.21.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:4637cbd8ed1012f67e1068aaed19fcc8b649bcf3e9e26649826a303298c89b9d"}, + {file = "dulwich-0.21.7-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:858842b30ad6486aacaa607d60bab9c9a29e7c59dc2d9cb77ae5a94053878c08"}, + {file = "dulwich-0.21.7-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:739b191f61e1c4ce18ac7d520e7a7cbda00e182c3489552408237200ce8411ad"}, + {file = "dulwich-0.21.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:274c18ec3599a92a9b67abaf110e4f181a4f779ee1aaab9e23a72e89d71b2bd9"}, + {file = "dulwich-0.21.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:2590e9b431efa94fc356ae33b38f5e64f1834ec3a94a6ac3a64283b206d07aa3"}, + {file = "dulwich-0.21.7-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ed60d1f610ef6437586f7768254c2a93820ccbd4cfdac7d182cf2d6e615969bb"}, + {file = "dulwich-0.21.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8278835e168dd097089f9e53088c7a69c6ca0841aef580d9603eafe9aea8c358"}, + {file = "dulwich-0.21.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffc27fb063f740712e02b4d2f826aee8bbed737ed799962fef625e2ce56e2d29"}, + {file = "dulwich-0.21.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:61e3451bd3d3844f2dca53f131982553be4d1b1e1ebd9db701843dd76c4dba31"}, + {file = "dulwich-0.21.7.tar.gz", hash = "sha256:a9e9c66833cea580c3ac12927e4b9711985d76afca98da971405d414de60e968"}, ] [package.dependencies] +typing-extensions = {version = "*", markers = "python_version <= \"3.7\""} urllib3 = ">=1.25" [package.extras] @@ -442,19 +474,19 @@ test = ["pytest (>=6)"] [[package]] name = "filelock" -version = "3.9.0" +version = "3.12.2" description = "A platform independent file lock." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, - {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, + {file = "filelock-3.12.2-py3-none-any.whl", hash = "sha256:cbb791cdea2a72f23da6ac5b5269ab0a0d161e9ef0100e653b69049a7706d1ec"}, + {file = "filelock-3.12.2.tar.gz", hash = "sha256:002740518d8aa59a26b0c76e10fb8c6e15eae825d34b6fdf670333fd7b938d81"}, ] [package.extras] -docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] -testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] +docs = ["furo (>=2023.5.20)", "sphinx (>=7.0.1)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "diff-cover (>=7.5)", "pytest (>=7.3.1)", "pytest-cov (>=4.1)", "pytest-mock (>=3.10)", "pytest-timeout (>=2.1)"] [[package]] name = "html5lib" @@ -504,14 +536,14 @@ files = [ [[package]] name = "importlib-metadata" -version = "4.13.0" +version = "6.7.0" description = "Read metadata from Python packages" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "importlib_metadata-4.13.0-py3-none-any.whl", hash = "sha256:8a8a81bcf996e74fee46f0d16bd3eaa382a7eb20fd82445c3ad11f4090334116"}, - {file = "importlib_metadata-4.13.0.tar.gz", hash = "sha256:dd0173e8f150d6815e098fd354f6414b0f079af4644ddfe90c71e2fc6174346d"}, + {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, + {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, ] [package.dependencies] @@ -519,9 +551,9 @@ typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] [[package]] name = "importlib-resources" @@ -554,6 +586,18 @@ files = [ {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] +[[package]] +name = "installer" +version = "0.7.0" +description = "A library for installing Python wheels." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "installer-0.7.0-py3-none-any.whl", hash = "sha256:05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53"}, + {file = "installer-0.7.0.tar.gz", hash = "sha256:a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"}, +] + [[package]] name = "jaraco.classes" version = "3.2.3" @@ -808,7 +852,7 @@ files = [ [[package]] name = "origen" -version = "2.0.0.dev5" +version = "2.0.0.dev8" description = "Semiconductor Developer's Kit" category = "main" optional = false @@ -824,7 +868,7 @@ importlib-metadata = ">= 1.7.0" Jinja2 = "^3" mako = "1.1.0" origen_autoapi = "2.0.1" -origen_metal = "= 0.4.0" +origen_metal = "~0.4.1.dev1" poetry = "^1.1.14" recommonmark = ">= 0" sphinx = "3.0.2" @@ -853,7 +897,7 @@ sphinx = "*" [[package]] name = "origen-metal" -version = "0.4.0" +version = "0.4.1.dev1" description = "Bare metal APIs for the Origen SDK" category = "main" optional = false @@ -863,6 +907,7 @@ develop = true [package.dependencies] colorama = ">= 0.4.4" +importlib-metadata = ">= 6.7.0" pyreadline3 = {version = "^3.3", markers = "sys_platform == \"win32\""} termcolor = ">= 1.1.0" @@ -899,14 +944,14 @@ ptyprocess = ">=0.5" [[package]] name = "pkginfo" -version = "1.9.2" -description = "Query metadatdata from sdists / bdists / installed packages." +version = "1.9.6" +description = "Query metadata from sdists / bdists / installed packages." category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "pkginfo-1.9.2-py3-none-any.whl", hash = "sha256:d580059503f2f4549ad6e4c106d7437356dbd430e2c7df99ee1efe03d75f691e"}, - {file = "pkginfo-1.9.2.tar.gz", hash = "sha256:ac03e37e4d601aaee40f8087f63fc4a2a6c9814dda2c8fa6aab1b1829653bdfa"}, + {file = "pkginfo-1.9.6-py3-none-any.whl", hash = "sha256:4b7a555a6d5a22169fcc9cf7bfd78d296b0361adad412a346c1226849af5e546"}, + {file = "pkginfo-1.9.6.tar.gz", hash = "sha256:8fd5896e8718a4372f0ea9cc9d96f6417c9b986e23a4d116dda26b62cc29d046"}, ] [package.extras] @@ -944,22 +989,22 @@ url = "../pl_ext_cmds" [[package]] name = "platformdirs" -version = "2.6.2" +version = "3.11.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, - {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, + {file = "platformdirs-3.11.0-py3-none-any.whl", hash = "sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e"}, + {file = "platformdirs-3.11.0.tar.gz", hash = "sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3"}, ] [package.dependencies] -typing-extensions = {version = ">=4.4", markers = "python_version < \"3.8\""} +typing-extensions = {version = ">=4.7.1", markers = "python_version < \"3.8\""} [package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.1)", "sphinx-autodoc-typehints (>=1.24)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-cov (>=4.1)", "pytest-mock (>=3.11.1)"] [[package]] name = "pluggy" @@ -982,57 +1027,57 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "poetry" -version = "1.3.1" +version = "1.5.1" description = "Python dependency management and packaging made easy." category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "poetry-1.3.1-py3-none-any.whl", hash = "sha256:e8c24984af3e124ef31a5891c1c11871c948687368ee451e95f7f101ffbf8204"}, - {file = "poetry-1.3.1.tar.gz", hash = "sha256:fde98462ad5dc9879393157da93092206a3411117e25a4761a41c6d08f31aea8"}, + {file = "poetry-1.5.1-py3-none-any.whl", hash = "sha256:dfc7ce3a38ae216c0465694e2e674bef6eb1a2ba81aa47a26f9dc03362fe2f5f"}, + {file = "poetry-1.5.1.tar.gz", hash = "sha256:cc7ea4524d1a11558006224bfe8ba8ed071417d4eb5ef6c89decc6a37d437eeb"}, ] [package.dependencies] "backports.cached-property" = {version = ">=1.0.2,<2.0.0", markers = "python_version < \"3.8\""} +build = ">=0.10.0,<0.11.0" cachecontrol = {version = ">=0.12.9,<0.13.0", extras = ["filecache"]} cleo = ">=2.0.0,<3.0.0" crashtest = ">=0.4.1,<0.5.0" -dulwich = ">=0.20.46,<0.21.0" +dulwich = ">=0.21.2,<0.22.0" filelock = ">=3.8.0,<4.0.0" html5lib = ">=1.0,<2.0" -importlib-metadata = {version = ">=4.4,<5.0", markers = "python_version < \"3.10\""} +importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} +installer = ">=0.7.0,<0.8.0" jsonschema = ">=4.10.0,<5.0.0" keyring = ">=23.9.0,<24.0.0" lockfile = ">=0.12.2,<0.13.0" packaging = ">=20.4" pexpect = ">=4.7.0,<5.0.0" -pkginfo = ">=1.5,<2.0" -platformdirs = ">=2.5.2,<3.0.0" -poetry-core = "1.4.0" -poetry-plugin-export = ">=1.2.0,<2.0.0" +pkginfo = ">=1.9.4,<2.0.0" +platformdirs = ">=3.0.0,<4.0.0" +poetry-core = "1.6.1" +poetry-plugin-export = ">=1.4.0,<2.0.0" +pyproject-hooks = ">=1.0.0,<2.0.0" requests = ">=2.18,<3.0" -requests-toolbelt = ">=0.9.1,<0.11.0" +requests-toolbelt = ">=0.9.1,<2" shellingham = ">=1.5,<2.0" tomli = {version = ">=2.0.1,<3.0.0", markers = "python_version < \"3.11\""} -tomlkit = ">=0.11.1,<0.11.2 || >0.11.2,<0.11.3 || >0.11.3,<1.0.0" +tomlkit = ">=0.11.4,<1.0.0" trove-classifiers = ">=2022.5.19" urllib3 = ">=1.26.0,<2.0.0" -virtualenv = [ - {version = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6,<21.0.0", markers = "sys_platform != \"win32\" or python_version != \"3.9\""}, - {version = ">=20.4.3,<20.4.5 || >20.4.5,<20.4.6 || >20.4.6,<20.16.6", markers = "sys_platform == \"win32\" and python_version == \"3.9\""}, -] +virtualenv = ">=20.22.0,<21.0.0" xattr = {version = ">=0.10.0,<0.11.0", markers = "sys_platform == \"darwin\""} [[package]] name = "poetry-core" -version = "1.4.0" +version = "1.6.1" description = "Poetry PEP 517 Build Backend" category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "poetry_core-1.4.0-py3-none-any.whl", hash = "sha256:5559ab80384ac021db329ef317086417e140ee1176bcfcb3a3838b544e213c8e"}, - {file = "poetry_core-1.4.0.tar.gz", hash = "sha256:514bd33c30e0bf56b0ed44ee15e120d7e47b61ad908b2b1011da68c48a84ada9"}, + {file = "poetry_core-1.6.1-py3-none-any.whl", hash = "sha256:70707340447dee0e7f334f9495ae652481c67b32d8d218f296a376ac2ed73573"}, + {file = "poetry_core-1.6.1.tar.gz", hash = "sha256:0f9b0de39665f36d6594657e7d57b6f463cc10f30c28e6d1c3b9ff54c26c9ac3"}, ] [package.dependencies] @@ -1040,19 +1085,19 @@ importlib-metadata = {version = ">=1.7.0", markers = "python_version < \"3.8\""} [[package]] name = "poetry-plugin-export" -version = "1.2.0" +version = "1.4.0" description = "Poetry plugin to export the dependencies to various formats" category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ - {file = "poetry_plugin_export-1.2.0-py3-none-any.whl", hash = "sha256:109fb43ebfd0e79d8be2e7f9d43ba2ae357c4975a18dfc0cfdd9597dd086790e"}, - {file = "poetry_plugin_export-1.2.0.tar.gz", hash = "sha256:9a1dd42765408931d7831738749022651d43a2968b67c988db1b7a567dfe41ef"}, + {file = "poetry_plugin_export-1.4.0-py3-none-any.whl", hash = "sha256:5d9186d6f77cf2bf35fc96bd11fe650cc7656e515b17d99cb65018d50ba22589"}, + {file = "poetry_plugin_export-1.4.0.tar.gz", hash = "sha256:f16974cd9f222d4ef640fa97a8d661b04d4fb339e51da93973f1bc9d578e183f"}, ] [package.dependencies] -poetry = ">=1.2.2,<2.0.0" -poetry-core = ">=1.3.0,<2.0.0" +poetry = ">=1.5.0,<2.0.0" +poetry-core = ">=1.6.0,<2.0.0" [[package]] name = "ptyprocess" @@ -1093,6 +1138,21 @@ files = [ [package.extras] plugins = ["importlib-metadata"] +[[package]] +name = "pyproject-hooks" +version = "1.0.0" +description = "Wrappers to call pyproject.toml-based build backend hooks." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyproject_hooks-1.0.0-py3-none-any.whl", hash = "sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8"}, + {file = "pyproject_hooks-1.0.0.tar.gz", hash = "sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5"}, +] + +[package.dependencies] +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} + [[package]] name = "pyreadline3" version = "3.4.1" @@ -1689,14 +1749,14 @@ files = [ [[package]] name = "typing-extensions" -version = "4.4.0" +version = "4.7.1" description = "Backported and Experimental Type Hints for Python 3.7+" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, - {file = "typing_extensions-4.4.0.tar.gz", hash = "sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa"}, + {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, + {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, ] [[package]] @@ -1718,46 +1778,25 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.16.5" +version = "20.25.0" description = "Virtual Python Environment builder" category = "main" optional = false -python-versions = ">=3.6" -files = [ - {file = "virtualenv-20.16.5-py3-none-any.whl", hash = "sha256:d07dfc5df5e4e0dbc92862350ad87a36ed505b978f6c39609dc489eadd5b0d27"}, - {file = "virtualenv-20.16.5.tar.gz", hash = "sha256:227ea1b9994fdc5ea31977ba3383ef296d7472ea85be9d6732e42a91c04e80da"}, -] - -[package.dependencies] -distlib = ">=0.3.5,<1" -filelock = ">=3.4.1,<4" -platformdirs = ">=2.4,<3" - -[package.extras] -docs = ["proselint (>=0.13)", "sphinx (>=5.1.1)", "sphinx-argparse (>=0.3.1)", "sphinx-rtd-theme (>=1)", "towncrier (>=21.9)"] -testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] - -[[package]] -name = "virtualenv" -version = "20.17.1" -description = "Virtual Python Environment builder" -category = "main" -optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" files = [ - {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, - {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, + {file = "virtualenv-20.25.0-py3-none-any.whl", hash = "sha256:4238949c5ffe6876362d9c0180fc6c3a824a7b12b80604eeb8085f2ed7460de3"}, + {file = "virtualenv-20.25.0.tar.gz", hash = "sha256:bf51c0d9c7dd63ea8e44086fa1e4fb1093a31e963b86959257378aef020e1f1b"}, ] [package.dependencies] -distlib = ">=0.3.6,<1" -filelock = ">=3.4.1,<4" -importlib-metadata = {version = ">=4.8.3", markers = "python_version < \"3.8\""} -platformdirs = ">=2.4,<3" +distlib = ">=0.3.7,<1" +filelock = ">=3.12.2,<4" +importlib-metadata = {version = ">=6.6", markers = "python_version < \"3.8\""} +platformdirs = ">=3.9.1,<5" [package.extras] -docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] -testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] +docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] [[package]] name = "webencodings" diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py index 95c17149..8bce89b3 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py @@ -1,5 +1,7 @@ import re +from .dirs import rust_cli_toml from origen.helpers.regressions.cli.origen import CoreErrorMessages as Errs +from origen_metal.utils.version import from_cargo class AssertionHelpers: @classmethod @@ -54,9 +56,9 @@ def assert_invalid_sn_msg(cls, out, offender): assert Errs.unknown_opt_msg(offender, False) in out @classmethod - def assert_origen_v(cls, out, version=None, version_only=True, app=None): + def assert_origen_v(cls, out, version=None, version_only=True, app=None, cli_version=None): import origen - v = version or origen.status["origen_version"] + v = version or origen.__version__ if app: if app is True: a = origen.app.version @@ -68,9 +70,11 @@ def assert_origen_v(cls, out, version=None, version_only=True, app=None): '' ]) else: + cli_ver = from_cargo(rust_cli_toml) + s = "\n".join([ f"Origen: {v}", - f"CLI: {v}", + f"CLI: {cli_ver}", '' ]) if version_only: diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py index 4a899e14..6f2e7cd4 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py @@ -2,7 +2,14 @@ project_dir = Path(__file__).parent.parent.parent.parent.parent o2_root = project_dir -cli_dir = project_dir.joinpath(f"python/origen/origen/__bin__/bin") +cli_dir = project_dir.joinpath("python/origen/origen/__bin__/bin") + +# Rust Directories +rust_dir = project_dir.joinpath("rust") +rust_origen_dir = rust_dir.joinpath("origen") +rust_cli_dir = rust_origen_dir.joinpath("cli") +rust_cli_toml = rust_cli_dir.joinpath("cargo.toml") rust_build_cli_dir = project_dir.joinpath(f"rust/origen/target/debug") + test_apps_dir = project_dir.joinpath("test_apps") plugins_dir = test_apps_dir # Currently the same but may change if test_apps dir is re-organized \ No newline at end of file From 9c694c7bdfe198e375bae94d836092cfb6cb7fe9 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 17 Feb 2024 07:30:09 -0600 Subject: [PATCH 186/200] Try reinstalling poetry globally for windows regressions --- .github/workflows/regression_test.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 91497e0d..89f5ae19 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -303,6 +303,12 @@ jobs: if: matrix.os == 'windows-latest' run: where.exe origen + - name: Reinstall Poetry Version + run: + poetry --version + pip install poetry==1.3.2 + poetry --version + - name: Run User-Global Invocation Tests working-directory: test_apps/no_workspace run: pytest test_user_install.py::TestUserInstall -vv @@ -338,4 +344,6 @@ jobs: # With global origen available, test user install errors which fall back to the global install - name: Run User Install Errors - Falling Back To Global Install working-directory: test_apps/no_workspace - run: pytest test_user_install.py::TestErrorCasesWithFallback -vv + run: + poetry --version + pytest test_user_install.py::TestErrorCasesWithFallback -vv From 40f85cefa330f17d21addf37e092d8642c48639d Mon Sep 17 00:00:00 2001 From: coreyeng Date: Sat, 17 Feb 2024 13:21:59 -0600 Subject: [PATCH 187/200] Fix Cargo.toml capitalization --- .../test_apps_shared_test_helpers/cli/dirs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py index 6f2e7cd4..d1876049 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/dirs.py @@ -8,7 +8,7 @@ rust_dir = project_dir.joinpath("rust") rust_origen_dir = rust_dir.joinpath("origen") rust_cli_dir = rust_origen_dir.joinpath("cli") -rust_cli_toml = rust_cli_dir.joinpath("cargo.toml") +rust_cli_toml = rust_cli_dir.joinpath("Cargo.toml") rust_build_cli_dir = project_dir.joinpath(f"rust/origen/target/debug") test_apps_dir = project_dir.joinpath("test_apps") From 1993564e1f243fe174f0ca0fe5e256e323a4b183 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 17 Feb 2024 14:56:01 -0600 Subject: [PATCH 188/200] Add additional poetry/pip version outputs. Try poetry install from ENV. --- .github/workflows/regression_test.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 89f5ae19..d428feef 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -138,6 +138,13 @@ jobs: working-directory: test_apps/python_app run: poetry --version + - name: Cache Poetry Version + working-directory: test_apps/python_app + run: + $POETRY_VER = python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))"" + echo $POETRY_VER + echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV + - name: Show Origen Binary Location (Linux) if: matrix.os == 'ubuntu-latest' working-directory: test_apps/python_app @@ -293,6 +300,8 @@ jobs: - name: Install Origen Packages run: | + pip --version + poetry --version pip install python/origen pip install python/origen_metal @@ -305,8 +314,9 @@ jobs: - name: Reinstall Poetry Version run: + echo ${{ env.poetry_version }} poetry --version - pip install poetry==1.3.2 + pip install poetry==${{ env.poetry_version }} poetry --version - name: Run User-Global Invocation Tests From 3df6dd06a63c17aaa5789ceaf08cd65411e37b38 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 17 Feb 2024 15:17:49 -0600 Subject: [PATCH 189/200] Fix caching poetry version --- .github/workflows/regression_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index d428feef..a12bab51 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -141,7 +141,7 @@ jobs: - name: Cache Poetry Version working-directory: test_apps/python_app run: - $POETRY_VER = python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))"" + $POETRY_VER = python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))" echo $POETRY_VER echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV From f0c671cd0b2171203e64f1922b8d2306a6a5c343 Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 17 Feb 2024 19:52:04 -0600 Subject: [PATCH 190/200] WIP: Debug Regressions --- .github/workflows/regression_test.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index a12bab51..c61357b6 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -138,9 +138,20 @@ jobs: working-directory: test_apps/python_app run: poetry --version - - name: Cache Poetry Version + - name: Install importlib_metadata (Python 3.12) + run: pip install importlib_metadata + + - name: Cache Poetry Version (Linux) + if: matrix.os == 'ubuntu-latest' working-directory: test_apps/python_app - run: + run: | + POETRY_VER=$(python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))") + echo $POETRY_VER + echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV + - name: Cache Poetry Version (Windows) + if: matrix.os == 'windows-latest' + working-directory: test_apps/python_app + run: | $POETRY_VER = python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))" echo $POETRY_VER echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV @@ -313,7 +324,7 @@ jobs: run: where.exe origen - name: Reinstall Poetry Version - run: + run: | echo ${{ env.poetry_version }} poetry --version pip install poetry==${{ env.poetry_version }} From ad5e173514b412523e1778852dfb83ef0b53c6ea Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 17 Feb 2024 21:01:42 -0600 Subject: [PATCH 191/200] Debug Regressions: Try reverting build system --- .github/workflows/regression_test.yml | 50 ++++++++++++++------------- python/origen_metal/pyproject.toml | 6 ++-- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index c61357b6..75d890d6 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -111,7 +111,9 @@ jobs: $env:Path = "${{ github.workspace }}/rust/origen/target/debug;$env:Path" - name: Display Python Version - run: python -c "import sys; print(sys.version)" + run: | + python -c "import sys; print(sys.version)" + pip --version - name: Display Origen CLI Version run: origen -v @@ -138,23 +140,23 @@ jobs: working-directory: test_apps/python_app run: poetry --version - - name: Install importlib_metadata (Python 3.12) - run: pip install importlib_metadata - - - name: Cache Poetry Version (Linux) - if: matrix.os == 'ubuntu-latest' - working-directory: test_apps/python_app - run: | - POETRY_VER=$(python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))") - echo $POETRY_VER - echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV - - name: Cache Poetry Version (Windows) - if: matrix.os == 'windows-latest' - working-directory: test_apps/python_app - run: | - $POETRY_VER = python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))" - echo $POETRY_VER - echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV + # - name: Install importlib_metadata (Python 3.12) + # run: pip install importlib_metadata + + # - name: Cache Poetry Version (Linux) + # if: matrix.os == 'ubuntu-latest' + # working-directory: test_apps/python_app + # run: | + # POETRY_VER=$(python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))") + # echo $POETRY_VER + # echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV + # - name: Cache Poetry Version (Windows) + # if: matrix.os == 'windows-latest' + # working-directory: test_apps/python_app + # run: | + # $POETRY_VER = python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))" + # echo $POETRY_VER + # echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV - name: Show Origen Binary Location (Linux) if: matrix.os == 'ubuntu-latest' @@ -323,12 +325,12 @@ jobs: if: matrix.os == 'windows-latest' run: where.exe origen - - name: Reinstall Poetry Version - run: | - echo ${{ env.poetry_version }} - poetry --version - pip install poetry==${{ env.poetry_version }} - poetry --version + # - name: Reinstall Poetry Version + # run: | + # echo ${{ env.poetry_version }} + # poetry --version + # pip install poetry==${{ env.poetry_version }} + # poetry --version - name: Run User-Global Invocation Tests working-directory: test_apps/no_workspace diff --git a/python/origen_metal/pyproject.toml b/python/origen_metal/pyproject.toml index 44236c52..89a5c84d 100644 --- a/python/origen_metal/pyproject.toml +++ b/python/origen_metal/pyproject.toml @@ -35,6 +35,6 @@ markers = [ script = "poetry_build.py" generate-setup-file = false -[build-system] -requires = ["setuptools", "poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" +# [build-system] +# requires = ["setuptools", "poetry-core>=1.0.0"] +# build-backend = "poetry.core.masonry.api" From 07a2f492957627a53c30a093d0bd10edcb41a79d Mon Sep 17 00:00:00 2001 From: corey Date: Sat, 2 Mar 2024 20:51:34 -0600 Subject: [PATCH 192/200] Add CLI to github releases. Bypass regressions for just version and publishing updates --- .github/workflows/publish.yml | 30 ++++++++++++++++++++++++++- .github/workflows/regression_test.yml | 11 +++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 91cdc111..be9941de 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -320,6 +320,12 @@ jobs: name: ${{ env.origen_ver_file }} path: python/origen/${{ env.origen_ver_file }} + - name: Upload CLI as a standalone entity + uses: actions/upload-artifact@v3 + with: + name: cli + path: python\origen\origen\__bin__\bin\origen + build_windows: strategy: fail-fast: false @@ -488,6 +494,12 @@ jobs: - name: List Origen Wheels run: ls -al ./origen_wheels + - name: Upload CLI as a standalone entity + uses: actions/upload-artifact@v3 + with: + name: cli + path: python\origen\origen\__bin__\bin\origen.exe + publish_to_pypi_test: needs: [build_manylinux, build_windows] runs-on: ubuntu-latest @@ -594,6 +606,17 @@ jobs: ls -al ./origen_metal ls -al ./origen + - uses: actions/download-artifact@v3 + with: + name: cli + path: cli + + - name: Show downloaded artifact directories + run: | + ls -al ./origen_metal + ls -al ./origen + ls -al ./cli + - uses: actions/download-artifact@v3 with: name: ${{ env.om_ver_file }} @@ -612,6 +635,11 @@ jobs: files: origen dest: origen.zip + - uses: vimtor/action-zip@v1.1 + with: + files: cli + dest: cli.zip + - name: Get OM/Origen Versions run: | ls -al @@ -635,7 +663,7 @@ jobs: - name: Generate Github Release uses: ncipollo/release-action@v1 with: - artifacts: ./origen_metal.zip, ./origen.zip + artifacts: ./origen_metal.zip, ./origen.zip, cli.zip artifactErrorsFailBuild: true prerelease: ${{ github.event.inputs.prerelease == 'true' }} commit: ${{ github.sha }} diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 75d890d6..44b56be5 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -1,5 +1,14 @@ name: Regression Tests -on: [push, workflow_dispatch] +on: + push: + paths-ignore: + # Ignore updates to just the publish action + - .github\workflows\publish.yml + # Ignore updates to just version files for Origen/OM/CLI + - rust\origen\cli\Cargo.toml + - python\origen\pyproject.toml + - python\origen_metal\pyproject.toml + workflow_dispatch: jobs: build: strategy: From 4d02b4a01ca6fdd4adce9fd6589580f417790563 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 4 Mar 2024 20:48:38 -0600 Subject: [PATCH 193/200] Try to fix regression test paths-ignore error --- .github/workflows/regression_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 44b56be5..81c4d592 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -3,11 +3,11 @@ on: push: paths-ignore: # Ignore updates to just the publish action - - .github\workflows\publish.yml + - '.github\workflows\publish.yml' # Ignore updates to just version files for Origen/OM/CLI - - rust\origen\cli\Cargo.toml - - python\origen\pyproject.toml - - python\origen_metal\pyproject.toml + - 'rust\origen\cli\Cargo.toml' + - 'python\origen\pyproject.toml' + - 'python\origen_metal\pyproject.toml' workflow_dispatch: jobs: build: From ea36b3f28788dbaf6a32443ec0dfc1852cd81438 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 4 Mar 2024 20:51:43 -0600 Subject: [PATCH 194/200] Try to fix regression test ignore-paths --- .github/workflows/regression_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression_test.yml b/.github/workflows/regression_test.yml index 81c4d592..4af4d5a1 100644 --- a/.github/workflows/regression_test.yml +++ b/.github/workflows/regression_test.yml @@ -3,11 +3,11 @@ on: push: paths-ignore: # Ignore updates to just the publish action - - '.github\workflows\publish.yml' + - '.github/workflows/publish.yml' # Ignore updates to just version files for Origen/OM/CLI - - 'rust\origen\cli\Cargo.toml' - - 'python\origen\pyproject.toml' - - 'python\origen_metal\pyproject.toml' + - 'rust/origen/cli/Cargo.toml' + - 'python/origen/pyproject.toml' + - 'python/origen_metal/pyproject.toml' workflow_dispatch: jobs: build: From f2cbc9f2b3be3ee7eb369439831fc633eb38d350 Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 11 Mar 2024 07:27:22 -0500 Subject: [PATCH 195/200] Build out publish command some. Remove locking master from publish workflow. --- .github/workflows/publish.yml | 45 +- rust/origen/cli/src/bin.rs | 2 +- .../src/commands/_prelude/clap_arg_actions.rs | 1 + .../cli/src/commands/develop_origen/mod.rs | 8 + .../src/commands/develop_origen/publish.rs | 443 ++++++++++++------ rust/origen/cli/src/framework/core_cmds.rs | 11 + rust/origen/src/utility/github.rs | 129 ++++- .../utils/revision_control/supported/git.rs | 48 +- 8 files changed, 493 insertions(+), 194 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index be9941de..3fbce2da 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -79,45 +79,12 @@ jobs: script: | core.setFailed('Found existing publish workflow: ${{ steps.query-concurrency.outputs.skipped_by.htmlUrl }}') - lock_master: - needs: [precheck] - runs-on: ubuntu-latest - steps: - - name: no-op - run: echo "hi" - # steps: - # - name: Check Master Lock Status - # uses: actions/github-script@v7 - # with: - # github-token: ${{ secrets.O2_PAT }} - # script: | - # const result = await github.rest.repos.getBranchProtection({ - # owner: context.repo.owner, - # repo: context.repo.repo, - # branch: 'master' - # }) - # console.log(result) - # console.log(result.lock_branch.enabled) - # if (result.lock_branch.enabled) { - # core.setFailed('Master branch is unexpectedly locked!') - # } - - # const check_master_url = "https://api.github.com/repos/${{ github.repository }}/branches/BRANCH/protection" - # const result = await github.request(url) - # console.log(result) - # - id: lock-master - # uses: actions/github-script@v7 - # if: ${{ always() }} - # with: - # script: | - # github.rest.repo. - build_manylinux: strategy: fail-fast: false matrix: python-version: ${{ fromJSON(vars.PYTHON_VERSIONS_FOR_RELEASE) }} - needs: [lock_master] + needs: [precheck] runs-on: ubuntu-latest container: image: quay.io/pypa/manylinux2014_x86_64 @@ -331,7 +298,7 @@ jobs: fail-fast: false matrix: python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }} - needs: [lock_master] + needs: [precheck] runs-on: windows-latest steps: @@ -669,10 +636,10 @@ jobs: commit: ${{ github.sha }} tag: ${{ env.tag }} cleanup: - needs: [lock_master, build_manylinux, build_windows, publish_to_pypi_test, publish_to_pypi, publish_github_release, show_wheels] + needs: [precheck, build_manylinux, build_windows, publish_to_pypi_test, publish_to_pypi, publish_github_release, show_wheels] runs-on: ubuntu-latest if: ${{ always() }} steps: - - run: echo Begin Clean Up... - - # - name: Unlock Master Branch + - run: | + echo "Begin Clean Up..." + echo "No Clean Up Tasks!" diff --git a/rust/origen/cli/src/bin.rs b/rust/origen/cli/src/bin.rs index 71e19000..ac341027 100644 --- a/rust/origen/cli/src/bin.rs +++ b/rust/origen/cli/src/bin.rs @@ -1300,7 +1300,7 @@ fn main() -> Result<()> { (true, STATUS.is_app_present, STATUS.cli_version().unwrap().to_pep440()?.to_string()), ); } - Err(e) => { + Err(_e) => { if error_lines.contains(*python::NO_ORIGEN_BOOT_MODULE_ERROR) { // Module not found error if STATUS.is_app_present { diff --git a/rust/origen/cli/src/commands/_prelude/clap_arg_actions.rs b/rust/origen/cli/src/commands/_prelude/clap_arg_actions.rs index 10c94674..d052fa20 100644 --- a/rust/origen/cli/src/commands/_prelude/clap_arg_actions.rs +++ b/rust/origen/cli/src/commands/_prelude/clap_arg_actions.rs @@ -2,3 +2,4 @@ pub use clap::builder::ArgAction::Set as SetArg; pub use clap::builder::ArgAction::Append as AppendArgs; pub use clap::builder::ArgAction::Count as CountArgs; pub use clap::builder::ArgAction::SetTrue as SetArgTrue; +pub use clap::builder::ArgAction::SetFalse as SetArgFalse; diff --git a/rust/origen/cli/src/commands/develop_origen/mod.rs b/rust/origen/cli/src/commands/develop_origen/mod.rs index 13e10cbe..8e40e60c 100644 --- a/rust/origen/cli/src/commands/develop_origen/mod.rs +++ b/rust/origen/cli/src/commands/develop_origen/mod.rs @@ -7,6 +7,14 @@ use origen::Result; use super::_prelude::*; pub const BASE_CMD: &'static str = "develop_origen"; +lazy_static! { + static ref GH_OWNER: &'static str = "Origen-SDK"; + static ref GH_REPO: &'static str = "o2"; + static ref PUBLISH_BRANCH: &'static str = "master"; + static ref PUBLISH_WORKFLOW: &'static str = "publish.yml"; + static ref ORIGEN_OM_REQ_PATH: [&'static str; 4] = ["tool", "poetry", "dependencies", "origen_metal"]; +} + gen_core_cmd_funcs__no_exts__no_app_opts!( BASE_CMD, "Commands to assist with Origen core development", diff --git a/rust/origen/cli/src/commands/develop_origen/publish.rs b/rust/origen/cli/src/commands/develop_origen/publish.rs index 72fd2bea..e798a581 100644 --- a/rust/origen/cli/src/commands/develop_origen/publish.rs +++ b/rust/origen/cli/src/commands/develop_origen/publish.rs @@ -1,9 +1,13 @@ use crate::commands::_prelude::*; use crate::STATUS; use origen_metal::utils::version::{Version, ReleaseType, VersionWithTOML}; -use origen::utility::github::{dispatch_workflow, get_latest_workflow_dispatch}; -use origen_metal::utils::terminal::confirm_or_exit; +use origen::utility::github::{dispatch_workflow, get_latest_workflow_dispatch, get_branch_protections, lock_branch, unlock_branch, BranchProtections}; +use origen_metal::utils::terminal::confirm_with_user; use origen_metal::utils::revision_control::RevisionControlAPI; +use std::process::exit; +use origen_metal::utils::terminal::{redln, greenln}; +use std::thread; +use std::time::Duration; pub const BASE_CMD: &'static str = "publish"; @@ -12,10 +16,11 @@ pub const NO_RELEASE: &'static str = "none"; const RELEASE_TYPES: [&str; 6] = [NO_RELEASE, USE_CURRENT, "major", "minor", "patch", "dev"]; pub (crate) fn publish_cmd<'a>() -> SubCmd<'a> { - core_subcmd__no_exts__no_app_opts!( + let subc = core_subcmd__no_exts__no_app_opts!( BASE_CMD, "Release Origen and/or Origen Metal Rust Libraries and/or Python Packages", { |cmd: App| { + // Release types/version updates cmd.arg( Arg::new("origen_release_type") .long("origen_release_type") @@ -34,11 +39,28 @@ pub (crate) fn publish_cmd<'a>() -> SubCmd<'a> { .help("Specify Origen Metal Python Package's release type") ) .arg( - Arg::new("test_pypi") - .long("pypi_test_server") + Arg::new("cli_release_type") + .long("cli_release_type") + .visible_alias("cli") + .value_parser(RELEASE_TYPES) + .takes_value(true) + .help("Specify Origen's CLI release type") + ) + + // Release targets + .arg( + Arg::new("release_to_pypi_test") + .long("release_to_pypi_test") + .alias("pypi_test") .action(SetArgTrue) .help("Release to PyPi test instance (https://test.pypi.org/)") ) + .arg( + Arg::new("no_pypi_release") + .long("no_pypi_release") + .action(SetArgFalse) + .help("Do NOT release to pypi, even if Origen or OM versions are updated") + ) .arg( Arg::new("github_release") .long("github_release") @@ -46,154 +68,307 @@ pub (crate) fn publish_cmd<'a>() -> SubCmd<'a> { .action(SetArgTrue) .help("Create a GitHub release (https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases)") ) + .arg( - Arg::new("bump_origen_om_req") - .long("bump_origen_om_req") - .visible_alias("bump_o_req") + Arg::new("no_bump_origen_om_req") + .long("no_bump_origen_om_req") + .visible_alias("no_bump_o_req") .action(SetArgTrue) - .help("Set Origen's OM requirement to this OM version") + .help("Do not bump Origen's OM requirement") ) - }} - ) + + .arg( + Arg::new("version_update_only") + .long("version_update_only") + .visible_alias("versions_only") + .action(SetArgTrue) + .help("Only updates the version files. Does not check in or launch publishing action.") + .conflicts_with("release_to_pypi_test") + .conflicts_with("no_pypi_release") + .conflicts_with("github_release") + ) + }}, + core_subcmd__no_exts__no_app_opts!( + "monitor", + "Monitor the most recent/running publishing workflow run", + { |cmd: App| { + cmd.visible_alias("m") + }} + ) + ); + subc } -use std::process::exit; -use origen_metal::utils::terminal::redln; pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { - // TODO PublishO2 - // Make sure no other publishing actions are running - - // TODO PublishO2 - // Lock master branch - // Need to wrap below steps to ensure master will be unlocked even if there's a problem with another check + displayln!("Retrieving most recent publish workflow run..."); + let last_pub_run = get_latest_workflow_dispatch(*super::GH_OWNER, *super::GH_REPO, Some(*super::PUBLISH_WORKFLOW))?; + if let Some((n, _subcmd)) = invocation.subcommand() { + match n { + "monitor" => { + displayln!("Most Recent Publish Workflow:"); + displayln!(" Status: {}{}", last_pub_run.status, { + if let Some(c) = last_pub_run.conclusion { + format!(" ({})", c) + } else { + "".to_string() + } + }); + displayln!(" Started On: {}", last_pub_run.run_started_at); + displayln!(" Started By: {}", last_pub_run.triggering_actor.login); + displayln!(" Webview: {}", last_pub_run.html_url); + return Ok(()); + } + _ => unreachable_invalid_subc!(n) + } + } - // Check currently on master branch with attached HEAD - let git = origen_metal::utils::revision_control::RevisionControl::git(&STATUS.origen_wksp_root, vec!("git@github.com:Origen-SDK/o2.git"), None); - if !git.on_branch("master")? { - redln("Publishing must be done on the master branch!"); + displayln!("Checking that no publishing actions are currently running..."); + if !last_pub_run.completed() { + redln("A publish workflow is already running! Cannot start a new publish action."); + redln(&format!(" Running action started by {} at {}", last_pub_run.triggering_actor.login, last_pub_run.created_at)); + redln(&format!(" {}", last_pub_run.html_url)); exit(1); + } else { + greenln("No publish workflows currently running!"); } - // TODO PublishO2 - // Ensure no local changes - // let status = git.status(None)?; - // if status.is_modified() { - // status.summarize(); - // redln("Changes found in workspace. Please check in your changes or stash them before rerunning"); - // exit(1); - // } - - // TODO PublishO2 - // Ensure up-to-date with remote - // Currently issues with git2-rs - cannot authenticate - // git.fetch(None)?; - // git.list_refs(None)?; - - // TODO PublishO2 Ensure a regression test passed with this commit - - // Get current versions - // TODO PublishO2 Cleanup - move paths to shared location - let om_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen_metal").join("pyproject.toml"); - let origen_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen").join("pyproject.toml"); - let mut py_om_ver = Version::from_pyproject_with_toml_handle(om_pyproject_path)?; - let mut py_origen_ver = Version::from_pyproject_with_toml_handle(origen_pyproject_path)?; - - // Extract release types - fn extract_release(invoc: &clap::ArgMatches, cli_name: &str, ver: &mut VersionWithTOML) -> Result { - if let Some(rel_type) = invoc.get_one::(cli_name) { - match rel_type.as_str() { - USE_CURRENT => Ok(true), - NO_RELEASE => Ok(false), - _ => { - ver.increment(ReleaseType::try_from(rel_type.as_str())?)?; - Ok(true) + // Lock master branch + displayln!("Locking branch '{}' while publishing...", *super::PUBLISH_BRANCH); + lock_publish_branch(true)?; + + match 'checks: { + // Check currently on master branch with attached HEAD + displayln!("Checking workspace is on the master branch with attached HEAD..."); + let git = origen_metal::utils::revision_control::RevisionControl::git( + &STATUS.origen_wksp_root, + vec!("git@github.com:Origen-SDK/o2.git"), + None + ); + if !git.on_branch("master")? { + redln("Publishing must be done on the master branch!"); + break 'checks Ok(false) + } else { + greenln("On master branch with attached HEAD"); + } + + // TODO PublishO2 + // Ensure no local changes + let status = git.status(None)?; + if status.is_modified() { + status.summarize(); + redln("Changes found in workspace. Please check in your changes or stash them before rerunning"); + break 'checks Ok(false); + } + + // Ensure up-to-date with remote + git.fetch(None)?; + let latest = git.confirm_latest_ref(*super::PUBLISH_BRANCH)?; + if !latest.0 { + redln(&format!("Current ref does not match latest ref for master branch ({} vs. {})", latest.1[0], latest.1[1])); + break 'checks Ok(false); + } + + // TODO PublishO2 Ensure a regression test passed with this commit + + // Get current versions + // TODO PublishO2 Cleanup - move paths to shared location + let om_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen_metal").join("pyproject.toml"); + let origen_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen").join("pyproject.toml"); + let cli_toml_loc = STATUS.origen_wksp_root.join("rust").join("origen").join("cli").join("cargo.toml"); + let mut py_om_ver = Version::from_pyproject_with_toml_handle(om_pyproject_path)?; + let mut py_origen_ver = Version::from_pyproject_with_toml_handle(origen_pyproject_path)?; + let mut cli_ver = Version::from_cargo_with_toml_handle(cli_toml_loc)?; + + // Extract release types + fn extract_release(invoc: &clap::ArgMatches, cli_name: &str, ver: &mut VersionWithTOML) -> Result { + if let Some(rel_type) = invoc.get_one::(cli_name) { + match rel_type.as_str() { + USE_CURRENT => Ok(true), + NO_RELEASE => Ok(false), + _ => { + ver.increment(ReleaseType::try_from(rel_type.as_str())?)?; + Ok(true) + } } + } else { + Ok(false) } - } else { - Ok(false) } - } - let release_py_om = extract_release(invocation, "om_release_type", &mut py_om_ver)?; - let release_py_origen = extract_release(invocation, "origen_release_type", &mut py_origen_ver)?; - - // Bump releases if needed and summarize to user - fn summarize_release(name: &str, release: bool, ver: &VersionWithTOML) -> bool { - if release { - if ver.was_version_updated() { - displayln!( - "{}: Releasing '{}' Version: {} (from {})", - name, - ver.rel_type().expect("Expected version should have been updated"), - ver.version(), - ver.orig_version() - ); - true + let release_py_om = extract_release(invocation, "om_release_type", &mut py_om_ver)?; + let release_py_origen = extract_release(invocation, "origen_release_type", &mut py_origen_ver)?; + let release_cli = extract_release(invocation, "cli_release_type", &mut cli_ver)?; + + // Bump releases if needed and summarize to user + fn summarize_release(name: &str, release: bool, ver: &VersionWithTOML) -> bool { + if release { + if ver.was_version_updated() { + displayln!( + "{}: Releasing '{}' Version: {} (from {})", + name, + ver.rel_type().expect("Expected version should have been updated"), + ver.version(), + ver.orig_version() + ); + true + } else { + displayln!("{}: Releasing Current Version: {}", ver.version(), name); + false + } } else { - displayln!("{}: Releasing Current Version: {}", ver.version(), name); + displayln!("{}: No release", name); false } + } + displayln!("Release Summary:"); + let update_om_package = summarize_release("Origen Metal Python Package", release_py_om, &py_om_ver); + let update_origen_package = summarize_release("Origen Python Package", release_py_origen, &py_origen_ver); + let update_cli = summarize_release("Origen CLI", release_cli, &cli_ver); + let new_req = { + if update_origen_package && !*invocation.get_one::("no_bump_origen_om_req").unwrap() { + Some(format!("~{}",py_om_ver.version().to_string())) + } else { + None + } + }; + if let Some(new) = new_req.as_ref() { + let old_req = py_origen_ver.get_other(&*super::ORIGEN_OM_REQ_PATH)?.to_string(); + displayln!("Origen's OM requirement: Updating to '{}' (from '{}')", new, old_req); } else { - displayln!("{}: No release", name); - false + displayln!("Origen's OM requirement: No update to Origen's OM minimum version"); + } + if !confirm_with_user(Some("Proceed with release?"))? { + displayln!("Exiting without sending release request..."); + break 'checks Ok(false); + } + + // Update the TOMLs + // Make sure all versions updated successfully before any checking in + fn update_toml(should_update: bool, ver: &mut VersionWithTOML) -> Result<()> { + if should_update { + ver.write()?; + displayln!("Updated version in {}", ver.source().display()); + } + Ok(()) + } + displayln!("Updating versions in TOML files..."); + update_toml(update_om_package, &mut py_om_ver)?; + if let Some(new) = new_req.as_ref() { + py_origen_ver.set_other(&*super::ORIGEN_OM_REQ_PATH, new)?; + } + update_toml(update_origen_package, &mut py_origen_ver)?; + + if *invocation.get_one::("version_update_only").unwrap() { + displayln!("Stopping release after version update..."); + break 'checks Ok(false); + } else { + let mut to_checkin = vec!(); + if update_om_package { + displayln!("Checking in OM version at: '{}'", py_om_ver.source().display()); + to_checkin.push(py_om_ver.source().as_path()); + } + if update_origen_package { + displayln!("Checking in OM version at: '{}'", py_origen_ver.source().display()); + to_checkin.push(py_origen_ver.source().as_path()); + } + if update_cli { + displayln!("Checking in OM version at: '{}'", cli_ver.source().display()); + to_checkin.push(cli_ver.source().as_path()); + } + if to_checkin.is_empty() { + displayln!("No version files to check in..."); + } else { + displayln!("Committing and pushing new version files..."); + unlock_publish_branch(true)?; + git.checkin(Some(to_checkin), "Updated version files for next release", false)?; + lock_publish_branch(true)?; + } + } + + // Send Github actions request to build and release + let mut inputs = indexmap::IndexMap::new(); + inputs.insert("origen_metal_python_package", update_om_package.to_string()); + inputs.insert("origen_python_package", update_origen_package.to_string()); + inputs.insert("publish_pypi", (!invocation.get_one::("no_pypi_release").unwrap() && (update_origen_package || update_om_package)).to_string()); + inputs.insert("publish_pypi_test", invocation.get_one::("release_to_pypi_test").unwrap().to_string()); + inputs.insert("publish_github_release", invocation.get_one::("github_release").unwrap().to_string()); + displayln!("Sending request to GitHub Actions to build and release..."); + for (k, v) in &inputs { + displayln!(" {}: {}", k, v); + } + dispatch_workflow(*super::GH_OWNER, *super::GH_REPO, *super::PUBLISH_WORKFLOW, *super::PUBLISH_BRANCH, Some(inputs))?; + + Ok::(true) + } { + Ok(publishing) => { + redln("Automation is incomplete"); + + // Unlock branch + unlock_publish_branch(true)?; + if publishing { + // Publishing started. Try to find the job and provide the link + displayln!("Publishing workflow requested. Gathering link..."); + 'wait_for_publish_run: { + for i in 0..10 { + let pub_run = get_latest_workflow_dispatch(*super::GH_OWNER, *super::GH_REPO, Some(*super::PUBLISH_WORKFLOW))?; + if last_pub_run.id != pub_run.id { + displayln!("Publishing workflow started. Use 'origen develop_origen publish monitor' or this link to monitor the progression:\n{}", &pub_run.html_url); + break 'wait_for_publish_run; + } + displayln!("Found same job ID as previous run. Retrying in 5 seconds... ({} of 10)", i+1); + thread::sleep(Duration::from_secs(5)); + } + redln("Did not find an updated publish run. Please check the workflow run manually."); + } + } else { + displayln!("No publishing workflow initiated"); + } + Ok(()) + }, + Err(e) => { + // Log the error, unlock the branch, and return the error + redln("Encountered an error during publishing checks:"); + redln(&format!("{}", e)); + unlock_publish_branch(true)?; + bail!("{}", e); } } - displayln!("Release Summary:"); - let update_om_package = summarize_release("Origen Metal Python Package", release_py_om, &py_om_ver); - let update_origen_package = summarize_release("Origen Python Package", release_py_origen, &py_origen_ver); - confirm_or_exit(Some("Proceed with release?"), Some("Exiting without sending release request!"), None)?; - - // Update the TOMLs - // Make sure all versions updated successfully before any checking in - fn update_toml(should_update: bool, ver: &mut VersionWithTOML) -> Result<()> { - if should_update { - ver.write()?; - displayln!("Updated version in {}", ver.source().display()); +} + +fn unlock_publish_branch(log_errors: bool) -> Result { + displayln!("Unlocking branch '{}'...", *super::PUBLISH_BRANCH); + match unlock_branch(*super::GH_OWNER, *super::GH_REPO, *super::PUBLISH_BRANCH) { + Ok(res) => { + greenln("Branch unlocked!"); + Ok(res) + }, + Err(e) => { + if log_errors { + redln("Error unlocking branch '{}'. Branch must be manually unlocked. Received Error:"); + redln(&format!("{}", e)); + } + Err(e) } - Ok(()) } - displayln!("Updating versions in TOML files..."); - update_toml(update_om_package, &mut py_om_ver)?; - if *invocation.get_one::("bump_origen_om_req").unwrap() { - // TODO PublishingO2 this should be automatically set on an OM + Origen release - let prev_ver = py_origen_ver.toml["tool"]["poetry"]["dependencies"]["origen_metal"].to_string(); - displayln!("Bumping Origen's 'origen_metal' requirement from {} to {}", prev_ver, py_om_ver.version()); - py_origen_ver.toml["tool"]["poetry"]["dependencies"]["origen_metal"] = origen_metal::toml_edit::value(py_om_ver.version().to_string()); +} + +fn lock_publish_branch(log_errors: bool) -> Result { + match get_branch_protections(*super::GH_OWNER, *super::GH_REPO, *super::PUBLISH_BRANCH) { + Ok(res) => { + if res.is_locked() { + let m = format!("Branch '{}' is unexpectedly locked!", *super::PUBLISH_BRANCH); + redln(&m); + bail!(&m); + } + let retn = lock_branch(*super::GH_OWNER, *super::GH_REPO, *super::PUBLISH_BRANCH)?; + greenln("Branch locked!"); + Ok(retn) + }, + Err(e) => { + if log_errors { + redln(&format!("Error locking branch '{}':", *super::PUBLISH_BRANCH)); + redln(&format!("{}", e)); + } + Err(e) + } } - update_toml(update_origen_package, &mut py_origen_ver)?; - - // TODO PublishO2 Check in updated files - // if update_om_package { - // // git.checkin()?; - // } - // if update_origen_package { - // // git.checkin()?; - // } - // For now, if updating occurred, user must manually push updates and re-run publishing with updated master - // let status = git.status(None)?; - // if status.is_modified() { - // status.summarize(); - // redln("Automation is incomplete. Please check in updated files and rerun using 'current' package versions"); - // exit(1); - // } - - // TODO PublishO2 Cancel regressions if a push occurred - // If a push to master occurred, cancel the run: - // Will likely fail if libraries/packages were updated with to-be-released versions - // May delay the start of the publishing action - - // TODO PublishO2 Send Github actions request to build and release - // displayln!("Sending request to GitHub Actions to build and release the following:"); - // let inputs = std::collections::HashMap::new(); - // let res = dispatch_workflow("Origen-SDK", "o2", "publish.yml", "master", Some(inputs))?; - // let res = get_latest_workflow_dispatch("Origen-SDK", "o2", Some("publish.yml"))?; - // res.cancel()?; - // TODO PublishingO2 debug stuff to remove - // let res = origen::utility::github::get_workflow_run_by_id("Origen-SDK", "o2", 7041427651)?; - // println!("Result: {:?}", res); - // let res = get_latest_workflow_dispatch("Origen-SDK", "o2", Some("publish.yml"))?; - // println!("Result: {:?}", res); - // res.refresh()?; - redln("Automation is incomplete"); - - Ok(()) -} \ No newline at end of file +} diff --git a/rust/origen/cli/src/framework/core_cmds.rs b/rust/origen/cli/src/framework/core_cmds.rs index 73407fb2..7d8ca62e 100644 --- a/rust/origen/cli/src/framework/core_cmds.rs +++ b/rust/origen/cli/src/framework/core_cmds.rs @@ -61,6 +61,17 @@ macro_rules! _core_subcmd { } }}; + ($include_app_opts:expr, $extendable:expr, $name:expr, $help:expr, $proc:tt, $($subcmd:expr ), *) => {{ + $crate::framework::core_cmds::SubCmd { + name: $name, + help: $help, + subcmds: &[$($subcmd),*], + proc: Some(&$proc), + include_app_opts: $include_app_opts, + extendable: $extendable, + } + }}; + ($name:expr, $help:expr, $proc:tt, $($subcmd:expr ), *) => {{ $crate::framework::core_cmds::SubCmd { name: $name, diff --git a/rust/origen/src/utility/github.rs b/rust/origen/src/utility/github.rs index bc858e85..8b0fe56f 100644 --- a/rust/origen/src/utility/github.rs +++ b/rust/origen/src/utility/github.rs @@ -18,7 +18,15 @@ macro_rules! block_on { pub fn lookup_pat() -> Result { // TODO Publishing Tie this back to the user object at some point. - Ok(std::env::var("github_pat")?) + match std::env::var("github_pat") { + Ok(v) => Ok(v), + Err(e) => match e { + std::env::VarError::NotPresent => { + bail!("Environment variable 'github_pat' was not found") + }, + _ => return Err(e.into()) + } + } } #[derive(Deserialize, Debug)] @@ -51,7 +59,7 @@ pub struct WorkflowRun { pub head_branch: String, pub head_sha: String, pub status: String, - pub conclusion: String, + pub conclusion: Option, pub url: String, pub html_url: String, pub run_attempt: u8, @@ -68,7 +76,7 @@ pub struct WorkflowRun { impl WorkflowRun { pub fn was_cancelled(&self) -> bool { - self.conclusion == "cancelled" + self.conclusion.as_ref().map_or( false, |c| c == "cancelled") } pub fn cancel(&self) -> Result<()> { @@ -85,6 +93,30 @@ impl WorkflowRun { } } +#[derive(Serialize, Deserialize, Debug)] +pub struct Enabled { + pub enabled: bool, +} + +#[derive(Serialize, Deserialize, Debug)] +pub struct BranchProtections { + pub url: String, + // pub required_signatures: ?, + // pub enforce_admins + pub required_linear_history: Enabled, + pub allow_force_pushes: Enabled, + pub allow_deletions: Enabled, + pub required_conversation_resolution: Enabled, + pub lock_branch: Enabled, + pub allow_fork_syncing: Enabled, +} + +impl BranchProtections { + pub fn is_locked(&self) -> bool { + self.lock_branch.enabled + } +} + pub fn send_get_request(crab: F, uri: &str) -> Result where F: Fn() -> Result, @@ -114,6 +146,21 @@ where }) } +pub fn send_put_request(crab: F, uri: &str, inputs: Option) -> Result +where + F: Fn() -> Result, + H: serde::Serialize + Sized +{ + with_blocking_calls( || { + let c = crab()?; + log_trace!("Sending POST request to GA: {}", uri); + let response = block_on!(c._put(uri, inputs.as_ref()))?; + let body = block_on!(c.body_to_string(response))?; + log_trace!("Received pre-processed body:\n{}", body); + Ok(body) + }) +} + pub enum GithubAuth { PersonalAccessToken } @@ -148,13 +195,16 @@ pub fn get_workflow_run_by_id(owner: &str, repo: &str, run_id: u64) -> Result( owner: &str, repo: &str, workflow: &str, git_ref: &str, - inputs: Option>, -) -> Result { + inputs: Option, +) -> Result +where + H: serde::Serialize + Sized +{ with_blocking_calls(|| { let crab = new_crab(Some(GithubAuth::PersonalAccessToken))?; let actions = crab.actions(); @@ -169,3 +219,70 @@ pub fn dispatch_workflow( let res = Outcome::new_success(); Ok(res) } + +pub fn get_branch_protections(owner: &str, repo: &str, branch: &str) -> Result { + let resp = &send_get_request( + || new_crab(Some(GithubAuth::PersonalAccessToken)), + &format!("https://api.github.com/repos/{owner}/{repo}/branches/{branch}/protection") + )?; + match serde_json::from_str(resp) { + Ok(retn) => Ok(retn), + Err(e) => { + bail!("Error building branch protection struct: {}\nUnexpected response:\n{}", e, resp); + } + } +} + +#[derive(Serialize, Debug)] +pub struct UpdateBranchProtectionRule { + pub lock_branch: bool, + pub enforce_admins: bool, + pub required_pull_request_reviews: Option>, + pub required_status_checks: Option>, + pub restrictions: Option>, +} + +impl UpdateBranchProtectionRule { + pub fn lock_branch() -> Self { + Self { + lock_branch: true, + enforce_admins: true, + required_pull_request_reviews: None, + required_status_checks: None, + restrictions: None, + } + } + + pub fn unlock_branch() -> Self { + Self { + lock_branch: false, + enforce_admins: false, + required_pull_request_reviews: None, + required_status_checks: None, + restrictions: None, + } + } +} + +pub fn update_branch_protection(owner: &str, repo: &str, branch: &str, new_protections: UpdateBranchProtectionRule) -> Result { + let url = format!("https://api.github.com/repos/{owner}/{repo}/branches/{branch}/protection"); + let res = send_put_request( + || new_crab(Some(GithubAuth::PersonalAccessToken)), + &url, + Some(new_protections), + )?; + match serde_json::from_str(&res) { + Ok(retn) => Ok(retn), + Err(e) => { + bail!("Error building branch protection struct: {}\nUnexpected response:\n{}", e, res); + } + } +} + +pub fn lock_branch(owner: &str, repo: &str, branch: &str) -> Result { + update_branch_protection(owner, repo, branch, UpdateBranchProtectionRule::lock_branch()) +} + +pub fn unlock_branch(owner: &str, repo: &str, branch: &str) -> Result { + update_branch_protection(owner, repo, branch, UpdateBranchProtectionRule::unlock_branch()) +} \ No newline at end of file diff --git a/rust/origen_metal/src/utils/revision_control/supported/git.rs b/rust/origen_metal/src/utils/revision_control/supported/git.rs index 6b71b8ed..533f673a 100644 --- a/rust/origen_metal/src/utils/revision_control/supported/git.rs +++ b/rust/origen_metal/src/utils/revision_control/supported/git.rs @@ -394,6 +394,7 @@ impl RevisionControlAPI for Git { cb.credentials(|url, username_from_url, allowed_types| { self.credentials_callback(url, username_from_url, allowed_types) }); + self.reset_temps(); log_trace!("Cleaning up after push..."); repo.checkout_index(None, None)?; Ok(Outcome::new_success_with_msg(commit_id)) @@ -441,6 +442,7 @@ impl Git { } self.checkout(true, None, version)?; + self.reset_temps(); Ok(()) } @@ -868,6 +870,7 @@ impl Git { // Disconnect the underlying connection to prevent from idling. remote.disconnect()?; + self.reset_temps(); // Update the references in the remote's namespace to point to the right // commits. This may be needed even if there was no packfile to download, @@ -938,20 +941,37 @@ impl Git { } } - // TODO Publishing - // pub fn list_refs(&self, remote_name: Option<&str>) -> Result { - // let mut repo = Repository::open(&self.local)?; - // // println!("remotes") - // let mut remote = repo.find_remote(remote_name.unwrap_or("origin"))?; - // let mut cb = RemoteCallbacks::new(); - // cb.credentials(|url, username_from_url, allowed_types| { - // self.credentials_callback(url, username_from_url, allowed_types) - // }); - // remote.connect_auth(Direction::Fetch, Some(cb), None)?; - - // println!("{:?}", remote.list()?.iter().map( |r| [r.name().to_string(), r.oid().to_string()]).collect::>()); - // todo!(); - // } + pub fn list_refs(&self, remote_name: Option<&str>) -> Result> { + let repo = Repository::open(&self.local)?; + let mut remote = repo.find_remote(remote_name.unwrap_or("origin"))?; + let mut cb = RemoteCallbacks::new(); + cb.credentials(|url, username_from_url, allowed_types| { + self.credentials_callback(url, username_from_url, allowed_types) + }); + remote.connect_auth(Direction::Fetch, Some(cb), None)?; + self.reset_temps(); + Ok(remote.list()?.iter().map( |r| [r.name().to_string(), r.oid().to_string()]).collect::>()) + } + + pub fn confirm_latest_ref(&self, branch: &str) -> Result<(bool, [String; 2])> { + let refs = self.list_refs(None)?; + let b; + if branch.starts_with("refs/") { + b = branch.to_string(); + } else { + b = format!("refs/heads/{}", branch); + } + if let Some(latest) = refs.iter().find( |r| { r[0] == b }) { + // first ref should be HEAD, but double check + if refs[0][0] == "HEAD" { + Ok((refs[0][1] == latest[1], [refs[0][1].to_string(), latest[1].to_string()])) + } else { + bail!("Expected HEAD ref to be first in list. Found: {}", refs[0][0]); + } + } else { + bail!("Could not find Git ref: {}", b); + } + } } fn ssh_keys() -> Vec { From b647ef1152fdd8092b4c6686f3182e2b40b0d05b Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 17 Mar 2024 11:50:28 -0500 Subject: [PATCH 196/200] Updated version files for next release --- rust/origen/cli/Cargo.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/rust/origen/cli/Cargo.toml b/rust/origen/cli/Cargo.toml index 4cad2d3a..55d80c6a 100644 --- a/rust/origen/cli/Cargo.toml +++ b/rust/origen/cli/Cargo.toml @@ -17,7 +17,6 @@ origen = { path = ".." } origen_metal = { path = "../../origen_metal" } pathdiff = "0.1" online = "0.2" -reqwest = "0.9" time = "0.1.42" semver = "0.9.0" lazy_static = "1.4.0" From 600cc8555e73148aec7e8ed673e972e5b691b8d7 Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 17 Mar 2024 15:22:40 -0500 Subject: [PATCH 197/200] Continue work on publish command. --- rust/origen/Cargo.lock | 1063 ++--------------- rust/origen/Cargo.toml | 2 - .../cli/src/commands/develop_origen/mod.rs | 9 +- .../src/commands/develop_origen/publish.rs | 123 +- rust/origen/src/utility/github.rs | 2 +- rust/origen_metal/Cargo.toml | 1 + rust/origen_metal/src/lib.rs | 3 + rust/origen_metal/src/utils/mod.rs | 3 +- rust/origen_metal/src/utils/pypi.rs | 48 + rust/origen_metal/src/utils/version.rs | 30 +- rust/pyapi/Cargo.lock | 3 +- 11 files changed, 313 insertions(+), 974 deletions(-) create mode 100644 rust/origen_metal/src/utils/pypi.rs diff --git a/rust/origen/Cargo.lock b/rust/origen/Cargo.lock index 4cb51126..67894bf0 100644 --- a/rust/origen/Cargo.lock +++ b/rust/origen/Cargo.lock @@ -106,7 +106,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -143,7 +143,7 @@ dependencies = [ "slab", "socket2", "waker-fn", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -165,15 +165,9 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi 0.3.9", + "winapi", ] -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" - [[package]] name = "autocfg" version = "1.1.0" @@ -339,17 +333,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "either", - "iovec", -] - [[package]] name = "bytes" version = "1.4.0" @@ -393,7 +376,7 @@ dependencies = [ "semver 1.0.4", "serde", "toml", - "url 2.4.0", + "url", ] [[package]] @@ -429,7 +412,7 @@ dependencies = [ "num-traits", "serde", "time 0.1.44", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -506,7 +489,6 @@ dependencies = [ "pathdiff 0.1.0", "phf", "regex", - "reqwest 0.9.24", "semver 0.9.0", "serde", "sha2", @@ -526,16 +508,7 @@ dependencies = [ "atty", "lazy_static", "libc", - "winapi 0.3.9", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", + "winapi", ] [[package]] @@ -577,11 +550,11 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", - "parking_lot 0.12.1", + "parking_lot", "regex", "termios", "unicode-width", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -596,7 +569,7 @@ dependencies = [ "regex", "terminal_size", "unicode-width", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -614,34 +587,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "cookie" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" -dependencies = [ - "time 0.1.44", - "url 1.7.2", -] - -[[package]] -name = "cookie_store" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" -dependencies = [ - "cookie", - "failure", - "idna 0.1.5", - "log", - "publicsuffix", - "serde", - "serde_json", - "time 0.1.44", - "try_from", - "url 1.7.2", -] - [[package]] name = "core-foundation" version = "0.9.3" @@ -682,54 +627,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crossbeam-deque" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg 1.1.0", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static", - "maybe-uninit", - "memoffset 0.5.6", - "scopeguard", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg 1.1.0", - "cfg-if 0.1.10", - "lazy_static", -] - [[package]] name = "crossbeam-utils" version = "0.8.5" @@ -879,7 +776,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72d337a64190607d4fcca2cb78982c5dd57f4916e19696b48a575fa746b6cb0f" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -890,7 +787,7 @@ checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" dependencies = [ "libc", "redox_users 0.3.5", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -911,7 +808,7 @@ checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" dependencies = [ "libc", "redox_users 0.4.0", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -926,12 +823,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -[[package]] -name = "dtoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - [[package]] name = "either" version = "1.9.0" @@ -1126,19 +1017,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" dependencies = [ "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 1.0.109", - "synstructure", ] [[package]] @@ -1165,7 +1043,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall 0.2.10", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1207,37 +1085,9 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ - "percent-encoding 2.3.0", + "percent-encoding", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags 1.3.2", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.28" @@ -1269,16 +1119,6 @@ version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" -[[package]] -name = "futures-cpupool" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -dependencies = [ - "futures 0.1.31", - "num_cpus", -] - [[package]] name = "futures-executor" version = "0.3.28" @@ -1421,7 +1261,7 @@ dependencies = [ "log", "openssl-probe", "openssl-sys", - "url 2.4.0", + "url", ] [[package]] @@ -1454,39 +1294,21 @@ dependencies = [ "walkdir", ] -[[package]] -name = "h2" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -dependencies = [ - "byteorder", - "bytes 0.4.12", - "fnv", - "futures 0.1.31", - "http 0.1.21", - "indexmap 1.7.0", - "log", - "slab", - "string", - "tokio-io", -] - [[package]] name = "h2" version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ - "bytes 1.4.0", + "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.9", + "http", "indexmap 1.7.0", "slab", - "tokio 1.29.1", + "tokio", "tokio-util", "tracing", ] @@ -1564,18 +1386,7 @@ checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" dependencies = [ "libc", "match_cfg", - "winapi 0.3.9", -] - -[[package]] -name = "http" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" -dependencies = [ - "bytes 0.4.12", - "fnv", - "itoa 0.4.7", + "winapi", ] [[package]] @@ -1584,31 +1395,19 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.4.0", + "bytes", "fnv", "itoa 1.0.9", ] -[[package]] -name = "http-body" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "http 0.1.21", - "tokio-buf", -] - [[package]] name = "http-body" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.4.0", - "http 0.2.9", + "bytes", + "http", "pin-project-lite", ] @@ -1645,58 +1444,28 @@ dependencies = [ "quick-error", ] -[[package]] -name = "hyper" -version = "0.12.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c843caf6296fc1f93444735205af9ed4e109a539005abb2564ae1d6fad34c52" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "futures-cpupool", - "h2 0.1.26", - "http 0.1.21", - "http-body 0.1.0", - "httparse", - "iovec", - "itoa 0.4.7", - "log", - "net2", - "rustc_version", - "time 0.1.44", - "tokio 0.1.22", - "tokio-buf", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", - "want 0.2.0", -] - [[package]] name = "hyper" version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.4.0", + "bytes", "futures-channel", "futures-core", "futures-util", - "h2 0.3.20", - "http 0.2.9", - "http-body 0.4.5", + "h2", + "http", + "http-body", "httparse", "httpdate", "itoa 1.0.9", "pin-project-lite", "socket2", - "tokio 1.29.1", + "tokio", "tower-service", "tracing", - "want 0.3.0", + "want", ] [[package]] @@ -1706,12 +1475,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", - "http 0.2.9", - "hyper 0.14.27", + "http", + "hyper", "log", "rustls", "rustls-native-certs", - "tokio 1.29.1", + "tokio", "tokio-rustls", ] @@ -1721,35 +1490,22 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper 0.14.27", + "hyper", "pin-project-lite", - "tokio 1.29.1", + "tokio", "tokio-io-timeout", ] -[[package]] -name = "hyper-tls" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "hyper 0.12.36", - "native-tls", - "tokio-io", -] - [[package]] name = "hyper-tls" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.4.0", - "hyper 0.14.27", + "bytes", + "hyper", "native-tls", - "tokio 1.29.1", + "tokio", "tokio-native-tls", ] @@ -1759,28 +1515,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.3.0" @@ -1807,7 +1541,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" dependencies = [ - "crossbeam-utils 0.8.5", + "crossbeam-utils", "globset", "lazy_static", "log", @@ -1825,7 +1559,7 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ - "autocfg 1.1.0", + "autocfg", "hashbrown 0.11.2", "serde", ] @@ -1855,15 +1589,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "ipnet" version = "2.3.1" @@ -1931,16 +1656,6 @@ dependencies = [ "simple_asn1", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "keyring" version = "1.1.2" @@ -1950,7 +1665,7 @@ dependencies = [ "byteorder", "secret-service", "security-framework", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1971,7 +1686,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2df7f9fd9f64cf8f59e1a4a0753fe7d575a5b38d3d7ac5758dcee9357d83ef0a" dependencies = [ - "bytes 1.4.0", + "bytes", "nom", ] @@ -1982,21 +1697,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dceb52eac140c8679326f619b963577ccf5a4ab025fe5e6db424d2fd3e4f400" dependencies = [ "async-trait", - "bytes 1.4.0", - "futures 0.3.28", + "bytes", + "futures", "futures-util", "lazy_static", "lber", "log", "native-tls", "nom", - "percent-encoding 2.3.0", + "percent-encoding", "thiserror", - "tokio 1.29.1", + "tokio", "tokio-native-tls", "tokio-stream", "tokio-util", - "url 2.4.0", + "url", ] [[package]] @@ -2019,7 +1734,7 @@ dependencies = [ "once_cell", "quoted_printable", "socket2", - "tokio 1.29.1", + "tokio", ] [[package]] @@ -2083,22 +1798,13 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] - [[package]] name = "lock_api" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ - "autocfg 1.1.0", + "autocfg", "scopeguard", ] @@ -2120,18 +1826,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "md-5" version = "0.9.1" @@ -2149,22 +1843,13 @@ version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "memoffset" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] @@ -2173,16 +1858,6 @@ version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2196,26 +1871,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", - "autocfg 1.1.0", -] - -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", + "autocfg", ] [[package]] @@ -2229,18 +1885,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - [[package]] name = "native-tls" version = "0.2.11" @@ -2269,17 +1913,6 @@ dependencies = [ "socket2", ] -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "nix" version = "0.17.0" @@ -2309,7 +1942,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a9da8c9922c35a1033d76f7272dfc2e7ee20392083d75aeea6ced23c6266578" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2332,7 +1965,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-integer", "num-traits", ] @@ -2343,7 +1976,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e0d047c1062aa51e256408c560894e5251f08925980e53cf1aa5bd00eec6512" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-integer", "num-traits", "serde", @@ -2364,7 +1997,7 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-traits", ] @@ -2374,7 +2007,7 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-integer", "num-traits", ] @@ -2385,7 +2018,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-bigint 0.3.2", "num-integer", "num-traits", @@ -2397,7 +2030,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] @@ -2425,32 +2058,32 @@ dependencies = [ "arc-swap", "async-trait", "base64 0.21.2", - "bytes 1.4.0", + "bytes", "cfg-if 1.0.0", "chrono", "either", - "futures 0.3.28", + "futures", "futures-util", - "http 0.2.9", - "http-body 0.4.5", - "hyper 0.14.27", + "http", + "http-body", + "hyper", "hyper-rustls", "hyper-timeout", "jsonwebtoken", "once_cell", - "percent-encoding 2.3.0", + "percent-encoding", "pin-project", "secrecy", "serde", "serde_json", "serde_path_to_error", - "serde_urlencoded 0.7.1", + "serde_urlencoded", "snafu", - "tokio 1.29.1", + "tokio", "tower", "tower-http", "tracing", - "url 2.4.0", + "url", ] [[package]] @@ -2537,7 +2170,7 @@ version = "0.9.65" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a7907e3bfa08bb85105209cdfcb6c63d109f8f6c1ed6ca318fff5c1853fbc1d" dependencies = [ - "autocfg 1.1.0", + "autocfg", "cc", "libc", "openssl-src", @@ -2566,7 +2199,6 @@ dependencies = [ "dirs 2.0.2", "enum-utils", "eval", - "futures 0.3.28", "indexmap 1.7.0", "lazy_static", "md-5", @@ -2583,7 +2215,6 @@ dependencies = [ "phf", "pyo3", "regex", - "reqwest 0.11.4", "semver 1.0.4", "serde", "serde-pickle", @@ -2595,7 +2226,7 @@ dependencies = [ "tera", "termcolor", "time 0.1.44", - "tokio 1.29.1", + "tokio", "toml", "wait-timeout", "walkdir", @@ -2624,6 +2255,7 @@ dependencies = [ "email_address", "enum-display-derive", "enum-utils", + "futures", "git2", "glob", "indexmap 1.7.0", @@ -2639,7 +2271,7 @@ dependencies = [ "pyo3", "rand 0.8.4", "regex", - "reqwest 0.11.4", + "reqwest", "rpassword", "semver 1.0.4", "serde", @@ -2668,40 +2300,14 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.2", - "rustc_version", -] - [[package]] name = "parking_lot" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api 0.4.10", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "rustc_version", - "smallvec 0.6.14", - "winapi 0.3.9", + "lock_api", + "parking_lot_core", ] [[package]] @@ -2713,7 +2319,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall 0.3.5", - "smallvec 1.6.1", + "smallvec", "windows-targets", ] @@ -2759,12 +2365,6 @@ dependencies = [ "base64 0.13.0", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "percent-encoding" version = "2.3.0" @@ -2920,7 +2520,7 @@ dependencies = [ "libc", "log", "wepoll-ffi", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3016,7 +2616,7 @@ version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] @@ -3028,16 +2628,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "publicsuffix" -version = "1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4ce31ff0a27d93c8de1849cf58162283752f065a90d508f1105fa6c9a213f" -dependencies = [ - "idna 0.2.3", - "url 2.4.0", -] - [[package]] name = "pyo3" version = "0.19.1" @@ -3047,8 +2637,8 @@ dependencies = [ "cfg-if 1.0.0", "indoc", "libc", - "memoffset 0.9.0", - "parking_lot 0.12.1", + "memoffset", + "parking_lot", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", @@ -3128,25 +2718,6 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3866219251662ec3b26fc217e3e05bf9c4f84325234dfb96bf0bf840889e49" -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg 0.1.2", - "rand_xorshift", - "winapi 0.3.9", -] - [[package]] name = "rand" version = "0.7.3" @@ -3158,7 +2729,7 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc 0.2.0", - "rand_pcg 0.2.1", + "rand_pcg", ] [[package]] @@ -3173,16 +2744,6 @@ dependencies = [ "rand_hc 0.3.1", ] -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", -] - [[package]] name = "rand_chacha" version = "0.2.2" @@ -3203,21 +2764,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" @@ -3236,15 +2782,6 @@ dependencies = [ "getrandom 0.2.11", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -3263,50 +2800,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.9", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - [[package]] name = "rand_pcg" version = "0.2.1" @@ -3316,24 +2809,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "redox_syscall" version = "0.1.57" @@ -3402,41 +2877,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "reqwest" -version = "0.9.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88643aea3c1343c804950d7bf983bd2067f5ab59db6d613a08e05572f2714ab" -dependencies = [ - "base64 0.10.1", - "bytes 0.4.12", - "cookie", - "cookie_store", - "encoding_rs", - "flate2", - "futures 0.1.31", - "http 0.1.21", - "hyper 0.12.36", - "hyper-tls 0.3.2", - "log", - "mime", - "mime_guess", - "native-tls", - "serde", - "serde_json", - "serde_urlencoded 0.5.5", - "time 0.1.44", - "tokio 0.1.22", - "tokio-executor", - "tokio-io", - "tokio-threadpool", - "tokio-timer", - "url 1.7.2", - "uuid", - "winreg 0.6.2", + "winapi", ] [[package]] @@ -3446,32 +2887,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" dependencies = [ "base64 0.13.0", - "bytes 1.4.0", + "bytes", "encoding_rs", "futures-core", "futures-util", - "http 0.2.9", - "http-body 0.4.5", - "hyper 0.14.27", - "hyper-tls 0.5.0", + "http", + "http-body", + "hyper", + "hyper-tls", "ipnet", "js-sys", "lazy_static", "log", "mime", "native-tls", - "percent-encoding 2.3.0", + "percent-encoding", "pin-project-lite", "serde", "serde_json", - "serde_urlencoded 0.7.1", - "tokio 1.29.1", + "serde_urlencoded", + "tokio", "tokio-native-tls", - "url 2.4.0", + "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg 0.7.0", + "winreg", ] [[package]] @@ -3486,7 +2927,7 @@ dependencies = [ "spin", "untrusted", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3507,7 +2948,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3519,7 +2960,7 @@ dependencies = [ "base64 0.13.0", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.8.5", + "crossbeam-utils", ] [[package]] @@ -3538,15 +2979,6 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dead70b0b5e03e9c814bcb6b01e03e68f7c57a80aa48c72ec92152ab3e818d49" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - [[package]] name = "rustls" version = "0.21.5" @@ -3618,7 +3050,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ "lazy_static", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3794,18 +3226,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "serde_urlencoded" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" -dependencies = [ - "dtoa", - "itoa 0.4.7", - "serde", - "url 1.7.2", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3906,15 +3326,6 @@ dependencies = [ "deunicode", ] -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", -] - [[package]] name = "smallvec" version = "1.6.1" @@ -3951,7 +3362,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3966,15 +3377,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -dependencies = [ - "bytes 0.4.12", -] - [[package]] name = "strsim" version = "0.7.0" @@ -4052,7 +3454,7 @@ checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ "proc-macro2 0.4.30", "quote 0.6.13", - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] @@ -4086,18 +3488,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "synstructure" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" -dependencies = [ - "proc-macro2 1.0.66", - "quote 1.0.32", - "syn 1.0.109", - "unicode-xid 0.2.2", -] - [[package]] name = "syntect" version = "3.2.0" @@ -4148,7 +3538,7 @@ dependencies = [ "rand 0.8.4", "redox_syscall 0.2.10", "remove_dir_all", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4162,7 +3552,7 @@ dependencies = [ "globwalk", "humansize", "lazy_static", - "percent-encoding 2.3.0", + "percent-encoding", "pest", "pest_derive", "rand 0.8.4", @@ -4189,7 +3579,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4253,7 +3643,7 @@ checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4299,38 +3689,19 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "mio 0.6.23", - "num_cpus", - "tokio-current-thread", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", -] - [[package]] name = "tokio" version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ - "autocfg 1.1.0", + "autocfg", "backtrace", - "bytes 1.4.0", + "bytes", "libc", - "mio 0.8.8", + "mio", "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -4338,48 +3709,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -dependencies = [ - "bytes 0.4.12", - "either", - "futures 0.1.31", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures 0.1.31", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "log", -] - [[package]] name = "tokio-io-timeout" version = "1.2.0" @@ -4387,7 +3716,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ "pin-project-lite", - "tokio 1.29.1", + "tokio", ] [[package]] @@ -4408,26 +3737,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ "native-tls", - "tokio 1.29.1", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "lazy_static", - "log", - "mio 0.6.23", - "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", + "tokio", ] [[package]] @@ -4437,7 +3747,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", - "tokio 1.29.1", + "tokio", ] [[package]] @@ -4448,60 +3758,7 @@ checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", - "tokio 1.29.1", -] - -[[package]] -name = "tokio-sync" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" -dependencies = [ - "fnv", - "futures 0.1.31", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" -dependencies = [ - "bytes 0.4.12", - "futures 0.1.31", - "iovec", - "mio 0.6.23", - "tokio-io", - "tokio-reactor", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" -dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "lazy_static", - "log", - "num_cpus", - "slab", - "tokio-executor", -] - -[[package]] -name = "tokio-timer" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures 0.1.31", - "slab", - "tokio-executor", + "tokio", ] [[package]] @@ -4510,11 +3767,11 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes 1.4.0", + "bytes", "futures-core", "futures-sink", "pin-project-lite", - "tokio 1.29.1", + "tokio", "tracing", ] @@ -4567,7 +3824,7 @@ dependencies = [ "futures-util", "pin-project", "pin-project-lite", - "tokio 1.29.1", + "tokio", "tokio-util", "tower-layer", "tower-service", @@ -4581,11 +3838,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ "bitflags 2.3.3", - "bytes 1.4.0", + "bytes", "futures-core", "futures-util", - "http 0.2.9", - "http-body 0.4.5", + "http", + "http-body", "http-range-header", "pin-project-lite", "tower-layer", @@ -4644,15 +3901,6 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" -[[package]] -name = "try_from" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" -dependencies = [ - "cfg-if 0.1.10", -] - [[package]] name = "typenum" version = "1.13.0" @@ -4715,15 +3963,6 @@ dependencies = [ "unic-common", ] -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.13" @@ -4763,12 +4002,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - [[package]] name = "unindent" version = "0.1.7" @@ -4791,17 +4024,6 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.4.0" @@ -4810,19 +4032,10 @@ checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna 0.4.0", - "percent-encoding 2.3.0", + "percent-encoding", "serde", ] -[[package]] -name = "uuid" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -dependencies = [ - "rand 0.6.5", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -4869,21 +4082,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", - "winapi 0.3.9", + "winapi", "winapi-util", ] -[[package]] -name = "want" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -dependencies = [ - "futures 0.1.31", - "log", - "try-lock", -] - [[package]] name = "want" version = "0.3.0" @@ -5015,12 +4217,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -5031,12 +4227,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -5049,7 +4239,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -5133,32 +4323,13 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi 0.3.9", -] - [[package]] name = "winreg" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", + "winapi", ] [[package]] @@ -5196,7 +4367,7 @@ dependencies = [ "derivative", "enumflags2", "fastrand", - "futures 0.3.28", + "futures", "nb-connect", "nix", "once_cell", diff --git a/rust/origen/Cargo.toml b/rust/origen/Cargo.toml index 0f01e61b..59c29778 100644 --- a/rust/origen/Cargo.toml +++ b/rust/origen/Cargo.toml @@ -61,9 +61,7 @@ md-5 = "0.9" normpath = "0.2.0" cfg-if = "1" wait-timeout = "0.2.0" -futures = {version = "0.3.15", features = ["executor"]} tokio = {version = "1.29", features = ["full"] } -reqwest = {version = "0.11.3", features = ["blocking", "json"]} [build-dependencies] built = "0.5.2" diff --git a/rust/origen/cli/src/commands/develop_origen/mod.rs b/rust/origen/cli/src/commands/develop_origen/mod.rs index 8e40e60c..32bc3073 100644 --- a/rust/origen/cli/src/commands/develop_origen/mod.rs +++ b/rust/origen/cli/src/commands/develop_origen/mod.rs @@ -3,16 +3,23 @@ mod fmt; mod update_supported_python; mod publish; -use origen::Result; +use origen::{Result, STATUS}; use super::_prelude::*; pub const BASE_CMD: &'static str = "develop_origen"; +use std::path::PathBuf; + lazy_static! { static ref GH_OWNER: &'static str = "Origen-SDK"; static ref GH_REPO: &'static str = "o2"; static ref PUBLISH_BRANCH: &'static str = "master"; static ref PUBLISH_WORKFLOW: &'static str = "publish.yml"; static ref ORIGEN_OM_REQ_PATH: [&'static str; 4] = ["tool", "poetry", "dependencies", "origen_metal"]; + static ref OM_PYPI_PKG_NAME: &'static str = "origen-metal"; + static ref ORIGEN_PYPI_PKG_NAME: &'static str = "origen"; + static ref OM_PYPROJECT_PATH: PathBuf = STATUS.origen_wksp_root.join("python").join("origen_metal").join("pyproject.toml"); + static ref ORIGEN_PYPROJECT_PATH: PathBuf = STATUS.origen_wksp_root.join("python").join("origen").join("pyproject.toml"); + static ref CLI_TOML_LOC: PathBuf = STATUS.origen_wksp_root.join("rust").join("origen").join("cli").join("cargo.toml"); } gen_core_cmd_funcs__no_exts__no_app_opts!( diff --git a/rust/origen/cli/src/commands/develop_origen/publish.rs b/rust/origen/cli/src/commands/develop_origen/publish.rs index e798a581..83f814f3 100644 --- a/rust/origen/cli/src/commands/develop_origen/publish.rs +++ b/rust/origen/cli/src/commands/develop_origen/publish.rs @@ -5,9 +5,11 @@ use origen::utility::github::{dispatch_workflow, get_latest_workflow_dispatch, g use origen_metal::utils::terminal::confirm_with_user; use origen_metal::utils::revision_control::RevisionControlAPI; use std::process::exit; -use origen_metal::utils::terminal::{redln, greenln}; +use origen_metal::utils::terminal::{redln, greenln, yellowln}; use std::thread; use std::time::Duration; +use super::{OM_PYPI_PKG_NAME, ORIGEN_PYPI_PKG_NAME}; +use origen_metal::utils::pypi::{is_package_version_available, is_package_version_available_on_test_server}; pub const BASE_CMD: &'static str = "publish"; @@ -58,7 +60,7 @@ pub (crate) fn publish_cmd<'a>() -> SubCmd<'a> { .arg( Arg::new("no_pypi_release") .long("no_pypi_release") - .action(SetArgFalse) + .action(SetArgTrue) .help("Do NOT release to pypi, even if Origen or OM versions are updated") ) .arg( @@ -80,13 +82,22 @@ pub (crate) fn publish_cmd<'a>() -> SubCmd<'a> { .arg( Arg::new("version_update_only") .long("version_update_only") + .visible_alias("version-update-only") .visible_alias("versions_only") + .visible_alias("versions-only") .action(SetArgTrue) .help("Only updates the version files. Does not check in or launch publishing action.") .conflicts_with("release_to_pypi_test") .conflicts_with("no_pypi_release") .conflicts_with("github_release") ) + .arg( + Arg::new("allow_local_changes") + .long("allow_local_changes") + .alias("allow-local-changes") + .action(SetArgTrue) + .help("Allow publishing even with local changes") + ) }}, core_subcmd__no_exts__no_app_opts!( "monitor", @@ -151,13 +162,16 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { greenln("On master branch with attached HEAD"); } - // TODO PublishO2 // Ensure no local changes let status = git.status(None)?; - if status.is_modified() { - status.summarize(); - redln("Changes found in workspace. Please check in your changes or stash them before rerunning"); - break 'checks Ok(false); + status.summarize(); + if *invocation.get_one::("allow_local_changes").unwrap() { + yellowln("Allowing releases with local changes..."); + } else { + if status.is_modified() { + redln("Changes found in workspace. Please check in your changes or stash them before rerunning"); + break 'checks Ok(false); + } } // Ensure up-to-date with remote @@ -171,13 +185,9 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { // TODO PublishO2 Ensure a regression test passed with this commit // Get current versions - // TODO PublishO2 Cleanup - move paths to shared location - let om_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen_metal").join("pyproject.toml"); - let origen_pyproject_path = STATUS.origen_wksp_root.join("python").join("origen").join("pyproject.toml"); - let cli_toml_loc = STATUS.origen_wksp_root.join("rust").join("origen").join("cli").join("cargo.toml"); - let mut py_om_ver = Version::from_pyproject_with_toml_handle(om_pyproject_path)?; - let mut py_origen_ver = Version::from_pyproject_with_toml_handle(origen_pyproject_path)?; - let mut cli_ver = Version::from_cargo_with_toml_handle(cli_toml_loc)?; + let mut py_om_ver = Version::from_pyproject_with_toml_handle(super::OM_PYPROJECT_PATH.clone())?; + let mut py_origen_ver = Version::from_pyproject_with_toml_handle(super::ORIGEN_PYPROJECT_PATH.clone())?; + let mut cli_ver = Version::from_cargo_with_toml_handle(super::CLI_TOML_LOC.clone())?; // Extract release types fn extract_release(invoc: &clap::ArgMatches, cli_name: &str, ver: &mut VersionWithTOML) -> Result { @@ -233,14 +243,84 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { if let Some(new) = new_req.as_ref() { let old_req = py_origen_ver.get_other(&*super::ORIGEN_OM_REQ_PATH)?.to_string(); displayln!("Origen's OM requirement: Updating to '{}' (from '{}')", new, old_req); + + // A new Origen version would be pushed, but no Origen version increment was found. + if !release_py_origen { + yellowln("Origen's OM version requirement would be updated but no Origen release was indicated"); + if !confirm_with_user(Some("Proceed without an Origen release?"))? { + displayln!("Exiting without sending release request..."); + break 'checks Ok(false); + } + } } else { displayln!("Origen's OM requirement: No update to Origen's OM minimum version"); } + + // Check if the CLI was updated, but no Origen version update. + if !release_py_origen && update_cli { + yellowln("The CLI was updated but no Origen release was indicated"); + if !confirm_with_user(Some("Proceed without an Origen release?"))? { + displayln!("Exiting without sending release request..."); + break 'checks Ok(false); + } + } + if !confirm_with_user(Some("Proceed with release?"))? { displayln!("Exiting without sending release request..."); break 'checks Ok(false); } + // Ensure the proposed versions are available to release + // let release_to_pypi = (!invocation.get_one::("no_pypi_release").unwrap() || invocation.get_one::("force_pypi_release").unwrap()) && (update_origen_package || update_om_package); + let release_to_pypi = (!invocation.get_one::("no_pypi_release").unwrap()) && (release_py_origen || release_py_om); + let release_to_pypi_test = *invocation.get_one::("release_to_pypi_test").unwrap() && (release_py_origen || release_py_om); + if release_to_pypi && release_py_om { + displayln!("Checking that OM version '{}' is available...", py_om_ver.version()); + if !is_package_version_available(*OM_PYPI_PKG_NAME, py_om_ver.version().to_string())? { + redln(&format!( + "Version '{}' is already in use for PyPi package '{}'. Cannot release duplicate version.", + py_om_ver.version(), + *OM_PYPI_PKG_NAME + )); + break 'checks Ok(false); + } + greenln(&format!("Version '{}' is available!", py_om_ver.version())); + } + if release_to_pypi_test && release_py_om { + displayln!("Checking that OM version '{}' is available on the test server...", py_om_ver.version()); + if !is_package_version_available_on_test_server(*OM_PYPI_PKG_NAME, py_om_ver.version().to_string())? { + redln(&format!( + "Version '{}' is already in use for PyPi test server package '{}'. Cannot release duplicate version.", + py_om_ver.version(), + *OM_PYPI_PKG_NAME + )); + } + greenln(&format!("Version '{}' is available on the test server!", py_om_ver.version())); + } + if release_to_pypi && release_py_origen { + displayln!("Checking that Origen version '{}' is available...", py_origen_ver.version()); + if !is_package_version_available(*ORIGEN_PYPI_PKG_NAME, py_origen_ver.version().to_string())? { + redln(&format!( + "Version '{}' is already in use for PyPi package '{}'. Cannot release duplicate version.", + py_origen_ver.version(), + *ORIGEN_PYPI_PKG_NAME + )); + break 'checks Ok(false); + } + greenln(&format!("Version '{}' is available!", py_origen_ver.version())); + } + if release_to_pypi_test && release_py_origen { + displayln!("Checking that Origen version '{}' is available on the test server...", py_origen_ver.version()); + if !is_package_version_available_on_test_server(*ORIGEN_PYPI_PKG_NAME, py_origen_ver.version().to_string())? { + redln(&format!( + "Version '{}' is already in use for PyPi test server package '{}'. Cannot release duplicate version.", + py_origen_ver.version(), + *ORIGEN_PYPI_PKG_NAME + )); + } + greenln(&format!("Version '{}' is available on the test server!", py_origen_ver.version())); + } + // Update the TOMLs // Make sure all versions updated successfully before any checking in fn update_toml(should_update: bool, ver: &mut VersionWithTOML) -> Result<()> { @@ -256,6 +336,7 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { py_origen_ver.set_other(&*super::ORIGEN_OM_REQ_PATH, new)?; } update_toml(update_origen_package, &mut py_origen_ver)?; + update_toml(update_cli, &mut cli_ver)?; if *invocation.get_one::("version_update_only").unwrap() { displayln!("Stopping release after version update..."); @@ -286,22 +367,24 @@ pub(crate) fn run(invocation: &clap::ArgMatches) -> Result<()> { // Send Github actions request to build and release let mut inputs = indexmap::IndexMap::new(); - inputs.insert("origen_metal_python_package", update_om_package.to_string()); - inputs.insert("origen_python_package", update_origen_package.to_string()); - inputs.insert("publish_pypi", (!invocation.get_one::("no_pypi_release").unwrap() && (update_origen_package || update_om_package)).to_string()); + inputs.insert("origen_metal_python_package", release_py_om.to_string()); + inputs.insert("origen_python_package", release_py_origen.to_string()); + inputs.insert("publish_pypi", release_to_pypi.to_string()); inputs.insert("publish_pypi_test", invocation.get_one::("release_to_pypi_test").unwrap().to_string()); inputs.insert("publish_github_release", invocation.get_one::("github_release").unwrap().to_string()); - displayln!("Sending request to GitHub Actions to build and release..."); + displayln!("Request GitHub Actions to build and release with..."); for (k, v) in &inputs { displayln!(" {}: {}", k, v); } + if !confirm_with_user(Some("Send publish workflow request?"))? { + displayln!("Exiting without sending release request..."); + break 'checks Ok(false); + } dispatch_workflow(*super::GH_OWNER, *super::GH_REPO, *super::PUBLISH_WORKFLOW, *super::PUBLISH_BRANCH, Some(inputs))?; Ok::(true) } { Ok(publishing) => { - redln("Automation is incomplete"); - // Unlock branch unlock_publish_branch(true)?; if publishing { diff --git a/rust/origen/src/utility/github.rs b/rust/origen/src/utility/github.rs index 8b0fe56f..00796fb2 100644 --- a/rust/origen/src/utility/github.rs +++ b/rust/origen/src/utility/github.rs @@ -1,4 +1,4 @@ -use origen_metal::{Result, Outcome, octocrab}; +use origen_metal::{Result, Outcome, octocrab, futures}; use std::collections::HashMap; pub fn with_blocking_calls(mut f: F) -> Result diff --git a/rust/origen_metal/Cargo.toml b/rust/origen_metal/Cargo.toml index 656b8792..b254708a 100644 --- a/rust/origen_metal/Cargo.toml +++ b/rust/origen_metal/Cargo.toml @@ -47,6 +47,7 @@ num-traits = "0.2.15" serde_json = "1.0" octocrab = "0.28.0" reqwest = {version = "0.11.3", features = ["blocking", "json"]} +futures = {version = "0.3.15", features = ["executor"]} lettre = {version = "=0.10.4", features = ["builder"]} aes-gcm = "0.8" semver = "1.0.1" diff --git a/rust/origen_metal/src/lib.rs b/rust/origen_metal/src/lib.rs index ef001c06..f15c83bd 100644 --- a/rust/origen_metal/src/lib.rs +++ b/rust/origen_metal/src/lib.rs @@ -7,6 +7,9 @@ pub extern crate octocrab; pub extern crate tera; pub extern crate toml_edit; pub extern crate dialoguer; +pub extern crate reqwest; +pub extern crate futures; +pub extern crate serde_json; #[macro_use] extern crate serde; #[macro_use] diff --git a/rust/origen_metal/src/utils/mod.rs b/rust/origen_metal/src/utils/mod.rs index fc79b1b5..5e29da73 100644 --- a/rust/origen_metal/src/utils/mod.rs +++ b/rust/origen_metal/src/utils/mod.rs @@ -10,4 +10,5 @@ pub mod outcome; pub mod revision_control; pub mod terminal; pub mod mailer; -pub mod version; \ No newline at end of file +pub mod version; +pub mod pypi; \ No newline at end of file diff --git a/rust/origen_metal/src/utils/pypi.rs b/rust/origen_metal/src/utils/pypi.rs new file mode 100644 index 00000000..138a1fe3 --- /dev/null +++ b/rust/origen_metal/src/utils/pypi.rs @@ -0,0 +1,48 @@ +/// Wrappers around the PyPi JSON API instead of pip +/// https://warehouse.pypa.io/api-reference/json.html + +use crate::Result; + +lazy_static! { + pub static ref PYPI_URL_BASE: &'static str = "https://pypi.org"; + pub static ref PYPI_TEST_URL_BASE: &'static str = "https://test.pypi.org"; +} + +pub fn get_package_details>(package_name: S) -> Result { + get_package_details_from(package_name, *PYPI_URL_BASE) +} + +pub fn get_package_details_from_test_server>(package_name: S) -> Result { + get_package_details_from(package_name, *PYPI_TEST_URL_BASE) +} + +pub fn get_package_details_from, S2: AsRef>(package_name: S1, url: S2) -> Result +{ + let url = format!("{}/pypi/{}/json", url.as_ref(), package_name.as_ref()); + let response = reqwest::blocking::get(&url)?; + Ok(response.json::()?) +} + +pub fn get_package_versions>(package_name: S) -> Result> { + get_package_versions_from(package_name, *PYPI_URL_BASE) +} + +pub fn get_package_versions_from_test_server>(package_name: S) -> Result> { + get_package_versions_from(package_name, *PYPI_TEST_URL_BASE) +} + +pub fn get_package_versions_from, S2: AsRef>(package_name: S1, url: S2) -> Result> { + let res = get_package_details_from(package_name.as_ref(), url)?; + let versions = res["releases"].as_object().unwrap().keys().map( |k| k.to_string()).collect::>(); + Ok(versions) +} + +pub fn is_package_version_available, S2: AsRef>(package_name: S1, version: S2) -> Result { + let pkgs = get_package_versions(package_name)?; + Ok(pkgs.iter().find(|v| v == &version.as_ref()).is_none()) +} + +pub fn is_package_version_available_on_test_server, S2: AsRef>(package_name: S1, version: S2) -> Result { + let pkgs = get_package_versions_from_test_server(package_name)?; + Ok(pkgs.iter().find(|v| v == &version.as_ref()).is_none()) +} diff --git a/rust/origen_metal/src/utils/version.rs b/rust/origen_metal/src/utils/version.rs index a967e04a..2b3ea53a 100644 --- a/rust/origen_metal/src/utils/version.rs +++ b/rust/origen_metal/src/utils/version.rs @@ -69,6 +69,16 @@ impl Version { Self::new(ver, VersionSpec::Pep440) } + // TODO: Tests + pub fn convert_to_pep440(&mut self) { + self.spec = VersionSpec::Pep440; + } + + // TODO: Tests + pub fn convert_to_semver(&mut self) { + self.spec = VersionSpec::Semver; + } + fn split_prerelease(pre: &str) -> Result<(&str, usize)> { match pre.find(|c: char| c.is_digit(10)) { Some(i) => { @@ -376,7 +386,9 @@ impl Version { } pub fn from_cargo_with_toml_handle(cargo_toml: PathBuf) -> Result { - VersionWithTOML::new(cargo_toml, &*CARGO_PATH) + let mut ver = VersionWithTOML::new(cargo_toml, &*CARGO_PATH)?; + ver.convert_to_semver(); + Ok(ver) } pub fn to_pep440(&self) -> Result { @@ -571,6 +583,22 @@ impl VersionWithTOML { &self.source } + // TODO: Tests + pub fn convert_to_pep440(&mut self) { + self.orig_version.convert_to_pep440(); + if let Some(v) = &mut self.new_version { + v.convert_to_pep440(); + } + } + + // TODO: Tests + pub fn convert_to_semver(&mut self) { + self.orig_version.convert_to_semver(); + if let Some(v) = &mut self.new_version { + v.convert_to_semver(); + } + } + pub fn version(&self) -> &Version { if let Some(v) = self.new_version.as_ref() { v diff --git a/rust/pyapi/Cargo.lock b/rust/pyapi/Cargo.lock index 200605ba..97e076c1 100644 --- a/rust/pyapi/Cargo.lock +++ b/rust/pyapi/Cargo.lock @@ -2195,7 +2195,6 @@ dependencies = [ "dirs 2.0.2", "enum-utils", "eval", - "futures", "indexmap 1.7.0", "lazy_static", "md-5", @@ -2212,7 +2211,6 @@ dependencies = [ "phf", "pyo3", "regex", - "reqwest", "semver 1.0.4", "serde", "serde-pickle", @@ -2253,6 +2251,7 @@ dependencies = [ "email_address", "enum-display-derive", "enum-utils", + "futures", "git2", "glob", "indexmap 1.7.0", From f24848b92b775d0b0c105fac5b04d99a8d35e12a Mon Sep 17 00:00:00 2001 From: corey Date: Sun, 17 Mar 2024 21:15:01 -0500 Subject: [PATCH 198/200] Try regression fix. Add additional version support. Add some version tests on python side. --- .../origen_metal/utils/version.py | 2 + .../origen_metal/tests/utils/test_version.py | 35 ++++++++++++++++-- rust/origen_metal/src/utils/version.rs | 37 +++++++++++-------- rust/pyapi_metal/Cargo.lock | 1 + rust/pyapi_metal/src/utils/version.rs | 28 ++++++++++++++ .../cli/assertions.py | 2 +- 6 files changed, 84 insertions(+), 21 deletions(-) diff --git a/python/origen_metal/origen_metal/utils/version.py b/python/origen_metal/origen_metal/utils/version.py index bedd8a53..793611ef 100644 --- a/python/origen_metal/origen_metal/utils/version.py +++ b/python/origen_metal/origen_metal/utils/version.py @@ -2,3 +2,5 @@ Version = _origen_metal.utils.Version from_pyproject = _origen_metal.utils.Version.from_pyproject from_cargo = _origen_metal.utils.Version.from_cargo +pep440 = _origen_metal.utils.Version.pep440 +semver = _origen_metal.utils.Version.semver \ No newline at end of file diff --git a/python/origen_metal/tests/utils/test_version.py b/python/origen_metal/tests/utils/test_version.py index 5cec59fc..1a538bc5 100644 --- a/python/origen_metal/tests/utils/test_version.py +++ b/python/origen_metal/tests/utils/test_version.py @@ -2,7 +2,7 @@ import pytest from origen_metal._helpers import pip_show from origen_metal.utils import version -from origen_metal.utils.version import Version +from origen_metal.utils.version import Version, semver, pep440 from pathlib import Path from tests import test_dir @@ -14,12 +14,29 @@ class TestVersion: pyproject_path = test_dir.parent.joinpath("pyproject.toml") cargo_path = test_dir.parent.parent.parent.joinpath("rust/pyapi_metal/Cargo.toml") + pep440_str = "1.2.3.dev4" + semver_str = "1.2.3-dev.4" def test_version_form_string(self): - v = "1.2.3.dev4" - ver = Version(v) + ver = Version(self.pep440_str) assert isinstance(ver, Version) - assert str(ver) == v + assert str(ver) == self.pep440_str + + def test_version_as_pep440_is_default(self): + ver = Version(self.semver_str) + assert str(ver) == self.pep440_str + + def test_pep440_from_string(self): + ver = pep440(self.pep440_str) + assert str(ver) == self.pep440_str + ver = pep440(self.semver_str) + assert str(ver) == self.pep440_str + + def test_semver_from_string(self): + ver = semver(self.pep440_str) + assert str(ver) == self.semver_str + ver = semver(self.semver_str) + assert str(ver) == self.semver_str def test_invalid_version_from_string(self): with pytest.raises(ValueError, match=r"unexpected character 'b' while parsing minor version number"): @@ -53,6 +70,16 @@ def test_invalid_cargo_path(self): f = "path/to/nowhere/cargo.toml" with pytest.raises(RuntimeError, match=f"Source file '{f}' does not exist!"): version.from_cargo(f) + + def test_to_semver_string(self): + ver = Version(self.pep440_str) + assert(str(ver)) == self.pep440_str + assert(ver.semver_str) == self.semver_str + + def test_to_pep440_string(self): + ver = semver(self.semver_str) + assert(str(ver)) == self.semver_str + assert(ver.pep440_str) == self.pep440_str _current_version = None def current_version(): diff --git a/rust/origen_metal/src/utils/version.rs b/rust/origen_metal/src/utils/version.rs index 2b3ea53a..fcef23c2 100644 --- a/rust/origen_metal/src/utils/version.rs +++ b/rust/origen_metal/src/utils/version.rs @@ -394,27 +394,32 @@ impl Version { pub fn to_pep440(&self) -> Result { Self::new_pep440(&self.to_string()) } + + pub fn to_pep440_string(&self) -> String { + let v = &self.semver; + if v.pre.is_empty() { + format!("{}.{}.{}", v.major, v.minor, v.patch) + } else { + format!( + "{}.{}.{}.{}", + v.major, + v.minor, + v.patch, + v.pre.replace(".", "") + ) + } + } + + pub fn to_semver_string(&self) -> String { + self.semver.to_string() + } } impl fmt::Display for Version { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self.spec { - VersionSpec::Semver => self.semver.fmt(f), - VersionSpec::Pep440 => { - let v = &self.semver; - if v.pre.is_empty() { - write!(f, "{}.{}.{}", v.major, v.minor, v.patch) - } else { - write!( - f, - "{}.{}.{}.{}", - v.major, - v.minor, - v.patch, - v.pre.replace(".", "") - ) - } - } + VersionSpec::Semver => write!(f, "{}", self.to_semver_string()), + VersionSpec::Pep440 => write!(f, "{}", self.to_pep440_string()), } } } diff --git a/rust/pyapi_metal/Cargo.lock b/rust/pyapi_metal/Cargo.lock index e44b3732..66263cbd 100644 --- a/rust/pyapi_metal/Cargo.lock +++ b/rust/pyapi_metal/Cargo.lock @@ -1728,6 +1728,7 @@ dependencies = [ "email_address", "enum-display-derive", "enum-utils", + "futures", "git2", "glob", "indexmap 1.8.1", diff --git a/rust/pyapi_metal/src/utils/version.rs b/rust/pyapi_metal/src/utils/version.rs index 64da3096..fa58e621 100644 --- a/rust/pyapi_metal/src/utils/version.rs +++ b/rust/pyapi_metal/src/utils/version.rs @@ -46,7 +46,35 @@ impl Version { }) } + #[classmethod] + fn pep440(_cls: &PyType, ver: &str) -> PyResult { + Ok( Self { + _origen_version: { + Self::coerce_error_type(OMVersion::new_pep440(ver))? + } + }) + } + + #[classmethod] + fn semver(_cls: &PyType, ver: &str) -> PyResult { + Ok( Self { + _origen_version: { + Self::coerce_error_type(OMVersion::new_semver(ver))? + } + }) + } + fn __str__(&self) -> PyResult { Ok(self._origen_version.to_string()) } + + #[getter] + fn pep440_str(&self) -> PyResult { + Ok(self._origen_version.to_pep440_string()) + } + + #[getter] + fn semver_str(&self) -> PyResult { + Ok(self._origen_version.to_semver_string()) + } } diff --git a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py index 8bce89b3..a4dd1518 100644 --- a/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py +++ b/test_apps/test_apps_shared_test_helpers/test_apps_shared_test_helpers/cli/assertions.py @@ -70,7 +70,7 @@ def assert_origen_v(cls, out, version=None, version_only=True, app=None, cli_ver '' ]) else: - cli_ver = from_cargo(rust_cli_toml) + cli_ver = from_cargo(rust_cli_toml).pep440_str s = "\n".join([ f"Origen: {v}", From 5c321a6068cebc5b695afb1a0f870348233a7ebb Mon Sep 17 00:00:00 2001 From: corey Date: Mon, 18 Mar 2024 20:58:34 -0500 Subject: [PATCH 199/200] Expose some more version features to frontend. Add tests. --- .../origen_metal/tests/utils/test_version.py | 28 +++++++++++++++ rust/origen_metal/Cargo.lock | 1 + rust/origen_metal/src/utils/version.rs | 36 +++++++++++++------ rust/pyapi_metal/src/utils/version.rs | 18 ++++++++++ 4 files changed, 73 insertions(+), 10 deletions(-) diff --git a/python/origen_metal/tests/utils/test_version.py b/python/origen_metal/tests/utils/test_version.py index 1a538bc5..f85ac5db 100644 --- a/python/origen_metal/tests/utils/test_version.py +++ b/python/origen_metal/tests/utils/test_version.py @@ -81,6 +81,34 @@ def test_to_pep440_string(self): assert(str(ver)) == self.semver_str assert(ver.pep440_str) == self.pep440_str + def test_switching_from_pep400_to_semver(self): + ver = pep440(self.pep440_str) + assert ver.is_pep440 is True + assert ver.is_semver is False + assert(str(ver)) == self.pep440_str + + assert ver.convert_to_pep440() is False + assert(str(ver)) == self.pep440_str + + assert ver.convert_to_semver() is True + assert ver.is_pep440 is False + assert ver.is_semver is True + assert(str(ver)) == self.semver_str + + def test_switching_from_semver_to_pep440(self): + ver = semver(self.semver_str) + assert ver.is_semver is True + assert ver.is_pep440 is False + assert(str(ver)) == self.semver_str + + assert ver.convert_to_semver() is False + assert(str(ver)) == self.semver_str + + assert ver.convert_to_pep440() is True + assert ver.is_semver is False + assert ver.is_pep440 is True + assert(str(ver)) == self.pep440_str + _current_version = None def current_version(): global _current_version diff --git a/rust/origen_metal/Cargo.lock b/rust/origen_metal/Cargo.lock index f37fa4cf..b196e89c 100644 --- a/rust/origen_metal/Cargo.lock +++ b/rust/origen_metal/Cargo.lock @@ -1697,6 +1697,7 @@ dependencies = [ "email_address", "enum-display-derive", "enum-utils", + "futures", "git2", "glob", "indexmap 1.8.1", diff --git a/rust/origen_metal/src/utils/version.rs b/rust/origen_metal/src/utils/version.rs index fcef23c2..b0492be1 100644 --- a/rust/origen_metal/src/utils/version.rs +++ b/rust/origen_metal/src/utils/version.rs @@ -69,14 +69,24 @@ impl Version { Self::new(ver, VersionSpec::Pep440) } - // TODO: Tests - pub fn convert_to_pep440(&mut self) { + pub fn is_pep440(&self) -> bool { + self.spec == VersionSpec::Pep440 + } + + pub fn is_semver(&self) -> bool { + self.spec == VersionSpec::Semver + } + + pub fn convert_to_pep440(&mut self) -> bool { + let retn = !(self.spec == VersionSpec::Pep440); self.spec = VersionSpec::Pep440; + retn } - // TODO: Tests - pub fn convert_to_semver(&mut self) { + pub fn convert_to_semver(&mut self) -> bool { + let retn = !(self.spec == VersionSpec::Semver); self.spec = VersionSpec::Semver; + retn } fn split_prerelease(pre: &str) -> Result<(&str, usize)> { @@ -588,20 +598,26 @@ impl VersionWithTOML { &self.source } - // TODO: Tests - pub fn convert_to_pep440(&mut self) { - self.orig_version.convert_to_pep440(); + pub fn is_pep440(&self) -> bool { + self.orig_version.is_pep440() + } + + pub fn is_semver(&self) -> bool { + self.orig_version.is_semver() + } + + pub fn convert_to_pep440(&mut self) -> bool { if let Some(v) = &mut self.new_version { v.convert_to_pep440(); } + self.orig_version.convert_to_pep440() } - // TODO: Tests - pub fn convert_to_semver(&mut self) { - self.orig_version.convert_to_semver(); + pub fn convert_to_semver(&mut self) -> bool { if let Some(v) = &mut self.new_version { v.convert_to_semver(); } + self.orig_version.convert_to_semver() } pub fn version(&self) -> &Version { diff --git a/rust/pyapi_metal/src/utils/version.rs b/rust/pyapi_metal/src/utils/version.rs index fa58e621..cd00d659 100644 --- a/rust/pyapi_metal/src/utils/version.rs +++ b/rust/pyapi_metal/src/utils/version.rs @@ -68,6 +68,24 @@ impl Version { Ok(self._origen_version.to_string()) } + fn convert_to_pep440(&mut self) -> PyResult { + Ok(self._origen_version.convert_to_pep440()) + } + + fn convert_to_semver(&mut self) -> PyResult { + Ok(self._origen_version.convert_to_semver()) + } + + #[getter] + fn is_pep440(&self) -> PyResult { + Ok(self._origen_version.is_pep440()) + } + + #[getter] + fn is_semver(&self) -> PyResult { + Ok(self._origen_version.is_semver()) + } + #[getter] fn pep440_str(&self) -> PyResult { Ok(self._origen_version.to_pep440_string()) From de4bd471be63fb35d06f9caf8bf0f464e438d606 Mon Sep 17 00:00:00 2001 From: corey Date: Tue, 19 Mar 2024 16:19:05 -0500 Subject: [PATCH 200/200] Fix OM test needing FE for less-robust Windows --- rust/origen_metal/src/lib.rs | 2 +- rust/origen_metal/src/utils/command.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/origen_metal/src/lib.rs b/rust/origen_metal/src/lib.rs index f15c83bd..77aab535 100644 --- a/rust/origen_metal/src/lib.rs +++ b/rust/origen_metal/src/lib.rs @@ -109,7 +109,7 @@ where mod tests { #[cfg(all(test, not(origen_skip_frontend_tests)))] pub fn run_python(code: &str) -> crate::Result<()> { - let mut c = std::process::Command::new("poetry"); + let mut c = crate::new_cmd!("poetry"); c.arg("run"); c.arg("python"); c.arg("-c"); diff --git a/rust/origen_metal/src/utils/command.rs b/rust/origen_metal/src/utils/command.rs index 45e2037e..7347a057 100644 --- a/rust/origen_metal/src/utils/command.rs +++ b/rust/origen_metal/src/utils/command.rs @@ -98,11 +98,11 @@ pub fn log_stderr(process: &mut std::process::Child, mut callback: Option<&mut d macro_rules! new_cmd { ($base_cmd:expr) => {{ if cfg!(windows) { - let mut c = Command::new("cmd"); + let mut c = std::process::Command::new("cmd"); c.arg(r"/c").arg($base_cmd); c } else { - Command::new($base_cmd) + std::process::Command::new($base_cmd) } }}; }