MindTheGap-ERC / CarboKitten.jl

Julia implementation of carbonate platform model
https://mindthegap-erc.github.io/CarboKitten.jl/
GNU General Public License v3.0
1 stars 0 forks source link

Remove exporting visualisation so that CarboKitten loads up faster #17

Closed EmiliaJarochowska closed 6 months ago

EmiliaJarochowska commented 9 months ago

Currently importing CarboKitten loads up plotting dependencies, which takes long, especially the first time. Skip exporting plotting as default so it can be imported when user intentionally wants to plot.

jhidding commented 8 months ago

Created a separate workenv where all the big dependencies for interactive use go. Now CarboKitten itself only depends on HDF5 and Transducers. Still need to update documentation and Makefile though.

One snatch: if you work in a different branch, you need to tell workenv that you want to use that branch of CarboKitten.

Anyway: just running CarboKitten itself (and generating the HDF5 files) should be much snappier now. Another way to make things a bit better is to create an executable image including some of the heftier plotting dependencies (see: https://docs.julialang.org/en/v1/devdocs/sysimg/).

EmiliaJarochowska commented 6 months ago

Not sure if this is a good solution, please see https://github.com/MindTheGap-ERC/CarboKitten.jl/issues/28#issuecomment-2014836821 Anyways it would be helpful to have the instructions completed so we know how you intend it to be run.

HannoSpreeuw commented 6 months ago

One snatch: if you work in a different branch, you need to tell workenv that you want to use that branch of CarboKitten.

I would vote against adding this complexity. This project has a substantial abstraction level already, so hard enough, especially for first time users.

jhidding commented 6 months ago

I have added CairoMakie under [weakdeps] and made the CarboKitten.Visualization submodule such that it only produces figures when CairoMakie is imported, otherwise it'll print a friendly message.