Conversation
rtuszik
commented
Jul 18, 2025
- Reorganize index templates into modular components
- Move from monolithic index_template.html to component-based structure
- Extract CSS into separate file for better maintainability
- Split JavaScript into dedicated main.js file
- Create reusable body, footer, and header components
- Update base template with consistent favicon and font loading
- add pyproject.toml and .python-version for project setup and dependency management
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This comment was marked as spam.
This comment was marked as spam.
- Reorganize index templates into modular components - Move from monolithic index_template.html to component-based structure - Extract CSS into separate file for better maintainability - Split JavaScript into dedicated main.js file - Create reusable body, footer, and header components - Update base template with consistent favicon and font loading
…pendency management
… requirements.txt
… cheatsheet structure
…UV package ecosystems
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the project's dependency management and tooling by migrating from requirements.txt to uv with a pyproject.toml configuration. Key changes include:
- Migration from pip to uv for dependency management with lock file
- Addition of dev dependencies (ruff, bandit, ty, vulture) for code quality
- Addition of DVORAK keyboard layout support
- Code formatting standardization (moving imports, applying consistent quote styles)
- Template restructuring: splitting monolithic HTML into modular components
- Schema addition for YAML validation
- GitHub Actions workflow updates to use uv and new linting tools
Reviewed Changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | New project configuration with dependencies and ruff settings |
| uv.lock | Locked dependency versions for reproducible builds |
| yaml_cheatsheet_spec.md | Added DVORAK to valid keyboard layouts |
| src/validate_yaml.py | Code formatting (quotes, imports, spacing) |
| src/generate_cheatsheet.py | Code formatting and refactored index generation |
| src/templates/index/* | Split monolithic template into modular components |
| src/templates/base.html | Fixed invalid HTML attribute, added common head elements |
| docs/schema/cheatsheet.schema.json | New JSON Schema for YAML validation |
| .github/workflows/lint.yml | Replaced super-linter with dedicated uv-based checks |
| README.md | Updated installation instructions for uv |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/lint.yml
Outdated
| - name: "Set up Python" | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version-file: "pyproject.toml" |
There was a problem hiding this comment.
The python-version-file should reference .python-version (which contains '3.13'), not pyproject.toml. The pyproject.toml specifies requires-python = \">=3.9\" which is a constraint, not a specific version to use for the action.
| <option value="name-desc">Name (Z-A)</option> | ||
| </select> | ||
| <select id="items-per-page" class="items-per-page-select"> | ||
| <option value="9" selected>9 per page</option> |
There was a problem hiding this comment.
The default value of '9' in the HTML doesn't match the JavaScript default of itemsPerPage = 9 at line 45 of main.js, but there's a discrepancy - the original template had '8 per page' as the first option but the JS used 9. This change makes the HTML match the JS, but the option value should probably be '8' to match the previous behavior, or update the JS to use 9 explicitly.
| <option value="9" selected>9 per page</option> | |
| <option value="8" selected>8 per page</option> | |
| <option value="9">9 per page</option> |
| - package-ecosystem: "uv" | ||
| target-branch: "dev" | ||
|
|
||
| directory: "/" |
There was a problem hiding this comment.
[nitpick] Inconsistent blank line placement: there's a blank line between target-branch: \"dev\" and directory: \"/\" but not for the other package ecosystems. Remove the blank line on line 17 for consistency.
| <script> | ||
| {% include "index/scripts/main.js" %} | ||
| </script> |
There was a problem hiding this comment.
Error: Unexpected token
| <script> | |
| {% include "index/scripts/main.js" %} | |
| </script> | |
| <script src="{{ url_for('static', filename='index/scripts/main.js') }}"></script> |
| const cheatsheets = [ | ||
| {% for cheatsheet in cheatsheets %} | ||
| { title: {{ cheatsheet.title|tojson }}, filename: {{ cheatsheet.filename|tojson }} }, | ||
| {% endfor %} | ||
| ]; | ||
|
|
There was a problem hiding this comment.
Error: Unexpected token
| const cheatsheets = [ | |
| {% for cheatsheet in cheatsheets %} | |
| { title: {{ cheatsheet.title|tojson }}, filename: {{ cheatsheet.filename|tojson }} }, | |
| {% endfor %} | |
| ]; | |
| // Replace the following with actual cheatsheet data. | |
| // Example: If you have a global variable `window.cheatsheetsData` defined in your HTML: | |
| const cheatsheets = window.cheatsheetsData || []; | |
| // If you need to embed the data, define it in your HTML as: | |
| // <script> | |
| // window.cheatsheetsData = [ | |
| // { title: "Cheat 1", filename: "cheat1.html" }, | |
| // { title: "Cheat 2", filename: "cheat2.html" } | |
| // ]; | |
| // </script> |
…n and update Dependabot configuration