-
Notifications
You must be signed in to change notification settings - Fork 125
Labels
bugSomething isn't workingSomething isn't workingmaintenanceMaintenance work, no version bumpMaintenance work, no version bump
Description
Problem
The devcontainer.json configuration contains a postCreateCommand that attempts to install Python dependencies from a requirements.txt file that does not exist in the repository:
"postCreateCommand": "npm install && if [ -f requirements.txt ]; then pip install -r requirements.txt; fi"Analysis
Current State:
- The conditional check
if [ -f requirements.txt ]; then pip install -r requirements.txt; fialways evaluates to false - No
requirements.txtfile exists in the repository root or any subdirectories - This adds unnecessary complexity to the devcontainer setup command
Impact:
- Low severity - the conditional prevents actual errors
- Minor performance impact - unnecessary file check on every container creation
- Code cleanliness - unused logic should be removed
Repository Context:
- The project uses npm for JavaScript/Node.js dependencies (package.json exists)
- Python 3.11 is installed via devcontainer features for script execution
- Python scripts in
scripts/linting/andscripts/security/do not require external dependencies - All Python dependencies are satisfied by standard library modules
Proposed Solution
Simplify the postCreateCommand to only run npm install:
"postCreateCommand": "npm install"Benefits
- Clarity: Removes dead code and makes intent clearer
- Maintainability: Reduces confusion for future contributors
- Performance: Eliminates unnecessary file system check
- Consistency: Aligns configuration with actual project structure
Implementation
Update .devcontainer/devcontainer.json line 28:
- Remove:
&& if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - Keep:
npm install
Future Considerations
If Python dependencies become necessary in the future:
- Create
requirements.txtin repository root - Add the conditional back to
postCreateCommand - Document required dependencies
Acceptance Criteria
-
postCreateCommandsimplified to"npm install" - Devcontainer builds successfully
- npm dependencies install correctly
- No functional changes to development environment
- Documentation updated if necessary
Related Files
.devcontainer/devcontainer.json
Labels
- bug
- devcontainer
- maintenance
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmaintenanceMaintenance work, no version bumpMaintenance work, no version bump