Commit graph

2571 commits

Author SHA1 Message Date
Gina Häußge
e722c2f8ad Sanity check: verify that plugin settings data jsonifies without error
More resilience which apparently is necessary as witnessed in #946
2015-06-21 00:32:59 +02:00
Gina Häußge
1c99bccef9 Updated german translation 2015-06-20 01:05:18 +02:00
Gina Häußge
61bd803942 Fix: Properly report if a plugin simply could not be found after installation
Also more resilience towards odd version numbers that get mangled by python's package management (1.2.3a0 => 1.2.3a)
2015-06-20 00:56:26 +02:00
Gina Häußge
2f5c3570dd More verbose logging for analyzer 2015-06-20 00:01:59 +02:00
Gina Häußge
9e12a8353b Small update for API docs, more necessary 2015-06-19 23:46:17 +02:00
Gina Häußge
c6cb430594 Throttle gcode analysis a bit for low prio entries
Give the Pi's CPU a bit air to breathe...
2015-06-19 22:33:26 +02:00
Gina Häußge
0e60b26048 Config migration must happen after all plugin implementations are initialized
Introduced new callback for settings plugin to hook into the point after the settings have been migrated since the initialize method is not suitable for that as it might be called before other plugin implementations reachable through hooks are initialized.
2015-06-19 22:31:05 +02:00
Gina Häußge
269f18a22f Software Update Fix: Only migrate config settings that are actually in the config 2015-06-19 22:26:22 +02:00
Gina Häußge
7c74aa4c4d Allow ignoring of settings defaults when retrieving values 2015-06-19 22:25:42 +02:00
Gina Häußge
a6c1084b14 Fix: Only try to delete a key in the settings that's actually there 2015-06-19 21:52:03 +02:00
Gina Häußge
4abd97df09 File manager will now migrate analysis result from old metadata
That should make the initial startup after switching to 1.2.0 way faster.
2015-06-19 19:19:02 +02:00
Gina Häußge
904a3cdaff super(...).method(...) => BaseClass.method(self, ...) 2015-06-19 15:25:37 +02:00
Gina Häußge
f58d63bb49 pluginmanager: Reset flag for repository_available when refreshing it 2015-06-19 15:20:25 +02:00
Gina Häußge
dedf3f234f super(...).on_settings_save(data) => octoprint.plugin.SettingsPlugin.on_settings_save(self, data) 2015-06-19 13:19:54 +02:00
Gina Häußge
633d1ae594 Fix: capture TypeError caused by dynamic reloading on settings save and load
Usage of super(MyClass, self) is henceforth discouraged due to dynamic reloading within OctoPrint's plugin subsystem. Refer to https://thingspython.wordpress.com/2010/09/27/another-super-wrinkle-raising-typeerror/ for details on this problem.

Action by plugin authors is needed to remove the super(...) call and substitute it with octoprint.plugin.SettingsPlugin.on_settings_save(self, data) and octoprint.plugin.SettingsPlugin.on_settings_load(self). Without these modifications, calls to plugin methods utilizing super(...) will fail after a call to the plugin managers reload_plugins method.

Closes #942
2015-06-19 13:18:21 +02:00
Gina Häußge
0846a0fed0 Fix: Wrong parameter order 2015-06-19 11:24:37 +02:00
Gina Häußge
f1be116190 SoftwareUpdate: Don't persist more check data than necessary in config
The SoftwareUpdate Plugin had a bug that caused way too much check data to be stored in the configuration, leading to plugins potentially being stuck in an "update available" loop although the update had already been applied. Now only the current version of github_commit update types is persisted, not the full check configuration.

Also introduced a configuration version and made the migration function migrate old configs to remove anything that was same as the default supplied for the "octoprint" and all plugin hook checks. That should clean things up in existing installations.
2015-06-19 11:12:24 +02:00
Gina Häußge
d5af7b9b48 SettingsPlugins may now track configuration versions
OctoPrint will take care of calling a migration function on the plugin if the plugin demands a newer configuration version than currently stored in config.yaml.
2015-06-19 11:10:07 +02:00
Gina Häußge
e55677da22 Plugin system now support pre/post implementation init methods 2015-06-19 11:09:08 +02:00
Gina Häußge
9f4a74cca0 Fix: setting defaults supplied to set/get from plugins are no longer overwritten 2015-06-19 11:08:11 +02:00
Gina Häußge
b40cba659a Fix: defaults are now correctly applied when setting config for plugins 2015-06-19 11:06:51 +02:00
Gina Häußge
a26b203205 Enforce update of updateable software after plugin changes
When any plugins are enabled/disabled, the client now gets a trigger to fetch a fresh list of update information from the server. This should take care of any old popups still hinting at now uninstalled plugins.
2015-06-18 17:08:56 +02:00
Gina Häußge
6e90c9d730 Reintroduced minification
Still opt-in though.
2015-06-18 13:49:40 +02:00
Gina Häußge
31d7eaad90 Add ";" delimiters between bundled JS files
This is to make sure that they all end on a ; and hence stuff doesn't break if a file included directly after starts with a (...) construct. Of course it would be better if all bundled files are valid in that matter, however since we can't enforce that, we'll add this slight overhead to reduce the risk of stuff breaking.

See for example: http://stackoverflow.com/questions/20307462/js-cant-combine-lib-files
2015-06-18 13:00:18 +02:00
Gina Häußge
0d886ab6f1 Revert cbd3b1424b
That was a bit too early and an accident caused by a too fast "OK" in IntelliJ (as quite visible from the completely unrelated commit message)
2015-06-18 12:11:54 +02:00
Gina Häußge
cbd3b1424b Default to full platform compatibility 2015-06-18 12:05:11 +02:00
Gina Häußge
0ce1575e12 Don't allow plugin management while the printer is printing 2015-06-18 11:37:08 +02:00
Gina Häußge
268886576f More resilience against wonky plugin compatibility data
(cherry picked from commit 5ed37e0)
2015-06-18 09:31:11 +02:00
Gina Häußge
cbc6f20fa6 Split assets up a bit to allow better debugging of issues with webassets 2015-06-17 18:43:38 +02:00
Gina Häußge
608be52b9a softwareupdate: plugins may now specify that they have dependency links
Update plugin will then also process those during pip install. Was missing previously and caused Pushbullet Plugin to not properly update.
2015-06-13 19:36:28 +02:00
Gina Häußge
4badf72e18 New section "Note for Upgraders" & corrected a typo 2015-06-12 20:15:22 +02:00
Gina Häußge
5da52b6c57 Preparing release of 1.2.0-rc2 2015-06-12 17:30:32 +02:00
Gina Häußge
c527338cb8 Docs: Updated plugin tutorial to utilize new cookiecutter template 2015-06-11 15:04:27 +02:00
Gina Häußge
46711ce365 pluginmanager: Support installing plugins that need --process-dependency-links
This might be necessary when plugins depend on (patched) library versions that are not yet released on PyPI
2015-06-10 19:34:33 +02:00
Gina Häußge
8353c9bdf5 Better fix for #931, stays backwards compatible to older setuptools versions
python-setuptools on OctoPi is quite old and trying to update in a local virtualenv apparently CAN cause problems (we had this with python-serial too a while back), so a backwards compatible solution is better here.
2015-06-10 17:25:23 +02:00
Gina Häußge
6a7a858065 Fix: octoprint_setuptools depends on setuptools==7.0
Closes #931
2015-06-10 16:34:12 +02:00
Gina Häußge
2e72b91eaf Preparing release of 1.2.0-rc1 2015-06-10 10:12:30 +02:00
Gina Häußge
d2cd459f26 Marked deprecated PluginSettings.getInt etc methods as to remove with 1.3.0 2015-06-10 09:43:10 +02:00
Gina Häußge
06fb249f2e Send frontend translations with javascript mime type
Thanks @markwal
2015-06-10 09:14:39 +02:00
Gina Häußge
d9cbf786d5 Fix: Don't depend on presence of String.prototype.startsWith
Instead use direct comparison with "divider" (matches docs more closely anyhow)
2015-06-09 22:33:18 +02:00
Gina Häußge
5d5c3d74c1 softwareupdate: re-fetch check data on plugin lifecycle events
If plugins get enabled or disabled, the update check configuration needs to be refetched next time it's needed since there might have been changes to plugin implementing the check_info hook.
2015-06-09 19:03:38 +02:00
Gina Häußge
4b86d83465 docs: removed a missing reference 2015-06-09 18:51:14 +02:00
Gina Häußge
592cad5b99 Deprecated AppPlugin mixin and introduced octoprint.accesscontrol.appkey hook instead
Plugins implementing the mixin will automatically be migrated to providing the single mixin method as hook handler.
2015-06-09 18:50:55 +02:00
Gina Häußge
228fb21ceb softwareupdate: Also allow {target} in pip install urls, as a synonym for {target_version} 2015-06-09 17:33:41 +02:00
Gina Häußge
f813e6317b Updated and bundled german core translation 2015-06-09 15:00:43 +02:00
Gina Häußge
5e1ce30ab2 Updated translations source file 2015-06-09 15:00:27 +02:00
Gina Häußge
51cc994610 softwareupdate: Slight rewording of "current versions" information 2015-06-09 14:59:52 +02:00
Gina Häußge
7ae83a4031 Moved software update plugin into "OctoPrint" settings section 2015-06-09 14:59:09 +02:00
Gina Häußge
8696ce9291 Fix: Bundled plugins always take precedence over external ones 2015-06-09 13:54:21 +02:00
Gina Häußge
2e6240a910 Bundled Software Update Plugin 2015-06-09 13:35:03 +02:00