Commit graph

33 commits

Author SHA1 Message Date
Gina Häußge
14bd0632c0 parse_requirements => Requirement.parse
Since we only ever handle one requirement here, the parse_requirements
generator (which btw needs a next m() is not the best choice.

Also extracted install command cleanup into class method and added tests
for that.

cc @markwal
2017-11-28 12:02:43 +01:00
Gina Häußge
b2d70de144 Environment detection & logging on startup
Incl. OctoPi version & RPi model through bundled plugin that only
gets loaded if OctoPi is detected.
2017-11-10 17:32:59 +01:00
Gina Häußge
69f9c523f9 Add utm tags to announcement links 2017-11-09 10:49:39 +01:00
Gina Häußge
abfcc6e5aa Fix deletion of unrendered timelapses
If the filename contained a [] pair, the file would not match the glob
pattern used for selecting for deletion.

Backporting the glob.escape function from Python 3.4 and using it here
should fix that. We only use our own ported version if glob.escape
doesn't exist - that should reduce redundant code once we become Python
3 compatible.
2017-10-10 12:41:47 +02:00
Gina Häußge
cf053ddbed Temperatures may in fact be negative
E.g. in case of a disconnected thermistor, or when it is really
really cold. Make sure our parsing doesn't get confuse by this and
thinks that

  ok T:150.0/210.0 T0:-55.7/0 T1:150.0/210.0

is actually only T and T1 being reported by the firmware, causing
stuff to be wrongly canonicalized thanks to T/T1 being Smoothie's way
of reporting dual extruder setups.

Fixes #2007
2017-07-14 11:18:04 +02:00
Gina Häußge
f8d225a768 Support for parsing GCODE subcodes
Hook handlers will get any parsed subcode as optional keyword argument
"subcode".
2017-07-05 17:56:46 +02:00
Gina Häußge
7ab4d12548 Better error resilience against wrong user manager
Also improved get_class by using importlib instead of complicated
climbing through the whole module tree.
2017-06-29 15:07:17 +02:00
Gina Häußge
6a1b162e7b Support for temperature autoreporting instead of polling
Now also detects capabilities reported by (extended) M115 output and
if AUTOREPORT_TEMP is available enables it with the configured
autoreport interval and disables active polling.

Implements #1679
2017-06-06 18:46:23 +02:00
Gina Häußge
559238ca3c More solid parsing of line number from resends
Matches:

  * Resend:23
  * Resend:N23
  * Resend:N:23
  * rs 23
  * rs N23
  * rs N:23
  * rs N23 Expected checksum 109

Based on issue reported via PR #300
2017-03-09 17:08:01 +01:00
Gina Häußge
fa16037e9a Unit test for M115 response parsing 2017-03-09 16:39:16 +01:00
Gina Häußge
0d8fdfae26 Trust Tc over T when parsing temps from the firmware 2016-10-17 10:27:06 +02:00
Gina Häußge
aca3dfae49 Merge branch 'maintenance' into devel
# Conflicts:
#	CHANGELOG.md
2016-09-23 14:35:31 +02:00
Gina Häußge
080a6e9ccd Extend atomic_write to allow setting & persisting file permissions 2016-09-23 14:26:33 +02:00
Gina Häußge
cba742a94f Fix some more left-overs of py2<->py3 PRs
Related to #1411, #1414 and #1415
2016-07-15 12:46:53 +02:00
Gina Häußge
47b7acdfbc Merge branch 'dev/python3A' of https://github.com/ByReaL/OctoPrint into pr/ByReaL/dev/python3A
Conflicts:
	src/octoprint/plugins/virtual_printer/virtual.py
	src/octoprint/printer/standard.py
2016-07-15 12:28:19 +02:00
MirceaDan
c33a9f9aa2 from __future__ import absolute_import, division, print_function
changed the behavior to import division and print to be consistent
across all app and similar with python 3.x
2016-07-15 00:16:58 -07:00
MirceaDan
149cc8c7c5 python 3 changes exceptions, queue and asesrtEqual
1) import Queue is now lower caps

2) exceptions
except KeyError as e:

3) assertEquals is deprecated but assertEqual does exactly same thing
2016-07-14 23:53:39 -07:00
Gina Häußge
5fb1c2d7a0 Merge branch 'fix/useIsHiddenPath' into devel 2015-11-20 10:12:33 +01:00
Gina Häußge
454f16a7c3 Fixed a broken unit test (pro tip: test new tests before committing...) 2015-11-20 10:12:15 +01:00
Gina Häußge
73d8ff9991 Merge branch 'fix/useIsHiddenPath' into devel
Conflicts:
	tests/util/test_file_helpers.py
2015-11-20 10:07:46 +01:00
Gina Häußge
a731f748d9 Moved existing hidden file checks to utilize octoprint.util.is_hidden_path 2015-11-20 10:02:06 +01:00
Gina Häußge
1f90096a89 Merge branch 'fix/hiddenTemplatesListed' into devel
Conflicts:
	src/octoprint/util/__init__.py
	tests/util/test_file_helpers.py
2015-11-19 19:04:21 +01:00
Gina Häußge
83f66e133e Do not include hidden files in listed gcode scripts 2015-11-19 18:58:56 +01:00
Gina Häußge
ab97abf13e Some fixes and unit tests for octoprint.util.atomic_write, .bom_aware_open and .tempdir
(cherry picked from commit 4fcb853)
2015-11-19 15:15:35 +01:00
Gina Häußge
4fcb853ef2 Some fixes and unit tests for octoprint.util.atomic_write, .bom_aware_open and .tempdir 2015-11-03 18:11:54 +01:00
Gina Häußge
d34790e74e Unit tests for octoprint.util.RepeatedTimer
(cherry picked from commit 7362067)
2015-10-20 12:07:31 +02:00
Gina Häußge
024cf88589 Unit tests for octoprint.util.CountedEvent 2015-08-28 17:14:58 +02:00
Gina Häußge
73620678c4 Unit tests for octoprint.util.RepeatedTimer 2015-08-28 16:56:14 +02:00
Gina Häußge
59993bfca4 Fixed & refactored temperature parsing
T-only lines were not properly parsed. Should now be fixed to
be associated to currently selected extruder. Also added unit
tests for the temperature parsing.

While at it also extracted regexes and added unit tests for command
parsing (gcode & parameters)
(cherry picked from commit f6a259f)
2015-08-24 14:55:42 +02:00
Gina Häußge
f6a259fde3 Fixed & refactored temperature parsing
T-only lines were not properly parsed. Should now be fixed to
be associated to currently selected extruder. Also added unit
tests for the temperature parsing.

While at it also extracted regexes and added unit tests for command
parsing (gcode & parameters)
2015-08-21 15:47:03 +02:00
Gina Häußge
22c73d831a More cleanup for the feedback controls
Preprocessing for better performancy, unit tests for preprocessing, controls don't need a type anymore (makes things way less complicated and repetitive)
2015-03-10 21:49:18 +01:00
Gina Häußge
e79fd99a41 Fixed comment handling in GCODE lines, escapes are no longer stripped
A good example while late night commits can sometimes be a bad idea.
2015-03-06 11:37:06 +01:00
Gina Häußge
975cc5ccfc GCODE scripts are now Jinja templates
Refactored some things in octoprint.util.comm and octoprint.settings, added migration function to get users of the devel version up to date with their gcode scripts. Migration function will be removed again one week from now.
2015-03-06 01:42:09 +01:00