-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port from Python 2.7 to Python 3 #2
Comments
This code base is in need of modernization. |
Hello! I am getting familiar with this application. I have successfully launched it locally with Docker using the following Dockerfile and entrypoint.sh.
#!/bin/bash
set -e
socat -d -d PTY,link=/tmp/ptyp0,raw,echo=0 PTY,link=/tmp/ttyp0,raw,echo=0 &
socat -d -d PTY,link=/tmp/ptyp1,raw,echo=0 PTY,link=/tmp/ttyp1,raw,echo=0 &
python2 working-sync-server.py /tmp/ttyp0 &
sudo chown pi:pi /tmp/ptyp0
sudo chown pi:pi /tmp/ptyp1
sudo chown -R pi:pi /home/pi
sleep 2
mkdir -p /var/log/uwsgi
/usr/local/bin/uwsgi --version
/usr/local/bin/uwsgi --ini /etc/uwsgi/apps-enabled/socketio_server.ini --pidfile /var/run/uwsgi/uwsgi-socketio.pid --daemonize /var/log/uwsgi/uwsgi-socketio.log
echo -e "YES\nt=100" > /tmp/water_in
echo -e "YES\nt=150" > /tmp/water_out
service uwsgi start
service nginx start
service chronos start
tail -f /dev/null
To approve a PR, the application would need to work without this installation in the Dockerfile, right? apt-get install python2.7 Apart from updating Raspbian to the newest version known as Raspberry Pi OS. https://www.raspberrypi.com/software/ Regards! |
Hi thanks for looking at this. Glad the docker build worked for you.
Yes, that's correct. |
Some suggestions from ChatGPT on how AI tools might make this easier https://chatgpt.com/share/4d9c9346-8782-49f0-846a-47cc0e58a7e2 |
Would you assign the issue to me? I'm focused on resolving it. @agtic thank you! |
Assigned as requested @Car85. If you get stuck, it might make sense to wait until the other issue is completed. |
@agtic plss review my pr |
Thanks will take a look. |
@agtic sure you can take your time. And let me know if any changes required I can do |
As part of addressing this issue , I have created two separate repositories: https://github.com/Car85/neo_chronos_frontend While working on the upgrade to Python 3.12, it became necessary to separate the frontend from the backend and essentially rebuild the application from scratch. This approach also aligns with another ongoing issue aimed at separating the front end from the back end. I fully respect the work being done in the other issue and understand that our approaches might differ. Should you decide that this path is not suitable for solving the current issues, I will completely understand and support the decision to discard this approach. Thank you for considering this solution. I look forward to your feedback. |
Currently, the application is not yet fully replicated; I have primarily implemented the update of the settings. The frontend development, using Preact and TypeScript, was necessary to visually test the development progress. For the backend, I am using Python 3.12, Flask, SQLite3, and SQLAlchemy. |
I believe it is necessary to work on the domain of the application to generate issues that we can distribute among ourselves, using this proposed separation as a primitive skeleton. |
Thank you @Car85 |
I was working on separating the frontend and backend for another issue. Although I didn't upgrade the backend yet, I have already separated the frontend. Can you please upgrade the backend only? Otherwise, my previous work will be wasted. |
Completely agree with you. I just created the front-end to do my own tests, but if you take a look, you'll see it's very basic. I think we need to work on two repositories, one for the front-end and one for the back-end, which should be uploaded to @agtic s GitHub account, as he was the one who proposed the modernization of Chronos. We should start working based on domain-specific issues. Obviously, we would need to coordinate. Best regards. |
@Car85 Just making sure you saw the issue I opened on your backend_repo |
Yes, I’ve seen it. I’ll make a commit at the beginning of next week. |
Port from Python 2.7 to Python 3
The text was updated successfully, but these errors were encountered: