__init__.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. from typing import Dict, Any
  2. from . import VersionUpgrade35to40
  3. upgrade = VersionUpgrade35to40.VersionUpgrade35to40()
  4. def getMetaData() -> Dict[str, Any]:
  5. return {
  6. "version_upgrade": {
  7. # From To Upgrade function
  8. ("preferences", 6000005): ("preferences", 6000006, upgrade.upgradePreferences),
  9. ("definition_changes", 4000005): ("definition_changes", 4000006, upgrade.upgradeInstanceContainer),
  10. ("quality_changes", 4000005): ("quality_changes", 4000006, upgrade.upgradeInstanceContainer),
  11. ("quality", 4000005): ("quality", 4000006, upgrade.upgradeInstanceContainer),
  12. ("user", 4000005): ("user", 4000006, upgrade.upgradeInstanceContainer),
  13. ("machine_stack", 4000005): ("machine_stack", 4000006, upgrade.upgradeStack),
  14. ("extruder_train", 4000005): ("extruder_train", 4000006, upgrade.upgradeStack),
  15. },
  16. "sources": {
  17. "preferences": {
  18. "get_version": upgrade.getCfgVersion,
  19. "location": {"."}
  20. },
  21. "machine_stack": {
  22. "get_version": upgrade.getCfgVersion,
  23. "location": {"./machine_instances"}
  24. },
  25. "extruder_train": {
  26. "get_version": upgrade.getCfgVersion,
  27. "location": {"./extruders"}
  28. },
  29. "definition_changes": {
  30. "get_version": upgrade.getCfgVersion,
  31. "location": {"./definition_changes"}
  32. },
  33. "quality_changes": {
  34. "get_version": upgrade.getCfgVersion,
  35. "location": {"./quality_changes"}
  36. },
  37. "quality": {
  38. "get_version": upgrade.getCfgVersion,
  39. "location": {"./quality"}
  40. },
  41. "user": {
  42. "get_version": upgrade.getCfgVersion,
  43. "location": {"./user"}
  44. }
  45. }
  46. }
  47. def register(app) -> Dict[str, Any]:
  48. return {"version_upgrade": upgrade}