HongzeFu commited on
Commit
c7e75b1
·
1 Parent(s): c3e52ed

no route stick action text

Browse files
gradio-web/config.py CHANGED
@@ -112,12 +112,6 @@ UI_ACTION_TEXT_OVERRIDES = {
112
  "move backward-left": "move backward-left↗︎",
113
  "move backward-right": "move backward-right↖︎",
114
  },
115
- "RouteStick": {
116
- "move to the nearest left target by circling around the stick clockwise": "move left clockwise↘︎→↗︎ ◟→◞",
117
- "move to the nearest right target by circling around the stick clockwise": "move right clockwise↖︎←↙︎ ◟←◞",
118
- "move to the nearest left target by circling around the stick counterclockwise": "move left counterclockwise↗︎→↘︎ ◜→◝",
119
- "move to the nearest right target by circling around the stick counterclockwise": "move right counterclockwise↙︎←↖︎ ◜←◝",
120
- },
121
  }
122
 
123
  ROUTESTICK_OVERLAY_ACTION_TEXTS = [
 
112
  "move backward-left": "move backward-left↗︎",
113
  "move backward-right": "move backward-right↖︎",
114
  },
 
 
 
 
 
 
115
  }
116
 
117
  ROUTESTICK_OVERLAY_ACTION_TEXTS = [
gradio-web/test/test_ui_text_config.py CHANGED
@@ -151,17 +151,9 @@ def test_get_ui_action_text_uses_configured_overrides_and_fallback(reload_module
151
  "move backward-left": "move backward-left↗︎",
152
  "move backward-right": "move backward-right↖︎",
153
  }
154
- routestick_expected = {
155
- "move to the nearest left target by circling around the stick clockwise": "move left clockwise↘︎→↗︎ ◟→◞",
156
- "move to the nearest right target by circling around the stick clockwise": "move right clockwise↖︎←↙︎ ◟←◞",
157
- "move to the nearest left target by circling around the stick counterclockwise": "move left counterclockwise↗︎→↘︎ ◜→◝",
158
- "move to the nearest right target by circling around the stick counterclockwise": "move right counterclockwise↙︎←↖︎ ◜←◝",
159
- }
160
 
161
  for raw_action, expected in patternlock_expected.items():
162
  assert config.get_ui_action_text("PatternLock", raw_action) == expected
163
- for raw_action, expected in routestick_expected.items():
164
- assert config.get_ui_action_text("RouteStick", raw_action) == expected
165
  assert config.get_ui_action_text("BinFill", "pick up the cube") == "pick up the cube"
166
 
167
 
@@ -176,23 +168,6 @@ def test_ui_option_label_uses_patternlock_configured_action_text(reload_module):
176
  assert callbacks._ui_option_label(session, "fallback", 0) == "a. move forward↓"
177
 
178
 
179
- def test_ui_option_label_uses_routestick_configured_action_text(reload_module):
180
- reload_module("config")
181
- callbacks = reload_module("gradio_callbacks")
182
- session = _FakeOptionSession(
183
- env_id="RouteStick",
184
- raw_solve_options=[
185
- {
186
- "label": "d",
187
- "action": "move to the nearest right target by circling around the stick counterclockwise",
188
- "available": False,
189
- }
190
- ],
191
- )
192
-
193
- assert callbacks._ui_option_label(session, "fallback", 0) == "d. move right counterclockwise↙︎←↖︎ ◜←◝"
194
-
195
-
196
  def test_load_status_task_appends_configured_point_suffix_after_mapped_label(monkeypatch, reload_module):
197
  config = reload_module("config")
198
  callbacks = reload_module("gradio_callbacks")
 
151
  "move backward-left": "move backward-left↗︎",
152
  "move backward-right": "move backward-right↖︎",
153
  }
 
 
 
 
 
 
154
 
155
  for raw_action, expected in patternlock_expected.items():
156
  assert config.get_ui_action_text("PatternLock", raw_action) == expected
 
 
157
  assert config.get_ui_action_text("BinFill", "pick up the cube") == "pick up the cube"
158
 
159
 
 
168
  assert callbacks._ui_option_label(session, "fallback", 0) == "a. move forward↓"
169
 
170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  def test_load_status_task_appends_configured_point_suffix_after_mapped_label(monkeypatch, reload_module):
172
  config = reload_module("config")
173
  callbacks = reload_module("gradio_callbacks")