PrincetonUniversity / SPEC

The Stepped-Pressure Equilibrium Code, an advanced MRxMHD equilibrium solver.
https://princetonuniversity.github.io/SPEC/
GNU General Public License v3.0
25 stars 6 forks source link

Pythontools #95

Closed smiet closed 4 years ago

smiet commented 4 years ago

Working on expanding the python utilities, managing the different files, and integrating the CoilPy functionality by @zhucaoxiang into SPEC.

zhucaoxiang commented 4 years ago

@smiet I have some updates for the surface.py in my CoilPy repo. I haven't grabbed the changes into SPEC. Actually, I am not quite sure if it is a good idea to keep a separate copy in SPEC. Maybe a better idea is to re-direct it?

smiet commented 4 years ago

@zhucaoxiang That is an interesting point! The way it currently is implemented leads to a bit of code duplication, and that is sub-optimal. On the other hand, methods in CoilPy are used for the regression testing, thus we don't want that a change in CoilPy would break our tests.

One thing that I can see working is to include CoilPy as a submodule inside of SPEC. The py_spec module will then import the required CoilPy functions, possibly even wrap them so they are pre-filled for SPEC. We can do an import to a specific version (hash) of CoilPy, such that updates to it won't be applied in the SPEC version until manual intervention.

smiet commented 4 years ago

Forcing the merge, as CI is working on this branch and needs to be implemented in master. Only python and ci files are changed.