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

Add recipe for mrmr-selection #26357

Merged
merged 14 commits into from
May 16, 2024
Merged

Add recipe for mrmr-selection #26357

merged 14 commits into from
May 16, 2024

Conversation

svengiegerich
Copy link
Contributor

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@svengiegerich svengiegerich marked this pull request as ready for review May 14, 2024 20:17
@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/mrmr) and found some lint.

Here's what I've got...

For recipes/mrmr:

  • The recipe license should not include the word "License".
  • requirements: run: pandas>=1.0.3 must contain a space between the name and the pin, i.e. pandas >=1.0.3
  • requirements: run: numpy>=1.18.1 must contain a space between the name and the pin, i.e. numpy >=1.18.1
  • noarch: python recipes are required to have a lower bound on the python version. Typically this means putting python >=3.6 in both host and run but you should check upstream for the package's Python compatibility.

For recipes/mrmr:

  • License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/mrmr-selection) and found it was in an excellent condition.

@svengiegerich
Copy link
Contributor Author

A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).

Unfortunatley currently only the wheel is available on pypi. I've filed an issue upstream, see smazzanti/mrmr#45.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/mrmr_selection) and found it was in an excellent condition.

@svengiegerich
Copy link
Contributor Author

@conda-forge/help-python, ready for review!

Copy link
Member

@ocefpaf ocefpaf left a comment

Choose a reason for hiding this comment

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

How I would use it exactly? Do you mean mentioning it as a comment, or smth else?

@svengiegerich something like this should work.

recipes/mrmr_selection/meta.yaml Outdated Show resolved Hide resolved
recipes/mrmr_selection/meta.yaml Show resolved Hide resolved
build:
number: 0
noarch: python
script: {{ PYTHON }} -m pip install {{ name }}-{{ version }}-py3-none-any.whl -vv --no-deps
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
script: {{ PYTHON }} -m pip install {{ name }}-{{ version }}-py3-none-any.whl -vv --no-deps
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ocefpaf I run into the following error,

Created temporary directory: /tmp/pip-ephem-wheel-cache-bm6ytv1h
Processing $SRC_DIR
  Added file://$SRC_DIR to build tracker '/tmp/pip-build-tracker-7ghuechq'
  Running setup.py (path:$SRC_DIR/setup.py) egg_info for package from file://$SRC_DIR
  Created temporary directory: /tmp/pip-pip-egg-info-3zl4y3vm
  Preparing metadata (setup.py): started
  Running command python setup.py egg_info
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/home/conda/staged-recipes/build_artifacts/mrmr_selection_1715807740702/work/setup.py", line 2, in <module>
      from mrmr import __version__
    File "/home/conda/staged-recipes/build_artifacts/mrmr_selection_1715807740702/work/mrmr/__init__.py", line 1, in <module>
      from . import bigquery
    File "/home/conda/staged-recipes/build_artifacts/mrmr_selection_1715807740702/work/mrmr/bigquery.py", line 1, in <module>
      import jinja2
  ModuleNotFoundError: No module named 'jinja2'
  error: subprocess-exited-with-error

do you know what I need to adjust? 'jinja2' is already listed in the requires.

Copy link
Member

Choose a reason for hiding this comment

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

do you know what I need to adjust? 'jinja2' is already listed in the requires.

Yes, you need all the dependencies listed here: https://github.com/smazzanti/mrmr/blob/dc8a810bc9d01b6fe20e8767de0098d4671b50b6/setup.py#L19-L26

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but that's what I did. Compare, the recipe,

    - python >=3.7
    - category_encoders
    - jinja2
    - tqdm
    - joblib
    - pandas >=1.0.3
    - numpy >=1.18.1
    - scikit-learn
    - scipy
    - polars >=0.12.5

vs `setup.p ,

    install_requires=[
        'category_encoders',
        'jinja2',
        'tqdm',
        'joblib',
        'pandas>=1.0.3',
        'numpy>=1.18.1',
        'scikit-learn',
        'scipy',
    ],

Copy link
Member

Choose a reason for hiding this comment

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

Give me a sec to check it locally...

Copy link
Member

Choose a reason for hiding this comment

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

OK. It looks like the project imports itself at build time and need to be importable before being built. That is an old practice but buggy. If you can, please open an issue upstream. Our workaround is to specify all the run dependencies at build time too. I did that here for you. Let's see if that works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. It looks like the project imports itself at build time and need to be importable before being built. That is an old practice but buggy. If you can, please open an issue upstream.

Ah, I see! Thanks, I definitely will.

I did that here for you. Let's see if that works.

Worked 🙌 Thanks here!

Co-authored-by: Filipe <ocefpaf@gmail.com>
@ocefpaf ocefpaf merged commit dbd8cc5 into conda-forge:main May 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants