code-maat-python 0.1.0__tar.gz → 0.2.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.
- code_maat_python-0.2.0/PKG-INFO +134 -0
- code_maat_python-0.2.0/README.md +106 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/__init__.py +2 -2
- code_maat_python-0.2.0/code_maat_python/__main__.py +5 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/__init__.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/age.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/authors.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/churn.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/communication.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/coupling.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/effort.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/entities.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/revisions.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/soc.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/analyses/summary.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/cli.py +62 -61
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/parser.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/pipeline.py +1 -1
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/pyproject.toml +2 -2
- code_maat_python-0.1.0/PKG-INFO +0 -545
- code_maat_python-0.1.0/README.md +0 -517
- code_maat_python-0.1.0/code_maat_python/__main__.py +0 -5
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/LICENSE +0 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/output/__init__.py +0 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/transformers/__init__.py +0 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/transformers/grouper.py +0 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/transformers/team_mapper.py +0 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/transformers/time_grouper.py +0 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/utils/__init__.py +0 -0
- {code_maat_python-0.1.0 → code_maat_python-0.2.0}/code_maat_python/utils/math.py +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: code-maat-python
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Modern Python tool for mining and analyzing version control system data
|
|
5
|
+
License: GPL-3.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: vcs,git,analysis,mining,coupling,churn
|
|
8
|
+
Author: Cameron Yick
|
|
9
|
+
Author-email: cameron.yick@gmail.com
|
|
10
|
+
Requires-Python: >=3.10,<4.0
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development :: Version Control
|
|
21
|
+
Requires-Dist: click (>=8.1.0,<9.0.0)
|
|
22
|
+
Requires-Dist: pandas (>=2.0.0,<3.0.0)
|
|
23
|
+
Requires-Dist: python-dateutil (>=2.8.0,<3.0.0)
|
|
24
|
+
Project-URL: Homepage, https://github.com/hydrosquall/code-maat-python
|
|
25
|
+
Project-URL: Repository, https://github.com/hydrosquall/code-maat-python
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# code-maat
|
|
29
|
+
|
|
30
|
+
[](https://opensource.org/licenses/GPL-3.0)
|
|
31
|
+
[](https://www.python.org/downloads/)
|
|
32
|
+
|
|
33
|
+
A Python implementation of [Code Maat](https://github.com/adamtornhill/code-maat) by Adam Tornhill. Analyzes Git repository history to identify code coupling, change patterns, and team dynamics.
|
|
34
|
+
|
|
35
|
+
## Overview
|
|
36
|
+
|
|
37
|
+
code-maat extracts insights from version control history:
|
|
38
|
+
|
|
39
|
+
- Temporal coupling: Files that change together frequently
|
|
40
|
+
- Code churn: Change frequency and stability metrics
|
|
41
|
+
- Knowledge distribution: Contributor patterns and code ownership
|
|
42
|
+
- Team coordination: Communication needs inferred from code changes
|
|
43
|
+
|
|
44
|
+
These analyses help identify architectural dependencies not visible in static code structure, inform code review priorities, and understand how teams interact with code over time.
|
|
45
|
+
|
|
46
|
+
## Why Use This Tool?
|
|
47
|
+
|
|
48
|
+
Version control history contains information about code dependencies that aren't captured by static analysis. Files that frequently change together often share hidden coupling through business logic, data structures, or implicit contracts, even when they don't import each other directly.
|
|
49
|
+
|
|
50
|
+
Research shows that files with high temporal coupling have 2-10x higher defect rates ([Predicting Faults from Cached History, MSR 2008](https://dl.acm.org/doi/10.1145/1453101.1453106)). Understanding these patterns helps with:
|
|
51
|
+
|
|
52
|
+
- Prioritizing code review effort on coupled changes
|
|
53
|
+
- Identifying coordination requirements between team members
|
|
54
|
+
- Finding knowledge silos and ownership concentration
|
|
55
|
+
- Discovering stable versus volatile areas of the codebase
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Using pip
|
|
61
|
+
pip install code-maat
|
|
62
|
+
|
|
63
|
+
# From source with Poetry
|
|
64
|
+
git clone https://github.com/hydrosquall/code-maat.git
|
|
65
|
+
cd code-maat
|
|
66
|
+
poetry install
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Quick Start
|
|
70
|
+
|
|
71
|
+
Generate a Git log in the required format:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
cd your-project
|
|
75
|
+
git log --all -M -C --numstat --date=short --pretty=format:'--%h--%cd--%cn' > git.log
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Run a coupling analysis to find files that frequently change together:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
code-maat coupling git.log --min-coupling 50 --rows 10
|
|
82
|
+
# Or: python -m code_maat_python coupling git.log --min-coupling 50 --rows 10
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Example output:
|
|
86
|
+
```csv
|
|
87
|
+
entity,coupled,degree,average-revs
|
|
88
|
+
src/models/user.py,src/views/profile.py,87,45
|
|
89
|
+
src/api/auth.py,src/middleware/session.py,76,32
|
|
90
|
+
src/utils/validators.py,src/forms/registration.py,65,28
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
This indicates `user.py` and `profile.py` change together in 87% of commits where either file changes, based on 45 average revisions. High coupling may indicate shared responsibilities or implicit dependencies worth reviewing.
|
|
94
|
+
|
|
95
|
+
## Available Analyses
|
|
96
|
+
|
|
97
|
+
code-maat provides 17 analysis types:
|
|
98
|
+
|
|
99
|
+
| Command | Description | Use Case |
|
|
100
|
+
|---------|-------------|----------|
|
|
101
|
+
| `coupling` | Temporal coupling between file pairs | Identify files that frequently change together |
|
|
102
|
+
| `soc` | Sum of coupling scores per entity | Aggregate coupling metric for prioritization |
|
|
103
|
+
| `entity-churn` | Lines added/deleted per entity over time | Measure change volatility |
|
|
104
|
+
| `age` | Time since last modification | Identify stable or abandoned code |
|
|
105
|
+
| `communication` | Shared code changes between authors | Map coordination requirements |
|
|
106
|
+
| `authors` | Number of distinct authors per entity | Measure knowledge distribution |
|
|
107
|
+
| `entity-ownership` | Line contribution percentage by author | Determine primary code owners |
|
|
108
|
+
| `main-dev` | Primary contributor by lines changed | Identify domain experts |
|
|
109
|
+
| `main-dev-by-revs` | Primary contributor by commit count | Identify active maintainers |
|
|
110
|
+
| `refactoring-main-dev` | Primary contributor to refactorings | Track code quality effort |
|
|
111
|
+
| `revisions` | Commit count per entity | Find frequently modified files |
|
|
112
|
+
| `abs-churn` | Aggregate churn over time windows | Track development activity trends |
|
|
113
|
+
| `author-churn` | Per-author contribution over time | Analyze individual contribution patterns |
|
|
114
|
+
| `entity-effort` | Commit count per entity | Quantify development effort distribution |
|
|
115
|
+
| `fragmentation` | Author distribution per entity | Detect coordination overhead |
|
|
116
|
+
| `summary` | Repository-wide statistics | Overview metrics |
|
|
117
|
+
| `entities` | List of all tracked entities | Verify log parsing scope |
|
|
118
|
+
|
|
119
|
+
See [REFERENCE.md](REFERENCE.md) for detailed command documentation.
|
|
120
|
+
|
|
121
|
+
## Documentation
|
|
122
|
+
|
|
123
|
+
- [Setup Guide](docs/SETUP.md) — Git log format, shell aliases, advanced options
|
|
124
|
+
- [Use Cases & Best Practices](docs/USE_CASES.md) — Application scenarios and analysis patterns
|
|
125
|
+
- [Command Reference](REFERENCE.md) — Complete command documentation
|
|
126
|
+
- [FAQ](docs/FAQ.md) — Common questions and further reading
|
|
127
|
+
- [Contributing](CONTRIBUTING.md) — Contribution guidelines
|
|
128
|
+
|
|
129
|
+
## License
|
|
130
|
+
|
|
131
|
+
GPL-3.0 — see [LICENSE](LICENSE) for details.
|
|
132
|
+
|
|
133
|
+
This project is inspired by and compatible with [Code Maat](https://github.com/adamtornhill/code-maat) by Adam Tornhill.
|
|
134
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# code-maat
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/GPL-3.0)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
|
|
6
|
+
A Python implementation of [Code Maat](https://github.com/adamtornhill/code-maat) by Adam Tornhill. Analyzes Git repository history to identify code coupling, change patterns, and team dynamics.
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
code-maat extracts insights from version control history:
|
|
11
|
+
|
|
12
|
+
- Temporal coupling: Files that change together frequently
|
|
13
|
+
- Code churn: Change frequency and stability metrics
|
|
14
|
+
- Knowledge distribution: Contributor patterns and code ownership
|
|
15
|
+
- Team coordination: Communication needs inferred from code changes
|
|
16
|
+
|
|
17
|
+
These analyses help identify architectural dependencies not visible in static code structure, inform code review priorities, and understand how teams interact with code over time.
|
|
18
|
+
|
|
19
|
+
## Why Use This Tool?
|
|
20
|
+
|
|
21
|
+
Version control history contains information about code dependencies that aren't captured by static analysis. Files that frequently change together often share hidden coupling through business logic, data structures, or implicit contracts, even when they don't import each other directly.
|
|
22
|
+
|
|
23
|
+
Research shows that files with high temporal coupling have 2-10x higher defect rates ([Predicting Faults from Cached History, MSR 2008](https://dl.acm.org/doi/10.1145/1453101.1453106)). Understanding these patterns helps with:
|
|
24
|
+
|
|
25
|
+
- Prioritizing code review effort on coupled changes
|
|
26
|
+
- Identifying coordination requirements between team members
|
|
27
|
+
- Finding knowledge silos and ownership concentration
|
|
28
|
+
- Discovering stable versus volatile areas of the codebase
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Using pip
|
|
34
|
+
pip install code-maat
|
|
35
|
+
|
|
36
|
+
# From source with Poetry
|
|
37
|
+
git clone https://github.com/hydrosquall/code-maat.git
|
|
38
|
+
cd code-maat
|
|
39
|
+
poetry install
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
Generate a Git log in the required format:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cd your-project
|
|
48
|
+
git log --all -M -C --numstat --date=short --pretty=format:'--%h--%cd--%cn' > git.log
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Run a coupling analysis to find files that frequently change together:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
code-maat coupling git.log --min-coupling 50 --rows 10
|
|
55
|
+
# Or: python -m code_maat_python coupling git.log --min-coupling 50 --rows 10
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Example output:
|
|
59
|
+
```csv
|
|
60
|
+
entity,coupled,degree,average-revs
|
|
61
|
+
src/models/user.py,src/views/profile.py,87,45
|
|
62
|
+
src/api/auth.py,src/middleware/session.py,76,32
|
|
63
|
+
src/utils/validators.py,src/forms/registration.py,65,28
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
This indicates `user.py` and `profile.py` change together in 87% of commits where either file changes, based on 45 average revisions. High coupling may indicate shared responsibilities or implicit dependencies worth reviewing.
|
|
67
|
+
|
|
68
|
+
## Available Analyses
|
|
69
|
+
|
|
70
|
+
code-maat provides 17 analysis types:
|
|
71
|
+
|
|
72
|
+
| Command | Description | Use Case |
|
|
73
|
+
|---------|-------------|----------|
|
|
74
|
+
| `coupling` | Temporal coupling between file pairs | Identify files that frequently change together |
|
|
75
|
+
| `soc` | Sum of coupling scores per entity | Aggregate coupling metric for prioritization |
|
|
76
|
+
| `entity-churn` | Lines added/deleted per entity over time | Measure change volatility |
|
|
77
|
+
| `age` | Time since last modification | Identify stable or abandoned code |
|
|
78
|
+
| `communication` | Shared code changes between authors | Map coordination requirements |
|
|
79
|
+
| `authors` | Number of distinct authors per entity | Measure knowledge distribution |
|
|
80
|
+
| `entity-ownership` | Line contribution percentage by author | Determine primary code owners |
|
|
81
|
+
| `main-dev` | Primary contributor by lines changed | Identify domain experts |
|
|
82
|
+
| `main-dev-by-revs` | Primary contributor by commit count | Identify active maintainers |
|
|
83
|
+
| `refactoring-main-dev` | Primary contributor to refactorings | Track code quality effort |
|
|
84
|
+
| `revisions` | Commit count per entity | Find frequently modified files |
|
|
85
|
+
| `abs-churn` | Aggregate churn over time windows | Track development activity trends |
|
|
86
|
+
| `author-churn` | Per-author contribution over time | Analyze individual contribution patterns |
|
|
87
|
+
| `entity-effort` | Commit count per entity | Quantify development effort distribution |
|
|
88
|
+
| `fragmentation` | Author distribution per entity | Detect coordination overhead |
|
|
89
|
+
| `summary` | Repository-wide statistics | Overview metrics |
|
|
90
|
+
| `entities` | List of all tracked entities | Verify log parsing scope |
|
|
91
|
+
|
|
92
|
+
See [REFERENCE.md](REFERENCE.md) for detailed command documentation.
|
|
93
|
+
|
|
94
|
+
## Documentation
|
|
95
|
+
|
|
96
|
+
- [Setup Guide](docs/SETUP.md) — Git log format, shell aliases, advanced options
|
|
97
|
+
- [Use Cases & Best Practices](docs/USE_CASES.md) — Application scenarios and analysis patterns
|
|
98
|
+
- [Command Reference](REFERENCE.md) — Complete command documentation
|
|
99
|
+
- [FAQ](docs/FAQ.md) — Common questions and further reading
|
|
100
|
+
- [Contributing](CONTRIBUTING.md) — Contribution guidelines
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
GPL-3.0 — see [LICENSE](LICENSE) for details.
|
|
105
|
+
|
|
106
|
+
This project is inspired by and compatible with [Code Maat](https://github.com/adamtornhill/code-maat) by Adam Tornhill.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""
|
|
2
|
-
code-maat
|
|
2
|
+
code-maat: Modern Python tool for mining VCS data with pandas.
|
|
3
3
|
|
|
4
4
|
A rewrite of Code Maat (by Adam Tornhill) using pandas for data analysis.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
__version__ = "0.
|
|
7
|
+
__version__ = "0.2.0"
|
|
8
8
|
__author__ = "Cameron Yick"
|
|
9
9
|
__license__ = "GPL-3.0"
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Command-line interface for code-maat
|
|
1
|
+
"""Command-line interface for code-maat.
|
|
2
2
|
|
|
3
3
|
Modern CLI using click framework with subcommands for each analysis type.
|
|
4
4
|
"""
|
|
@@ -12,6 +12,7 @@ from typing import Any
|
|
|
12
12
|
import click
|
|
13
13
|
import pandas as pd
|
|
14
14
|
|
|
15
|
+
from code_maat_python import __version__
|
|
15
16
|
from code_maat_python.analyses import (
|
|
16
17
|
analyze_authors,
|
|
17
18
|
analyze_coupling,
|
|
@@ -179,9 +180,9 @@ def handle_analysis_error(e: Exception) -> None:
|
|
|
179
180
|
|
|
180
181
|
# Main command group
|
|
181
182
|
@click.group()
|
|
182
|
-
@click.version_option(version=
|
|
183
|
+
@click.version_option(version=__version__, prog_name="code-maat")
|
|
183
184
|
def main() -> None:
|
|
184
|
-
"""Code Maat
|
|
185
|
+
"""Code Maat - Modern Python tool for mining version control data.
|
|
185
186
|
|
|
186
187
|
Analyzes git repository logs to identify patterns, coupling, churn,
|
|
187
188
|
and other metrics useful for understanding code evolution.
|
|
@@ -193,10 +194,10 @@ def main() -> None:
|
|
|
193
194
|
--pretty=format:'--%h--%cd--%cn' > git.log
|
|
194
195
|
|
|
195
196
|
2. Run an analysis:
|
|
196
|
-
code-maat
|
|
197
|
+
code-maat coupling git.log --min-coupling 50
|
|
197
198
|
|
|
198
199
|
3. Save results to CSV:
|
|
199
|
-
code-maat
|
|
200
|
+
code-maat revisions git.log --output results.csv
|
|
200
201
|
"""
|
|
201
202
|
pass
|
|
202
203
|
|
|
@@ -218,9 +219,9 @@ def authors(
|
|
|
218
219
|
|
|
219
220
|
\b
|
|
220
221
|
Example:
|
|
221
|
-
code-maat
|
|
222
|
-
code-maat
|
|
223
|
-
code-maat
|
|
222
|
+
code-maat authors git.log
|
|
223
|
+
code-maat authors git.log --output authors.csv
|
|
224
|
+
code-maat authors git.log --group layers.txt --rows 20
|
|
224
225
|
"""
|
|
225
226
|
try:
|
|
226
227
|
df = parse_git_log(logfile)
|
|
@@ -248,9 +249,9 @@ def revisions(
|
|
|
248
249
|
|
|
249
250
|
\b
|
|
250
251
|
Example:
|
|
251
|
-
code-maat
|
|
252
|
-
code-maat
|
|
253
|
-
code-maat
|
|
252
|
+
code-maat revisions git.log
|
|
253
|
+
code-maat revisions git.log --output revisions.csv
|
|
254
|
+
code-maat revisions git.log --group layers.txt --rows 10
|
|
254
255
|
"""
|
|
255
256
|
try:
|
|
256
257
|
df = parse_git_log(logfile)
|
|
@@ -278,9 +279,9 @@ def entities(
|
|
|
278
279
|
|
|
279
280
|
\b
|
|
280
281
|
Example:
|
|
281
|
-
code-maat
|
|
282
|
-
code-maat
|
|
283
|
-
code-maat
|
|
282
|
+
code-maat entities git.log
|
|
283
|
+
code-maat entities git.log --output entities.csv
|
|
284
|
+
code-maat entities git.log --group layers.txt
|
|
284
285
|
"""
|
|
285
286
|
try:
|
|
286
287
|
df = parse_git_log(logfile)
|
|
@@ -308,9 +309,9 @@ def summary(
|
|
|
308
309
|
|
|
309
310
|
\b
|
|
310
311
|
Example:
|
|
311
|
-
code-maat
|
|
312
|
-
code-maat
|
|
313
|
-
code-maat
|
|
312
|
+
code-maat summary git.log
|
|
313
|
+
code-maat summary git.log --output summary.csv
|
|
314
|
+
code-maat summary git.log --group layers.txt
|
|
314
315
|
"""
|
|
315
316
|
try:
|
|
316
317
|
df = parse_git_log(logfile)
|
|
@@ -384,11 +385,11 @@ def coupling(
|
|
|
384
385
|
|
|
385
386
|
\b
|
|
386
387
|
Example:
|
|
387
|
-
code-maat
|
|
388
|
-
code-maat
|
|
389
|
-
code-maat
|
|
390
|
-
code-maat
|
|
391
|
-
code-maat
|
|
388
|
+
code-maat coupling git.log
|
|
389
|
+
code-maat coupling git.log --min-coupling 50
|
|
390
|
+
code-maat coupling git.log --min-revs 10 --min-shared-revs 5
|
|
391
|
+
code-maat coupling git.log --group layers.txt --rows 20
|
|
392
|
+
code-maat coupling git.log --output coupling.csv
|
|
392
393
|
"""
|
|
393
394
|
try:
|
|
394
395
|
# Validate parameters
|
|
@@ -442,10 +443,10 @@ def soc(
|
|
|
442
443
|
|
|
443
444
|
\b
|
|
444
445
|
Example:
|
|
445
|
-
code-maat
|
|
446
|
-
code-maat
|
|
447
|
-
code-maat
|
|
448
|
-
code-maat
|
|
446
|
+
code-maat soc git.log
|
|
447
|
+
code-maat soc git.log --max-changeset-size 50
|
|
448
|
+
code-maat soc git.log --group layers.txt --rows 10
|
|
449
|
+
code-maat soc git.log --output soc.csv
|
|
449
450
|
"""
|
|
450
451
|
try:
|
|
451
452
|
df = parse_git_log(logfile)
|
|
@@ -473,9 +474,9 @@ def abs_churn_cmd(
|
|
|
473
474
|
|
|
474
475
|
\b
|
|
475
476
|
Example:
|
|
476
|
-
code-maat
|
|
477
|
-
code-maat
|
|
478
|
-
code-maat
|
|
477
|
+
code-maat abs-churn git.log
|
|
478
|
+
code-maat abs-churn git.log --output churn.csv
|
|
479
|
+
code-maat abs-churn git.log --rows 30
|
|
479
480
|
"""
|
|
480
481
|
try:
|
|
481
482
|
df = parse_git_log(logfile)
|
|
@@ -503,9 +504,9 @@ def author_churn_cmd(
|
|
|
503
504
|
|
|
504
505
|
\b
|
|
505
506
|
Example:
|
|
506
|
-
code-maat
|
|
507
|
-
code-maat
|
|
508
|
-
code-maat
|
|
507
|
+
code-maat author-churn git.log
|
|
508
|
+
code-maat author-churn git.log --team-map-file teams.csv
|
|
509
|
+
code-maat author-churn git.log --output author-churn.csv
|
|
509
510
|
"""
|
|
510
511
|
try:
|
|
511
512
|
df = parse_git_log(logfile)
|
|
@@ -533,9 +534,9 @@ def entity_churn_cmd(
|
|
|
533
534
|
|
|
534
535
|
\b
|
|
535
536
|
Example:
|
|
536
|
-
code-maat
|
|
537
|
-
code-maat
|
|
538
|
-
code-maat
|
|
537
|
+
code-maat entity-churn git.log
|
|
538
|
+
code-maat entity-churn git.log --group layers.txt --rows 20
|
|
539
|
+
code-maat entity-churn git.log --output entity-churn.csv
|
|
539
540
|
"""
|
|
540
541
|
try:
|
|
541
542
|
df = parse_git_log(logfile)
|
|
@@ -563,9 +564,9 @@ def entity_ownership_cmd(
|
|
|
563
564
|
|
|
564
565
|
\b
|
|
565
566
|
Example:
|
|
566
|
-
code-maat
|
|
567
|
-
code-maat
|
|
568
|
-
code-maat
|
|
567
|
+
code-maat entity-ownership git.log
|
|
568
|
+
code-maat entity-ownership git.log --group layers.txt
|
|
569
|
+
code-maat entity-ownership git.log --output ownership.csv
|
|
569
570
|
"""
|
|
570
571
|
try:
|
|
571
572
|
df = parse_git_log(logfile)
|
|
@@ -593,9 +594,9 @@ def main_dev_cmd(
|
|
|
593
594
|
|
|
594
595
|
\b
|
|
595
596
|
Example:
|
|
596
|
-
code-maat
|
|
597
|
-
code-maat
|
|
598
|
-
code-maat
|
|
597
|
+
code-maat main-dev git.log
|
|
598
|
+
code-maat main-dev git.log --group layers.txt --rows 15
|
|
599
|
+
code-maat main-dev git.log --output main-dev.csv
|
|
599
600
|
"""
|
|
600
601
|
try:
|
|
601
602
|
df = parse_git_log(logfile)
|
|
@@ -623,9 +624,9 @@ def refactoring_main_dev_cmd(
|
|
|
623
624
|
|
|
624
625
|
\b
|
|
625
626
|
Example:
|
|
626
|
-
code-maat
|
|
627
|
-
code-maat
|
|
628
|
-
code-maat
|
|
627
|
+
code-maat refactoring-main-dev git.log
|
|
628
|
+
code-maat refactoring-main-dev git.log --rows 10
|
|
629
|
+
code-maat refactoring-main-dev git.log --output refactoring.csv
|
|
629
630
|
"""
|
|
630
631
|
try:
|
|
631
632
|
df = parse_git_log(logfile)
|
|
@@ -653,9 +654,9 @@ def entity_effort_cmd(
|
|
|
653
654
|
|
|
654
655
|
\b
|
|
655
656
|
Example:
|
|
656
|
-
code-maat
|
|
657
|
-
code-maat
|
|
658
|
-
code-maat
|
|
657
|
+
code-maat entity-effort git.log
|
|
658
|
+
code-maat entity-effort git.log --group layers.txt
|
|
659
|
+
code-maat entity-effort git.log --output effort.csv
|
|
659
660
|
"""
|
|
660
661
|
try:
|
|
661
662
|
df = parse_git_log(logfile)
|
|
@@ -683,9 +684,9 @@ def main_dev_by_revs_cmd(
|
|
|
683
684
|
|
|
684
685
|
\b
|
|
685
686
|
Example:
|
|
686
|
-
code-maat
|
|
687
|
-
code-maat
|
|
688
|
-
code-maat
|
|
687
|
+
code-maat main-dev-by-revs git.log
|
|
688
|
+
code-maat main-dev-by-revs git.log --rows 15
|
|
689
|
+
code-maat main-dev-by-revs git.log --output main-dev-revs.csv
|
|
689
690
|
"""
|
|
690
691
|
try:
|
|
691
692
|
df = parse_git_log(logfile)
|
|
@@ -713,9 +714,9 @@ def fragmentation_cmd(
|
|
|
713
714
|
|
|
714
715
|
\b
|
|
715
716
|
Example:
|
|
716
|
-
code-maat
|
|
717
|
-
code-maat
|
|
718
|
-
code-maat
|
|
717
|
+
code-maat fragmentation git.log
|
|
718
|
+
code-maat fragmentation git.log --group layers.txt --rows 20
|
|
719
|
+
code-maat fragmentation git.log --output fragmentation.csv
|
|
719
720
|
"""
|
|
720
721
|
try:
|
|
721
722
|
df = parse_git_log(logfile)
|
|
@@ -750,10 +751,10 @@ def age(
|
|
|
750
751
|
|
|
751
752
|
\b
|
|
752
753
|
Example:
|
|
753
|
-
code-maat
|
|
754
|
-
code-maat
|
|
755
|
-
code-maat
|
|
756
|
-
code-maat
|
|
754
|
+
code-maat age git.log
|
|
755
|
+
code-maat age git.log --reference-date 2023-12-31
|
|
756
|
+
code-maat age git.log --group layers.txt --rows 25
|
|
757
|
+
code-maat age git.log --output age.csv
|
|
757
758
|
"""
|
|
758
759
|
try:
|
|
759
760
|
df = parse_git_log(logfile)
|
|
@@ -804,10 +805,10 @@ def communication_cmd(
|
|
|
804
805
|
|
|
805
806
|
\b
|
|
806
807
|
Example:
|
|
807
|
-
code-maat
|
|
808
|
-
code-maat
|
|
809
|
-
code-maat
|
|
810
|
-
code-maat
|
|
808
|
+
code-maat communication git.log
|
|
809
|
+
code-maat communication git.log --min-shared 10 --min-coupling 50
|
|
810
|
+
code-maat communication git.log --team-map-file teams.csv --rows 15
|
|
811
|
+
code-maat communication git.log --output communication.csv
|
|
811
812
|
"""
|
|
812
813
|
try:
|
|
813
814
|
df = parse_git_log(logfile)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "code-maat-python"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.2.0"
|
|
4
4
|
description = "Modern Python tool for mining and analyzing version control system data"
|
|
5
5
|
authors = ["Cameron Yick <cameron.yick@gmail.com>"]
|
|
6
6
|
license = "GPL-3.0"
|
|
@@ -34,7 +34,7 @@ pre-commit = "^3.3.0"
|
|
|
34
34
|
pandas-stubs = "^2.0.0"
|
|
35
35
|
|
|
36
36
|
[tool.poetry.scripts]
|
|
37
|
-
code-maat
|
|
37
|
+
code-maat = "code_maat_python.cli:main"
|
|
38
38
|
|
|
39
39
|
[build-system]
|
|
40
40
|
requires = ["poetry-core"]
|