thliebig / openEMS

openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
http://openEMS.de
GNU General Public License v3.0
413 stars 146 forks source link

Fix for #127 #132

Closed oberstet closed 8 months ago

oberstet commented 8 months ago

tested on cpython 3.12.1 and cython 3.0.6:

(cpy312_1) oberstet@intel-nuci7:~/scm/3rdparty/openEMS/python$ python -V
Python 3.12.1
(cpy312_1) oberstet@intel-nuci7:~/scm/3rdparty/openEMS/python$ pip show cython
Name: Cython
Version: 3.0.6
Summary: The Cython compiler for writing C extensions in the Python language.
Home-page: https://cython.org/
Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.
Author-email: cython-devel@python.org
License: Apache-2.0
Location: /home/oberstet/cpy312_1/lib/python3.12/site-packages
Requires: 
Required-by: 
(cpy312_1) oberstet@intel-nuci7:~/scm/3rdparty/openEMS/python$ pip show openems
Name: openEMS
Version: 0.0.33
Summary: Python interface for the openEMS FDTD library
Home-page: https://openEMS.de
Author: Thorsten Liebig
Author-email: Thorsten.Liebig@gmx.de
License: 
Location: /home/oberstet/cpy312_1/lib/python3.12/site-packages
Requires: 
Required-by: 
(cpy312_1) oberstet@intel-nuci7:~/scm/3rdparty/openEMS/python$ CFLAGS="-I${OPENEMS_HOME}/include -L${OPENEMS_HOME}/lib" pip install .
Processing /home/oberstet/scm/3rdparty/openEMS/python
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: openEMS
  Building wheel for openEMS (setup.py) ... done
  Created wheel for openEMS: filename=openEMS-0.0.36-cp312-cp312-linux_x86_64.whl size=795419 sha256=6229d0ed4916fbea22b978f11e0115f5bc43457981c9d46b90059723098b98e9
  Stored in directory: /tmp/pip-ephem-wheel-cache-s9n50e3d/wheels/b0/44/73/3d0e530bb71244e26e4b036df3478e4bcfd7974b65a2ccc4b3
Successfully built openEMS
Installing collected packages: openEMS
  Attempting uninstall: openEMS
    Found existing installation: openEMS 0.0.33
    Uninstalling openEMS-0.0.33:
      Successfully uninstalled openEMS-0.0.33
Successfully installed openEMS-0.0.36
(cpy312_1) oberstet@intel-nuci7:~/scm/3rdparty/openEMS/python$ pip show openems
Name: openEMS
Version: 0.0.36
Summary: Python interface for the openEMS FDTD library
Home-page: https://openEMS.de
Author: Thorsten Liebig
Author-email: Thorsten.Liebig@gmx.de
License: 
Location: /home/oberstet/cpy312_1/lib/python3.12/site-packages
Requires: 
Required-by: 
thliebig commented 8 months ago

Is this PR complete and ready to review? Should I merge this maybe squashed as this are many commits for not that a big changes?

oberstet commented 8 months ago

yes, it's ready for review / merge - I have tested this and I am running this now for my ongoing work. but only on latest CPython / Cython, not any older/other versions.

rgd squashing and such: sure! I wasn't sure about test and merge policies of this project. I am fine with any commonly used policies, such as "every commit preserved", "squashed all commits" and "squashed and rebased to master always required" ..

sidenote: would there be interest in principle for a) adding test automation to the repo (via GH actions), and b) release a proper Python package (or multiple) on PyPI? the lack of the latter is a bit of a annoyance as I always automate my own packages, but this depends on the former. btw: actually, test+build+publish automation (that is CI and CD) for PyPI and Docker images would be nice. if there is interest .. I could contribute .. I have a lot of experience with such stuff.

another note rgd PyPI: not having an official package on PyPI entails the (security) risk of name squatting. none there yet though https://pypi.org/search/?q=openems

thliebig commented 8 months ago

Well I do not really have any "merge policy" at this time. I just decide on what I feel is the best for the project. Your commits have proper messages and are not going crazy with adding/removing/adding back such in this case both normal merge and squash would be fine with me I guess.

Regarding the github actions/auto tests I would be all for it, but I do not think that it is too easy to do in this case? But maybe a few people have already something available. In any case it would be nice to have.... (maybe this should better be a separate Discussion thread?)

Having proper PyPI packages again would be very nice, but again because of all this cython/library/mix with CSXCAD not that easy?? (again worth a separate Discussion thread?)

oberstet commented 8 months ago

again worth a separate Discussion thread?

yes, agreed, definitely. only the openEMS-Project repo has discussion enabled, so I posted there https://github.com/thliebig/openEMS-Project/discussions/166