Repository navigation
feat: bootstrap LogSight-AI Python package with parser, analyzer, CLI, and tests - #1
Merged
CoreyLeath-code merged 2 commits intoApr 3, 2026
Conversation
… and tests Agent-Logs-Url: https://github.com/Trojan3877/LogSight-AI/sessions/48f2ca95-5ec3-41aa-ba39-3e51f8d7ce82 Co-authored-by: Trojan3877 <182694928+Trojan3877@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update codebase dependencies and improve code quality
feat: bootstrap LogSight-AI Python package with parser, analyzer, CLI, and tests
Apr 3, 2026
CoreyLeath-code
approved these changes
Apr 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repository contained only empty scaffolding (zero-byte files). This PR builds it into a functional Python package for AI-powered log analysis and anomaly detection.
Package structure (
logsight/)parser.py— multi-format log parser (ISO 8601, syslog, nginx access, generic level-prefixed); produces structuredLogEntrydataclasses; supportsWARN/FATALlevel aliasesanalyzer.py— z-score anomaly detection on message length, sliding-window error-rate spike detection,compute_stats()summarycli.py— click + rich CLI exposinglogsight analyze <file>andlogsight stdinExample
Configuration & deps
pyproject.toml— package metadata,click,rich,scikit-learn,numpy; ruff and pytest configsetuptools.build_meta(thesetuptools.backends.legacy:buildpath does not exist in current setuptools)CI (
ci.yml)python -m buildcheckpermissions: contents: readon each jobBug fixed in parser
_LEVEL_ALIASEShad lowercase keys ("warn","fatal") but the lookup was againstraw.upper(), soWARNandFATALwere silently resolved toUNKNOWN:Tests
31 unit tests covering parser formats, level aliases, anomaly detection, spike detection, and edge cases (empty input, deduplication, window boundary conditions).
Original prompt
This pull request was created from Copilot chat.