This project intended to modernize the DisplayCAL code including Python 3 support.
Florian Höch, the original developer, did an incredible job of creating and maintaining DisplayCAL for all these years. But, it seems that, during the pandemic, very understandably, he lost his passion to the project. Now, it is time for us, the DisplayCAL users, to contribute back to this great tool.
This project is based on the 3.8.9.3
version of DisplayCAL.
Here is one of the early screenshots showing the tool working with Python 3.9:
Currently, DisplayCAL is working with Python 3.9.7 + wxPython 4.1.1.
Here is a list of things that is working:
- The UI and general functionality.
- Calibration + Profiling.
- Installing the created profile.
- Language support, all the menus are showing the bare keys of the items. This will soon be fixed.
- There are tons of
bytes/str
related issues, getting fixed very quickly but more tests are needed. - Please create issues
Currently, there is no RPM
, DEB
, APP
or MSI
packages. To test the code
you can either run it directly from the source or install it as a sdist
package:
git clone https://github.com/eoyilmaz/displaycal-py3
cd ./displaycal-py3/
python setup.py install --install-data $HOME/.local/
This should install the code as an sdist
. To run the UI:
displaycal
You may need browse to the bin
folder of you python
interpreter. I used a
virtualenv
through PyCharm
to develop and test the code.
Some ideas on where to focus on future development:
- Try to move the UI to Qt. This is a big ticket. The motivation behind that is that I'm
much more experienced with Qt. In fact, I have zero experience with
wxPython
. - Make the code fully compliant with PEP8 with the modification of hard wrapping the code at 88 characters instead of 80 characters. This also means a lot of class and method/function names will be changed.
- Create unit tests with
Pytest
and reach to 100% code coverage. The3.8.9.3
version of DisplayCAL is around 120k lines of Python code (other languages are not included) and there are no tests (or the repository I adapted doesn't contain any tests). This is a nightmare and super hard to maintain. - Maybe I'm not experienced enough, and I'm wrong on saying this, but I don't see the motivation behind having a C-Extension for EDID, XRandr etc. stuff. It should be possible to cover all the functionality of this extension and stay purely in Python. It is super hard to debug (for me at least) and super hard to maintain (again, for me).
- Replace the
wexpect.py
with the latest release ofPexpect
. I'm not very familiar with this module, and there is no comment in the code on why we have awexpect.py
instead of using the PyPI version ofPexpect
. - Replace the
DisplayCAL.ordereddict.OrderedDict
with the pure Pythondict
which is ordered after Python 3.6. - Replace
os.path
related stuff withpathlib
. - Organize the module structure, move UI related stuff in to
ui
module etc., move non-source files into their own folders. - Remove all the hackery that includes
exec()
. I know, there should be a reason for them to exist, but this generally is considered ashacking
. - Update the
Remaining time
calculation during profiling to estimate the time by also considering the luminance of the remaining patches to have a better estimation. Because, patches with higher luminance values are measured quickly than patches with lower luminance values.
Issues related to these ideas have been created. If you have a feature request, you can create more issues or share your comment on the already created issues or create merge requests that are fixing little or big things.
Because there are very little automated tests, I need the code to be tested constantly. Please help me with that.
Have fun!