code-maat-python 0.1.1__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.
Files changed (28) hide show
  1. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/PKG-INFO +8 -8
  2. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/README.md +7 -7
  3. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/__init__.py +2 -2
  4. code_maat_python-0.2.0/code_maat_python/__main__.py +5 -0
  5. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/__init__.py +1 -1
  6. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/age.py +1 -1
  7. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/authors.py +1 -1
  8. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/churn.py +1 -1
  9. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/communication.py +1 -1
  10. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/coupling.py +1 -1
  11. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/effort.py +1 -1
  12. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/entities.py +1 -1
  13. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/revisions.py +1 -1
  14. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/soc.py +1 -1
  15. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/analyses/summary.py +1 -1
  16. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/cli.py +62 -61
  17. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/parser.py +1 -1
  18. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/pipeline.py +1 -1
  19. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/pyproject.toml +2 -2
  20. code_maat_python-0.1.1/code_maat_python/__main__.py +0 -5
  21. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/LICENSE +0 -0
  22. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/output/__init__.py +0 -0
  23. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/transformers/__init__.py +0 -0
  24. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/transformers/grouper.py +0 -0
  25. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/transformers/team_mapper.py +0 -0
  26. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/transformers/time_grouper.py +0 -0
  27. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/utils/__init__.py +0 -0
  28. {code_maat_python-0.1.1 → code_maat_python-0.2.0}/code_maat_python/utils/math.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-maat-python
3
- Version: 0.1.1
3
+ Version: 0.2.0
4
4
  Summary: Modern Python tool for mining and analyzing version control system data
5
5
  License: GPL-3.0
6
6
  License-File: LICENSE
@@ -25,7 +25,7 @@ Project-URL: Homepage, https://github.com/hydrosquall/code-maat-python
25
25
  Project-URL: Repository, https://github.com/hydrosquall/code-maat-python
26
26
  Description-Content-Type: text/markdown
27
27
 
28
- # code-maat-python
28
+ # code-maat
29
29
 
30
30
  [![License: GPL-3.0](https://img.shields.io/badge/License-GPL%203.0-blue.svg)](https://opensource.org/licenses/GPL-3.0)
31
31
  [![Python: 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
@@ -34,7 +34,7 @@ A Python implementation of [Code Maat](https://github.com/adamtornhill/code-maat
34
34
 
35
35
  ## Overview
36
36
 
37
- code-maat-python extracts insights from version control history:
37
+ code-maat extracts insights from version control history:
38
38
 
39
39
  - Temporal coupling: Files that change together frequently
40
40
  - Code churn: Change frequency and stability metrics
@@ -58,11 +58,11 @@ Research shows that files with high temporal coupling have 2-10x higher defect r
58
58
 
59
59
  ```bash
60
60
  # Using pip
61
- pip install code-maat-python
61
+ pip install code-maat
62
62
 
63
63
  # From source with Poetry
64
- git clone https://github.com/hydrosquall/code-maat-python.git
65
- cd code-maat-python
64
+ git clone https://github.com/hydrosquall/code-maat.git
65
+ cd code-maat
66
66
  poetry install
67
67
  ```
68
68
 
@@ -78,7 +78,7 @@ git log --all -M -C --numstat --date=short --pretty=format:'--%h--%cd--%cn' > gi
78
78
  Run a coupling analysis to find files that frequently change together:
79
79
 
80
80
  ```bash
81
- code-maat-python coupling git.log --min-coupling 50 --rows 10
81
+ code-maat coupling git.log --min-coupling 50 --rows 10
82
82
  # Or: python -m code_maat_python coupling git.log --min-coupling 50 --rows 10
83
83
  ```
84
84
 
@@ -94,7 +94,7 @@ This indicates `user.py` and `profile.py` change together in 87% of commits wher
94
94
 
95
95
  ## Available Analyses
96
96
 
97
- code-maat-python provides 17 analysis types:
97
+ code-maat provides 17 analysis types:
98
98
 
99
99
  | Command | Description | Use Case |
100
100
  |---------|-------------|----------|
@@ -1,4 +1,4 @@
1
- # code-maat-python
1
+ # code-maat
2
2
 
3
3
  [![License: GPL-3.0](https://img.shields.io/badge/License-GPL%203.0-blue.svg)](https://opensource.org/licenses/GPL-3.0)
4
4
  [![Python: 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
@@ -7,7 +7,7 @@ A Python implementation of [Code Maat](https://github.com/adamtornhill/code-maat
7
7
 
8
8
  ## Overview
9
9
 
10
- code-maat-python extracts insights from version control history:
10
+ code-maat extracts insights from version control history:
11
11
 
12
12
  - Temporal coupling: Files that change together frequently
13
13
  - Code churn: Change frequency and stability metrics
@@ -31,11 +31,11 @@ Research shows that files with high temporal coupling have 2-10x higher defect r
31
31
 
32
32
  ```bash
33
33
  # Using pip
34
- pip install code-maat-python
34
+ pip install code-maat
35
35
 
36
36
  # From source with Poetry
37
- git clone https://github.com/hydrosquall/code-maat-python.git
38
- cd code-maat-python
37
+ git clone https://github.com/hydrosquall/code-maat.git
38
+ cd code-maat
39
39
  poetry install
40
40
  ```
41
41
 
@@ -51,7 +51,7 @@ git log --all -M -C --numstat --date=short --pretty=format:'--%h--%cd--%cn' > gi
51
51
  Run a coupling analysis to find files that frequently change together:
52
52
 
53
53
  ```bash
54
- code-maat-python coupling git.log --min-coupling 50 --rows 10
54
+ code-maat coupling git.log --min-coupling 50 --rows 10
55
55
  # Or: python -m code_maat_python coupling git.log --min-coupling 50 --rows 10
56
56
  ```
57
57
 
@@ -67,7 +67,7 @@ This indicates `user.py` and `profile.py` change together in 87% of commits wher
67
67
 
68
68
  ## Available Analyses
69
69
 
70
- code-maat-python provides 17 analysis types:
70
+ code-maat provides 17 analysis types:
71
71
 
72
72
  | Command | Description | Use Case |
73
73
  |---------|-------------|----------|
@@ -1,10 +1,10 @@
1
1
  """
2
- code-maat-python: Modern Python tool for mining VCS data with pandas.
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.1.1"
7
+ __version__ = "0.2.0"
8
8
  __author__ = "Cameron Yick"
9
9
  __license__ = "GPL-3.0"
10
10
 
@@ -0,0 +1,5 @@
1
+ """Allow running code-maat as a module with python -m code_maat_python"""
2
+ from code_maat_python.cli import main
3
+
4
+ if __name__ == "__main__":
5
+ main()
@@ -1,4 +1,4 @@
1
- """Analysis modules for code-maat-python."""
1
+ """Analysis modules for code-maat."""
2
2
 
3
3
  from code_maat_python.analyses.authors import analyze_authors
4
4
  from code_maat_python.analyses.churn import (
@@ -1,4 +1,4 @@
1
- """Code age analysis for code-maat-python."""
1
+ """Code age analysis for code-maat."""
2
2
 
3
3
  import pandas as pd
4
4
 
@@ -1,4 +1,4 @@
1
- """Author analysis for code-maat-python.
1
+ """Author analysis for code-maat.
2
2
 
3
3
  Analyzes distinct authors per entity with revision counts.
4
4
  """
@@ -1,4 +1,4 @@
1
- """Churn analysis for code-maat-python.
1
+ """Churn analysis for code-maat.
2
2
 
3
3
  Analyzes code churn metrics including lines added/deleted by date, author,
4
4
  and entity, as well as main developer identification.
@@ -1,4 +1,4 @@
1
- """Communication analysis for code-maat-python."""
1
+ """Communication analysis for code-maat."""
2
2
 
3
3
  from itertools import combinations
4
4
 
@@ -1,4 +1,4 @@
1
- """Logical coupling analysis for code-maat-python.
1
+ """Logical coupling analysis for code-maat.
2
2
 
3
3
  Calculate logical coupling between files based on co-change frequency.
4
4
  """
@@ -1,4 +1,4 @@
1
- """Effort analysis for code-maat-python.
1
+ """Effort analysis for code-maat.
2
2
 
3
3
  Analyzes author contributions by revision count and calculates
4
4
  code fragmentation metrics.
@@ -1,4 +1,4 @@
1
- """Entity listing analysis for code-maat-python.
1
+ """Entity listing analysis for code-maat.
2
2
 
3
3
  Lists all entities with basic statistics.
4
4
  """
@@ -1,4 +1,4 @@
1
- """Revision frequency analysis for code-maat-python.
1
+ """Revision frequency analysis for code-maat.
2
2
 
3
3
  Analyzes and sorts entities by their revision frequency.
4
4
  """
@@ -1,4 +1,4 @@
1
- """Sum of Coupling (SOC) analysis for code-maat-python.
1
+ """Sum of Coupling (SOC) analysis for code-maat.
2
2
 
3
3
  Calculate sum of coupling for each entity based on commit size.
4
4
  """
@@ -1,4 +1,4 @@
1
- """Summary statistics analysis for code-maat-python.
1
+ """Summary statistics analysis for code-maat.
2
2
 
3
3
  Provides overview statistics for a repository.
4
4
  """
@@ -1,4 +1,4 @@
1
- """Command-line interface for code-maat-python.
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="0.1.0", prog_name="code-maat-python")
183
+ @click.version_option(version=__version__, prog_name="code-maat")
183
184
  def main() -> None:
184
- """Code Maat Pandas - Modern Python tool for mining version control data.
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-python coupling git.log --min-coupling 50
197
+ code-maat coupling git.log --min-coupling 50
197
198
 
198
199
  3. Save results to CSV:
199
- code-maat-python revisions git.log --output results.csv
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-python authors git.log
222
- code-maat-python authors git.log --output authors.csv
223
- code-maat-python authors git.log --group layers.txt --rows 20
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-python revisions git.log
252
- code-maat-python revisions git.log --output revisions.csv
253
- code-maat-python revisions git.log --group layers.txt --rows 10
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-python entities git.log
282
- code-maat-python entities git.log --output entities.csv
283
- code-maat-python entities git.log --group layers.txt
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-python summary git.log
312
- code-maat-python summary git.log --output summary.csv
313
- code-maat-python summary git.log --group layers.txt
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-python coupling git.log
388
- code-maat-python coupling git.log --min-coupling 50
389
- code-maat-python coupling git.log --min-revs 10 --min-shared-revs 5
390
- code-maat-python coupling git.log --group layers.txt --rows 20
391
- code-maat-python coupling git.log --output coupling.csv
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-python soc git.log
446
- code-maat-python soc git.log --max-changeset-size 50
447
- code-maat-python soc git.log --group layers.txt --rows 10
448
- code-maat-python soc git.log --output soc.csv
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-python abs-churn git.log
477
- code-maat-python abs-churn git.log --output churn.csv
478
- code-maat-python abs-churn git.log --rows 30
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-python author-churn git.log
507
- code-maat-python author-churn git.log --team-map-file teams.csv
508
- code-maat-python author-churn git.log --output author-churn.csv
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-python entity-churn git.log
537
- code-maat-python entity-churn git.log --group layers.txt --rows 20
538
- code-maat-python entity-churn git.log --output entity-churn.csv
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-python entity-ownership git.log
567
- code-maat-python entity-ownership git.log --group layers.txt
568
- code-maat-python entity-ownership git.log --output ownership.csv
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-python main-dev git.log
597
- code-maat-python main-dev git.log --group layers.txt --rows 15
598
- code-maat-python main-dev git.log --output main-dev.csv
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-python refactoring-main-dev git.log
627
- code-maat-python refactoring-main-dev git.log --rows 10
628
- code-maat-python refactoring-main-dev git.log --output refactoring.csv
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-python entity-effort git.log
657
- code-maat-python entity-effort git.log --group layers.txt
658
- code-maat-python entity-effort git.log --output effort.csv
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-python main-dev-by-revs git.log
687
- code-maat-python main-dev-by-revs git.log --rows 15
688
- code-maat-python main-dev-by-revs git.log --output main-dev-revs.csv
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-python fragmentation git.log
717
- code-maat-python fragmentation git.log --group layers.txt --rows 20
718
- code-maat-python fragmentation git.log --output fragmentation.csv
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-python age git.log
754
- code-maat-python age git.log --reference-date 2023-12-31
755
- code-maat-python age git.log --group layers.txt --rows 25
756
- code-maat-python age git.log --output age.csv
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-python communication git.log
808
- code-maat-python communication git.log --min-shared 10 --min-coupling 50
809
- code-maat-python communication git.log --team-map-file teams.csv --rows 15
810
- code-maat-python communication git.log --output communication.csv
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,4 +1,4 @@
1
- """Git log parser for code-maat-python.
1
+ """Git log parser for code-maat.
2
2
 
3
3
  Parses git log output into pandas DataFrames for analysis.
4
4
  """
@@ -1,4 +1,4 @@
1
- """Data pipeline utilities for code-maat-python.
1
+ """Data pipeline utilities for code-maat.
2
2
 
3
3
  Provides utilities for transforming and filtering DataFrames between
4
4
  parsing and analysis stages.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "code-maat-python"
3
- version = "0.1.1"
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-python = "code_maat_python.cli:main"
37
+ code-maat = "code_maat_python.cli:main"
38
38
 
39
39
  [build-system]
40
40
  requires = ["poetry-core"]
@@ -1,5 +0,0 @@
1
- """Allow running code-maat-python as a module with python -m code_maat_python"""
2
- from code_maat_python.cli import main
3
-
4
- if __name__ == "__main__":
5
- main()