Discussion: add HTTP API for `looper`
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
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Área
- api, backend-api-design, cli
Línea de trabajo
Start by reviewing the existing looper CLI entry points for run, runp, check, and report, then compare the earlier caravel implementation and its reported issues. Confirm the decision to pursue option 2.1 and define the API scope and completion criteria for those commands before implementation.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
This issue is coauthored by @zz1874.
looper is a CLI tool that often runs on the front node of a HPC cluster, so jobs can be submitted to Slurm / SGE / other job schedulers.
@nsheff expressed desire for a HTTP API for looper which wraps around looper. That would allow him and other users to run looper on the front node and use a reverse SSH tunnel from a different machine to send HTTP requests to the HTTP API.
Advantages of this would be
- use of
looperfunctionalities from any machine without manually copying code to the frontend node, - potential for a graphical user interface (GUI) that builds upon that API.
An earlier attempt of this was caravel (https://github.com/pepkit/caravel). @nsheff tells us that there were issues, possibly due to the synchronous nature of the Flask framework. caravel seems to be a Python 2.7 code base that uses 2to3 to convert to Python 3 code on-the-fly during installation via setuptools' use_2to3. This makes it, in the meantime, hard to run caravel for reasons such as: setuptools doesn't come with use_2to3 anymore, the Docker image cannot be built anymore, Debian index URLs are out of date, Python 3.6-specific typing imports are used, ...
After browsing the looper and caravel code, we identified the following possibilities:
- Revive
caravel, meaning bringing it up-to-date with recent Python versions and making it compatible with recentlooperversions, - Write a new HTTP API from scratch, which leaves us at least three possibilities:
- Figure out a way of automagically creating both CLI and HTTP API from a single definition of commands / options.
This would likely be the most sustainable idea, as it prevents the need of keeping CLI and HTTP API in sync if commands / options are added / removed in the future. But it would possibly be a larger undertaking with the risk of being only partially finished in the limited time we can work on it. It would also possibly make a nice separate, reusable library! - Implement only the most important top-level commands and their options as HTTP API endpoints, but design this easily transferable to other commands and document the development process. That way, a subset of the
loopercommands / options could likely be made available via the HTTP API in the little development time we have. But this also means an increased maintenance burden - if a new CLI command / option is added, the HTTP API and its documentation have to be adapted accordingly. - Implement only top-level commands and allow setting of flags / options only via a project configuration file that is
POSTed to the API. This would be the easiest and quickest solution, but limits the use cases of the API. A similarly easy and inflexible approach would bePOSTing a string of command lines argument that is then parsed bylooper's existingargparseargument parser.
- Figure out a way of automagically creating both CLI and HTTP API from a single definition of commands / options.
Important questions that would need to be answered:
- Which version of
loopershould we develop against?looperis currently at v1.5.1, but there is a PR open for v.1.6.0, and in fact we could only get thehello_looperexample working with the future v1.6.0 oflooper. A similar question holds forpipestat, if required for development of the HTTP API. The answer is: v.1.6.0 forlooperand v0.6.0 forpipestat, as both new versions have now been released. - What were the exact issues you faced with
caravel? Knowing them would help us make a more informed decision whether to possibly revivecaravelor to redevelop from scratch, avoiding mistakes made incaravel. Answer: https://github.com/pepkit/looper/issues/433#issuecomment-1877218543 - If we were to decide to implement only a subset of the top-level
loopercommands: which commands have the highest priority and should thus be implemented first as HTTP API calls? Answer:looper run,looper runp,looper check,looper report(https://github.com/pepkit/looper/issues/433#issuecomment-1877218543)
And finally, of course:
- Which of options 1-3.1-3 should we pursue? We should discuss this question together with @nsheff and add the answer in a comment. Answer: in a call with @nsheff, we decided to go with 2.1. Details in a comment below.
- Lenguaje dominante
- Python
- Estrellas
- 25
- Forks
- 7
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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 pepkit/looper
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
pipestat output schema seems to lack path templatesQuizá libre de nuevo @donaldcampbelljr la tomó hace 473 días y no hay ningún pull request abierto. Abiertoquestion
-
question
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
-
Optimize how and when looper checks pipestat config and allow user to overwrite when running samplesAbiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de pepkit/looper
Issues similares
-
docs(contributing): the two things that silently block a PRPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoavailable documentation good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 95/100
Nixitov/Riptide-Native#944 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
JTHCode/secretguard#24 ·
Los mantenedores suelen responder en 1 día
-
area: middleware documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
omarelshamy25x/shamy-hijri#63 ·
Los mantenedores suelen responder en 1 día