Skip to content

Conversation

@JacobCoffee
Copy link
Owner

@JacobCoffee JacobCoffee commented Jun 13, 2025

Description

  • Update dependency lock file (uv.lock)
  • Add Python 3.12 support to .tool-versions
  • Update pre-commit to use Python 3.12
  • Add new Makefile targets for container management
  • Fix Railway deployment command in nixpacks.toml
  • Add 'thirdparty' to codespell ignore list

This foundational update prepares for guild settings feature development while maintaining backward compatibility.

Close Issue(s)

Summary by Sourcery

Update dependencies, add Python 3.12 support, introduce Makefile targets for container management, fix deployment configuration, and extend codespell ignores

New Features:

  • Add Makefile targets to start, stop, migrate, and refresh the Byte database container

Enhancements:

  • Add Python 3.12 to .tool-versions and bump pre-commit to use Python 3.12
  • Extend codespell ignore list with “thirdparty”

Build:

  • Refresh dependency lock file (uv.lock)

Deployment:

  • Correct the Railway start command in nixpacks.toml

- Update dependency lock file (uv.lock)
- Add Python 3.12 support to .tool-versions
- Update pre-commit to use Python 3.12
- Add new Makefile targets for container management
- Fix Railway deployment command in nixpacks.toml
- Add 'thirdparty' to codespell ignore list

This foundational update prepares for guild settings feature development
while maintaining backward compatibility.
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 13, 2025

Reviewer's Guide

This PR updates project dependencies and build infrastructure by adding Python 3.12 support, refreshing the lock file, introducing Docker-based Makefile targets, correcting the nixpacks startup command, and extending the codespell ignore list.

File-Level Changes

Change Details Files
Enable Python 3.12 across tooling
  • Add Python 3.12 entry to .tool-versions
  • Switch default_language_version in pre-commit to Python 3.12
.tool-versions
.pre-commit-config.yaml
Refresh dependency lock file
  • Regenerate uv.lock to incorporate updated dependencies
uv.lock
Add Docker container management targets
  • Introduce up-container, clean-container, load-container, and refresh-container targets
  • Hook migrations into load-container
Makefile
Fix application startup command
  • Correct uv invocation syntax in nixpacks.toml start command
nixpacks.toml
Extend codespell ignore list
  • Add 'thirdparty' to ignore-words-list
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. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the 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 exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard 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

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @JacobCoffee - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `Makefile:68` </location>
<code_context>
+	@docker compose -f docker-compose.infra.yml up -d
+	@echo "=> Started Byte database container"
+
+clean-container: ## Stop, remove, and wipe the Byte database container and volume
+	@echo "=> Stopping and removing Byte database container"
+	@docker stop byte-db-1
</code_context>

<issue_to_address>
Use `docker compose down -v` to clean up container and volume in one step

Switch to `docker compose -f docker-compose.infra.yml down -v --remove-orphans` for a more comprehensive and efficient cleanup of containers, volumes, networks, and orphans.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
clean-container: ## Stop, remove, and wipe the Byte database container and volume
	@echo "=> Stopping and removing Byte database container"
	@docker stop byte-db-1
	@docker rm byte-db-1
	@docker volume rm byte_db-data
	@echo "=> Stopped and removed Byte database container"
=======
clean-container: ## Stop, remove, and wipe the Byte database container, volume, network, and orphans
	@echo "=> Stopping and removing Byte database container, volumes, networks, and orphans"
	@docker compose -f docker-compose.infra.yml down -v --remove-orphans
	@echo "=> Stopped and removed Byte database container, volumes, networks, and orphans"
>>>>>>> REPLACE

</suggested_fix>

### Comment 2
<location> `Makefile:63` </location>
<code_context>
 	@$(MAKE) install-frontend
 	@echo "=> Install complete! Note: If you want to re-install re-run 'make install'"

+up-container: ## Start the Byte database container
+	@echo "=> Starting Byte database container"
+	@docker compose -f docker-compose.infra.yml up -d
</code_context>

<issue_to_address>
Parameterize container and volume names for easier maintenance

Defining variables for these names at the top of the Makefile will help prevent inconsistencies if they need to be updated.
</issue_to_address>

### Comment 3
<location> `Makefile:75` </location>
<code_context>
+	@docker volume rm byte_db-data
+	@echo "=> Stopped and removed Byte database container"
+
+load-container: migrate ## Perform database migrations and load test data into the Byte database container
+	@echo "=> Loading database migrations and test data"
+	@$(UV) run app database upgrade --no-prompt
</code_context>

<issue_to_address>
Add `up-container` as a dependency of `load-container`

This ensures the database container is running before migrations are applied, preventing errors if someone runs `make load-container` directly.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
load-container: migrate ## Perform database migrations and load test data into the Byte database container
=======
load-container: up-container migrate ## Perform database migrations and load test data into the Byte database container
>>>>>>> REPLACE

</suggested_fix>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

JacobCoffee and others added 9 commits June 13, 2025 10:40
@JacobCoffee JacobCoffee merged commit e6d2e95 into main Jun 13, 2025
4 checks passed
@JacobCoffee JacobCoffee deleted the feat/foundation-and-deps branch June 13, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants