feat: add devcontainer and improve test coverage#51
feat: add devcontainer and improve test coverage#51TheItsNameless wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds development container configuration for consistent development environments and improves test coverage by adding functional tests for validation, minimum selections, and error handling features.
- Adds devcontainer configuration (Dockerfile and devcontainer.json) for VS Code development
- Adds three new test cases covering input validation, checkbox minimum selections, and expand options error handling
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .devcontainer/devcontainer.json | Configures VS Code devcontainer with Python extensions for consistent development environment |
| .devcontainer/Dockerfile | Defines Docker image with Python 3.10, git, and all project dependencies installed |
| tests/prompts/test_input_prompt.py | Adds test for input validation behavior to verify blocked submission on invalid input |
| tests/prompts/test_checkbox_prompt.py | Adds test for min_selections parameter to ensure minimum selection count is enforced |
| tests/data/test_expand.py | Adds test for get_option method returning None when option key is not found |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| COPY requirements.txt requirements-dev.txt ./ | ||
| RUN pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt |
There was a problem hiding this comment.
The requirements files are copied but the actual source code is copied after installing dependencies. This means the dependencies are installed before the source code is available, which could cause issues if the installation process needs access to the source code (e.g., for editable installs). Consider whether the COPY . . on line 11 should come before or if you need to install the package in editable mode with pip install -e .
|
|
||
| COPY . . | ||
|
|
||
| CMD ["pytest"] |
There was a problem hiding this comment.
The CMD directive specifies pytest as the default command, but in a development container, it's more typical to not specify a CMD or use a long-running process like bash. Developers usually want to run various commands interactively rather than having pytest run automatically when the container starts. Consider removing this line or changing it to CMD ["bash"] or CMD ["sleep", "infinity"].
| CMD ["pytest"] | |
| CMD ["bash"] |
No description provided.