logview-ag 0.8.0__tar.gz

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 (98) hide show
  1. logview_ag-0.8.0/.github/workflows/ci.yml +134 -0
  2. logview_ag-0.8.0/.github/workflows/claude-code-review.yml +57 -0
  3. logview_ag-0.8.0/.github/workflows/claude.yml +50 -0
  4. logview_ag-0.8.0/.github/workflows/release.yml +72 -0
  5. logview_ag-0.8.0/.gitignore +106 -0
  6. logview_ag-0.8.0/ACTIONS.md +1087 -0
  7. logview_ag-0.8.0/CHANGELOG.md +247 -0
  8. logview_ag-0.8.0/CLAUDE.md +406 -0
  9. logview_ag-0.8.0/DOCKER.md +475 -0
  10. logview_ag-0.8.0/PKG-INFO +498 -0
  11. logview_ag-0.8.0/PLAN.md +1516 -0
  12. logview_ag-0.8.0/README.md +445 -0
  13. logview_ag-0.8.0/SECURITY.md +165 -0
  14. logview_ag-0.8.0/SERVER-FILTER.md +516 -0
  15. logview_ag-0.8.0/USER.md +1370 -0
  16. logview_ag-0.8.0/VERSION +1 -0
  17. logview_ag-0.8.0/build.sh +285 -0
  18. logview_ag-0.8.0/configs/example.json +106 -0
  19. logview_ag-0.8.0/core +0 -0
  20. logview_ag-0.8.0/install.sh +477 -0
  21. logview_ag-0.8.0/pyproject.toml +142 -0
  22. logview_ag-0.8.0/src/logview/__init__.py +27 -0
  23. logview_ag-0.8.0/src/logview/__main__.py +13 -0
  24. logview_ag-0.8.0/src/logview/adapters/__init__.py +6 -0
  25. logview_ag-0.8.0/src/logview/adapters/base.py +49 -0
  26. logview_ag-0.8.0/src/logview/adapters/context_detector.py +681 -0
  27. logview_ag-0.8.0/src/logview/adapters/discovery.py +267 -0
  28. logview_ag-0.8.0/src/logview/adapters/docker.py +543 -0
  29. logview_ag-0.8.0/src/logview/adapters/gcp.py +706 -0
  30. logview_ag-0.8.0/src/logview/adapters/gke.py +845 -0
  31. logview_ag-0.8.0/src/logview/adapters/jsonl_parser.py +216 -0
  32. logview_ag-0.8.0/src/logview/adapters/logfile.py +399 -0
  33. logview_ag-0.8.0/src/logview/adapters/mock.py +147 -0
  34. logview_ag-0.8.0/src/logview/adapters/plaintext_parser.py +77 -0
  35. logview_ag-0.8.0/src/logview/adapters/syslog.py +286 -0
  36. logview_ag-0.8.0/src/logview/adapters/syslog_parser.py +293 -0
  37. logview_ag-0.8.0/src/logview/app.py +953 -0
  38. logview_ag-0.8.0/src/logview/config/__init__.py +5 -0
  39. logview_ag-0.8.0/src/logview/config/loader.py +66 -0
  40. logview_ag-0.8.0/src/logview/config/logging.py +87 -0
  41. logview_ag-0.8.0/src/logview/config/schema.py +155 -0
  42. logview_ag-0.8.0/src/logview/domain/__init__.py +5 -0
  43. logview_ag-0.8.0/src/logview/domain/context.py +38 -0
  44. logview_ag-0.8.0/src/logview/domain/models.py +156 -0
  45. logview_ag-0.8.0/src/logview/py.typed +0 -0
  46. logview_ag-0.8.0/src/logview/ui/__init__.py +1 -0
  47. logview_ag-0.8.0/src/logview/ui/screens/__init__.py +1 -0
  48. logview_ag-0.8.0/src/logview/ui/screens/context.py +229 -0
  49. logview_ag-0.8.0/src/logview/ui/screens/detail.py +221 -0
  50. logview_ag-0.8.0/src/logview/ui/screens/discovery.py +218 -0
  51. logview_ag-0.8.0/src/logview/ui/screens/export.py +218 -0
  52. logview_ag-0.8.0/src/logview/ui/screens/filter.py +486 -0
  53. logview_ag-0.8.0/src/logview/ui/screens/help.py +129 -0
  54. logview_ag-0.8.0/src/logview/ui/screens/main.py +15 -0
  55. logview_ag-0.8.0/src/logview/ui/screens/settings.py +233 -0
  56. logview_ag-0.8.0/src/logview/ui/styles/__init__.py +1 -0
  57. logview_ag-0.8.0/src/logview/ui/styles/theme.tcss +75 -0
  58. logview_ag-0.8.0/src/logview/ui/widgets/__init__.py +5 -0
  59. logview_ag-0.8.0/src/logview/ui/widgets/log_entry.py +24 -0
  60. logview_ag-0.8.0/src/logview/ui/widgets/log_list.py +275 -0
  61. logview_ag-0.8.0/src/logview/ui/widgets/status_bar.py +29 -0
  62. logview_ag-0.8.0/tests/__init__.py +1 -0
  63. logview_ag-0.8.0/tests/bats/install.bats +100 -0
  64. logview_ag-0.8.0/tests/conftest.py +83 -0
  65. logview_ag-0.8.0/tests/fixtures/empty_syslog.txt +0 -0
  66. logview_ag-0.8.0/tests/fixtures/malformed_syslog.txt +6 -0
  67. logview_ag-0.8.0/tests/fixtures/sample_jsonl.log +5 -0
  68. logview_ag-0.8.0/tests/fixtures/sample_plain.log +10 -0
  69. logview_ag-0.8.0/tests/fixtures/sample_syslog.txt +15 -0
  70. logview_ag-0.8.0/tests/integration/__init__.py +1 -0
  71. logview_ag-0.8.0/tests/integration/test_docker.py +366 -0
  72. logview_ag-0.8.0/tests/integration/test_gcp.py +192 -0
  73. logview_ag-0.8.0/tests/integration/test_gke.py +291 -0
  74. logview_ag-0.8.0/tests/integration/test_logfile.py +291 -0
  75. logview_ag-0.8.0/tests/integration/test_mock_adapter.py +147 -0
  76. logview_ag-0.8.0/tests/integration/test_syslog.py +316 -0
  77. logview_ag-0.8.0/tests/ui/__init__.py +1 -0
  78. logview_ag-0.8.0/tests/ui/test_app.py +200 -0
  79. logview_ag-0.8.0/tests/ui/test_context_modal.py +364 -0
  80. logview_ag-0.8.0/tests/ui/test_detail_modal.py +176 -0
  81. logview_ag-0.8.0/tests/ui/test_export.py +397 -0
  82. logview_ag-0.8.0/tests/ui/test_filter_modal.py +249 -0
  83. logview_ag-0.8.0/tests/ui/test_filter_presets.py +210 -0
  84. logview_ag-0.8.0/tests/ui/test_help_modal.py +114 -0
  85. logview_ag-0.8.0/tests/ui/test_search.py +173 -0
  86. logview_ag-0.8.0/tests/ui/test_settings_modal.py +223 -0
  87. logview_ag-0.8.0/tests/unit/__init__.py +1 -0
  88. logview_ag-0.8.0/tests/unit/test_config.py +258 -0
  89. logview_ag-0.8.0/tests/unit/test_context_detector.py +490 -0
  90. logview_ag-0.8.0/tests/unit/test_discovery.py +287 -0
  91. logview_ag-0.8.0/tests/unit/test_docker_adapter.py +566 -0
  92. logview_ag-0.8.0/tests/unit/test_filter.py +97 -0
  93. logview_ag-0.8.0/tests/unit/test_gcp_adapter.py +711 -0
  94. logview_ag-0.8.0/tests/unit/test_gke_adapter.py +1043 -0
  95. logview_ag-0.8.0/tests/unit/test_jsonl_parser.py +286 -0
  96. logview_ag-0.8.0/tests/unit/test_models.py +278 -0
  97. logview_ag-0.8.0/tests/unit/test_plaintext_parser.py +134 -0
  98. logview_ag-0.8.0/tests/unit/test_syslog_parser.py +298 -0
@@ -0,0 +1,134 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ env:
10
+ PYTHON_VERSION: "3.12"
11
+
12
+ jobs:
13
+ lint:
14
+ name: Lint
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ env.PYTHON_VERSION }}
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install ruff
28
+
29
+ - name: Run ruff
30
+ run: ruff check src/ tests/
31
+
32
+ shellcheck:
33
+ name: Shell Script Lint
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+
38
+ - name: Run shellcheck
39
+ run: |
40
+ sudo apt-get update
41
+ sudo apt-get install -y shellcheck
42
+ shellcheck install.sh build.sh
43
+
44
+ typecheck:
45
+ name: Type Check
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+
50
+ - name: Set up Python
51
+ uses: actions/setup-python@v5
52
+ with:
53
+ python-version: ${{ env.PYTHON_VERSION }}
54
+
55
+ - name: Install dependencies
56
+ run: |
57
+ python -m pip install --upgrade pip
58
+ pip install -e ".[dev]"
59
+
60
+ - name: Run mypy
61
+ run: mypy src/
62
+
63
+ test:
64
+ name: Test (Python ${{ matrix.python-version }})
65
+ runs-on: ubuntu-latest
66
+ strategy:
67
+ fail-fast: false
68
+ matrix:
69
+ python-version: ["3.11", "3.12"]
70
+
71
+ env:
72
+ CI: true
73
+ SNAPSHOT_DIR: __snapshots_ci__
74
+
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+
78
+ - name: Set up Python ${{ matrix.python-version }}
79
+ uses: actions/setup-python@v5
80
+ with:
81
+ python-version: ${{ matrix.python-version }}
82
+
83
+ - name: Cache pip dependencies
84
+ uses: actions/cache@v4
85
+ with:
86
+ path: ~/.cache/pip
87
+ key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
88
+ restore-keys: |
89
+ ${{ runner.os }}-pip-${{ matrix.python-version }}-
90
+ ${{ runner.os }}-pip-
91
+
92
+ - name: Install dependencies
93
+ run: |
94
+ python -m pip install --upgrade pip
95
+ pip install -e ".[dev]"
96
+
97
+ - name: Run tests
98
+ run: pytest --tb=short -v
99
+
100
+ - name: Run tests with coverage
101
+ if: matrix.python-version == '3.12'
102
+ run: |
103
+ pip install coverage
104
+ coverage run -m pytest
105
+ # Note: CI threshold is lower than local (65% vs 70%) due to Textual UI tests
106
+ # executing differently in headless CI environment. Local development should
107
+ # maintain 70%+ coverage.
108
+ coverage report --fail-under=65
109
+ coverage xml
110
+
111
+ - name: Upload coverage to Codecov
112
+ if: matrix.python-version == '3.12'
113
+ uses: codecov/codecov-action@v4
114
+ with:
115
+ files: coverage.xml
116
+ fail_ci_if_error: false
117
+ continue-on-error: true
118
+
119
+ all-checks:
120
+ name: All Checks Pass
121
+ needs: [lint, shellcheck, typecheck, test]
122
+ runs-on: ubuntu-latest
123
+ if: always()
124
+ steps:
125
+ - name: Check all jobs passed
126
+ run: |
127
+ if [[ "${{ needs.lint.result }}" != "success" ]] || \
128
+ [[ "${{ needs.shellcheck.result }}" != "success" ]] || \
129
+ [[ "${{ needs.typecheck.result }}" != "success" ]] || \
130
+ [[ "${{ needs.test.result }}" != "success" ]]; then
131
+ echo "One or more checks failed"
132
+ exit 1
133
+ fi
134
+ echo "All checks passed!"
@@ -0,0 +1,57 @@
1
+ name: Claude Code Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize]
6
+ # Optional: Only run on specific file changes
7
+ # paths:
8
+ # - "src/**/*.ts"
9
+ # - "src/**/*.tsx"
10
+ # - "src/**/*.js"
11
+ # - "src/**/*.jsx"
12
+
13
+ jobs:
14
+ claude-review:
15
+ # Optional: Filter by PR author
16
+ # if: |
17
+ # github.event.pull_request.user.login == 'external-contributor' ||
18
+ # github.event.pull_request.user.login == 'new-developer' ||
19
+ # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
20
+
21
+ runs-on: ubuntu-latest
22
+ permissions:
23
+ contents: read
24
+ pull-requests: write
25
+ issues: read
26
+ id-token: write
27
+
28
+ steps:
29
+ - name: Checkout repository
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 1
33
+
34
+ - name: Run Claude Code Review
35
+ id: claude-review
36
+ uses: anthropics/claude-code-action@v1
37
+ with:
38
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39
+ prompt: |
40
+ REPO: ${{ github.repository }}
41
+ PR NUMBER: ${{ github.event.pull_request.number }}
42
+
43
+ Please review this pull request and provide feedback on:
44
+ - Code quality and best practices
45
+ - Potential bugs or issues
46
+ - Performance considerations
47
+ - Security concerns
48
+ - Test coverage
49
+
50
+ Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
51
+
52
+ Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53
+
54
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
55
+ # or https://code.claude.com/docs/en/cli-reference for available options
56
+ claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
57
+
@@ -0,0 +1,50 @@
1
+ name: Claude Code
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: read
23
+ pull-requests: read
24
+ issues: read
25
+ id-token: write
26
+ actions: read # Required for Claude to read CI results on PRs
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 1
32
+
33
+ - name: Run Claude Code
34
+ id: claude
35
+ uses: anthropics/claude-code-action@v1
36
+ with:
37
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38
+
39
+ # This is an optional setting that allows Claude to read CI results on PRs
40
+ additional_permissions: |
41
+ actions: read
42
+
43
+ # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44
+ # prompt: 'Update the pull request description to include a summary of changes.'
45
+
46
+ # Optional: Add claude_args to customize behavior and configuration
47
+ # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48
+ # or https://code.claude.com/docs/en/cli-reference for available options
49
+ # claude_args: '--allowed-tools Bash(gh pr:*)'
50
+
@@ -0,0 +1,72 @@
1
+ name: Release to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ id-token: write
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Set up Python 3.12
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: '3.12'
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install build twine
28
+ pip install -e ".[dev]"
29
+
30
+ - name: Run linting
31
+ run: ruff check src/
32
+
33
+ - name: Run type checking
34
+ run: mypy src/
35
+
36
+ - name: Run tests
37
+ run: pytest --tb=short
38
+
39
+ - name: Build distribution packages
40
+ run: python -m build
41
+
42
+ - name: Verify build artifacts
43
+ run: |
44
+ ls -lh dist/
45
+ twine check dist/*
46
+
47
+ - name: Extract version from tag
48
+ id: get_version
49
+ run: |
50
+ echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
51
+
52
+ - name: Create GitHub Release
53
+ uses: softprops/action-gh-release@v1
54
+ with:
55
+ name: Release ${{ steps.get_version.outputs.VERSION }}
56
+ generate_release_notes: true
57
+ draft: false
58
+ prerelease: false
59
+ env:
60
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61
+
62
+ - name: Publish to PyPI
63
+ env:
64
+ TWINE_USERNAME: __token__
65
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
66
+ run: twine upload dist/*
67
+
68
+ - name: Verify PyPI upload
69
+ run: |
70
+ echo "✓ Package published to PyPI"
71
+ echo "Install with: pip install logview-ag"
72
+ echo "Package URL: https://pypi.org/project/logview-ag/"
@@ -0,0 +1,106 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ .hypothesis/
49
+ .pytest_cache/
50
+
51
+ # Translations
52
+ *.mo
53
+ *.pot
54
+
55
+ # Environments
56
+ .env
57
+ .venv
58
+ env/
59
+ venv/
60
+ ENV/
61
+ env.bak/
62
+ venv.bak/
63
+
64
+ # Spyder project settings
65
+ .spyderproject
66
+ .spyproject
67
+
68
+ # Rope project settings
69
+ .ropeproject
70
+
71
+ # mkdocs documentation
72
+ /site
73
+
74
+ # mypy
75
+ .mypy_cache/
76
+ .dmypy.json
77
+ dmypy.json
78
+
79
+ # Pyre type checker
80
+ .pyre/
81
+
82
+ # pytype static type analyzer
83
+ .pytype/
84
+
85
+ # Cython debug symbols
86
+ cython_debug/
87
+
88
+ # IDE
89
+ .idea/
90
+ .vscode/
91
+ *.swp
92
+ *.swo
93
+ *~
94
+
95
+ # OS
96
+ .DS_Store
97
+ Thumbs.db
98
+
99
+ # Project specific
100
+ *.log
101
+ !tests/fixtures/*.log
102
+ .uv/
103
+ uv.lock
104
+
105
+ # CI-generated snapshots (local snapshots are tracked)
106
+ __snapshots_ci__/