@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
package/.editorconfig ADDED
@@ -0,0 +1,12 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_style = space
7
+ indent_size = 2
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
@@ -0,0 +1,43 @@
1
+ name: Bug Report
2
+ description: Report a bug or unexpected behavior
3
+ labels: [bug]
4
+ body:
5
+ - type: textarea
6
+ id: description
7
+ attributes:
8
+ label: Bug Description
9
+ description: What happened?
10
+ placeholder: "When I run agent-memory..."
11
+ validations:
12
+ required: true
13
+
14
+ - type: textarea
15
+ id: steps
16
+ attributes:
17
+ label: Steps to Reproduce
18
+ description: How can we reproduce this?
19
+ placeholder: "1. Install...\n2. Configure...\n3. Run..."
20
+ validations:
21
+ required: true
22
+
23
+ - type: textarea
24
+ id: expected
25
+ attributes:
26
+ label: Expected Behavior
27
+ description: What should have happened?
28
+ validations:
29
+ required: true
30
+
31
+ - type: textarea
32
+ id: environment
33
+ attributes:
34
+ label: Environment
35
+ description: Node version, OS, etc.
36
+ placeholder: "Node 20.11.0, macOS 14, agent-memory 1.0.0"
37
+
38
+ - type: textarea
39
+ id: logs
40
+ attributes:
41
+ label: Relevant Logs
42
+ description: Paste any relevant log output
43
+ render: shell
@@ -0,0 +1,33 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature or enhancement
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: problem
7
+ attributes:
8
+ label: Problem
9
+ description: What problem does this feature solve?
10
+ placeholder: "I'm frustrated when..."
11
+ validations:
12
+ required: true
13
+
14
+ - type: textarea
15
+ id: solution
16
+ attributes:
17
+ label: Proposed Solution
18
+ description: How should it work?
19
+ validations:
20
+ required: true
21
+
22
+ - type: dropdown
23
+ id: type
24
+ attributes:
25
+ label: Feature Type
26
+ options:
27
+ - New Tool/Resource
28
+ - Performance Improvement
29
+ - Developer Experience
30
+ - Documentation
31
+ - Other
32
+ validations:
33
+ required: true
@@ -0,0 +1,18 @@
1
+ ## Description
2
+
3
+ <!-- Brief description of changes -->
4
+
5
+ ## Type of Change
6
+
7
+ - [ ] Bug fix
8
+ - [ ] New feature
9
+ - [ ] Breaking change
10
+ - [ ] Documentation update
11
+ - [ ] Refactor / cleanup
12
+
13
+ ## Checklist
14
+
15
+ - [ ] Tests pass (`npm test`)
16
+ - [ ] Type checks pass (`npm run lint`)
17
+ - [ ] No secrets or credentials introduced
18
+ - [ ] Commit messages follow [conventional commits](https://www.conventionalcommits.org/)
@@ -0,0 +1,16 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: npm
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ day: monday
8
+ open-pull-requests-limit: 5
9
+ commit-message:
10
+ prefix: chore
11
+ include: scope
12
+
13
+ - package-ecosystem: github-actions
14
+ directory: /
15
+ schedule:
16
+ interval: monthly
@@ -0,0 +1,33 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ['3.10', '3.11', '3.12']
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: ${{ matrix.python-version }}
20
+ - run: pip install -e ".[dev]"
21
+ - run: pytest --cov -v
22
+ - run: pip install ruff && ruff check .
23
+
24
+ build:
25
+ runs-on: ubuntu-latest
26
+ needs: test
27
+ steps:
28
+ - uses: actions/checkout@v4
29
+ - uses: actions/setup-python@v5
30
+ with:
31
+ python-version: '3.11'
32
+ - run: pip install build
33
+ - run: python -m build
@@ -0,0 +1,27 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to a positive environment:
10
+ - Demonstrating empathy and kindness toward other people
11
+ - Being respectful of differing opinions, viewpoints, and experiences
12
+ - Giving and gracefully accepting constructive feedback
13
+ - Accepting responsibility and apologizing to those affected by our mistakes
14
+
15
+ Examples of unacceptable behavior:
16
+ - The use of sexualized language or imagery
17
+ - Trolling, insulting or derogatory comments
18
+ - Public or private harassment
19
+ - Publishing others' private information without explicit permission
20
+
21
+ ## Enforcement
22
+
23
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to **Theihtisham@outlook.com**.
24
+
25
+ ## Attribution
26
+
27
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
package/Dockerfile ADDED
@@ -0,0 +1,8 @@
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+ COPY pyproject.toml requirements.txt ./
5
+ RUN pip install --no-cache-dir .
6
+ COPY devpulse/ ./devpulse/
7
+
8
+ ENTRYPOINT ["python", "-m", "devpulse.cli.main"]
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 DevPulse Contributors
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DevPulse Contributors
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.
package/README.md CHANGED
@@ -1,73 +1,169 @@
1
- # Dev Pulse
1
+ <div align="center">
2
2
 
3
- Developer productivity metrics dashboard
3
+ <img width="100%" height="180" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 960 180'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%2334d399'/%3E%3Cstop offset='100%25' stop-color='%2338bdf8'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='960' height='180' fill='%230a0a1a' rx='16'/%3E%3Crect x='2' y='2' width='956' height='176' fill='none' stroke='url(%23g)' stroke-width='2' rx='15'/%3E%3Ctext x='480' y='75' text-anchor='middle' fill='white' font-family='system-ui' font-size='38' font-weight='bold'%3E%F0%9F%93%8A Dev Pulse%3C/text%3E%3Ctext x='480' y='115' text-anchor='middle' fill='%23a5a5c0' font-family='system-ui' font-size='18'%3EAI-Powered Developer Productivity Dashboard%3C/text%3E%3Ctext x='480' y='148' text-anchor='middle' fill='%236b6b88' font-family='monospace' font-size='13'%3EFastAPI %C2%B7 Rich %C2%B7 GitHub Integration %C2%B7 CLI %C2%B7 Pydantic %C2%B7 Scheduled Reports%3C/text%3E%3C/svg%3E" alt="Dev Pulse Banner"/>
4
4
 
5
- ## Installation
5
+ [![CI](https://img.shields.io/github/actions/workflow/status/theihtisham/dev-pulse/ci.yml?style=for-the-badge&label=CI)](https://github.com/theihtisham/dev-pulse/actions/workflows/ci.yml)
6
+ [![PyPI version](https://img.shields.io/pypi/v/ai-dev-pulse.svg?style=for-the-badge&color=FF6D00)](https://pypi.org/project/ai-dev-pulse/)
7
+ [![Python](https://img.shields.io/badge/Python-3.10%2B-3776AB?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
6
9
 
7
- ```bash
8
- npm install @theihtisham/dev-pulse
10
+ **AI-powered developer productivity dashboard with GitHub integration.** Track commits, PRs, code reviews, and team metrics with intelligent insights and scheduled reports.
11
+
12
+ [Quick Start](#-quick-start) · [Architecture](#-architecture) · [Configuration](#-configuration)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## Architecture
19
+
20
+ ```mermaid
21
+ graph TD
22
+ subgraph "Data Sources"
23
+ GH[GitHub API<br/>Commits / PRs / Reviews]
24
+ CLI[CLI Interface<br/>Click + Rich]
25
+ end
26
+
27
+ subgraph "Dev Pulse Engine"
28
+ API[FastAPI Server<br/>REST + WebSocket]
29
+ ANALYZER[Analytics Engine<br/>Metrics + Trends]
30
+ SCHED[Scheduler<br/>Periodic Reports]
31
+ MODELS[Pydantic Models<br/>Typed Data]
32
+ end
33
+
34
+ subgraph "Output"
35
+ DASH[Rich Dashboard<br/>Terminal UI]
36
+ REPORT[Report Generator<br/>Markdown / HTML]
37
+ ALERT[Alert System<br/>Threshold Notifications]
38
+ end
39
+
40
+ GH --> API
41
+ CLI --> API
42
+ API --> ANALYZER
43
+ ANALYZER --> MODELS
44
+ SCHED --> ANALYZER
45
+ ANALYZER --> DASH
46
+ ANALYZER --> REPORT
47
+ ANALYZER --> ALERT
48
+
49
+ style API fill:#34d399,color:#000
50
+ style ANALYZER fill:#38bdf8,color:#fff
9
51
  ```
10
52
 
11
- ## Usage
53
+ ---
54
+
55
+ ## Quick Start
12
56
 
13
- ```typescript
14
- import { } from '@theihtisham/dev-pulse';
57
+ ```bash
58
+ # Install
59
+ pip install ai-dev-pulse
60
+
61
+ # Or from source
62
+ git clone https://github.com/theihtisham/dev-pulse.git
63
+ cd dev-pulse
64
+ pip install -e ".[dev]"
15
65
  ```
16
66
 
17
- ## Features
67
+ ### Configure
68
+
69
+ Create `.env` or export environment variables:
70
+
71
+ ```bash
72
+ GITHUB_TOKEN=ghp_... # GitHub personal access token
73
+ GITHUB_ORG=your-org # Optional: default organization
74
+ ```
18
75
 
19
- - Written in TypeScript with full type definitions
20
- - Zero external dependencies (minimal footprint)
21
- - Event-driven architecture
22
- - Comprehensive test suite
76
+ ### Run
23
77
 
24
- ## API
78
+ ```bash
79
+ # CLI dashboard
80
+ devpulse dashboard
25
81
 
26
- ### Quick Start
82
+ # Generate report
83
+ devpulse report --format markdown --output report.md
27
84
 
28
- ```typescript
29
- import { } from '@theihtisham/dev-pulse';
85
+ # Start web server
86
+ devpulse serve --port 8000
30
87
 
31
- // Initialize and use the package
88
+ # Schedule periodic reports
89
+ devpulse schedule --interval daily
32
90
  ```
33
91
 
92
+ ---
93
+
94
+ ## Features
95
+
96
+ | Feature | Description |
97
+ |---------|-------------|
98
+ | **Commit Analytics** | Track commit frequency, size, and patterns |
99
+ | **PR Metrics** | Review turnaround, approval rates, bottleneck detection |
100
+ | **Team Dashboard** | Per-developer productivity metrics |
101
+ | **Trend Analysis** | AI-powered trend detection and predictions |
102
+ | **Scheduled Reports** | Daily/weekly automated report generation |
103
+ | **Rich CLI** | Beautiful terminal output with Rich library |
104
+ | **Web Dashboard** | FastAPI-powered web interface |
105
+ | **Alert Thresholds** | Configurable alerts for metric anomalies |
106
+
107
+ ---
108
+
34
109
  ## Configuration
35
110
 
36
- Configuration options and their defaults:
111
+ ### CLI Commands
37
112
 
38
- ```typescript
39
- const config = {
40
- // Add configuration options here
41
- };
113
+ ```bash
114
+ devpulse dashboard # Interactive dashboard
115
+ devpulse report # Generate report
116
+ devpulse serve # Start web server
117
+ devpulse schedule # Schedule periodic reports
118
+ devpulse config show # Show current config
119
+ devpulse config set KEY VAL # Set configuration
42
120
  ```
43
121
 
44
- ## Examples
122
+ ### Environment Variables
45
123
 
46
- See the `tests/` directory for usage examples.
124
+ | Variable | Required | Description |
125
+ |----------|----------|-------------|
126
+ | `GITHUB_TOKEN` | Yes | GitHub personal access token |
127
+ | `GITHUB_ORG` | No | Default GitHub organization |
128
+ | `PORT` | No | Web server port (default: 8000) |
47
129
 
48
- ## Development
130
+ ---
131
+
132
+ ## Docker
49
133
 
50
134
  ```bash
51
- # Install dependencies
52
- npm install
135
+ docker build -t dev-pulse .
136
+ docker run -e GITHUB_TOKEN=ghp_... dev-pulse
137
+ ```
53
138
 
54
- # Build
55
- npm run build
139
+ ---
56
140
 
57
- # Run tests
58
- npm test
141
+ ## Development
59
142
 
60
- # Lint
61
- npm run lint
143
+ ```bash
144
+ pip install -e ".[dev]"
145
+ pytest --cov -v
146
+ ruff check .
62
147
  ```
63
148
 
149
+ ---
150
+
151
+ ## Trending Tags
152
+
153
+ `developer-tools` `productivity` `dashboard` `github` `metrics` `analytics` `fastapi` `rich` `python` `cli` `devops` `team-management`
154
+
155
+ ---
156
+
64
157
  ## License
65
158
 
66
- MIT License - see [LICENSE](LICENSE) for details.
159
+ MIT License see [LICENSE](LICENSE) for details.
160
+
161
+ ---
162
+
163
+ <div align="center">
67
164
 
68
- ## Author
165
+ **Built by [theihtisham](https://github.com/theihtisham)**
69
166
 
70
- **ihtisham**
167
+ [GitHub](https://github.com/theihtisham) · [Email](mailto:Theihtisham@outlook.com)
71
168
 
72
- - GitHub: [https://github.com/ihtisham](https://github.com/ihtisham)
73
- - npm: [@theihtisham](https://www.npmjs.com/~theihtisham)
169
+ </div>
package/SECURITY.md ADDED
@@ -0,0 +1,22 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | --------- |
7
+ | 1.x | Yes |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ If you discover a security vulnerability, please report it responsibly:
12
+
13
+ - **Email**: Theihtisham@outlook.com
14
+ - **Subject**: [Security] Vulnerability in ai-agent-memory
15
+
16
+ Please include:
17
+ 1. Description of the vulnerability
18
+ 2. Steps to reproduce
19
+ 3. Potential impact
20
+ 4. Suggested fix (if any)
21
+
22
+ We aim to respond within 48 hours and patch critical issues within 7 days.
@@ -1,4 +1,4 @@
1
- """DevPulse - AI-powered developer productivity dashboard."""
2
-
3
- __version__ = "1.0.0"
4
- __author__ = "DevPulse Contributors"
1
+ """DevPulse - AI-powered developer productivity dashboard."""
2
+
3
+ __version__ = "1.0.0"
4
+ __author__ = "DevPulse Contributors"
@@ -1 +1 @@
1
- """FastAPI web API package for DevPulse."""
1
+ """FastAPI web API package for DevPulse."""