GitLab Issue Anomaly Detector
A Python package for detecting anomalies in GitLab issues and generating HTML reports.
Overview
This package analyzes GitLab issues to detect various anomalies such as:
- Missing milestones or iterations
- Insufficient descriptions
- Stale issues
- Blocked issues without details
- And many more
It generates a comprehensive HTML report with interactive visualizations to help teams identify and address these anomalies.
Installation
pip install gitlab-issue-anomaly-detector
Usage
Command Line
# Run the anomaly detector and generate a report
gitlab-anomaly-detector
Environment Variables
Create a .env file with the following variables:
GITLAB_URL=https://gitlab.com
GITLAB_TOKEN=your_personal_access_token
GITLAB_PROJECT_ID=your_project_id
Viewing the Report
After running the tool, you can view the generated report by starting a local HTTP server:
python -m http.server 8008 -d public/
Then open your browser to http://localhost:8008
Features
Anomaly Detection
- Issue Hygiene: Detect issues with poor descriptions, missing milestones, or missing iterations
- Workflow Impediments: Identify blocked issues, stale issues, and scope creep
- Priority Management: Flag high-priority issues that lack proper attention
- Timeline Analysis: Track issues that are at risk of missing deadlines
Reporting
- Interactive Dashboard: Filter and sort anomalies by type, severity, and owner
- Milestone View: Group anomalies by milestone to identify at-risk deliverables
- Iteration View: Track anomalies within your agile iterations
- Export Functionality: Export data to Excel for further analysis
Testing
This package follows strict test-driven development practices. To run the tests:
# Activate the virtual environment
source .venv/bin/activate
# Run tests with pytest
python -m pytest tests/
Logging
The package implements robust logging throughout the codebase. Logs are output to stdout by default but can be configured via Python's standard logging module.
Example log output:
2025-05-15 22:57:01,584 - scripts.issue_anomaly_detector - DEBUG - Categorized anomaly 'poor_description' as 'hygiene'
2025-05-15 22:57:01,584 - scripts.issue_anomaly_detector - DEBUG - Categorized anomaly 'missing_milestone' as 'hygiene'
GitLab Pages with Dynamic Content
This project includes a custom GitLab CI/CD pipeline for GitLab Pages that generates dynamic content:
- A
prepare-pagesstage runs before thepagesstage - A Python script (
scripts/prepare_pages.py) generates dynamic content:- Creates a
data.jsonfile with timestamp and sample data - Updates
index.htmlto load and display the dynamic content
- Creates a
- The
pagesstage deploys the generated content
When you push to the main branch, the pipeline automatically runs and deploys your site to GitLab Pages.
Contributing
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/your-feature-name - Submit a pull request
Development Setup
# Clone the repository
git clone https://gitlab.com/my-group-name2452611/my-project-name.git
cd my-project-name
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate
# Install development dependencies
pip install -e .[dev]
Coding Standards
This project follows strict test-driven development practices:
- Write tests before implementing features
- Maintain high test coverage
- Implement robust logging throughout the codebase
- Follow PEP 8 style guidelines
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project Status
This project is actively maintained and under development. Current version: 0.4.0
Metadata
Release files for gitlab-issue-anomaly-detector 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gitlab_issue_anomaly_detector-0.4.0.tar.gz | 54.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitlab_issue_anomaly_detector-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 114.0 kB
Release files / gitlab_issue_anomaly_detector-0.4.0.tar.gz
| Download URL | gitlab_issue_anomaly_detector-0.4.0.tar.gz |
|---|---|
| Size | 54.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
875d2d6d9df1c13833435268fcf76e58753e828d805285d99f7e36a94cc0a7bc
|
|
BLAKE2b-256 checksum How to use checksums |
842638bfef85750f6768cec2d3172146ff98e97143c9752c50e4c46f17df97a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / gitlab_issue_anomaly_detector-0.4.0-py3-none-any.whl
| Download URL | gitlab_issue_anomaly_detector-0.4.0-py3-none-any.whl |
|---|---|
| Size | 59.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df0b90957a7af0c87b71b3a9e4203b5376ab855db72c7c7e18638a4d4411f173
|
|
BLAKE2b-256 checksum How to use checksums |
9b8c7596910bd32723eca7932206907f767e3be6da0c81912eca8ec757e15a50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for gitlab-issue-anomaly-detector 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.