Commit graph

2767 commits

Author SHA1 Message Date
Gina Häußge
ce00a069fa Added conversion for README.md to rst for PyPi 2015-10-23 12:08:36 +02:00
Gina Häußge
bdadab6993 We want pep440-post by default 2015-10-23 10:07:15 +02:00
Gina Häußge
05d6cac67a Define where our README is located so that it gets rendered correctly on pypi 2015-10-23 10:02:05 +02:00
Gina Häußge
528192b3c0 Fixed a merge error while migrating versioneer update 2015-10-23 09:55:14 +02:00
Gina Häußge
729d23b2c0 Fixed versioneer lookup file again
Runaway regex ;)
(cherry picked from commit 78277ac)
2015-10-23 09:54:46 +02:00
Koen Kooi
2e566c5ee1 versioneer lookup: add support for detached checkouts
When doing 'git checkout <rev>' or 'git checkout <tag>' there will be no
branch info:

	$ git branch
	* (detached from 96fc70b)

After whitelisting '\(detached.*' we get:

	$ python setup.py version
	running version
	got version from git {'version': '1.2.5-1-gfd73e02', 'branch': 'HEAD',
	'full': 'fd73e02f4fa9f286407ad688feeeee3ebaffea60'}
	Version is currently: 1.2.5-1-gfd73e02

The '-1-gfd73e02' is this commit on top of the 1.2.5 tag.

While detached checkouts should be discouraged some buildsystems (e.g.
OpenEmbedded) have no real way to avoid it, which is what this patch
fixes. Actual people doing a checkout should use a branch.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
(cherry picked from commit 987e637)
2015-10-23 09:54:21 +02:00
Gina Häußge
e875d042a7 Refreshed versioneer again
(cherry picked from commit 7cd0adb)
2015-10-23 09:53:25 +02:00
Gina Häußge
f05f850175 Switched to new version of versioneer
Versions should now be PEP440 compatible.
(cherry picked from commit 711810d)
2015-10-23 09:53:13 +02:00
Gina Häußge
9ce9af28c3 Updating versioneer & switch to PEP440 versioning
(cherry picked from commit 137db0b)
2015-10-23 09:51:50 +02:00
Gina Häußge
57bf457d97 Fix: current filename in job data should never be prefixed with /
That was a tiny detail missing in 8bef18c2a8 that
caused issues with detecting which file was currently selected on the printer's
SD card (for "do not delete that" checks on the API).
2015-10-22 13:42:57 +02:00
Gina Häußge
adf39cdf21 maintenance branch is now 1.2.8-dev 2015-10-20 14:54:16 +02:00
Gina Häußge
6c622f7c43 Fixed indentation of change log 2015-10-20 12:24:23 +02: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
aa5099340e Two new callbacks for RepeatedTimer when cancelled or condition untrue
(cherry picked from commit 9b9ecfe)
2015-10-20 12:07:24 +02:00
Gina Häußge
693633bd1d RepeatedTimer now supports callback when timer stops
(cherry picked from commit 3c5a976)
2015-10-20 12:05:12 +02:00
Gina Häußge
758062133c Updated changelog for 1.2.7 2015-10-20 11:55:34 +02:00
Gina Häußge
c55fea666d Updated required versions of psutil and netifaces
Also see #1090
2015-10-19 09:33:48 +02:00
Gina Häußge
c932e496fa SWU: Show reload dialog after update
The notification and the (forced) dialog afterwards were way too
redundant.
2015-10-08 17:08:36 +02:00
Gina Häußge
bbbdb3dde6 Note that z-based timelapses don't work when printing from SD 2015-10-08 10:22:09 +02:00
Gina Häußge
b9460b4890 Merge branch 'fix/uiEscaping' into maintenance 2015-10-08 09:52:08 +02:00
Gina Häußge
947f4c89cc Fixed a win-only issue causing the gcode view not to reload on file modification 2015-10-07 18:52:18 +02:00
Gina Häußge
5f982ec6c8 Merge branch 'fix/atomicWrites' into maintenance 2015-10-07 17:53:43 +02:00
Gina Häußge
dcf2e51b21 Moved filemanager method tests to test_filemanager.py 2015-10-07 17:50:08 +02:00
Gina Häußge
85e6ae8e82 Fixed a unit test that broke by switching to atomic_write 2015-10-07 17:45:07 +02:00
Gina Häußge
859ea0d0e4 Added mime type guessing for downloads to Tornado 2015-10-07 17:19:18 +02:00
Gina Häußge
9cf21aa036 Also set caching headers for downloads to discourage client-side caching
At least if necessary (added new boolean flag to the constructor of
LargeResponseHandler for that). While at it also rename UrlForwardHandler
to UrlProxyHandler (it does not forward, it proxies) and make it aware of
ETag and Expires headers.
2015-10-07 12:25:25 +02:00
Gina Häußge
637adc3095 Fix: LargeResponseHandler was wrongly caching ETag value
ETag values returned with download responses were cached internally within
the LargeResponseHandler class, with the file's path as key. That let to
problems once the content changed and hence the ETag value actually
becoming invalid. Since the path however stayed the same, the same ETag
value for the modified file was assumed and a 304 Not Modified response
was generated.

This patch changes the behaviour of LargeResponseHandler to use
the last modified date of the file as the ETag value and alternatively allowing
an etag generator function to be provided as constructor parameter as well
to use for calculating (or disabling) the ETag header dependant on the
situation.
2015-10-06 18:19:53 +02:00
Gina Häußge
548f976d35 Some more defensive escaping for various settings in the UI
Entering HTML fragments into the webcam stream URL could cause
issues, anything injected via Jinja should now be escaped properly.
2015-10-06 13:41:54 +02:00
Gina Häußge
45c92cb1f4 Fix: Open GCODE files als utf-8, replacing encoding errors
Also detect files that contain a BOM and strip it.
Internal handling of GCODE file contents switched to unicode.

 Should take care of #1077
2015-10-05 19:43:40 +02:00
Gina Häußge
f83d5aa89f Fix: Use atomic writes for all save processes
That includes uploaded files, profiles, caching files, settings and user
directories.
2015-10-05 18:07:43 +02:00
Gina Häußge
abf073340f Fixed reporting of duration needed for capturing timelapse postroll
Needs to be calculated differently for time based and z-triggered. Capture interval
was not taken properly into account.
(cherry picked from commit 9284ff4)
2015-10-02 18:22:44 +02:00
Gina Häußge
918ffa2557 Refactored timelapse core
Capturing is now queue based, rendering will not start until all images have been captured,
and timed postroll does not depend on system time anymore.

Also refactored some of the names to be python naming compliant while at it.
(cherry picked from commit 4f5dc70)
2015-10-02 18:18:31 +02:00
Gina Häußge
5cc8ec5cc3 Better wording for plugin system startup & sorted plugin list of ALL plugins 2015-09-30 16:00:32 +02:00
Gina Häußge
fce7b40b51 pip: Use string representation of version for display in UI 2015-09-28 20:20:56 +02:00
Gina Häußge
1178fe9e95 Support sudo for installing plugins, but warn about it 2015-09-28 19:53:30 +02:00
Gina Häußge
2f24e73fcb Merge branch 'fix/logsDocsBug' into maintenance 2015-09-28 13:08:57 +02:00
Gina Häußge
9ff5c36370 Fixed a documentation bug 2015-09-28 13:08:35 +02:00
Gina Häußge
1b4ea75466 Fix: Don't have file upload widgets listen to drop events by default
That way they won't be triggered by gcode uploads when all they are interested in
are uploads via a single file input.
2015-09-28 12:55:32 +02:00
Gina Häußge
b4b5689bc4 Fix: Correctly handle unset Content-Type header for command requests 2015-09-22 15:23:50 +02:00
Gina Häußge
fd4271a962 PipCaller: Added back missing member variable 2015-09-22 11:39:45 +02:00
Gina Häußge
65bc28a03e PMGR: Added configuration dialog and info re used pip binary & version 2015-09-22 11:36:57 +02:00
Gina Häußge
c26515c13d PipCaller: Allow update of used pip command 2015-09-22 11:35:47 +02:00
Gina Häußge
25a4d4b79b SWU: Track check origins, ignore if from unavailable plugin
There was a problem with software update checks configurations stored in
config.yaml for which the providing plugin was then removed, since those
check definitions then lacked their default values to be merged on whatever
was stored in config.yaml, causing incomplete check configurations as a
consequence over which the plugin tripped.

This patch fixes that in that it tracks which check config keys are provided
by plugins and only returns those as the active check configurations that
belong to plugins that are still in the system.

TODO: This is only half of the solution. Check configurations of plugins
that are being uninstalled should be removed from the config if the
user decides to remove any settings by the plugin too. We need some
adjustments in the lifecycle tracking in order to make this possible
however, so for now this must suffice to at least prevent any errors from
occuring when incomplete configs are encountered.
(cherry picked from commit 8af8b8f)
2015-09-21 16:46:44 +02:00
Gina Häußge
43ca4d8252 SWU: Do not overwrite check information again
Current version information of OctoPrint from a check definition
could be overwritten for checks under certain circumstances.
2015-09-21 16:42:11 +02:00
Gina Häußge
b56ba6589c Ignore update definitions that are lacking the type
Caused a KeyError so far, update definitions that are broken like that
will now just be ignored instead.

Closes #1057
(cherry picked from commit 2efc5c4)
2015-09-11 08:36:02 +02:00
Gina Häußge
5c9b507cb7 User user id, not user name, for all user operations
(cherry picked from commit 7021b9f)
2015-09-11 08:35:08 +02:00
Gina Häußge
cd7ac032f4 Fixed an issue that cause user sessions to not be properly associated
Sessions could get duplicated, wrongly saved etc. The reason was not
persisting the actual user object to the internal session map (but the
LocalProxy instead). That could lead to multiple sessions being
created for one login, or the session user being set to an
anonymous user, or various other odd effects depending on timing.
(cherry picked from commit 8aeac51)
2015-09-11 08:20:16 +02:00
Gina Häußge
a2e5fc0c5c maintenance branch is now 1.2.7-dev 2015-09-02 20:18:18 +02:00
Gina Häußge
536bb31965 Forgot the commit link in the changelog 2015-09-02 19:59:49 +02:00
Gina Häußge
ef46a49430 Also included #1041 in 1.2.6 2015-09-02 19:55:24 +02:00