jhanley634 / dojo-blackboard

An HTMX webserver for the Dojo's Tuesday night python meetups.
MIT License
3 stars 1 forks source link

3 add webserver #4

Closed jhanley634 closed 2 months ago

jhanley634 commented 2 months ago

Summary by Sourcery

Add a FastAPI-based web server for the Blackboard application with initial endpoints and update the Makefile to include a test target. Enhance documentation with server run instructions and introduce a unit test for the greeting function.

New Features:

Enhancements:

Documentation:

Tests:

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request adds a basic web server implementation using FastAPI for the Blackboard application. It includes new files for the server logic, a test file, and updates to the Makefile and README.

File-Level Changes

Change Details Files
Implement a basic FastAPI web server
  • Create a FastAPI application with a root route and a /hello endpoint
  • Implement a greeting function that returns a 'Hello Dojo!' message
  • Add a table of contents HTML for the root route
src/bboard/main.py
src/bboard/greeting.py
Add unit test for the greeting function
  • Create a TestGreeting class with a test_greeting method
  • Verify that the greeting function returns a dictionary with one item
tests/greeting_test.py
Update Makefile with new test commands
  • Add a 'test' target that runs unittest and pytest with coverage
  • Update 'install' target to upgrade pip
Makefile
Update README with instructions to run the web server
  • Add command to start the FastAPI development server
ReadMe.md

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.