Skip to content

Commit

Permalink
refactor: HeadlessWidget is not a singleton anymore, config module …
Browse files Browse the repository at this point in the history
…is now source of truth for config

refactor: initializing display and config is now done in `setup_headless_kivy`
feat: class method `get_instance` to get the closest parent instance of type `HeadlessWidget`
  • Loading branch information
sassanh committed Feb 19, 2024
1 parent 05e5f23 commit 9df2a95
Show file tree
Hide file tree
Showing 9 changed files with 371 additions and 412 deletions.
106 changes: 6 additions & 100 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Gitignore for the following technologies: Python
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -57,69 +57,8 @@ cover/
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py
.python-version

# Environments
.env
Expand All @@ -130,41 +69,8 @@ ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/
# pyright
/typings/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
poetry.toml

# ruff
.ruff_cache/

.DS_Store
# logs
*.log
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## Version 0.6.0

- refactor: `HeadlessWidget` is not a singleton anymore, config module is now source
of truth for config
- refactor: initializing display and config is now done in `setup_headless_kivy`
- feat: class method `get_instance` to get the closest parent instance of type `HeadlessWidget`

## Version 0.5.12

- fix: make sure `kivy.core.window` is loaded in `setup_headless` to avoid
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ poetry --group dev headless-kivy-pi
width=240,
height=240,
baudrate=60000000,
debug_mode=False,
is_debug_mode=False,
display_class=ST7789,
double_buffering=True,
synchronous_clock=True,
Expand Down Expand Up @@ -87,7 +87,7 @@ The height of the display in pixels.

The baud rate for the display connection.

#### `debug_mode`
#### `is_debug_mode`

If set to True, the application will print debug information, including FPS.

Expand Down
Loading

0 comments on commit 9df2a95

Please sign in to comment.