NOAA-ORR-ERD / adios_oil_database

System for managing petroleum, product data for use in oil spill response
https://adios.orr.noaa.gov
5 stars 1 forks source link

Distribution of adios_db package #3

Closed gauteh closed 2 years ago

gauteh commented 2 years ago

Hi,

what are your plans for distributing the adios_db package? For opendrift it seems like everything we need is in that package, and it would be a pity to duplicate that code in opendrift. On the other hand: what we need would probably not require any dependencies (except maybe numpy and the ones we need already). Are you planning to separate this as a package for consuming or making computations based on the JSON from the API?

Best regards, Gaute

ChrisBarker-NOAA commented 2 years ago

We haven't made a final decision yet, but as it stands, while this repository contains the core code and code for the Web interface ,the Python packages themselves are separate.

If you install just the adios_db package, you will get, as you say, code " for consuming or making computations based on the JSON ".

And it has very few non-optional dependencies (I think just numpy, and maybe scipy, but that's temporary).

Note that mongodb is completely optional -- if you don't use it, you don't need it, and the tests will only try to use it if you pass the --mongo flag.

You can clone the repo and install, or even do a pip install directly from the gitHub repo.

All that being said: The plan is to clean up an refactor the code a bit, and then make a 1.0 release and make conda (and maybe PyPi) packages for it.

NOTE: if you see a real advantage to putting the adios_db package in its own repository, let us know, that may be an option.

gauteh commented 2 years ago

That sounds good. As long as the python adios_db package is available we are happy. With the move to the new oil library dependencies for opendrift will get significantly simpler, and I hope that we will be able to provide pypi and pypy packages (probably through pyproject + poetry). The last bit that is stopping that is probably pynucos, which seems to only have packages distributed on conda.

For now I have duplicated some of the adios_db code in opendrift https://github.com/OpenDrift/opendrift/pull/685 and we have all our tests passing.

I have some other questions that have come up, but I'll put them in separate issues.