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

Handling package dependencies required by LGDO.view_as() #48

Open
gipert opened this issue Dec 30, 2023 · 2 comments
Open

Handling package dependencies required by LGDO.view_as() #48

gipert opened this issue Dec 30, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@gipert
Copy link
Member

gipert commented Dec 30, 2023

We should make all packages required by view_as() optional, so we need some way to emit an error if you try to view data with an uninstalled package.

This could especially help with making this extensible if people want to plug it into more niche data classes. An interesting example is that we could plug this into ROOT's RDataFrame via this class: https://root.cern.ch/doc/master/classROOT_1_1Internal_1_1RDF_1_1RNumpyDS.html, and I don't think we want ROOT as a hard requirement.

This will also improve the package import time.

@gipert gipert added enhancement New feature or request good first issue Good for newcomers labels Dec 30, 2023
@MoritzNeuberger
Copy link
Contributor

How do you think this should be implemented? Should we add an additional option to [options.extras_require] called view_as, which contains the dependencies of awkward, pandas, etc.? I wonder because functions other than view_as also use these packages. Should this extra requirement be explicit for additional external formats like RDataFrame?

@gipert
Copy link
Member Author

gipert commented Jan 18, 2024

I would go through the code base and check which of these third-party libraries are actually used elsewhere. We could then group those that are only used in view_as() in a group called extras or something:

pip install legend-pydataobj[extras]

CC @iguinn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants