jhanley634 / dojo-blackboard

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

32 swipe #33

Closed jhanley634 closed 1 month ago

jhanley634 commented 1 month ago

Adds results of running the BeeWare tutorial.

Summary by Sourcery

Add a new 'Hello World' application based on the BeeWare tutorial, including build steps and initial tests. Refactor existing functions to be publicly accessible.

New Features:

Enhancements:

Build:

Tests:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request implements the BeeWare tutorial, adding a new "Hello World" application using the Toga framework. It also includes updates to the Makefile for building and managing the new application, as well as some minor changes to existing files.

Sequence diagram for the HelloWorld application startup

sequenceDiagram
    participant User
    participant HelloWorld
    participant MainWindow
    participant Button
    User->>HelloWorld: Start application
    HelloWorld->>MainWindow: Create main window
    HelloWorld->>Button: Create button with on_press
    HelloWorld->>MainWindow: Show main window
    User->>Button: Click "Say Hello!"
    Button->>HelloWorld: Trigger say_hello
    HelloWorld->>MainWindow: Show InfoDialog with greeting

File-Level Changes

Change Details Files
Implement BeeWare tutorial 'Hello World' application
  • Create new HelloWorld class inheriting from toga.App
  • Implement startup method to set up the UI
  • Add say_hello method for button click handling
  • Create greeting function for generating personalized messages
  • Add main function to initialize the application
src/beeware-tutorial/helloworld/src/helloworld/app.py
src/beeware-tutorial/helloworld/src/helloworld/__main__.py
Update Makefile to support BeeWare application building
  • Add new variables for BeeWare project paths
  • Create new 'build' target for BeeWare application
  • Update 'install' target to include BeeWare build directory
  • Modify 'clean' target to remove BeeWare-related caches
Makefile
Add tests for the new BeeWare application
  • Create test runner script
  • Add initial test case for the application
src/beeware-tutorial/helloworld/tests/helloworld_test.py
src/beeware-tutorial/helloworld/tests/app_test.py
Refactor existing code in headlines.py
  • Rename private functions to public (remove underscore prefix)
  • Update function calls to use new names
src/bboard/newsfeed/headlines.py
tests/headlines_test.py
Minor updates to existing files
  • Add docstring to 'peter' function in main.py
  • Update pip install command for 'uv' package
src/bboard/main.py
Makefile

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).