flaport / fdtd

A 3D electromagnetic FDTD simulator written in Python with optional GPU support
https://fdtd.readthedocs.io
MIT License
455 stars 116 forks source link

Update pip install #18

Closed iakovts closed 3 years ago

iakovts commented 3 years ago

Hey @flaport, I was looking for a python fdtd library for a term project I am working on, and stumbled upon yours, great work! :) (plus hopefully it will save me from having to use Matlab - haven't even started doing the project yet).

So, I 've made some changes to make the package install using just pip install fdtd (or pip install fdtd[dev] for dev requirements and, well, a dev install).

To do this I removed any non-setup related imports from the setup.py file, as importing the module itself creates the prerequisite of having the package's dependencies already installed. As for a possible future task, I'd recommend looking into setup.cfg files and possibly a file structure which would have just the package's information in the top level __init__.py (i.e. __author__, __name__ etc).

Finally, for versioning I 've used bump2version in the past, and it actually works great.

Anyway, all of the above can probably be discussed in the Issues and not here.

Any feedback on the changes this PR brings are welcome :)

flaport commented 3 years ago

hey iakovts - thanks for your contribution! This looks indeed cleaner. I've also been thinking of switching to bump2version for a while but haven't gotten around doing it. I guess today is a good day to get started with it 😉