1585 Commits

Author SHA1 Message Date
Eric Callahan
4e00a0760e application: verify upload filename
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-10-22 05:37:30 -04:00
Eric Callahan
f735c04194
power: fix 'address' option percent encoding
Allow "/" separators in the address.  This patch also resolves a regression in  the generic http client.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-11 13:52:00 -04:00
Eric Callahan
e66744b6e9 power: improve basic auth implementation
Rather than pass the user name and password via the
url, supply them directly to the http request.  This should guarantee that the authorization header is
generated correctly.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-11 06:26:23 -04:00
Eric Callahan
0a8590643f
server: refactor startup
Use asyncio.run() to launch the server application as recommended
by the Python docs.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-08 16:29:01 -04:00
Eric Callahan
3a42dac02b announcements: use data path for dev mode
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-08 15:02:23 -04:00
Eric Callahan
863d0c1e4b confighelper: don't resolve backup path
If the configuration file is a symbolic link we want the backup
generated in the config folder.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-08 15:02:13 -04:00
Eric Callahan
8debbf8ba4
source_info: resolve importlib_metadata compatibility issues
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-25 14:16:42 -04:00
Eric Callahan
7117cfc273
python_deploy: minor reporting fixes
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-25 12:46:21 -04:00
Eric Callahan
92ce2a5a5d
update_manager: correct base configuration
Remove deprecated "host_repo" option, update Klipper's venv args to invoke Python 3.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-25 10:27:21 -04:00
Eric Callahan
003acd5f64 update_manager: fetch klipper paths from klippy_connection
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 16:35:37 -04:00
Eric Callahan
9097cfcce7 klippy_connection: store klipper source path and python path
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 16:35:37 -04:00
Eric Callahan
484551e5bf app_deploy: streamline type and channel config
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 16:35:37 -04:00
Eric Callahan
9beecbda92 confighelper: add getchoice method
This getter provides a pattern for configuring an item that
within a range of choices.

Signed-off-by:  Eric Callahan <arksine@gmail.com>
2024-07-24 07:37:08 -04:00
Eric Callahan
96b1c22e28 update_manager: add support for python applications
Signed-off-by:  Eric Callahan <arksine.code@gmail.com
2024-07-24 07:37:08 -04:00
Eric Callahan
b8921ca593 python_deploy: support for updating python apps
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 07:37:08 -04:00
Eric Callahan
17dc05c9b7 versions: expand support for Python Package Versions
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 07:37:08 -04:00
Eric Callahan
0ff1d79b5b server: improve add_warning method
Add an exc_info parameter that optionally takes an
exception that is passed to the logging function. This
will log the traceback without an additional logging call.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 07:37:08 -04:00
Eric Callahan
11d15f96d1 pip_utils: add async method to invoke pip directly
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 07:37:08 -04:00
Eric Callahan
ecb6ebcc18 pip_utils: bump pip version to 24.0.0
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 07:37:01 -04:00
Eric Callahan
0fb48fb9bf app_deploy: separate out pip update method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 06:29:59 -04:00
Eric Callahan
4e8d50367d app_deploy: fix unbound variable
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 06:29:59 -04:00
Eric Callahan
a101815a47 utils: add support for extracting project dist info
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-24 06:29:59 -04:00
Eric Callahan
b8ba6c0d2b
mqtt: add support for a user configured client id
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-22 13:55:33 -04:00
Eric Callahan
5c62149fc4
simplyprint: remove AI functionality
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-22 10:34:08 -04:00
Eric Callahan
dc00d38b01 job_queue: improve state reporting
Only report ready when an item is in the queue and automatic transition is enabled.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-07-05 07:23:28 -04:00
Eric Callahan
dfa38a0ddc power: uhubctl Pi 4 bugfix
Default the port option to None if omitted.

Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2024-06-23 05:39:20 -04:00
Nick Gon
2dbea4f4cd metadata: Add support to extract metadata from g-code files generated by QIDISlicer
This PR adds support to extract metadata from the g-code files generated by QIDISlicer

Signed-off-by: Nick Gon <albatar@trance.fr>
2024-06-23 05:31:45 -04:00
Moggie
4d6037c3d3 module: file_manager
Allow default metadata parser timeout to be configurable

Signed-off-by: Paul Morgan moggieuk@hotmail.com
2024-06-23 05:31:18 -04:00
Eric Callahan
346a3d7c9d
history: fix default for unknown filename during migration
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-06-02 07:37:05 -04:00
Eric Callahan
f2f2c93aa1
history: check for null values during database migration
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-06-02 07:17:15 -04:00
Eric Callahan
4fe89d5571
database: don't warn on UUID mismatch
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-28 18:07:18 -04:00
Eric Callahan
7f89bd7d62 git_deploy: limit corruption detection
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-28 16:13:13 -04:00
Eric Callahan
3b1c21a72d
database: attempt to install lmdb if missing
When attempting a conversion, install the lmdb package if its missing.
This should resolve issues with containers or new installations that
want to migrate a previous db to sqlite.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-28 06:11:42 -04:00
Eric Callahan
5332eab258
database: skip invalid values when migrating namespaces
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-27 10:49:34 -04:00
Eric Callahan
fa1dc438fa git_deploy: add support for pinned commits
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-25 12:30:56 -04:00
Eric Callahan
bc34ebdff9 filelock: fix lockfile cleanup
Python 3.7 does not support the "missing_ok" argument
in pathlib.unlink().

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
e41a934f74 database: support legacy sqlite_master table
Sqlite versions older than 3.33.0 store schema information in the
sqlite_master table rather than the sqlite_schema table.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
6b31076a43 machine: skip validation for new installs
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
3f62bb6fb4 database: add backup, restore, and compact endpoints
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
0b1fce8a6d file_manager: minor type checking fixes
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
bb0266f5c4 app: replace dict with UserInfo throughout Moonraker
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
eddf47e4a3 authorization: use SQL tables to store user info
Add a UserInfo class which provides type annotations for each member.
This class easily converts to a dict or tuple, simplifying conversion
for usage in SQL statements.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
3f0d20ed8c history: use tables for history and totals storage
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-21 06:18:46 -04:00
Eric Callahan
80c762074f database: migrate from lmdb to sqlite
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-18 08:03:47 -04:00
Eric Callahan
9d0d09de80 eventloop: add low level eventloop property
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-18 08:03:47 -04:00
Eric Callahan
76704feee4 sensor: add support for parameter configuration
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-15 07:31:57 -04:00
Eric Callahan
c5bf6e77a7
confighelper: type checking fix
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-14 20:08:40 -04:00
Eric Callahan
9c6048a759
confighelper: store deep copies of parsed options
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-14 18:05:19 -04:00
Eric Callahan
ddc0e76ffc power: add support for uhubctl devices
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-06 06:46:53 -04:00
Eric Callahan
81899e04fd sensor: add history field options
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-05-05 06:29:21 -04:00