@theihtisham/dev-pulse 1.0.0 → 1.1.0

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 (40) hide show
  1. package/.editorconfig +12 -0
  2. package/.github/ISSUE_TEMPLATE/bug_report.yml +43 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.yml +33 -0
  4. package/.github/PULL_REQUEST_TEMPLATE.md +18 -0
  5. package/.github/dependabot.yml +16 -0
  6. package/.github/workflows/ci.yml +33 -0
  7. package/CODE_OF_CONDUCT.md +27 -0
  8. package/Dockerfile +8 -0
  9. package/LICENSE +21 -21
  10. package/README.md +135 -39
  11. package/SECURITY.md +22 -0
  12. package/devpulse/__init__.py +4 -4
  13. package/devpulse/api/__init__.py +1 -1
  14. package/devpulse/api/app.py +371 -371
  15. package/devpulse/cli/__init__.py +1 -1
  16. package/devpulse/cli/dashboard.py +131 -131
  17. package/devpulse/cli/main.py +678 -678
  18. package/devpulse/cli/render.py +175 -175
  19. package/devpulse/core/__init__.py +34 -34
  20. package/devpulse/core/analytics.py +487 -487
  21. package/devpulse/core/config.py +77 -77
  22. package/devpulse/core/database.py +612 -612
  23. package/devpulse/core/github_client.py +281 -281
  24. package/devpulse/core/models.py +142 -142
  25. package/devpulse/core/report_generator.py +454 -454
  26. package/devpulse/static/.gitkeep +1 -1
  27. package/devpulse/templates/report.html +64 -64
  28. package/package.json +35 -35
  29. package/pyproject.toml +80 -80
  30. package/requirements.txt +14 -14
  31. package/tests/__init__.py +1 -1
  32. package/tests/conftest.py +208 -208
  33. package/tests/test_analytics.py +284 -284
  34. package/tests/test_api.py +313 -313
  35. package/tests/test_cli.py +204 -204
  36. package/tests/test_config.py +47 -47
  37. package/tests/test_database.py +255 -255
  38. package/tests/test_models.py +107 -107
  39. package/tests/test_report_generator.py +173 -173
  40. package/jest.config.js +0 -7
@@ -1 +1 @@
1
- /* DevPulse static assets */
1
+ /* DevPulse static assets */
@@ -1,64 +1,64 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>DevPulse Report</title>
7
- <style>
8
- :root {
9
- --bg: #0d1117;
10
- --card: #161b22;
11
- --border: #30363d;
12
- --text: #c9d1d9;
13
- --heading: #f0f6fc;
14
- --accent: #58a6ff;
15
- --green: #3fb950;
16
- --yellow: #d29922;
17
- --red: #f85149;
18
- }
19
- * { margin: 0; padding: 0; box-sizing: border-box; }
20
- body {
21
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
22
- background: var(--bg);
23
- color: var(--text);
24
- line-height: 1.6;
25
- padding: 2rem;
26
- max-width: 960px;
27
- margin: 0 auto;
28
- }
29
- h1 { color: var(--heading); margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
30
- h2 { color: var(--accent); margin-top: 1.5rem; margin-bottom: 0.5rem; }
31
- table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
32
- th, td { border: 1px solid var(--border); padding: 0.5rem 1rem; text-align: left; }
33
- th { background: var(--card); color: var(--heading); }
34
- td { background: var(--card); }
35
- ul { padding-left: 1.5rem; }
36
- li { margin: 0.25rem 0; }
37
- strong { color: var(--heading); }
38
- code { background: var(--card); padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.9em; }
39
- .header { text-align: center; margin-bottom: 2rem; padding: 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
40
- .header h1 { border: none; color: var(--accent); }
41
- .metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
42
- .metric-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; text-align: center; }
43
- .metric-card .value { font-size: 2rem; font-weight: bold; color: var(--heading); }
44
- .metric-card .label { font-size: 0.85rem; color: var(--text); }
45
- .badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; font-weight: 600; }
46
- .badge-green { background: #1a3a2a; color: var(--green); }
47
- .badge-yellow { background: #3a2a1a; color: var(--yellow); }
48
- .badge-red { background: #3a1a1a; color: var(--red); }
49
- .insight { background: var(--card); border-left: 3px solid var(--accent); padding: 0.75rem 1rem; margin: 0.5rem 0; border-radius: 0 4px 4px 0; }
50
- .insight.warning { border-left-color: var(--yellow); }
51
- .insight.danger { border-left-color: var(--red); }
52
- .insight.success { border-left-color: var(--green); }
53
- footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); color: #484f58; font-size: 0.85rem; text-align: center; }
54
- </style>
55
- </head>
56
- <body>
57
- <div class="header">
58
- <h1>DevPulse Report</h1>
59
- <p>AI-Powered Developer Productivity Dashboard</p>
60
- </div>
61
- <div id="content"></div>
62
- <footer>Generated by DevPulse v1.0.0</footer>
63
- </body>
64
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>DevPulse Report</title>
7
+ <style>
8
+ :root {
9
+ --bg: #0d1117;
10
+ --card: #161b22;
11
+ --border: #30363d;
12
+ --text: #c9d1d9;
13
+ --heading: #f0f6fc;
14
+ --accent: #58a6ff;
15
+ --green: #3fb950;
16
+ --yellow: #d29922;
17
+ --red: #f85149;
18
+ }
19
+ * { margin: 0; padding: 0; box-sizing: border-box; }
20
+ body {
21
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
22
+ background: var(--bg);
23
+ color: var(--text);
24
+ line-height: 1.6;
25
+ padding: 2rem;
26
+ max-width: 960px;
27
+ margin: 0 auto;
28
+ }
29
+ h1 { color: var(--heading); margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
30
+ h2 { color: var(--accent); margin-top: 1.5rem; margin-bottom: 0.5rem; }
31
+ table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
32
+ th, td { border: 1px solid var(--border); padding: 0.5rem 1rem; text-align: left; }
33
+ th { background: var(--card); color: var(--heading); }
34
+ td { background: var(--card); }
35
+ ul { padding-left: 1.5rem; }
36
+ li { margin: 0.25rem 0; }
37
+ strong { color: var(--heading); }
38
+ code { background: var(--card); padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.9em; }
39
+ .header { text-align: center; margin-bottom: 2rem; padding: 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
40
+ .header h1 { border: none; color: var(--accent); }
41
+ .metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
42
+ .metric-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; text-align: center; }
43
+ .metric-card .value { font-size: 2rem; font-weight: bold; color: var(--heading); }
44
+ .metric-card .label { font-size: 0.85rem; color: var(--text); }
45
+ .badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; font-weight: 600; }
46
+ .badge-green { background: #1a3a2a; color: var(--green); }
47
+ .badge-yellow { background: #3a2a1a; color: var(--yellow); }
48
+ .badge-red { background: #3a1a1a; color: var(--red); }
49
+ .insight { background: var(--card); border-left: 3px solid var(--accent); padding: 0.75rem 1rem; margin: 0.5rem 0; border-radius: 0 4px 4px 0; }
50
+ .insight.warning { border-left-color: var(--yellow); }
51
+ .insight.danger { border-left-color: var(--red); }
52
+ .insight.success { border-left-color: var(--green); }
53
+ footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); color: #484f58; font-size: 0.85rem; text-align: center; }
54
+ </style>
55
+ </head>
56
+ <body>
57
+ <div class="header">
58
+ <h1>DevPulse Report</h1>
59
+ <p>AI-Powered Developer Productivity Dashboard</p>
60
+ </div>
61
+ <div id="content"></div>
62
+ <footer>Generated by DevPulse v1.0.0</footer>
63
+ </body>
64
+ </html>
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "main": "index.js",
3
- "types": "index.d.ts",
4
- "scripts": {
5
- "build": "tsc",
6
- "test": "jest",
7
- "lint": "eslint src --ext .ts"
8
- },
9
- "name": "@theihtisham/dev-pulse",
10
- "author": "ihtisham",
11
- "license": "MIT",
12
- "description": "Developer productivity metrics dashboard",
13
- "version": "1.0.0",
14
- "repository": {
15
- "type": "git",
16
- "url": "git+https://github.com/theihtisham/dev-pulse.git"
17
- },
18
- "bugs": {
19
- "url": "https://github.com/theihtisham/dev-pulse/issues"
20
- },
21
- "homepage": "https://github.com/theihtisham/dev-pulse#readme",
22
- "keywords": [
23
- "dev pulse",
24
- "typescript",
25
- "ai",
26
- "developer-tools"
27
- ],
28
- "devDependencies": {
29
- "typescript": "^5.3.0",
30
- "@types/node": "^20.0.0",
31
- "jest": "^29.7.0",
32
- "ts-jest": "^29.1.0",
33
- "@types/jest": "^29.5.0"
34
- }
35
- }
1
+ {
2
+ "main": "index.js",
3
+ "types": "index.d.ts",
4
+ "scripts": {
5
+ "build": "tsc",
6
+ "test": "jest",
7
+ "lint": "eslint src --ext .ts"
8
+ },
9
+ "name": "@theihtisham/dev-pulse",
10
+ "author": "theihtisham",
11
+ "license": "MIT",
12
+ "description": "Developer productivity metrics dashboard",
13
+ "version": "1.1.0",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/theihtisham/dev-pulse.git"
17
+ },
18
+ "bugs": {
19
+ "url": "https://github.com/theihtisham/dev-pulse/issues"
20
+ },
21
+ "homepage": "https://github.com/theihtisham/dev-pulse#readme",
22
+ "keywords": [
23
+ "dev pulse",
24
+ "typescript",
25
+ "ai",
26
+ "developer-tools"
27
+ ],
28
+ "devDependencies": {
29
+ "typescript": "^5.3.0",
30
+ "@types/node": "^20.0.0",
31
+ "jest": "^29.7.0",
32
+ "ts-jest": "^29.1.0",
33
+ "@types/jest": "^29.5.0"
34
+ }
35
+ }
package/pyproject.toml CHANGED
@@ -1,80 +1,80 @@
1
- [build-system]
2
- requires = ["setuptools>=68.0", "wheel"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "ai-dev-pulse"
7
- version = "1.0.0"
8
- description = "AI-powered developer productivity dashboard with GitHub integration"
9
- readme = "README.md"
10
- license = {text = "MIT"}
11
- requires-python = ">=3.10"
12
- authors = [
13
- {name = "theihtisham"},
14
- ]
15
- keywords = ["developer-tools", "productivity", "dashboard", "github", "metrics"]
16
- classifiers = [
17
- "Development Status :: 5 - Production/Stable",
18
- "Intended Audience :: Developers",
19
- "License :: OSI Approved :: MIT License",
20
- "Programming Language :: Python :: 3",
21
- "Programming Language :: Python :: 3.10",
22
- "Programming Language :: Python :: 3.11",
23
- "Programming Language :: Python :: 3.12",
24
- "Topic :: Software Development :: Libraries :: Python Modules",
25
- ]
26
- dependencies = [
27
- "fastapi>=0.110.0",
28
- "uvicorn>=0.27.0",
29
- "rich>=13.7.0",
30
- "click>=8.1.0",
31
- "requests>=2.31.0",
32
- "jinja2>=3.1.3",
33
- "schedule>=1.2.0",
34
- "pydantic>=2.6.0",
35
- "pydantic-settings>=2.1.0",
36
- "python-dateutil>=2.8.2",
37
- ]
38
-
39
- [project.optional-dependencies]
40
- dev = [
41
- "pytest>=8.0.0",
42
- "pytest-cov>=4.1.0",
43
- "pytest-asyncio>=0.23.0",
44
- "httpx>=0.27.0",
45
- "ruff>=0.2.0",
46
- "mypy>=1.8.0",
47
- ]
48
-
49
- [project.scripts]
50
- devpulse = "devpulse.cli.main:cli"
51
-
52
- [project.urls]
53
- Homepage = "https://github.com/user/devpulse"
54
- Repository = "https://github.com/user/devpulse"
55
- Issues = "https://github.com/user/devpulse/issues"
56
-
57
- [tool.setuptools.packages.find]
58
- include = ["devpulse*"]
59
-
60
- [tool.pytest.ini_options]
61
- testpaths = ["tests"]
62
- python_files = ["test_*.py"]
63
- python_classes = ["Test*"]
64
- python_functions = ["test_*"]
65
- addopts = "-v --tb=short"
66
- asyncio_mode = "auto"
67
-
68
- [tool.ruff]
69
- target-version = "py310"
70
- line-length = 100
71
-
72
- [tool.ruff.lint]
73
- select = ["E", "F", "W", "I", "N", "UP", "B", "SIM"]
74
- ignore = ["E501"]
75
-
76
- [tool.mypy]
77
- python_version = "3.10"
78
- warn_return_any = true
79
- warn_unused_configs = true
80
- disallow_untyped_defs = true
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ai-dev-pulse"
7
+ version = "1.1.0"
8
+ description = "AI-powered developer productivity dashboard with GitHub integration"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ {name = "theihtisham"},
14
+ ]
15
+ keywords = ["developer-tools", "productivity", "dashboard", "github", "metrics"]
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ ]
26
+ dependencies = [
27
+ "fastapi>=0.110.0",
28
+ "uvicorn>=0.27.0",
29
+ "rich>=13.7.0",
30
+ "click>=8.1.0",
31
+ "requests>=2.31.0",
32
+ "jinja2>=3.1.3",
33
+ "schedule>=1.2.0",
34
+ "pydantic>=2.6.0",
35
+ "pydantic-settings>=2.1.0",
36
+ "python-dateutil>=2.8.2",
37
+ ]
38
+
39
+ [project.optional-dependencies]
40
+ dev = [
41
+ "pytest>=8.0.0",
42
+ "pytest-cov>=4.1.0",
43
+ "pytest-asyncio>=0.23.0",
44
+ "httpx>=0.27.0",
45
+ "ruff>=0.2.0",
46
+ "mypy>=1.8.0",
47
+ ]
48
+
49
+ [project.scripts]
50
+ devpulse = "devpulse.cli.main:cli"
51
+
52
+ [project.urls]
53
+ Homepage = "https://github.com/theihtisham/dev-pulse"
54
+ Repository = "https://github.com/theihtisham/dev-pulse"
55
+ Issues = "https://github.com/theihtisham/dev-pulse/issues"
56
+
57
+ [tool.setuptools.packages.find]
58
+ include = ["devpulse*"]
59
+
60
+ [tool.pytest.ini_options]
61
+ testpaths = ["tests"]
62
+ python_files = ["test_*.py"]
63
+ python_classes = ["Test*"]
64
+ python_functions = ["test_*"]
65
+ addopts = "-v --tb=short"
66
+ asyncio_mode = "auto"
67
+
68
+ [tool.ruff]
69
+ target-version = "py310"
70
+ line-length = 100
71
+
72
+ [tool.ruff.lint]
73
+ select = ["E", "F", "W", "I", "N", "UP", "B", "SIM"]
74
+ ignore = ["E501"]
75
+
76
+ [tool.mypy]
77
+ python_version = "3.10"
78
+ warn_return_any = true
79
+ warn_unused_configs = true
80
+ disallow_untyped_defs = true
package/requirements.txt CHANGED
@@ -1,14 +1,14 @@
1
- fastapi>=0.110.0
2
- uvicorn>=0.27.0
3
- rich>=13.7.0
4
- click>=8.1.0
5
- requests>=2.31.0
6
- jinja2>=3.1.3
7
- schedule>=1.2.0
8
- pydantic>=2.6.0
9
- pydantic-settings>=2.1.0
10
- python-dateutil>=2.8.2
11
- pytest>=8.0.0
12
- pytest-cov>=4.1.0
13
- pytest-asyncio>=0.23.0
14
- httpx>=0.27.0
1
+ fastapi>=0.110.0
2
+ uvicorn>=0.27.0
3
+ rich>=13.7.0
4
+ click>=8.1.0
5
+ requests>=2.31.0
6
+ jinja2>=3.1.3
7
+ schedule>=1.2.0
8
+ pydantic>=2.6.0
9
+ pydantic-settings>=2.1.0
10
+ python-dateutil>=2.8.2
11
+ pytest>=8.0.0
12
+ pytest-cov>=4.1.0
13
+ pytest-asyncio>=0.23.0
14
+ httpx>=0.27.0
package/tests/__init__.py CHANGED
@@ -1 +1 @@
1
- """Tests package for DevPulse."""
1
+ """Tests package for DevPulse."""