Errors during install, e.g. due to dependency issues, that
happened while a "Requirement already installed" message
was present in the output as well, were wrongly read as
a "reinstall needed" case if there was no failure line
present for some reason.
The logic has now been adjusted so that a reinstall will
only be triggered if there was no `Error:` line in the
output. A test case has been added as well.
Closes#4703
We've been getting a deprecation warning about -x for a
while now. This change switches to using the less clean-css
plugin. Detection to make sure the package is installed
has been added and the instructions on how to get
everything needed for the command to work have been
updated.
* 🚧 WIP: multi install of plugins from JSON export
* 🚧 pmgr: Multi install works
TODO: better tracking in install log of individual
steps/results.
* 🚧 Fix error reporting, improve working dialog
* 🐛 Hide action buttons while still installing
* 🚸 Confirmation dialog for json multi install
* 🐛 Fix notifications for single installs
Also: a typo
* Create new WebcamPlugin type
* Let user switch webcam plugin
* Move keyboard controls
* Rename webcam plugin
* Rename webcam plugin
* Update settings pane
* Extract JS code from control.js
* Temporary fix for KO bindings
* Migrate settings to plugin
* Fix issue on tab change
* Migrate settings UI
* Join WebRTC servers to string on migration
* Allow list of all webcams to be retrieved
* Enricht settings with webcams and ensure backwards compatibility
* Fix binfing lost bug
* Do not contain webcam settings if permission is missing
* Style tabs
* Unload webcam based on visibility
* Let user pick default webcam
* Refactor webcam access in Python
* Show snapshot and stream URL in settings dialog
* Update timelapse
* Small UI improvements
* Ensure default webcam is used if nothign is set
* Remove dummy webcams
* Remove commented sections
* Fix CI build
* Ensure configuration types are correct
* Only show selector if more than one webcam is available
* Access default webcam savely in case not set
* Use enum values for stream ratio
* Address PR comments
* Convert data structure to dict
* Create function to get snapshot, remove force=True from migration
* Fix timelapse not captured
* Fix inverted condition check
* Update wording in timelapse error message
* Apply rotate/flip to timelapse
* Add compatibility layer for plugins
* Remove exclusion of classicwebcam plugin
* Fix unit tests
* Fix unit tests #2
* Add onWebcamVisbilityChange callback
* Move stream and snapshot wizard to plugin
* Replace classic_webcam with classicwebcam
* Rename WebcamPlugin to WebcamProviderPlugin
* Rename take_snapshot to take_webcam_snapshot
* Update copyright
* Default to empty dict
* Wrap WebcamCompatibility into Optional
* Rename CoreWizardWebcamViewModel to ClassicWebcamWizardViewModel
* Simplify settings dict creation
* Use plugin identifier for logging
* Add file header
* Simplify toDict() function and renamt to to_dict()
* Rename iter to snapshot
* Remove redundant boolean checks
* Replace with
* Add WebcamNotAbleToTakeSnapshotException
* Reset wizard version to 1
* Reset wizard version to 1
* Update disabling discouraged messgae
* Update default webcam description
* Simplify webcam collection
* Remove test webcam
* 🐛 Fix wrong data location
* ♻️ Refactor settings compatibility layer
Use a settings overlay centrally derived on
server start/platform initialization. Mark overlay
as deprecated so that warnings on read and write
access will be logged to overlay leaves, and writes
will also be denied.
Adjust octoprint.webcams methods to allow injecting
plugin manager and settings instance to use to
support use during initialization.
TODO: Reset overlay when default webcam changes?
TODO: If we split the compat layer then we should
also add TWO overlays, one for snapshot and one for
stream config stuff.
* 💚 Fix unit tests
* ♻️ Move webcam related schema
Webcam, WebcamCompatibility and RatioEnum have
nothing to do with the config anymore but are
rather WebcamProviderPlugin specific, so let's move
them into their own octoprint.schema.webcam package.
* Remove old wizard logic
* Add seprate setting got snapshot webcam
* Convert WebRTC servers to list
* 🚸 Log warning on deprecated settings on API
If anyone is trying to set stuff from the webcam
compat layer, we now get a log entry, or multiple
if needed.
Long term we might want to return an error on
the API
* ☂ Ensure plugin can actually be found
Also use API methods of plugin manager instead of
accessing internal control properties directly.
Co-authored-by: Gina Häußge <gina@octoprint.org>
Four new hooks were added:
- octoprint.plugin.backup.before_backup
- octoprint.plugin.backup.after_backup
- octoprint.plugin.backup.before_restore
- octoprint.plugin.backup.after_restore
Those will allow plugins to perform additional
tasks right before/after backup and right before/
after restore.
This is a compromise for #4195: Instead of having
an extension point in OctoPrint to pull in
additional files, having to figure out
readability, proper allow listing to prevent
attempts to backup everything and the kitchen sink
and such, plugins CAN pull in additional stuff
they want to have in the backup into their data
folder and then on restore (or start after
restore) put it where it belongs. In an ideal
world, we would ever only want to backup stuff
that is already in the base folder anyhow, but
as #4195 demonstrates there is sometimes a need
for more.
And since these hooks are not limited to this
functionality specifically but could also be used
for other stuff (think reregistering somewhere
after restore or whatnot), I think they are a
good compromise.
Implements #4195
This way
?l10n=zh_hk
will work too, not just
?l10n=zh_hant_hk
Additionally, a comma separated list of l10n
options can now also be provided via query
or header, not just a single value:
?l10n=zh_hk,zh
See #4445
In multiple locations OctoPrint so far only used
the language component, rendering territory and/or
script specific translations unusable and
unselectable.
Fixes#4445
We extracted octoprint_setuptools into its own
package on pypi and pull that in on OctoPrint's
install to support plugins gettings installed
non-isolated via setuptools.
Additionally, OctoPrint's setup.py will use it
for clean & translation sub commands, but it's
made optional during install - we don't need
additional commands during a wheel build/install.
Plugins that use pyproject.toml can now add
octoprint-setuptools as a build requirement:
[build-system]
requires = ["setuptools>=40.8.0", "wheel", "octoprint-setuptools"]
build-backend = "setuptools.build_meta"
That way, isolated builds (as triggered by
the existance of pyproject.toml) will work.
And finally, by adding wheel as a dependency
to OctoPrint, we ensure that pip won't try to
install setup.py based plugins in an isolated
environment and fail due to the missing
octoprint_setuptools dependency.
Implements #4682
Work towards fixing #4552
If LFN_WRITE capability is reported as supported,
OctoPrint by default now will upload SD files
to the printer under their full name instead of
shortening it to DOS conventions.
The primary name as reported by the firmware
(first entry in the M20 output) is still
considered the main name and used for any file
operations like selecting or deleting. So, if
the firmware supports a DOS name here, that's
also what OctoPrint will (continue to) use for
any such operations.
Implements #4494
By adding a query parameter `devmode` it can be
re-enabled.
This should hopefully reduce the amount of text-only
systeminfo we get on the forums.
Implements #4524