Skip to content
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

Python3 #177

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Python3 #177

wants to merge 20 commits into from

Conversation

mrworf
Copy link
Owner

@mrworf mrworf commented Feb 23, 2021

Ongoing work to migrate to Python3 while remaining compatible with the python3 that's part of the SD card image for photoframe. Once this works reliably, the plan is to prepare a new SD card image which uses python3 by default (and a much newer distro version). @dadr 😄

@mrworf
Copy link
Owner Author

mrworf commented Feb 23, 2021

Another item on my list is adding test coverage to avoid breaking people's frames with an update :) But we'll see, since it's A LOT of code to test, even if just tox coverage

@dadr
Copy link
Contributor

dadr commented Feb 23, 2021

Wow! You can imagine my surprise when I read the email about this PR. It's a major step for sure. I'll try kicking the tires too! ;-)

@mrworf
Copy link
Owner Author

mrworf commented Feb 23, 2021

Well, I got inspired by the activity and I also got hold of my dev frame that sat at work before so I can more easily do some testing now. My main frame is RPi3 and the dev frame is RPiZ to make sure I don't mess people up 😸 .

Feel free to review and/or use this version and submit feedback. I also need to work on the update script so it can upgrade people's frame with the correct Python3 modules.

@mrworf
Copy link
Owner Author

mrworf commented Feb 23, 2021

MIGRATION.md should hold the changes you need to do to your RPi setup to allow this to run.

@rafik24
Copy link

rafik24 commented Feb 23, 2021 via email

@dadr
Copy link
Contributor

dadr commented Feb 23, 2021

I found MIGRATION.md already. (might format as code, as I did a rookie mistake in cut and paste without noticing that there were 2 lines for pip and not one.) I have a 1A, 3B, and Zw. (plus the PC).

In any case - thanks and regards.

@mrworf
Copy link
Owner Author

mrworf commented Feb 23, 2021

Oups, yeah, it's my notes for what I need to do to get this running. Will be formatted properly before merge, promise 🤞 😆

Tom Anschutz and others added 5 commits February 23, 2021 18:54
I took the 2019-01-05 image, freshly installed and upgraded to a clean current version on RPi3B.  Then tried the instructions.   pip3 needed to be installed, and in this distro, python3-flask-httpauth was not a separate package.   I thought it might be missing and tried installing with pip3, but it claimed that it was already there from the dist-packages.    BTW, do you have a flag for the update script to select a branch, or just use git --branch ?
@mrworf
Copy link
Owner Author

mrworf commented Feb 26, 2021

Added the new version of the update script. Allows segmented updating, meaning that as new versions require changes to the installation, they will be done, but it tracks what it has done and thus is a bit safer longterm than existing solution.

Will have to do some testing before that can be deemed ok. Also solved some flake8 errors/warnings.

Tom Anschutz and others added 7 commits February 26, 2021 22:54
* Update debug.py

Fixes to make "Log Report" button work again

* Update shutdown.py

* Update helper.py

* Update debug.py

Per our discussion with previous changes

* Update helper.py

Changes per our discussion
* Update debug.py

Fixes to make "Log Report" button work again

* Update shutdown.py

* Update helper.py

* Update debug.py

Per our discussion with previous changes

* Update helper.py

Changes per our discussion

* Update base.py

Add same logic to python3 branch for issue #182

* Update display.py

Fix for python3 branch for handling images set to Do Nothing or to Fill

* Update servicemanager.py

* Update oauth.py

* Update oauthlink.py

added codecs library and modified code to translate bytes to string for json.load

* Update README.md

Updated to describe this branch specifically.

* Update svc_googlephotos.py

Bring up to date with mrworf master/python3 version

* Update colormatch.py

Added Ability to make use of alternate TCS34727 color sensor on a different module.   This module has a better physical design than the Adafruit module, and works the same, except it has a version ID of 77 (0x4D) instead of 68 (0x44).  It was bought on eBay: https://www.ebay.com/itm/133600154256

* Update README.md

Updated description of alternate color module

* Update helper.py

Added Code to support HEIC and HEIF images.

* Update README.md

Spelling and grammar

* Update helper.py

fix syntax error

* Update helper.py

Indent error for Copy/paste

* Update helper.py

Moved HEIC to JPG conversion from makeFullframe to Autorotate in order to catch a missing case where a HEIC was set to do nothing but changed colors when cropped to fit the screen.

* Update colormatch.py

Colormatch had some questionable logic at low lux levels.  The changes allow temperature to be calculated as long as all the colors are not 0.  And also, when there is NO light, zero temperature is probably not correct, rather make a middle-of-the-road assumption.

* Update colormatch.py

Modified to detect and control monitors that can be adjusted using ddc channel. These will change brightness and temperature, and not require the colormatch script.

* Update colormatch.py

Added check to avoid going higher in temp than a monitor can support

* Update colormatch.py

Syntax changes

* Update colormatch.py

Syntax

* Update colormatch.py

More Syntax - I need to try an  IDE!

* Update colormatch.py

temp and lux were not set when levels were zero

* Update colormatch.py

* Update colormatch.py

* Update colormatch.py

* Update colormatch.py

Make scale adjustments

* reduce Warnings and clean up update script

move logic to suppress script adjustment to slidephow.py to avoid logging a warning for each picture.  Also clean up legacy updates in update.sh.  All those will have been applied in this branch.

* Update README.md

Formatting and URL port 7777

* Update README.md

spelling

* Update README.md

* update to install instructions

Added instructions to add http-auth.json for a manual install.

* Re-written temp logic

New color logic and move server to port 80.

* syntax bug

* Monitor brightness fix

Allow configuring a scaler to set Monitor brightness from lux

* Run from port 80

partial commit to run from port 80

* Update README.md

Added Install step for update crontab file

* Update svc_usb.py

Ignore hidden files (those that start with "."

* Update README.md

Made changes to re-purpose the Philip branch readme to this one.

* Update Readme

Removed Migration.md and minor updates to Readme

* Update Readme 

Install and update from python3 branch
Also implemented Pexels service but you cannot use it yet
unless you hack the service ;-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants