modwire 1.0.0__tar.gz → 1.1.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.
- modwire-1.1.1/.github/ISSUE_TEMPLATE/bug_report.yml +106 -0
- modwire-1.1.1/.github/ISSUE_TEMPLATE/config.yml +1 -0
- modwire-1.1.1/.github/ISSUE_TEMPLATE/feature_request.yml +70 -0
- modwire-1.1.1/.github/PULL_REQUEST_TEMPLATE.md +14 -0
- {modwire-1.0.0 → modwire-1.1.1}/.github/workflows/ci.yml +1 -0
- modwire-1.1.1/CONTRIBUTING.md +48 -0
- {modwire-1.0.0 → modwire-1.1.1}/PKG-INFO +20 -4
- {modwire-1.0.0 → modwire-1.1.1}/README.md +16 -0
- modwire-1.1.1/docs/wiki/Development-checks.md +20 -0
- modwire-1.1.1/docs/wiki/Home.md +28 -0
- modwire-1.1.1/docs/wiki/Reporting-bugs.md +26 -0
- modwire-1.1.1/docs/wiki/Requesting-features.md +26 -0
- {modwire-1.0.0 → modwire-1.1.1}/pyproject.toml +3 -3
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/__init__.py +3 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/_version.py +3 -3
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/definitions.py +35 -0
- modwire-1.1.1/src/modwire/exports.py +188 -0
- modwire-1.1.1/src/modwire/extractors/base.py +340 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extractors/php.py +26 -1
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extractors/python.py +38 -1
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extractors/scripts/php_extractor.php +50 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extractors/scripts/python_extractor.py +211 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extractors/scripts/typescript_extractor.js +297 -4
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extractors/typescript.py +29 -1
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire.egg-info/PKG-INFO +20 -4
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire.egg-info/SOURCES.txt +10 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/test_api.py +338 -0
- modwire-1.0.0/src/modwire/extractors/base.py +0 -177
- {modwire-1.0.0 → modwire-1.1.1}/.github/workflows/release.yml +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/.gitignore +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/LICENSE +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/setup.cfg +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/show_test_source_files.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/architecture/__init__.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/architecture/analyzers.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/architecture/matching.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/architecture/policy.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/architecture/render.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/architecture/violations.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extraction.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extractors/__init__.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/extractors/loader.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire/graph.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire.egg-info/dependency_links.txt +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire.egg-info/requires.txt +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/src/modwire.egg-info/top_level.txt +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/php/ignored/generated.php +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/php/src/application/use_cases/activate.php +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/php/src/domain/model/user.php +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/php/src/domain/services/policy.php +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/php/src/interfaces/http/controller.php +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/python/ignored/generated.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/python/src/application/use_cases/activate.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/python/src/domain/model/user.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/python/src/domain/services/policy.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/python/src/interfaces/http/controller.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/typescript/ignored/generated.ts +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/typescript/src/application/use_cases/activate.ts +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/typescript/src/domain/model/profile.tsx +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/typescript/src/domain/model/user.ts +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/typescript/src/domain/services/audit.js +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/typescript/src/domain/services/policy.ts +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/typescript/src/interfaces/http/controller.ts +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/apps/typescript/src/interfaces/http/view.jsx +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/test_architecture_api.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/tests/test_standalone.py +0 -0
- {modwire-1.0.0 → modwire-1.1.1}/uv.lock +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report incorrect extraction, graph output, architecture analysis, packaging, or runtime behavior.
|
|
3
|
+
title: "Bug: "
|
|
4
|
+
labels:
|
|
5
|
+
- bug
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Thanks for reporting a bug. Clear reproduction details make it much easier to fix issues in extractors and graph analysis.
|
|
11
|
+
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: summary
|
|
14
|
+
attributes:
|
|
15
|
+
label: What happened?
|
|
16
|
+
description: Describe the bug and the behavior you expected instead.
|
|
17
|
+
placeholder: Modwire returned...
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
- type: dropdown
|
|
22
|
+
id: area
|
|
23
|
+
attributes:
|
|
24
|
+
label: Affected area
|
|
25
|
+
options:
|
|
26
|
+
- Python extractor
|
|
27
|
+
- TypeScript/JavaScript extractor
|
|
28
|
+
- PHP extractor
|
|
29
|
+
- Dependency graph
|
|
30
|
+
- Architecture policy API
|
|
31
|
+
- Packaging or installation
|
|
32
|
+
- Documentation
|
|
33
|
+
- Other
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
|
|
37
|
+
- type: textarea
|
|
38
|
+
id: reproduce
|
|
39
|
+
attributes:
|
|
40
|
+
label: How can we reproduce it?
|
|
41
|
+
description: Include the smallest source tree, snippet, command, or test case that shows the problem.
|
|
42
|
+
placeholder: |
|
|
43
|
+
1. Create this file...
|
|
44
|
+
2. Run this code...
|
|
45
|
+
3. Observe...
|
|
46
|
+
validations:
|
|
47
|
+
required: true
|
|
48
|
+
|
|
49
|
+
- type: textarea
|
|
50
|
+
id: actual
|
|
51
|
+
attributes:
|
|
52
|
+
label: Actual output
|
|
53
|
+
description: Paste the returned objects, graph edges, violation output, traceback, or command output.
|
|
54
|
+
render: text
|
|
55
|
+
validations:
|
|
56
|
+
required: false
|
|
57
|
+
|
|
58
|
+
- type: textarea
|
|
59
|
+
id: expected
|
|
60
|
+
attributes:
|
|
61
|
+
label: Expected output
|
|
62
|
+
description: Describe the graph, source IDs, symbols, imports, or violations you expected.
|
|
63
|
+
validations:
|
|
64
|
+
required: false
|
|
65
|
+
|
|
66
|
+
- type: input
|
|
67
|
+
id: modwire-version
|
|
68
|
+
attributes:
|
|
69
|
+
label: Modwire version
|
|
70
|
+
description: Run `python -m pip show modwire` or identify the commit SHA if installed from source.
|
|
71
|
+
placeholder: 0.0.0 or commit SHA
|
|
72
|
+
validations:
|
|
73
|
+
required: false
|
|
74
|
+
|
|
75
|
+
- type: input
|
|
76
|
+
id: python-version
|
|
77
|
+
attributes:
|
|
78
|
+
label: Python version
|
|
79
|
+
placeholder: "3.11, 3.12, or 3.13"
|
|
80
|
+
validations:
|
|
81
|
+
required: true
|
|
82
|
+
|
|
83
|
+
- type: input
|
|
84
|
+
id: runtime-versions
|
|
85
|
+
attributes:
|
|
86
|
+
label: Node.js or PHP version, if relevant
|
|
87
|
+
description: TypeScript/JavaScript extraction requires Node.js. PHP extraction requires PHP.
|
|
88
|
+
placeholder: "Node.js 20.x, PHP 8.3, or not applicable"
|
|
89
|
+
validations:
|
|
90
|
+
required: false
|
|
91
|
+
|
|
92
|
+
- type: input
|
|
93
|
+
id: os
|
|
94
|
+
attributes:
|
|
95
|
+
label: Operating system
|
|
96
|
+
placeholder: "macOS 15, Ubuntu 24.04, Windows 11, etc."
|
|
97
|
+
validations:
|
|
98
|
+
required: false
|
|
99
|
+
|
|
100
|
+
- type: textarea
|
|
101
|
+
id: context
|
|
102
|
+
attributes:
|
|
103
|
+
label: Additional context
|
|
104
|
+
description: Add anything else that may help explain the problem.
|
|
105
|
+
validations:
|
|
106
|
+
required: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest a new capability, supported language, extractor improvement, graph API, or architecture rule.
|
|
3
|
+
title: "Feature: "
|
|
4
|
+
labels:
|
|
5
|
+
- enhancement
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Use this form for new capabilities or behavior changes. For incorrect current behavior, please open a bug report instead.
|
|
11
|
+
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: problem
|
|
14
|
+
attributes:
|
|
15
|
+
label: What problem should this solve?
|
|
16
|
+
description: Describe the workflow, codebase shape, or analysis gap that motivates the request.
|
|
17
|
+
placeholder: I want to use Modwire to...
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
- type: dropdown
|
|
22
|
+
id: area
|
|
23
|
+
attributes:
|
|
24
|
+
label: Feature area
|
|
25
|
+
options:
|
|
26
|
+
- New language support
|
|
27
|
+
- Python extractor
|
|
28
|
+
- TypeScript/JavaScript extractor
|
|
29
|
+
- PHP extractor
|
|
30
|
+
- Dependency graph
|
|
31
|
+
- Architecture policy API
|
|
32
|
+
- Exports or integrations
|
|
33
|
+
- Documentation
|
|
34
|
+
- Other
|
|
35
|
+
validations:
|
|
36
|
+
required: true
|
|
37
|
+
|
|
38
|
+
- type: textarea
|
|
39
|
+
id: proposal
|
|
40
|
+
attributes:
|
|
41
|
+
label: Proposed behavior
|
|
42
|
+
description: Explain the API, CLI, output shape, analyzer, or documentation you would like to see.
|
|
43
|
+
placeholder: Modwire should...
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
46
|
+
|
|
47
|
+
- type: textarea
|
|
48
|
+
id: example
|
|
49
|
+
attributes:
|
|
50
|
+
label: Example usage or input
|
|
51
|
+
description: Include a short source snippet, desired graph shape, policy example, or Python API sketch if useful.
|
|
52
|
+
render: python
|
|
53
|
+
validations:
|
|
54
|
+
required: false
|
|
55
|
+
|
|
56
|
+
- type: textarea
|
|
57
|
+
id: alternatives
|
|
58
|
+
attributes:
|
|
59
|
+
label: Alternatives considered
|
|
60
|
+
description: Mention any workaround or different API shape you have considered.
|
|
61
|
+
validations:
|
|
62
|
+
required: false
|
|
63
|
+
|
|
64
|
+
- type: checkboxes
|
|
65
|
+
id: contribution
|
|
66
|
+
attributes:
|
|
67
|
+
label: Contribution
|
|
68
|
+
options:
|
|
69
|
+
- label: I would be interested in working on this.
|
|
70
|
+
required: false
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Contributing to Modwire
|
|
2
|
+
|
|
3
|
+
Modwire is a Python package for extracting source-code dependencies and
|
|
4
|
+
evaluating architecture rules across Python, TypeScript/JavaScript, and PHP
|
|
5
|
+
projects.
|
|
6
|
+
|
|
7
|
+
## Requesting Features
|
|
8
|
+
|
|
9
|
+
Use the `Feature request` issue form for new capabilities, such as:
|
|
10
|
+
|
|
11
|
+
- support for another language or framework convention
|
|
12
|
+
- richer symbol, import, or graph metadata
|
|
13
|
+
- new architecture analyzers or policy matching behavior
|
|
14
|
+
- export formats or integrations with other tools
|
|
15
|
+
- documentation examples for common workflows
|
|
16
|
+
|
|
17
|
+
Feature requests are easiest to evaluate when they include the problem being
|
|
18
|
+
solved, a small example input, and the desired API or output shape.
|
|
19
|
+
|
|
20
|
+
## Reporting Bugs
|
|
21
|
+
|
|
22
|
+
Use the `Bug report` issue form for incorrect current behavior, such as:
|
|
23
|
+
|
|
24
|
+
- missing or incorrect imports, symbols, source IDs, or graph edges
|
|
25
|
+
- incorrect architecture-policy violations
|
|
26
|
+
- extractor crashes or runtime failures
|
|
27
|
+
- packaging, installation, or compatibility problems
|
|
28
|
+
- documentation that contradicts the implemented behavior
|
|
29
|
+
|
|
30
|
+
Bug reports should include a minimal reproduction, the expected output, the
|
|
31
|
+
actual output, and relevant versions for Python, Modwire, Node.js, or PHP.
|
|
32
|
+
|
|
33
|
+
## Pull Requests
|
|
34
|
+
|
|
35
|
+
Before opening a pull request, run the local checks:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv run ruff check
|
|
39
|
+
uv run pytest
|
|
40
|
+
uv run python -m build --outdir dist
|
|
41
|
+
uv run twine check dist/*
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Extractor changes should include focused tests under `tests/` and, when
|
|
45
|
+
relevant, a small fixture under `tests/apps/`.
|
|
46
|
+
|
|
47
|
+
Keep pull requests scoped to one behavior change. If an issue exists, link it in
|
|
48
|
+
the pull request description.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: modwire
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Extract source-code dependencies and build dependency graphs.
|
|
5
5
|
Author: Tomasz Szpak
|
|
6
6
|
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/9orky/
|
|
8
|
-
Project-URL: Repository, https://github.com/9orky/
|
|
9
|
-
Project-URL: Issues, https://github.com/9orky/
|
|
7
|
+
Project-URL: Homepage, https://github.com/9orky/modwire
|
|
8
|
+
Project-URL: Repository, https://github.com/9orky/modwire
|
|
9
|
+
Project-URL: Issues, https://github.com/9orky/modwire/issues
|
|
10
10
|
Keywords: architecture,code-analysis,dependency-graph,static-analysis
|
|
11
11
|
Classifier: Development Status :: 3 - Alpha
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -70,6 +70,7 @@ TypeScript, and PHP projects can be compared through the same graph shape.
|
|
|
70
70
|
|
|
71
71
|
## Supported Languages
|
|
72
72
|
|
|
73
|
+
|
|
73
74
|
```python
|
|
74
75
|
from modwire import supported_languages
|
|
75
76
|
|
|
@@ -109,3 +110,18 @@ uv run pytest
|
|
|
109
110
|
uv run python -m build --outdir dist
|
|
110
111
|
uv run twine check dist/*
|
|
111
112
|
```
|
|
113
|
+
|
|
114
|
+
## Contributing
|
|
115
|
+
|
|
116
|
+
Feature requests and bug reports are tracked through GitHub Issues:
|
|
117
|
+
|
|
118
|
+
- Open a feature request for new language support, graph metadata, architecture
|
|
119
|
+
rules, export formats, or documentation examples.
|
|
120
|
+
- Open a bug report for incorrect extraction results, graph edges, architecture
|
|
121
|
+
violations, packaging problems, or runtime failures.
|
|
122
|
+
|
|
123
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the information to include and the
|
|
124
|
+
checks to run before opening a pull request.
|
|
125
|
+
|
|
126
|
+
Starter wiki pages are tracked under [docs/wiki](docs/wiki) so the GitHub Wiki
|
|
127
|
+
can be initialized with the same guidance.
|
|
@@ -37,6 +37,7 @@ TypeScript, and PHP projects can be compared through the same graph shape.
|
|
|
37
37
|
|
|
38
38
|
## Supported Languages
|
|
39
39
|
|
|
40
|
+
|
|
40
41
|
```python
|
|
41
42
|
from modwire import supported_languages
|
|
42
43
|
|
|
@@ -76,3 +77,18 @@ uv run pytest
|
|
|
76
77
|
uv run python -m build --outdir dist
|
|
77
78
|
uv run twine check dist/*
|
|
78
79
|
```
|
|
80
|
+
|
|
81
|
+
## Contributing
|
|
82
|
+
|
|
83
|
+
Feature requests and bug reports are tracked through GitHub Issues:
|
|
84
|
+
|
|
85
|
+
- Open a feature request for new language support, graph metadata, architecture
|
|
86
|
+
rules, export formats, or documentation examples.
|
|
87
|
+
- Open a bug report for incorrect extraction results, graph edges, architecture
|
|
88
|
+
violations, packaging problems, or runtime failures.
|
|
89
|
+
|
|
90
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the information to include and the
|
|
91
|
+
checks to run before opening a pull request.
|
|
92
|
+
|
|
93
|
+
Starter wiki pages are tracked under [docs/wiki](docs/wiki) so the GitHub Wiki
|
|
94
|
+
can be initialized with the same guidance.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Development Checks
|
|
2
|
+
|
|
3
|
+
Run these checks before opening a pull request:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
uv run ruff check
|
|
7
|
+
uv run pytest
|
|
8
|
+
uv run python -m build --outdir dist
|
|
9
|
+
uv run twine check dist/*
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Extractor changes should include focused tests under `tests/` and, when useful,
|
|
13
|
+
small source fixtures under `tests/apps/`.
|
|
14
|
+
|
|
15
|
+
The CI workflow currently validates:
|
|
16
|
+
|
|
17
|
+
- Python 3.11, 3.12, and 3.13
|
|
18
|
+
- Node.js syntax for the TypeScript/JavaScript extractor helper
|
|
19
|
+
- PHP syntax for the PHP extractor helper
|
|
20
|
+
- package build and distribution metadata
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Modwire Wiki
|
|
2
|
+
|
|
3
|
+
Modwire extracts source-code structure and import dependencies from Python,
|
|
4
|
+
TypeScript/JavaScript, and PHP projects. It returns typed Python objects for
|
|
5
|
+
building dependency graphs, inspecting symbols, and evaluating architecture
|
|
6
|
+
rules.
|
|
7
|
+
|
|
8
|
+
## Start Here
|
|
9
|
+
|
|
10
|
+
- [Reporting bugs](Reporting-bugs.md)
|
|
11
|
+
- [Requesting features](Requesting-features.md)
|
|
12
|
+
- [Development checks](Development-checks.md)
|
|
13
|
+
|
|
14
|
+
## Useful Project Links
|
|
15
|
+
|
|
16
|
+
- Repository: https://github.com/9orky/modwire
|
|
17
|
+
- Issues: https://github.com/9orky/modwire/issues
|
|
18
|
+
- Bug report form: https://github.com/9orky/modwire/issues/new?template=bug_report.yml
|
|
19
|
+
- Feature request form: https://github.com/9orky/modwire/issues/new?template=feature_request.yml
|
|
20
|
+
|
|
21
|
+
## Supported Languages
|
|
22
|
+
|
|
23
|
+
- Python
|
|
24
|
+
- TypeScript and JavaScript
|
|
25
|
+
- PHP
|
|
26
|
+
|
|
27
|
+
The Python extractor works with Python alone. TypeScript/JavaScript extraction
|
|
28
|
+
requires Node.js at runtime, and PHP extraction requires PHP at runtime.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Reporting Bugs
|
|
2
|
+
|
|
3
|
+
Use the GitHub `Bug report` issue form when Modwire behaves incorrectly.
|
|
4
|
+
|
|
5
|
+
## Good Bug Reports Include
|
|
6
|
+
|
|
7
|
+
- a short summary of what went wrong
|
|
8
|
+
- the affected area, such as an extractor, dependency graph, or architecture
|
|
9
|
+
analyzer
|
|
10
|
+
- the smallest source snippet or fixture that reproduces the problem
|
|
11
|
+
- the actual output, traceback, graph edges, or violations
|
|
12
|
+
- the expected output
|
|
13
|
+
- Modwire, Python, Node.js, PHP, and operating-system versions where relevant
|
|
14
|
+
|
|
15
|
+
## Examples of Bugs
|
|
16
|
+
|
|
17
|
+
- an import is missed or linked to the wrong source ID
|
|
18
|
+
- a symbol is extracted with incorrect metadata
|
|
19
|
+
- graph edges are missing, duplicated, or pointed at the wrong node
|
|
20
|
+
- an architecture policy reports the wrong violation
|
|
21
|
+
- extraction crashes on valid Python, TypeScript/JavaScript, or PHP source
|
|
22
|
+
- package installation or distribution metadata is broken
|
|
23
|
+
|
|
24
|
+
Open a bug report at:
|
|
25
|
+
|
|
26
|
+
https://github.com/9orky/modwire/issues/new?template=bug_report.yml
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Requesting Features
|
|
2
|
+
|
|
3
|
+
Use the GitHub `Feature request` issue form for new capabilities or behavior
|
|
4
|
+
changes.
|
|
5
|
+
|
|
6
|
+
## Good Feature Requests Include
|
|
7
|
+
|
|
8
|
+
- the problem or workflow the feature would support
|
|
9
|
+
- the affected area, such as language support, graph APIs, exports, or
|
|
10
|
+
architecture policies
|
|
11
|
+
- a small source-code example when possible
|
|
12
|
+
- the desired API, output shape, analyzer behavior, or documentation example
|
|
13
|
+
- alternatives or workarounds you have considered
|
|
14
|
+
|
|
15
|
+
## Examples of Feature Requests
|
|
16
|
+
|
|
17
|
+
- add support for another language or framework convention
|
|
18
|
+
- expose richer graph, import, or symbol metadata
|
|
19
|
+
- add a new architecture analyzer
|
|
20
|
+
- improve policy matching for layered architectures
|
|
21
|
+
- export graphs in another format
|
|
22
|
+
- add documentation for a common integration workflow
|
|
23
|
+
|
|
24
|
+
Open a feature request at:
|
|
25
|
+
|
|
26
|
+
https://github.com/9orky/modwire/issues/new?template=feature_request.yml
|
|
@@ -37,9 +37,9 @@ dependencies = [
|
|
|
37
37
|
]
|
|
38
38
|
|
|
39
39
|
[project.urls]
|
|
40
|
-
Homepage = "https://github.com/9orky/
|
|
41
|
-
Repository = "https://github.com/9orky/
|
|
42
|
-
Issues = "https://github.com/9orky/
|
|
40
|
+
Homepage = "https://github.com/9orky/modwire"
|
|
41
|
+
Repository = "https://github.com/9orky/modwire"
|
|
42
|
+
Issues = "https://github.com/9orky/modwire/issues"
|
|
43
43
|
|
|
44
44
|
[project.optional-dependencies]
|
|
45
45
|
dev = [
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from .extraction import CodeMap, extract_code
|
|
2
2
|
from .extractors.loader import normalize_source_id, supported_languages
|
|
3
|
+
from .exports import UnusedExport, find_unused_exports
|
|
3
4
|
from .graph import DependencyGraph, Edge, Node, build_dependency_graph
|
|
4
5
|
|
|
5
6
|
|
|
@@ -8,8 +9,10 @@ __all__ = [
|
|
|
8
9
|
"DependencyGraph",
|
|
9
10
|
"Edge",
|
|
10
11
|
"Node",
|
|
12
|
+
"UnusedExport",
|
|
11
13
|
"build_dependency_graph",
|
|
12
14
|
"extract_code",
|
|
15
|
+
"find_unused_exports",
|
|
13
16
|
"normalize_source_id",
|
|
14
17
|
"supported_languages",
|
|
15
18
|
]
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.
|
|
22
|
-
__version_tuple__ = version_tuple = (1,
|
|
21
|
+
__version__ = version = '1.1.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 1, 1)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gbfbd18f94'
|
|
@@ -6,6 +6,25 @@ from pydantic import BaseModel, Field
|
|
|
6
6
|
ImportCrossingType = Literal["module", "symbol"]
|
|
7
7
|
SourceVisibility = Literal["public", "protected", "private"]
|
|
8
8
|
SourceSignatureKind = Literal["call", "construct", "index"]
|
|
9
|
+
SourceExportKind = Literal[
|
|
10
|
+
"module",
|
|
11
|
+
"class",
|
|
12
|
+
"interface",
|
|
13
|
+
"type",
|
|
14
|
+
"abstract_class",
|
|
15
|
+
"function",
|
|
16
|
+
"value",
|
|
17
|
+
"unknown",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class SourceImportedSymbol(BaseModel):
|
|
22
|
+
name: str
|
|
23
|
+
alias: str
|
|
24
|
+
is_aliased: bool
|
|
25
|
+
is_default: bool
|
|
26
|
+
is_namespace: bool
|
|
27
|
+
is_star: bool
|
|
9
28
|
|
|
10
29
|
|
|
11
30
|
class SourceImport(BaseModel):
|
|
@@ -19,6 +38,21 @@ class SourceImport(BaseModel):
|
|
|
19
38
|
statement_id: int
|
|
20
39
|
join_key: str
|
|
21
40
|
uses_joined_import: bool
|
|
41
|
+
imported_symbols: list[SourceImportedSymbol] = Field(default_factory=list)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class SourceExport(BaseModel):
|
|
45
|
+
name: str
|
|
46
|
+
local_name: str
|
|
47
|
+
kind: SourceExportKind
|
|
48
|
+
crossing_type: ImportCrossingType
|
|
49
|
+
path: str
|
|
50
|
+
is_relative: bool
|
|
51
|
+
normalized_path: str
|
|
52
|
+
is_reexport: bool
|
|
53
|
+
is_default: bool
|
|
54
|
+
is_aliased: bool
|
|
55
|
+
statement_id: int
|
|
22
56
|
|
|
23
57
|
|
|
24
58
|
class SourceFunction(BaseModel):
|
|
@@ -91,6 +125,7 @@ class SourceAbstractClass(BaseModel):
|
|
|
91
125
|
|
|
92
126
|
class SourceFile(BaseModel):
|
|
93
127
|
imports: list[SourceImport]
|
|
128
|
+
exports: list[SourceExport] = Field(default_factory=list)
|
|
94
129
|
classes: list[SourceClass]
|
|
95
130
|
interfaces: list[SourceInterface] = Field(default_factory=list)
|
|
96
131
|
types: list[SourceType] = Field(default_factory=list)
|