jhanley634 / dojo-blackboard

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

31 nov 12th talk #41

Closed jhanley634 closed 2 weeks ago

jhanley634 commented 2 weeks ago

WIP. Dockerized it.

Summary by Sourcery

Dockerize the application by adding a Dockerfile and updating the Makefile to support Docker operations. Refactor variable names across the codebase for improved consistency and readability. Update test code for better clarity. Upgrade dependencies in requirements.txt to their latest versions.

New Features:

Enhancements:

Build:

Tests:

sourcery-ai[bot] commented 2 weeks ago

Reviewer's Guide by Sourcery

This PR adds Docker support to the project and includes several code quality improvements. The changes include creating a Dockerfile for containerization, updating variable naming conventions for better readability, and upgrading some dependencies.

Updated class diagram for VehicleJourney usage

classDiagram
    class VehicleJourney {
        -agency
        -stamp
        -vehicle_ref
    }
    class get_recent_vehicle_journeys {
        +get_recent_vehicle_journeys(agency, minutes)
    }
    class prune_ancient_rows {
        +prune_ancient_rows(limit)
    }
    VehicleJourney <.. get_recent_vehicle_journeys : uses
    VehicleJourney <.. prune_ancient_rows : uses

File-Level Changes

Change Details Files
Added Docker support to containerize the application
  • Created a new Dockerfile using Ubuntu Noble (24.04 LTS) as the base image
  • Added necessary system dependencies and Python setup in the container
  • Added a new 'docker' target in the Makefile for building and running the container
  • Updated clean target to remove build directory
Dockerfile
Makefile
Improved code quality through variable naming conventions
  • Renamed uppercase single-letter variables to lowercase for better PEP 8 compliance
  • Standardized variable naming across database queries
  • Simplified query references by using direct class names instead of aliases
src/bboard/transit/vehicles.py
src/bboard/util/database.py
tests/iss_test.py
Updated dependencies and linting configuration
  • Upgraded hypothesis from 6.115.6 to 6.116.0
  • Upgraded ruff from 0.7.1 to 0.7.2
  • Added 'N' to ruff select rules in pyproject.toml
requirements.txt
pyproject.toml

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).