periplus-map 0.3.0__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {periplus_map-0.3.0 → periplus_map-0.4.1}/PKG-INFO +55 -9
- {periplus_map-0.3.0 → periplus_map-0.4.1}/README.md +54 -8
- {periplus_map-0.3.0 → periplus_map-0.4.1}/pyproject.toml +1 -1
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/checkmap.py +4 -6
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/cli.py +123 -77
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/emit.py +32 -13
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/rules.py +1 -8
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/tree.py +4 -3
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/errors.py +14 -9
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/map.py +24 -28
- periplus_map-0.4.1/src/periplus/mapshared.py +23 -0
- periplus_map-0.4.1/src/periplus/navigate/export.py +171 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/navigate/find.py +25 -23
- periplus_map-0.4.1/src/periplus/navigate/listing.py +75 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/navigate/mapfile.py +34 -24
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/navigate/path.py +35 -37
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/navigate/show.py +82 -42
- periplus_map-0.4.1/src/periplus/navigate/slice.py +112 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/navigate/types.py +51 -21
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/navigate/walk.py +55 -31
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/call/call.yaml +13 -25
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/hook/hook_theme_include.yaml +8 -2
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/menu_link/menu_link.yaml +4 -2
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/pack.yaml +3 -2
- periplus_map-0.4.1/src/periplus/packs/drupal_basic@0.3.0/route/route_call.yaml +72 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php_basic@0.2.0/edges/edge_kinds.yaml +2 -1
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php_basic@0.2.0/edges/find_structure.yaml +3 -2
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php_basic@0.2.0/types/find_declarations.yaml +3 -2
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php_basic@0.2.0/types/node_types.yaml +1 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/skills/periplus-gaps/SKILL.md +6 -6
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/skills/periplus-map/SKILL.md +1 -1
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/skills/periplus-rutter/SKILL.md +10 -10
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/spec.py +3 -21
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/update.py +26 -14
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/validate.py +3 -18
- periplus_map-0.3.0/src/periplus/navigate/listing.py +0 -42
- {periplus_map-0.3.0 → periplus_map-0.4.1}/.gitignore +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/LICENSE +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/NOTICE +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/__init__.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/contract/schema/map.schema.json +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/contract/schema/navigation.schema.json +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/contract/schema/pack-file.schema.json +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/contract/schema/pack-manifest.schema.json +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/contract/schema/project-settings.schema.json +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/contract/spec/engine.md +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/contract/spec/rules.md +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/detect.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/__init__.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/check.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/packload.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/pattern.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/select.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/engine/source.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/init.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/layout.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/manifest.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/navigate/__init__.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/navigate/ids.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/advancedqueue_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/ai_basic@0.0.1/ai_agent/ai_agent.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/ai_basic@0.0.1/ai_agent/ai_agent_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/ai_basic@0.0.1/ai_function_call/ai_function_call.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/ai_basic@0.0.1/ai_function_call/ai_function_call_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/ai_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/config_pages_basic@0.0.1/bundle/config_pages_bundle_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/config_pages_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/crop_basic@0.0.1/bundle/crop_bundle_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/crop_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_placement.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_placement_code.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_placement_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_plugin.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_plugin_altered.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_plugin_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_plugin_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_plugin_content.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_plugin_derived.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_plugin_deriver.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_type.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_type_code.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/block/block_type_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/cache/cache.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/cache/cache_backend.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/component/sdc.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/component/sdc_definition.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/component/sdc_use.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/config/config_object.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/display/display.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/display/display_code.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/display/display_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/entity/entity.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/entity/entity_class.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/entity/entity_save.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/entity/entity_type_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/entity/entity_type_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/field/field_instance_code.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/field/field_instance_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/field/field_storage.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/field/field_storage_code.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/field/field_storage_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/form/form.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/form/form_class.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/form/form_id.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/form/form_methods.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/hook/hook.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/hook/hook_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/module/module.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/module/module_info.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/plugin/plugin.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/plugin/plugin_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/recommendations/recommendations.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/service/service.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/service/service_autowire.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/service/service_definition.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal@0.1.0/service/service_use.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/action/action.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/action/action_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/action/action_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/block/block_placement.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/block/block_placement_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/block_type/block_type.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/block_type/block_type_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/boundary/boundary_types.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/bundle/bundle.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/bundle/bundle_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/component/component.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/config/config_object.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/constraint/constraint.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/constraint/constraint_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/constraint/constraint_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/display/display.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/display/display_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/display/display_mode_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/entity_type/config_entity_type_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/entity_type/config_entity_type_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/entity_type/content_entity_type_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/entity_type/content_entity_type_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/entity_type/entity_type.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field/field_instance_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field/field_storage.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field/field_storage_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field_type/field_type_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field_type/field_type_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field_widget/field_widget_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/field_widget/field_widget_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/form/form_id.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/hook/hook.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/hook/hook_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/library/library.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/library/library_definition.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/local_action/local_action.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/local_action/local_action_definition.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/mail/mail.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/mail/mail_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/media_source/media_source.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/media_source/media_source_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/media_source/media_source_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/menu_link/menu_link_definition.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/module/module.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/module/module_info.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/permission/permission.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/permission/permission_definition.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/role/role.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/role/role_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/route/route.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/route/route_definition.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/route/route_options.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/route/route_requirements.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/service/service.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/service/service_definition.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/template/template.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/template/template_route_link.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/theme/theme.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/theme/theme_info.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/theme_hook/template_suggestion.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/theme_hook/theme_hook.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/theme_hook/theme_hook_render.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/url/url.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/views_plugin/views_field_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/views_plugin/views_filter_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/views_plugin/views_plugin.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_basic@0.3.0/views_plugin/views_style_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/attachment/attachment.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_php.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_php_array.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_twig.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/attachment/php_function_holder.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/behavior/behavior.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/setting/setting.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/setting/setting_in_js.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drupal_js_basic@0.0.1/setting/setting_in_php.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drush_basic@0.0.1/command/command.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drush_basic@0.0.1/command/command_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drush_basic@0.0.1/command/command_attribute.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/drush_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/eck_basic@0.0.1/bundle/eck_bundle_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/eck_basic@0.0.1/entity_type/eck_entity_type_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/eck_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go@0.0.2/interfaces/satisfies.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go@0.0.2/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go@0.0.2/types/find_declarations.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go@0.0.2/types/node_types.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go_basic@0.0.3/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go_basic@0.0.3/rules/calls.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go_basic@0.0.3/rules/declarations.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go_basic@0.0.3/rules/imports.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/go_basic@0.0.3/types/node_types.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/js_basic@0.0.1/function/function.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/js_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/laravel_basic@0.0.5/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/laravel_basic@0.0.5/rules/classes.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/laravel_basic@0.0.5/rules/config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/laravel_basic@0.0.5/rules/routes.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/laravel_basic@0.0.5/rules/types.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/laravel_basic@0.0.5/rules/views.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/paragraphs_basic@0.0.1/bundle/paragraph_bundle_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/paragraphs_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/edges/edge_kinds.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/edges/find_calls.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/edges/find_imports.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/edges/find_member_access.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/edges/find_structure.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/embedded/embedded_regions.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/imports/imports.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/resolution/excluded_tokens.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/resolution/resolution.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/types/find_declarations.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php@0.1.0/types/node_types.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php_basic@0.2.0/imports/imports.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/php_basic@0.2.0/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/profile_basic@0.0.1/bundle/profile_bundle_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/profile_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/salesforce_basic@0.0.1/event/salesforce_event.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/salesforce_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/salesforce_basic@0.0.1/salesforce_mapping/salesforce_mapping.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/salesforce_basic@0.0.1/salesforce_mapping/salesforce_mapping_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/salesforce_basic@0.0.1/salesforce_mapping_field/salesforce_mapping_field.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/salesforce_basic@0.0.1/salesforce_mapping_field/salesforce_mapping_field_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/twig@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/twig@0.0.1/types/template.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/twig_basic@0.1.0/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/twig_tweak_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/twig_tweak_basic@0.0.1/rules/block.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/twig_tweak_basic@0.0.1/rules/entity.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/twig_tweak_basic@0.0.1/rules/field.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/twig_tweak_basic@0.0.1/rules/menu.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/webform_basic@0.0.1/bundle/webform_submission_bundle_config.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/webform_basic@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/webform_basic@0.0.1/webform_handler/webform_handler.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/webform_basic@0.0.1/webform_handler/webform_handler_annotation.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/yaml@0.0.1/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/yaml@0.0.1/types/find_mapping_entry.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/yaml@0.0.1/types/yaml_types.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs/yaml_basic@0.1.0/pack.yaml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/packs.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/preflight.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/py.typed +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/report.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/resolution.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/settings.py +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/settings.stub.yml +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/skills/periplus-map/references/descriptions.schema.json +0 -0
- {periplus_map-0.3.0 → periplus_map-0.4.1}/src/periplus/skills_install.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: periplus-map
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: A schema-first, deterministic codebase mapper, configurable to any stack.
|
|
5
5
|
Project-URL: Homepage, https://github.com/camoa/periplus
|
|
6
6
|
Project-URL: Repository, https://github.com/camoa/periplus
|
|
@@ -52,7 +52,7 @@ Description-Content-Type: text/markdown
|
|
|
52
52
|
`js` and `go` extras for the tests. It runs pytest on Python 3.11 to 3.14, ruff and mypy, and validates
|
|
53
53
|
every bundled pack. It does not run the acceptance scripts, and it never maps a Go project.</sub>
|
|
54
54
|
|
|
55
|
-
Status: **beta**, version 0.
|
|
55
|
+
Status: **beta**, version 0.4.1.
|
|
56
56
|
|
|
57
57
|
</div>
|
|
58
58
|
|
|
@@ -105,7 +105,7 @@ periplus --version
|
|
|
105
105
|
To install a tagged version from the repository:
|
|
106
106
|
|
|
107
107
|
```
|
|
108
|
-
uv tool install git+https://github.com/camoa/periplus@v0.
|
|
108
|
+
uv tool install git+https://github.com/camoa/periplus@v0.4.1
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
To install from a local copy of this repository:
|
|
@@ -133,6 +133,18 @@ mkdir -p ~/.agents/skills && rsync -a --delete ~/.claude/skills/periplus-* ~/.ag
|
|
|
133
133
|
- [GitHub Copilot in VS Code](https://code.visualstudio.com/docs/copilot/customization/agent-skills): `~/.copilot/skills`, `~/.agents/skills` or `~/.claude/skills`, so the Claude install already works. A repository can use `.github/skills`.
|
|
134
134
|
- [Cursor](https://cursor.com/docs/context/skills): `~/.cursor/skills` or `~/.agents/skills`, and it also reads `~/.claude/skills`. A repository can use `.cursor/skills`.
|
|
135
135
|
|
|
136
|
+
To upgrade an install from PyPI, use the tool you installed with:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
uv tool upgrade periplus-map # keeps the extras you installed
|
|
140
|
+
pipx upgrade periplus-map
|
|
141
|
+
pip install -U 'periplus-map[go,js]' # pip needs the extras named again
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Then run `periplus skills install` again, and repeat the copy above for any other agent. Read the
|
|
145
|
+
[changelog](CHANGELOG.md) before you upgrade: when a bundled rutter's version changes, update the
|
|
146
|
+
pins in your project's settings with `periplus update` and map again.
|
|
147
|
+
|
|
136
148
|
To update a local install, pull the repository and run `uv tool install /path/to/periplus` again. A
|
|
137
149
|
local directory is rebuilt when `pyproject.toml` changes or a file under `src/periplus` does. Run
|
|
138
150
|
`uv tool install --reinstall /path/to/periplus` for the form that always rebuilds. The command
|
|
@@ -338,9 +350,9 @@ To map a Laravel application, pin `php_basic@0.2.0` and `laravel_basic@0.0.5` an
|
|
|
338
350
|
at the application's root. The default Laravel folders need no settings. To move the templates,
|
|
339
351
|
set `views_root` under `folders`; a template is named by its path below `views_root`.
|
|
340
352
|
|
|
341
|
-
New in this release:
|
|
342
|
-
|
|
343
|
-
|
|
353
|
+
New in this release: the GraphML export labels each node with the short form of its map id,
|
|
354
|
+
with the full id under the `id` key, and labels each edge with its kind; the navigation guide
|
|
355
|
+
has a paragraph on the kind.
|
|
344
356
|
|
|
345
357
|
## Write a rutter
|
|
346
358
|
|
|
@@ -506,6 +518,39 @@ map holds and nothing more. `periplus check-map` runs the full schema check that
|
|
|
506
518
|
skip. The [navigation guide](docs/navigation.md) gives each command's options, output and exit
|
|
507
519
|
codes, with an example you can run.
|
|
508
520
|
|
|
521
|
+
### Slice and export
|
|
522
|
+
|
|
523
|
+
`periplus slice` writes a piece of the map to a map file of its own. `periplus export` prints the
|
|
524
|
+
whole map as GraphML, DOT or Mermaid. To draw a part of the map, slice it, then export the slice.
|
|
525
|
+
|
|
526
|
+
```
|
|
527
|
+
periplus slice [ID ...] [--path PREFIX] --out FILE [--direction out|in|both] [--depth N] [--kind K] [--limit N] [--map PATH]
|
|
528
|
+
periplus export --format graphml|dot|mermaid [--map PATH]
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
`slice` starts from the ids you name and from every node whose first file starts with `--path PREFIX`, and follows edges
|
|
532
|
+
from them. `--direction out` and `in` follow edges one way; `both` follows an edge either way at every hop (default `both`).
|
|
533
|
+
`--depth N` sets how many edges to follow (default 1), and `--kind K` keeps only edges of kind `K`;
|
|
534
|
+
repeat it for several. `--limit N` stops the slice when it would hold more than `N` items (default
|
|
535
|
+
500, `0` for no limit): the command exits 32 and writes nothing. An unknown id, or a prefix that
|
|
536
|
+
matches nothing, exits 31. `--out` is required, and a slice is a smaller map, so name it so it
|
|
537
|
+
cannot replace the full map.
|
|
538
|
+
|
|
539
|
+
`export` prints to standard output and its warnings to standard error. GraphML names each node by
|
|
540
|
+
a generated token, labels it with a short name and carries the map id as its `id` data, with the
|
|
541
|
+
node type and state, the edge kind as the edge label, and the file and line where there is one.
|
|
542
|
+
DOT and Mermaid label each node with its id and type.
|
|
543
|
+
|
|
544
|
+
```
|
|
545
|
+
periplus slice --path src/Billing/ --out billing.map.json
|
|
546
|
+
periplus export --format graphml --map billing.map.json > billing.graphml # open in Gephi Lite
|
|
547
|
+
periplus export --format dot --map billing.map.json > billing.dot # render with Graphviz
|
|
548
|
+
periplus export --format mermaid --map billing.map.json > billing.mmd # wrap in a mermaid code fence in a pull request
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
Gephi Lite handles light graphs; use Gephi for more than about 10,000 nodes. Mermaid on GitHub may
|
|
552
|
+
not draw a graph above 500 edges or 50,000 characters, and the export warns when it passes either.
|
|
553
|
+
|
|
509
554
|
## CLI reference
|
|
510
555
|
|
|
511
556
|
Run each command in the project folder.
|
|
@@ -524,12 +569,14 @@ periplus show ID # show one node and the edges at it
|
|
|
524
569
|
periplus neighbors ID # list the items an item's edges lead to
|
|
525
570
|
periplus affected ID # list the items whose edges lead to an item
|
|
526
571
|
periplus path FROM TO # show every shortest chain of edges from one item to another
|
|
572
|
+
periplus slice ID --out FILE # write the items around some items or a path to a smaller map
|
|
573
|
+
periplus export --format F # print the map as graphml, dot or mermaid
|
|
527
574
|
periplus skills install # copy the Claude skills Periplus ships into ~/.claude/skills
|
|
528
575
|
```
|
|
529
576
|
|
|
530
577
|
`periplus validate` takes a bare `name`, or `name@version` to pick one of several copies.
|
|
531
|
-
`periplus update` leaves project-local and unknown pins as they are. Every command but `init`
|
|
532
|
-
takes `--format json`. The
|
|
578
|
+
`periplus update` leaves project-local and unknown pins as they are. Every command but `init`, `slice`
|
|
579
|
+
and `export` takes `--format json`. The nine commands that read a map take `--map PATH`; the
|
|
533
580
|
[navigation guide](docs/navigation.md) gives their other options. `periplus --version` prints the
|
|
534
581
|
installed version, and `periplus <command> --help` gives each command's options.
|
|
535
582
|
|
|
@@ -576,7 +623,6 @@ lists the rest, each rutter's among them.
|
|
|
576
623
|
- **An unresolved end takes its first candidate type.** For example, `pathlib.Path` becomes a
|
|
577
624
|
`python.function`. The map states a type it cannot know.
|
|
578
625
|
- **One JSON file, and every run is a full run.** There is no split map and no incremental run.
|
|
579
|
-
- **No export.** There is no GraphML, Mermaid or DOT output yet.
|
|
580
626
|
|
|
581
627
|
## License
|
|
582
628
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
`js` and `go` extras for the tests. It runs pytest on Python 3.11 to 3.14, ruff and mypy, and validates
|
|
13
13
|
every bundled pack. It does not run the acceptance scripts, and it never maps a Go project.</sub>
|
|
14
14
|
|
|
15
|
-
Status: **beta**, version 0.
|
|
15
|
+
Status: **beta**, version 0.4.1.
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
@@ -65,7 +65,7 @@ periplus --version
|
|
|
65
65
|
To install a tagged version from the repository:
|
|
66
66
|
|
|
67
67
|
```
|
|
68
|
-
uv tool install git+https://github.com/camoa/periplus@v0.
|
|
68
|
+
uv tool install git+https://github.com/camoa/periplus@v0.4.1
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
To install from a local copy of this repository:
|
|
@@ -93,6 +93,18 @@ mkdir -p ~/.agents/skills && rsync -a --delete ~/.claude/skills/periplus-* ~/.ag
|
|
|
93
93
|
- [GitHub Copilot in VS Code](https://code.visualstudio.com/docs/copilot/customization/agent-skills): `~/.copilot/skills`, `~/.agents/skills` or `~/.claude/skills`, so the Claude install already works. A repository can use `.github/skills`.
|
|
94
94
|
- [Cursor](https://cursor.com/docs/context/skills): `~/.cursor/skills` or `~/.agents/skills`, and it also reads `~/.claude/skills`. A repository can use `.cursor/skills`.
|
|
95
95
|
|
|
96
|
+
To upgrade an install from PyPI, use the tool you installed with:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
uv tool upgrade periplus-map # keeps the extras you installed
|
|
100
|
+
pipx upgrade periplus-map
|
|
101
|
+
pip install -U 'periplus-map[go,js]' # pip needs the extras named again
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Then run `periplus skills install` again, and repeat the copy above for any other agent. Read the
|
|
105
|
+
[changelog](CHANGELOG.md) before you upgrade: when a bundled rutter's version changes, update the
|
|
106
|
+
pins in your project's settings with `periplus update` and map again.
|
|
107
|
+
|
|
96
108
|
To update a local install, pull the repository and run `uv tool install /path/to/periplus` again. A
|
|
97
109
|
local directory is rebuilt when `pyproject.toml` changes or a file under `src/periplus` does. Run
|
|
98
110
|
`uv tool install --reinstall /path/to/periplus` for the form that always rebuilds. The command
|
|
@@ -298,9 +310,9 @@ To map a Laravel application, pin `php_basic@0.2.0` and `laravel_basic@0.0.5` an
|
|
|
298
310
|
at the application's root. The default Laravel folders need no settings. To move the templates,
|
|
299
311
|
set `views_root` under `folders`; a template is named by its path below `views_root`.
|
|
300
312
|
|
|
301
|
-
New in this release:
|
|
302
|
-
|
|
303
|
-
|
|
313
|
+
New in this release: the GraphML export labels each node with the short form of its map id,
|
|
314
|
+
with the full id under the `id` key, and labels each edge with its kind; the navigation guide
|
|
315
|
+
has a paragraph on the kind.
|
|
304
316
|
|
|
305
317
|
## Write a rutter
|
|
306
318
|
|
|
@@ -466,6 +478,39 @@ map holds and nothing more. `periplus check-map` runs the full schema check that
|
|
|
466
478
|
skip. The [navigation guide](docs/navigation.md) gives each command's options, output and exit
|
|
467
479
|
codes, with an example you can run.
|
|
468
480
|
|
|
481
|
+
### Slice and export
|
|
482
|
+
|
|
483
|
+
`periplus slice` writes a piece of the map to a map file of its own. `periplus export` prints the
|
|
484
|
+
whole map as GraphML, DOT or Mermaid. To draw a part of the map, slice it, then export the slice.
|
|
485
|
+
|
|
486
|
+
```
|
|
487
|
+
periplus slice [ID ...] [--path PREFIX] --out FILE [--direction out|in|both] [--depth N] [--kind K] [--limit N] [--map PATH]
|
|
488
|
+
periplus export --format graphml|dot|mermaid [--map PATH]
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
`slice` starts from the ids you name and from every node whose first file starts with `--path PREFIX`, and follows edges
|
|
492
|
+
from them. `--direction out` and `in` follow edges one way; `both` follows an edge either way at every hop (default `both`).
|
|
493
|
+
`--depth N` sets how many edges to follow (default 1), and `--kind K` keeps only edges of kind `K`;
|
|
494
|
+
repeat it for several. `--limit N` stops the slice when it would hold more than `N` items (default
|
|
495
|
+
500, `0` for no limit): the command exits 32 and writes nothing. An unknown id, or a prefix that
|
|
496
|
+
matches nothing, exits 31. `--out` is required, and a slice is a smaller map, so name it so it
|
|
497
|
+
cannot replace the full map.
|
|
498
|
+
|
|
499
|
+
`export` prints to standard output and its warnings to standard error. GraphML names each node by
|
|
500
|
+
a generated token, labels it with a short name and carries the map id as its `id` data, with the
|
|
501
|
+
node type and state, the edge kind as the edge label, and the file and line where there is one.
|
|
502
|
+
DOT and Mermaid label each node with its id and type.
|
|
503
|
+
|
|
504
|
+
```
|
|
505
|
+
periplus slice --path src/Billing/ --out billing.map.json
|
|
506
|
+
periplus export --format graphml --map billing.map.json > billing.graphml # open in Gephi Lite
|
|
507
|
+
periplus export --format dot --map billing.map.json > billing.dot # render with Graphviz
|
|
508
|
+
periplus export --format mermaid --map billing.map.json > billing.mmd # wrap in a mermaid code fence in a pull request
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
Gephi Lite handles light graphs; use Gephi for more than about 10,000 nodes. Mermaid on GitHub may
|
|
512
|
+
not draw a graph above 500 edges or 50,000 characters, and the export warns when it passes either.
|
|
513
|
+
|
|
469
514
|
## CLI reference
|
|
470
515
|
|
|
471
516
|
Run each command in the project folder.
|
|
@@ -484,12 +529,14 @@ periplus show ID # show one node and the edges at it
|
|
|
484
529
|
periplus neighbors ID # list the items an item's edges lead to
|
|
485
530
|
periplus affected ID # list the items whose edges lead to an item
|
|
486
531
|
periplus path FROM TO # show every shortest chain of edges from one item to another
|
|
532
|
+
periplus slice ID --out FILE # write the items around some items or a path to a smaller map
|
|
533
|
+
periplus export --format F # print the map as graphml, dot or mermaid
|
|
487
534
|
periplus skills install # copy the Claude skills Periplus ships into ~/.claude/skills
|
|
488
535
|
```
|
|
489
536
|
|
|
490
537
|
`periplus validate` takes a bare `name`, or `name@version` to pick one of several copies.
|
|
491
|
-
`periplus update` leaves project-local and unknown pins as they are. Every command but `init`
|
|
492
|
-
takes `--format json`. The
|
|
538
|
+
`periplus update` leaves project-local and unknown pins as they are. Every command but `init`, `slice`
|
|
539
|
+
and `export` takes `--format json`. The nine commands that read a map take `--map PATH`; the
|
|
493
540
|
[navigation guide](docs/navigation.md) gives their other options. `periplus --version` prints the
|
|
494
541
|
installed version, and `periplus <command> --help` gives each command's options.
|
|
495
542
|
|
|
@@ -536,7 +583,6 @@ lists the rest, each rutter's among them.
|
|
|
536
583
|
- **An unresolved end takes its first candidate type.** For example, `pathlib.Path` becomes a
|
|
537
584
|
`python.function`. The map states a type it cannot know.
|
|
538
585
|
- **One JSON file, and every run is a full run.** There is no split map and no incremental run.
|
|
539
|
-
- **No export.** There is no GraphML, Mermaid or DOT output yet.
|
|
540
586
|
|
|
541
587
|
## License
|
|
542
588
|
|
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
|
25
25
|
# Declared here and nowhere else. src/periplus/__init__.py reads it back at runtime through
|
|
26
26
|
# importlib.metadata.version(), so the number is written once and `periplus --version` prints
|
|
27
27
|
# what this file says by construction rather than by two places agreeing.
|
|
28
|
-
version = "0.
|
|
28
|
+
version = "0.4.1"
|
|
29
29
|
|
|
30
30
|
# Five runtime distributions. The count is still a decision, not an accident, and this comment
|
|
31
31
|
# said "two runtime distributions, zero transitive" until `periplus validate` needed a validator.
|
|
@@ -14,8 +14,9 @@ from pathlib import Path
|
|
|
14
14
|
from jsonschema import Draft202012Validator
|
|
15
15
|
|
|
16
16
|
from periplus.errors import ExitCode, HarnessError, Problem
|
|
17
|
-
from periplus.
|
|
18
|
-
from periplus.
|
|
17
|
+
from periplus.mapshared import MAP_SCHEMA
|
|
18
|
+
from periplus.navigate.mapfile import _read
|
|
19
|
+
from periplus.report import _escape, _json_problem
|
|
19
20
|
from periplus.validate import _schema
|
|
20
21
|
|
|
21
22
|
__all__ = ["RENDERERS", "CheckReport", "render_json", "render_text", "run"]
|
|
@@ -64,10 +65,7 @@ def render_json(report: CheckReport) -> str:
|
|
|
64
65
|
payload = {
|
|
65
66
|
"map": report.map_path,
|
|
66
67
|
"valid": not report.problems,
|
|
67
|
-
"problems": [
|
|
68
|
-
{"code": int(p.code), "message": p.message, "detail": dict(p.detail)}
|
|
69
|
-
for p in report.problems
|
|
70
|
-
],
|
|
68
|
+
"problems": [_json_problem(p) for p in report.problems],
|
|
71
69
|
}
|
|
72
70
|
return json.dumps(payload, sort_keys=True, indent=2, ensure_ascii=True) + "\n"
|
|
73
71
|
|
|
@@ -54,6 +54,46 @@ __all__ = ["build_parser", "main"]
|
|
|
54
54
|
_COLOUR: dict[str, Any] = {"color": False} if sys.version_info >= (3, 14) else {}
|
|
55
55
|
|
|
56
56
|
|
|
57
|
+
def add_map(parser: argparse.ArgumentParser, help_text: str) -> None:
|
|
58
|
+
"""Add ``--map`` to a subcommand; ``help_text`` says what the command does with the file."""
|
|
59
|
+
parser.add_argument(
|
|
60
|
+
"--map",
|
|
61
|
+
type=Path,
|
|
62
|
+
default=None,
|
|
63
|
+
metavar="PATH",
|
|
64
|
+
help=f"{help_text} (default: .periplus/map.json under the project root)",
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def add_limit(parser: argparse.ArgumentParser, default: int, noun: str) -> None:
|
|
69
|
+
"""Add ``--limit`` to a subcommand: how many ``noun`` to show, 0 for all."""
|
|
70
|
+
parser.add_argument(
|
|
71
|
+
"--limit",
|
|
72
|
+
type=int,
|
|
73
|
+
default=default,
|
|
74
|
+
metavar="N",
|
|
75
|
+
help=f"{noun} to show; 0 shows all (default: {default})",
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def add_walk(parser: argparse.ArgumentParser) -> None:
|
|
80
|
+
"""Add ``--depth`` and ``--kind``, the options of a command that follows edges."""
|
|
81
|
+
parser.add_argument(
|
|
82
|
+
"--depth",
|
|
83
|
+
type=int,
|
|
84
|
+
default=1,
|
|
85
|
+
metavar="N",
|
|
86
|
+
help="edges to follow, 1 or more (default: 1)",
|
|
87
|
+
)
|
|
88
|
+
parser.add_argument(
|
|
89
|
+
"--kind",
|
|
90
|
+
action="append",
|
|
91
|
+
default=[],
|
|
92
|
+
metavar="K",
|
|
93
|
+
help="keep only edges of kind K; repeat for several",
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
|
|
57
97
|
def build_parser() -> argparse.ArgumentParser:
|
|
58
98
|
"""Return the argument parser.
|
|
59
99
|
|
|
@@ -191,13 +231,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
191
231
|
default="text",
|
|
192
232
|
help="how to print the report (default: text)",
|
|
193
233
|
)
|
|
194
|
-
types
|
|
195
|
-
"--map",
|
|
196
|
-
type=Path,
|
|
197
|
-
default=None,
|
|
198
|
-
metavar="PATH",
|
|
199
|
-
help="the map file to read (default: .periplus/map.json under the project root)",
|
|
200
|
-
)
|
|
234
|
+
add_map(types, "the map file to read")
|
|
201
235
|
check = subcommands.add_parser(
|
|
202
236
|
"check-map",
|
|
203
237
|
help="check the written map against the map schema",
|
|
@@ -211,13 +245,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
211
245
|
default="text",
|
|
212
246
|
help="how to print the report (default: text)",
|
|
213
247
|
)
|
|
214
|
-
check
|
|
215
|
-
"--map",
|
|
216
|
-
type=Path,
|
|
217
|
-
default=None,
|
|
218
|
-
metavar="PATH",
|
|
219
|
-
help="the map file to check (default: .periplus/map.json under the project root)",
|
|
220
|
-
)
|
|
248
|
+
add_map(check, "the map file to check")
|
|
221
249
|
find = subcommands.add_parser(
|
|
222
250
|
"find",
|
|
223
251
|
help="find the nodes whose id holds a text",
|
|
@@ -225,16 +253,8 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
225
253
|
)
|
|
226
254
|
find.add_argument("text", metavar="TEXT", help="the text to look for in node ids")
|
|
227
255
|
find.add_argument("--type", default=None, metavar="T", help="keep type T and its subtypes")
|
|
228
|
-
find
|
|
229
|
-
|
|
230
|
-
)
|
|
231
|
-
find.add_argument(
|
|
232
|
-
"--map",
|
|
233
|
-
type=Path,
|
|
234
|
-
default=None,
|
|
235
|
-
metavar="PATH",
|
|
236
|
-
help="the map file to read (default: .periplus/map.json under the project root)",
|
|
237
|
-
)
|
|
256
|
+
add_limit(find, 50, "rows")
|
|
257
|
+
add_map(find, "the map file to read")
|
|
238
258
|
find.add_argument(
|
|
239
259
|
"--format",
|
|
240
260
|
# A literal for the reason `types`' is; a test asserts it equals `tuple(find.RENDERERS)`.
|
|
@@ -248,16 +268,8 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
248
268
|
description="Show the node ID and every edge leaving or arriving at it, and stop.",
|
|
249
269
|
)
|
|
250
270
|
show.add_argument("id", metavar="ID", help="the node id, as periplus find prints it")
|
|
251
|
-
show
|
|
252
|
-
|
|
253
|
-
)
|
|
254
|
-
show.add_argument(
|
|
255
|
-
"--map",
|
|
256
|
-
type=Path,
|
|
257
|
-
default=None,
|
|
258
|
-
metavar="PATH",
|
|
259
|
-
help="the map file to read (default: .periplus/map.json under the project root)",
|
|
260
|
-
)
|
|
271
|
+
add_limit(show, 50, "rows")
|
|
272
|
+
add_map(show, "the map file to read")
|
|
261
273
|
show.add_argument(
|
|
262
274
|
"--format",
|
|
263
275
|
# A literal for the reason `types`' is; a test asserts it equals `tuple(show.RENDERERS)`.
|
|
@@ -271,34 +283,9 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
271
283
|
):
|
|
272
284
|
walking = subcommands.add_parser(name, help=helptext, description=f"{helptext}, and stop.")
|
|
273
285
|
walking.add_argument("id", metavar="ID", help="the node id, as periplus find prints it")
|
|
274
|
-
walking
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
default=1,
|
|
278
|
-
metavar="N",
|
|
279
|
-
help="edges to follow, 1 or more (default: 1)",
|
|
280
|
-
)
|
|
281
|
-
walking.add_argument(
|
|
282
|
-
"--kind",
|
|
283
|
-
action="append",
|
|
284
|
-
default=[],
|
|
285
|
-
metavar="K",
|
|
286
|
-
help="keep only edges of kind K; repeat for several",
|
|
287
|
-
)
|
|
288
|
-
walking.add_argument(
|
|
289
|
-
"--limit",
|
|
290
|
-
type=int,
|
|
291
|
-
default=50,
|
|
292
|
-
metavar="N",
|
|
293
|
-
help="rows to show; 0 shows all (default: 50)",
|
|
294
|
-
)
|
|
295
|
-
walking.add_argument(
|
|
296
|
-
"--map",
|
|
297
|
-
type=Path,
|
|
298
|
-
default=None,
|
|
299
|
-
metavar="PATH",
|
|
300
|
-
help="the map file to read (default: .periplus/map.json under the project root)",
|
|
301
|
-
)
|
|
286
|
+
add_walk(walking)
|
|
287
|
+
add_limit(walking, 50, "rows")
|
|
288
|
+
add_map(walking, "the map file to read")
|
|
302
289
|
walking.add_argument(
|
|
303
290
|
"--format",
|
|
304
291
|
# A literal for the reason `types`' is; a test asserts it equals the RENDERERS.
|
|
@@ -320,27 +307,56 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
320
307
|
metavar="K",
|
|
321
308
|
help="follow only edges of kind K; repeat for several",
|
|
322
309
|
)
|
|
310
|
+
add_limit(path, 10, "chains")
|
|
311
|
+
add_map(path, "the map file to read")
|
|
323
312
|
path.add_argument(
|
|
313
|
+
"--format",
|
|
314
|
+
# A literal for the reason `types`' is; a test asserts it equals `tuple(path.RENDERERS)`.
|
|
315
|
+
choices=("text", "json"),
|
|
316
|
+
default="text",
|
|
317
|
+
help="how to print the report (default: text)",
|
|
318
|
+
)
|
|
319
|
+
cut = subcommands.add_parser(
|
|
320
|
+
"slice",
|
|
321
|
+
help="write the items around some items or a path into a map file of their own",
|
|
322
|
+
description="Write a piece of the map to a map file, and stop.",
|
|
323
|
+
)
|
|
324
|
+
cut.add_argument("id", metavar="ID", nargs="*", help="a node id to start from")
|
|
325
|
+
cut.add_argument(
|
|
326
|
+
"--path", metavar="PREFIX", help="also start from nodes whose first file starts with PREFIX"
|
|
327
|
+
)
|
|
328
|
+
cut.add_argument("--out", type=Path, required=True, metavar="FILE", help="the file to write")
|
|
329
|
+
cut.add_argument(
|
|
330
|
+
"--direction",
|
|
331
|
+
choices=("out", "in", "both"),
|
|
332
|
+
default="both",
|
|
333
|
+
help=(
|
|
334
|
+
"out or in follows one direction; both follows an edge either way at every hop "
|
|
335
|
+
"(default: both)"
|
|
336
|
+
),
|
|
337
|
+
)
|
|
338
|
+
add_walk(cut)
|
|
339
|
+
cut.add_argument(
|
|
324
340
|
"--limit",
|
|
325
341
|
type=int,
|
|
326
|
-
default=
|
|
342
|
+
default=500,
|
|
327
343
|
metavar="N",
|
|
328
|
-
help="
|
|
344
|
+
help="most items the slice may hold; 0 for no limit (default: 500)",
|
|
329
345
|
)
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
help="the map file to read (default: .periplus/map.json under the project root)",
|
|
346
|
+
add_map(cut, "the map file to read")
|
|
347
|
+
export = subcommands.add_parser(
|
|
348
|
+
"export",
|
|
349
|
+
help="print the map as GraphML, DOT or Mermaid",
|
|
350
|
+
description="Print the map in another format, and stop.",
|
|
336
351
|
)
|
|
337
|
-
|
|
352
|
+
export.add_argument(
|
|
338
353
|
"--format",
|
|
339
|
-
# A literal for the reason `types`' is; a test asserts it equals `tuple(
|
|
340
|
-
choices=("
|
|
341
|
-
|
|
342
|
-
help="
|
|
354
|
+
# A literal for the reason `types`' is; a test asserts it equals `tuple(export.WRITERS)`.
|
|
355
|
+
choices=("graphml", "dot", "mermaid"),
|
|
356
|
+
required=True,
|
|
357
|
+
help="the format to print",
|
|
343
358
|
)
|
|
359
|
+
add_map(export, "the map file to read")
|
|
344
360
|
status = subcommands.add_parser(
|
|
345
361
|
"status",
|
|
346
362
|
help="report the settings, the pack search path and the directories on it",
|
|
@@ -554,6 +570,8 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
554
570
|
|
|
555
571
|
if getattr(args, "limit", 0) < 0:
|
|
556
572
|
parser.error("--limit must be 0 or more")
|
|
573
|
+
if getattr(args, "depth", 1) < 1:
|
|
574
|
+
parser.error("--depth must be 1 or more")
|
|
557
575
|
|
|
558
576
|
# Imported here for the reason `map` is: `periplus.navigate` imports `jsonschema`.
|
|
559
577
|
if args.command == "types":
|
|
@@ -605,8 +623,6 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
605
623
|
from periplus.navigate.walk import RENDERERS as WALK_RENDERERS
|
|
606
624
|
from periplus.navigate.walk import run as run_walk
|
|
607
625
|
|
|
608
|
-
if args.depth < 1:
|
|
609
|
-
parser.error("--depth must be 1 or more")
|
|
610
626
|
walked = run_walk(
|
|
611
627
|
start=Path.cwd(),
|
|
612
628
|
env=os.environ,
|
|
@@ -620,6 +636,36 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
620
636
|
sys.stdout.write(WALK_RENDERERS[args.format](walked))
|
|
621
637
|
return walked.exit_code
|
|
622
638
|
|
|
639
|
+
if args.command == "slice":
|
|
640
|
+
from periplus.navigate.slice import RENDERERS as SLICE_RENDERERS
|
|
641
|
+
from periplus.navigate.slice import run as run_slice
|
|
642
|
+
|
|
643
|
+
sliced = run_slice(
|
|
644
|
+
start=Path.cwd(),
|
|
645
|
+
env=os.environ,
|
|
646
|
+
ids=args.id,
|
|
647
|
+
prefix=args.path,
|
|
648
|
+
direction=args.direction,
|
|
649
|
+
depth=args.depth,
|
|
650
|
+
kinds=args.kind,
|
|
651
|
+
limit=args.limit,
|
|
652
|
+
out=args.out,
|
|
653
|
+
map_path=args.map,
|
|
654
|
+
)
|
|
655
|
+
sys.stdout.write(SLICE_RENDERERS["text"](sliced))
|
|
656
|
+
return sliced.exit_code
|
|
657
|
+
|
|
658
|
+
if args.command == "export":
|
|
659
|
+
from periplus.navigate.export import render_text as export_text
|
|
660
|
+
from periplus.navigate.export import run as run_export
|
|
661
|
+
|
|
662
|
+
exported = run_export(
|
|
663
|
+
start=Path.cwd(), env=os.environ, format=args.format, map_path=args.map
|
|
664
|
+
)
|
|
665
|
+
sys.stdout.write(exported.text)
|
|
666
|
+
sys.stderr.write(export_text(exported))
|
|
667
|
+
return exported.exit_code
|
|
668
|
+
|
|
623
669
|
if args.command == "path":
|
|
624
670
|
from periplus.navigate.path import RENDERERS as PATH_RENDERERS
|
|
625
671
|
from periplus.navigate.path import run as run_path
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import json
|
|
6
6
|
from collections import Counter
|
|
7
|
-
from collections.abc import Mapping, Sequence
|
|
7
|
+
from collections.abc import Callable, Mapping, Sequence
|
|
8
8
|
from dataclasses import replace
|
|
9
9
|
from typing import Any
|
|
10
10
|
|
|
@@ -13,7 +13,15 @@ from periplus.engine.rules import FoundEdge, FoundNode, Skipped
|
|
|
13
13
|
from periplus.errors import ExitCode, HarnessError
|
|
14
14
|
from periplus.manifest import LoadedPack
|
|
15
15
|
|
|
16
|
-
__all__ = [
|
|
16
|
+
__all__ = [
|
|
17
|
+
"EdgeIllegal",
|
|
18
|
+
"TypeCollision",
|
|
19
|
+
"build_document",
|
|
20
|
+
"counts",
|
|
21
|
+
"hierarchy",
|
|
22
|
+
"render",
|
|
23
|
+
"type_chain",
|
|
24
|
+
]
|
|
17
25
|
|
|
18
26
|
|
|
19
27
|
class TypeCollision(HarnessError):
|
|
@@ -162,19 +170,28 @@ def build_document(
|
|
|
162
170
|
),
|
|
163
171
|
"settings": settings,
|
|
164
172
|
"roots": ["."],
|
|
165
|
-
"type_hierarchy":
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
"edges_by_kind": dict(sorted(Counter(str(edge["kind"]) for edge in written).items())),
|
|
170
|
-
"nodes_by_state": dict(sorted(Counter(str(n["state"]) for n in ordered).items())),
|
|
171
|
-
"nodes_by_type": dict(sorted(Counter(str(node["type"]) for node in ordered).items())),
|
|
172
|
-
},
|
|
173
|
+
"type_hierarchy": hierarchy(
|
|
174
|
+
{str(node["type"]) for node in ordered}, lambda name: types[name].parent
|
|
175
|
+
),
|
|
176
|
+
"counts": counts(ordered, written),
|
|
173
177
|
"nodes": ordered,
|
|
174
178
|
"edges": written,
|
|
175
179
|
}
|
|
176
180
|
|
|
177
181
|
|
|
182
|
+
def counts(
|
|
183
|
+
nodes: Sequence[Mapping[str, Any]], edges: Sequence[Mapping[str, Any]]
|
|
184
|
+
) -> dict[str, Any]:
|
|
185
|
+
"""The document's ``counts`` for these nodes and edges."""
|
|
186
|
+
return {
|
|
187
|
+
"nodes": len(nodes),
|
|
188
|
+
"edges": len(edges),
|
|
189
|
+
"edges_by_kind": dict(sorted(Counter(str(edge["kind"]) for edge in edges).items())),
|
|
190
|
+
"nodes_by_state": dict(sorted(Counter(str(n["state"]) for n in nodes).items())),
|
|
191
|
+
"nodes_by_type": dict(sorted(Counter(str(node["type"]) for node in nodes).items())),
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
|
|
178
195
|
def _landed(edge: FoundEdge, merged: Mapping[str, Any]) -> FoundEdge:
|
|
179
196
|
"""The edge with its composed end on the first candidate id a rule found, else the first."""
|
|
180
197
|
if not edge.candidates:
|
|
@@ -349,7 +366,9 @@ def _edge(
|
|
|
349
366
|
}
|
|
350
367
|
|
|
351
368
|
|
|
352
|
-
def
|
|
369
|
+
def hierarchy(
|
|
370
|
+
used: set[str], parent_of: Callable[[str], str | None]
|
|
371
|
+
) -> list[dict[str, str | None]]:
|
|
353
372
|
"""The used types and every ancestor of them, each with its parent, sorted by type."""
|
|
354
373
|
closure: set[str] = set()
|
|
355
374
|
pending = sorted(used)
|
|
@@ -357,10 +376,10 @@ def _hierarchy(used: set[str], types: Mapping[str, TypeInfo]) -> list[dict[str,
|
|
|
357
376
|
name = pending.pop()
|
|
358
377
|
if name not in closure:
|
|
359
378
|
closure.add(name)
|
|
360
|
-
parent =
|
|
379
|
+
parent = parent_of(name)
|
|
361
380
|
if parent is not None:
|
|
362
381
|
pending.append(parent)
|
|
363
|
-
return [{"type": name, "parent":
|
|
382
|
+
return [{"type": name, "parent": parent_of(name)} for name in sorted(closure)]
|
|
364
383
|
|
|
365
384
|
|
|
366
385
|
def render(document: Mapping[str, object]) -> str:
|
|
@@ -1341,14 +1341,7 @@ def _names(node: Node, rule: Rule, grammar: Grammar, parsed: ParsedFile) -> dict
|
|
|
1341
1341
|
return None
|
|
1342
1342
|
written = found.group(group)
|
|
1343
1343
|
values[group] = (
|
|
1344
|
-
|
|
1345
|
-
written,
|
|
1346
|
-
grammar.resolve or (("as_written", ""),),
|
|
1347
|
-
grammar.separator,
|
|
1348
|
-
parsed.imports.get(parsed.block_at(before.start_byte), {}),
|
|
1349
|
-
{"namespace": parsed.namespace_at(before)},
|
|
1350
|
-
tables={},
|
|
1351
|
-
)
|
|
1344
|
+
parsed.resolve(before, grammar, written)
|
|
1352
1345
|
if rule.docblock_qualified and before is not None
|
|
1353
1346
|
else None
|
|
1354
1347
|
) or written
|