Instead of customizing an existing tool that does a lot of stuff
that we don't need but lacks what we DO need (branch based virtual
tags), now there's a custom single file implementation that mixes
concepts from versioneer, miniver and the lookup that so far was
implemented in OctoPrint's custom build of versioneer, and does so
with less overhead.
Closes#4685
* Handles M115 GEOMETRY capability report
* No need to use a separate format string...
* Origin has no effect on machine height...
* ♻️ virtual: refactor area report
Now depends on a single config setting `m115ReportArea`.
If true, the virtual printer will generate an area report from the current
printer profile and include it in the M115 reponse. Ships as false
by default.
---------
Co-authored-by: Gina Häußge <gina@octoprint.org>
- Use "M20 L T" (if CAPABILITY_EXTENDED_M20 is available) which gives
us long file names but also file timestamps.
- Wire up that timestamp into "date" field which gives us "Uploaded: ...
ago" for files on SD card. Sorting by upload date also works.
- Implementing this also fixes parsing of response to (for example
manually sent) "M20 T" command. Octoprint assumed that third entry
in response is always long file name while with M20 T it is timestamp.
- Add conversion routines between M20 T timestamp and unix timestamp. Wire
up that conversion in virtual printer.
See also https://reprap.org/wiki/G-code#M20:_List_SD_card
* pyupgrade
* various new codemods
* manual removal of Py2/3 compat imports
* manual adjustment of docs, examples, tests
* to_str is now the new to_unicode, deprecated
redirection to to_bytes has been removed
* to_native_str has been redirected to point to
to_str
* to_unicode has been redirected to point to
to_str
* atomic_write refactored to use
NamedTemporaryDirectory
* various other fixes/refactorings all over the
place
We need to update the links to the py2 windows files. Also make py2
environment instructions optional across the board, they really should
only be relevant for maintenance going forward.
To profile a given request, just add ?perfprofile to the url. Instead of
returning the actual results, an HTML presentation of the profiling
results is returned.
This is only enabled when debug mode is enabled.