Open lheagy opened 2 years ago
Some of this has been resolved with removing properties (in #31), but we are still requiring utm
for example, which isn't necessary for most geoana code
You could reduce the core dependencies to scipy
only, as numpy
is a dependency of scipy
anyway and handled that way.
I have reduced it down to just numpy
, scipy
, and libdlf
(which itself only depends on numpy
).
If utm
is removed, I think this will start to work in JupyterLite:
This would open up all sorts of possibilities for adding interactive widgets to static websites!
Well, that's great! Also, I was having some very odd build-matrix errors due to numba
on the conda-forge side trying to release 0.4.1 on https://github.com/conda-forge/geoana-feedstock/pull/21
I think that it should now work on pyodide, but it needs a built bundle: https://packaging.python.org/en/latest/tutorials/packaging-projects/#generating-distribution-archives
This is the pyodide docs: https://pyodide.org/en/stable/usage/faq.html#why-can-t-micropip-find-a-pure-python-wheel-for-a-package
Do you know how to do this @jcapriot?
For example this repo has:
geoana only has the source:
We could provide an py3
any-wheel. (There are external libraries in geoana, but I've been sure to have fall-back python only versions of them as well).
I think that if we get that up there we can do things like this really easily! This still requires a server, but would love to be able to bypass that and get it up and running in jupyter lite!
There are a few examples of doing that here.
Yep, tested locally and all we need is the geoana-0.5.0-py3-none-any.whl
which is the result of python3 -m build
in the repository as is and then getting that up to pypi. When that is done, it will work in JupyerLite/pyodide, and allows for all sorts of cool things. I will put an example together.
Works if we add that to the build!
https://github.com/simpeg/geoana/assets/913249/73fe671f-54be-47f6-b715-ba1c4a9dd28e
Source: https://rowanc1.github.io/geoana-docs/
Right now I am just hosting the built file on curvenote, but hopefully we can get it on pypi!
I think much like the discussion we had at the April 6 SimPEG meeting about keeping the core set of dependencies of SimPEG quite lightweight, it would be good to do that for
geoana
as well.Currently, the requirements are:
31 will remove the
properties
andvectormath
dependencies.I propose that the core set of dependencies be limited to
numpy
scipy
and that
utm
,empymod
,matplotlib
are all soft dependencies, much like we have done indiscretize
.