-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fixes template project creation due to missing flake8 #4373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Greptile OverviewGreptile SummaryOverviewThis PR fixes template project creation by removing the reference to the deleted Changes Made
Critical Issue FoundWhile the PR correctly addresses the immediate error, it creates an incomplete migration from Problem: Generated external projects will now have:
Impact: Flake8 will run with default strict settings instead of the project's custom configuration (ignoring E501 line length, F401 in Additional IssueThe VSCode settings template ( RecommendationThis PR needs to also copy the root Confidence Score: 2/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant Generator as generator.py
participant FS as File System
participant PreCommit as pre-commit hooks
User->>Generator: Request external project creation
Generator->>FS: Copy .dockerignore from ROOT_DIR
Generator->>FS: Copy .gitattributes from ROOT_DIR
Generator->>FS: Copy .gitignore from ROOT_DIR (if exists)
Note over Generator,FS: ❌ Missing: Copy pyproject.toml from ROOT_DIR
Generator->>FS: Copy .pre-commit-config.yaml from ROOT_DIR
Note right of FS: .pre-commit-config.yaml<br/>includes Flake8-pyproject<br/>which expects pyproject.toml!
Generator->>FS: Copy scripts with RL libraries
Generator->>FS: Create extension files
Generator->>FS: Copy extension/pyproject.toml to source/<name>/
Note right of FS: This pyproject.toml is minimal,<br/>only for build system,<br/>NOT for flake8 config!
Generator->>FS: Setup git repository
Generator-->>User: Project created
User->>PreCommit: Run pre-commit hooks
PreCommit->>FS: Look for flake8 config in pyproject.toml
FS-->>PreCommit: ❌ pyproject.toml not found in root
PreCommit->>PreCommit: Use flake8 defaults (strict rules)
Note over PreCommit: No custom ignores (E501, F401, etc.)<br/>May cause unexpected linting errors!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 2 comments
Additional Comments (2)
Problem: The Impact: Generated external projects will run flake8 via pre-commit hooks without any custom configuration, using flake8's strict defaults instead of the project's intended rules (like ignoring E501 for line length, F401 for init.py, etc.). Solution: Add a line to copy the root
Problem: This template still uses the old Current main repo settings: "flake8.enabled": true,
"flake8.args": ["--config", "${workspaceFolder}/pyproject.toml"],Impact: Generated projects will have inconsistent VSCode settings and won't properly use the flake8 configuration from Solution: Update to match the main repository's format: |
# Description Fixes isaac-sim#4372 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
Description
Fixes #4372
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there