pfig 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pfig-0.1.0/.coveragerc +15 -0
- pfig-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +34 -0
- pfig-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +20 -0
- pfig-0.1.0/.github/dependabot.yml +6 -0
- pfig-0.1.0/.github/pull_request_template.md +13 -0
- pfig-0.1.0/.github/workflows/ci.yml +92 -0
- pfig-0.1.0/.github/workflows/docs.yml +35 -0
- pfig-0.1.0/.github/workflows/publish.yml +26 -0
- pfig-0.1.0/.gitignore +189 -0
- pfig-0.1.0/.pre-commit-config.yaml +20 -0
- pfig-0.1.0/CHANGELOG.md +25 -0
- pfig-0.1.0/CODE_OF_CONDUCT.md +15 -0
- pfig-0.1.0/CONTRIBUTING.md +44 -0
- pfig-0.1.0/LICENSE +203 -0
- pfig-0.1.0/Makefile +27 -0
- pfig-0.1.0/PKG-INFO +208 -0
- pfig-0.1.0/README.md +156 -0
- pfig-0.1.0/SECURITY.md +37 -0
- pfig-0.1.0/TODO.md +23 -0
- pfig-0.1.0/docs/__init__.py +1 -0
- pfig-0.1.0/docs/assets/pfig-avatar-192.png +0 -0
- pfig-0.1.0/docs/assets/pfig-avatar-50.png +0 -0
- pfig-0.1.0/docs/assets/pfig-logo-text.svg +70 -0
- pfig-0.1.0/docs/assets/pfig-logo.svg +65 -0
- pfig-0.1.0/docs/assets/pfig-text-192-white.png +0 -0
- pfig-0.1.0/docs/assets/pfig-text-192.png +0 -0
- pfig-0.1.0/docs/assets/pfig-white-50.png +0 -0
- pfig-0.1.0/docs/assets/pfig.png +0 -0
- pfig-0.1.0/docs/developer/architecture.md +194 -0
- pfig-0.1.0/docs/developer/contributing.md +109 -0
- pfig-0.1.0/docs/developer/developer_debugging.md +41 -0
- pfig-0.1.0/docs/developer/developer_guide.md +31 -0
- pfig-0.1.0/docs/developer/developer_setup.md +97 -0
- pfig-0.1.0/docs/developer/development_workflow.md +147 -0
- pfig-0.1.0/docs/developer/spec.md +382 -0
- pfig-0.1.0/docs/guides/getting-started.md +143 -0
- pfig-0.1.0/docs/guides/patterns.md +279 -0
- pfig-0.1.0/docs/guides/snapshots.md +319 -0
- pfig-0.1.0/docs/guides/troubleshooting.md +73 -0
- pfig-0.1.0/docs/hooks.py +88 -0
- pfig-0.1.0/docs/index.md +84 -0
- pfig-0.1.0/docs/pygments_lexer.py +128 -0
- pfig-0.1.0/docs/reference/api_reference.md +123 -0
- pfig-0.1.0/docs/reference/cli.md +693 -0
- pfig-0.1.0/docs/reference/index.md +41 -0
- pfig-0.1.0/docs/reference/lsp_api.md +323 -0
- pfig-0.1.0/docs/reference/snapshot_format.md +507 -0
- pfig-0.1.0/docs/reference/syntax_reference.md +355 -0
- pfig-0.1.0/docs/stylesheets/extra.css +15 -0
- pfig-0.1.0/examples/data_pipeline.pfig +120 -0
- pfig-0.1.0/examples/graph_plan_diff/base/experiment.pfig +9 -0
- pfig-0.1.0/examples/graph_plan_diff/base/transforms.pfig +7 -0
- pfig-0.1.0/examples/graph_plan_diff/proposed/experiment.pfig +9 -0
- pfig-0.1.0/examples/graph_plan_diff/proposed/transforms.pfig +6 -0
- pfig-0.1.0/examples/hello_world.pfig +68 -0
- pfig-0.1.0/examples/mnist_mlp/README.md +141 -0
- pfig-0.1.0/examples/mnist_mlp/consts.pfig +26 -0
- pfig-0.1.0/examples/mnist_mlp/main.pfig +58 -0
- pfig-0.1.0/examples/mnist_mlp/profiles/cpu.pfig +3 -0
- pfig-0.1.0/examples/mnist_mlp/profiles/gpu.pfig +3 -0
- pfig-0.1.0/examples/mnist_mlp/train.py +160 -0
- pfig-0.1.0/mkdocs.yml +110 -0
- pfig-0.1.0/pfig/__init__.py +162 -0
- pfig-0.1.0/pfig/__main__.py +12 -0
- pfig-0.1.0/pfig/_remote_fs.py +327 -0
- pfig-0.1.0/pfig/ast_nodes.py +247 -0
- pfig-0.1.0/pfig/bundle.py +424 -0
- pfig-0.1.0/pfig/cli.py +1700 -0
- pfig-0.1.0/pfig/diff.py +583 -0
- pfig-0.1.0/pfig/execution.py +3536 -0
- pfig-0.1.0/pfig/fmt.py +1016 -0
- pfig-0.1.0/pfig/fs.py +202 -0
- pfig-0.1.0/pfig/helpers.py +45 -0
- pfig-0.1.0/pfig/includes.py +28 -0
- pfig-0.1.0/pfig/lexer.py +382 -0
- pfig-0.1.0/pfig/logging.py +147 -0
- pfig-0.1.0/pfig/lsp/__init__.py +130 -0
- pfig-0.1.0/pfig/lsp/__main__.py +26 -0
- pfig-0.1.0/pfig/lsp/analysis/__init__.py +0 -0
- pfig-0.1.0/pfig/lsp/analysis/pfig_adapter.py +196 -0
- pfig-0.1.0/pfig/lsp/analysis/pfig_validator.py +292 -0
- pfig-0.1.0/pfig/lsp/analysis/python_resolver.py +276 -0
- pfig-0.1.0/pfig/lsp/analysis/resolver.py +79 -0
- pfig-0.1.0/pfig/lsp/graph_plan_diff.py +583 -0
- pfig-0.1.0/pfig/lsp/graph_view_model.py +1678 -0
- pfig-0.1.0/pfig/lsp/server.py +1121 -0
- pfig-0.1.0/pfig/lsp/state.py +114 -0
- pfig-0.1.0/pfig/lsp_index.py +389 -0
- pfig-0.1.0/pfig/lsp_utils.py +106 -0
- pfig-0.1.0/pfig/parser.py +726 -0
- pfig-0.1.0/pfig/py.typed +0 -0
- pfig-0.1.0/pfig/replay/__init__.py +20 -0
- pfig-0.1.0/pfig/replay/git_restore.py +240 -0
- pfig-0.1.0/pfig/replay/report.py +105 -0
- pfig-0.1.0/pfig/replay/runner.py +135 -0
- pfig-0.1.0/pfig/replay/snapshot_loader.py +113 -0
- pfig-0.1.0/pfig/replay/validate.py +236 -0
- pfig-0.1.0/pfig/replay/venv.py +300 -0
- pfig-0.1.0/pfig/replay/workspace.py +306 -0
- pfig-0.1.0/pfig/rules/pfig-developer-guide.md +133 -0
- pfig-0.1.0/pfig/rules/pfig-friendly-python.md +152 -0
- pfig-0.1.0/pfig/rules/pfig-spec.md +108 -0
- pfig-0.1.0/pfig/snapshot.py +1147 -0
- pfig-0.1.0/pfig/utils.py +43 -0
- pfig-0.1.0/pfig/vis/__init__.py +7 -0
- pfig-0.1.0/pfig/vis/__main__.py +20 -0
- pfig-0.1.0/pfig/vis/assets/THIRD_PARTY_NOTICES.txt +747 -0
- pfig-0.1.0/pfig/vis/assets/assets/graph.js +85 -0
- pfig-0.1.0/pfig/vis/assets/assets/index.css +1 -0
- pfig-0.1.0/pfig/vis/assets/index.html +16 -0
- pfig-0.1.0/pfig/vis/server.py +292 -0
- pfig-0.1.0/pfig.egg-info/PKG-INFO +208 -0
- pfig-0.1.0/pfig.egg-info/SOURCES.txt +294 -0
- pfig-0.1.0/pfig.egg-info/dependency_links.txt +1 -0
- pfig-0.1.0/pfig.egg-info/entry_points.txt +3 -0
- pfig-0.1.0/pfig.egg-info/requires.txt +27 -0
- pfig-0.1.0/pfig.egg-info/scm_file_list.json +290 -0
- pfig-0.1.0/pfig.egg-info/scm_version.json +8 -0
- pfig-0.1.0/pfig.egg-info/top_level.txt +1 -0
- pfig-0.1.0/pyproject.toml +117 -0
- pfig-0.1.0/pyrightconfig.json +15 -0
- pfig-0.1.0/setup.cfg +4 -0
- pfig-0.1.0/tests/__init__.py +1 -0
- pfig-0.1.0/tests/conftest.py +9 -0
- pfig-0.1.0/tests/fmt/cases/01_single_binding/expected.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/01_single_binding/input.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/02_multi_binding/expected.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/02_multi_binding/input.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/03_imports/expected.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/03_imports/input.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/04_from_imports/expected.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/04_from_imports/input.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/05_call_single_line/expected.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/05_call_single_line/input.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/06_call_wrapped/expected.pfig +6 -0
- pfig-0.1.0/tests/fmt/cases/06_call_wrapped/input.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/07_list_inline/expected.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/07_list_inline/input.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/08_list_magic_trailing_comma/expected.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/08_list_magic_trailing_comma/input.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/09_dict_inline/expected.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/09_dict_inline/input.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/10_dict_magic_trailing_comma/expected.pfig +4 -0
- pfig-0.1.0/tests/fmt/cases/10_dict_magic_trailing_comma/input.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/11_provider_refs/expected.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/11_provider_refs/input.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/12_override_external/expected.pfig +4 -0
- pfig-0.1.0/tests/fmt/cases/12_override_external/input.pfig +4 -0
- pfig-0.1.0/tests/fmt/cases/13_nested_containers/expected.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/13_nested_containers/input.pfig +1 -0
- pfig-0.1.0/tests/fmt/cases/14_import_sorting/expected.pfig +4 -0
- pfig-0.1.0/tests/fmt/cases/14_import_sorting/input.pfig +4 -0
- pfig-0.1.0/tests/fmt/cases/15_one_element_tuple/expected.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/15_one_element_tuple/input.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/16_blank_line_groups/expected.pfig +10 -0
- pfig-0.1.0/tests/fmt/cases/16_blank_line_groups/input.pfig +11 -0
- pfig-0.1.0/tests/fmt/cases/17_leading_file_comments/expected.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/17_leading_file_comments/input.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/18_standalone_comments/expected.pfig +3 -0
- pfig-0.1.0/tests/fmt/cases/18_standalone_comments/input.pfig +3 -0
- pfig-0.1.0/tests/fmt/cases/19_trailing_same_line/expected.pfig +3 -0
- pfig-0.1.0/tests/fmt/cases/19_trailing_same_line/input.pfig +3 -0
- pfig-0.1.0/tests/fmt/cases/20_trailing_file_comments/expected.pfig +4 -0
- pfig-0.1.0/tests/fmt/cases/20_trailing_file_comments/input.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/21_comment_only_file/expected.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/21_comment_only_file/input.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/22_comment_in_string_not_picked_up/expected.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/22_comment_in_string_not_picked_up/input.pfig +2 -0
- pfig-0.1.0/tests/fmt/cases/23_list_leading_element_comments/expected.pfig +8 -0
- pfig-0.1.0/tests/fmt/cases/23_list_leading_element_comments/input.pfig +8 -0
- pfig-0.1.0/tests/fmt/cases/24_list_trailing_element_comments/expected.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/24_list_trailing_element_comments/input.pfig +5 -0
- pfig-0.1.0/tests/fmt/cases/25_dict_leading_element_comments/expected.pfig +8 -0
- pfig-0.1.0/tests/fmt/cases/25_dict_leading_element_comments/input.pfig +8 -0
- pfig-0.1.0/tests/fmt/cases/26_dict_trailing_element_comments/expected.pfig +4 -0
- pfig-0.1.0/tests/fmt/cases/26_dict_trailing_element_comments/input.pfig +4 -0
- pfig-0.1.0/tests/fmt/cases/27_empty_container_with_comment/expected.pfig +6 -0
- pfig-0.1.0/tests/fmt/cases/27_empty_container_with_comment/input.pfig +6 -0
- pfig-0.1.0/tests/fmt/cases/28_container_end_comment/expected.pfig +6 -0
- pfig-0.1.0/tests/fmt/cases/28_container_end_comment/input.pfig +6 -0
- pfig-0.1.0/tests/fmt/cases/29_nested_container_comments/expected.pfig +10 -0
- pfig-0.1.0/tests/fmt/cases/29_nested_container_comments/input.pfig +10 -0
- pfig-0.1.0/tests/fmt/cases/30_single_element_magic_trailing_comma/expected.pfig +11 -0
- pfig-0.1.0/tests/fmt/cases/30_single_element_magic_trailing_comma/input.pfig +5 -0
- pfig-0.1.0/tests/fmt/examples/data_pipeline.pfig +120 -0
- pfig-0.1.0/tests/fmt/examples/graph_plan_diff/base/experiment.pfig +9 -0
- pfig-0.1.0/tests/fmt/examples/graph_plan_diff/base/transforms.pfig +7 -0
- pfig-0.1.0/tests/fmt/examples/graph_plan_diff/proposed/experiment.pfig +9 -0
- pfig-0.1.0/tests/fmt/examples/graph_plan_diff/proposed/transforms.pfig +6 -0
- pfig-0.1.0/tests/fmt/examples/hello_world.pfig +68 -0
- pfig-0.1.0/tests/fmt/examples/mnist_mlp/consts.pfig +26 -0
- pfig-0.1.0/tests/fmt/examples/mnist_mlp/main.pfig +58 -0
- pfig-0.1.0/tests/fmt/examples/mnist_mlp/profiles/cpu.pfig +3 -0
- pfig-0.1.0/tests/fmt/examples/mnist_mlp/profiles/gpu.pfig +3 -0
- pfig-0.1.0/tests/lsp/fixtures/pfig/basic.pfig +13 -0
- pfig-0.1.0/tests/lsp/fixtures/pfig/errors.pfig +12 -0
- pfig-0.1.0/tests/lsp/fixtures/pfig/with_include.pfig +9 -0
- pfig-0.1.0/tests/lsp/fixtures/py/sample_module.py +14 -0
- pfig-0.1.0/tests/lsp/test_find_binding.py +175 -0
- pfig-0.1.0/tests/lsp/test_graph_view_model.py +760 -0
- pfig-0.1.0/tests/lsp/test_indexer.py +194 -0
- pfig-0.1.0/tests/lsp/test_lsp_api.py +135 -0
- pfig-0.1.0/tests/lsp/test_python_resolver.py +86 -0
- pfig-0.1.0/tests/lsp/test_resolver.py +132 -0
- pfig-0.1.0/tests/lsp/test_semantic_tokens.py +246 -0
- pfig-0.1.0/tests/lsp/test_server_helpers.py +133 -0
- pfig-0.1.0/tests/lsp/test_stdio_smoke.py +29 -0
- pfig-0.1.0/tests/lsp/test_validator.py +418 -0
- pfig-0.1.0/tests/test_builtin_namespace_separation.py +114 -0
- pfig-0.1.0/tests/test_bundle.py +238 -0
- pfig-0.1.0/tests/test_cli.py +1562 -0
- pfig-0.1.0/tests/test_declarative_overrides.py +557 -0
- pfig-0.1.0/tests/test_diff.py +384 -0
- pfig-0.1.0/tests/test_documentation.py +128 -0
- pfig-0.1.0/tests/test_errors.py +1084 -0
- pfig-0.1.0/tests/test_execution.py +2331 -0
- pfig-0.1.0/tests/test_externals.py +1075 -0
- pfig-0.1.0/tests/test_fmt.py +148 -0
- pfig-0.1.0/tests/test_fresh_chaining.py +87 -0
- pfig-0.1.0/tests/test_fs.py +251 -0
- pfig-0.1.0/tests/test_graph_plan_diff.py +412 -0
- pfig-0.1.0/tests/test_helpers.py +29 -0
- pfig-0.1.0/tests/test_include_resolution.py +71 -0
- pfig-0.1.0/tests/test_includes.py +645 -0
- pfig-0.1.0/tests/test_instantiate.py +191 -0
- pfig-0.1.0/tests/test_integration.py +776 -0
- pfig-0.1.0/tests/test_lexer.py +776 -0
- pfig-0.1.0/tests/test_logging.py +89 -0
- pfig-0.1.0/tests/test_namespaced_method_refs.py +202 -0
- pfig-0.1.0/tests/test_optional_deps.py +53 -0
- pfig-0.1.0/tests/test_overrides.py +579 -0
- pfig-0.1.0/tests/test_parser.py +654 -0
- pfig-0.1.0/tests/test_provider_attr_refs.py +113 -0
- pfig-0.1.0/tests/test_provider_entrypoints.py +77 -0
- pfig-0.1.0/tests/test_reachable_externals.py +518 -0
- pfig-0.1.0/tests/test_remote_fs.py +267 -0
- pfig-0.1.0/tests/test_replay.py +1604 -0
- pfig-0.1.0/tests/test_replay_canonical_inputs.py +116 -0
- pfig-0.1.0/tests/test_runtime_layers.py +247 -0
- pfig-0.1.0/tests/test_snapshot.py +1530 -0
- pfig-0.1.0/tests/test_vis.py +109 -0
- pfig-0.1.0/webview/index.html +15 -0
- pfig-0.1.0/webview/package-lock.json +2877 -0
- pfig-0.1.0/webview/package.json +26 -0
- pfig-0.1.0/webview/src/BindingFieldDelta.tsx +59 -0
- pfig-0.1.0/webview/src/BindingNode.tsx +743 -0
- pfig-0.1.0/webview/src/BindingValuePreview.tsx +41 -0
- pfig-0.1.0/webview/src/EdgeReferenceDetails.tsx +21 -0
- pfig-0.1.0/webview/src/GraphApp.tsx +1151 -0
- pfig-0.1.0/webview/src/GraphDiffControls.tsx +64 -0
- pfig-0.1.0/webview/src/GraphFocusBar.tsx +77 -0
- pfig-0.1.0/webview/src/LegendExportNode.tsx +43 -0
- pfig-0.1.0/webview/src/NodeToolbar.tsx +111 -0
- pfig-0.1.0/webview/src/OverviewGroupNode.tsx +97 -0
- pfig-0.1.0/webview/src/elkLayout.ts +115 -0
- pfig-0.1.0/webview/src/graphBindingConstants.ts +16 -0
- pfig-0.1.0/webview/src/graphBindingFlowEdges.test.ts +30 -0
- pfig-0.1.0/webview/src/graphBindingFlowEdges.ts +64 -0
- pfig-0.1.0/webview/src/graphCompactNamespaces.test.ts +157 -0
- pfig-0.1.0/webview/src/graphCompactNamespaces.ts +176 -0
- pfig-0.1.0/webview/src/graphDomMeasure.ts +44 -0
- pfig-0.1.0/webview/src/graphEdgeBundles.test.ts +67 -0
- pfig-0.1.0/webview/src/graphEdgeBundles.ts +48 -0
- pfig-0.1.0/webview/src/graphExport.css +5 -0
- pfig-0.1.0/webview/src/graphFocus.test.ts +74 -0
- pfig-0.1.0/webview/src/graphFocus.ts +76 -0
- pfig-0.1.0/webview/src/graphFoldValueNodes.test.ts +98 -0
- pfig-0.1.0/webview/src/graphFoldValueNodes.ts +157 -0
- pfig-0.1.0/webview/src/graphFolderColors.test.ts +29 -0
- pfig-0.1.0/webview/src/graphFolderColors.ts +50 -0
- pfig-0.1.0/webview/src/graphHighlightContext.tsx +71 -0
- pfig-0.1.0/webview/src/graphLegend.tsx +126 -0
- pfig-0.1.0/webview/src/graphNavigation.test.ts +51 -0
- pfig-0.1.0/webview/src/graphNavigation.ts +6 -0
- pfig-0.1.0/webview/src/graphNodeBadges.ts +20 -0
- pfig-0.1.0/webview/src/graphNodeMetrics.test.ts +62 -0
- pfig-0.1.0/webview/src/graphNodeMetrics.ts +220 -0
- pfig-0.1.0/webview/src/graphNodeTheme.ts +121 -0
- pfig-0.1.0/webview/src/graphOverview.test.ts +167 -0
- pfig-0.1.0/webview/src/graphOverview.ts +179 -0
- pfig-0.1.0/webview/src/graphPlanDiff.test.ts +148 -0
- pfig-0.1.0/webview/src/graphPlanDiff.ts +125 -0
- pfig-0.1.0/webview/src/graphPngExport.tsx +295 -0
- pfig-0.1.0/webview/src/graphTheme.css +580 -0
- pfig-0.1.0/webview/src/graphViewport.test.ts +25 -0
- pfig-0.1.0/webview/src/graphViewport.ts +27 -0
- pfig-0.1.0/webview/src/hostTransport.test.ts +68 -0
- pfig-0.1.0/webview/src/hostTransport.ts +176 -0
- pfig-0.1.0/webview/src/main.tsx +15 -0
- pfig-0.1.0/webview/src/overviewLayout.test.ts +127 -0
- pfig-0.1.0/webview/src/overviewLayout.ts +147 -0
- pfig-0.1.0/webview/src/types.ts +168 -0
- pfig-0.1.0/webview/src/useNodeSingleClick.ts +19 -0
- pfig-0.1.0/webview/thirdPartyNotices.ts +57 -0
- pfig-0.1.0/webview/tsconfig.json +15 -0
- pfig-0.1.0/webview/vite.config.ts +30 -0
pfig-0.1.0/.coveragerc
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report incorrect pfig behavior
|
|
3
|
+
title: "fix: "
|
|
4
|
+
labels:
|
|
5
|
+
- bug
|
|
6
|
+
body:
|
|
7
|
+
- type: textarea
|
|
8
|
+
id: description
|
|
9
|
+
attributes:
|
|
10
|
+
label: What happened?
|
|
11
|
+
description: Describe the bug and what you expected instead.
|
|
12
|
+
validations:
|
|
13
|
+
required: true
|
|
14
|
+
- type: textarea
|
|
15
|
+
id: reproduction
|
|
16
|
+
attributes:
|
|
17
|
+
label: Reproduction
|
|
18
|
+
description: Minimal `.pfig` snippet, command, and any Python it depends on.
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
- type: input
|
|
22
|
+
id: version
|
|
23
|
+
attributes:
|
|
24
|
+
label: pfig version
|
|
25
|
+
placeholder: output of `pfig --version`
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: input
|
|
29
|
+
id: python
|
|
30
|
+
attributes:
|
|
31
|
+
label: Python version
|
|
32
|
+
placeholder: e.g. 3.12.3
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest an enhancement to pfig
|
|
3
|
+
title: "feat: "
|
|
4
|
+
labels:
|
|
5
|
+
- enhancement
|
|
6
|
+
body:
|
|
7
|
+
- type: textarea
|
|
8
|
+
id: problem
|
|
9
|
+
attributes:
|
|
10
|
+
label: Problem or use case
|
|
11
|
+
description: What problem are you trying to solve?
|
|
12
|
+
validations:
|
|
13
|
+
required: true
|
|
14
|
+
- type: textarea
|
|
15
|
+
id: proposal
|
|
16
|
+
attributes:
|
|
17
|
+
label: Proposed solution
|
|
18
|
+
description: How would you like pfig to behave?
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
- uses: actions/setup-python@v7
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
cache: pip
|
|
22
|
+
- uses: actions/setup-node@v7
|
|
23
|
+
with:
|
|
24
|
+
node-version: "24"
|
|
25
|
+
cache: npm
|
|
26
|
+
cache-dependency-path: webview/package-lock.json
|
|
27
|
+
- run: pip install -e ".[dev,remote,lsp]"
|
|
28
|
+
- run: pre-commit run --all-files --show-diff-on-failure
|
|
29
|
+
|
|
30
|
+
test:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v7
|
|
38
|
+
- uses: actions/setup-python@v7
|
|
39
|
+
with:
|
|
40
|
+
python-version: ${{ matrix.python-version }}
|
|
41
|
+
cache: pip
|
|
42
|
+
- run: pip install -e ".[dev,remote,lsp]"
|
|
43
|
+
- run: pytest --cov=pfig --cov-report=xml --cov-report=term
|
|
44
|
+
- uses: codecov/codecov-action@v7
|
|
45
|
+
if: matrix.python-version == '3.12'
|
|
46
|
+
with:
|
|
47
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
48
|
+
files: coverage.xml
|
|
49
|
+
fail_ci_if_error: false
|
|
50
|
+
|
|
51
|
+
webview:
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v7
|
|
55
|
+
- uses: actions/setup-node@v7
|
|
56
|
+
with:
|
|
57
|
+
node-version: "24"
|
|
58
|
+
cache: npm
|
|
59
|
+
cache-dependency-path: webview/package-lock.json
|
|
60
|
+
- run: npm ci
|
|
61
|
+
working-directory: webview
|
|
62
|
+
- run: npm run test
|
|
63
|
+
working-directory: webview
|
|
64
|
+
- run: npm run build
|
|
65
|
+
working-directory: webview
|
|
66
|
+
- run: git diff --exit-code -- pfig/vis/assets
|
|
67
|
+
|
|
68
|
+
docs:
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/checkout@v7
|
|
72
|
+
- uses: actions/setup-python@v7
|
|
73
|
+
|
|
74
|
+
with:
|
|
75
|
+
python-version: "3.12"
|
|
76
|
+
cache: pip
|
|
77
|
+
- run: pip install -e ".[docs]"
|
|
78
|
+
- run: mkdocs build --strict
|
|
79
|
+
|
|
80
|
+
package:
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/checkout@v7
|
|
84
|
+
with:
|
|
85
|
+
fetch-depth: 0
|
|
86
|
+
- uses: actions/setup-python@v7
|
|
87
|
+
with:
|
|
88
|
+
python-version: "3.12"
|
|
89
|
+
cache: pip
|
|
90
|
+
- run: pip install build twine
|
|
91
|
+
- run: python -m build
|
|
92
|
+
- run: python -m twine check dist/*
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Deploy docs
|
|
2
|
+
|
|
3
|
+
# Publishes MkDocs output to Cloudflare Pages (https://pfig.dev/).
|
|
4
|
+
# Required repository secrets:
|
|
5
|
+
# CLOUDFLARE_API_TOKEN - API token with Cloudflare Pages edit permission
|
|
6
|
+
# CLOUDFLARE_ACCOUNT_ID - Cloudflare account ID for the Pages project
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches: [main]
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: cloudflare-pages-docs
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy:
|
|
19
|
+
if: github.ref == 'refs/heads/main'
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v7
|
|
25
|
+
- uses: actions/setup-python@v7
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
cache: pip
|
|
29
|
+
- run: pip install -e ".[docs]"
|
|
30
|
+
- run: mkdocs build --strict
|
|
31
|
+
- uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3
|
|
32
|
+
with:
|
|
33
|
+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
34
|
+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
35
|
+
command: pages deploy site --project-name=pfig --branch=main
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
pypi:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
- uses: actions/setup-python@v7
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
cache: pip
|
|
23
|
+
- run: pip install build twine
|
|
24
|
+
- run: python -m build
|
|
25
|
+
- run: python -m twine check dist/*
|
|
26
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
pfig-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
/public
|
|
123
|
+
/tmp
|
|
124
|
+
|
|
125
|
+
# mypy
|
|
126
|
+
.mypy_cache/
|
|
127
|
+
.dmypy.json
|
|
128
|
+
dmypy.json
|
|
129
|
+
|
|
130
|
+
# Pyre type checker
|
|
131
|
+
.pyre/
|
|
132
|
+
|
|
133
|
+
# IDE and Editor files
|
|
134
|
+
.cursor/
|
|
135
|
+
.vscode/
|
|
136
|
+
.idea/
|
|
137
|
+
*.swp
|
|
138
|
+
*.swo
|
|
139
|
+
*~
|
|
140
|
+
|
|
141
|
+
# OS generated files
|
|
142
|
+
.DS_Store
|
|
143
|
+
.DS_Store?
|
|
144
|
+
._*
|
|
145
|
+
.Spotlight-V100
|
|
146
|
+
.Trashes
|
|
147
|
+
ehthumbs.db
|
|
148
|
+
Thumbs.db
|
|
149
|
+
|
|
150
|
+
# Project-specific files
|
|
151
|
+
# ML data and models
|
|
152
|
+
data/
|
|
153
|
+
*.pth
|
|
154
|
+
*.pt
|
|
155
|
+
*.pkl
|
|
156
|
+
*.pickle
|
|
157
|
+
model_checkpoints/
|
|
158
|
+
wandb/
|
|
159
|
+
tensorboard_logs/
|
|
160
|
+
mlruns/
|
|
161
|
+
|
|
162
|
+
# Graph viewer dependencies
|
|
163
|
+
/webview/node_modules/
|
|
164
|
+
|
|
165
|
+
# pfig-specific
|
|
166
|
+
*.pfig.cache
|
|
167
|
+
snapshots/
|
|
168
|
+
profiles/
|
|
169
|
+
!examples/**/profiles/
|
|
170
|
+
!tests/fmt/examples/**/profiles/
|
|
171
|
+
.pfig/
|
|
172
|
+
|
|
173
|
+
# Examples are now working - removed from gitignore
|
|
174
|
+
|
|
175
|
+
# Temporary and backup files
|
|
176
|
+
*.tmp
|
|
177
|
+
*.temp
|
|
178
|
+
*.bak
|
|
179
|
+
*.backup
|
|
180
|
+
*.orig
|
|
181
|
+
|
|
182
|
+
# Log files
|
|
183
|
+
*.log
|
|
184
|
+
logs/
|
|
185
|
+
|
|
186
|
+
# Configuration overrides (keep templates)
|
|
187
|
+
config.local.pfig
|
|
188
|
+
*.override.pfig
|
|
189
|
+
.env.local
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.15.16
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff-check
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
- repo: local
|
|
9
|
+
hooks:
|
|
10
|
+
- id: pyright
|
|
11
|
+
name: pyright
|
|
12
|
+
entry: pyright
|
|
13
|
+
language: system
|
|
14
|
+
pass_filenames: false
|
|
15
|
+
- id: webview-check
|
|
16
|
+
name: webview tests and build
|
|
17
|
+
entry: bash -c 'cd webview && npm ci && npm run test && npm run build && git -C .. diff --exit-code -- pfig/vis/assets'
|
|
18
|
+
language: system
|
|
19
|
+
pass_filenames: false
|
|
20
|
+
files: ^(webview/|pfig/vis/assets/)
|
pfig-0.1.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Floor division (`//`) in config expressions, with the same precedence as `*` and `/`.
|
|
12
|
+
- Open-source launch readiness: docs, CI, security hardening, examples, and publish workflows.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Execution and targeted validation require only effective reachable externals; rootless compilation keeps whole-file diagnostics. Fresh overlays no longer require or construct replaced arguments. Snapshot roots are checked before construction, and CLI computed snapshots preserve shared identity with the entrypoint. Scoped snapshots record effective fresh recipes for replay.
|
|
16
|
+
- Include aliases now share effective values, providers, and externals. Overrides resolve by inclusion ancestry, not statement order. Duplicate same-file overrides and unresolved sibling overrides fail before construction, even when identical; diamond includes may reuse one authored declaration.
|
|
17
|
+
- References must resolve in their authoring file's explicit dependency scope. Parent roots no longer supply ambient sibling names.
|
|
18
|
+
- Runtime inputs target canonical bindings. Supply repeated externals once; ordered profiles retain precedence across aliases, while conflicting assignments in one input layer fail. Runtime comparison supports cyclic containers without invoking opaque Python object equality. Repeated override paths within a profile are errors even when identical.
|
|
19
|
+
- Snapshot schema is now 2.0. Replay rejects older schemas; use the recorded pfig version for older snapshots. Logs remain readable for inspection.
|
|
20
|
+
|
|
21
|
+
### Removed
|
|
22
|
+
- Mount statements, `--mount`, mount API/settings parameters, and `package://` config discovery. Use explicit filesystem includes and copy/vendor shared `.pfig` files instead.
|
|
23
|
+
- Mount mappings in newly generated snapshots and bundles. Bundle format v2 preserves filesystem include trees; filesystem-only v1 bundles remain readable, while mounted v1 bundles must be recreated.
|
|
24
|
+
|
|
25
|
+
[Unreleased]: https://github.com/pfig-dev/pfig/compare/main...HEAD
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
This project adopts the **Contributor Covenant**, version 2.1.
|
|
4
|
+
|
|
5
|
+
The full text is available at https://www.contributor-covenant.org/version/2/1/code_of_conduct/.
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
|
|
9
|
+
This code applies in all project spaces — the GitHub repository, issue tracker, pull requests, discussions, and any other forum where someone is representing the project or its community.
|
|
10
|
+
|
|
11
|
+
## Reporting
|
|
12
|
+
|
|
13
|
+
To report unacceptable behavior, email **conduct@pfig.dev**. All reports will be reviewed promptly and kept confidential. Project maintainers are obligated to respect the privacy and safety of anyone who reports an incident.
|
|
14
|
+
|
|
15
|
+
Maintainers who do not follow or enforce this code in good faith may face consequences as determined by other project leadership.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Contributing to pfig
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing! pfig is an open-source project and we welcome bug reports, feature requests, and pull requests.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/pfig-dev/pfig.git
|
|
9
|
+
cd pfig
|
|
10
|
+
pip install -e ".[dev,remote,lsp]"
|
|
11
|
+
pre-commit install
|
|
12
|
+
pre-commit run --all-files
|
|
13
|
+
pytest
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Reporting bugs
|
|
17
|
+
|
|
18
|
+
File an issue at https://github.com/pfig-dev/pfig/issues with:
|
|
19
|
+
|
|
20
|
+
- A minimal reproducing `.pfig` snippet (and any Python it depends on).
|
|
21
|
+
- What you expected to happen, what actually happened.
|
|
22
|
+
- pfig version (`pfig --version`) and Python version.
|
|
23
|
+
|
|
24
|
+
## Submitting changes
|
|
25
|
+
|
|
26
|
+
1. Fork the repo and create a topic branch from `main`.
|
|
27
|
+
2. Make your change, including tests.
|
|
28
|
+
3. Run `pre-commit run --all-files` and `pytest` locally. The pre-commit checks include
|
|
29
|
+
formatting, import sorting, and pyright type checking for the `pfig` package.
|
|
30
|
+
4. Open a pull request against `main`. Reference any related issue.
|
|
31
|
+
|
|
32
|
+
By submitting a pull request you agree that your contribution is licensed under the project's Apache 2.0 license.
|
|
33
|
+
|
|
34
|
+
## Full developer guide
|
|
35
|
+
|
|
36
|
+
For architecture, debugging, code style, and the full development workflow, see [docs/developer/developer_guide.md](docs/developer/developer_guide.md).
|
|
37
|
+
|
|
38
|
+
## Code of conduct
|
|
39
|
+
|
|
40
|
+
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). By participating you agree to abide by its terms.
|
|
41
|
+
|
|
42
|
+
## Security
|
|
43
|
+
|
|
44
|
+
Please **do not** file security issues publicly. See [SECURITY.md](SECURITY.md) for how to report vulnerabilities.
|