INP-PM / FEDM

Finite Element Discharge Modelling code
https://inp-pm.github.io/FEDM/
GNU Lesser General Public License v3.0
10 stars 4 forks source link

Added package install pieces using Setuptools #5

Closed LiamPattinson closed 2 years ago

LiamPattinson commented 2 years ago

It's now possible to pip install the project, and refer to modules via:

from fedm.functions import *
# etc...

You still have to sit in the right directories, as FEDM expects to find the directory $(pwd)/file_input, but it should be possible to fix that in a later update.

I renamed the fedm_modules directory to simply fedm to simplify the package discovery (packages = find: in setup.cfg). I know there's a way to manually add directories and assign different package names to them, but it'll take some experimentation for me to get it right, and it will require maintenance if we ever add new directories in the project. Let me know if you'd like me to revert the rename and update setup.cfg accordingly.

I also cleaned up some unused import statements, and reformatted physical_constants.py using the black auto-formatter.

Let me know if there's anything you would like explained in greater detail.