umu-commander 1.4.0__tar.gz → 1.5.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of umu-commander might be problematic. Click here for more details.

Files changed (33) hide show
  1. {umu_commander-1.4.0 → umu_commander-1.5.2}/.idea/misc.xml +1 -1
  2. {umu_commander-1.4.0 → umu_commander-1.5.2}/.idea/umu-commander.iml +1 -1
  3. {umu_commander-1.4.0 → umu_commander-1.5.2}/.idea/workspace.xml +130 -60
  4. {umu_commander-1.4.0 → umu_commander-1.5.2}/PKG-INFO +10 -2
  5. {umu_commander-1.4.0 → umu_commander-1.5.2}/README.md +9 -1
  6. {umu_commander-1.4.0 → umu_commander-1.5.2}/pyproject.toml +5 -1
  7. umu_commander-1.5.2/src/umu_commander/classes.py +81 -0
  8. umu_commander-1.5.2/src/umu_commander/configuration.py +72 -0
  9. umu_commander-1.5.2/src/umu_commander/database.py +43 -0
  10. {umu_commander-1.4.0 → umu_commander-1.5.2}/src/umu_commander/main.py +22 -9
  11. umu_commander-1.5.2/src/umu_commander/proton.py +82 -0
  12. {umu_commander-1.4.0 → umu_commander-1.5.2}/src/umu_commander/tracking.py +26 -32
  13. {umu_commander-1.4.0 → umu_commander-1.5.2}/src/umu_commander/umu_config.py +42 -50
  14. {umu_commander-1.4.0 → umu_commander-1.5.2}/src/umu_commander/util.py +4 -5
  15. umu_commander-1.5.2/tests/test_config.py +23 -0
  16. {umu_commander-1.4.0 → umu_commander-1.5.2}/tests/test_db.py +9 -8
  17. {umu_commander-1.4.0 → umu_commander-1.5.2}/tests/test_proton.py +4 -4
  18. {umu_commander-1.4.0 → umu_commander-1.5.2}/tests/test_tracking.py +7 -5
  19. umu_commander-1.4.0/src/umu_commander/classes.py +0 -43
  20. umu_commander-1.4.0/src/umu_commander/configuration.py +0 -22
  21. umu_commander-1.4.0/src/umu_commander/db.py +0 -66
  22. umu_commander-1.4.0/src/umu_commander/proton.py +0 -66
  23. {umu_commander-1.4.0 → umu_commander-1.5.2}/.gitignore +0 -0
  24. {umu_commander-1.4.0 → umu_commander-1.5.2}/.idea/.gitignore +0 -0
  25. {umu_commander-1.4.0 → umu_commander-1.5.2}/.idea/inspectionProfiles/Project_Default.xml +0 -0
  26. {umu_commander-1.4.0 → umu_commander-1.5.2}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  27. {umu_commander-1.4.0 → umu_commander-1.5.2}/.idea/modules.xml +0 -0
  28. {umu_commander-1.4.0 → umu_commander-1.5.2}/.idea/vcs.xml +0 -0
  29. {umu_commander-1.4.0 → umu_commander-1.5.2}/LICENSE.txt +0 -0
  30. {umu_commander-1.4.0 → umu_commander-1.5.2}/example_config.toml +0 -0
  31. {umu_commander-1.4.0 → umu_commander-1.5.2}/src/umu_commander/__init__.py +0 -0
  32. {umu_commander-1.4.0 → umu_commander-1.5.2}/tests/__init__.py +0 -0
  33. {umu_commander-1.4.0 → umu_commander-1.5.2}/tests/test_manual.py +0 -0
@@ -3,5 +3,5 @@
3
3
  <component name="Black">
4
4
  <option name="sdkName" value="Python 3.12" />
5
5
  </component>
6
- <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12" project-jdk-type="Python SDK" />
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (umu-commander)" project-jdk-type="Python SDK" />
7
7
  </project>
@@ -6,7 +6,7 @@
6
6
  <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
7
7
  <excludeFolder url="file://$MODULE_DIR$/.venv" />
8
8
  </content>
9
- <orderEntry type="jdk" jdkName="Python 3.12" jdkType="Python SDK" />
9
+ <orderEntry type="jdk" jdkName="Python 3.12 (umu-commander)" jdkType="Python SDK" />
10
10
  <orderEntry type="sourceFolder" forTests="false" />
11
11
  </component>
12
12
  </module>
@@ -4,7 +4,23 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="043620f1-711f-4c27-a2e2-15fa501e8ce0" name="Changes" comment="Preparations for building" />
7
+ <list default="true" id="043620f1-711f-4c27-a2e2-15fa501e8ce0" name="Changes" comment="Preparations for building">
8
+ <change afterPath="$PROJECT_DIR$/src/umu_commander/config.py" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/tests/test_config.py" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/.idea/umu-commander.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/umu-commander.iml" afterDir="false" />
12
+ <change beforePath="$PROJECT_DIR$/pyproject.toml" beforeDir="false" afterPath="$PROJECT_DIR$/pyproject.toml" afterDir="false" />
13
+ <change beforePath="$PROJECT_DIR$/src/umu_commander/configuration.py" beforeDir="false" />
14
+ <change beforePath="$PROJECT_DIR$/src/umu_commander/db.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/umu_commander/db.py" afterDir="false" />
15
+ <change beforePath="$PROJECT_DIR$/src/umu_commander/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/umu_commander/main.py" afterDir="false" />
16
+ <change beforePath="$PROJECT_DIR$/src/umu_commander/proton.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/umu_commander/proton.py" afterDir="false" />
17
+ <change beforePath="$PROJECT_DIR$/src/umu_commander/tracking.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/umu_commander/tracking.py" afterDir="false" />
18
+ <change beforePath="$PROJECT_DIR$/src/umu_commander/umu_config.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/umu_commander/umu_config.py" afterDir="false" />
19
+ <change beforePath="$PROJECT_DIR$/src/umu_commander/util.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/umu_commander/util.py" afterDir="false" />
20
+ <change beforePath="$PROJECT_DIR$/tests/test_db.py" beforeDir="false" afterPath="$PROJECT_DIR$/tests/test_db.py" afterDir="false" />
21
+ <change beforePath="$PROJECT_DIR$/tests/test_proton.py" beforeDir="false" afterPath="$PROJECT_DIR$/tests/test_proton.py" afterDir="false" />
22
+ <change beforePath="$PROJECT_DIR$/tests/test_tracking.py" beforeDir="false" afterPath="$PROJECT_DIR$/tests/test_tracking.py" afterDir="false" />
23
+ </list>
8
24
  <option name="SHOW_DIALOG" value="false" />
9
25
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
26
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -50,48 +66,77 @@
50
66
  <option name="hideEmptyMiddlePackages" value="true" />
51
67
  <option name="showLibraryContents" value="true" />
52
68
  </component>
53
- <component name="PropertiesComponent"><![CDATA[{
54
- "keyToString": {
55
- "Python tests.Python tests for test_db.DB.executor": "Run",
56
- "Python tests.Python tests for test_proton.Tracking.executor": "Run",
57
- "Python tests.Python tests for test_proton.Tracking.test_collect_proton_versions.executor": "Run",
58
- "Python tests.Python tests for test_tracking.Tracking.executor": "Run",
59
- "Python tests.Python tests for test_tracking.Tracking.test_track.executor": "Run",
60
- "Python tests.Python tests for test_tracking.TrackingTest.executor": "Run",
61
- "Python tests.Python tests for test_tracking.TrackingTest.test_track.executor": "Run",
62
- "Python tests.Python tests for tests.test_db.DB.executor": "Run",
63
- "Python tests.Python tests for tests.test_db.DBTest.executor": "Run",
64
- "Python tests.Python tests for tests.test_db.DBTest.test_addition_removal.executor": "Run",
65
- "Python tests.Python tests for tests.test_db.DBTest.test_malformed_db.executor": "Run",
66
- "Python tests.Python tests for tests.test_db.DBTest.test_missing_db.executor": "Run",
67
- "Python tests.Python tests for tests.test_tracking.Tracking.executor": "Run",
68
- "Python tests.Python tests for tests.test_tracking.TrackingTest.executor": "Debug",
69
- "Python tests.Python tests for tests.test_tracking.TrackingTest.test_track.executor": "Run",
70
- "Python tests.Python tests in tests.executor": "Run",
71
- "Python.create.executor": "Debug",
72
- "Python.delete.executor": "Run",
73
- "Python.manage.executor": "Run",
74
- "Python.run.executor": "Run",
75
- "Python.track.executor": "Run",
76
- "Python.umu-commander.executor": "Run",
77
- "Python.untrack.executor": "Run",
78
- "Python.users.executor": "Run",
79
- "RunOnceActivity.ShowReadmeOnStart": "true",
80
- "RunOnceActivity.git.unshallow": "true",
81
- "Shell Script.Build.executor": "Run",
82
- "git-widget-placeholder": "master",
83
- "last_opened_file_path": "/home/hiroshi/Code/Python/umu-commander/src/umu_commander/proton.py",
84
- "run.code.analysis.last.selected.profile": "aDefault",
85
- "settings.editor.selected.configurable": "com.intellij.pycharm.community.ide.impl.configuration.PythonContentEntriesConfigurable"
69
+ <component name="PropertiesComponent">{
70
+ &quot;keyToString&quot;: {
71
+ &quot;Python tests.Python tests for test_config.Config.executor&quot;: &quot;Run&quot;,
72
+ &quot;Python tests.Python tests for test_config.Config.test_missing_config.executor&quot;: &quot;Run&quot;,
73
+ &quot;Python tests.Python tests for test_db.DB.executor&quot;: &quot;Run&quot;,
74
+ &quot;Python tests.Python tests for test_proton.Tracking.executor&quot;: &quot;Run&quot;,
75
+ &quot;Python tests.Python tests for test_proton.Tracking.test_collect_proton_versions.executor&quot;: &quot;Run&quot;,
76
+ &quot;Python tests.Python tests for test_tracking.Tracking.executor&quot;: &quot;Run&quot;,
77
+ &quot;Python tests.Python tests for test_tracking.Tracking.test_track.executor&quot;: &quot;Run&quot;,
78
+ &quot;Python tests.Python tests for test_tracking.TrackingTest.executor&quot;: &quot;Run&quot;,
79
+ &quot;Python tests.Python tests for test_tracking.TrackingTest.test_track.executor&quot;: &quot;Run&quot;,
80
+ &quot;Python tests.Python tests for tests.test_db.DB.executor&quot;: &quot;Run&quot;,
81
+ &quot;Python tests.Python tests for tests.test_db.DBTest.executor&quot;: &quot;Run&quot;,
82
+ &quot;Python tests.Python tests for tests.test_db.DBTest.test_addition_removal.executor&quot;: &quot;Run&quot;,
83
+ &quot;Python tests.Python tests for tests.test_db.DBTest.test_malformed_db.executor&quot;: &quot;Run&quot;,
84
+ &quot;Python tests.Python tests for tests.test_db.DBTest.test_missing_db.executor&quot;: &quot;Run&quot;,
85
+ &quot;Python tests.Python tests for tests.test_tracking.Tracking.executor&quot;: &quot;Run&quot;,
86
+ &quot;Python tests.Python tests for tests.test_tracking.TrackingTest.executor&quot;: &quot;Debug&quot;,
87
+ &quot;Python tests.Python tests for tests.test_tracking.TrackingTest.test_track.executor&quot;: &quot;Run&quot;,
88
+ &quot;Python tests.Python tests in tests.executor&quot;: &quot;Run&quot;,
89
+ &quot;Python tests.Run tests.executor&quot;: &quot;Run&quot;,
90
+ &quot;Python.create.executor&quot;: &quot;Debug&quot;,
91
+ &quot;Python.delete.executor&quot;: &quot;Run&quot;,
92
+ &quot;Python.manage.executor&quot;: &quot;Run&quot;,
93
+ &quot;Python.run.executor&quot;: &quot;Run&quot;,
94
+ &quot;Python.track.executor&quot;: &quot;Run&quot;,
95
+ &quot;Python.umu-commander.executor&quot;: &quot;Run&quot;,
96
+ &quot;Python.untrack.executor&quot;: &quot;Run&quot;,
97
+ &quot;Python.users.executor&quot;: &quot;Run&quot;,
98
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
99
+ &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
100
+ &quot;Shell Script.Build.executor&quot;: &quot;Run&quot;,
101
+ &quot;Shell Script.Upload.executor&quot;: &quot;Run&quot;,
102
+ &quot;git-widget-placeholder&quot;: &quot;master&quot;,
103
+ &quot;last_opened_file_path&quot;: &quot;/home/hiroshi/Code/Python/umu-commander/tests&quot;,
104
+ &quot;run.code.analysis.last.selected.profile&quot;: &quot;aDefault&quot;,
105
+ &quot;settings.editor.selected.configurable&quot;: &quot;com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable&quot;
86
106
  }
87
- }]]></component>
107
+ }</component>
88
108
  <component name="RecentsManager">
109
+ <key name="CopyFile.RECENT_KEYS">
110
+ <recent name="$PROJECT_DIR$/tests" />
111
+ </key>
89
112
  <key name="MoveFile.RECENT_KEYS">
90
113
  <recent name="$PROJECT_DIR$/src/umu-commander" />
91
114
  <recent name="$PROJECT_DIR$/src" />
92
115
  </key>
93
116
  </component>
94
- <component name="RunManager" selected="Shell Script.Build">
117
+ <component name="RunManager" selected="Python.run">
118
+ <configuration name="create" type="PythonConfigurationType" factoryName="Python">
119
+ <module name="umu-commander" />
120
+ <option name="ENV_FILES" value="" />
121
+ <option name="INTERPRETER_OPTIONS" value="" />
122
+ <option name="PARENT_ENVS" value="true" />
123
+ <envs>
124
+ <env name="PYTHONUNBUFFERED" value="1" />
125
+ </envs>
126
+ <option name="SDK_HOME" value="" />
127
+ <option name="WORKING_DIRECTORY" value="" />
128
+ <option name="IS_MODULE_SDK" value="true" />
129
+ <option name="ADD_CONTENT_ROOTS" value="true" />
130
+ <option name="ADD_SOURCE_ROOTS" value="true" />
131
+ <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/umu_commander/main.py" />
132
+ <option name="PARAMETERS" value="create" />
133
+ <option name="SHOW_COMMAND_LINE" value="false" />
134
+ <option name="EMULATE_TERMINAL" value="false" />
135
+ <option name="MODULE_MODE" value="false" />
136
+ <option name="REDIRECT_INPUT" value="false" />
137
+ <option name="INPUT_FILE" value="" />
138
+ <method v="2" />
139
+ </configuration>
95
140
  <configuration name="delete" type="PythonConfigurationType" factoryName="Python">
96
141
  <module name="umu-commander" />
97
142
  <option name="ENV_FILES" value="" />
@@ -101,9 +146,8 @@
101
146
  <env name="PYTHONUNBUFFERED" value="1" />
102
147
  </envs>
103
148
  <option name="SDK_HOME" value="" />
104
- <option name="SDK_NAME" value="Python 3.12" />
105
149
  <option name="WORKING_DIRECTORY" value="" />
106
- <option name="IS_MODULE_SDK" value="false" />
150
+ <option name="IS_MODULE_SDK" value="true" />
107
151
  <option name="ADD_CONTENT_ROOTS" value="true" />
108
152
  <option name="ADD_SOURCE_ROOTS" value="true" />
109
153
  <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/umu_commander/main.py" />
@@ -124,9 +168,8 @@
124
168
  <env name="PYTHONUNBUFFERED" value="1" />
125
169
  </envs>
126
170
  <option name="SDK_HOME" value="" />
127
- <option name="SDK_NAME" value="Python 3.12" />
128
171
  <option name="WORKING_DIRECTORY" value="" />
129
- <option name="IS_MODULE_SDK" value="false" />
172
+ <option name="IS_MODULE_SDK" value="true" />
130
173
  <option name="ADD_CONTENT_ROOTS" value="true" />
131
174
  <option name="ADD_SOURCE_ROOTS" value="true" />
132
175
  <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/umu_commander/main.py" />
@@ -147,9 +190,8 @@
147
190
  <env name="PYTHONUNBUFFERED" value="1" />
148
191
  </envs>
149
192
  <option name="SDK_HOME" value="" />
150
- <option name="SDK_NAME" value="Python 3.12" />
151
193
  <option name="WORKING_DIRECTORY" value="" />
152
- <option name="IS_MODULE_SDK" value="false" />
194
+ <option name="IS_MODULE_SDK" value="true" />
153
195
  <option name="ADD_CONTENT_ROOTS" value="true" />
154
196
  <option name="ADD_SOURCE_ROOTS" value="true" />
155
197
  <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/umu_commander/main.py" />
@@ -170,9 +212,8 @@
170
212
  <env name="PYTHONUNBUFFERED" value="1" />
171
213
  </envs>
172
214
  <option name="SDK_HOME" value="" />
173
- <option name="SDK_NAME" value="Python 3.12" />
174
215
  <option name="WORKING_DIRECTORY" value="" />
175
- <option name="IS_MODULE_SDK" value="false" />
216
+ <option name="IS_MODULE_SDK" value="true" />
176
217
  <option name="ADD_CONTENT_ROOTS" value="true" />
177
218
  <option name="ADD_SOURCE_ROOTS" value="true" />
178
219
  <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/umu_commander/main.py" />
@@ -193,9 +234,8 @@
193
234
  <env name="PYTHONUNBUFFERED" value="1" />
194
235
  </envs>
195
236
  <option name="SDK_HOME" value="" />
196
- <option name="SDK_NAME" value="Python 3.12" />
197
237
  <option name="WORKING_DIRECTORY" value="" />
198
- <option name="IS_MODULE_SDK" value="false" />
238
+ <option name="IS_MODULE_SDK" value="true" />
199
239
  <option name="ADD_CONTENT_ROOTS" value="true" />
200
240
  <option name="ADD_SOURCE_ROOTS" value="true" />
201
241
  <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/umu_commander/main.py" />
@@ -239,6 +279,36 @@
239
279
  <option name="RunConfigurationTask" enabled="true" run_configuration_name="Build" run_configuration_type="ShConfigurationType" />
240
280
  </method>
241
281
  </configuration>
282
+ <configuration name="Python tests for test_config.Config" type="tests" factoryName="Autodetect" temporary="true" nameIsGenerated="true">
283
+ <module name="umu-commander" />
284
+ <option name="ENV_FILES" value="" />
285
+ <option name="INTERPRETER_OPTIONS" value="" />
286
+ <option name="PARENT_ENVS" value="true" />
287
+ <option name="SDK_HOME" value="" />
288
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tests" />
289
+ <option name="IS_MODULE_SDK" value="true" />
290
+ <option name="ADD_CONTENT_ROOTS" value="true" />
291
+ <option name="ADD_SOURCE_ROOTS" value="true" />
292
+ <option name="_new_additionalArguments" value="&quot;&quot;" />
293
+ <option name="_new_target" value="&quot;test_config.Config&quot;" />
294
+ <option name="_new_targetType" value="&quot;PYTHON&quot;" />
295
+ <method v="2" />
296
+ </configuration>
297
+ <configuration name="Python tests for test_config.Config.test_missing_config" type="tests" factoryName="Autodetect" temporary="true" nameIsGenerated="true">
298
+ <module name="umu-commander" />
299
+ <option name="ENV_FILES" value="" />
300
+ <option name="INTERPRETER_OPTIONS" value="" />
301
+ <option name="PARENT_ENVS" value="true" />
302
+ <option name="SDK_HOME" value="" />
303
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tests" />
304
+ <option name="IS_MODULE_SDK" value="true" />
305
+ <option name="ADD_CONTENT_ROOTS" value="true" />
306
+ <option name="ADD_SOURCE_ROOTS" value="true" />
307
+ <option name="_new_additionalArguments" value="&quot;&quot;" />
308
+ <option name="_new_target" value="&quot;test_config.Config.test_missing_config&quot;" />
309
+ <option name="_new_targetType" value="&quot;PYTHON&quot;" />
310
+ <method v="2" />
311
+ </configuration>
242
312
  <configuration name="Run tests" type="tests" factoryName="Autodetect">
243
313
  <module name="umu-commander" />
244
314
  <option name="ENV_FILES" value="" />
@@ -260,10 +330,19 @@
260
330
  <item itemvalue="Python.track" />
261
331
  <item itemvalue="Python.untrack" />
262
332
  <item itemvalue="Python.delete" />
333
+ <item itemvalue="Python.create" />
263
334
  <item itemvalue="Python tests.Run tests" />
335
+ <item itemvalue="Python tests.Python tests for test_config.Config" />
336
+ <item itemvalue="Python tests.Python tests for test_config.Config.test_missing_config" />
264
337
  <item itemvalue="Shell Script.Upload" />
265
338
  <item itemvalue="Shell Script.Build" />
266
339
  </list>
340
+ <recent_temporary>
341
+ <list>
342
+ <item itemvalue="Python tests.Python tests for test_config.Config" />
343
+ <item itemvalue="Python tests.Python tests for test_config.Config.test_missing_config" />
344
+ </list>
345
+ </recent_temporary>
267
346
  </component>
268
347
  <component name="SharedIndexes">
269
348
  <attachedChunks>
@@ -688,19 +767,10 @@
688
767
  <option name="LAST_COMMIT_MESSAGE" value="Preparations for building" />
689
768
  </component>
690
769
  <component name="XDebuggerManager">
691
- <breakpoint-manager>
692
- <breakpoints>
693
- <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
694
- <url>file://$PROJECT_DIR$/src/umu_commander/util.py</url>
695
- <line>131</line>
696
- <option name="timeStamp" value="13" />
697
- </line-breakpoint>
698
- <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
699
- <url>file://$PROJECT_DIR$/src/umu_commander/tracking.py</url>
700
- <line>15</line>
701
- <option name="timeStamp" value="31" />
702
- </line-breakpoint>
703
- </breakpoints>
704
- </breakpoint-manager>
770
+ <watches-manager>
771
+ <configuration name="PythonConfigurationType">
772
+ <watch expression="cls._conf" language="Python" />
773
+ </configuration>
774
+ </watches-manager>
705
775
  </component>
706
776
  </project>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: umu-commander
3
- Version: 1.4.0
3
+ Version: 1.5.2
4
4
  Summary: umu-commander is an interactive CLI tool to help you manage umu.
5
5
  Project-URL: Homepage, https://github.com/Mpaxlamitsounas/umu-commander
6
6
  Project-URL: Issues, https://github.com/Mpaxlamitsounas/umu-commander/issues
@@ -21,7 +21,15 @@ What directories each Proton version is being used by is tracked within `trackin
21
21
 
22
22
  Vanilla umu configuration files currently do not support setting environmental variables, this tool adds such functionality by adding an extra TOML table in the umu config itself. An example config is available under the name `example_config.toml`.
23
23
 
24
- umu-commander will look for your installed Proton versions using a predetermined list of directories, if you notice some versions missing, the listed can be edited within the `configuration.py` file in the src directory.
24
+ ### Config
25
+ The configuration file lives at `~/.config/umu-commander.toml`. Within it, you can edit the following:
26
+ * PROTON_PATHS: List of directories umu-commander will search for Proton versions.
27
+ * UMU_PROTON_PATH: Directory where umu itself downloads its umu Proton versions.
28
+ * DB_NAME: Tracking DB filename.
29
+ * DB_DIR: Directory where the Tracking DB is stored.
30
+ * UMU_CONFIG_NAME: Name of the umu config created using umu-commander run.
31
+ * DEFAULT_PREFIX_DIR: Directory where WINE prefixes are scanned.
32
+ * [DLL_OVERRIDES_OPTIONS]: Category to list possible DLL overrides in "Label" = "Override string" format.
25
33
 
26
34
  ### Verbs
27
35
  umu-commander needs one of the following verbs specified after the executable name:
@@ -6,7 +6,15 @@ What directories each Proton version is being used by is tracked within `trackin
6
6
 
7
7
  Vanilla umu configuration files currently do not support setting environmental variables, this tool adds such functionality by adding an extra TOML table in the umu config itself. An example config is available under the name `example_config.toml`.
8
8
 
9
- umu-commander will look for your installed Proton versions using a predetermined list of directories, if you notice some versions missing, the listed can be edited within the `configuration.py` file in the src directory.
9
+ ### Config
10
+ The configuration file lives at `~/.config/umu-commander.toml`. Within it, you can edit the following:
11
+ * PROTON_PATHS: List of directories umu-commander will search for Proton versions.
12
+ * UMU_PROTON_PATH: Directory where umu itself downloads its umu Proton versions.
13
+ * DB_NAME: Tracking DB filename.
14
+ * DB_DIR: Directory where the Tracking DB is stored.
15
+ * UMU_CONFIG_NAME: Name of the umu config created using umu-commander run.
16
+ * DEFAULT_PREFIX_DIR: Directory where WINE prefixes are scanned.
17
+ * [DLL_OVERRIDES_OPTIONS]: Category to list possible DLL overrides in "Label" = "Override string" format.
10
18
 
11
19
  ### Verbs
12
20
  umu-commander needs one of the following verbs specified after the executable name:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "umu-commander"
7
- version = "1.4.0"
7
+ version = "1.5.2"
8
8
  authors = [
9
9
  { name="Mpaxlamitsounas", email="worldstudy123@gmail.com" },
10
10
  ]
@@ -15,6 +15,10 @@ classifiers = [
15
15
  "Programming Language :: Python :: 3",
16
16
  "Operating System :: POSIX :: Linux",
17
17
  ]
18
+ dependendies =[
19
+ "tomli-w"
20
+ ]
21
+
18
22
  license = "MIT"
19
23
  license-files = ["LICEN[CS]E*"]
20
24
  keywords = ["umu"]
@@ -0,0 +1,81 @@
1
+ from dataclasses import dataclass
2
+ from enum import Enum
3
+
4
+
5
+ @dataclass
6
+ class Element:
7
+ group_id: str = ""
8
+ value: str = ""
9
+ info: str = ""
10
+
11
+ def as_proton_ver(self) -> "ProtonVer":
12
+ return ProtonVer(self.group_id, self.value, self.info)
13
+
14
+ def as_dll_override(self) -> "DLLOverride":
15
+ return DLLOverride(self.info, self.value)
16
+
17
+
18
+ @dataclass
19
+ class ProtonVer(Element):
20
+ def __init__(self, dir: str = "", version_num: str = "", user_count: str = ""):
21
+ super().__init__(group_id=dir, value=version_num, info=user_count)
22
+
23
+ @property
24
+ def dir(self):
25
+ return self.group_id
26
+
27
+ @property
28
+ def version_num(self):
29
+ return self.value
30
+
31
+ @property
32
+ def user_count(self):
33
+ return self.info
34
+
35
+
36
+ @dataclass
37
+ class DLLOverride(Element):
38
+ def __init__(self, label: str = "", override_str: str = ""):
39
+ super().__init__(group_id="", value=override_str, info=label)
40
+
41
+ @property
42
+ def override_str(self):
43
+ return self.value
44
+
45
+ @property
46
+ def label(self):
47
+ return self.info
48
+
49
+
50
+ @dataclass
51
+ class Value(Element):
52
+ def __init__(self, value: str):
53
+ super().__init__(value=value)
54
+
55
+
56
+ @dataclass
57
+ class Group:
58
+ identity: str = ""
59
+ label: str = ""
60
+ elements: list[Element] = list
61
+
62
+
63
+ @dataclass
64
+ class ProtonDir(Group):
65
+ @property
66
+ def path(self):
67
+ return self.identity
68
+
69
+ @property
70
+ def versions(self) -> list[ProtonVer]:
71
+ return [e.as_proton_ver() for e in self.elements]
72
+
73
+ @versions.setter
74
+ def versions(self, value):
75
+ self.elements = value
76
+
77
+
78
+ class ExitCode(Enum):
79
+ SUCCESS = 0
80
+ READING_ERROR = 1
81
+ INVALID_SELECTION = 2
@@ -0,0 +1,72 @@
1
+ import os
2
+ import tomllib
3
+ from pathlib import Path
4
+
5
+ import tomli_w
6
+
7
+ from umu_commander.classes import DLLOverride
8
+
9
+ CONFIG_DIR: str = os.path.join(Path.home(), ".config")
10
+ CONFIG_NAME: str = "umu-commander.toml"
11
+
12
+
13
+ class Configuration:
14
+ PROTON_PATHS: tuple[str, ...] = (
15
+ os.path.join(Path.home(), ".local/share/Steam/compatibilitytools.d/"),
16
+ os.path.join(Path.home(), ".local/share/umu/compatibilitytools"),
17
+ )
18
+ UMU_PROTON_PATH: str = os.path.join(
19
+ Path.home(), ".local/share/Steam/compatibilitytools.d/"
20
+ )
21
+ DB_NAME: str = "tracking.json"
22
+ DB_DIR: str = os.path.join(Path.home(), ".local/share/umu/compatibilitytools")
23
+ UMU_CONFIG_NAME: str = "umu-config.toml"
24
+ DEFAULT_PREFIX_DIR: str = os.path.join(Path.home(), ".local/share/wineprefixes/")
25
+ DLL_OVERRIDES_OPTIONS: tuple[DLLOverride, ...] = (
26
+ DLLOverride("winhttp for BepInEx", "winhttp.dll=n;"),
27
+ )
28
+
29
+ @staticmethod
30
+ def load():
31
+ try:
32
+ with open(os.path.join(CONFIG_DIR, CONFIG_NAME), "rb") as conf_file:
33
+ toml_conf = tomllib.load(conf_file)
34
+ toml_conf["DLL_OVERRIDES_OPTIONS"] = tuple(
35
+ [
36
+ DLLOverride(label, override_str)
37
+ for label, override_str in toml_conf[
38
+ "DLL_OVERRIDES_OPTIONS"
39
+ ].items()
40
+ ]
41
+ )
42
+
43
+ for key, value in toml_conf.items():
44
+ setattr(Configuration, key, value)
45
+
46
+ except FileNotFoundError:
47
+ Configuration.dump()
48
+
49
+ @staticmethod
50
+ def dump():
51
+ if not os.path.exists(CONFIG_DIR):
52
+ os.mkdir(CONFIG_DIR)
53
+
54
+ with open(os.path.join(CONFIG_DIR, CONFIG_NAME), "wb") as conf_file:
55
+ toml_conf = Configuration._get_attributes()
56
+ toml_conf["DLL_OVERRIDES_OPTIONS"] = dict(
57
+ [
58
+ (override.info, override.value)
59
+ for override in Configuration.DLL_OVERRIDES_OPTIONS
60
+ ]
61
+ )
62
+
63
+ tomli_w.dump(toml_conf, conf_file)
64
+
65
+ @staticmethod
66
+ def _get_attributes():
67
+ attributes = {}
68
+ for key, value in vars(Configuration).items():
69
+ if not key.startswith("__") and not callable(getattr(Configuration, key)):
70
+ attributes[key] = value
71
+
72
+ return attributes
@@ -0,0 +1,43 @@
1
+ import json
2
+ import os
3
+ from collections import defaultdict
4
+
5
+ from umu_commander.configuration import Configuration as config
6
+
7
+
8
+ class Database:
9
+ _db: defaultdict[str, defaultdict[str, list[str]]]
10
+
11
+ @staticmethod
12
+ def load():
13
+ if not os.path.exists(config.DB_DIR):
14
+ os.mkdir(config.DB_DIR)
15
+
16
+ try:
17
+ with open(os.path.join(config.DB_DIR, config.DB_NAME), "rt") as db_file:
18
+ Database._db = defaultdict(lambda: defaultdict(list))
19
+ Database._db.update(json.load(db_file))
20
+
21
+ except FileNotFoundError:
22
+ Database._db = defaultdict(lambda: defaultdict(list))
23
+
24
+ @staticmethod
25
+ def dump():
26
+ with open(os.path.join(config.DB_DIR, config.DB_NAME), "wt") as db_file:
27
+ # noinspection PyTypeChecker
28
+ json.dump(Database._db, db_file, indent="\t")
29
+
30
+ @staticmethod
31
+ def get(
32
+ proton_dir: str = None, proton_ver: str = None
33
+ ) -> dict[str, dict[str, list[str]]] | dict[str, list[str]] | list[str]:
34
+ if proton_dir is None and proton_ver is None:
35
+ return Database._db
36
+
37
+ if proton_ver is None:
38
+ return Database._db[proton_dir]
39
+
40
+ if proton_ver not in Database._db[proton_dir]:
41
+ Database._db[proton_dir][proton_ver] = []
42
+
43
+ return Database._db[proton_dir][proton_ver]
@@ -1,9 +1,13 @@
1
1
  #!/usr/bin/python3
2
+ import os
2
3
  import sys
3
4
  from json import JSONDecodeError
4
5
 
5
- from umu_commander import db, tracking, umu_config
6
- from umu_commander.configuration import *
6
+ from umu_commander import tracking, umu_config
7
+ from umu_commander.classes import ExitCode
8
+ from umu_commander.configuration import CONFIG_DIR, CONFIG_NAME
9
+ from umu_commander.configuration import Configuration as config
10
+ from umu_commander.database import Database as db
7
11
 
8
12
 
9
13
  def print_help():
@@ -15,16 +19,24 @@ def print_help():
15
19
  )
16
20
 
17
21
 
18
- def main() -> int:
22
+ def main() -> ExitCode:
23
+ try:
24
+ config.load()
25
+ except (JSONDecodeError, KeyError):
26
+ config_path: str = os.path.join(CONFIG_DIR, CONFIG_NAME)
27
+ print(f"Config file at {config_path} could not be read.")
28
+ os.rename(config_path, os.path.join(CONFIG_DIR, CONFIG_NAME + ".old"))
29
+
19
30
  try:
20
31
  db.load()
21
32
  except JSONDecodeError:
22
- print(f"Tracking file at {os.path.join(DB_DIR, DB_NAME)} could not be read.")
23
- return 2
33
+ db_path: str = os.path.join(config.DB_DIR, config.DB_NAME)
34
+ print(f"Tracking file at {db_path} could not be read.")
35
+ os.rename(db_path, os.path.join(config.DB_DIR, config.DB_NAME + ".old"))
24
36
 
25
37
  if len(sys.argv) == 1:
26
38
  print_help()
27
- return 0
39
+ return ExitCode.SUCCESS
28
40
 
29
41
  verb: str = sys.argv[1]
30
42
  match verb:
@@ -43,13 +55,14 @@ def main() -> int:
43
55
  case _:
44
56
  print("Invalid verb.")
45
57
  print_help()
46
- return 3
58
+ return ExitCode.INVALID_SELECTION
47
59
 
48
60
  tracking.untrack_unlinked()
49
61
  db.dump()
62
+ config.dump()
50
63
 
51
- return 0
64
+ return ExitCode.SUCCESS
52
65
 
53
66
 
54
67
  if __name__ == "__main__":
55
- exit(main())
68
+ exit(main().value)