Skip to content

Conversation

@anir0y
Copy link

@anir0y anir0y commented Jan 29, 2026

Adds Unified Courier tracker (TUI) formula.

Copilot AI review requested due to automatic review settings January 29, 2026 13:00
@github-actions github-actions bot added python Python use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core labels Jan 29, 2026
@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Jan 29, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new Homebrew formula for unified-courier-tracker, a Terminal User Interface (TUI) application for tracking packages from Blue Dart, DTDC, and Delhivery courier services.

Changes:

  • New formula file for unified-courier-tracker version 1.0.0
  • Manual installation approach using bash wrapper script
  • Basic test to verify the --help flag

end

test do
# --help should print usage and exit 0
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The test expects an exit code of 1 for the --help flag, which is unusual. Most CLI tools return exit code 0 for --help. Verify that this is the actual behavior of the application, or consider whether the exit code expectation should be 0 instead.

Copilot uses AI. Check for mistakes.
Comment on lines 8 to 14
depends_on "[email protected]"

def install
libexec.install "track_shipments.py"
(bin/"unified-courier-tracker").write <<~EOS
#!/bin/bash
exec "#{Formula["[email protected]"].opt_bin}/python3" "#{libexec}/track_shipments.py" ""
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The formula depends on [email protected], but most Python formulas in the codebase use [email protected]. Unless there's a specific compatibility reason (which should be documented in a comment), this should be updated to use [email protected] for consistency with the broader ecosystem.

Suggested change
depends_on "python@3.12"
def install
libexec.install "track_shipments.py"
(bin/"unified-courier-tracker").write <<~EOS
#!/bin/bash
exec "#{Formula["python@3.12"].opt_bin}/python3" "#{libexec}/track_shipments.py" ""
depends_on "python@3.14"
def install
libexec.install "track_shipments.py"
(bin/"unified-courier-tracker").write <<~EOS
#!/bin/bash
exec "#{Formula["python@3.14"].opt_bin}/python3" "#{libexec}/track_shipments.py" ""

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 17
def install
libexec.install "track_shipments.py"
(bin/"unified-courier-tracker").write <<~EOS
#!/bin/bash
exec "#{Formula["[email protected]"].opt_bin}/python3" "#{libexec}/track_shipments.py" ""
EOS
(bin/"unified-courier-tracker").chmod 0o755
end
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

This formula should include "Language::Python::Virtualenv" and use virtualenv_install_with_resources instead of manually creating a bash wrapper script. The current approach does not properly isolate dependencies and does not follow Homebrew conventions for Python applications. See examples like ranger.rb or percol.rb for the correct pattern.

Copilot uses AI. Check for mistakes.
libexec.install "track_shipments.py"
(bin/"unified-courier-tracker").write <<~EOS
#!/bin/bash
exec "#{Formula["[email protected]"].opt_bin}/python3" "#{libexec}/track_shipments.py" ""
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

The exec command has an empty string argument at the end (""). This appears to be unintentional and should be removed. The proper syntax should be: exec "#{Formula["[email protected]"].opt_bin}/python3" "#{libexec}/track_shipments.py" "$@" if you want to pass through command-line arguments, or simply remove the empty string if no arguments are needed.

Suggested change
exec "#{Formula["[email protected]"].opt_bin}/python3" "#{libexec}/track_shipments.py" ""
exec "#{Formula["[email protected]"].opt_bin}/python3" "#{libexec}/track_shipments.py" "$@"

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

Copy link
Member

@botantony botantony left a comment

Choose a reason for hiding this comment

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

Hello @anir0y. This looks like a nice piece of software, but it currently does not meet the notability requirements for inclusion into Homebrew-core: https://docs.brew.sh/Acceptable-Formulae#niche-or-self-submitted-stuff

For now you can create and maintain your own tap:

Once it becomes notable enough, we would love to see it in the Homebrew-core repository

sha256 "e7e590c455bb83e6aa36c4f53e7e742119916858af38d2ddfedad6faeff22e88"
license "MIT"

depends_on "[email protected]"
Copy link
Member

Choose a reason for hiding this comment

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

Why this Python version and not the latest?

#!/bin/bash
exec "#{Formula["[email protected]"].opt_bin}/python3" "#{libexec}/track_shipments.py" "$@"
EOS
(bin/"unified-courier-tracker").chmod 0o755
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(bin/"unified-courier-tracker").chmod 0o755


test do
# --help should print usage and exit 0
assert_match "usage", shell_output("#{bin}/unified-courier-tracker --help")
Copy link
Member

Choose a reason for hiding this comment

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

Homebrew requires a simple test that checks if a program can do basic stuff correctly. From Formula Cookbook:

We want tests that don’t require any user input and test the basic functionality of the application. For example foo build-foo input.foo is a good test and (despite their widespread use) foo --version and foo --help are bad tests. However, a bad test is better than no test at all.

@botantony botantony added the notability Project is not notable enough for inclusion label Jan 30, 2026
@bevanjkay
Copy link
Member

Closing this for now due to the notability requirements.

@bevanjkay bevanjkay closed this Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosquash Automatically squash pull request commits according to Homebrew style. new formula PR adds a new formula to Homebrew/homebrew-core notability Project is not notable enough for inclusion python Python use is a significant feature of the PR or issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants