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

Dependencies for this package #7

Open
rabernat opened this issue Mar 12, 2024 · 5 comments
Open

Dependencies for this package #7

rabernat opened this issue Mar 12, 2024 · 5 comments

Comments

@rabernat
Copy link

Thanks for maintaining this cool package! I was referred here by @alexgleith.

I tried pip install odc-algo on a standard linux setup, and it started compliling a wheel for psycopg2. (This failed, unsurprisingly.)

I was expecting a lightweight, standalone collection of optimized algorithms. So it was surprising to see such heavy dependencies. Yes I could install from conda forge, but the point remains.

Would it be possible to make some dependencies optional? I think this would accelerate adoption of this package.

@alexgleith
Copy link

Hey @rabernat

The psycopg2 library is there for postgres, because odc-algo depends on datacube still.

There's been an effort to shift the datacube model from one big "eveything and the kitchen sink" library, to a suite of smaller libraries, including odc-stac and odc-geo, but there remains a few that are still tangled up in the old model, like this one.

I'm interested to know what @Kirill888's thoughts are, but I do think it would be nice to make this library lighter.

(We also have a couple of new Rust tools in here, which we need to be building so that it doesn't have a dependency on the Rust compiler too.)

@rabernat
Copy link
Author

(We also have a couple of new Rust tools in here, which we need to be building so that it doesn't have a dependency on the Rust compiler too.)

Here's an example of building Python wheels from rust code in CI: https://github.com/mwlon/pcodec/blob/main/.github/workflows/python_ci.yml

@Kirill888
Copy link
Member

There are parts that depend on datacube-core, but should depend on odc-geo instead as they import geometry classes from datacube-core (deprecated now). Then there are parts that are using Datacube.load or operate on datacube.Dataset objects, and those should be made into an optional dependency (can only work when datacube is installed).

@Kirill888
Copy link
Member

Also, before migrating any code we should asses if it should be instead removed altogether. For example things in _warp.py and other duplications of functionality now present in odc-geo.

@robbibt
Copy link
Contributor

robbibt commented Mar 13, 2024

(Ping @caitlinadams, relevant to the DE Tools discussion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants