gyomu-python-analysis 0.5.0__tar.gz → 0.6.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.
- gyomu_python_analysis-0.6.0/.gyomu/concept/$Package.json +37 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/$Directory.json +24 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/$Directory.json +20 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/analyzers/$Directory.json +24 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/analyzers/ast/$Directory.json +18 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/analyzers/expression/$Directory.json +19 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/analyzers/internal/$Directory.json +19 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/extract/$Directory.json +18 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/file/$Directory.json +12 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/parser/$Directory.json +17 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/error/$Directory.json +17 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/path/$Directory.json +17 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/project/$Directory.json +21 -0
- gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/snapshot/$Directory.json +25 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/PKG-INFO +1 -1
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/helpers.py +28 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/cls.py +0 -1
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/functions.py +0 -1
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/initialize.py +12 -2
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/workspace.py +3 -56
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/project/workspace.py +5 -1
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/test_initialize.py +4 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/test_workspace.py +2 -102
- gyomu_python_analysis-0.6.0/tests/unit/snapshot/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/.gitignore +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/README.md +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/experiments/griffe_analysis.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/experiments/griffe_dump.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/experiments/sample/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/experiments/sample/user.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/experiments/sample.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/pyproject.toml +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/pyproject.toml +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/ast/call.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/ast/comprehension.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/ast/for.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/ast/function.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/ast/if.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/ast/match.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/ast/try.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/ast/with.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/01-simple.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/02-args.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/03-typed-return.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/04-raises.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/05-examples.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/06-notes.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/07-complex.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/08-gyomu-context.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/09-custom-section.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/10-edge-cases.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/11-custom-and-gyomu-context.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/12-module.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/13-class.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/14-variable.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/15-custom-list-section.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/docstring/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/import/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/import/all.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/import/all2.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/import/imports.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/import/relative.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/shared.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/call.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/callable.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/classes.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/decorator.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/functions.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/generics.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/location.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/pydantic.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/type_alias.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/types.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/symbol/variable.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/types/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/fixtures/src/analysis/types/name.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/monorepo_fixtures/packages/project_a/pyproject.toml +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/monorepo_fixtures/packages/project_a/src/project_a/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/monorepo_fixtures/packages/project_a/src/project_a/module.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/monorepo_fixtures/packages/project_b/pyproject.toml +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/monorepo_fixtures/packages/project_b/src/project_b/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/monorepo_fixtures/packages/project_b/src/project_b/module.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/monorepo_fixtures/pyproject.toml +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/roadmap.md +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/ast/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/ast/statement.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/ast/symbol.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/context.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/decorator.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/dependency.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/docstring.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/expression/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/expression/expr.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/imports.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/internal/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/internal/common.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/internal/location.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/internal/visibility.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/pydantic.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/type_alias.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/types.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/analyzers/variables.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/delete_cache.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/extract/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/extract/symbols.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/file/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/file/source_file_context.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/get_module.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/load.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/load_file_context.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/load_module.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/metadata.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/parser/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/analysis/parser/docstring.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/error/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/error/analysis.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/path/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/path/conversion.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/project/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/project/context.py +0 -0
- /gyomu_python_analysis-0.5.0/src/gyomu_python_analysis/snapshot/__init__.py → /gyomu_python_analysis-0.6.0/src/gyomu_python_analysis/py.typed +0 -0
- {gyomu_python_analysis-0.5.0/tests/unit → gyomu_python_analysis-0.6.0/src/gyomu_python_analysis/snapshot}/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/snapshot/analyze.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/snapshot/commit.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/snapshot/create.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/snapshot/diff.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/snapshot/models.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/snapshot/project.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/src/gyomu_python_analysis/snapshot/types.py +0 -0
- {gyomu_python_analysis-0.5.0/tests/unit/analysis → gyomu_python_analysis-0.6.0/tests/unit}/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0/tests/unit/analysis/analyzers → gyomu_python_analysis-0.6.0/tests/unit/analysis}/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0/tests/unit/analysis/analyzers/ast → gyomu_python_analysis-0.6.0/tests/unit/analysis/analyzers}/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0/tests/unit/analysis/analyzers/expression → gyomu_python_analysis-0.6.0/tests/unit/analysis/analyzers/ast}/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/conftest.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/helper.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_call.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_comprehension.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_conversion.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_dependency.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_for.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_function.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_if.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_match.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_statement.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_try.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/ast/test_with.py +0 -0
- {gyomu_python_analysis-0.5.0/tests/unit/analysis/analyzers/internal → gyomu_python_analysis-0.6.0/tests/unit/analysis/analyzers/expression}/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/expression/test_analyze_expression_name.py +0 -0
- {gyomu_python_analysis-0.5.0/tests/unit/path → gyomu_python_analysis-0.6.0/tests/unit/analysis/analyzers/internal}/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/internal/test_location.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/internal/test_visibility.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_classes.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_decorator.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_dependency.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_docstring.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_functions.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_imports.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_pydantic.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_type_alias.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_types.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_analyze_variable.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/analyzers/test_context.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/test_get_module.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/test_load.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/test_load_file.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/test_load_module.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/test_metadata.py +0 -0
- {gyomu_python_analysis-0.5.0/tests/unit/snapshot → gyomu_python_analysis-0.6.0/tests/unit/path}/__init__.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/path/test_conversion.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/project/test_config.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/snapshot/test_analyze.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/snapshot/test_commit.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/snapshot/test_create.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/snapshot/test_diff.py +0 -0
- {gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/snapshot/test_project.py +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Gyomu Python Analysis is a comprehensive toolkit for statically analyzing Python projects, workspaces, and language constructs. It provides modular AST-based analyzers for examining classes, functions, types, Pydantic models, and expressions, alongside robust workspace initialization, configuration parsing, and project snapshot tracking capabilities.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Analyze Python source code structures, language constructs, and metadata.",
|
|
5
|
+
"Manage project and workspace initialization, configuration parsing, and module loading contexts.",
|
|
6
|
+
"Create, diff, and manage project snapshots to track code modifications and changes over time.",
|
|
7
|
+
"Build symbol indexes, locations, and identity contexts from source code elements."
|
|
8
|
+
],
|
|
9
|
+
"capabilities": [
|
|
10
|
+
{
|
|
11
|
+
"name": "Python Language Analysis",
|
|
12
|
+
"description": "Examines Python language constructs including classes, functions, variables, imports, dependencies, docstrings, type aliases, and Pydantic models."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "AST Parsing and Indexing",
|
|
16
|
+
"description": "Parses Python Abstract Syntax Trees to analyze statements, expressions, and build symbol indexes and identities."
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Workspace and Project Management",
|
|
20
|
+
"description": "Initializes project and workspace contexts, reads configurations, manages module loading, and handles caching."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Snapshot and Version Tracking",
|
|
24
|
+
"description": "Tracks file modifications, diffs changes between versions, and handles project snapshot creation, validation, and persistence."
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"design_decisions": [
|
|
28
|
+
"Employs modular AST-based analyzers to decompose Python language constructs into structured representations.",
|
|
29
|
+
"Maintains explicit project and workspace contexts to support multi-project configurations and source root resolution.",
|
|
30
|
+
"Utilizes snapshot tracking with file hashing and modification timestamps to detect and analyze project changes efficiently."
|
|
31
|
+
],
|
|
32
|
+
"usage_guidance": [
|
|
33
|
+
"Use the workspace and project initialization modules to set up analysis contexts from project configurations.",
|
|
34
|
+
"Leverage the core analyzers and AST utilities to inspect Python source code constructs and extract symbol metadata.",
|
|
35
|
+
"Employ snapshot and diffing workflows to track modifications and analyze changes across project files."
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Provides core Python analysis capabilities, including project and workspace initialization, configuration management, path conversion, custom error handling, and snapshot tracking workflows.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Initialize project and workspace contexts, parse configurations, and manage file and module analysis.",
|
|
5
|
+
"Define custom error types and analysis phases for Python analysis operations.",
|
|
6
|
+
"Translate between various path formats including project-relative, source-relative, python, and full paths.",
|
|
7
|
+
"Manage project configurations and workspace structures.",
|
|
8
|
+
"Track file modifications, compute diffs, and handle snapshot creation, validation, and commit workflows."
|
|
9
|
+
],
|
|
10
|
+
"concepts": [
|
|
11
|
+
"project analysis",
|
|
12
|
+
"configuration management",
|
|
13
|
+
"path conversion",
|
|
14
|
+
"error handling",
|
|
15
|
+
"project snapshot"
|
|
16
|
+
],
|
|
17
|
+
"relationships": [
|
|
18
|
+
"Project and workspace contexts configure project analysis and snapshot management workflows."
|
|
19
|
+
],
|
|
20
|
+
"design_decisions": [
|
|
21
|
+
"Modular structure organizing core analysis functions into domain-specific subpackages such as analysis, error, path, project, and snapshot."
|
|
22
|
+
],
|
|
23
|
+
"importance": "Core"
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Performs project and workspace initialization, reads project configurations, manages module loading, caching, and file analysis contexts.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Initialize project contexts and parse project configurations from workspace structures, load and manage module and file analysis contexts, and delete module caches."
|
|
5
|
+
],
|
|
6
|
+
"concepts": [
|
|
7
|
+
"project initialization",
|
|
8
|
+
"module loading and analysis",
|
|
9
|
+
"workspace configuration",
|
|
10
|
+
"file analysis context",
|
|
11
|
+
"cache management"
|
|
12
|
+
],
|
|
13
|
+
"relationships": [
|
|
14
|
+
"Project initialization handles workspace configurations and source roots."
|
|
15
|
+
],
|
|
16
|
+
"design_decisions": [
|
|
17
|
+
"Modular functions for project initialization, module loading, caching, workspace handling, and file context loading."
|
|
18
|
+
],
|
|
19
|
+
"importance": "Core"
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Provides core analyzer modules for examining Python language constructs such as classes, functions, dependencies, docstrings, imports, Pydantic models, type aliases, types, and variables, along with symbol context management.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Analyze Python classes, functions, dependencies, docstrings, imports, Pydantic models, type aliases, types, and variables, and manage symbol context and identity during code analysis."
|
|
5
|
+
],
|
|
6
|
+
"concepts": [
|
|
7
|
+
"class analysis",
|
|
8
|
+
"function analysis",
|
|
9
|
+
"dependency analysis",
|
|
10
|
+
"docstring analysis",
|
|
11
|
+
"import analysis",
|
|
12
|
+
"pydantic analysis",
|
|
13
|
+
"type analysis",
|
|
14
|
+
"variable analysis",
|
|
15
|
+
"symbol context"
|
|
16
|
+
],
|
|
17
|
+
"relationships": [
|
|
18
|
+
"Code analysis uses specialized analyzers for classes, functions, dependencies, docstrings, imports, pydantic models, type aliases, types, and variables alongside symbol context management."
|
|
19
|
+
],
|
|
20
|
+
"design_decisions": [
|
|
21
|
+
"Modular analysis routines for specific Python code constructs and features"
|
|
22
|
+
],
|
|
23
|
+
"importance": "Core"
|
|
24
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Provides AST-based code analysis capabilities, including functions to analyze Python statements and expressions as well as utilities for building symbol indexes.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Provides functions to analyze statements, expressions, tuples, slices, sets, arrays, and dictionaries using Abstract Syntax Trees.",
|
|
5
|
+
"Builds class and function indexes and AST indexes from source code symbols."
|
|
6
|
+
],
|
|
7
|
+
"concepts": [
|
|
8
|
+
"AST statement analysis",
|
|
9
|
+
"AST symbol indexing"
|
|
10
|
+
],
|
|
11
|
+
"relationships": [
|
|
12
|
+
"Statement analysis and symbol indexing are components of AST-based code analysis."
|
|
13
|
+
],
|
|
14
|
+
"design_decisions": [
|
|
15
|
+
"Organizes analysis routines into specialized modules for statements, expressions, and symbols."
|
|
16
|
+
],
|
|
17
|
+
"importance": "Core"
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Provides functions for analyzing various types of Python expressions, including constants, subscripts, dictionaries, arrays, literals, type expressions, tuples, sets, and expression names, alongside literal value parsing.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"analyze Python expressions including constants, subscripts, dictionaries, arrays, literals, type expressions, tuples, sets, and expression names",
|
|
5
|
+
"parse literal values"
|
|
6
|
+
],
|
|
7
|
+
"concepts": [
|
|
8
|
+
"expression analysis",
|
|
9
|
+
"literal parsing",
|
|
10
|
+
"type expression analysis"
|
|
11
|
+
],
|
|
12
|
+
"relationships": [
|
|
13
|
+
"analyze expression delegates to specific analyzers for constants, subscripts, dictionaries, arrays, literals, type expressions, tuples, sets, and expression names"
|
|
14
|
+
],
|
|
15
|
+
"design_decisions": [
|
|
16
|
+
"modular expression analysis functions"
|
|
17
|
+
],
|
|
18
|
+
"importance": "Core"
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Houses internal helper utilities supporting analysis functionality, specifically providing common building blocks, location calculation, and visibility determination for code analysis.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Provide internal helper utilities for code analysis including calculating symbol locations, determining visibility, and building common components."
|
|
5
|
+
],
|
|
6
|
+
"concepts": [
|
|
7
|
+
"internal analysis helpers",
|
|
8
|
+
"symbol location calculation",
|
|
9
|
+
"visibility calculation",
|
|
10
|
+
"common analyzer components"
|
|
11
|
+
],
|
|
12
|
+
"relationships": [
|
|
13
|
+
"Internal analysis modules provide shared calculation utilities for location, visibility, and common metadata attributes."
|
|
14
|
+
],
|
|
15
|
+
"design_decisions": [
|
|
16
|
+
"Internal module helper functions are grouped together to support analysis logic."
|
|
17
|
+
],
|
|
18
|
+
"importance": "Core"
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Provides core symbol extraction capabilities and context management for analyzing Python source code.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Extract symbols from Python code analysis.",
|
|
5
|
+
"Manage context used during symbol extraction."
|
|
6
|
+
],
|
|
7
|
+
"concepts": [
|
|
8
|
+
"Symbol Extraction",
|
|
9
|
+
"Symbol Extract Context"
|
|
10
|
+
],
|
|
11
|
+
"relationships": [
|
|
12
|
+
"SymbolExtractContext provides configuration and context for extract_symbols."
|
|
13
|
+
],
|
|
14
|
+
"design_decisions": [
|
|
15
|
+
"Provides functional extraction logic operating within a specific context."
|
|
16
|
+
],
|
|
17
|
+
"importance": "Core"
|
|
18
|
+
}
|
gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/file/$Directory.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Provides file-level analysis context and source file representation for Python code analysis.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Manage source file context for analysis"
|
|
5
|
+
],
|
|
6
|
+
"concepts": [
|
|
7
|
+
"source file context"
|
|
8
|
+
],
|
|
9
|
+
"relationships": [],
|
|
10
|
+
"design_decisions": [],
|
|
11
|
+
"importance": "Core"
|
|
12
|
+
}
|
gyomu_python_analysis-0.6.0/.gyomu/concept/src/gyomu_python_analysis/analysis/parser/$Directory.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "The parser directory is responsible for analyzing and parsing code documentation, specifically providing docstring parsing capabilities for python analysis.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Parse docstrings to extract analysis information"
|
|
5
|
+
],
|
|
6
|
+
"concepts": [
|
|
7
|
+
"parser",
|
|
8
|
+
"docstring parser"
|
|
9
|
+
],
|
|
10
|
+
"relationships": [
|
|
11
|
+
"DocstringParser provides docstring analysis functionality within the parser module."
|
|
12
|
+
],
|
|
13
|
+
"design_decisions": [
|
|
14
|
+
"modular parsing organization"
|
|
15
|
+
],
|
|
16
|
+
"importance": "Core"
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Provides error handling and analysis phase definitions for Python analysis operations, including custom exception types.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Define error types and analysis phases for Python analysis operations."
|
|
5
|
+
],
|
|
6
|
+
"concepts": [
|
|
7
|
+
"Python Analysis error",
|
|
8
|
+
"AnalysisPhase"
|
|
9
|
+
],
|
|
10
|
+
"relationships": [
|
|
11
|
+
"AnalysisError incorporates or references AnalysisPhase to represent Python analysis errors."
|
|
12
|
+
],
|
|
13
|
+
"design_decisions": [
|
|
14
|
+
"Defines custom error types and analysis phases for Python analysis operations."
|
|
15
|
+
],
|
|
16
|
+
"importance": "Core"
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Provides path conversion and manipulation utilities to translate between different path formats including project-relative paths, source-relative paths, python paths, and full paths.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"converts various path representations such as project-relative paths, source-relative paths, python paths, and full paths"
|
|
5
|
+
],
|
|
6
|
+
"concepts": [
|
|
7
|
+
"path conversion",
|
|
8
|
+
"path manipulation"
|
|
9
|
+
],
|
|
10
|
+
"relationships": [
|
|
11
|
+
"converts project-relative paths, source-relative paths, python paths, and full paths to each other using path conversion functions"
|
|
12
|
+
],
|
|
13
|
+
"design_decisions": [
|
|
14
|
+
"provides functions to convert between project-relative paths, source-relative paths, python paths, and full paths"
|
|
15
|
+
],
|
|
16
|
+
"importance": "Core"
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Manages project configuration, context, and workspace definitions, encapsulating settings parsed from configuration files and workspace structures.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Manage project configuration settings parsed from pyproject.toml files.",
|
|
5
|
+
"Encapsulate project context including roots, configurations, and loaders.",
|
|
6
|
+
"Define workspace configurations, roots, and constituent projects."
|
|
7
|
+
],
|
|
8
|
+
"concepts": [
|
|
9
|
+
"Project Context",
|
|
10
|
+
"Workspace Configuration",
|
|
11
|
+
"PyProject Config"
|
|
12
|
+
],
|
|
13
|
+
"relationships": [
|
|
14
|
+
"ProjectContext encapsulates PyProjectConfig and project metadata.",
|
|
15
|
+
"WorkspaceContext contains WorkspaceConfig and WorkspaceProject instances."
|
|
16
|
+
],
|
|
17
|
+
"design_decisions": [
|
|
18
|
+
"Encapsulates project context and workspace structures into object representations."
|
|
19
|
+
],
|
|
20
|
+
"importance": "Core"
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"summary": "Manages project snapshots, tracking file modifications, diffing changes between snapshots, and handling snapshot creation, validation, and commit workflows.",
|
|
3
|
+
"responsibilities": [
|
|
4
|
+
"Create and manage project snapshots including target files, hashes, and modification timestamps.",
|
|
5
|
+
"Analyze, diff, and commit project changes by comparing snapshots.",
|
|
6
|
+
"Manage project snapshot workspaces and persistence."
|
|
7
|
+
],
|
|
8
|
+
"concepts": [
|
|
9
|
+
"project snapshot",
|
|
10
|
+
"project changes",
|
|
11
|
+
"file snapshots",
|
|
12
|
+
"snapshot diff",
|
|
13
|
+
"snapshot workspace"
|
|
14
|
+
],
|
|
15
|
+
"relationships": [
|
|
16
|
+
"Project changes analysis compares previous and current snapshots.",
|
|
17
|
+
"Diffing computes differences between previous and current project snapshots.",
|
|
18
|
+
"Committing validates the project snapshot and commits changes.",
|
|
19
|
+
"Creating a project snapshot enumerates target files and generates file snapshots."
|
|
20
|
+
],
|
|
21
|
+
"design_decisions": [
|
|
22
|
+
"Exports functions for creating, validating, committing, analyzing, and diffing project snapshots."
|
|
23
|
+
],
|
|
24
|
+
"importance": "Core"
|
|
25
|
+
}
|
{gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/python_analysis_test_support/helpers.py
RENAMED
|
@@ -16,6 +16,11 @@ from gyomu_python_analysis.analysis.initialize import initialize_project_context
|
|
|
16
16
|
from gyomu_python_analysis.analysis.load import load_module
|
|
17
17
|
from gyomu_python_analysis.analysis.load_module import load_module_analysis
|
|
18
18
|
from gyomu_python_analysis.project.context import ProjectContext, PyProjectConfig
|
|
19
|
+
from gyomu_python_analysis.project.workspace import (
|
|
20
|
+
WorkspaceProject,
|
|
21
|
+
WorkspaceRoot,
|
|
22
|
+
WorkspaceRootKind,
|
|
23
|
+
)
|
|
19
24
|
from gyomu_python_analysis.snapshot.models import (
|
|
20
25
|
AnalyzeProjectChangesResult,
|
|
21
26
|
)
|
|
@@ -55,6 +60,23 @@ _default_project_config = PyProjectConfig(
|
|
|
55
60
|
_toml_data={},
|
|
56
61
|
)
|
|
57
62
|
|
|
63
|
+
_default_workspace_path = WorkspaceRelativePath(Path("."))
|
|
64
|
+
_default_pyproject = PyProjectConfig(
|
|
65
|
+
path=_default_workspace_path,
|
|
66
|
+
name="test",
|
|
67
|
+
description="",
|
|
68
|
+
formatter_line_length=88,
|
|
69
|
+
version="1.0",
|
|
70
|
+
_toml_data={},
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def create_workspace_project(
|
|
75
|
+
path: WorkspaceRelativePath = _default_workspace_path,
|
|
76
|
+
config: PyProjectConfig = _default_pyproject,
|
|
77
|
+
) -> WorkspaceProject:
|
|
78
|
+
return WorkspaceProject(path=path, config=config)
|
|
79
|
+
|
|
58
80
|
|
|
59
81
|
def _create_context() -> ProjectContext:
|
|
60
82
|
return initialize_project_context(
|
|
@@ -103,6 +125,12 @@ def create_project_snapshot(
|
|
|
103
125
|
return ProjectSnapshot(project_root=project_root, files=files)
|
|
104
126
|
|
|
105
127
|
|
|
128
|
+
def create_workspace_root(
|
|
129
|
+
path: FullPath, kind: WorkspaceRootKind = WorkspaceRootKind.UV_WORKSPACE
|
|
130
|
+
) -> WorkspaceRoot:
|
|
131
|
+
return WorkspaceRoot(path=path, kind=kind)
|
|
132
|
+
|
|
133
|
+
|
|
106
134
|
def create_analyze_project_change(
|
|
107
135
|
current_snapshot: ProjectSnapshot,
|
|
108
136
|
project_id: str = "ABC",
|
|
@@ -36,11 +36,16 @@ def initialize_project_from_workspace(
|
|
|
36
36
|
files = find_included_python_files(
|
|
37
37
|
project_root=project_root, source_root=source_root
|
|
38
38
|
)
|
|
39
|
+
package_roots = find_package_roots(
|
|
40
|
+
project_root=project_root,
|
|
41
|
+
source_root=source_root,
|
|
42
|
+
)
|
|
39
43
|
return ProjectContext(
|
|
40
44
|
project_root=project_root,
|
|
41
45
|
source_root=source_root,
|
|
42
46
|
config=project.config,
|
|
43
47
|
included_files=files,
|
|
48
|
+
package_roots=package_roots,
|
|
44
49
|
)
|
|
45
50
|
|
|
46
51
|
|
|
@@ -92,6 +97,11 @@ def find_package_roots(
|
|
|
92
97
|
project_root: FullPath,
|
|
93
98
|
source_root: ProjectRelativePath,
|
|
94
99
|
) -> tuple[ProjectRelativePath, ...]:
|
|
100
|
+
"""Find package root directories within the source root.
|
|
101
|
+
|
|
102
|
+
Find all package root directories containing an `__init__.py` file within the source
|
|
103
|
+
root.
|
|
104
|
+
"""
|
|
95
105
|
source_path = project_root / source_root
|
|
96
106
|
|
|
97
107
|
return tuple(
|
|
@@ -127,13 +137,13 @@ def analyze_project_config(
|
|
|
127
137
|
project_root: FullPath,
|
|
128
138
|
toml_data: dict[str, Any],
|
|
129
139
|
project_relative_path: WorkspaceRelativePath | None = None,
|
|
130
|
-
workspace_config:
|
|
140
|
+
workspace_config: PyProjectConfig | None = None,
|
|
131
141
|
) -> Result[PyProjectConfig, AnalysisError]:
|
|
132
142
|
"""Analyze the project configuration from parsed pyproject.toml data."""
|
|
133
143
|
|
|
134
144
|
if project_relative_path is None:
|
|
135
145
|
project_relative_path = WorkspaceRelativePath(Path("."))
|
|
136
|
-
project = toml_data
|
|
146
|
+
project = toml_data.get("project", {})
|
|
137
147
|
name = project.get("name", "")
|
|
138
148
|
description = project.get("description", None)
|
|
139
149
|
is_version_dynamic = "dynamic" in project and "version" in project["dynamic"]
|
|
@@ -10,7 +10,6 @@ from returns.result import Failure, Result, Success
|
|
|
10
10
|
from gyomu_python_analysis.analysis.initialize import analyze_project_config
|
|
11
11
|
from gyomu_python_analysis.error.analysis import AnalysisError
|
|
12
12
|
from gyomu_python_analysis.project.workspace import (
|
|
13
|
-
WorkspaceConfig,
|
|
14
13
|
WorkspaceContext,
|
|
15
14
|
WorkspaceProject,
|
|
16
15
|
WorkspaceRoot,
|
|
@@ -126,60 +125,6 @@ def is_uv_workspace(toml_data: dict[str, Any]) -> bool:
|
|
|
126
125
|
)
|
|
127
126
|
|
|
128
127
|
|
|
129
|
-
def initialize_workspace_config(
|
|
130
|
-
path: FullPath, toml_data: dict[str, Any]
|
|
131
|
-
) -> Result[WorkspaceConfig, AnalysisError]:
|
|
132
|
-
"""Initializes workspace configuration.
|
|
133
|
-
|
|
134
|
-
Initializes workspace configuration from pyproject.toml data.
|
|
135
|
-
|
|
136
|
-
Args:
|
|
137
|
-
path (FullPath): The path to the workspace root or project.
|
|
138
|
-
toml_data (dict[str, Any]): The parsed TOML data dictionary.
|
|
139
|
-
|
|
140
|
-
Returns:
|
|
141
|
-
Result[WorkspaceConfig, AnalysisError]: A Result containing the WorkspaceConfig
|
|
142
|
-
on success, or an AnalysisError on failure.
|
|
143
|
-
"""
|
|
144
|
-
try:
|
|
145
|
-
name = None
|
|
146
|
-
description = None
|
|
147
|
-
if "project" in toml_data:
|
|
148
|
-
project = toml_data["project"]
|
|
149
|
-
name = project.get("name", None)
|
|
150
|
-
description = project.get("description", None)
|
|
151
|
-
|
|
152
|
-
formatter_line_length: int | None = None
|
|
153
|
-
tool = toml_data.get("tool")
|
|
154
|
-
if (
|
|
155
|
-
isinstance(tool, dict)
|
|
156
|
-
and isinstance(tool.get("ruff"), dict)
|
|
157
|
-
and "line-length" in tool["ruff"]
|
|
158
|
-
):
|
|
159
|
-
formatter_line_length = int(tool["ruff"]["line-length"])
|
|
160
|
-
|
|
161
|
-
if formatter_line_length is None:
|
|
162
|
-
formatter_line_length = 88
|
|
163
|
-
|
|
164
|
-
return Success(
|
|
165
|
-
WorkspaceConfig(
|
|
166
|
-
path=path,
|
|
167
|
-
name=name,
|
|
168
|
-
description=description,
|
|
169
|
-
formatter_line_length=formatter_line_length,
|
|
170
|
-
)
|
|
171
|
-
)
|
|
172
|
-
except ValueError:
|
|
173
|
-
return Failure(
|
|
174
|
-
AnalysisError(
|
|
175
|
-
"fail to parse root pyproject.toml",
|
|
176
|
-
file_path=path,
|
|
177
|
-
phase="workspace-discovery",
|
|
178
|
-
context="gyomu_python_analysis.analysis.workspace.intialize_workspace_config",
|
|
179
|
-
)
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
|
|
183
128
|
def get_uv_workspace_members(toml_data: dict[str, Any]) -> list[str]:
|
|
184
129
|
"""Retrieves member paths from a uv workspace configuration.
|
|
185
130
|
|
|
@@ -226,7 +171,7 @@ def initialize_workspace_context(
|
|
|
226
171
|
return toml_result
|
|
227
172
|
|
|
228
173
|
toml_data = toml_result.unwrap()
|
|
229
|
-
config_result =
|
|
174
|
+
config_result = analyze_project_config(root.path, toml_data)
|
|
230
175
|
if isinstance(config_result, Failure):
|
|
231
176
|
return config_result
|
|
232
177
|
|
|
@@ -238,6 +183,7 @@ def initialize_workspace_context(
|
|
|
238
183
|
return project_config_result
|
|
239
184
|
return Success(
|
|
240
185
|
WorkspaceContext(
|
|
186
|
+
path=root.path,
|
|
241
187
|
config=config_result.unwrap(),
|
|
242
188
|
projects=tuple(
|
|
243
189
|
[
|
|
@@ -281,6 +227,7 @@ def initialize_workspace_context(
|
|
|
281
227
|
)
|
|
282
228
|
return Success(
|
|
283
229
|
WorkspaceContext(
|
|
230
|
+
path=root.path,
|
|
284
231
|
config=config_result.unwrap(),
|
|
285
232
|
projects=tuple(projects),
|
|
286
233
|
)
|
|
@@ -46,8 +46,12 @@ class WorkspaceContext:
|
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
48
|
def __init__(
|
|
49
|
-
self,
|
|
49
|
+
self,
|
|
50
|
+
path: FullPath,
|
|
51
|
+
config: PyProjectConfig,
|
|
52
|
+
projects: tuple[WorkspaceProject, ...],
|
|
50
53
|
) -> None:
|
|
54
|
+
self.path = path
|
|
51
55
|
self.config = config
|
|
52
56
|
self.projects = projects
|
|
53
57
|
|
{gyomu_python_analysis-0.5.0 → gyomu_python_analysis-0.6.0}/tests/unit/analysis/test_initialize.py
RENAMED
|
@@ -269,6 +269,10 @@ class TestInitializeProjectFromWorkspace:
|
|
|
269
269
|
"gyomu_python_analysis.analysis.initialize.resolve_source_root",
|
|
270
270
|
return_value=ProjectRelativePath(Path("src")),
|
|
271
271
|
)
|
|
272
|
+
mocker.patch(
|
|
273
|
+
"gyomu_python_analysis.analysis.initialize.find_package_roots",
|
|
274
|
+
return_value=tuple(),
|
|
275
|
+
)
|
|
272
276
|
|
|
273
277
|
result = initialize_project_from_workspace(workspace, project)
|
|
274
278
|
|