Repository navigation
Refactor code formatting, templates, and remove unused configurations - #40
Conversation
- Adjusted HTML templates in logmonitor_settings.jinja2 and logmonitor_tab.jinja2 for better readability and consistency. - Updated indentation and line breaks in various sections to enhance code clarity. - Removed unnecessary settings from pyproject.toml and migrated Ruff configuration to ruff.toml. - Simplified the installation of fake OctoPrint plugins in tests/conftest.py. - Improved test cases for JavaScript extraction and integration API, ensuring better error handling and readability. - Refined log parsing tests to streamline assertions and enhance clarity. - Enhanced test structure in test_log_tailer.py and test_plugin_core.py for better maintainability. - General code cleanup across multiple test files to adhere to PEP 8 standards.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage 77.59% diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ 77.59% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (5954e2c) 1259 1037 82.37% Head commit (ae61d8b) 1259 (+0) 1037 (+0) 82.37% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#40) 58 45 77.59% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Description
This pull request introduces a standardized, modern code style and linting setup across the project, replacing legacy and inconsistent tooling with a unified pre-commit-based workflow. It removes older configuration files, adds shared configuration for tools like Ruff, isort, Prettier, and DjLint, and updates CI and documentation to match the new approach. Several minor code cleanups and formatting improvements are also included.
Tooling and Linting Overhaul
.pre-commit-config.yamlto define a consistent set of linting and formatting hooks (Ruff, isort, Prettier, DjLint, ShellCheck, etc.) and.pre-commitas the primary lint runner for both local development and CI..flake8andeslint.config.mjs, and removed references to these in.codacy.yml. [1] [2] [3].isort.cfg), Prettier (.prettierrc.yaml,.prettierignore), and DjLint (.djlintrc). [1] [2] [3] [4]CI and Documentation Updates
pre-commitas the linting step, removing Node.js and ShellCheck setup, and simplified the lint job. [1] [2] [3]README.mdto instruct contributors to usepre-commitfor linting/formatting and updated code style badges to reflect the new tooling (Ruff replaces Black, removed Pylint/Bandit badges). [1] [2]Formatting and Code Cleanups
octoprint_logmonitor/__init__.pyfor consistency and readability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13].editorconfigto match new standards.Related Issues
Type of Change
Checklist