Open alimanfoo opened 1 week ago
Noting that the only use of anjl
appears to be malariagen_data/anoph/distance.py
, which has:
import anjl.params # type: ignore
as well as
def _njt(
[...]
):
# Only import anjl if needed, as it requires a couple of seconds to compile
# functions.
import anjl # type: ignore
One complication is that anjl.params
is being used for the params of plot_njt()
def plot_njt(
self,
[...]
center_x: anjl.params.center_x = 0,
center_y: anjl.params.center_y = 0,
arc_start: anjl.params.arc_start = 0,
arc_stop: anjl.params.arc_stop = 2 * math.pi,
[...]
edge_legend: anjl.params.edge_legend = False,
leaf_legend: anjl.params.leaf_legend = True,
[...]
) -> plotly_params.figure:
Another complication, encountered when trying to handle the use of anjl
in function params, is the requirement for parameters to be documented. 🤔
Importing
malariagen_data
is a little slow at the moment, likely becauseanjl
is imported internally which triggers jit compilation ofanjl
functions. Perhapse we could move to only importinganjl
when needed within the neighbour-joining functions.