Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Option of defining an environment script for starting engines (with SSHEngineSetLauncher)

Offen
#1,029 9 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
48/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
python, shell

Rechercherichtung

Beginne mit dem Lesen von SSHEngineSetLauncher und SSHLauncher. Untersuche anschließend das kleine plattformübergreifende Testskript, das im Issue beschrieben wird, sowie die Handhabung der Umgebung durch subprocess.Popen. Die Aufgabe ist abgeschlossen, wenn ein Umgebungsskript die Engine-Umgebung unter Linux und Windows vorbereiten kann, ohne dass der Python-Prozess-Handle auf die Shell zeigt, und wenn Implementierungstests und Dokumentation vorhanden sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

We need to adapt the environment before starting the actual ipp engine (through the SSHEngineSetLauncher). Adapting the environment via the environment parameter (in class SSHLauncher) is possible, but it's not very practical, since the launcher needs to know all the engine computer details in advance.
Calling a local environment script before starting the engine would give much more flexibility and would easily allow starting the engine e.g. in a python virtual environment, conda environment, etc.

Although the general idea is quite simple the actual implement is not as easy. The problem: one cannot simply start a shell, next the environment script and then the actual command because the process handle (in python) would point to the shell and not the actual command. Hence, the retrieved process id would be incorrect. Using some system code it would be still possible to retrieve the true process id, but this is especially difficult in windows which is why I tested an alternative solution:
Starting a shell, outputting all environment variable, running the environment script and outputting all environment variable again. A bit of python code analyses the output and collects the environment variable changes (especially added and/or changed env.vars). I have implemented a small test script that works under linux and windows.
The collected changes can then be easily passed to the env parameter of subprocess.Popen function.

Does this sound like an appropriate idea and solution?
As before I'm happy to provide the implementation, tests, documentation, etc.

Vorherrschende Sprache
Jupyter Notebook
Sterne
2.6k
Forks
1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ipython/ipyparallel

Alle Issues in ipython/ipyparallel

Ähnliche Issues

Weitere Issues zu Distributed Systems

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.