operx-cli 0.14.0__tar.gz → 0.14.1__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.
- {operx_cli-0.14.0 → operx_cli-0.14.1}/PKG-INFO +2 -2
- {operx_cli-0.14.0 → operx_cli-0.14.1}/README.md +1 -1
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/AGENTES.md +2 -1
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/__init__.py +1 -1
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/ordenes.py +6 -2
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli.egg-info/PKG-INFO +2 -2
- {operx_cli-0.14.0 → operx_cli-0.14.1}/pyproject.toml +1 -1
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_ordenes.py +12 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/agent_guide.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/api_fields.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/app.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/browser_login.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/client.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/__init__.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/account.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/ambiental.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/articulos.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/avisos.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/campos.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/chat.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/common.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/completar.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/connect.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/empresas.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/inventario.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/laboratorio.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/lecturas.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/muestreo.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/personas.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/planta.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/preventivos.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/raw.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/registros.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/reportes.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/rutinas.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/search.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/sst.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/commands/update.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/forwarding/__init__.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/forwarding/buffer.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/forwarding/read.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/forwarding/run.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/forwarding/send.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/forwarding/sources.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/lookup.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/option_words.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/output.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/record_completion.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/self_update.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/settings.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/shell.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/spreadsheet.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/updates.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/values.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli/welcome.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli.egg-info/SOURCES.txt +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli.egg-info/dependency_links.txt +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli.egg-info/entry_points.txt +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli.egg-info/requires.txt +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/operx_cli.egg-info/top_level.txt +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/setup.cfg +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_agentes.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_api_campos.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_app.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_articulos.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_campos.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_cards.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_chat.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_client.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_completar.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_connect.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_daily_flows.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_forward.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_inventario_lecturas.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_json_writes.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_laboratorio.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_login.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_logout_and_routes.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_lookup.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_more_of_the_api.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_muestreo.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_option_words.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_output.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_personas.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_preventivos.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_record_completion.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_registros.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_rutinas.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_self_update.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_settings.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_shell.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_spreadsheet.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_sst_ambiental.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_updates.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_values.py +0 -0
- {operx_cli-0.14.0 → operx_cli-0.14.1}/tests/test_welcome.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: operx-cli
|
|
3
|
-
Version: 0.14.
|
|
3
|
+
Version: 0.14.1
|
|
4
4
|
Summary: La línea de comandos de OperX: tu empresa desde la terminal, con tu token de API.
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -114,7 +114,7 @@ operx buscar "bomba" # como la barra de búsqueda de la ap
|
|
|
114
114
|
operx ordenes listar --estado en-progreso --asignada-a yo
|
|
115
115
|
operx ordenes ver 1234
|
|
116
116
|
operx ordenes crear --titulo "Cambio de rodamiento" --equipo BOM-04 --prioridad alta --vence 30/10/2026
|
|
117
|
-
operx ordenes estado 1234 completada
|
|
117
|
+
operx ordenes estado 1234 completada # no se deshace aquí: se reabre en la app
|
|
118
118
|
operx ordenes asignar 1234 "Pedro Pérez"
|
|
119
119
|
operx ordenes comentar 1234 "Llegó el repuesto"
|
|
120
120
|
operx ordenes editar 1234 --prioridad critica --vence 05/11/2026
|
|
@@ -99,7 +99,7 @@ operx buscar "bomba" # como la barra de búsqueda de la ap
|
|
|
99
99
|
operx ordenes listar --estado en-progreso --asignada-a yo
|
|
100
100
|
operx ordenes ver 1234
|
|
101
101
|
operx ordenes crear --titulo "Cambio de rodamiento" --equipo BOM-04 --prioridad alta --vence 30/10/2026
|
|
102
|
-
operx ordenes estado 1234 completada
|
|
102
|
+
operx ordenes estado 1234 completada # no se deshace aquí: se reabre en la app
|
|
103
103
|
operx ordenes asignar 1234 "Pedro Pérez"
|
|
104
104
|
operx ordenes comentar 1234 "Llegó el repuesto"
|
|
105
105
|
operx ordenes editar 1234 --prioridad critica --vence 05/11/2026
|
|
@@ -263,7 +263,8 @@ operx api GET work-orders/export/ -o ordenes.csv
|
|
|
263
263
|
# Las órdenes vencidas de la persona
|
|
264
264
|
operx ordenes listar --vencidas --asignada-a yo --todas --json
|
|
265
265
|
|
|
266
|
-
# Pasar una orden a completada, después de su sí
|
|
266
|
+
# Pasar una orden a completada, después de su sí (no se deshace desde aquí:
|
|
267
|
+
# solo un administrador la reabre en la app, con «Reabrir orden»)
|
|
267
268
|
operx ordenes estado 1234 completada --si --json
|
|
268
269
|
|
|
269
270
|
# Registrar una lectura: primero el número del punto
|
|
@@ -264,8 +264,12 @@ def estado(
|
|
|
264
264
|
si: YesOption = False,
|
|
265
265
|
as_json: JsonOption = False,
|
|
266
266
|
):
|
|
267
|
-
"""Cambia el estado de una orden. Verificarla se hace en la app
|
|
268
|
-
|
|
267
|
+
"""Cambia el estado de una orden. Verificarla se hace en la app, y una orden
|
|
268
|
+
completada solo la reabre un administrador allí («Reabrir orden»)."""
|
|
269
|
+
warning = ""
|
|
270
|
+
if STATUS_KEYS[nuevo.value] == "completed":
|
|
271
|
+
warning = " Esto no se deshace desde aquí: solo un administrador la reabre en la app («Reabrir orden»)."
|
|
272
|
+
confirm_write(f"Pasar la orden {orden} a «{nuevo.value}».{warning}", si)
|
|
269
273
|
changed = client_of(ctx).send("POST", f"work-orders/{orden}/transition", json={"status": STATUS_KEYS[nuevo.value]}).json()
|
|
270
274
|
print_result(changed, as_json, f"Orden {orden}: {STATUS_LABELS.get(changed.get('status'), changed.get('status'))}.")
|
|
271
275
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: operx-cli
|
|
3
|
-
Version: 0.14.
|
|
3
|
+
Version: 0.14.1
|
|
4
4
|
Summary: La línea de comandos de OperX: tu empresa desde la terminal, con tu token de API.
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -114,7 +114,7 @@ operx buscar "bomba" # como la barra de búsqueda de la ap
|
|
|
114
114
|
operx ordenes listar --estado en-progreso --asignada-a yo
|
|
115
115
|
operx ordenes ver 1234
|
|
116
116
|
operx ordenes crear --titulo "Cambio de rodamiento" --equipo BOM-04 --prioridad alta --vence 30/10/2026
|
|
117
|
-
operx ordenes estado 1234 completada
|
|
117
|
+
operx ordenes estado 1234 completada # no se deshace aquí: se reabre en la app
|
|
118
118
|
operx ordenes asignar 1234 "Pedro Pérez"
|
|
119
119
|
operx ordenes comentar 1234 "Llegó el repuesto"
|
|
120
120
|
operx ordenes editar 1234 --prioridad critica --vence 05/11/2026
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "operx-cli"
|
|
7
|
-
version = "0.14.
|
|
7
|
+
version = "0.14.1"
|
|
8
8
|
description = "La línea de comandos de OperX: tu empresa desde la terminal, con tu token de API."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -78,6 +78,18 @@ def test_estado_moves_the_order():
|
|
|
78
78
|
assert fake.sent("POST", "work-orders/15/transition/") == {"status": "completed"}
|
|
79
79
|
|
|
80
80
|
|
|
81
|
+
def test_estado_completada_warns_it_cannot_be_undone_here(monkeypatch):
|
|
82
|
+
from operx_cli.commands import common
|
|
83
|
+
|
|
84
|
+
monkeypatch.setattr(common, "can_ask", lambda: True)
|
|
85
|
+
fake = FakeApi({("POST", "work-orders/15/transition/"): {**ORDER, "status": "completed"}})
|
|
86
|
+
result = run(fake, "ordenes", "estado", "15", "completada", input="n\n")
|
|
87
|
+
|
|
88
|
+
assert "no se deshace" in result.output
|
|
89
|
+
assert "Reabrir orden" in result.output
|
|
90
|
+
assert not fake.called("POST", "work-orders/15/transition/")
|
|
91
|
+
|
|
92
|
+
|
|
81
93
|
def test_estado_never_offers_verifying():
|
|
82
94
|
result = run(FakeApi({}), "ordenes", "estado", "15", "verificada", "--si")
|
|
83
95
|
assert result.exit_code != 0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|