Shows Basic Idea on Web Page via ideate Web#80
Merged
Conversation
Owner
Author
matthewctechnology
left a comment
There was a problem hiding this comment.
Approved ✅
One suggested change to list browse urls so they do not get bunched together.
This installs pre-selected dependencies for Web Ideation milestion. Checks for regressions with Terminal Ideation.
Reminder
Pull request authors can’t approve their own pull request.
- Must Merge without waiting for requirements to be met (bypass rules)
Summary
Shows Basic Idea on Web Page via ideate Web
Description
Implements a server endpoint (GET /) using FastAPI that renders an HTML page displaying a hardcoded creative idea. Add test for route and ensure lint clean.
Changes
- Refactors topic normalization from ideate cli to options provider ✔️
- Create ideate/api/ideate.py for FastAPI endpoint ✔️
- Add
GET /ideateFastAPI endpoint, serve template with hardcoded idea ✔️ - Enables ability to provide a fallback flag for development ✔️
- Styles basic page same/similar to critique app ✔️
Criteria
- Given server is started, when
GET /ideaterequested, then returns 200 and includes an ai idea in page ✔️ - Given server is started, when
GET /ideate?topic=<topic>requested, then returns 200 and includes topical ai idea in page ✔️ - Given server is started, when
GET /ideate?fallback=Truerequested, then returns 200 and includes a fallback idea in page ✔️
Tests
Gets Predetermined and AI Idea with API Endpoint 🟢 ☑️
- View README about backend
- Displays backend run instructions ✔️
- Run
cd /workspaces/stacked/ideate && source .ideate/bin/activate
- Activates environment (.ideate)
- Run
pylint ideate && pytest tests
- Lints without errors ✔️
- Tests without failures ✔️
- Run
uvicorn ideate:app --reload
- Starts backend app ✔️
- Run
curl 'http://localhost:8000/ideate?fallback=True'
- HTML shows predetermined idea ✔️
- Run
curl 'http://localhost:8000/ideate?fallback=True&topic=<topic>'
- HTML shows topical predetermined idea ✔️
- Run
curl 'http://localhost:8000/ideate?topic=<topic>'
- HTML shows a topical AI idea ✔️
- Run
curl 'http://localhost:8000/ideate'
- HTML shows an AI idea ✔️
- Browse
https://<codespace>-8000.app.github.dev/ideate?fallback=True
- HTML shows predetermined idea ✔️
- Browse
https://<codespace>-8000.app.github.dev/ideate?fallback=True&topic=<topic>
- HTML shows predetermined idea ✔️
- Browse
https://<codespace>-8000.app.github.dev/ideate?topic=<topic>
- Shows a topical AI idea ✔️
- Browse
https://<codespace>-8000.app.github.dev/ideate
- Shows an AI idea ✔️
- Browse
https://<codespace>-8000.app.github.dev/docs
- Shows API Docs with Swagger ✔️
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
Shows Basic Idea on Web Page via ideate Web
Description
Implements a server endpoint (GET /) using FastAPI that renders an HTML page displaying a hardcoded creative idea. Add test for route and ensure lint clean.
Changes
GET /ideateFastAPI endpoint, serve template with hardcoded ideaCriteria
GET /ideaterequested, then returns 200 and includes an ai idea in pageGET /ideate?topic=<topic>requested, then returns 200 and includes topical ai idea in pageGET /ideate?fallback=Truerequested, then returns 200 and includes a fallback idea in pageTests
Gets Predetermined and AI Idea with API Endpoint
cd /workspaces/stacked/ideate && source .ideate/bin/activatepylint ideate && pytest testsuvicorn ideate:app --reloadcurl 'http://localhost:8000/ideate?fallback=True'curl 'http://localhost:8000/ideate?fallback=True&topic=<topic>'curl 'http://localhost:8000/ideate?topic=<topic>'curl 'http://localhost:8000/ideate'https://<codespace>-8000.app.github.dev/ideate?fallback=Truehttps://<codespace>-8000.app.github.dev/ideate?fallback=True&topic=<topic>https://<codespace>-8000.app.github.dev/ideate?topic=<topic>https://<codespace>-8000.app.github.dev/ideatehttps://<codespace>-8000.app.github.dev/docs