23 Commits

Author SHA1 Message Date
Saumya Jain
44c7345f3b added catalog as an extra argument for translations
translations of backend plugin such as gradual flow

CURA-11732
2024-03-26 15:31:56 +01:00
Remco Burema
c378be22b7 Correct for pluralize/rename typo'd filename in backend.
done as part of CURA-10994
2023-10-05 16:15:07 +02:00
Remco Burema
1e5f1d3fa5 Make it possible to have translated 'appended' settings.
Just translate them locally. See the backend (Uranium) implementation for this for more details.

done as part of CURA-10994
2023-10-05 16:07:12 +02:00
j.spijker@ultimaker.com
e9f316d5d9 Add logging and cleanup for backend plugins
This commit adds improved logging for backend plugins in Cura. Now,
each time a plugin is started, an info log is generated with the used
command.
All plugin output will also be logged to a separate file for easier
debugging. Additionally, a cleanup operation has been added to remove
existing plugin logs before generating a new one, to prevent the file
size from getting too large.

Contributes to CURA-11064
2023-09-20 14:45:04 +02:00
j.spijker@ultimaker.com
a9f2d879f7 "Add logging to backend plugin process"
This commit introduces logging to the backend plugin process in the Cura application. The output from the plugin process is now redirected to a log file, which is created in the application's data storage directory. This can be useful for debugging and troubleshooting purposes by providing more transparency about what's happening in the plugin process. A new dependency 'os' has been added to the 'BackendPlugin.py'. Also, the 'Resources' module has been imported from 'UM'. The changes mainly affect the way the 'subproccess.Popen' function is used - its 'stdout' and 'stderr' parameters were adjusted accordingly.

Contributes to CURA-11064
2023-09-20 14:37:35 +02:00
j.spijker@ultimaker.com
5cd233b1cf revert logging 2023-09-20 13:18:22 +02:00
c.lamboo
d4449c680f Find available port when starting backend plugin
CURA-11067
2023-09-20 11:24:28 +02:00
Remco Burema
1e360e1ea0 Output on error-stream doesn't necessarily mean an error.
done as part of CURA-11064
2023-09-19 17:34:19 +02:00
c.lamboo
63942b72a8 Log backend plugin std out
CURA-11064
2023-09-19 17:07:46 +02:00
Jelle Spijker
45510d04ed
Added ability for backend plugins to determine their usability
Modified BackendPlugin.py and StartSliceJob.py to allow plugins to decide when they should be used. The 'usePlugin'
method was added to enable a plugin to return a boolean indicating if it should be used or not, e.q.: start up and
connect to the services.

Contributes to CURA-11031
2023-09-13 07:22:07 +02:00
Jelle Spijker
fa52469f5d
Make popen kwargs OS specific
Contribute to CURA-10619
2023-08-17 08:13:50 +02:00
jellespijker
55d27bd0af Don't create shell windows when starting plugin
Contribute to CURA-10619
2023-08-17 00:15:32 +02:00
Jelle Spijker
8cc54b0d89
Add missing catalog to BackendPlugin
Contribute to CURA-10619
2023-08-16 16:08:05 +02:00
Jelle Spijker
b483537c43
Explicitly use address for plugin_command
Contributes CURA-10619
2023-08-16 14:26:54 +02:00
Jelle Spijker
f634a5bd44 Send over plugin name and version
Might be needed during the handshake between engine and plugin

Contributes to CURA-10619
2023-08-15 11:27:15 +02:00
Jelle Spijker
dead016ed9 Add error messages to BackendPlugin and enhance exception handling
Exception handling in BackendPlugin has been improved by adding
user-friendly error messages for various exceptions. Errors during
backend plugin start or stop will now trigger a message to the user,
providing more context about the cause of the failure. This makes it
easier for users to understand and resolve possible issues. In addition,
 the EngineBackend stop function has been modified to forcibly stop all
 running backend plugins instead of allowing multiple plugins to run
 simultaneously.
2023-08-10 05:56:24 +02:00
Casper Lamboo
4f2b038a59
Use "PLUGIN" as default appender_type 2023-08-03 13:04:14 +02:00
Remco Burema
4c82098745 Backend-plugins don't have to register separately for extra setting-defs.
Also they now have their own appender-type (previously it was _always_ 'PLUGIN', now the other plugins are 'EXTRA').

part of CURA-10722
2023-07-28 15:13:48 +02:00
Remco Burema
7c810eeca8 Ease of use; each backend-plugin can now provide additional settings.
Any overriding cals that does so, should just add 'self.definition_file_paths' to load their additional settings. However, at the moment of this commit, you should still suppy setting_definitions_appender in the list of __init__.register for the plugin.

part of CURA-10722
2023-07-28 14:52:56 +02:00
Jelle Spijker
982ba7e36b
Add log statement when starting plugin
Revert =

Contributes CURA-10475 and CURA-10625
2023-07-18 11:17:15 +02:00
Jelle Spijker
289b71cd9f
Use common cmdline practices for named args
Contributes CURA-10475 and CURA-10625
2023-07-18 11:11:27 +02:00
Jaime van Kessel
3037320b03
Send slotID's for backend_plugins
CURA-10717
2023-07-11 15:18:52 +02:00
Jaime van Kessel
f3bc7bf28a
Move backend plugin logic to Cura from Uranium
I was running into abstraction issues when it was defined in Uranium.
Instead of trying to fight those, it's just easier to move it to Cura

CURA-10717
2023-07-11 11:24:28 +02:00