I'm not really awake today, am I? The functionality happened to still work because of how our real data is structured right now, but the tests still failed. Those are successful now.
Contributes to issue CURA-3427.
We now have a (format) version and a setting version. Ideally we'd like major-minor version numbers in our profiles. However, introducing major-minor version numbers requires substantial changes to the version upgrade manager to compare version numbers, find a path towards the current version, or even keeping track of the current version. Therefore we just collapse the two version numbers into one: Multiply the major version number by a million and you'll never exceed it in the minor versioning. The only problem is that we now have to update the versioning for all of our three upgrade plug-ins, because they all need to know locally how to find the version number of their file types (because the upgrade manager has no knowledge of the file types) and they have no access to each other because a plug-in may be disabled.
Contributes to issue CURA-3427.
The material is no longer listed in the profiles and no longer filtered for, so we don't need to create a new profile for each material.
Contributes to issues CURA-844 and CURA-2320.
It is checked if the file data is None or empty (the upgrade is then considered 'failed'). But to unpack the file data, it needs to be a tuple.
Contributes to issue CURA-844.
The current settings in 2.1 specified a machine instance. In 2.2 they specify a machine definition. There is not enough information in one file to be able to translate that.
Contributes to issue CURA-844.
Falling back to normal.inst.cfg isn't enough. That profile may be filtered out by the machine, variant and material. We need to fall back to a different quality profile depending on the machine, variant and material.
Contributes to issue CURA-844.
Custom profiles are always quality changes. They should always say quality in the original anyway; that was an assumption we've made thousands of times.
Contributes to issue CURA-844.
We don't know the actual quality type, the quality profile that this profile is based on. Maybe there isn't one, even. As a solution we always base imported custom quality profiles on normal.
Contributes to issue CURA-844.
These profiles were not thought of as built-in. Instead, they were sorta constructed from pieces. That complex piece of code won't be necessary any more after I add this and after Cura 2.3 has proper profile inheritance again.
Contributes to issue CURA-844.
The quality profile now sometimes gets updated to a quality profile, and sometimes to a quality-changes profile, depending on whether the profile is built-in or not.
Contributes to issue CURA-2006.
This prevents a mix-up of how material names should be translated for quality profiles and how material names should be translated for material profiles.
Contributes to issue CURA-844.
One was in metadata. That is the correct one. The other is unnecessary and was being ignored, but we don't need to write it.
Contributes to issue CURA-844.
Currently it sets the user profile to 'empty', which is bad because empty is read-only. But it allows me to continue for now. I'll find a solution for that later.
Contributes to issue CURA-844.
Turns out that copy.copy() doesn't work on ConfigParsers. It returns a different instance but modifying that instance still modifies the old configs. Deep copy isn't allowed. But this dictionary copy works.
Contributes to issue CURA-844.