Skip to content

fix: Validate and fix local development setup#2173

Closed
Priyanka-Microsoft wants to merge 216 commits intoAzure-Samples:mainfrom
Priyanka-Microsoft:fix/local-dev-setup-validation
Closed

fix: Validate and fix local development setup#2173
Priyanka-Microsoft wants to merge 216 commits intoAzure-Samples:mainfrom
Priyanka-Microsoft:fix/local-dev-setup-validation

Conversation

@Priyanka-Microsoft
Copy link
Copy Markdown
Contributor

Summary

Fixes local development setup issues for the CWYD accelerator (Work Item #40207).

Changes

  1. Fix flake8 config (.flake8): Added .python_packages to exclude list. Previously, linting reported 360K+ false errors from third-party packages in \code/backend/batch/.python_packages/.

  2. Fix pytest config (\pytest.ini): Added \ estpaths = code/tests\ to prevent \ImportPathMismatchError\ caused by conflicting \conftest.py\ files in \code/tests/\ and \ ests/e2e-test/tests/.

  3. Update documentation (\docs/LocalDevelopmentSetup.md):

    • Fixed Step 6 to recommend \poetry install\ from repo root instead of misleading \cd code/backend\ instructions
    • Added troubleshooting sections for linting and test collection errors

Validation Results

Check Result
Python 3.11.9 venv creation
poetry install (264 packages)
npm install (frontend)
flake8 linting ✅ Clean (was 360K errors)
pytest unit tests (517) ✅ All passed (was failing on collection)
Frontend tests (15 suites, 151 tests) ✅ All passed
Frontend build
Flask backend startup + /api/health ✅ HTTP 200

Related Work Item

AB#40207

Roopan-Microsoft and others added 30 commits November 25, 2024 16:02
Co-authored-by: Roopan P M <v-roopanpm@microsoft.com>
Co-authored-by: Roopan P M <v-roopanpm@microsoft.com>
…es#1541)

Co-authored-by: Ajit Padhi <v-padhiajit@microsoft.com>
Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com>
Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com>
Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com>
Co-authored-by: Ross Smith <ross-p-smith@users.noreply.github.com>
Co-authored-by: gpickett <122489228+gpickett@users.noreply.github.com>
Co-authored-by: Francia Riesco <friesco@microsoft.com>
Co-authored-by: Francia Riesco <Fr4nc3@users.noreply.github.com>
Co-authored-by: Prajwal D C <v-dcprajwal@microsoft.com>
…nd Update Conversation flow based on template selection (Azure-Samples#1567)

Co-authored-by: Pavan Kumar <v-kupavan.microsoft.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pavan-Microsoft <v-kupavan@microsoft.com>
AjitPadhi-Microsoft and others added 18 commits March 5, 2026 12:04
…nt secrets to OIDC; update email templates (Azure-Samples#2131)

Co-authored-by: Harmanpreet-Microsoft <v-harmanprka@microsoft.com>
Co-authored-by: Prajwal-Microsoft <v-dcprajwal@microsoft.com>
…ts (Azure-Samples#2153)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com>
Co-authored-by: Ajit Padhi <v-padhiajit@microsoft.com>
Co-authored-by: Pavan-Microsoft <v-kupavan@microsoft.com>
Co-authored-by: Ross Smith <ross-p-smith@users.noreply.github.com>
Co-authored-by: gpickett <122489228+gpickett@users.noreply.github.com>
Co-authored-by: Francia Riesco <friesco@microsoft.com>
Co-authored-by: Francia Riesco <Fr4nc3@users.noreply.github.com>
Co-authored-by: Prajwal D C <v-dcprajwal@microsoft.com>
Co-authored-by: Harmanpreet-Microsoft <v-harmanprka@microsoft.com>
Co-authored-by: UtkarshMishra-Microsoft <v-utkamishra@microsoft.com>
Co-authored-by: Priyanka-Microsoft <v-prisinghal@microsoft.com>
Co-authored-by: Prasanjeet-Microsoft <v-singhprasa@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kiran-Siluveru-Microsoft <v-ksiluveru@microsoft.com>
Co-authored-by: Prashant-Microsoft <v-pmalusare@microsoft.com>
Co-authored-by: Rohini-Microsoft <v-rwalunj@microsoft.com>
Co-authored-by: Avijit-Microsoft <v-aghorui@microsoft.com>
Co-authored-by: RaviKiran-Microsoft <v-ravikirans@microsoft.com>
Co-authored-by: Somesh Joshi <v-somejoshi@microsoft.com>
Co-authored-by: Himanshi Agrawal <v-himagrawal@microsoft.com>
Co-authored-by: pradeepjha-microsoft <v-pradeepjha@microsoft.com>
Co-authored-by: Harmanpreet Kaur <v-harmanpkau@microsoft.com>
Co-authored-by: Bangarraju-Microsoft <v-golib@microsoft.com>
Co-authored-by: Harsh-Microsoft <v-hbangera@microsoft.com>
Co-authored-by: Kanchan-Microsoft <v-knagshetti@microsoft.com>
Co-authored-by: Cristopher Coronado <cristofima@hotmail.com>
Co-authored-by: Cristopher Coronado Moreira <crcorona@pichincha.com>
Co-authored-by: Vamshi-Microsoft <v-vamolla@microsoft.com>
Co-authored-by: Thanusree-Microsoft <168087422+Thanusree-Microsoft@users.noreply.github.com>
Co-authored-by: Niraj Chaudhari (Persistent Systems Inc) <v-nirajcha@microsoft.com>
Co-authored-by: Rohini-Microsoft <168007985+Rohini-Microsoft@users.noreply.github.com>
Co-authored-by: Kingshuk-Microsoft <v-kidatta@microsoft.com>
Co-authored-by: Ayaz-Microsoft <v-ayazkhan@microsoft.com>
Co-authored-by: Prekshith-Microsoft <v-pdj@microsoft.com>
Co-authored-by: Rafi-Microsoft <v-rafmd@microsoft.com>
Co-authored-by: Ragini-Microsoft <v-raginich@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Atulku-Microsoft <v-atulku@microsoft.com>
Co-authored-by: Akhileswara-Microsoft <v-golnaidu@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ples#2160)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Roopan-Microsoft <168007406+Roopan-Microsoft@users.noreply.github.com>
Co-authored-by: Ajit Padhi <v-padhiajit@microsoft.com>
Co-authored-by: Pavan-Microsoft <v-kupavan@microsoft.com>
Co-authored-by: Ross Smith <ross-p-smith@users.noreply.github.com>
Co-authored-by: gpickett <122489228+gpickett@users.noreply.github.com>
Co-authored-by: Francia Riesco <friesco@microsoft.com>
Co-authored-by: Francia Riesco <Fr4nc3@users.noreply.github.com>
Co-authored-by: Prajwal D C <v-dcprajwal@microsoft.com>
Co-authored-by: Harmanpreet-Microsoft <v-harmanprka@microsoft.com>
Co-authored-by: UtkarshMishra-Microsoft <v-utkamishra@microsoft.com>
Co-authored-by: Priyanka-Microsoft <v-prisinghal@microsoft.com>
Co-authored-by: Prasanjeet-Microsoft <v-singhprasa@microsoft.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kiran-Siluveru-Microsoft <v-ksiluveru@microsoft.com>
Co-authored-by: Prashant-Microsoft <v-pmalusare@microsoft.com>
Co-authored-by: Rohini-Microsoft <v-rwalunj@microsoft.com>
Co-authored-by: Avijit-Microsoft <v-aghorui@microsoft.com>
Co-authored-by: RaviKiran-Microsoft <v-ravikirans@microsoft.com>
Co-authored-by: Somesh Joshi <v-somejoshi@microsoft.com>
Co-authored-by: Himanshi Agrawal <v-himagrawal@microsoft.com>
Co-authored-by: pradeepjha-microsoft <v-pradeepjha@microsoft.com>
Co-authored-by: Harmanpreet Kaur <v-harmanpkau@microsoft.com>
Co-authored-by: Bangarraju-Microsoft <v-golib@microsoft.com>
Co-authored-by: Harsh-Microsoft <v-hbangera@microsoft.com>
Co-authored-by: Kanchan-Microsoft <v-knagshetti@microsoft.com>
Co-authored-by: Cristopher Coronado <cristofima@hotmail.com>
Co-authored-by: Cristopher Coronado Moreira <crcorona@pichincha.com>
Co-authored-by: Vamshi-Microsoft <v-vamolla@microsoft.com>
Co-authored-by: Thanusree-Microsoft <168087422+Thanusree-Microsoft@users.noreply.github.com>
Co-authored-by: Niraj Chaudhari (Persistent Systems Inc) <v-nirajcha@microsoft.com>
Co-authored-by: Rohini-Microsoft <168007985+Rohini-Microsoft@users.noreply.github.com>
Co-authored-by: Kingshuk-Microsoft <v-kidatta@microsoft.com>
Co-authored-by: Ayaz-Microsoft <v-ayazkhan@microsoft.com>
Co-authored-by: Prekshith-Microsoft <v-pdj@microsoft.com>
Co-authored-by: Rafi-Microsoft <v-rafmd@microsoft.com>
Co-authored-by: Ragini-Microsoft <v-raginich@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Atulku-Microsoft <v-atulku@microsoft.com>
Co-authored-by: Akhileswara-Microsoft <v-golnaidu@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix flake8 config to exclude .python_packages from linting
  (was reporting 360K+ false errors from third-party packages)
- Fix pytest.ini to set testpaths=code/tests to prevent
  ImportPathMismatchError between code/tests and tests/e2e-test
- Update LocalDevelopmentSetup.md Step 6 to recommend poetry install
  from repo root instead of misleading cd code/backend instructions
- Add troubleshooting sections for linting and test collection errors

Validated: Python 3.11.9, Node 22.21.0, Poetry 2.2.1, azd 1.23.12
- poetry install: 264 packages installed successfully
- npm install: completed successfully
- flake8 code: passes clean (exit 0)
- pytest (unit): 517 passed, 77 deselected
- Frontend tests: 15/15 suites passed, 151 passed, 2 skipped
- Frontend build: succeeds
- Flask backend: starts and responds on /api/health (HTTP 200)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.