Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Handling extras

See original GitHub issue


Would it please be possible to handle extras (like in pip install pettingzoo[atari]) when generating the recipe?

Ideally, doing grayskull pypi pettingzoo[atari] would fetch the extras and add them to the recipe.



Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

zzhengnancommented, Oct 9, 2021

Apologies for the delay. I finally got some time to study the code today and want to jot down some notes in case someone else wants to look into this issue, since my bandwidth will be fairly limited through the end of the year.

As it stands today, the code is already capturing information about extra dependencies. To see this, we can place a breakpoint right after the following section and inspect pypi_metadata, sdist_metadata, and metadata.

Using dask as an example (link to required dependencies, link to extra dependencies), I noticed the following

PyPI metadata contains info about extra dependencies as well as their categories
(Pdb) pypi_metadata['requires_dist']
['cloudpickle (>=1.1.1)',
 'fsspec (>=0.6.0)',
 'packaging (>=20.0)',
 'partd (>=0.3.10)',
 'toolz (>=0.8.2)',
 "numpy (>=1.18) ; extra == 'array'",
 "bokeh (!=2.0.0,>=1.0.0) ; extra == 'complete'",
 "distributed (==2021.09.1) ; extra == 'complete'",
 "jinja2 ; extra == 'complete'",
 "numpy (>=1.18) ; extra == 'complete'",
 "pandas (>=1.0) ; extra == 'complete'",
 "numpy (>=1.18) ; extra == 'dataframe'",
 "pandas (>=1.0) ; extra == 'dataframe'",
 "bokeh (!=2.0.0,>=1.0.0) ; extra == 'diagnostics'",
 "jinja2 ; extra == 'diagnostics'",
 "distributed (==2021.09.1) ; extra == 'distributed'",
 "pytest ; extra == 'test'",
 "pytest-rerunfailures ; extra == 'test'",
 "pytest-xdist ; extra == 'test'"]
sdist metadata contains info about just the categories
(Pdb) sdist_metadata['extras_require']
After merging the two, the only info that's preserved is the categories
(Pdb) metadata['extras_require']

In order to build the feature described in this issue, we need to achieve at least the following, possibly more

  • Augment the command line interface so that specifications like grayskull pypi pettingzoo[atari] can be properly parsed
  • Take the extra dependencies info from the PyPI metadata, group them by their category and find a way to preserve that information after the the two sets of metadata (i.e., PyPI and sdist) have been merged
woutdenolfcommented, Jun 18, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Handling in Machine Learning | Analytics Vidhya
Feature Handling in Machine Learning ... Also, extra features make a model complex, time-consuming, and harder to implement in production.
Read more >
Help packaging optional application features, using extras?
The functionality of handling extras was tied to setuptools' model of managing 'egg' packages, but newer tools such as pip and virtualenv ...
Read more >
Handling of extras and deleted scenes in 'Series' - Emby
I make a big effort to store all 'Extra' material with each of my rips. Even though I create a 'deleted scenes' and...
Read more >
How To Make a Living as an Extra in Movies or TV | Backstage
Wondering how much extras get paid? Here's everything you need to know about how to become an extra—including how much background actors ...
Read more >
How to add extras / special features to Movies and TV : r/PleX
In the same folder as your movie itself, add the extras and append one of the following keywords to the title of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found