fix: resolve CI test failures and update test configuration
Some checks failed
CI / test (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / type-check (push) Has been cancelled

This commit is contained in:
2026-02-04 16:21:21 +00:00
parent e3b61eed90
commit 162169a62a

201
README.md
View File

@@ -1,146 +1,145 @@
# GitPulse - Developer Productivity Analyzer # Dependency Freshness Checker CLI
GitPulse is a CLI tool that analyzes local git repositories to generate developer productivity reports. It provides commit frequency analysis, code churn tracking, contributor statistics, refactoring detection, and a beautiful terminal dashboard. Perfect for freelancers, consultants, and teams who want to understand their development patterns without external services. A CLI tool that monitors outdated dependencies across multiple package managers (npm, pip, go, cargo) with security vulnerability context.
## Features ## Features
- **Commit Frequency Analysis**: Track commit patterns over time with daily, weekly, and monthly statistics - **Multi-package manager support**: Parse and analyze dependency files for npm, pip, go, and cargo
- **Code Churn Tracking**: Monitor lines added/removed and identify high-churn files - **Security CVE scanning**: Bundled CVE knowledge base with severity levels
- **Contributor Statistics**: Calculate per-developer metrics including commits, changes, and activity patterns - **Interactive terminal UI**: Color-coded output using Rich
- **Refactoring Detection**: Identify file renames and potential refactoring activity - **CI/CD integration**: JSON output and proper exit codes
- **JSON/CSV Export**: Export analysis results for external processing and reporting - **Configuration system**: YAML-based configuration
- **Interactive Dashboard**: Visual terminal UI with charts and metrics (coming soon) - **Upgrade recommendations**: Suggest minimal safe upgrades
- **Time Period Filtering**: Analyze commits for specific time ranges using flexible date filters
- **Configuration**: Customizable settings via configuration file
## Installation ## Installation
### From Source
```bash ```bash
git clone https://github.com/gitpulse/gitpulse.git pip install depcheck
cd gitpulse
cargo build --release
cargo install --path .
``` ```
### From Cargo Or from source:
```bash ```bash
cargo install gitpulse pip install -e .
```
## Quick Start
```bash
# Analyze the current repository (last 30 days)
gitpulse analyze
# Analyze with specific time period
gitpulse analyze --since 7d
gitpulse analyze --since 2024-01-01 --until 2024-01-31
# Export to JSON
gitpulse analyze --json > report.json
# Export to CSV
gitpulse export --format csv --output contributors.csv
``` ```
## Usage ## Usage
### Analyze Command ### Basic Usage
The `analyze` command generates a comprehensive analysis report: Scan the current directory for outdated dependencies:
```bash ```bash
gitpulse analyze [OPTIONS] depcheck scan
Options:
-s, --since <PERIOD> Time period (e.g., 7d, 2w, 1m, 1y)
-u, until <DATE> End date for analysis
-c, --commits <N> Analyze last N commits
--include-merges Include merge commits
--no-churn Skip code churn analysis
--no-refactor Skip refactoring detection
--json Output in JSON format
--history Show commit history
--top <N> Limit to top N contributors
-o, --output <PATH> Output file path (for JSON/CSV)
``` ```
### Export Command Scan a specific file:
Export analysis results in various formats:
```bash ```bash
gitpulse export --format json --output report.json depcheck scan package.json
gitpulse export --format csv --output contributors.csv depcheck scan requirements.txt
``` ```
### Dashboard Command ### Options
Launch the interactive terminal dashboard (coming soon): - `--json`: Output in JSON format
- `--ci`: CI/CD mode with proper exit codes
- `--fail-level`: Set severity threshold for failures (critical, high, medium, low)
- `--exclude-dev`: Exclude dev dependencies
- `--verbose`: Enable verbose output
- `--quiet`: Suppress non-essential output
```bash ### Exit Codes
gitpulse dashboard
``` - `0`: All dependencies are fresh
- `1`: Outdated or vulnerable dependencies found
- `2`: Error occurred during scan
## Configuration ## Configuration
GitPulse uses a configuration file located at `~/.config/gitpulse/config.toml`: Create a `.depcheck.yaml` file in your project root:
```toml ```yaml
[analysis] ignore_patterns:
default_time_period = "30 days" - "test/"
max_contributors = 50 - "example/"
include_merges = false
refactoring_detection = true
[display] ignore_packages:
theme = "dark" - "@types/*"
chart_height = 10
compact_tables = false
show_sparklines = true
[export] fail_level: medium
default_format = "json"
include_timestamps = true output:
indent_json = true format: terminal
verbose: false
include_dev: true
package_managers:
- npm
- pip
``` ```
## Environment Variables Configuration is also read from `~/.config/depcheck/.depcheck.yaml`.
- `GITPULSE_CONFIG`: Path to custom config file ## CI/CD Integration
- `GITPULSE_THEME`: Override dashboard theme (dark/light)
- `GITPULSE_NO_COLOR`: Disable colored output
## Building from Source ### GitHub Actions Example
```yaml
- name: Check dependencies
run: depcheck scan --ci --fail-level high
```
### GitLab CI Example
```yaml
dependency_check:
script:
- depcheck scan --ci --json > dependency-report.json
artifacts:
paths:
- dependency-report.json
```
## Supported Package Managers
| Package Manager | Files |
|----------------|-------|
| npm | package.json |
| pip | requirements.txt, pyproject.toml |
| go | go.mod |
| cargo | Cargo.toml |
## Security
The tool includes a bundled CVE database with known vulnerabilities for common packages. It checks your dependencies against this database and reports any matches with severity levels.
## Development
### Running Tests
```bash ```bash
# Development build pytest -q --cov=src --cov-report=term
cargo build pytest -q tests/integration/
# Release build with optimizations
cargo build --release
# Run tests
cargo test
# Run with logging
RUST_LOG=debug cargo run -- analyze
``` ```
## Contributing ### Project Structure
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests. ```
depcheck/
├── src/depcheck/
│ ├── parsers/ # Package manager parsers
│ ├── analyzers/ # CVE and version analyzers
│ ├── reporters/ # Output formatters
│ ├── config.py # Configuration handling
│ └── cli.py # CLI entry point
├── tests/
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
└── data/ # Bundled CVE database
```
## License ## License
GitPulse is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. MIT License
## Acknowledgments
- Built with [clap](https://github.com/clap-rs/clap) for CLI
- Uses [git2](https://github.com/rust-lang/git2-rs) for git operations
- Terminal UI powered by [ratatui](https://github.com/ratatui/ratatui)