RepoAuditor 0.2.3__tar.gz → 0.2.5__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 (107) hide show
  1. {repoauditor-0.2.3 → repoauditor-0.2.5}/PKG-INFO +58 -4
  2. {repoauditor-0.2.3 → repoauditor-0.2.5}/README.md +57 -3
  3. {repoauditor-0.2.3 → repoauditor-0.2.5}/pyproject.toml +1 -0
  4. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/__init__.py +1 -1
  5. repoauditor-0.2.5/tests/Plugins/GitHubModule_UnitTest.py +69 -0
  6. {repoauditor-0.2.3 → repoauditor-0.2.5}/uv.lock +11 -0
  7. {repoauditor-0.2.3 → repoauditor-0.2.5}/.copier-answers.yml +0 -0
  8. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/CODEOWNERS +0 -0
  9. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  10. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  11. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/ISSUE_TEMPLATE/custom.md +0 -0
  12. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  13. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/actions/release_impl/action.yml +0 -0
  14. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/pull_request_template.md +0 -0
  15. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/release_sources.yaml +0 -0
  16. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/workflows/CICD.yml +0 -0
  17. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/workflows/CICD_impl.yml +0 -0
  18. {repoauditor-0.2.3 → repoauditor-0.2.5}/.github/workflows/codeql.yml +0 -0
  19. {repoauditor-0.2.3 → repoauditor-0.2.5}/.gitignore +0 -0
  20. {repoauditor-0.2.3 → repoauditor-0.2.5}/.pre-commit-config.yaml +0 -0
  21. {repoauditor-0.2.3 → repoauditor-0.2.5}/.python-version +0 -0
  22. {repoauditor-0.2.3 → repoauditor-0.2.5}/CODE_OF_CONDUCT.md +0 -0
  23. {repoauditor-0.2.3 → repoauditor-0.2.5}/CONTRIBUTING.md +0 -0
  24. {repoauditor-0.2.3 → repoauditor-0.2.5}/DEVELOPMENT.md +0 -0
  25. {repoauditor-0.2.3 → repoauditor-0.2.5}/GOVERNANCE.md +0 -0
  26. {repoauditor-0.2.3 → repoauditor-0.2.5}/LICENSE +0 -0
  27. {repoauditor-0.2.3 → repoauditor-0.2.5}/MAINTAINERS.md +0 -0
  28. {repoauditor-0.2.3 → repoauditor-0.2.5}/SECURITY.md +0 -0
  29. {repoauditor-0.2.3 → repoauditor-0.2.5}/minisign_key.pub +0 -0
  30. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/AutoGitSemVer.yaml +0 -0
  31. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/CommandLineProcessor.py +0 -0
  32. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/EntryPoint.py +0 -0
  33. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/ExecuteModules.py +0 -0
  34. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Impl/ParallelSequentialProcessor.py +0 -0
  35. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Impl/__init__.py +0 -0
  36. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Module.py +0 -0
  37. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugin.py +0 -0
  38. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionQuery.py +0 -0
  39. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowDeletions.py +0 -0
  40. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/AllowForcePushes.py +0 -0
  41. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DismissStalePullRequestApprovals.py +0 -0
  42. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/DoNotAllowBypassSettings.py +0 -0
  43. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/EnsureStatusChecks.py +0 -0
  44. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicEnableRequirementImpl.py +0 -0
  45. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/ClassicValueRequirementImpl.py +0 -0
  46. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/Impl/__init__.py +0 -0
  47. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovalMostRecentPush.py +0 -0
  48. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireApprovals.py +0 -0
  49. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireCodeOwnerReview.py +0 -0
  50. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireConversationResolution.py +0 -0
  51. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireLinearHistory.py +0 -0
  52. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequirePullRequests.py +0 -0
  53. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireSignedCommits.py +0 -0
  54. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireStatusChecksToPass.py +0 -0
  55. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/RequireUpToDateBranches.py +0 -0
  56. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/ClassicBranchProtectionRequirements/__init__.py +0 -0
  57. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQuery.py +0 -0
  58. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/Protected.py +0 -0
  59. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/DefaultBranchQueryRequirements/__init__.py +0 -0
  60. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/Impl/Common.py +0 -0
  61. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/Impl/EnableRequirementImpl.py +0 -0
  62. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/Impl/ValueRequirementImpl.py +0 -0
  63. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/Impl/__init__.py +0 -0
  64. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/Module.py +0 -0
  65. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQuery.py +0 -0
  66. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/AutoMerge.py +0 -0
  67. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DefaultBranch.py +0 -0
  68. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DeleteHeadBranches.py +0 -0
  69. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/DependabotSecurityUpdates.py +0 -0
  70. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Description.py +0 -0
  71. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardEnableRequirementImpl.py +0 -0
  72. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/StandardValueRequirementImpl.py +0 -0
  73. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Impl/__init__.py +0 -0
  74. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/License.py +0 -0
  75. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommit.py +0 -0
  76. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/MergeCommitMessage.py +0 -0
  77. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/Private.py +0 -0
  78. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/RebaseMergeCommit.py +0 -0
  79. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanning.py +0 -0
  80. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SecretScanningPushProtection.py +0 -0
  81. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashCommitMerge.py +0 -0
  82. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SquashMergeCommitMessage.py +0 -0
  83. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SuggestUpdatingPullRequestBranches.py +0 -0
  84. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportDiscussions.py +0 -0
  85. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportIssues.py +0 -0
  86. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportProjects.py +0 -0
  87. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/SupportWikis.py +0 -0
  88. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/TemplateRepository.py +0 -0
  89. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/WebCommitSignoff.py +0 -0
  90. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/StandardQueryRequirements/__init__.py +0 -0
  91. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHub/__init__.py +0 -0
  92. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/GitHubPlugin.py +0 -0
  93. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Plugins/__init__.py +0 -0
  94. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Query.py +0 -0
  95. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/Requirement.py +0 -0
  96. {repoauditor-0.2.3 → repoauditor-0.2.5}/src/RepoAuditor/py.typed +0 -0
  97. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/CommandLineProcessor_UnitTest.py +0 -0
  98. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/EntryPoint_UnitTest.py +0 -0
  99. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/ExecuteModules_UnitTest.py +0 -0
  100. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/Module_UnitTest.py +0 -0
  101. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/Plugin_UnitTest.py +0 -0
  102. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/Plugins/GitHub_EndToEndTest.py +0 -0
  103. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/Plugins/__snapshots__/GitHub_EndToEndTest.ambr +0 -0
  104. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/Plugins/utilities.py +0 -0
  105. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/Query_UnitTest.py +0 -0
  106. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/Requirement_UnitTest.py +0 -0
  107. {repoauditor-0.2.3 → repoauditor-0.2.5}/tests/__snapshots__/ExecuteModules_UnitTest.ambr +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: RepoAuditor
3
- Version: 0.2.3
3
+ Version: 0.2.5
4
4
  Summary: Add your description here
5
5
  Project-URL: Homepage, https://github.com/gt-sse-center/RepoAuditor
6
6
  Project-URL: Documentation, https://github.com/gt-sse-center/RepoAuditor
@@ -41,19 +41,71 @@ Description-Content-Type: text/markdown
41
41
 
42
42
  ## Contents
43
43
  - [Overview](#overview)
44
+ - [How to use RepoAuditor](#how-to-use-repoauditor)
45
+ - [Personal Access Token](#personal-access-token)
46
+ - [Example Usage](#example-usage)
44
47
  - [Installation](#installation)
45
48
  - [Development](#development)
46
49
  - [Additional Information](#additional-information)
47
50
  - [License](#license)
48
51
 
49
52
  ## Overview
50
- TODO: Complete this section
53
+
54
+ We recommend using [uv](https://docs.astral.sh/uv/#uv) since `RepoAuditor` uses `uv` to create and manage a virtual environment.
51
55
 
52
56
  ### How to use RepoAuditor
53
- TODO: Complete this section
54
57
 
55
58
  <!-- Content below this delimiter will be copied to the generated README.md file. DO NOT REMOVE THIS COMMENT, as it will cause regeneration to fail. -->
56
59
 
60
+ Once installed, you can invoke the following to verify if `RepoAuditor` is installed correctly:
61
+ ```shell
62
+ uv run repo_auditor --version
63
+ ```
64
+ and you should see something like
65
+ ```shell
66
+ RepoAuditor vX.X.X
67
+ ```
68
+
69
+ To get a list of command line options, you can run
70
+ ```shell
71
+ uv run repo_auditor --help
72
+ ```
73
+
74
+ ### Personal Access Token (PAT)
75
+
76
+ The most common use case for `RepoAuditor` would be to audit a GitHub repository.
77
+ In order to allow `RepoAuditor` to read the repository, you first need to generate a Personal Access Token or PAT.
78
+
79
+ Please refer to the [GitHub documentation on Personal Access Tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) for details about a `Fine-grained PAT` which we will be using.
80
+
81
+ To generate the Fine-grained PAT, we perform the following steps:
82
+
83
+ 1. Go to `Settings -> Developer settings -> Personal Access Token -> Fine-grained tokens`.
84
+ 2. Click on `Generate new token`.
85
+ 3. Give the token a name and a description.
86
+ 4. Set an appropriate expiration date.
87
+ 5. Under `Repository Access`, select `All repositories`.
88
+ 6. For permissions, we need to go to `Repository permissions`.
89
+ 7. Enable Read-Write access to `Contents`, and Read access to `Administration`, `Secret Scanning` and `Dependabot Alerts`.
90
+ 8. Click on `Generate token`.
91
+ 9. Copy the generated string. This is your PAT.
92
+
93
+ After obtaining the PAT, you can save it in a file (e.g. `PAT`) which `RepoAuditor` can read on operation.
94
+
95
+ ### Example Usage
96
+
97
+ With the above generated PAT file, you can now run `RepoAuditor` on your GitHub repository.
98
+ As an example, we will use the [python-helloworld](https://github.com/dbarnett/python-helloworld) repo.
99
+
100
+ **NOTE** You need to fork the repository since your default PAT only has access to repos under your account.
101
+
102
+ To run `RepoAuditor`, we can enter the following in the command-line:
103
+ ```shell
104
+ uv run repo_auditor --include GitHub --GitHub-url https://github.com/<username>/python-helloworld --GitHub-pat PAT
105
+ ```
106
+
107
+ `RepoAuditor` will generate a series of messages describing all the issues in the repository, along with the rationale behind them and the steps for resolution.
108
+
57
109
  ## Installation
58
110
 
59
111
  | Installation Method | Command |
@@ -66,7 +118,9 @@ Artifacts are signed and validated using [py-minisign](https://github.com/x13a/p
66
118
 
67
119
  To verify that an artifact is valid, visit [the latest release](https://github.com/gt-sse-center/RepoAuditor/releases/latest) and download the `.minisign` signature file that corresponds to the artifact, then run the following command, replacing `<filename>` with the name of the artifact to be verified:
68
120
 
69
- `uv run --with py-minisign python -c "import minisign; minisign.PublicKey.from_file('minisign_key.pub').verify_file('<filename>')"`
121
+ ```shell
122
+ uv run --with py-minisign python -c "import minisign; minisign.PublicKey.from_file('minisign_key.pub').verify_file('<filename>')"
123
+ ```
70
124
 
71
125
  ## Development
72
126
  Please visit [Contributing](https://github.com/gt-sse-center/RepoAuditor/blob/main/CONTRIBUTING.md) and [Development](https://github.com/gt-sse-center/RepoAuditor/blob/main/DEVELOPMENT.md) for information on contributing to this project.
@@ -16,19 +16,71 @@
16
16
 
17
17
  ## Contents
18
18
  - [Overview](#overview)
19
+ - [How to use RepoAuditor](#how-to-use-repoauditor)
20
+ - [Personal Access Token](#personal-access-token)
21
+ - [Example Usage](#example-usage)
19
22
  - [Installation](#installation)
20
23
  - [Development](#development)
21
24
  - [Additional Information](#additional-information)
22
25
  - [License](#license)
23
26
 
24
27
  ## Overview
25
- TODO: Complete this section
28
+
29
+ We recommend using [uv](https://docs.astral.sh/uv/#uv) since `RepoAuditor` uses `uv` to create and manage a virtual environment.
26
30
 
27
31
  ### How to use RepoAuditor
28
- TODO: Complete this section
29
32
 
30
33
  <!-- Content below this delimiter will be copied to the generated README.md file. DO NOT REMOVE THIS COMMENT, as it will cause regeneration to fail. -->
31
34
 
35
+ Once installed, you can invoke the following to verify if `RepoAuditor` is installed correctly:
36
+ ```shell
37
+ uv run repo_auditor --version
38
+ ```
39
+ and you should see something like
40
+ ```shell
41
+ RepoAuditor vX.X.X
42
+ ```
43
+
44
+ To get a list of command line options, you can run
45
+ ```shell
46
+ uv run repo_auditor --help
47
+ ```
48
+
49
+ ### Personal Access Token (PAT)
50
+
51
+ The most common use case for `RepoAuditor` would be to audit a GitHub repository.
52
+ In order to allow `RepoAuditor` to read the repository, you first need to generate a Personal Access Token or PAT.
53
+
54
+ Please refer to the [GitHub documentation on Personal Access Tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) for details about a `Fine-grained PAT` which we will be using.
55
+
56
+ To generate the Fine-grained PAT, we perform the following steps:
57
+
58
+ 1. Go to `Settings -> Developer settings -> Personal Access Token -> Fine-grained tokens`.
59
+ 2. Click on `Generate new token`.
60
+ 3. Give the token a name and a description.
61
+ 4. Set an appropriate expiration date.
62
+ 5. Under `Repository Access`, select `All repositories`.
63
+ 6. For permissions, we need to go to `Repository permissions`.
64
+ 7. Enable Read-Write access to `Contents`, and Read access to `Administration`, `Secret Scanning` and `Dependabot Alerts`.
65
+ 8. Click on `Generate token`.
66
+ 9. Copy the generated string. This is your PAT.
67
+
68
+ After obtaining the PAT, you can save it in a file (e.g. `PAT`) which `RepoAuditor` can read on operation.
69
+
70
+ ### Example Usage
71
+
72
+ With the above generated PAT file, you can now run `RepoAuditor` on your GitHub repository.
73
+ As an example, we will use the [python-helloworld](https://github.com/dbarnett/python-helloworld) repo.
74
+
75
+ **NOTE** You need to fork the repository since your default PAT only has access to repos under your account.
76
+
77
+ To run `RepoAuditor`, we can enter the following in the command-line:
78
+ ```shell
79
+ uv run repo_auditor --include GitHub --GitHub-url https://github.com/<username>/python-helloworld --GitHub-pat PAT
80
+ ```
81
+
82
+ `RepoAuditor` will generate a series of messages describing all the issues in the repository, along with the rationale behind them and the steps for resolution.
83
+
32
84
  ## Installation
33
85
 
34
86
  | Installation Method | Command |
@@ -41,7 +93,9 @@ Artifacts are signed and validated using [py-minisign](https://github.com/x13a/p
41
93
 
42
94
  To verify that an artifact is valid, visit [the latest release](https://github.com/gt-sse-center/RepoAuditor/releases/latest) and download the `.minisign` signature file that corresponds to the artifact, then run the following command, replacing `<filename>` with the name of the artifact to be verified:
43
95
 
44
- `uv run --with py-minisign python -c "import minisign; minisign.PublicKey.from_file('minisign_key.pub').verify_file('<filename>')"`
96
+ ```shell
97
+ uv run --with py-minisign python -c "import minisign; minisign.PublicKey.from_file('minisign_key.pub').verify_file('<filename>')"
98
+ ```
45
99
 
46
100
  ## Development
47
101
  Please visit [Contributing](https://github.com/gt-sse-center/RepoAuditor/blob/main/CONTRIBUTING.md) and [Development](https://github.com/gt-sse-center/RepoAuditor/blob/main/DEVELOPMENT.md) for information on contributing to this project.
@@ -47,6 +47,7 @@ build-backend = "hatchling.build"
47
47
  dev = [
48
48
  "autogitsemver>=0.8.0",
49
49
  "pre-commit>=4.2.0",
50
+ "pyfakefs>=5.8.0",
50
51
  "pytest>=8.3.5",
51
52
  "pytest-cov>=6.1.1",
52
53
  "ruff>=0.11.8",
@@ -3,4 +3,4 @@ APP_NAME = "RepoAuditor"
3
3
  # Note that this value will be overwritten by calls to `python ../../Build.py update_version` based
4
4
  # on changes observed in the git repository. The default value below will be used until the value
5
5
  # here is explicitly updated by the Continuous Integration system.
6
- __version__ = "0.2.3"
6
+ __version__ = "0.2.5"
@@ -0,0 +1,69 @@
1
+ # -------------------------------------------------------------------------------
2
+ # |
3
+ # | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
4
+ # | Distributed under the MIT License.
5
+ # |
6
+ # -------------------------------------------------------------------------------
7
+ """Unit tests for GitHub/Module.py"""
8
+
9
+ from pathlib import Path
10
+
11
+ import pytest
12
+ from pyfakefs.fake_filesystem_unittest import TestCase as FakeFSTestCase
13
+
14
+ from RepoAuditor.Plugins.GitHub.Module import GitHubModule, _GitHubSession
15
+
16
+
17
+ class TestGitHubSession(FakeFSTestCase):
18
+ """Unit tests for the _GitHubSession class."""
19
+
20
+ def setUp(self):
21
+ self.setUpPyfakefs()
22
+
23
+ def test_Construct(self):
24
+ """Test constructor."""
25
+ github_url = "https://github.com/gt-sse-center/RepoAuditor"
26
+
27
+ github_pat = Path(__file__).parent / "dummy_github_pat.txt"
28
+ self.fs.create_file(github_pat, contents="github_path_abcdefghijklmnop")
29
+
30
+ session = _GitHubSession(github_url=github_url, github_pat=github_pat)
31
+
32
+ assert session.github_url == github_url
33
+
34
+ # Test with trailing slash for URL
35
+ session = _GitHubSession(github_url=github_url + "/", github_pat=github_pat)
36
+
37
+ assert session.github_url == github_url
38
+
39
+ # Test with invalid repository
40
+ with pytest.raises(ValueError):
41
+ session = _GitHubSession(
42
+ github_url="https://github.com/gt-sse-center/RepoAuditor/123", github_pat=github_pat
43
+ )
44
+
45
+ # Test with enterprise URL
46
+ github_enterprise_url = "https://github.gatech.edu/gt-sse-center/RepoAuditor"
47
+ session = _GitHubSession(github_url=github_enterprise_url, github_pat=github_pat)
48
+ assert session.github_url == github_enterprise_url
49
+
50
+
51
+ class TestGitHubModule:
52
+ """Unit tests for the Module class in the GitHub plugin."""
53
+
54
+ def test_Construct(self):
55
+ """Test constructor."""
56
+ module = GitHubModule()
57
+ assert isinstance(module, GitHubModule)
58
+
59
+ def test_GenerateInitialData(self):
60
+ """Test GenerateInitialData method."""
61
+ dynamic_args = {
62
+ "url": "https://github.com/gt-sse-center/RepoAuditor",
63
+ "pat": Path(__file__).parent / "dummy_github_pat.txt",
64
+ }
65
+ module = GitHubModule()
66
+ dynamic_args = module.GenerateInitialData(dynamic_args)
67
+
68
+ assert "session" in dynamic_args
69
+ assert isinstance(dynamic_args["session"], _GitHubSession)
@@ -392,6 +392,15 @@ wheels = [
392
392
  { url = "https://files.pythonhosted.org/packages/88/74/a88bf1b1efeae488a0c0b7bdf71429c313722d1fc0f377537fbe554e6180/pre_commit-4.2.0-py2.py3-none-any.whl", hash = "sha256:a009ca7205f1eb497d10b845e52c838a98b6cdd2102a6c8e4540e94ee75c58bd", size = 220707, upload-time = "2025-03-18T21:35:19.343Z" },
393
393
  ]
394
394
 
395
+ [[package]]
396
+ name = "pyfakefs"
397
+ version = "5.8.0"
398
+ source = { registry = "https://pypi.org/simple" }
399
+ sdist = { url = "https://files.pythonhosted.org/packages/a8/50/a839c8812899e8955223d95b27767480856f9723b3230ddee0472cf1dbe2/pyfakefs-5.8.0.tar.gz", hash = "sha256:7e5457ee3cc67069d3cef6e278227ecfc80bfb61e925bc0a4d3b0af32d1c99ce", size = 215072, upload-time = "2025-03-11T19:29:20.274Z" }
400
+ wheels = [
401
+ { url = "https://files.pythonhosted.org/packages/14/ac/ae2cf01b18b7ac04d22e5faf7d5eafcc000269c4f4a9036e40da6c37aed9/pyfakefs-5.8.0-py3-none-any.whl", hash = "sha256:4bd0fc8def7d0582139922447758632ff34a327b460a7e83feb6edbd841061dd", size = 230606, upload-time = "2025-03-11T19:29:18.341Z" },
402
+ ]
403
+
395
404
  [[package]]
396
405
  name = "pygments"
397
406
  version = "2.19.1"
@@ -503,6 +512,7 @@ dependencies = [
503
512
  dev = [
504
513
  { name = "autogitsemver" },
505
514
  { name = "pre-commit" },
515
+ { name = "pyfakefs" },
506
516
  { name = "pytest" },
507
517
  { name = "pytest-cov" },
508
518
  { name = "ruff" },
@@ -521,6 +531,7 @@ requires-dist = [
521
531
  dev = [
522
532
  { name = "autogitsemver", specifier = ">=0.8.0" },
523
533
  { name = "pre-commit", specifier = ">=4.2.0" },
534
+ { name = "pyfakefs", specifier = ">=5.8.0" },
524
535
  { name = "pytest", specifier = ">=8.3.5" },
525
536
  { name = "pytest-cov", specifier = ">=6.1.1" },
526
537
  { name = "ruff", specifier = ">=0.11.8" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes