RepoAuditor 0.1.0__py3-none-any.whl
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.
- BuildBinary.py +104 -0
- RepoAuditor/EntryPoint.py +92 -0
- RepoAuditor/Math.py +27 -0
- RepoAuditor/__init__.py +14 -0
- RepoAuditor-0.1.0.dist-info/LICENSE.txt +21 -0
- RepoAuditor-0.1.0.dist-info/METADATA +59 -0
- RepoAuditor-0.1.0.dist-info/RECORD +10 -0
- RepoAuditor-0.1.0.dist-info/WHEEL +5 -0
- RepoAuditor-0.1.0.dist-info/entry_points.txt +2 -0
- RepoAuditor-0.1.0.dist-info/top_level.txt +2 -0
BuildBinary.py
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------
|
|
2
|
+
# |
|
|
3
|
+
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
# | Distributed under the MIT License.
|
|
5
|
+
# |
|
|
6
|
+
# ----------------------------------------------------------------------
|
|
7
|
+
"""Builds the binary for this project."""
|
|
8
|
+
|
|
9
|
+
import datetime
|
|
10
|
+
import importlib
|
|
11
|
+
import textwrap
|
|
12
|
+
|
|
13
|
+
from functools import cache
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
from cx_Freeze import setup, Executable
|
|
17
|
+
from dbrownell_Common import PathEx
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# ----------------------------------------------------------------------
|
|
21
|
+
@cache
|
|
22
|
+
def _GetName() -> str:
|
|
23
|
+
return "RepoAuditor"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# ----------------------------------------------------------------------
|
|
27
|
+
@cache
|
|
28
|
+
def _GetVersionAndDocstring() -> tuple[str, str]:
|
|
29
|
+
mod = importlib.import_module(_GetName())
|
|
30
|
+
return mod.__version__, mod.__doc__ or ""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# ----------------------------------------------------------------------
|
|
34
|
+
@cache
|
|
35
|
+
def _GetEntryPoint() -> Path:
|
|
36
|
+
return PathEx.EnsureFile(Path(__file__).parent / _GetName() / "EntryPoint.py")
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# ----------------------------------------------------------------------
|
|
40
|
+
@cache
|
|
41
|
+
def _GetCopyright() -> str:
|
|
42
|
+
initial_year = 2024
|
|
43
|
+
current_year = datetime.datetime.now().year
|
|
44
|
+
|
|
45
|
+
if current_year == initial_year:
|
|
46
|
+
year_suffix = ""
|
|
47
|
+
elif current_year // 100 != initial_year // 100:
|
|
48
|
+
year_suffix = str(current_year)
|
|
49
|
+
else:
|
|
50
|
+
year_suffix = "-{}".format(current_year % 100)
|
|
51
|
+
|
|
52
|
+
return textwrap.dedent(
|
|
53
|
+
f"""\
|
|
54
|
+
Copyright (c) {initial_year}{year_suffix} Scientific Software Engineering Center at Georgia Tech
|
|
55
|
+
|
|
56
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
57
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
58
|
+
in the Software without restriction, including without limitation the rights
|
|
59
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
60
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
61
|
+
furnished to do so, subject to the following conditions:
|
|
62
|
+
|
|
63
|
+
The above copyright notice and this permission notice shall be included in all
|
|
64
|
+
copies or substantial portions of the Software.
|
|
65
|
+
|
|
66
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
67
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
68
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
69
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
70
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
71
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
72
|
+
SOFTWARE.
|
|
73
|
+
""",
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# ----------------------------------------------------------------------
|
|
78
|
+
setup(
|
|
79
|
+
name=_GetName(),
|
|
80
|
+
version=_GetVersionAndDocstring()[0],
|
|
81
|
+
description=_GetVersionAndDocstring()[1],
|
|
82
|
+
executables=[
|
|
83
|
+
Executable(
|
|
84
|
+
_GetEntryPoint(),
|
|
85
|
+
base="console",
|
|
86
|
+
copyright=_GetCopyright(),
|
|
87
|
+
# icon=<icon_filename>,
|
|
88
|
+
target_name=_GetName(),
|
|
89
|
+
# trademarks=<trademarks>,
|
|
90
|
+
),
|
|
91
|
+
],
|
|
92
|
+
options={
|
|
93
|
+
"build_exe": {
|
|
94
|
+
"excludes": [
|
|
95
|
+
"tcl",
|
|
96
|
+
"tkinter",
|
|
97
|
+
],
|
|
98
|
+
"no_compress": False,
|
|
99
|
+
"optimize": 0,
|
|
100
|
+
# "packages": [],
|
|
101
|
+
# "include_files": [],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------
|
|
2
|
+
# |
|
|
3
|
+
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
# | Distributed under the MIT License.
|
|
5
|
+
# |
|
|
6
|
+
# ----------------------------------------------------------------------
|
|
7
|
+
"""This file serves as an example of how to create scripts that can be invoked from the command line once the package is installed."""
|
|
8
|
+
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
import typer
|
|
12
|
+
|
|
13
|
+
from typer.core import TyperGroup # type: ignore [import-untyped]
|
|
14
|
+
|
|
15
|
+
from RepoAuditor import Math, __version__
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# ----------------------------------------------------------------------
|
|
19
|
+
class NaturalOrderGrouper(TyperGroup):
|
|
20
|
+
# pylint: disable=missing-class-docstring
|
|
21
|
+
# ----------------------------------------------------------------------
|
|
22
|
+
def list_commands(self, *args, **kwargs): # pylint: disable=unused-argument
|
|
23
|
+
return self.commands.keys()
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# ----------------------------------------------------------------------
|
|
27
|
+
app = typer.Typer(
|
|
28
|
+
cls=NaturalOrderGrouper,
|
|
29
|
+
help=__doc__,
|
|
30
|
+
no_args_is_help=True,
|
|
31
|
+
pretty_exceptions_show_locals=False,
|
|
32
|
+
pretty_exceptions_enable=False,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# ----------------------------------------------------------------------
|
|
37
|
+
@app.command("Add")
|
|
38
|
+
def Add(
|
|
39
|
+
x: int,
|
|
40
|
+
y: int,
|
|
41
|
+
) -> None:
|
|
42
|
+
"""Adds 2 values."""
|
|
43
|
+
|
|
44
|
+
sys.stdout.write(str(Math.Add(x, y)))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# ----------------------------------------------------------------------
|
|
48
|
+
@app.command("Sub")
|
|
49
|
+
def Sub(
|
|
50
|
+
x: int,
|
|
51
|
+
y: int,
|
|
52
|
+
) -> None:
|
|
53
|
+
"""Subtracts 2 values."""
|
|
54
|
+
|
|
55
|
+
sys.stdout.write(str(Math.Sub(x, y)))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# ----------------------------------------------------------------------
|
|
59
|
+
@app.command("Mult")
|
|
60
|
+
def Mult(
|
|
61
|
+
x: int,
|
|
62
|
+
y: int,
|
|
63
|
+
) -> None:
|
|
64
|
+
"""Multiplies 2 values."""
|
|
65
|
+
|
|
66
|
+
sys.stdout.write(str(Math.Mult(x, y)))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# ----------------------------------------------------------------------
|
|
70
|
+
@app.command("Div")
|
|
71
|
+
def Div(
|
|
72
|
+
x: int,
|
|
73
|
+
y: int,
|
|
74
|
+
) -> None:
|
|
75
|
+
"""Divides 1 value by another."""
|
|
76
|
+
|
|
77
|
+
sys.stdout.write(str(Math.Div(x, y)))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# ----------------------------------------------------------------------
|
|
81
|
+
@app.command("Version")
|
|
82
|
+
def Version() -> None:
|
|
83
|
+
"""Prints the version of the package."""
|
|
84
|
+
|
|
85
|
+
sys.stdout.write(__version__)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# ----------------------------------------------------------------------
|
|
89
|
+
# ----------------------------------------------------------------------
|
|
90
|
+
# ----------------------------------------------------------------------
|
|
91
|
+
if __name__ == "__main__":
|
|
92
|
+
app() # pragma: no cover
|
RepoAuditor/Math.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------
|
|
2
|
+
# |
|
|
3
|
+
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
# | Distributed under the MIT License.
|
|
5
|
+
# |
|
|
6
|
+
# ----------------------------------------------------------------------
|
|
7
|
+
"""Basic math functions. This file illustrates how to create a python package that contains functions that can be invoked by other python code."""
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# ----------------------------------------------------------------------
|
|
11
|
+
def Add(x, y):
|
|
12
|
+
return x + y
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# ----------------------------------------------------------------------
|
|
16
|
+
def Sub(x, y):
|
|
17
|
+
return x - y
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# ----------------------------------------------------------------------
|
|
21
|
+
def Mult(x, y):
|
|
22
|
+
return x * y
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# ----------------------------------------------------------------------
|
|
26
|
+
def Div(x, y):
|
|
27
|
+
return x / y
|
RepoAuditor/__init__.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# ----------------------------------------------------------------------
|
|
2
|
+
# |
|
|
3
|
+
# | Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
# | Distributed under the MIT License.
|
|
5
|
+
# |
|
|
6
|
+
# ----------------------------------------------------------------------
|
|
7
|
+
# pylint: disable=missing-module-docstring,invalid-name
|
|
8
|
+
|
|
9
|
+
# Note that this value will be overwritten by calls to `python ../../Build.py update_version` based
|
|
10
|
+
# on changes observed in the git repository. The default value below will be used until the value
|
|
11
|
+
# here is explicitly updated as part of a commit.
|
|
12
|
+
__version__ = "0.1.0"
|
|
13
|
+
|
|
14
|
+
from .Math import Add, Sub, Mult, Div
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Scientific Software Engineering Center at Georgia Tech
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: RepoAuditor
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Audits repositories for best practices.
|
|
5
|
+
Author-email: Scientific Software Engineering Center at Georgia Tech <sse-center@gatech.edu>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/gt-sse-center/RepoAuditor
|
|
8
|
+
Project-URL: Documentation, https://github.com/gt-sse-center/RepoAuditor
|
|
9
|
+
Project-URL: Repository, https://github.com/gt-sse-center/RepoAuditor
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: MacOS
|
|
12
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE.txt
|
|
20
|
+
Requires-Dist: typer ~=0.9
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: dbrownell-DevTools ; extra == 'dev'
|
|
23
|
+
Provides-Extra: package
|
|
24
|
+
Requires-Dist: build ==1.* ; extra == 'package'
|
|
25
|
+
Requires-Dist: cx-Freeze ==6.* ; extra == 'package'
|
|
26
|
+
Requires-Dist: twine ==4.* ; extra == 'package'
|
|
27
|
+
|
|
28
|
+
# RepoAuditor
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Audits repositories for best practices.
|
|
33
|
+
|
|
34
|
+
### Overview
|
|
35
|
+
|
|
36
|
+
TODO: Complete this section
|
|
37
|
+
|
|
38
|
+
### How to use RepoAuditor
|
|
39
|
+
|
|
40
|
+
TODO: Complete this section
|
|
41
|
+
|
|
42
|
+
## Installation via Executable
|
|
43
|
+
|
|
44
|
+
Download an executable for Linux, MacOS, or Windows to use the functionality provided by this repository without a dependency on [Python](https://www.python.org).
|
|
45
|
+
|
|
46
|
+
1. Download the archive for the latest release [here](https://github.com/gt-sse-center/RepoAuditor/releases/latest); the files will begin with `exe.` and contain the name of your operating system.
|
|
47
|
+
2. Decompress the archive
|
|
48
|
+
|
|
49
|
+
## Installation via pip
|
|
50
|
+
|
|
51
|
+
Install the RepoAuditor package via [pip](https://pip.pypa.io/en/stable/) (Package Installer for Python) to use it with your python code.
|
|
52
|
+
|
|
53
|
+
`pip install RepoAuditor`
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
RepoAuditor is licensed under the <a href="https://choosealicense.com/licenses/mit/" target="_blank">MIT</a> license.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
BuildBinary.py,sha256=GTuOdK1NcrWKvC4hkr9MtiTSMXF8Rys-ZVxVjP7o36Y,3592
|
|
2
|
+
RepoAuditor/EntryPoint.py,sha256=LdikUVpdsgDybB4kcdHFJfSQ4hGFGbLMoJdekSRg-pc,2572
|
|
3
|
+
RepoAuditor/Math.py,sha256=wznhaBVUBEB9EZb7gi33SPY4_HvlVEoK3VqmgU4nwXc,876
|
|
4
|
+
RepoAuditor/__init__.py,sha256=OSGR6BFauVgn_m8uagk7xa55kz_dV1S8SI0Dj2J0CQw,639
|
|
5
|
+
RepoAuditor-0.1.0.dist-info/LICENSE.txt,sha256=zc7f3T2QcYWfeQLzALc_PNFXPegKkIYxfFvfCGOtVFg,1132
|
|
6
|
+
RepoAuditor-0.1.0.dist-info/METADATA,sha256=QHI_3FgM8vARg4Nru574orqCgDtZ7hZhW5TVLwGSbPw,2044
|
|
7
|
+
RepoAuditor-0.1.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
8
|
+
RepoAuditor-0.1.0.dist-info/entry_points.txt,sha256=eN5Hrko0L0F4jJSGdVScI90f2MeHmFwsjbXICW_Ibk8,59
|
|
9
|
+
RepoAuditor-0.1.0.dist-info/top_level.txt,sha256=dg-IQ-OWnx12k00Iioc5mToRnfq3wnQyUmQ-Py5BjCI,24
|
|
10
|
+
RepoAuditor-0.1.0.dist-info/RECORD,,
|