97 Commits

Author SHA1 Message Date
Lipu Fei
5e255b548e Fix TestLegacyProfileReader 2019-11-07 10:21:01 +01:00
Remco Burema
298eb27c7f
Add possibility to check material-profiles.
Needed to add the filename to deserialize, feels a bit unsafe as an optional parameter, will discuss tomorrow.
part of CURA-6856
2019-10-29 17:45:19 +01:00
Nino van Hooff
c62ff262ed Change SDK version to 7.0.0
CURA-6858
2019-10-21 14:51:34 +02:00
Jaime van Kessel
87e0b8629a Add convenience script for running complete coverage 2019-08-30 16:32:11 +02:00
Lipu Fei
6992fd2991 Update plugin versions to match package versions
CURA-6019
2018-12-17 13:03:21 +01:00
Ghostkeeper
c235f339ae
Increment API version to 6
All plug-ins now have to re-check whether they are still compatible with the current version of Cura.

Contributes to issue CURA-6019.
2018-12-14 17:29:02 +01:00
Ghostkeeper
87cbc3907c
Convert to string before storing in configparser
Because configparser can only handle strings.

Contributes to issue CURA-5929.
2018-11-13 12:05:14 +01:00
Ghostkeeper
7bd55f5064
Add test for read() function
This is complex.
I don't want to get into the actual translations from the DoD here.

Contributes to issue CURA-5929.
2018-11-12 16:28:29 +01:00
Ghostkeeper
7e87a303cb
Remove config_section parameter
Just always take 'profile'. We don't need to test with anything else. Just adjust the data to it.

Contributes to issue CURA-5929.
2018-11-12 13:49:13 +01:00
Ghostkeeper
e18ea4bca4
Expect a NoSectionError if testing with a section that is missing
We want to get that error in order to debug.

Contributes to issue CURA-5929.
2018-11-12 13:47:24 +01:00
Ghostkeeper
53c9cdc3fe
Add alternative scenarios for prepareLocals
Contributes to issue CURA-5929.
2018-11-12 13:42:14 +01:00
Ghostkeeper
91e8c177fe
Add test for prepareLocal
Contributes to issue CURA-5929.
2018-11-12 13:35:18 +01:00
Ghostkeeper
0bf7bf4cbe
Fix handling dictionaries without 'defaults' section
According to the test, this should return an empty dict then.

Contributes to issue CURA-5929.
2018-11-12 13:33:44 +01:00
Ghostkeeper
bbbb08c793
Add test for prepareDefaults
Contributes to issue CURA-5929.
2018-11-12 13:02:28 +01:00
Ghostkeeper
27aff4e5da
Fix typing issues
Because this function now has typing, it's raising a load of issues with it.

Contributes to issue CURA-5929.
2018-11-12 12:48:49 +01:00
Ghostkeeper
6022ed0f23
Update target version in DoD
There are no changes to these settings, luckily.
This target version is now only here for documentation (like source_version was). It is no longer actually used by the code.

Contributes to issue CURA-5929.
2018-11-12 12:06:00 +01:00
Ghostkeeper
6ad682b00d
Don't serialise legacy profile via Profile instance
That profile instance was being explicitly set to version 1 (but then serialised as version 4) and then deserialised with upgrade, so the upgrade was thinking it was upgrading from version 1 to 4, but it was actually upgrading a file which was already at version 4. We shouldn't use the Profile() instance at all but just perform the upgrade on simple string data generated by the configparser.
This also updates the format to the newest version (since that was easiest for me to reimplement) but we don't need to ever update this again because it gets passed through the version upgrade system, which upgrades it from version 4000005 to the latest version in the future.

Contributes to issue CURA-5929.
2018-11-12 12:02:49 +01:00
Ghostkeeper
9d94b0d63e
Rename input vs. output parsers
Technically you could re-use the variable name but that is confusing.

Contributes to issue CURA-5929.
2018-11-12 11:16:33 +01:00
Ghostkeeper
4c6744b6fc
Code style: Space around binary operators
I just looked for lines with interpolation = None because I was looking for another possible bug, but fixing this in the meanwhile too.
2018-10-10 14:28:50 +02:00
Aleksei S
fe9cada459 Increase plugin API version to 5
CURA-5627
2018-08-27 13:59:00 +02:00
Lipu Fei
af02dc2758 Only use setMetaDataEntry() 2018-07-11 11:14:57 +02:00
Ghostkeeper
54a03723ab
Set encoding correctly when opening files everywhere
Otherwise the encoding is interpreted differently on Windows and Mac.
2018-06-11 11:09:07 +02:00
Lipu Fei
c3fe53123b Create module cura.ReaderWriters
CURA-4644

Move all reader writer classes into cura.ReaderWriters.
2018-04-05 15:14:15 +02:00
Diego Prado Gesto
8c5673dd3c Change target version of the dictionary of doom to be compliant with the
new instance container's version number.
2018-03-27 11:44:24 +02:00
Lipu Fei
a4a1832a58 Fix legacy profile importing for CFP
CURA-4876
2018-01-30 09:49:31 +01:00
Lipu Fei
f1363fab73 Move newline format
CURA-4863
2018-01-29 16:33:52 +01:00
Lipu Fei
d351eba758 Use \n instead of \r for message formatting
CURA-4863
2018-01-29 14:55:56 +01:00
Aleksei S
750a86d2fd Added new lines to distinguis error message
CURA-4876
2018-01-29 13:47:24 +01:00
Lipu Fei
63ac8412e6 Fix importing legacy INI quality profiles
CURA-4876
2018-01-29 11:18:16 +01:00
Ghostkeeper
8734460aff
Use unique name too if importing multiple legacy profiles
Otherwise all of them get the same name and they don't match global/extruder stacks together properly any more.

Contributes to issue CURA-4715.
2017-12-19 17:36:20 +01:00
Ghostkeeper
d9bc561d73
Set the extruder metadata to its ID
Not the actual extruder!

Contributes to issue CURA-4715.
2017-12-19 17:28:05 +01:00
Ghostkeeper
05e232b498
Move LegacyProfileReader-specific logic into the plug-in itself
This had the documentation that it should edit the profiles returned by LegacyProfileReader. Instead, just return correct profiles from the reader...

Contributes to issue CURA-4715.
2017-12-19 17:16:32 +01:00
Ghostkeeper
039c85677a
Also return a global profile
Since we always have an extruder now, also for single-extrusion printers, we need to return both a global profile and an extruder profile.

Contributes to issue CURA-4713.
2017-12-19 16:40:03 +01:00
Ghostkeeper
569715492c
Correct ID if importing multiple legacy profiles
They have to be made unique.

Contributes to issue CURA-4715.
2017-12-19 16:05:42 +01:00
Ghostkeeper
1029d4509c
Merge branch 'master' into feature_local_container_server 2017-12-08 16:03:05 +01:00
Lipu Fei
a425a1c51b Fix legacy profile loading
CURA-4075
2017-12-01 14:57:59 +01:00
Lipu Fei
7b4cb11240 Fix legacy profile upgrade
CURA-4075

Only for single-extrusion machines just like before.
2017-12-01 11:20:52 +01:00
Ghostkeeper
ebe766a7c8
Set definition by their ID
The new function for setting the definition just adds the ID to the metadata.

Contributes to issue CURA-4243.
2017-11-24 16:45:09 +01:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
Ghostkeeper
cd4bffb380
Set author to Ultimaker B.V. instead of Ultimaker
To be consistent with the rest of the plug-ins and with the material files.

Contributes to issue CURA-3857.
2017-06-28 13:50:37 +02:00
Lipu Fei
4ea8cc448a Use semantic versioning for all plugin.json
CURA-3712
2017-06-22 08:57:47 +02:00
Lipu Fei
73f598ff9f Fix code style
CURA-3712
2017-06-22 08:54:04 +02:00
Jaime van Kessel
e3629cec39 Replaced catalog metadata entry with i18n-catalog
CURA-3712 & Cura-3856
2017-06-21 14:24:00 +02:00
Jaime van Kessel
44125d3275 Moved certain meta data entries to seperate file
CURA-3856 & CURA-3712
2017-06-21 11:22:35 +02:00
Jaime van Kessel
9f13338c17 Codestyle 2016-12-06 14:28:25 +01:00
Ghostkeeper
aef0880a1f
Fix setting the quality_type of imported profile
The metadata entry was renamed a while ago.

Contributes to issue CURA-2785.
2016-10-25 13:24:56 +02:00
Ghostkeeper
d439015773
Abort importing profile if we have no global container stack
You shouldn't be able to trigger it anyway, but if you do, it'll give a proper error that the import failed.

Contributes to issue CURA-2785.
2016-10-25 13:20:02 +02:00
Ghostkeeper
06521d7c49
Cache global container stack
We'll need it multiple times. Could be a bit faster.

Contributes to issue CURA-2785.
2016-10-25 13:16:41 +02:00
Jaime van Kessel
48fc957695 We now throw an exception when trying to read legacy profile when multi extrusion machine is selected
CURA-2421
2016-09-21 09:45:05 +02:00
Jaime van Kessel
3c0971c375 Legacy profile reader no longer creates profiles for multi-extrusion machines
CURA-2421
2016-09-19 16:22:47 +02:00