-
+
From ff440d36e24e0a3ccc6d618ad78f17ab91dbf6d3 Mon Sep 17 00:00:00 2001
From: eyal0 <109809+eyal0@users.noreply.github.com>
Date: Wed, 13 Jan 2021 16:46:38 -0700
Subject: [PATCH 10/30] Add slicing.defaultSlicer to set/get
---
src/octoprint/server/api/settings.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/octoprint/server/api/settings.py b/src/octoprint/server/api/settings.py
index bb5f2747e..7c80590a2 100644
--- a/src/octoprint/server/api/settings.py
+++ b/src/octoprint/server/api/settings.py
@@ -311,6 +311,7 @@ def getSettings():
"allowFraming": s.getBoolean(["server", "allowFraming"]),
},
"devel": {"pluginTimings": s.getBoolean(["devel", "pluginTimings"])},
+ "slicing": {"defaultSlicer": s.get(["slicing", "defaultSlicer"])},
}
gcode_scripts = s.listScripts("gcode")
@@ -1027,6 +1028,10 @@ def _saveSettings(data):
logging.getLogger("PLUGIN_TIMINGS").setLevel(logging.DEBUG)
logging.getLogger("PLUGIN_TIMINGS").debug("Enabling plugin timings logging")
+ if "slicing" in data:
+ if "defaultSlicer" in data["slicing"]:
+ s.set(["slicing", "defaultSlicer"], data["slicing"]["defaultSlicer"])
+
if "plugins" in data:
for plugin in octoprint.plugin.plugin_manager().get_implementations(
octoprint.plugin.SettingsPlugin
From 013a5aace87420564c9128f63ede82627441e23e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Fri, 15 Jan 2021 15:16:10 +0100
Subject: [PATCH 11/30] =?UTF-8?q?=F0=9F=91=B7=20Replace=20GitIssueBot=20fu?=
=?UTF-8?q?lly=20with=20GH=20Actions?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Issue cleanup left to dry-run for now
---
.github/issue-validation.yml | 62 ++++++++++++++++++++++++++
.github/workflows/issue_automation.yml | 8 ++++
.github/workflows/issue_cleanup.yml | 26 +++++++++++
.github/workflows/pr_automation.yml | 2 +-
4 files changed, 97 insertions(+), 1 deletion(-)
create mode 100644 .github/issue-validation.yml
create mode 100644 .github/workflows/issue_cleanup.yml
diff --git a/.github/issue-validation.yml b/.github/issue-validation.yml
new file mode 100644
index 000000000..763ca73a2
--- /dev/null
+++ b/.github/issue-validation.yml
@@ -0,0 +1,62 @@
+approve_label: approved
+problem_label: incomplete
+ignored_labels:
+ - approved
+ - bug
+ - request
+ - improvement
+ - brainstorming
+ - task
+ - rc feedback
+ - awaiting information
+ - not octoprint
+ - done
+ignored_authors:
+ - "@OctoPrint"
+ - "sentry-io"
+ - "FormerLurker"
+ - "bzed"
+
+validation_comment: >
+ Hi @@@AUTHOR@@,
+
+
+ it looks like there is some **information missing** from your bug report that will
+ be needed in order to solve the problem. Read the [Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md)
+ which will provide you with a template to *fully fill out* here so that your bug report
+ is ready to be investigated (I promise I'll go away then too!).
+
+
+ If you did not intend to report a bug but wanted to **request a feature or brain
+ storm** about some kind of development, please take special note of the title format
+ to use as described in the [Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md).
+
+
+ **Please do not abuse the bug tracker as a support forum** - that can be found at
+ [community.octoprint.org](https://community.octoprint.org). Go there for any kind
+ of issues with network connectivity, webcam functionality, printer detection or
+ any other kind of such support requests or general questions.
+
+
+ Also **make sure you are at the right place** - this is the bug tracker of the official
+ version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third
+ party OctoPrint plugins or unofficial versions. Make sure too that you have **read
+ through the [Frequently Asked Questions](http://faq.octoprint.org)** and searched
+ the [**existing tickets**](https://github.com/OctoPrint/OctoPrint/issues)
+ for your problem - try multiple search terms please.
+
+
+ I'm marking this one now as needing some more information. Please understand that
+ if you do not provide that information within the next two weeks
+ I'll close this ticket so it doesn't clutter the bug tracker. This is nothing
+ personal, it's needed to keep this project manageable. Please just be considerate
+ and help the maintainers solve this problem
+ quickly by following the guidelines linked above. Remember, the less time the devs
+ have to spend running after information on tickets, the more time they have to actually
+ solve problems and add awesome new features. Thank you!
+
+
+ *I'm just a bot 🤖, not a human being, so don't expect any replies
+ from me :) Your ticket is read by humans too, I'm just not one of them.*
+
+keyphrase: I have read the FAQ
diff --git a/.github/workflows/issue_automation.yml b/.github/workflows/issue_automation.yml
index f3024d73f..d3fbdf185 100644
--- a/.github/workflows/issue_automation.yml
+++ b/.github/workflows/issue_automation.yml
@@ -62,3 +62,11 @@ jobs:
labels: labels
})
}
+
+ validate:
+ runs-on: ubuntu-latest
+ needs: label
+ steps:
+ - uses: OctoPrint/actions/issue-validation@main
+ with:
+ - repo-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/issue_cleanup.yml b/.github/workflows/issue_cleanup.yml
new file mode 100644
index 000000000..679b4ac92
--- /dev/null
+++ b/.github/workflows/issue_cleanup.yml
@@ -0,0 +1,26 @@
+name: "Issue cleanup"
+on:
+ schedule:
+ - cron: "0 0 * * *"
+ workflow_dispatch:
+
+jobs:
+ cleanup:
+ runs-on: ubuntu-latest
+ steps:
+ - id: date
+ run: |
+ echo "::set-output name=CUTOFF::`date --date='14 days ago' +'%Y-%m-%d'`"
+ - uses: OctoPrint/actions/close-by-query@main
+ with:
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ query: "is:issue is:open label:incomplete created:<${{ steps.date.outputs.CUTOFF }}"
+ dry-run: true
+ comment: >
+ Since apparently some of the required information is still missing, this will be
+ closed now, sorry. Feel free to request a reopen of this or create a new issue
+ once you can provide **all**
+ [required information](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#how-to-file-a-bug-report).
+
+
+ This is nothing personal. Thank you for your collaboration.
diff --git a/.github/workflows/pr_automation.yml b/.github/workflows/pr_automation.yml
index e770708a0..692db55bb 100644
--- a/.github/workflows/pr_automation.yml
+++ b/.github/workflows/pr_automation.yml
@@ -17,4 +17,4 @@ jobs:
steps:
- uses: OctoPrint/actions/pr-validation@main
with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
From 29acb4cacc37ab199915bbfbb34995e19ae0c8e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Fri, 15 Jan 2021 15:20:59 +0100
Subject: [PATCH 12/30] =?UTF-8?q?=F0=9F=91=B7=20Fix=20workflow=20syntax?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/issue_automation.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/issue_automation.yml b/.github/workflows/issue_automation.yml
index d3fbdf185..0dd06a4ed 100644
--- a/.github/workflows/issue_automation.yml
+++ b/.github/workflows/issue_automation.yml
@@ -69,4 +69,4 @@ jobs:
steps:
- uses: OctoPrint/actions/issue-validation@main
with:
- - repo-token: ${{ secrets.GITHUB_TOKEN }}
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
From 19f774429fbb9ba88636d66ce6efb50dce97efb1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Fri, 15 Jan 2021 15:36:24 +0100
Subject: [PATCH 13/30] =?UTF-8?q?=F0=9F=91=B7=20Limit=20issue=20validation?=
=?UTF-8?q?=20to=20opened=20&=20edited?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Also merge validations into one job instead of two.
---
.github/workflows/issue_automation.yml | 7 ++-----
.github/workflows/pr_automation.yml | 6 +-----
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/issue_automation.yml b/.github/workflows/issue_automation.yml
index 0dd06a4ed..0ba8b6f44 100644
--- a/.github/workflows/issue_automation.yml
+++ b/.github/workflows/issue_automation.yml
@@ -4,7 +4,7 @@ on:
types: [opened, edited, closed, reopened]
jobs:
- label:
+ issue-automation:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v2
@@ -63,10 +63,7 @@ jobs:
})
}
- validate:
- runs-on: ubuntu-latest
- needs: label
- steps:
- uses: OctoPrint/actions/issue-validation@main
+ if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'edited')
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/pr_automation.yml b/.github/workflows/pr_automation.yml
index 692db55bb..659733438 100644
--- a/.github/workflows/pr_automation.yml
+++ b/.github/workflows/pr_automation.yml
@@ -4,17 +4,13 @@ on:
types: ["opened", "synchronize", "reopened", "edited", "labeled", "unlabeled"]
jobs:
- label:
+ pr-automation:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- validate:
- runs-on: ubuntu-latest
- needs: label
- steps:
- uses: OctoPrint/actions/pr-validation@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
From e23d3b88f9c5e7157cc90ba354fcd16a627366eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Fri, 15 Jan 2021 15:41:41 +0100
Subject: [PATCH 14/30] =?UTF-8?q?=F0=9F=91=B7=20Merge=20lock=20&=20cleanup?=
=?UTF-8?q?=20into=20one=20workflow?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../workflows/{issue_cleanup.yml => cleanup.yml} | 15 +++++++++++++--
.github/workflows/lock.yml | 16 ----------------
2 files changed, 13 insertions(+), 18 deletions(-)
rename .github/workflows/{issue_cleanup.yml => cleanup.yml} (71%)
delete mode 100644 .github/workflows/lock.yml
diff --git a/.github/workflows/issue_cleanup.yml b/.github/workflows/cleanup.yml
similarity index 71%
rename from .github/workflows/issue_cleanup.yml
rename to .github/workflows/cleanup.yml
index 679b4ac92..80ff4f957 100644
--- a/.github/workflows/issue_cleanup.yml
+++ b/.github/workflows/cleanup.yml
@@ -1,11 +1,23 @@
-name: "Issue cleanup"
+name: "Cleanup issues & PRs"
+
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
+ lock:
+ name: 🔒 Lock issues & PRs closed over a year
+ runs-on: ubuntu-latest
+ steps:
+ - uses: dessant/lock-threads@v2
+ with:
+ github-token: ${{ github.token }}
+ issue-lock-comment: ""
+ pr-lock-comment: ""
+
cleanup:
+ name: 🧹 Close issues marked as incomplete & older than 14 days
runs-on: ubuntu-latest
steps:
- id: date
@@ -15,7 +27,6 @@ jobs:
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
query: "is:issue is:open label:incomplete created:<${{ steps.date.outputs.CUTOFF }}"
- dry-run: true
comment: >
Since apparently some of the required information is still missing, this will be
closed now, sorry. Feel free to request a reopen of this or create a new issue
diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml
deleted file mode 100644
index b753d3fc0..000000000
--- a/.github/workflows/lock.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-name: "Lock outdated issues & PRs"
-
-on:
- schedule:
- - cron: "0 0 * * *"
-
-jobs:
- lock:
- runs-on: ubuntu-latest
- steps:
- - name: 🔒 Lock issues & PRs closed over a year
- uses: dessant/lock-threads@v2
- with:
- github-token: ${{ github.token }}
- issue-lock-comment: ""
- pr-lock-comment: ""
From fad6ee290420ac683404442caee9d91eeef5342a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gerg=C5=91=20T=C3=B6rcsv=C3=A1ri?=
Date: Sun, 3 Jan 2021 11:38:25 +0100
Subject: [PATCH 15/30] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Added=20plugin=20ver?=
=?UTF-8?q?sion=20management=20to=20documentation?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/plugins/distributing.rst | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/docs/plugins/distributing.rst b/docs/plugins/distributing.rst
index f01bbf79b..35325d38f 100644
--- a/docs/plugins/distributing.rst
+++ b/docs/plugins/distributing.rst
@@ -60,3 +60,22 @@ that in the `Plugin Repository's help pages `_
when creating your plugin, you can find a prepared registration entry ``.md`` file in the ``extras`` folder of your
plugin.
+
+Version management after the official plugin repository release
+---------------------------------------------------------------
+
+Once your plugin is available in the official plugin repository, you probably want to create and distribute new versions.
+For "beta" users you can use the manual file distribution method, or a more elegant release channels (see below).
+After you finalized a new plugin version, don't forget to actually update the version in the ``setup.py``,
+and `submit a new release on github `_.
+
+After you published the new release, you can verify it on your installed octoprint,
+with force checking the updates under the advanced options (in the software updates menu in the settings).
+The new versions will appear to the plugin users in the next 24 hours (it depends on their cache refreshes).
+
+The `Software Update Plugin `_ has options to define multiple release channels,
+and you can let the users decide if they want to test your pre-releases or not.
+This can be achieved with defining ``stable_branch`` and ``prerelease_branches`` in the ``get_update_information`` function,
+and creating github releases to the newly configured branches too.
+For more information you can check the `Software Update Plugin documentation `_
+or read a more step-by-step writeup `here `_.
From 1af19bb41716c9cada258fc8df4264347e00bf75 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Mon, 18 Jan 2021 12:14:25 +0100
Subject: [PATCH 16/30] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Get=20rid=20of=20som?=
=?UTF-8?q?e=20code=20duplication?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/octoprint/plugin/types.py | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py
index 5c804fb08..9241e5502 100644
--- a/src/octoprint/plugin/types.py
+++ b/src/octoprint/plugin/types.py
@@ -1634,15 +1634,14 @@ class SettingsPlugin(OctoPrintPlugin):
for level, paths in restricted_paths.items():
if isinstance(level, OctoPrintPermission):
- for path in paths:
- condition = lambda: (
- current_user is not None and current_user.has_permission(level)
- )
- restrict_path_unless(data, path, condition)
+ condition = lambda: (
+ current_user is not None and current_user.has_permission(level)
+ )
else:
condition = conditions.get(level, lambda: False)
- for path in paths:
- restrict_path_unless(data, path, condition)
+
+ for path in paths:
+ restrict_path_unless(data, path, condition)
return data
From fe287cf6f88f4eb97920dc00647e79857d6afae2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Mon, 18 Jan 2021 12:28:05 +0100
Subject: [PATCH 17/30] =?UTF-8?q?=F0=9F=93=9D=20Slight=20rephrasing?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/octoprint/plugin/types.py | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py
index 9241e5502..1c6bf04d3 100644
--- a/src/octoprint/plugin/types.py
+++ b/src/octoprint/plugin/types.py
@@ -1719,17 +1719,10 @@ class SettingsPlugin(OctoPrintPlugin):
Return a ``dict`` with one of the following keys, mapping to a list of paths (as tuples or lists of
the path elements) for which to restrict access via the REST API accordingly.
- .. list-table::
- :widths: 5 95
-
- * - An octoprint permission object
- - Paths will only be available on the REST API for users with the permission
- * - admin
- - Paths will only be available on the REST API for users with admin rights (any user with the SETTINGS permission)
- * - user
- - Paths will only be available on the REST API when accessed as a logged in user
- * - never
- - Paths will never be returned on the API
+ * An :py:class:`~octoprint.access.permissions.OctoPrintPermission` instance: Paths will only be available on the REST API for users with the permission
+ * ``admin``: Paths will only be available on the REST API for users with admin rights (any user with the SETTINGS permission)
+ * ``user``: Paths will only be available on the REST API when accessed as a logged in user
+ * ``never``: Paths will never be returned on the API
Example:
@@ -1746,9 +1739,9 @@ class SettingsPlugin(OctoPrintPlugin):
def get_settings_restricted_paths(self):
from octoprint.access.permissions import Permissions
return {'admin':[["some", "admin_only", "path"], ["another", "admin_only", "path"],],
- 'user':[["some", "user_only", "path"],],
- 'never':[["path", "to", "never", "return"],],
- Permissions.WEBCAM:[["the", "webcam", "data"],]}
+ 'user':[["some", "user_only", "path"],],
+ 'never':[["path", "to", "never", "return"],],
+ Permissions.WEBCAM:[["the", "webcam", "data"],]}
# this will make the plugin return settings on the REST API like this for an anonymous user
#
@@ -1777,7 +1770,7 @@ class SettingsPlugin(OctoPrintPlugin):
# path=dict(to=dict(never=dict(return=None))),
# the=dict(webcam=dict(data="webcam")))
#
- # and like this for an admin user with the webcam permission
+ # and like this for an admin user
#
# dict(some=dict(admin_only=dict(path="path", foo="foo"),
# user_only=dict(path="path", bar="bar")),
From 8e37ad5da1d43cd4e4bcb755c45365b393e7b9ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Mon, 18 Jan 2021 14:24:59 +0100
Subject: [PATCH 18/30] =?UTF-8?q?=F0=9F=93=9D=20Fix=20some=20formatting?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/octoprint/plugin/types.py | 38 +++++++++++++++++------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py
index 1c6bf04d3..c724b9c35 100644
--- a/src/octoprint/plugin/types.py
+++ b/src/octoprint/plugin/types.py
@@ -792,7 +792,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
list: A list of paths to additional files whose modification to track for (in)validating
the cache. Ignored if ``None`` is returned.
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return None
@@ -807,7 +807,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
list: A list of paths representing the only files whose modification to track for (in)validating
the cache. Ignored if ``None`` is returned.
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return None
@@ -820,7 +820,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
Returns:
str: An alternatively calculated ETag value. Ignored if ``None`` is returned (default).
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return None
@@ -838,7 +838,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
Returns:
(list): A list of additional fields for the ETag generation, or None
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return default_additional
@@ -851,7 +851,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
Returns:
int: An alternatively calculated LastModified value. Ignored if ``None`` is returned (default).
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return None
@@ -877,7 +877,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
Returns:
dict: Additional data to persist in the preemptive cache configuration.
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return None
@@ -895,7 +895,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
dict: Additional request data to persist in the preemptive cache configuration and to
use for request environment construction.
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return None
@@ -911,7 +911,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
Returns:
bool: Whether to suppress a record (True) or not (False, default)
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return False
@@ -933,7 +933,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
and returning ``True`` to keep it and ``False`` to filter it out. If ``None`` is returned, no
filtering will take place.
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
return default_template_filter
@@ -953,7 +953,7 @@ class UiPlugin(OctoPrintPlugin, SortablePlugin):
(list) A list of permissions which to check the current user session against.
May be empty to indicate that no permission checks should be made by OctoPrint.
- ..versionadded: 1.5.0
+ .. versionadded: 1.5.0
"""
from octoprint.access.permissions import Permissions
@@ -1381,7 +1381,7 @@ class BlueprintPlugin(OctoPrintPlugin, RestartNeedingPlugin):
and `the documentation for flask.Flask.errorhandler `_ for more
information.
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
from collections import defaultdict
@@ -1779,7 +1779,7 @@ class SettingsPlugin(OctoPrintPlugin):
# path=dict(to=dict(never=dict(return=None))),
# the=dict(webcam=dict(data="webcam")))
- ..versionadded:: 1.2.17
+ .. versionadded:: 1.2.17
"""
return {}
@@ -1817,7 +1817,7 @@ class SettingsPlugin(OctoPrintPlugin):
Returns:
(dict, dict): A tuple consisting of two dictionaries, the first being the plugin's preprocessors for
- getters, the second the preprocessors for setters
+ getters, the second the preprocessors for setters
"""
return {}, {}
@@ -1831,8 +1831,8 @@ class SettingsPlugin(OctoPrintPlugin):
Returns:
int or None: an int signifying the current settings format, should be incremented by plugins whenever there
- are backwards incompatible changes. Returning None here disables the version tracking for the
- plugin's configuration.
+ are backwards incompatible changes. Returning None here disables the version tracking for the
+ plugin's configuration.
"""
return None
@@ -1868,7 +1868,7 @@ class SettingsPlugin(OctoPrintPlugin):
the differences to the defaults (in case the current data was persisted with an older
version of OctoPrint that still duplicated default data).
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
import octoprint.util
from octoprint.settings import NoSuchSettingsPath
@@ -2011,7 +2011,7 @@ class SlicerPlugin(OctoPrintPlugin):
Returns: (dict) a dictionary containing a valid extension subtree.
- ..versionadded:: 1.3.11
+ .. versionadded:: 1.3.11
"""
from octoprint.filemanager import ContentTypeMapping
@@ -2028,7 +2028,7 @@ class SlicerPlugin(OctoPrintPlugin):
Arguments:
profile_path (str): The base folder where OctoPrint stores this slicer plugin's profiles
- ..versionadded:: 1.3.7
+ .. versionadded:: 1.3.7
"""
try:
@@ -2053,7 +2053,7 @@ class SlicerPlugin(OctoPrintPlugin):
# noinspection PyMethodMayBeStatic
def get_slicer_profiles_lastmodified(self, profile_path):
"""
- ..versionadded:: 1.3.0
+ .. versionadded:: 1.3.0
"""
import os
From cacc329a610e9cf56726c175b822ce1e5468212a Mon Sep 17 00:00:00 2001
From: cp2004 <31997505+cp2004@users.noreply.github.com>
Date: Sun, 27 Dec 2020 18:30:14 +0000
Subject: [PATCH 19/30] :bug: Fix plugin install errors not being reported to
the UI
When plugin install went async (4cf2a673c8860304472904cf11d13e2187bc17fd) not all of the responses were caught. This PR changes the rest of the responses to become asynchronous as well.
Closes #3849
---
.../plugins/pluginmanager/__init__.py | 50 +++++++++++++------
1 file changed, 36 insertions(+), 14 deletions(-)
diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py
index d732e0b43..370db223d 100644
--- a/src/octoprint/plugins/pluginmanager/__init__.py
+++ b/src/octoprint/plugins/pluginmanager/__init__.py
@@ -671,11 +671,19 @@ class PluginManagerPlugin(
and not self._settings.get_boolean(["ignore_throttled"])
):
# currently throttled, we refuse to run
- return make_response(
- "System is currently throttled, refusing to install "
- "anything due to possible stability issues",
- 409,
+ error_msg = (
+ "System is currently throttled, refusing to install anything"
+ " due to possible stability isssues"
)
+ self._logger.error(error_msg)
+ result = {
+ "result": False,
+ "source": source,
+ "source_type": source_type,
+ "reason": error_msg,
+ }
+ self._send_result_notification("install", result)
+ return result
try:
# Py3
@@ -745,11 +753,20 @@ class PluginManagerPlugin(
"Looks like the plugin was already installed. Forcing a reinstall."
)
force = True
- except Exception:
- self._logger.exception("Could not install plugin from %s" % source)
- return make_response(
- "Could not install plugin from URL, see the log for more details", 500
- )
+ except Exception as e:
+ self._logger.exception("Could not install plugin from {}".format(source))
+ self._logger.exception("Reason: {}".format(repr(e)))
+ result = {
+ "result": False,
+ "source": source,
+ "source_type": source_type,
+ "reason": "Could not install plugin from {}, see the log for more details".format(
+ source
+ ),
+ }
+ self._send_result_notification("install", result)
+ return result
+
else:
if force:
# We don't use --upgrade here because that will also happily update all our dependencies - we'd rather
@@ -757,16 +774,21 @@ class PluginManagerPlugin(
pip_args += ["--ignore-installed", "--force-reinstall", "--no-deps"]
try:
returncode, stdout, stderr = self._call_pip(pip_args)
- except Exception:
+ except Exception as e:
self._logger.exception(
"Could not install plugin from {}".format(source)
)
- return make_response(
- "Could not install plugin from source {}, see the log for more details".format(
+ self._logger.exception("Reason: {}".format(repr(e)))
+ result = {
+ "result": False,
+ "source": source,
+ "source_type": source_type,
+ "reason": "Could not install plugin from source {}, see the log for more details".format(
source
),
- 500,
- )
+ }
+ self._send_result_notification("install", result)
+ return result
try:
result_line = list(
From 44a009fd6f3dafdea4048a0ac5a488550ab7c65b Mon Sep 17 00:00:00 2001
From: Shawn Bruce
Date: Wed, 16 Dec 2020 10:19:08 -0500
Subject: [PATCH 20/30] Handle http errors when downloading plugin files.
---
.../plugins/pluginmanager/__init__.py | 41 ++++++++++++-------
.../plugins/pluginmanager/exceptions.py | 10 +++++
2 files changed, 37 insertions(+), 14 deletions(-)
create mode 100644 src/octoprint/plugins/pluginmanager/exceptions.py
diff --git a/src/octoprint/plugins/pluginmanager/__init__.py b/src/octoprint/plugins/pluginmanager/__init__.py
index 370db223d..7c86bbabe 100644
--- a/src/octoprint/plugins/pluginmanager/__init__.py
+++ b/src/octoprint/plugins/pluginmanager/__init__.py
@@ -47,6 +47,8 @@ from octoprint.util.version import (
is_python_compatible,
)
+from . import exceptions
+
try:
from os import scandir
except ImportError:
@@ -633,21 +635,32 @@ class PluginManagerPlugin(
)
else:
- self._logger.error(
- "{} is neither an archive nor a python file, can't install that.".format(
- source
- )
+ raise exceptions.InvalidPackageFormat()
+ except requests.exceptions.HTTPError as e:
+ self._logger.error("Could not fetch plugin from server, got {}".format(e))
+ result = {
+ "result": False,
+ "source": source,
+ "source_type": source_type,
+ "reason": "Could not fetch plugin from server, got {}".format(e),
+ }
+ self._send_result_notification("install", result)
+ return result
+ except exceptions.InvalidPackageFormat:
+ self._logger.error(
+ "{} is neither an archive nor a python file, can't install that.".format(
+ source
)
- result = {
- "result": False,
- "source": source,
- "source_type": source_type,
- "reason": "Could not install plugin from {}, was neither "
- "a plugin archive nor a single file plugin".format(source),
- }
- self._send_result_notification("install", result)
- return result
-
+ )
+ result = {
+ "result": False,
+ "source": source,
+ "source_type": source_type,
+ "reason": "Could not install plugin from {}, was neither "
+ "a plugin archive nor a single file plugin".format(source),
+ }
+ self._send_result_notification("install", result)
+ return result
finally:
if folder is not None:
folder.cleanup()
diff --git a/src/octoprint/plugins/pluginmanager/exceptions.py b/src/octoprint/plugins/pluginmanager/exceptions.py
new file mode 100644
index 000000000..deddaafbe
--- /dev/null
+++ b/src/octoprint/plugins/pluginmanager/exceptions.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+from __future__ import absolute_import, division, print_function, unicode_literals
+
+__author__ = "Gina Häußge "
+__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
+__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
+
+
+class InvalidPackageFormat(Exception):
+ pass
From 2efc3b841e41803eccc7cf8cb724155b5b0387de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Mon, 11 Jan 2021 09:24:04 +0100
Subject: [PATCH 21/30] =?UTF-8?q?=E2=9C=8F=20Fix=20file=20header?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/octoprint/plugins/pluginmanager/exceptions.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/octoprint/plugins/pluginmanager/exceptions.py b/src/octoprint/plugins/pluginmanager/exceptions.py
index deddaafbe..0b4256018 100644
--- a/src/octoprint/plugins/pluginmanager/exceptions.py
+++ b/src/octoprint/plugins/pluginmanager/exceptions.py
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
-__author__ = "Gina Häußge "
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
-__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
+__copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License"
class InvalidPackageFormat(Exception):
From 93504d983cd0ab1a772e2a48f818064cdda78375 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Mon, 18 Jan 2021 14:43:51 +0100
Subject: [PATCH 22/30] =?UTF-8?q?=F0=9F=93=9D=20=20staging/hotfix=20=3D>?=
=?UTF-8?q?=20staging/bugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.versioneer-lookup | 6 ++++--
docs/development/branches.rst | 8 ++++----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/.versioneer-lookup b/.versioneer-lookup
index 9d6b84025..d6191b42b 100644
--- a/.versioneer-lookup
+++ b/.versioneer-lookup
@@ -24,8 +24,10 @@ maintenance 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
fix/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
improve/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
-# staging/hotfix is the branch for preparation of the 1.5.3 hotfix release
-staging/hotfix 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev
+# staging/bugfix is the branch for preparation of the 1.5.3 hotfix release
+# so are any bug/... branches
+staging/bugfix 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev
+bug/.* 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev
# staging/maintenance is currently the branch for preparation of 1.5.0rc4
# so is regressionfix/...
diff --git a/docs/development/branches.rst b/docs/development/branches.rst
index d2fef6255..57ec18158 100644
--- a/docs/development/branches.rst
+++ b/docs/development/branches.rst
@@ -30,8 +30,8 @@ There are three main branches in OctoPrint:
There are couple more RC and staging branches that see regular use:
-``staging/hotfix``
- Any preparation for potential hotfix releases takes place here.
+``staging/bugfix``
+ Any preparation for potential bugfix releases takes place here.
Version number follows the scheme ``..`` (e.g. ``1.5.1``) for a current release
of ``..``.
``rc/maintenance``
@@ -56,8 +56,8 @@ There are couple more RC and staging branches that see regular use:
Additionally, from time to time you might see other branches pop up in the repository.
Those usually have one of the following prefixes:
-``hotfix/...``
- Hotfixes under development that are to be merged into the ``staging/hotfix``
+``bug/...``
+ Fixes under development that are to be merged into the ``staging/bugfix``
and later the ``master`` branch.
``fix/...``
Fixes under development that are to be merged into the ``maintenance``
From e1ac1fa9834e800a53918e875593103115bdbfe0 Mon Sep 17 00:00:00 2001
From: Levi Blaney
Date: Thu, 24 Dec 2020 05:36:58 -0500
Subject: [PATCH 23/30] send events for gcode scripts
---
src/octoprint/printer/standard.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py
index a396362bc..2adb0c0cb 100644
--- a/src/octoprint/printer/standard.py
+++ b/src/octoprint/printer/standard.py
@@ -444,6 +444,12 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
if name is None or not name:
raise ValueError("name must be set")
+ event_name = name[0].upper() + name[1:]
+ event_start = "{}{}".format(event_name, "GcodeRunning")
+ payload = context.get("event", None) if isinstance(context, dict) else None
+
+ eventManager().fire(event_start, payload)
+
result = self._comm.sendGcodeScript(
name,
part_of_job=part_of_job,
@@ -453,6 +459,9 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
if not result and must_be_set:
raise UnknownScript(name)
+ event_end = "{}{}".format(event_name, "GcodeFinished")
+ eventManager().fire(event_end, payload)
+
def jog(self, axes, relative=True, speed=None, *args, **kwargs):
if isinstance(axes, basestring):
# legacy parameter format, there should be an amount as first anonymous positional arguments too
From cd9aab7eef69a0abad711239a9d99fa4d19329db Mon Sep 17 00:00:00 2001
From: Levi Blaney
Date: Tue, 5 Jan 2021 09:13:59 -0500
Subject: [PATCH 24/30] update docs with dynamic gcode events
---
docs/events/index.rst | 28 ++++++++++++++++++++++++++++
docs/features/gcode_scripts.rst | 9 +++++++++
2 files changed, 37 insertions(+)
diff --git a/docs/events/index.rst b/docs/events/index.rst
index 7fa5e733e..5407a4935 100644
--- a/docs/events/index.rst
+++ b/docs/events/index.rst
@@ -539,6 +539,34 @@ PrintResumed
.. versionchanged:: 1.4.0
+${ScriptName}Running
+ A custom :ref:`GCODE script ` has started running.
+
+ Payload:
+
+ * ``name``: the file's name
+ * ``path``: the file's path within its storage location
+ * ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
+ * ``size``: the file's size in bytes (if available)
+ * ``owner``: the user who started the print job (if available)
+ * ``time``: the time needed for the print, in seconds (float)
+
+ .. versionadded:: X.X.X
+
+${ScriptName}Finished
+ A custom :ref:`GCODE script ` has finished running.
+
+ Payload:
+
+ * ``name``: the file's name
+ * ``path``: the file's path within its storage location
+ * ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
+ * ``size``: the file's size in bytes (if available)
+ * ``owner``: the user who started the print job (if available)
+ * ``time``: the time needed for the print, in seconds (float)
+
+ .. versionadded:: X.X.X
+
.. _sec-events-available_events-gcode_processing:
GCODE processing
diff --git a/docs/features/gcode_scripts.rst b/docs/features/gcode_scripts.rst
index dbd84ef0d..a1c0d6167 100644
--- a/docs/features/gcode_scripts.rst
+++ b/docs/features/gcode_scripts.rst
@@ -43,6 +43,15 @@ The following GCODE scripts are sent by OctoPrint automatically:
Plugins may extend these scripts through :ref:`a hook `.
+.. _sec-features-gcode_scripts-events:
+
+Events
+------
+
+Every GCODE script that is executed will emit two events. The events will start with the capitalized name of the script.
+When ``afterPrintDone`` has started the event will be ``AfterPrintDoneRunning`` and once it has completed the last event
+will be ``AfterPrintDoneFinished``. You can find more details in the :ref:`Events ` documentation.
+
.. _sec-features-gcode_scripts-snippets:
Snippets
From 2474653a7f61c2e30d040894380bdafeb4492f30 Mon Sep 17 00:00:00 2001
From: Levi Blaney
Date: Mon, 18 Jan 2021 09:16:24 -0500
Subject: [PATCH 25/30] fix name scheme for gcode script events
---
docs/events/index.rst | 8 ++++----
docs/features/gcode_scripts.rst | 6 +++---
src/octoprint/printer/standard.py | 7 +++++--
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/docs/events/index.rst b/docs/events/index.rst
index 5407a4935..71a55d68e 100644
--- a/docs/events/index.rst
+++ b/docs/events/index.rst
@@ -539,7 +539,7 @@ PrintResumed
.. versionchanged:: 1.4.0
-${ScriptName}Running
+GcodeScript${ScriptName}Running
A custom :ref:`GCODE script ` has started running.
Payload:
@@ -551,9 +551,9 @@ ${ScriptName}Running
* ``owner``: the user who started the print job (if available)
* ``time``: the time needed for the print, in seconds (float)
- .. versionadded:: X.X.X
+ .. versionadded:: 1.6.0
-${ScriptName}Finished
+GcodeScript${ScriptName}Finished
A custom :ref:`GCODE script ` has finished running.
Payload:
@@ -565,7 +565,7 @@ ${ScriptName}Finished
* ``owner``: the user who started the print job (if available)
* ``time``: the time needed for the print, in seconds (float)
- .. versionadded:: X.X.X
+ .. versionadded:: 1.6.0
.. _sec-events-available_events-gcode_processing:
diff --git a/docs/features/gcode_scripts.rst b/docs/features/gcode_scripts.rst
index a1c0d6167..d836d3fad 100644
--- a/docs/features/gcode_scripts.rst
+++ b/docs/features/gcode_scripts.rst
@@ -48,9 +48,9 @@ The following GCODE scripts are sent by OctoPrint automatically:
Events
------
-Every GCODE script that is executed will emit two events. The events will start with the capitalized name of the script.
-When ``afterPrintDone`` has started the event will be ``AfterPrintDoneRunning`` and once it has completed the last event
-will be ``AfterPrintDoneFinished``. You can find more details in the :ref:`Events ` documentation.
+Every GCODE script that is executed will emit two events. The event name will start with 'GcodeScript' followed by the capitalized name
+of the script. When ``afterPrintDone`` has started the event will be ``GcodeScriptAfterPrintDoneRunning`` and once it has completed the last event
+will be ``GcodeScriptAfterPrintDoneFinished``. You can find more details in the :ref:`Events ` documentation.
.. _sec-features-gcode_scripts-snippets:
diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py
index 2adb0c0cb..d971c0128 100644
--- a/src/octoprint/printer/standard.py
+++ b/src/octoprint/printer/standard.py
@@ -444,8 +444,11 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
if name is None or not name:
raise ValueError("name must be set")
+ # .capitalize() will lowercase all letters but the first
+ # this code preserves existing CamelCase
event_name = name[0].upper() + name[1:]
- event_start = "{}{}".format(event_name, "GcodeRunning")
+
+ event_start = "GcodeScript{}Running".format(event_name)
payload = context.get("event", None) if isinstance(context, dict) else None
eventManager().fire(event_start, payload)
@@ -459,7 +462,7 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
if not result and must_be_set:
raise UnknownScript(name)
- event_end = "{}{}".format(event_name, "GcodeFinished")
+ event_end = "GcodeScript{}Finished".format(event_name)
eventManager().fire(event_end, payload)
def jog(self, axes, relative=True, speed=None, *args, **kwargs):
From 850ec59694d22775e9104f2c93f37caf17e599d0 Mon Sep 17 00:00:00 2001
From: Levi Blaney
Date: Mon, 18 Jan 2021 09:20:44 -0500
Subject: [PATCH 26/30] update authors list
---
AUTHORS.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/AUTHORS.md b/AUTHORS.md
index f7477841b..b30ca9644 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -133,6 +133,7 @@ date of first contribution):
* ["coliss86"](https://github.com/coliss86)
* ["MichaIng"](https://github.com/MichaIng)
* ["jasonbcox"](https://github.com/jasonbcox)
+ * ["shadycuz"](https://github.com/shadycuz)
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
[Daid Braam](https://github.com/daid). Parts of its communication layer and
From 1be8c23069bf5d72c947d279a37b182d72314a64 Mon Sep 17 00:00:00 2001
From: Levi Blaney
Date: Mon, 18 Jan 2021 10:21:57 -0500
Subject: [PATCH 27/30] add tests for gcode script events
---
tests/printer/test_script.py | 77 ++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 tests/printer/test_script.py
diff --git a/tests/printer/test_script.py b/tests/printer/test_script.py
new file mode 100644
index 000000000..58d250bf3
--- /dev/null
+++ b/tests/printer/test_script.py
@@ -0,0 +1,77 @@
+__author__ = "Gina Häußge "
+__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
+__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
+
+import unittest
+from unittest.mock import ANY, MagicMock, call, patch
+
+from octoprint.printer.standard import Printer
+
+
+class ScriptsTestCase(unittest.TestCase):
+ def setUp(self):
+ # mock comm
+ self.comm = MagicMock()
+
+ # mock event manager
+ self.event_manager = MagicMock()
+
+ self.event_manager_patcher = patch("octoprint.printer.standard.eventManager")
+ self.event_manager_getter = self.event_manager_patcher.start()
+ self.event_manager_getter.return_value = self.event_manager
+
+ # mock plugin manager
+ self.plugin_manager = MagicMock()
+ self.plugin_manager.get_hooks.return_value = {}
+
+ self.plugin_manager_patcher = patch("octoprint.printer.standard.plugin_manager")
+ self.plugin_manager_getter = self.plugin_manager_patcher.start()
+ self.plugin_manager_getter.return_value = self.plugin_manager
+
+ # mock settings
+ self.settings = MagicMock()
+ self.settings.getInt.return_value = 1
+ self.settings.getBoolean.return_value = False
+
+ self.settings_patcher = patch("octoprint.printer.standard.settings")
+ self.settings_getter = self.settings_patcher.start()
+ self.settings_getter.return_value = self.settings
+
+ self.printer = Printer(MagicMock(), MagicMock(), MagicMock())
+ self.printer._comm = self.comm
+
+ def tearDown(self):
+ self.settings_patcher.stop()
+ self.plugin_manager_patcher.stop()
+ self.event_manager_patcher.stop()
+
+ def test_event_name(self):
+ self.printer.script("testEvent")
+
+ self.event_manager.fire.assert_any_call("GcodeScriptTestEventRunning", ANY)
+
+ def test_event_order(self):
+ self.printer.script("EventOrder")
+
+ expected_order = [
+ call("GcodeScriptEventOrderRunning", ANY),
+ call("GcodeScriptEventOrderFinished", ANY),
+ ]
+
+ self.event_manager.fire.assert_has_calls(expected_order)
+
+ def test_payload_handling(self):
+ expected_paylod = {"payloadKey": "payloadValue"}
+ context = {"event": expected_paylod}
+
+ self.printer.script("GetPayload", context)
+
+ self.event_manager.fire.assert_called_with(ANY, expected_paylod)
+
+ self.printer.script("WrongPayload", [])
+
+ self.event_manager.fire.assert_called_with(ANY, None)
+
+ self.printer.script("WrongContext", {"noEvent": {}})
+
+ self.event_manager.fire.assert_called_with(ANY, None)
From 20c0833cbc4b0190cf608e55c21b264d42d5a23e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Mon, 18 Jan 2021 16:52:33 +0100
Subject: [PATCH 28/30] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20file=20header?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
tests/printer/test_script.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/printer/test_script.py b/tests/printer/test_script.py
index 58d250bf3..57a0fefb4 100644
--- a/tests/printer/test_script.py
+++ b/tests/printer/test_script.py
@@ -1,6 +1,5 @@
-__author__ = "Gina Häußge "
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
-__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
+__copyright__ = "Copyright (C) 2021 The OctoPrint Project - Released under terms of the AGPLv3 License"
import unittest
from unittest.mock import ANY, MagicMock, call, patch
From e9adcddf7f8dba6db4c584019f8734e662de61c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Mon, 18 Jan 2021 17:06:08 +0100
Subject: [PATCH 29/30] =?UTF-8?q?=F0=9F=92=9A=20Fix=20py2.7=20test=20issue?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We still need to stay compatible to py2, so
we need to import mock, not unittest.mock.
---
tests/printer/test_script.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/printer/test_script.py b/tests/printer/test_script.py
index 57a0fefb4..b580e4ef7 100644
--- a/tests/printer/test_script.py
+++ b/tests/printer/test_script.py
@@ -1,8 +1,10 @@
+# -*- coding: utf-8 -*-
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 The OctoPrint Project - Released under terms of the AGPLv3 License"
import unittest
-from unittest.mock import ANY, MagicMock, call, patch
+
+from mock import ANY, MagicMock, call, patch
from octoprint.printer.standard import Printer
From 5860942967618e424901412e6c41abc103cf64c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?=
Date: Tue, 19 Jan 2021 10:10:47 +0100
Subject: [PATCH 30/30] =?UTF-8?q?=F0=9F=94=96=20Preparing=20release=20of?=
=?UTF-8?q?=201.5.3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SUPPORTERS.md | 12 +++++++-----
src/octoprint/plugins/errortracking/__init__.py | 4 ++--
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/SUPPORTERS.md b/SUPPORTERS.md
index 0f64dedea..46d0e9a1d 100644
--- a/SUPPORTERS.md
+++ b/SUPPORTERS.md
@@ -6,19 +6,22 @@ thanks to everyone who contributed!
## Patrons & Sponsors
+ * 3DPrinterOS
* Andrew Moorby
* Arnljot Arntsen
* Ash King
* BigTreeTech
* Boris Hussein
* Brad Jackson
+ * BRANDON ROBERTSON
* BuildBee
* Christian Petropolis
* Christian Wolf
+ * Creality3D
* D Brian Kimmel
* DeltaMaker 3D Printers
* Dennis Breining
- * Eric Berry
+ * Diana C Rodriguez
* Eric Betts
* Ernesto Martinez
* Franziska Kunsmann
@@ -26,12 +29,10 @@ thanks to everyone who contributed!
* Greg Holloway
* Hog Duske
* Hopewell Medical Acupuncture Center
- * Hugh Blemings
* jean-claude migneault
* Jefferson Hunt
* Jeremy Cole
* Joe Pasqua
- * John Gregory Robinson
* Joshua Wills
* Justin Kaufman
* Kaile Riser
@@ -52,13 +53,14 @@ thanks to everyone who contributed!
* Mosaic Manufacturing
* Neil R. Goldberg
* Patrick Glyré
- * Patrick McGinnis
+ * Pete Barnwell
* Prof Yuh Wen Chen
* Raise3D
* Randy C. Will
* Ranjib Dey
* Richard McGuire
* Richard Michaud
+ * Richard Stocks
* Rigid3D
* Robert Gusek
* Ronald Griehsler
@@ -69,4 +71,4 @@ thanks to everyone who contributed!
* Sven Mueller
* Ulrich Kempken
-and 2147 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
+and 2225 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
diff --git a/src/octoprint/plugins/errortracking/__init__.py b/src/octoprint/plugins/errortracking/__init__.py
index 44e8f1ae5..37000bdbb 100644
--- a/src/octoprint/plugins/errortracking/__init__.py
+++ b/src/octoprint/plugins/errortracking/__init__.py
@@ -21,10 +21,10 @@ from octoprint.util.version import (
)
SENTRY_URL_SERVER = (
- "https://1e1cfca4b230430b82ce56b1fe802437@o118517.ingest.sentry.io/1373987"
+ "https://c11d13d9e92046bca4691ad1658dc543@o118517.ingest.sentry.io/1373987"
)
SENTRY_URL_COREUI = (
- "https://1c5aadba206f46cea250f3ef5066e253@o118517.ingest.sentry.io/1374096"
+ "https://a987a79a328e405a9545b8a036b420ee@o118517.ingest.sentry.io/1374096"
)
SETTINGS_DEFAULTS = {