Gina Häußge
04391495e7
Merge branch 'devel' into dev/commRefactoringNG
2021-05-20 17:12:41 +02:00
Gina Häußge
b202c6db54
🔥 Remove Py2 related code
2021-05-20 15:42:37 +02:00
Gina Häußge
49621a65b0
Merge branch 'maintenance' into devel
2021-05-20 12:23:26 +02:00
Gina Häußge
f912adcd33
✨ Support unicode file names on Py3
...
If we are on py3 and thus can rely on pathvalidate, we'll now no longer
slugify uploaded files names, but try to keep them as close to the
original name as possible, including unicode and emoji and whatnot. This
requires the underlying file system to support this, so just in case the
old behaviour can be enforced by setting the config flag
feature.enforceReallyUniversalFilenames to true.
Closes #4078
2021-05-20 10:36:01 +02:00
Gina Häußge
741fac4396
Merge branch 'devel' into dev/commRefactoringNG
2021-03-16 15:26:42 +01:00
Gina Häußge
fd2ece0f13
🎨 pyupgrade --py37-plus
2021-03-11 16:01:02 +01:00
Gina Häußge
65706d4171
Merge branch 'devel' into dev/commRefactoringNG
...
# Conflicts:
# THIRDPARTYLICENSES.md
# src/octoprint/__init__.py
# src/octoprint/filemanager/__init__.py
# src/octoprint/filemanager/storage/local.py
# src/octoprint/logging/handlers.py
# src/octoprint/plugin/__init__.py
# src/octoprint/plugins/virtual_printer/__init__.py
# src/octoprint/plugins/virtual_printer/virtual.py
# src/octoprint/printer/__init__.py
# src/octoprint/printer/estimation.py
# src/octoprint/printer/standard.py
# src/octoprint/server/__init__.py
# src/octoprint/server/api/__init__.py
# src/octoprint/server/api/connection.py
# src/octoprint/server/api/files.py
# src/octoprint/server/api/settings.py
# src/octoprint/server/util/flask.py
# src/octoprint/server/views.py
# src/octoprint/settings.py
# src/octoprint/static/css/octoprint.css
# src/octoprint/static/js/app/viewmodels/connection.js
# src/octoprint/static/js/app/viewmodels/settings.js
# src/octoprint/static/less/octoprint.less
# src/octoprint/templates/dialogs/settings/serialconnection.jinja2
# src/octoprint/templates/index.jinja2
# src/octoprint/templates/sidebar/connection.jinja2
# src/octoprint/timelapse.py
# src/octoprint/util/__init__.py
# tests/filemanager/test_filemanager.py
# tests/plugin/test_settings.py
2021-02-10 16:59:45 +01:00
Miroslav Šedivý
95441dafd4
📦 Use Python3 default for class inheriting from object
2021-01-25 18:04:40 +01:00
Gina Häußge
8ef57e2ab7
Merge branch 'maintenance' into devel
...
# Conflicts:
# src/octoprint/filemanager/storage.py
# src/octoprint/plugins/announcements/__init__.py
2020-11-25 13:19:01 +01:00
Gina Häußge
c12447dca2
♻️ Extract slugify/sanitizing into util method
...
Reduces code duplication
2020-11-23 17:14:57 +01:00
Gina Häußge
100764b03e
🎨 Remove some left-over pragma headers & future imports
2020-10-07 21:37:22 +02:00
Gina Häußge
18e6bfc7f8
Merge branch 'maintenance' into devel
...
# Conflicts:
# .github/workflows/build.yml
# docs/conf.py
# docs/development/environment.rst
# docs/sphinxext/codeblockext.py
# docs/sphinxext/onlineinclude.py
# setup.py
# src/octoprint/access/groups.py
# src/octoprint/access/permissions.py
# src/octoprint/access/users.py
# src/octoprint/cli/__init__.py
# src/octoprint/cli/analysis.py
# src/octoprint/cli/client.py
# src/octoprint/cli/config.py
# src/octoprint/cli/plugins.py
# src/octoprint/cli/server.py
# src/octoprint/cli/user.py
# src/octoprint/environment.py
# src/octoprint/events.py
# src/octoprint/filemanager/__init__.py
# src/octoprint/filemanager/analysis.py
# src/octoprint/filemanager/destinations.py
# src/octoprint/filemanager/storage.py
# src/octoprint/filemanager/util.py
# src/octoprint/logging/__init__.py
# src/octoprint/logging/handlers.py
# src/octoprint/plugin/__init__.py
# src/octoprint/plugin/core.py
# src/octoprint/plugins/action_command_notification/__init__.py
# src/octoprint/plugins/action_command_prompt/__init__.py
# src/octoprint/plugins/appkeys/__init__.py
# src/octoprint/plugins/backup/__init__.py
# src/octoprint/plugins/corewizard/__init__.py
# src/octoprint/plugins/corewizard/subwizards.py
# src/octoprint/plugins/discovery/__init__.py
# src/octoprint/plugins/errortracking/__init__.py
# src/octoprint/plugins/gcodeviewer/__init__.py
# src/octoprint/plugins/logging/__init__.py
# src/octoprint/plugins/pi_support/__init__.py
# src/octoprint/plugins/softwareupdate/cli.py
# src/octoprint/plugins/softwareupdate/updaters/single_file_plugin.py
# src/octoprint/plugins/softwareupdate/updaters/sleep_a_bit.py
# src/octoprint/plugins/softwareupdate/version_checks/always_current.py
# src/octoprint/plugins/softwareupdate/version_checks/bitbucket_commit.py
# src/octoprint/plugins/softwareupdate/version_checks/github_release.py
# src/octoprint/plugins/softwareupdate/version_checks/httpheader.py
# src/octoprint/plugins/softwareupdate/version_checks/jsondata.py
# src/octoprint/plugins/softwareupdate/version_checks/never_current.py
# src/octoprint/plugins/softwareupdate/version_checks/pypi_release.py
# src/octoprint/plugins/tracking/__init__.py
# src/octoprint/plugins/virtual_printer/virtual.py
# src/octoprint/printer/__init__.py
# src/octoprint/printer/estimation.py
# src/octoprint/printer/profile.py
# src/octoprint/printer/standard.py
# src/octoprint/server/__init__.py
# src/octoprint/server/api/__init__.py
# src/octoprint/server/api/system.py
# src/octoprint/server/api/users.py
# src/octoprint/server/util/flask.py
# src/octoprint/server/util/tornado.py
# src/octoprint/server/util/webassets.py
# src/octoprint/settings.py
# src/octoprint/slicing/__init__.py
# src/octoprint/timelapse.py
# src/octoprint/util/__init__.py
# src/octoprint/util/comm.py
# src/octoprint/util/commandline.py
# src/octoprint/util/connectivity.py
# src/octoprint/util/fixes.py
# src/octoprint/util/gcodeInterpreter.py
# src/octoprint/util/jinja.py
# src/octoprint/util/json/__init__.py
# src/octoprint/util/net.py
# src/octoprint_client/__init__.py
# src/octoprint_setuptools/__init__.py
# tests/filemanager/test_filemanager.py
# tests/filemanager/test_localstorage.py
# tests/plugin/test_core.py
# tests/plugin/test_settings.py
# tests/plugin/test_types_blueprint.py
# tests/plugin/test_types_settings.py
# tests/server/api/test_system.py
# tests/server/util/test_flask.py
# tests/server/util/test_tornado.py
# tests/slicing/test_slicingmanager.py
# tests/test_daemon.py
# tests/timelapse/test_timelapse_helpers.py
# tests/util/test_comm.py
# tests/util/test_file_helpers.py
# tests/util/test_pip.py
# tests/util/test_repeated_timer.py
# tests/util/test_resettable_timer.py
# versioneer.py
2020-10-07 21:08:44 +02:00
Gina Häußge
b5be8f3eae
🎨 Add codemods to pre-commit, fix flake8
2020-10-07 16:27:11 +02:00
Gina Häußge
fbfb34df58
🎨 Switch to use of isort
2020-10-07 13:15:52 +02:00
Gina Häußge
1f93b2355a
🎨 Switch to black formatting
2020-10-07 13:13:06 +02:00
Gina Häußge
26151b3c42
⚡ ️ Even more aggressive caching of uploads
...
The LocalFileStorage now maintains its own internal cache for all
tracked folders and will only refresh entries if the last modification
of a (sub)folder has changed.
2020-10-01 11:44:50 +02:00
Gina Häußge
54b3d770e7
♻ mock => unittest.mock
2020-07-06 15:05:33 +02:00
Gina Häußge
80f94946e3
Revert "➕ ➖ Switch from awesome-slugify to python-slugify"
...
This reverts commit 73fbd15b
The change causes a full rescan for renaming on the uploads folder.
Unintended, needs to be looked at closer at a later date.
2020-06-03 18:42:48 +02:00
Gina Häußge
73fbd15bca
➕ ➖ Switch from awesome-slugify to python-slugify
2020-06-03 15:13:00 +02:00
Gina Häußge
cc5c19dde9
Merge branch 'devel' into dev/commRefactoringNG
...
# Conflicts:
# src/octoprint/filemanager/storage/local.py
2019-03-06 15:12:27 +01:00
Gina Häußge
4e2afbc170
Merge branch 'maintenance' into devel
...
# Conflicts:
# src/octoprint/filemanager/storage.py
# src/octoprint/util/__init__.py
# src/octoprint/util/comm.py
2019-03-06 14:49:42 +01:00
Gina Häußge
92618362e1
💚 Forgot to adjust the tests for d071684
2019-03-05 17:01:10 +01:00
Gina Häußge
4be18c2668
🚧 WIP: Fixing tests
2019-02-15 12:56:57 +01:00
Matthias Urlichs
67c5a5e168
went through "except Exception:" with a fine comb
2019-02-03 16:39:01 +01:00
Matthias Urlichs
6bf8384c35
Kill of u"" (visual clutter)
2019-02-03 14:25:41 +01:00
Matthias Urlichs
1dacbc35bf
Use unicode_literals __future__
2019-02-03 14:09:57 +01:00
Matthias Urlichs
abfffa3231
Remove deprecated unittest.TestCase.assertDictContainsSubset
2019-01-28 14:14:23 +01:00
Matthias Urlichs
e056ccdf29
Testing: exception args
2019-01-28 14:14:23 +01:00
Matthias Urlichs
7fcc3551ca
We need text mode for JSON and YAML
2019-01-28 14:14:23 +01:00
Matthias Urlichs
a1a15e40e0
Replace all bare "except:" handlers
...
These are never what we want, as they swallow KeyboardInterrupt.
TODO: many of these handlers really should be more specific and/or
log that they replaced an unparseable value with a default.
2019-01-28 07:50:55 +01:00
Matthias Urlichs
c05b6572c5
Fix coding= headers
2019-01-27 17:36:16 +01:00
MirceaDan
c623e90ebc
chnaged teh default from binary to text mode
...
seams like open was defaulting to text mode, since now is specified in clear i made sure it matches with teh previous default
2018-12-01 17:43:19 -08:00
MirceaDan
337e49208a
py23 compat: using io.open instead of open
...
for python3 and python2 to work teh same io.open must be used for file handling
2018-11-30 00:32:57 -08:00
Gina Häußge
135cf6a9cc
Migrate file storage metadata to json
...
As suggested by @CapnBry, that should give us a significant speed
boost considering that yaml serialization and deserialization is some
orders of magnitude slower than json.
We only do that for the file metadata for now - it has the biggest gain
to expect from a speed boost, and having the configuration as yaml
actually has its readability advantages.
2018-04-25 17:01:24 +02:00
Gina Häußge
42ac133436
Support full UTF8 file names
...
Files (and folders) are still slugified to ASCII for storage on disk,
but now the original filename is stored alongside in metadata.yaml
and used for display in the file list and print status.
The slicing dialog also inherits that display name for use as base
for the suggested GCODE name.
Internally, everything still depends completely on the slugified
ASCII version.
This implements #2094
2017-10-12 18:08:41 +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
e4828450c9
Merge branch 'fix/slugifyFilenames' into devel
...
Conflicts:
setup.py
2016-01-11 16:43:38 +01:00
Gina Häußge
7743372ee4
Slugify file names on local storage
...
Just stripping anything non-ASCII leads to errors with UTF-8 only
filenames.
Closes #1181
2016-01-11 16:42:05 +01:00
Gina Häußge
306fd164d7
Refactoring of localstorage and added tests
...
* improved internal metadata handling
* less code duplication
* individual locks per metadata file
* unit tests for copy and move operations
2015-11-18 10:47:49 +01:00
Dan Lipsitt
810765ddc9
MacOS: fix path quirk in filemanager unit tests.
...
On MacOS, `tempfile.mkdtemp()` doesn't necessarily return a canonical
path (it uses `/private/var` instead of `/var`, but they are the same
thing). Since the `filemanager.storage` module canonicalizes paths,
tests were erroneously failing due to prefix match failures.
2015-08-06 17:03:58 -07:00
Gina Häußge
ea1fe29a5e
Fixed unit tests again
2015-04-16 13:31:41 +02:00
Gina Häußge
28738a5179
More documentation and unit tests
2015-02-18 17:16:37 +01:00
Gina Häußge
cd973adedf
Improved slicing and file management
...
- File management is prepared to support folders (UI still lacking support)
- STL files are now first class citizens
- can be managed via the file list (and filtered from it)
- can be sliced on demand
- Slicing now happens via plugins
- Added Cura plugin
- uses CuraEngine directly instead of full Cura installation
- Cura profile importer for importing profiles from regular Cura installs via settings dialog
- TODO: UI for editing profiles
- API for slicing and slicing profile management
2014-10-06 17:34:07 +02:00