cta-sst-1m / CTS

1 stars 3 forks source link

Python 2 ? #3

Closed dneise closed 6 years ago

dneise commented 6 years ago

I heared part of CTA needs Python 2. Could you remind me what part that was?

cocov commented 6 years ago

Just seeing this. If I remember well the opcua server need python2 because the can protocol library was written with python2. The server side and all the rest of the code can run with python 3. But this is just out of memory...

dneise commented 6 years ago

I do not understand this statement.

You say the "opcua server" needs Py2. By "opcua server" to you mean a machine or a process? Both are often called "server". If it is a process, could you provide a link to it?

Further you say the server side can run Py3 .. this sounds like a contradiction to the former statement, where the "server" needs Py2.

If nobody remembers if and what code in the SST1M universe needs Py2, I'd say we immediately drop Py2 support everywhere.

cocov commented 6 years ago

You say the "opcua server" needs Py2. By "opcua server" to you mean a machine or a process? Both are often called "server".

the machine itself rarely "needs" python2, and I guess is rarely a topic of discussion on github. But thanks for the lecture.

If it is a process, could you provide a link to it?

this is a process (https://github.com/cta-sst-1m/CTS/blob/master/cts_opcua/cts_opcua_server.py) running on a machine which is connected to electronic boards with LEDs placed in front of the PDP. CAN protocol is used to command the micro-controller which controls the LEDs voltage. It uses a library which implement this low level communication protocol, which is written in py2 (and lives in the SST1M svn, can't remember the name, check with Yves or Vitalii , I don't have CTA credentials anymore). I think the cts_opcua_server.py code itself is compatible with python3 if it had not to use this external library.

https://github.com/cta-sst-1m/CTS/blob/master/RunManager.py run the client and few other processes to control the experimental setup and the camera data-taking and run various protocols allowing to qualify and calibrate the camera in the lab when its built.

Further you say the server side can run Py3 .. this sounds like a contradiction to the former statement, where the "server" needs Py2.

indeed, my mistake I meant the client.

If nobody remembers if and what code in the SST1M universe needs Py2, I'd say we immediately drop Py2 support everywhere.

I was asked to transfer the ownership of this project to this place to make sure it remain accessible for people working on the camera,

The fact that after 28 days you only get 1 answer, from someone that left 6 month ago, doesn't mean that "nobody remembers", it just mean that you are using the wrong communication channel. I strongly suggest you to contact your collaborators before you "immediately drop Py2 support everywhere".

yrenier commented 6 years ago

I'm currently working on that part of the software, replacing the drivers for the CAN with a newer version which is compatible with python3 (but using a totally different API...). I expect to have finished the migration by the end of the week. If all goes well, CTS wont need python2 anymore after that.

yrenier commented 6 years ago

I could get rid of all the parts needing python2 in the opcua server. I ll push the changes next week. @dneise you can remove CTS from your list of parts depending on python2 :-)

yrenier commented 6 years ago

proposed merge #4 remove dependence on python2.