kospex 0.0.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.
kospex-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Peter Freiberg
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.
kospex-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.1
2
+ Name: kospex
3
+ Version: 0.0.1
4
+ Summary: The kospex CLI tool.
5
+ Author-email: Peter Freiberg <peter.freiberg@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2023 Peter Freiberg
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://kospex.io
29
+ Project-URL: Issues, https://github.com/kospex/kospex/issues
30
+ Project-URL: Repository, https://github.com/kospex/kospex
31
+ Keywords: analytics,git,code analytics
32
+ Requires-Python: >=3.10
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: Click
36
+
37
+ # kospex
38
+
39
+ Kospex is a CLI which aims to _"look at the guts of your code"_ to help gain insights into your developers and technology landscape.
40
+ It uses database structure from the excellent [Mergestat lite](https://github.com/mergestat/mergestat-lite) to model data from git repositories.
41
+
42
+ ## Installation, setup and usage
43
+
44
+ See the official [installation documentation](https://kospex.io/getting-started)
45
+
46
+
47
+ ## What is a kospex?
48
+
49
+ We're aiming to [k]now your c[o]de by in[spe]cting the haruspe[x].
50
+ From Wikipedia, _The Latin terms haruspex and haruspicina are from an archaic word, hīra = "entrails, intestines"_
51
+
52
+ So we're going to help look at the "guts of your code" to gain an understanding of the applications, technology landscape (sprawl?) and developers.
53
+
54
+
kospex-0.0.1/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # kospex
2
+
3
+ Kospex is a CLI which aims to _"look at the guts of your code"_ to help gain insights into your developers and technology landscape.
4
+ It uses database structure from the excellent [Mergestat lite](https://github.com/mergestat/mergestat-lite) to model data from git repositories.
5
+
6
+ ## Installation, setup and usage
7
+
8
+ kospex is currently a collection of tools, bound together by python in a docker container.
9
+ It works by analysing cloned repositories on the filesystem.
10
+
11
+ ### Step 0: Prepare (clone) the repositories you want to assess
12
+
13
+ See section "Git code layout for running analysis" below. For simple "one off" analysis just clone some repo's into a directory as a starting point.
14
+
15
+ Ideally, a structure like \
16
+ /BASE/GIT_SERVER/ORG/REPO
17
+
18
+ ### Step 1: Clone kospex
19
+
20
+ > git clone https://github.com/kospex/kospex.git
21
+
22
+ ### Step 2: Install the python dependencies (and scc)
23
+
24
+ **Optional but strongely recommended** - use a python virtual env.
25
+
26
+ > pip install -r requirements.txt
27
+
28
+ Follow the instructions for installing [scc](https://github.com/boyter/scc)
29
+
30
+ > export PATH=$PATH:$PWD
31
+
32
+ Add this directory to your path, kospex toolkit is a collection on python executables.
33
+
34
+ If you are ok to use the ~/code directory for cloned repos, then run:
35
+ > kospex init --default
36
+
37
+ ### Step 3: sync some data and play with some commands
38
+
39
+ > kospex sync [GIT_REPO]
40
+ >
41
+ > kospex developers -repo [GIT_REPO]
42
+ >
43
+ > kospex tech-landscape -metadata
44
+
45
+ You can also use the _kgit_ command to clone and sync a repo you have access to
46
+
47
+ > kgit clone -sync -repo https://github.com/mergestat/mergestat-lite
48
+
49
+ The above command will clone into the KOSPEX_CODE/GIT_SERVER/ORG/REPO structure
50
+
51
+ ## Git code layout for running analysis
52
+
53
+ One option, if you're inspecting code on your own laptop is to use use your home directory.
54
+
55
+ ~/kospex/ \
56
+ We'll place config files and the kospex DB (Sqlite3) in here for sync'ed data \
57
+ ~/code/ \
58
+ This should be your GIT_DATA_DIRECTORY with a structure like \
59
+ GIT_SERVER/ORG/REPO \
60
+ \
61
+ For example, in your ~/code it might look like: \
62
+ github.com/kospex/kospex \
63
+ github.com/mergestat/mergestat-lite
64
+
65
+ This way we have a nice deterministic way of separating different orgs, potentially different instances (e.g. you have an on premise bitbucket and use GitHub.com) as well.
66
+
67
+ ## Key Use Cases and features
68
+
69
+ - Identify technology landscape
70
+ - Identify active developers (e.g. who's had their code committer in the last 90 days)
71
+ - Identify key person or offboarding risk
72
+ - Identify potential complexity challenges (or conceptual integrity concerns)
73
+ - Aggregate repo metadata into a single database for easier and faster querying
74
+
75
+ ## Queries to try
76
+
77
+ ### sync a repo
78
+
79
+ > kospex sync PATH/TO/GIT_REPO
80
+
81
+ _Most functions require the data to be synced._
82
+
83
+ ### Show recent developers who've committed in X days
84
+
85
+ List the active developers (90 days) in the given repo (sync required)
86
+ > kospex developers -repo PATH/TO/REPO
87
+
88
+ List the developers in the given repo_id (sync'ed data in the kospex DB)
89
+ > kospex developers -repo_id=github.com&tilde;ORG&tilde;REPO
90
+
91
+ use -days NUM for seen in the last # of days (e.g. 90 or 365)
92
+
93
+ ### Identify technology landscape
94
+
95
+ List the overall tech stack, based on file extension, for all sync'ed repos
96
+ > kospex tech-landscape
97
+
98
+ List the overall tech stack for all sync'ed repos (using scc)
99
+ > kospex tech-landscape -metadata
100
+
101
+ List the overall tech stack for a repo (using scc)
102
+ > kospex tech-landscape -repo PATH/TO/REPO
103
+
104
+ List the tech stack in the given repo_id (sync'ed data in the kospex DB)
105
+ > kospex tech-landscape -repo_id=github.com&tilde;ORG&tilde;REPO
106
+
107
+ ## Design principles
108
+
109
+ - Precompute data where possible and useful
110
+ - Flatten tables, data warehouse style, to enabled easier querying and slicing by git server, owner and repo
111
+ - Be as agnostic to the git provider (i.e. GitHub, BitBucket, GitLab) for base use cases
112
+ - Be mindful that "there is no perfect", only indicators
113
+ - Separate cloning and pull updates from the analysis
114
+
115
+ ## Roadmap
116
+
117
+ - Build out automated functional and regressions testing (Currently manual)
118
+ - Build the ability to identify key person or offboarding risk
119
+ - Improve use case documentation
120
+ - Provide a mechanism to better map author_emails to users
121
+
122
+ ## Data extractions and assumptions
123
+
124
+ Most tables have a column, _repo_id, in the format of GIT_SERVER&tilde;OWNER&tilde;REPO
125
+ So for the repository https://github.com/kospex/kospex the _repo_id would be _github.com&tilde;kospex&tilde;kospex_
126
+
127
+ Most queries use author_email from git to mean a "developer". This is not always accurate as GitHub
128
+
129
+ ## What is a kospex?
130
+
131
+ We're aiming to [k]now your c[o]de by in[spe]cting the haruspe[x].
132
+ From Wikipedia, _The Latin terms haruspex and haruspicina are from an archaic word, hīra = "entrails, intestines"_
133
+
134
+ So we're going to help look at the "guts of your code" to gain an understanding of the applications, technology landscape (sprawl?) and developers.
135
+
136
+
@@ -0,0 +1,18 @@
1
+ # kospex
2
+
3
+ Kospex is a CLI which aims to _"look at the guts of your code"_ to help gain insights into your developers and technology landscape.
4
+ It uses database structure from the excellent [Mergestat lite](https://github.com/mergestat/mergestat-lite) to model data from git repositories.
5
+
6
+ ## Installation, setup and usage
7
+
8
+ See the official [installation documentation](https://kospex.io/getting-started)
9
+
10
+
11
+ ## What is a kospex?
12
+
13
+ We're aiming to [k]now your c[o]de by in[spe]cting the haruspe[x].
14
+ From Wikipedia, _The Latin terms haruspex and haruspicina are from an archaic word, hīra = "entrails, intestines"_
15
+
16
+ So we're going to help look at the "guts of your code" to gain an understanding of the applications, technology landscape (sprawl?) and developers.
17
+
18
+
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = ["setuptools>=70.1.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "kospex"
7
+ version = "0.0.1"
8
+ description = "The kospex CLI tool."
9
+ authors = [
10
+ {name = "Peter Freiberg", email = "peter.freiberg@gmail.com"}
11
+ ]
12
+ dependencies = [
13
+ "Click"
14
+ ]
15
+ requires-python = ">=3.10"
16
+ license = {file = "LICENSE"}
17
+ readme = "README.short.md"
18
+ keywords = ["analytics", "git", "code analytics"]
19
+
20
+ #[project.scripts]
21
+ #panopticas = "kospex:cli"
22
+
23
+ [project.urls]
24
+ Homepage = "https://kospex.io"
25
+ Issues = "https://github.com/kospex/kospex/issues"
26
+ Repository = "https://github.com/kospex/kospex"
kospex-0.0.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.1
2
+ Name: kospex
3
+ Version: 0.0.1
4
+ Summary: The kospex CLI tool.
5
+ Author-email: Peter Freiberg <peter.freiberg@gmail.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2023 Peter Freiberg
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://kospex.io
29
+ Project-URL: Issues, https://github.com/kospex/kospex/issues
30
+ Project-URL: Repository, https://github.com/kospex/kospex
31
+ Keywords: analytics,git,code analytics
32
+ Requires-Python: >=3.10
33
+ Description-Content-Type: text/markdown
34
+ License-File: LICENSE
35
+ Requires-Dist: Click
36
+
37
+ # kospex
38
+
39
+ Kospex is a CLI which aims to _"look at the guts of your code"_ to help gain insights into your developers and technology landscape.
40
+ It uses database structure from the excellent [Mergestat lite](https://github.com/mergestat/mergestat-lite) to model data from git repositories.
41
+
42
+ ## Installation, setup and usage
43
+
44
+ See the official [installation documentation](https://kospex.io/getting-started)
45
+
46
+
47
+ ## What is a kospex?
48
+
49
+ We're aiming to [k]now your c[o]de by in[spe]cting the haruspe[x].
50
+ From Wikipedia, _The Latin terms haruspex and haruspicina are from an archaic word, hīra = "entrails, intestines"_
51
+
52
+ So we're going to help look at the "guts of your code" to gain an understanding of the applications, technology landscape (sprawl?) and developers.
53
+
54
+
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ README.short.md
4
+ pyproject.toml
5
+ src/kospex.egg-info/PKG-INFO
6
+ src/kospex.egg-info/SOURCES.txt
7
+ src/kospex.egg-info/dependency_links.txt
8
+ src/kospex.egg-info/requires.txt
9
+ src/kospex.egg-info/top_level.txt
10
+ tests/test_capitalise.py
@@ -0,0 +1 @@
1
+ Click
@@ -0,0 +1,5 @@
1
+ # test_capitalize.py
2
+
3
+ from kospex_core import Kospex
4
+ import pytest
5
+