Skip to content

Standardize on venv/ for Python virtual environments - #75

Merged
tim-dickey merged 37 commits into
mainfrom
fix/test-unicode-encoding
Feb 12, 2026
Merged

Standardize on venv/ for Python virtual environments#75
tim-dickey merged 37 commits into
mainfrom
fix/test-unicode-encoding

Conversation

@tim-dickey

Copy link
Copy Markdown
Owner

Remove support for .venv/ and enforce the use of venv/ for consistency across the project. Update documentation and scripts to reflect this change, ensuring clarity in setup instructions and issue creation processes. Additionally, optimize Codacy analysis by excluding unnecessary paths.

Copilot AI and others added 10 commits February 7, 2026 20:00
Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Add .venv/** to Codacy exclude_paths
Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Remove .venv support and standardize on venv/ naming
Updated issue creation scripts and documentation
Added .gitattributes for consistent line endings across platforms
Updated .venv with new dependencies and development tools
Updated code review tracking documentation with new issues and processes
Copilot AI review requested due to automatic review settings February 8, 2026 00:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes Python virtual environment naming across the repo by documenting/enforcing venv/ usage (instead of .venv/), updates issue-creation documentation/scripts accordingly, and adds a PowerShell wrapper to make issue creation easier on Windows.

Changes:

  • Remove .venv/ from .gitignore and update setup docs to explicitly use python -m venv venv.
  • Update issue-creation docs/scripts to reflect variable issue counts and add run-issue-creation.ps1.
  • Add .gitattributes rule to enforce LF endings for .sh scripts.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
scripts/run-issue-creation.sh Updates messaging to reflect variable issue counts.
scripts/run-issue-creation.ps1 Adds PowerShell wrapper for running the Python issue creation script.
scripts/README.md Updates script descriptions and comparison table; documents the new PS wrapper.
docs/TEST_FRAMEWORK.md Clarifies venv should be used (not .venv).
docs/ISSUE_GENERATION_PROCESS.md Adds PS wrapper method + WSL notes.
docs/CODE_REVIEW_TEST_RESULTS.md Clarifies “15 issues” refers to the 2026-02-02 review.
docs/CI_CD.md Documents .venv removal/venv standardization and Codacy exclude list.
backend/requirements.txt Minor comment/formatting adjustments in dependency list.
_bmad-output/implementation-artifacts/code-review-issues-tracking.md Adds a tracking artifact for created issues.
VENV_SETUP.md Adds explicit venv/ naming convention note.
README.md Adds explicit guidance to use venv/ (not .venv/).
ISSUE_CREATION_INSTRUCTIONS.md Updates wording to reflect variable issue counts/log contents.
CONTRIBUTING.md Adds explicit venv/ setup steps.
.gitignore Removes .venv/ ignore entry.
.gitattributes Enforces LF line endings for .sh scripts.

Comment on lines +17 to +21
$env:GITHUB_REPOSITORY = $repo

$pythonCmd = Get-Command py -ErrorAction SilentlyContinue
if ($null -ne $pythonCmd) {
& py -3 "$scriptDir\create-github-issues.py"

Copilot AI Feb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$repo / $env:GITHUB_REPOSITORY is set here, but create-github-issues.py uses a hard-coded REPO = "tim-dickey/trivia-app" and does not read the env var. This makes the wrapper’s repository selection misleading (and reduces reusability for forks). Either remove the repo/env wiring from the wrapper or update the Python script to read from the environment with a sane default.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +15
### P0 (unknown)

- [ ] #61 - [P0] Consolidate CI/CD Workflows to Eliminate Duplicate Test Runs
- [ ] #62 - [P0] Implement Organization Scoping Middleware for Multi-Tenancy
- [ ] #63 - [P0] Fix Test Database Configuration (PostgreSQL in CI)
- [ ] #64 - [P0] Document Required GitHub Secrets for CI/CD

### P1 (unknown)

Copilot AI Feb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The priority name is shown as (unknown) here, which makes the tracking output ambiguous. If this file is meant to be a durable artifact, update generation so P0/P1 map to meaningful names (e.g., Critical/High) rather than unknown.

Suggested change
### P0 (unknown)
- [ ] #61 - [P0] Consolidate CI/CD Workflows to Eliminate Duplicate Test Runs
- [ ] #62 - [P0] Implement Organization Scoping Middleware for Multi-Tenancy
- [ ] #63 - [P0] Fix Test Database Configuration (PostgreSQL in CI)
- [ ] #64 - [P0] Document Required GitHub Secrets for CI/CD
### P1 (unknown)
### P0 (Critical)
- [ ] #61 - [P0] Consolidate CI/CD Workflows to Eliminate Duplicate Test Runs
- [ ] #62 - [P0] Implement Organization Scoping Middleware for Multi-Tenancy
- [ ] #63 - [P0] Fix Test Database Configuration (PostgreSQL in CI)
- [ ] #64 - [P0] Document Required GitHub Secrets for CI/CD
### P1 (High)

Copilot uses AI. Check for mistakes.
- [ ] #61 - [P0] Consolidate CI/CD Workflows to Eliminate Duplicate Test Runs
- [ ] #62 - [P0] Implement Organization Scoping Middleware for Multi-Tenancy
- [ ] #63 - [P0] Fix Test Database Configuration (PostgreSQL in CI)
- [ ] #64 - [P0] Document Required GitHub Secrets for CI/CD

Copilot AI Feb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The P0 list appears incomplete for the referenced source review: code-review-issues-p0.json defines 5 P0 issues (including P0-3: WebSocket infrastructure), but only 4 are tracked here. If this file is generated, consider regenerating after creation (or annotate that some issues were intentionally skipped).

Suggested change
- [ ] #64 - [P0] Document Required GitHub Secrets for CI/CD
- [ ] #64 - [P0] Document Required GitHub Secrets for CI/CD
- [ ] (TBD) - [P0] P0-3: WebSocket infrastructure (issue to be created and linked)

Copilot uses AI. Check for mistakes.
Comment thread backend/requirements.txt Outdated
Comment on lines +25 to +26
pydantic-settings==2.1.0
email-validator==2.1.0

Copilot AI Feb 8, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are trailing spaces after the pinned versions here. While pip will usually tolerate it, these tend to create noisy diffs and can trip some tooling; please remove the trailing whitespace.

Suggested change
pydantic-settings==2.1.0
email-validator==2.1.0
pydantic-settings==2.1.0
email-validator==2.1.0

Copilot uses AI. Check for mistakes.
script to fix the unicode encoding issue.
@tim-dickey

Copy link
Copy Markdown
Owner Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copilot AI commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

@tim-dickey I've opened a new pull request, #79, to work on those changes. Once the pull request is ready, I'll request review from you.

@codacy-production

codacy-production Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Codacy's Analysis Summary

0 new issue (≤ 0 issue)
0 new security issue
0 complexity
0 duplications

Review Pull Request in Codacy →

AI Reviewer available: add the codacy-review label to get contextual insights without leaving GitHub.

codacy-production[bot]

This comment was marked as outdated.

Copilot AI and others added 6 commits February 12, 2026 11:06
- Make create-github-issues.py read GITHUB_REPOSITORY env var with fallback
- Update tracking markdown with proper priority names (Critical, High)
- Add missing P0-3 WebSocket infrastructure issue to tracking
- Remove trailing whitespace from requirements.txt

Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Replace TBD placeholder with explanatory note about P0-3 not being created,
avoiding confusion in the checklist tracking

Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Normalize env var value with .strip() and fall back to default when empty or
whitespace-only, preventing gh issue create failures with empty --repo flag

Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Address PR #75 review feedback: env var support, priority names, and whitespace
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
@tim-dickey

Copy link
Copy Markdown
Owner Author

@copilot - Resolve this conflict
https://github.com/tim-dickey/trivia-app/pull/75/conflicts

Copilot AI commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

@tim-dickey I've opened a new pull request, #80, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
codacy-production[bot]

This comment was marked as outdated.

Copilot AI and others added 3 commits February 12, 2026 11:31
…s to 1.13.5

Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The pull request successfully standardizes the project on the venv/ directory for Python virtual environments. This change is reflected across documentation, CI/CD configurations, and issue-creation scripts. The exclusion of both venv/ and .venv/ in Codacy paths is a proactive measure for security and performance.


💡 Codacy uses AI. Check for mistakes.

# If gh is not authenticated, it will use the current session's credentials

echo "Note: Creating 20 issues (5 P0, 5 P1, 5 P2, 5 P3)"
echo "Note: Issue count varies based on BMAD review results"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

Suggestion: While updating this script to generalize the issue count, consider making the REPO variable flexible to align with the environment variable support you added to the underlying Python script.

Try running the following prompt in your IDE agent:

Update scripts/run-issue-creation.sh to set the REPO variable using the GITHUB_REPOSITORY environment variable if it exists, otherwise defaulting to 'tim-dickey/trivia-app'. Use the shell syntax REPO="${GITHUB_REPOSITORY:-tim-dickey/trivia-app}".

Write-Host ''
Write-Host 'Please wait while issues are created...'

$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

Suggestion: You can simplify this by using the built-in $PSScriptRoot variable.

This might be a simple fix:

Suggested change
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$scriptDir = $PSScriptRoot

Copilot AI and others added 5 commits February 12, 2026 11:47
…fix Docker config

Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Resolve merge conflicts, patch critical security vulnerabilities, and improve configuration
@tim-dickey

Copy link
Copy Markdown
Owner Author

@copilot - Review and comment on these conflicts
https://github.com/tim-dickey/trivia-app/pull/75/conflicts

Copilot AI commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

@tim-dickey I've opened a new pull request, #81, to work on those changes. Once the pull request is ready, I'll request review from you.

@tim-dickey

Copy link
Copy Markdown
Owner Author

@copilot - Review these merge conflicts

https://github.com/tim-dickey/trivia-app/pull/75/conflicts

Copilot AI commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

@tim-dickey I've opened a new pull request, #83, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits February 12, 2026 13:47
- Use Node 22.2.0 (newer) and keep semgrep tool in Codacy config
- Use cryptography 46.0.5 (newer, fixes SECT curve vulnerability)
- Use environment variable extraction in docker-entrypoint.sh for flexibility
- Use SECRET_KEY with default fallback in docker-compose.yml
- Merge frontend dependencies without duplicates
- Regenerate package-lock.json after package.json merge
…gain

Brings in merge conflict resolutions from main branch.
Co-authored-by: tim-dickey <80638631+tim-dickey@users.noreply.github.com>
Resolve merge conflicts between fix/test-unicode-encoding and main
@tim-dickey
tim-dickey merged commit 0b1cb6c into main Feb 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants