Conversation
…CI workflow configuration
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR prepares the repository for external contributors by adding core open-source contribution assets (license, contributing guide, issue/PR templates) and introducing a GitHub Actions CI workflow to enforce baseline frontend/backend quality checks.
Changes:
- Added repository hygiene and contributor onboarding assets:
LICENSE,CONTRIBUTING.md, and GitHub issue/PR templates. - Added CI workflow to run frontend lint/build and backend Ruff + lightweight pytest smoke tests.
- Performed assorted formatting/lint-driven updates across frontend and backend files (plus a couple of auth-related React lifecycle adjustments).
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/AuthPage.tsx | Adjusts OAuth redirect handling/state transitions during auth callback parsing. |
| src/components/Navbar.tsx | Adds an “ignore” guard to avoid setting profile state after effect cleanup. |
| README.md | Reworks README structure/content for onboarding, setup, and OSS readiness. |
| LICENSE | Adds an MIT license file. |
| eslint.config.js | Expands ignore patterns (e.g., macOS metadata files). |
| CONTRIBUTING.md | Adds contribution process, conventions, and local workflow guidance. |
| backend/upload_test.py | Whitespace/formatting cleanup. |
| backend/tests/test_ci.py | Introduces lightweight backend CI smoke tests (no torch/model/server needed). |
| backend/test_pipeline.py | Minor import/formatting cleanup in ML pipeline verification script. |
| backend/test_auth.py | Improves formatting/readability of integration test script output and requests. |
| backend/seed_vendors.py | Formats long print statement for readability. |
| backend/ruff.toml | Adds Ruff configuration for backend linting in CI. |
| backend/router.py | Removes unused import and minor formatting cleanup. |
| backend/requirements.txt | Adds pytest to backend requirements. |
| backend/main.py | Formatting refactors, minor readability improvements, and a small select-string refactor. |
| backend/inference.py | Formatting cleanup and docstring wrapping. |
| backend/fusion.py | Formatting cleanup and function signature wrapping. |
| backend/auto_test.py | Formatting cleanup for readability. |
| backend/auth.py | Removes unused import. |
| .github/workflows/ci.yml | Adds CI workflow (frontend lint/build + backend Ruff + smoke tests). |
| .github/PULL_REQUEST_TEMPLATE.md | Adds PR template checklist and required sections. |
| .github/ISSUE_TEMPLATE/good_first_issue.yml | Adds “Good First Issue” issue form. |
| .github/ISSUE_TEMPLATE/feature_request.yml | Adds feature request issue form. |
| .github/ISSUE_TEMPLATE/bug_report.yml | Adds bug report issue form. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
21
to
35
| if (error) { | ||
| setStatus('error'); | ||
| setErrorMsg('Authentication failed. Please try again.'); | ||
| Promise.resolve().then(() => { | ||
| setStatus('error'); | ||
| setErrorMsg('Authentication failed. Please try again.'); | ||
| }); | ||
| window.history.replaceState({}, '', '/auth'); | ||
| return; | ||
| } | ||
|
|
||
| if (accessToken) { | ||
| setStatus('processing'); | ||
| Promise.resolve().then(() => setStatus('processing')); | ||
| setToken(accessToken); | ||
| // Clean the URL | ||
| window.history.replaceState({}, '', '/auth'); | ||
| navigate('/mode', { replace: true }); | ||
| return; |
| .catch(console.error); | ||
| } else { | ||
| setProfile(null); | ||
| Promise.resolve().then(() => { if (!ignore) setProfile(null); }); |
| <br /> | ||
| <a href="https://github.com/jpdevhub/FreshScanAi/issues/new?labels=bug">Report Bug</a> | ||
| · | ||
| <a href="https://github.com/jpdevhub/FreshScanAi/issues/new?labels=enhancement">Request Feature</a> |
|
|
||
| - Ensure your branch is up to date with `main` | ||
| - Run `npm run lint` and fix all errors | ||
| - Run the backend tests with `python -m pytest backend/` and ensure they pass |
|
|
||
| ## Checklist | ||
| - [ ] `npm run lint` passes | ||
| - [ ] Backend tests pass (`python -m pytest backend/`) |
Comment on lines
+62
to
+70
| - name: Install dependencies | ||
| run: | | ||
| pip install fastapi uvicorn supabase Pillow numpy \ | ||
| python-dotenv python-multipart httpx pytest | ||
|
|
||
| - name: Lint with Ruff | ||
| run: | | ||
| pip install ruff | ||
| ruff check . --config ruff.toml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements all necessary open-source repository guidelines to prepare the project for external contributors.
Motivation
To ensure the project meets enterprise open-source standards, providing a seamless onboarding experience for new developers, enforcing code quality through automated CI/CD, and formalizing the contribution process.