Proposal: drop the Java remote server, run the keywords on the oculix PyPI package
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- desktop-dev, testing-qa
Línea de trabajo
Start by reading the existing Java tree, pom and assembly configuration, then inspect the oculix PyPI package and its stdio process model. The proposed change removes the Java server and Maven build, moves all 76 keywords to Python, and declares oculix in install_requires while preserving names, arguments and behavior. Done means the package installs and exposes the same Robot library without the fat jar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
👋 Hi Hélio
@HelioGuilherme66, I built your oculix branch on WSL Ubuntu 22.04 to chase the "OCR still fails" report, and I came back with one bug, one slowness, and an idea that makes both disappear. Spoiler: the idea deletes most of the repo.
🔍 Why OCR fails on Linux
Tesseract is not the culprit, it loads fine through Legerix. OpenCV is. The branch declares io.github.julienmerconsulting.apertix:opencv:4.10.0-0 directly in the pom, and Maven's nearest-wins rule lets it override the 4.10.0-3 that OculiX 3.0.3 brings. The 4.10.0-0 jar ships a single Linux native (libopencv_java490.so) and no legacy tier, so on any glibc below 2.38 the Java server logs FATAL: OpenCV native library 'opencv_java4100' could NOT be loaded. Removing those four lines from the pom is enough, OculiX already brings the right Apertix.
🐢 Why startup takes over a minute
Before the first keyword runs, Robot calls get_library_information, and javalib-core's KeywordBeanLoader answers it by opening the whole fat jar as a JarInputStream and reading every entry to find the classes matching keywords/**/*.class. A stream cannot skip an entry, so every OpenCV, Tesseract, Leptonica and JNA native of every platform gets inflated to find three classes. A thread dump caught it there after 45 seconds. I suspect #177 is a sibling of this one.
💡 The idea
OculiX already has a Python package on PyPI, oculix, which drives OculiX 4.0.0 directly. It needs no server and no port: the JVM runs as a child process, talks JSON over stdin/stdout, and dies with the Python process. Its jar is downloaded once into ~/.oculix/lib/ and then shared by everything on the machine.
SikuliLibrary would become a pure Python Robot library on top of it:
| Today | With oculix |
|---|---|
| XML-RPC remote server on a TCP port | JVM child process over stdio, no port |
| Fat jar rebuilt by Maven at every release | No build, the jar is downloaded once |
| Keyword discovery scans the whole jar | Classes loaded on demand |
| Orphan JVMs when a run is interrupted | JVM ends with the Python process |
| OculiX bump means pom, Apertix and Legerix | OculiX bump means one version in install_requires |
For users nothing changes: same pip install robotframework-SikuliLibrary, same Library SikuliLibrary, the same 76 keyword names and arguments. The Java sources, the pom and the assembly go away, and the wheel shrinks from a fat jar to a handful of .py files.
🛠️ How I would do it
I am coding it now and will open a PR against your oculix branch, written so that you can review it one file at a time. It will contain:
- the 76 keywords in Python, with names, arguments and behaviour unchanged (timeouts, screenshots on failure, highlight);
oculixdeclared ininstall_requires;- a check at import that Java is on the PATH;
- the Java tree and the Maven build removed.
The PR will link back here.
Muito obrigado, Hélio, por manteres esta biblioteca viva ao longo de todos estes anos. Um grande abraço!
The gecko has already packed the fat jar into a very small box. 🦎
- Lenguaje dominante
- Java
- Estrellas
- 163
- Forks
- 60
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de MarketSquare/robotframework-SikuliLibrary
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
MarketSquare/robotframework-SikuliLibrary#201 · 2 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
MarketSquare/robotframework-SikuliLibrary#189 · 1 comentario ·
-
Search specific region for imageAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
MarketSquare/robotframework-SikuliLibrary#188 · 1 comentario ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
Todos los issues de MarketSquare/robotframework-SikuliLibrary
Issues similares
-
agent:working bug follow-up lane:auto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Sanne/incus-spawn#1765 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Mend: dependency security vulnerability untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
opensearch-project/data-prepper#7219 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
Update Java flags pageAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
PaperMC/docs#824 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día