EconForge / interpolation.py

BSD 2-Clause "Simplified" License
123 stars 35 forks source link

Is the dependency on tempita necessary? #101

Closed jan-janssen closed 1 year ago

jan-janssen commented 1 year ago

I noticed that the package tempita is no longer developed. A clone of the code survived on https://github.com/agramfort/tempita while the original package is no longer available https://bitbucket.org/ianb/tempita . Is there any way to replace it with an alternative package?

albop commented 1 year ago

Of course it is feasible. Basically any templating engine with support for loops and basic python expressions would do. And speed is important as we are potentially generating very big expressions (when d>>1). I confess In don't know have strong views here. Do you have any suggestion or preference ?

albop commented 1 year ago

Nb :thé reason we do need a templating engine is because the source code of interpolating functions is basically generated at jit time (in splines.codegen I think)

ysBach commented 1 year ago

I am introduced to interpolation.py today while finding numba-implementation of interpolation. The installation couldn't be proceeded because of tempita. If it is really necessary, how about just copy the snapshot of it and include it inside this package? I am not sure about the license of tempita though..

ysBach commented 1 year ago

Oh it's MIT (https://github.com/agramfort/tempita/blob/master/setup.py, https://pypi.org/project/Tempita/).

jan-janssen commented 1 year ago

@ysBach From my experience the conda-forge package should be compatible to Python 3.9 https://anaconda.org/conda-forge/interpolation .

ysBach commented 1 year ago

@jan-janssen Unfortunately I am using py 3.10 😢 and I get the following errors:

>  mamba install -c conda-forge tempita

Looking for: ['tempita']

conda-forge/osx-arm64                                5.3MB @   2.9MB/s  2.0s
conda-forge/noarch                                  11.3MB @   1.9MB/s  6.1s

Pinned packages:
  - python 3.10.*

Could not solve for environment specs
Encountered problems while solving:
  - nothing provides requested tempita

The environment can't be solved, aborting the operation

(similar error from conda: https://anaconda.org/conda-forge/tempita/files)

albop commented 1 year ago

@jan-janssen and @ysBach, there is no external dependency on tempita anymore. It is now shipped as a submodule.