Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitsome 0.8.0 (new formula) #46136

Closed
wants to merge 1 commit into from
Closed

Conversation

smorimoto
Copy link
Contributor

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

@smorimoto
Copy link
Contributor Author

For reasons similar to dvc, we use this installation method because some features doesn't work with the common installation method of brew.

@smorimoto
Copy link
Contributor Author

The actual error was posted here. donnemartin/gitsome#136

@smorimoto
Copy link
Contributor Author

I will add code to install Pillow to support image-related features.

@smorimoto smorimoto force-pushed the gitsome branch 2 times, most recently from 25a10b7 to 51a20cb Compare November 2, 2019 18:13
@fxcoudert fxcoudert added the new formula PR adds a new formula to Homebrew/homebrew-core label Nov 3, 2019

def install
venv = virtualenv_create(libexec, "python3")
system libexec/"bin/pip", "install", ".[all]"
Copy link
Member

Choose a reason for hiding this comment

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

We really want to have dependencies listed as resources, and install them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have same opinion with that, and I tried. But an error like the one I posted to issue of gitsome will occur.

Copy link
Member

Choose a reason for hiding this comment

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

pkg_resources.DistributionNotFound: The 'uritemplate.py<4.0.0,>=1.0.0' distribution was not found and is required by gitsome

This means you need to include the right version of uritemplate as a resource. Look at https://github.com/tdsmith/homebrew-pypi-poet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm...

resource "uritemplate" do
  url "https://files.pythonhosted.org/packages/cd/db/f7b98cdc3f81513fb25d3cbe2501d621882ee81150b745cdd1363278c10a/uritemplate-3.0.0.tar.gz"
  sha256 "c02643cebe23fc8adb5e6becffe201185bf06c40bda5c0b4028a93f1527d011d"
end

resource "uritemplate.py" do
  url "https://files.pythonhosted.org/packages/12/97/e12695c7d7710143767022ce931061b4a6b5b19982b20ecf5d71cdde3da1/uritemplate.py-3.0.2.tar.gz"
  sha256 "e0cdeb0f55ec18e1580974e8017cd188549aacc2aba664ae756adb390b9d45b4"
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Have you figured out why uritemplate.py is not actually found?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found a similar issue, but I don't know if it's related.
SFDO-Tooling/CumulusCI#883

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have identified the cause, probably I need to change the gitsome code a little. The difficulty is low, but if @donnemartin doesn't have much time, I and my friend can fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@donnemartin What do you think?

end

test do
system "#{bin}/gitsome", "--version"
Copy link
Member

Choose a reason for hiding this comment

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

We need a test that exercises the some of the functionality of the app. Version checks or usage checks (foo --version or foo --help) are not sufficient, as explained in the formula cookbook.

In most cases, a good test would involve running a simple test case: run #{bin}/foo input.txt.

  • Then you can check that the output is as expected (with assert_equal or assert_match on the output of shell_output)
  • You can also check that an output file was created, if that is expected: assert_predicate testpath/"output.txt", :exist?

Some advice for specific cases:

  • If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
  • If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
  • If the software cannot function without credentials, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected.
  • Same if the software requires a virtual machine, docker instance, etc. to be running.

@Bo98
Copy link
Member

Bo98 commented Nov 23, 2019

Let us know when you've addressed the concerns above.

For now, we're currently building Python 3.8 (see #45337), which involves revision bumping almost all Python formulae, so we're going to wait on this until that's finished to avoid broken formulae. I'll let you know when we're ready.

@Bo98 Bo98 added do not merge python Python use is a significant feature of the PR or issue labels Nov 23, 2019
@smorimoto
Copy link
Contributor Author

I see. This is an upstream issue, so I will wait for the author's reply.

@fxcoudert
Copy link
Member

Closing for now, due to lack of progress.

@fxcoudert fxcoudert closed this Dec 24, 2019
@lock lock bot added the outdated PR was locked due to age label Jan 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new formula PR adds a new formula to Homebrew/homebrew-core outdated PR was locked due to age 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