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

biogeme: deprecate as of oct 2018 #54717

Closed
wants to merge 4 commits into from

Conversation

Amar1729
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>)?

According to biogeme's homepage, the command-line pythonbiogeme has been deprecated since late 2018. The new project, PandasBiogeme, is purely a pip package and is hosted on PyPI (release history).

From the homepage:

PythonBiogeme
    Around 2010, a more flexible version was designed for general purpose parametric models. 
    The modeling language was extended, and based on the Python language.
    A series of discrete choice models were precoded for an easy use.
    Also written in GNU C++, it is distributed on the homebrew package manager.
    The distributions can be found here. 

PandasBiogeme
    In 2018, a completely new version of the software was released.
    It was not anymore a standalone executable, but a Python package.
    The package is written in Python, with the exception of the core calculations of the models, that are written in C++ for the sake of efficiency.
    The motivation was to combine the simplicity of the usage (especially for teaching purposes), with the sophistication provided by Python (for research and applications purposes).
    Morever, the management of the data relies on the package Pandas, which has become the workhorse of data scientists.
    Therefore, the name PandasBiogeme has been adopted.
    It is distributed on the Python Package Index repository.

Tagging @michelbierlaire - user account that first introduced biogeme package. Is it ok to deprecate this from homebrew? Are most user-installs now focused on the PyPI-distributed PandasBiogeme rather than the command-line tool, or is PythonBiogeme still being used?

https://formulae.brew.sh/formula/biogeme#default

This is one of the formulae remaining before the python3.8 switch - #47274

@SMillerDev
Copy link
Member

I'd say we should switch to the pypy package then.

@michelbierlaire
Copy link
Contributor

michelbierlaire commented May 15, 2020 via email

@Amar1729
Copy link
Contributor Author

@SMillerDev should this formula switch to the PyPI version, or should it be introduced as a new formula?

@iMichka iMichka mentioned this pull request May 15, 2020
@bayandin
Copy link
Member

@SMillerDev should this formula switch to the PyPI version, or should it be introduced as a new formula?

Switch it to pypi version, please

@Amar1729
Copy link
Contributor Author

I'm having a bit of trouble converting this to the python, mostly because i can't quite seem to get the pandas dependency building properly with cython inside homebrew. Let's see how this works...

@michelbierlaire
Copy link
Contributor

michelbierlaire commented May 23, 2020 via email

@Amar1729
Copy link
Contributor Author

@michelbierlaire thanks for the offer - really I'm just not used to writing python packages as Homebrew formulae. If you're more comfortable with it feel free to update this formula otherwise I'll take another look at it when I can.

@michelbierlaire
Copy link
Contributor

@Amar1729 Well, no, I am not sufficiently familiar with Homebrew. I had in mind that, if you need any specific information about the package itself, let me know.

@Rylan12
Copy link
Member

Rylan12 commented May 29, 2020

Is it worth having biogeme available from Homebrew if it's available through pip?

According to the Python for Formula Authors documentation page:

Homebrew generally won’t accept libraries that can be installed correctly with pip install foo.

As a user, I'm not sure that I see a benefit to having a pip package available through Homebrew. It seems that using pip install biogeme is a better option.

That being said, I'm not a maintainer nor do I use biogeme so take my opinion with a grain of salt.

@Amar1729
Copy link
Contributor Author

@Rylan12 i agree, I'm not sure it's worth it to have biogeme provided by homebrew.

@Rylan12
Copy link
Member

Rylan12 commented May 29, 2020

@SMillerDev Is it worth continuing to work on this or should it just be removed?

Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

Assuming this is still wanted, this should solve the problems.

The test should also be updated because the current one uses the old binary. Something like this might work:

  test do
    xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3"
    ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages"
    system Formula["python@3.8"].opt_bin/"python3", "-c", "import biogeme"
  end

Comment on lines +45 to +47
%w[numpy scipy].each do |d|
ENV.prepend "PYTHONPATH", Formula[d].opt_lib/"python#{xy}/site-packages"
end
Copy link
Member

Choose a reason for hiding this comment

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

Removing these lines did the trick for me

Suggested change
%w[numpy scipy].each do |d|
ENV.prepend "PYTHONPATH", Formula[d].opt_lib/"python#{xy}/site-packages"
end

@michelbierlaire
Copy link
Contributor

michelbierlaire commented May 30, 2020 via email

iMichka added a commit to iMichka/homebrew-core that referenced this pull request Jun 2, 2020
This was previously a c++ tool, but is now written in pure Python and
shipped through pypi.

As discussed in Homebrew#54717,
upstream is fine to remove this formula from homebrew.

This is the last formula blocking the python 3.8 migration.
@iMichka
Copy link
Member

iMichka commented Jun 2, 2020

As upstream is fine with deletion; and it is shipped on pypi, and this is now a pure Python package, and this is the last blocker for the Python 3.8 migration, let's delete this in #55702.

@iMichka iMichka closed this Jun 2, 2020
BrewTestBot pushed a commit that referenced this pull request Jun 2, 2020
This was previously a c++ tool, but is now written in pure Python and
shipped through pypi.

As discussed in #54717,
upstream is fine to remove this formula from homebrew.

This is the last formula blocking the python 3.8 migration.

Closes #55702.

Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
@Amar1729 Amar1729 deleted the python3/biogeme branch June 3, 2020 04:27
@Moisan Moisan mentioned this pull request Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants