-
Notifications
You must be signed in to change notification settings - Fork 1
Master #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Master #1
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8e2f5c8
UI improvements and modal conversion
gorkem-bwl 68dcead
Implement core functionality gaps: playground, settings, and team man…
gorkem-bwl 6d62dc9
Add LLM providers management and bug fixes
gorkem-bwl 684ea03
Optimize page load performance with auth and data caching
gorkem-bwl 2ed5665
Fix hydration error in auth context
gorkem-bwl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Structure & Module Organization | ||
| - `api/`: FastAPI backend (Alembic migrations, Celery, tests under `api/tests`). | ||
| - `web/`: Next.js 15 + TypeScript frontend (TailwindCSS, ESLint). | ||
| - `scripts/`: Helper scripts for seeding and demos. | ||
| - `sample_dataset_templates/`: CSV templates for datasets. | ||
| - `docker-compose*.yml`: Local dev and service orchestration. | ||
| - `Makefile`: Common developer commands. | ||
|
|
||
| ## Build, Test, and Development Commands | ||
| - Backend (Dockerized): `make dev` — start API, DB, Redis for local dev. | ||
| - Full demo: `make demo` — migrate, start, seed, quick API checks. | ||
| - DB migrations: `make migrate` — run Alembic upgrades. | ||
| - Seed data: `make seed` — insert demo evaluators/scenarios/datasets. | ||
| - Inspect: `make logs` (API logs), `make status` (container status). | ||
| - Stop/clean: `make clean` — down + prune volumes. | ||
| - Frontend: `cd web && npm run dev | build | start | lint`. | ||
| - Backend tests: `cd api && pytest -v` (use `-m unit|integration|auth|api`). | ||
|
|
||
| ## Coding Style & Naming Conventions | ||
| - Python (api): 4-space indentation; PEP 8; modules `snake_case.py`; classes `PascalCase`; functions/vars `snake_case`. | ||
| - TypeScript/React (web): components export `PascalCase`; files in `web/src/components` use kebab-case (e.g., `scenario-preview-modal.tsx`). | ||
| - Imports: prefer relative within package boundaries; avoid circular deps. | ||
| - Formatting: use project defaults (ESLint for `web/` via `npm run lint`). | ||
|
|
||
| ## Testing Guidelines | ||
| - Framework: Pytest (`api/pytest.ini` configured). Test files: `test_*.py`, classes `Test*`, functions `test_*`. | ||
| - Run: `cd api && pytest -v` or targeted (e.g., `pytest tests/test_auth.py -m auth`). | ||
| - Optional coverage: `pytest --cov=.` if `pytest-cov` is available. | ||
| - Add minimal, focused tests near the code under test; prefer unit over integration unless necessary. | ||
|
|
||
| ## Commit & Pull Request Guidelines | ||
| - Commits: concise imperative subject (≤72 chars). Example: `feat(api): add PII regex evaluator`. | ||
| - Include rationale and scope in body; reference issues (`Closes #123`). | ||
| - PRs: clear description, steps to test, screenshots for UI changes, and linked issue(s). Keep changes scoped. | ||
|
|
||
| ## Security & Configuration Tips | ||
| - Never commit secrets. Use `.env.example` to document new variables. Local envs: root `.env`, `api/.env`, `web/.env.local`. | ||
| - Default local URLs: API `http://localhost:8000`, Web `http://localhost:3000`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Contributing | ||
|
|
||
| Thanks for your interest in improving EvalWise! This guide summarizes how to get set up, develop, and submit changes. For detailed project conventions, see `AGENTS.md`. | ||
|
|
||
| ## Getting Started | ||
| - Prereqs: Docker + Docker Compose, Make, Node.js (for `web/`). | ||
| - Environment: copy `.env.example` to `.env` (and `api/.env`, `web/.env.local` as needed). Never commit secrets. | ||
|
|
||
| ## Local Development | ||
| - Start services: `make dev` (API, Postgres, Redis) or `make demo` (migrate + seed + smoke checks). | ||
| - Useful targets: `make migrate`, `make seed`, `make logs`, `make status`, `make clean`. | ||
| - Frontend: `cd web && npm run dev` (and `npm run lint` before PRs). | ||
|
|
||
| ## Testing | ||
| - Backend tests: `cd api && pytest -v`. | ||
| - Markers: `-m unit|integration|auth|api` (e.g., `pytest -m auth`). | ||
| - Optional coverage: `pytest --cov=.` if `pytest-cov` is available. | ||
|
|
||
| ## Coding Standards | ||
| - Python: PEP 8, 4-space indentation, `snake_case` for files/functions/variables, `PascalCase` for classes. | ||
| - TypeScript/React: `PascalCase` components, kebab-case component filenames in `web/src/components`. | ||
| - See `AGENTS.md` for structure, naming, and additional tips. | ||
|
|
||
| ## Commit & PR Process | ||
| - Branch: `feature/<short-name>`, `fix/<short-name>`, or `chore/<short-name>`. | ||
| - Commits: imperative and scoped. Example: `feat(api): add PII regex evaluator`. | ||
| - PRs should include: | ||
| - Purpose and summary of changes | ||
| - Testing notes (commands, expected outputs) | ||
| - Screenshots for UI changes | ||
| - Linked issue references (e.g., `Closes #123`) | ||
|
|
||
| ## Resources | ||
| - Project guidelines: `AGENTS.md` | ||
| - Makefile commands: `make help` | ||
| - API docs (local): `http://localhost:8000/docs` | ||
| - Web app (local): `http://localhost:3000` |
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
28 changes: 28 additions & 0 deletions
28
api/alembic/versions/b8f5c9a3d2e1_remove_usage_tracking_from_api_keys.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| """remove_usage_tracking_from_api_keys | ||
|
|
||
| Revision ID: b8f5c9a3d2e1 | ||
| Revises: 9b8d8990d1c0 | ||
| Create Date: 2025-01-05 10:00:00.000000 | ||
|
|
||
| """ | ||
| from alembic import op | ||
| import sqlalchemy as sa | ||
|
|
||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = 'b8f5c9a3d2e1' | ||
| down_revision = '9b8d8990d1c0' | ||
| branch_labels = None | ||
| depends_on = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| # Remove usage tracking columns from encrypted_api_keys table | ||
| op.drop_column('encrypted_api_keys', 'last_used') | ||
| op.drop_column('encrypted_api_keys', 'usage_count') | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| # Add the columns back if we need to rollback | ||
| op.add_column('encrypted_api_keys', sa.Column('usage_count', sa.Integer(), nullable=True, default=0)) | ||
| op.add_column('encrypted_api_keys', sa.Column('last_used', sa.DateTime(), nullable=True)) |
44 changes: 44 additions & 0 deletions
44
api/alembic/versions/c9d4e8f7a6b5_add_llm_providers_table.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| """add_llm_providers_table | ||
|
|
||
| Revision ID: c9d4e8f7a6b5 | ||
| Revises: b8f5c9a3d2e1 | ||
| Create Date: 2025-01-05 10:30:00.000000 | ||
|
|
||
| """ | ||
| from alembic import op | ||
| import sqlalchemy as sa | ||
|
|
||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision = 'c9d4e8f7a6b5' | ||
| down_revision = 'b8f5c9a3d2e1' | ||
| branch_labels = None | ||
| depends_on = None | ||
|
|
||
|
|
||
| def upgrade() -> None: | ||
| # Create llm_providers table | ||
| op.create_table('llm_providers', | ||
| sa.Column('id', sa.UUID(), nullable=False), | ||
| sa.Column('organization_id', sa.UUID(), nullable=False), | ||
| sa.Column('name', sa.String(), nullable=False), | ||
| sa.Column('provider_type', sa.String(), nullable=False), | ||
| sa.Column('encrypted_api_key', sa.Text(), nullable=True), | ||
| sa.Column('base_url', sa.String(), nullable=True), | ||
| sa.Column('default_model_name', sa.String(), nullable=False), | ||
| sa.Column('default_temperature', sa.Float(), nullable=False), | ||
| sa.Column('default_max_tokens', sa.Integer(), nullable=False), | ||
| sa.Column('is_default', sa.Boolean(), nullable=True), | ||
| sa.Column('is_active', sa.Boolean(), nullable=True), | ||
| sa.Column('created_at', sa.DateTime(), nullable=True), | ||
| sa.Column('updated_at', sa.DateTime(), nullable=True), | ||
| sa.Column('created_by', sa.UUID(), nullable=False), | ||
| sa.ForeignKeyConstraint(['created_by'], ['users.id'], ), | ||
| sa.ForeignKeyConstraint(['organization_id'], ['organizations.id'], ), | ||
| sa.PrimaryKeyConstraint('id') | ||
| ) | ||
|
|
||
|
|
||
| def downgrade() -> None: | ||
| # Drop the table if we need to rollback | ||
| op.drop_table('llm_providers') |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix malformed .gitignore entry at line 80.
Line 80 concatenates
web/.next/directly toyarn-error.log*without a newline separator, creating an invalid pattern. This breaks.gitignoreparsing for both entries.Apply this diff to fix the formatting:
🤖 Prompt for AI Agents