Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
650d54d188 | ||
|
|
a2510cf32a | ||
|
|
42abcd7009 | ||
|
|
736dca4d07 | ||
|
|
f2ca247731 | ||
|
|
fa148a8b7e | ||
|
|
20a3700a2c | ||
|
|
f1cc40a87c | ||
|
|
a19c9366ed | ||
|
|
46203fd43c | ||
|
|
38f1c74379 | ||
|
|
113dcd3fc9 | ||
|
|
0b471aae9e | ||
|
|
5b795014e2 | ||
|
|
504137d249 | ||
|
|
fe7894fb5f | ||
|
|
38e8878ded |
No files matched your search
+15
-15
@@ -158,18 +158,18 @@ jobs:
|
||||
password: ${{ secrets.testpypi_password }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
|
||||
#publish-on-pypi:
|
||||
# name: 📦 Publish tagged releases to PyPI
|
||||
# if: github.event_name == 'release'
|
||||
# needs: publish-on-testpypi
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: ⬇ Download build result
|
||||
# uses: actions/download-artifact@v1
|
||||
# with:
|
||||
# name: dist
|
||||
# path: dist
|
||||
# - name: 📦 Publish to index
|
||||
# uses: pypa/gh-action-pypi-publish@master
|
||||
# with:
|
||||
# password: ${{ secrets.pypi_password }}
|
||||
publish-on-pypi:
|
||||
name: 📦 Publish tagged releases to PyPI
|
||||
if: github.event_name == 'release'
|
||||
needs: publish-on-testpypi
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ⬇ Download build result
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
- name: 📦 Publish to index
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
password: ${{ secrets.pypi_password }}
|
||||
+4
-4
@@ -26,11 +26,11 @@ improve/.* 1.4.1 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
|
||||
# staging/maintenance is currently the branch for preparation of 1.4.0rc7
|
||||
# so is regressionfix/...
|
||||
staging/maintenance 1.4.0rc7 d99af420acb9d5b18a4f60f9cae8abb458e131d4 pep440-dev
|
||||
regressionfix/.* 1.4.0rc7 d99af420acb9d5b18a4f60f9cae8abb458e131d4 pep440-dev
|
||||
staging/maintenance 1.4.1rc2 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
||||
regressionfix/.* 1.4.1rc2 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
||||
|
||||
# staging/devel is currently inactive (but has the 1.4.0rc7 namespace)
|
||||
staging/devel 1.4.0rc7 d99af420acb9d5b18a4f60f9cae8abb458e131d4 pep440-dev
|
||||
# staging/devel is currently inactive (but has the 1.4.1rc2 namespace)
|
||||
staging/devel 1.4.1rc2 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
||||
|
||||
# every other branch is a development branch and thus gets resolved to 1.5.0-dev for now
|
||||
.* 1.5.0 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
+1
-1
@@ -66,4 +66,4 @@ thanks to everyone who contributed!
|
||||
* Sven Mueller
|
||||
* Ulrich Kempken
|
||||
|
||||
and 1886 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
and 1892 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
@@ -10,6 +10,7 @@ Bundled Plugins
|
||||
action_command_notification.rst
|
||||
action_command_prompt.rst
|
||||
announcements.rst
|
||||
tracking.rst
|
||||
appkeys.rst
|
||||
backup.rst
|
||||
discovery.rst
|
||||
@@ -22,4 +23,4 @@ Bundled Plugins
|
||||
pluginmanager.rst
|
||||
printer_safety_check.rst
|
||||
softwareupdate.rst
|
||||
tracking.rst
|
||||
virtual_printer.rst
|
||||
@@ -0,0 +1,26 @@
|
||||
.. _sec-bundledplugins-virtual_printer:
|
||||
|
||||
Virtual Printer
|
||||
===============
|
||||
|
||||
The Virtual Printer plugin provides a virtual printer to connect to during development. It is able to simulate various
|
||||
firmware quirks, communication issues and can be heavily configured through ``config.yaml``. See
|
||||
:ref:`the development documentation on details and usage <sec-development-virtual-printer>`.
|
||||
|
||||
The virtual printer has been included in OctoPrint ever since the first releases back in 2013, however as of
|
||||
OctoPrint 1.4.1 it has finally been fully extracted into its own bundled plugin.
|
||||
|
||||
.. _sec-bundledplugins-virtual_printer-configuration:
|
||||
|
||||
Configuring the plugin
|
||||
----------------------
|
||||
|
||||
Please refer to :ref:`the development documentation <sec-development-virtual-printer-config>`.
|
||||
|
||||
.. _sec-bundledplugins-virtual_printer-sourcecode:
|
||||
|
||||
Source Code
|
||||
-----------
|
||||
|
||||
The source of the Virtual Printer plugin is bundled with OctoPrint and can be
|
||||
found in its source repository under ``src/octoprint/plugins/virtual_printer``.
|
||||
@@ -3,7 +3,7 @@
|
||||
Setting up the virtual printer for debugging
|
||||
============================================
|
||||
|
||||
OctoPrint includes, by default, a virtual printer plugin. This plugin allows you to debug OctoPrint's serial
|
||||
OctoPrint includes, by default, a :ref:`virtual printer plugin <sec-bundledplugins-virtual_printer>`. This plugin allows you to debug OctoPrint's serial
|
||||
communication without connecting to an actual printer. Furthermore, it is possible to create certain edge conditions
|
||||
that may be hard to reproduce with a real printer.
|
||||
|
||||
@@ -19,9 +19,7 @@ The virtual printer can be enabled through its Settings pane.
|
||||
Virtual printer configuration options
|
||||
-------------------------------------
|
||||
|
||||
The config.yaml file has many configuration options for the virtual printer that allow you to fine-tune its behavior.
|
||||
|
||||
Please see the relevant :ref:`config.yaml section <sec-configuration-config_yaml-devel>` for the full details.
|
||||
There many configuration options via ``config.yaml`` for the virtual printer that allow you to fine-tune its behavior:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
@@ -201,7 +199,7 @@ Log file
|
||||
--------
|
||||
|
||||
Once activated, the virtual printer will log all serial communication in the ``plugin_virtual_printer_serial.log`` file
|
||||
that can be found in the OctoPrint settings folder.
|
||||
that can be found in the OctoPrint logs folder.
|
||||
|
||||
.. _sec-development-virtual-printer-debug:
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ SETUP_REQUIRES = [
|
||||
INSTALL_REQUIRES = [
|
||||
# additional OctoPrint plugins that are maintained on a different release cycle
|
||||
"OctoPrint-FirmwareCheck>=2020.06.22",
|
||||
"OctoPrint-FileCheck>=2020.06.22",
|
||||
"OctoPrint-FileCheck>=2020.07.06",
|
||||
|
||||
# the following dependencies are non trivial to update since later versions introduce backwards incompatible
|
||||
# changes that might affect plugins, or due to other observed problems
|
||||
@@ -33,6 +33,7 @@ INSTALL_REQUIRES = [
|
||||
"markupsafe>=1.1,<2.0", # Jinja dependency, newer versions require Python 3
|
||||
"tornado==5.1.1", # newer versions require Python 3
|
||||
"markdown>=3.1,<3.2", # newer versions require Python 3
|
||||
"rsa==4.0", # newer versions require Python 3
|
||||
"regex!=2018.11.6", # avoid broken 2018.11.6. See #2874
|
||||
|
||||
# anything below this should be checked on releases for new versions
|
||||
@@ -51,7 +52,6 @@ INSTALL_REQUIRES = [
|
||||
"sarge==0.1.5post0",
|
||||
"netifaces>=0.10.9,<1",
|
||||
"pylru>=1.2,<2",
|
||||
"rsa>=4.0,<5",
|
||||
"pkginfo>=1.5.0.1,<2",
|
||||
"requests>=2.23.0,<3",
|
||||
"semantic_version>=2.8.5,<3",
|
||||
|
||||
@@ -16,6 +16,9 @@ class AsyncLogHandlerMixin(logging.Handler):
|
||||
super(AsyncLogHandlerMixin, self).__init__(*args, **kwargs)
|
||||
|
||||
def emit(self, record):
|
||||
if getattr(self._executor, "_shutdown", False):
|
||||
return
|
||||
|
||||
try:
|
||||
self._executor.submit(self._emit, record)
|
||||
except Exception:
|
||||
@@ -25,6 +28,10 @@ class AsyncLogHandlerMixin(logging.Handler):
|
||||
# noinspection PyUnresolvedReferences
|
||||
super(AsyncLogHandlerMixin, self).emit(record)
|
||||
|
||||
def close(self):
|
||||
self._executor.shutdown(wait=True)
|
||||
super(AsyncLogHandlerMixin, self).close()
|
||||
|
||||
|
||||
class CleaningTimedRotatingFileHandler(logging.handlers.TimedRotatingFileHandler):
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ from octoprint.util.version import get_octoprint_version_string, is_released_oct
|
||||
from flask import jsonify
|
||||
from flask_babel import gettext
|
||||
|
||||
SENTRY_URL_SERVER = "https://a928e3eb40864ed086f765d6976bf792@o118517.ingest.sentry.io/1373987"
|
||||
SENTRY_URL_COREUI = "https://26fe846c0ff34995a39bbb67a04b3f42@o118517.ingest.sentry.io/1374096"
|
||||
SENTRY_URL_SERVER = "https://183f89aa959044fa8ff4e2a55383ed36@o118517.ingest.sentry.io/1373987"
|
||||
SENTRY_URL_COREUI = "https://fcd757c96a204000828449be1ba53d3b@o118517.ingest.sentry.io/1374096"
|
||||
|
||||
SETTINGS_DEFAULTS = dict(enabled=False,
|
||||
enabled_unreleased=False,
|
||||
|
||||
@@ -14,7 +14,7 @@ from octoprint.settings import valid_boolean_trues
|
||||
from octoprint.server.util.flask import no_firstrun_access, with_revalidation_checking, check_etag
|
||||
from octoprint.access import ADMIN_GROUP
|
||||
from octoprint.access.permissions import Permissions
|
||||
from octoprint.util import to_bytes, TemporaryDirectory
|
||||
from octoprint.util import to_bytes, to_native_str, TemporaryDirectory
|
||||
from octoprint.util.pip import LocalPipCaller
|
||||
from octoprint.util.version import get_octoprint_version_string, get_octoprint_version, is_octoprint_compatible, is_python_compatible
|
||||
from octoprint.util.platform import get_os, is_os_compatible
|
||||
@@ -429,7 +429,7 @@ class PluginManagerPlugin(octoprint.plugin.SimpleApiPlugin,
|
||||
if ext in PluginManagerPlugin.ARCHIVE_EXTENSIONS:
|
||||
return True
|
||||
|
||||
kind = filetype.guess(path)
|
||||
kind = filetype.guess(to_native_str(path))
|
||||
if kind:
|
||||
return ".{}".format(kind.extension) in PluginManagerPlugin.ARCHIVE_EXTENSIONS
|
||||
return False
|
||||
|
||||
@@ -102,6 +102,7 @@ class TrackingPlugin(octoprint.plugin.SettingsPlugin,
|
||||
if not self._settings.get_boolean(["enabled"]):
|
||||
return
|
||||
self._track_shutdown()
|
||||
self._executor.shutdown(wait=True)
|
||||
|
||||
##~~ EventHandlerPlugin
|
||||
|
||||
|
||||
@@ -903,6 +903,8 @@ class Server(object):
|
||||
observer.stop()
|
||||
observer.join()
|
||||
eventManager.fire(events.Events.SHUTDOWN)
|
||||
|
||||
self._logger.info("Calling on_shutdown on plugins")
|
||||
octoprint.plugin.call_plugin(octoprint.plugin.ShutdownPlugin,
|
||||
"on_shutdown",
|
||||
sorting_context="ShutdownPlugin.on_shutdown")
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large.
Load diff
+26
-14
@@ -2405,17 +2405,20 @@ class MachineCom(object):
|
||||
else:
|
||||
timeout = settings().getFloat(["serial", "timeout", "detection"])
|
||||
|
||||
def attempt_handshake():
|
||||
if self._serial.timeout != timeout:
|
||||
self._serial.timeout = timeout
|
||||
self._timeout = monotonic_time() + timeout
|
||||
|
||||
log("Handshake attempt #{}".format(self._detection_retry + 1))
|
||||
|
||||
self._detection_retry += 1
|
||||
self._do_send_without_checksum(b"", log=False) # new line to reset things
|
||||
self.sayHello(tags={"trigger:detection", })
|
||||
|
||||
while len(self._detection_candidates) > 0:
|
||||
if self._detection_retry < self.DETECTION_RETRIES:
|
||||
if self._serial.timeout != timeout:
|
||||
self._serial.timeout = timeout
|
||||
self._timeout = monotonic_time() + timeout
|
||||
|
||||
log("Handshake attempt #{}".format(self._detection_retry + 1))
|
||||
|
||||
self._detection_retry += 1
|
||||
self._do_send_without_checksum(b"", log=False) # new line to reset things
|
||||
self.sayHello(tags={"trigger:detection", })
|
||||
attempt_handshake()
|
||||
return
|
||||
|
||||
else:
|
||||
@@ -2429,13 +2432,12 @@ class MachineCom(object):
|
||||
else:
|
||||
self._serial.baudrate = b
|
||||
|
||||
if self._serial.timeout != timeout:
|
||||
self._serial.timeout = timeout
|
||||
self._timeout = monotonic_time() + timeout
|
||||
|
||||
log("Trying port {}, baudrate {}".format(p, b))
|
||||
self._detection_retry = 0
|
||||
|
||||
attempt_handshake()
|
||||
return
|
||||
|
||||
except Exception:
|
||||
self._log("Unexpected error while setting baudrate {}: {}".format(b, get_exception_string()))
|
||||
self._logger.exception("Unexpected error while setting baudrate {}".format(b))
|
||||
@@ -5023,7 +5025,7 @@ class BufferedReadlineWrapper(wrapt.ObjectProxy):
|
||||
timeout = serial.Timeout(self._timeout)
|
||||
|
||||
while not timeout.expired():
|
||||
self._buffered += self.read(min(self.in_waiting, 1))
|
||||
self._buffered += self.read(self.in_waiting)
|
||||
|
||||
# check for terminator, if it's there we have found our line
|
||||
termpos = self._buffered.find(terminator)
|
||||
@@ -5033,6 +5035,16 @@ class BufferedReadlineWrapper(wrapt.ObjectProxy):
|
||||
del self._buffered[:termpos + termlen]
|
||||
return bytes(line)
|
||||
|
||||
if timeout.expired():
|
||||
break
|
||||
|
||||
c = self.read(1)
|
||||
if not c:
|
||||
# EOF
|
||||
break
|
||||
|
||||
self._buffered += c
|
||||
|
||||
return b""
|
||||
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('Connection test against virtual printer', () => {
|
||||
.should('contain', 'Connect')
|
||||
.click();
|
||||
|
||||
cy.get('#connection .accordion-inner')
|
||||
cy.get('#connection .accordion-inner', {timeout: 10000})
|
||||
.should('not.be.visible');
|
||||
cy.get('#state .accordion-inner strong:first')
|
||||
.should('contain', 'Operational');
|
||||
|
||||
@@ -2,7 +2,8 @@ describe('Login tests', () => {
|
||||
const username = 'admin';
|
||||
const password = 'test';
|
||||
|
||||
context('Successful login', () => {
|
||||
describe.skip('Successful login', () => {
|
||||
|
||||
it('logs in', () => {
|
||||
cy.visit('/');
|
||||
cy.get('#login-user')
|
||||
@@ -76,7 +77,7 @@ describe('Login tests', () => {
|
||||
})
|
||||
});
|
||||
|
||||
context('Unauthorized', () => {
|
||||
context('Unauthorized login attempts', () => {
|
||||
it('uses wrong user name', () => {
|
||||
cy.visit('/');
|
||||
|
||||
|
||||
Binary file not shown.
+855
-2614
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user