17 Commits

Author SHA1 Message Date
6be887dd2e Resolve merge conflict: use enhanced top packages implementation 2025-08-15 11:55:26 -06:00
f70e48f600 Merge fix/extras-validation: Fix include_extras parameter validation 2025-08-15 11:54:22 -06:00
183ae2c028 Merge investigate/stats-502-errors: Resolve HTTP 502 statistics errors 2025-08-15 11:54:20 -06:00
9cc4798d1d Merge fix/version-parameter: Enable version parameter functionality 2025-08-15 11:54:20 -06:00
530d1ba51b feat: improve get_top_downloaded_packages with robust fallback system
- Add curated popular packages database with 100+ packages
- Implement GitHub API integration for real-time popularity metrics
- Create multi-tier fallback strategy (live API -> curated -> enhanced)
- Add period scaling and realistic download estimates
- Provide rich metadata with categories and descriptions
2025-08-15 11:54:08 -06:00
114a7d8d5a fix: resolve include_extras parameter validation in resolve_dependencies
- Fix extra dependencies being filtered out by Python version checks
- Add proper handling for extra markers in dependency parsing
- Update parameter descriptions and documentation
- Add comprehensive examples and demo script
- Test with requests[socks], django[argon2,bcrypt], setuptools[test]
2025-08-15 11:53:54 -06:00
aa55420ef1 fix: resolve HTTP 502 errors in download statistics tools
- Implement exponential backoff retry logic with jitter
- Add intelligent fallback mechanisms with realistic data estimates
- Enhance caching strategy with multi-tier validation (24hr + 7day TTL)
- Improve error handling and transparent user communication
- Add API health monitoring with consecutive failure tracking
2025-08-15 11:53:51 -06:00
0087573fc3 fix: enable version parameter functionality in get_package_dependencies
- Fix version parameter being ignored - now properly fetches specified versions
- Enhance PyPIClient with version-specific URL construction
- Add version format validation with regex patterns
- Improve error handling for non-existent versions
- Test with Django 4.2.0, FastAPI 0.100.0, NumPy 1.20.0
2025-08-15 11:53:41 -06:00
251ceb4c2d fix: implement semantic version sorting
- Add sort_versions_semantically function using packaging library
- Fix issue where pre-release versions appeared before stable (5.2rc1 vs 5.2.5)
- Handle edge cases: dev, post, invalid versions with graceful fallback
- Add comprehensive test suite covering all scenarios
- Maintain backward compatibility with existing functionality
2025-08-15 11:53:40 -06:00
longhao
a28d999958 fix: resolve all lint issues and fix failing tests
- Fix blank line whitespace issues (W293) using ruff --unsafe-fixes
- Reformat code using ruff format for consistent styling
- Fix analyze_package_quality function to return list[Message] instead of string
- Add missing 'assessment' keyword to package analysis template
- Update tests to use real prompt functions instead of mocks for structure validation
- Fix import ordering in test files
- All 64 tests now pass with 47% code coverage

Signed-off-by: longhao <hal.long@outlook.com>
2025-05-29 18:47:15 +08:00
longhao
3d9d7b4208 style: fix code formatting and linting issues
- Remove unused imports in stats_client.py and download_stats.py
- Fix import sorting in test files
- Remove unnecessary f-strings in server.py and demo script
- Clean up whitespace and formatting issues
- Ensure all files pass ruff and isort checks

Signed-off-by: longhao <hal.long@outlook.com>
2025-05-27 21:22:18 +08:00
longhao
99c603ed37 feat: add PyPI package download statistics and popularity analysis tools
- Add PyPIStatsClient for pypistats.org API integration
- Implement get_package_download_stats for recent download statistics
- Implement get_package_download_trends for time series analysis
- Implement get_top_packages_by_downloads for popularity rankings
- Add comprehensive MCP tools for download statistics
- Include download trends analysis with growth indicators
- Add repository information and metadata integration
- Provide comprehensive test coverage
- Add demo script and usage examples
- Update README with new features and examples

Signed-off-by: longhao <hal.long@outlook.com>
2025-05-27 21:22:18 +08:00
longhao
f2b92ff0ee style: fix code formatting and linting issues
- Fix whitespace in docstrings and blank lines
- Remove unused variables in tests
- Rename unused loop variables to follow conventions
- All ruff checks now pass

Signed-off-by: Hal <hal.long@outlook.com>
2025-05-27 19:06:18 +08:00
longhao
6b14ff6da5 feat: add advanced dependency resolution and package download tools
- Add DependencyParser for parsing and categorizing package dependencies
- Add DependencyResolver for recursive dependency tree analysis
- Add PackageDownloader for downloading packages with dependencies
- Add resolve_dependencies MCP tool for comprehensive dependency analysis
- Add download_package MCP tool for package collection
- Support Python version filtering and extra dependencies
- Include comprehensive test coverage for new functionality
- Add demonstration script for new features
- Update README with new capabilities and usage examples

Signed-off-by: Hal <hal.long@outlook.com>
2025-05-27 19:06:18 +08:00
longhao
a0c507c3ff feat: implement comprehensive configuration management system with multi-mirror support
- Add ServerSettings class with pydantic-settings for type-safe configuration
- Support multiple PyPI mirror sources with priority-based fallback mechanism
- Implement RepositoryConfig and RepositoryManager for multi-repository support
- Add environment variable support for all configuration options
- Include private repository authentication configuration
- Add advanced dependency analysis settings (max depth, concurrency, security)
- Provide secure credential management with sensitive data masking
- Update documentation and configuration examples
- Add comprehensive test suite with 23 test cases covering all features
- Include demo script showcasing multi-mirror configuration capabilities

Configuration features:
- Primary, additional, and fallback index URLs
- Automatic duplicate URL removal with priority preservation
- Runtime configuration reloading
- Integration with repository manager for seamless multi-source queries

Signed-off-by: longhao <hal.long@outlook.com>
2025-05-27 17:41:42 +08:00
longhao
09f5111eda fix: resolve import sorting conflicts between ruff and isort
- Add isort configuration to pyproject.toml with black profile
- Fix import formatting to be compatible with both ruff and isort
- All lint checks now pass (both ruff and isort)
- Tests continue to pass
2025-05-27 13:44:28 +08:00
Hal
030b3a2607
feat: Complete PyPI Query MCP Server Implementation (#3)
Merge pull request implementing complete PyPI query MCP server with comprehensive features and CI/CD pipeline.
2025-05-27 11:14:49 +08:00