atom-community / atom-community/ide-python

Ability for completion/going-to-definition for symbols from virtualenv bound to specific project

Offen
#128 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
238
Forks
40
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I use [pyenv](https://github.com/pyenv/pyenv) to keep multiple python installation (py2, py3 etc.)

And I use [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv) to maintain separate python environments for different projects (i.e. virtualenv).

All python versions and virtualenvs live in directory `~/.pyenv/versions`.

```shell
$ ls ~/.pyenv/versions
2.7.13 2.7.14 3.6.3 3.6.4 3.7.0 project-x project-y

$ ~/.pyenv/versions/3.7.0/bin/python -V
Python 3.7.0

$ ~/.pyenv/versions/project-x/bin/python -V
Python 2.7.14
```

All my projects' code live in `~/workspace`:

```shell
$ ls ~/workspace
project-x project-y
```

I always make my project name as the same as its virtualenv name, you see, there are `project-x` and `project-y`.

I also place a file named of `.python-version` under project root dir, [let the magic automatically activate the specific virtualenv on entering project dir](https://github.com/pyenv/pyenv-virtualenv#activate-virtualenv).

```shell
$ cat ~/workspace/project-x/.python-version
project-x

$ cd ~/workspace/project-x
(project-x) $
```

I use [Atome Project Manager](https://atom.io/packages/project-manager) to remember my project dirs, So I can do quick switch from and to different editor windows, each window for one project.

---

So I want **IDE-python** call the right python binary and do completion/going-to-definition from the right python environment, Possible?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie damit, nachzuverfolgen, wie IDE-python den Interpreter für ein Atom-Projekt auswählt, wobei die .python-version und der pyenv-Pfad des Projektstamms als Reproduktionssetup verwendet werden. Erledigt ist die Aufgabe, wenn completion und go-to-definition Symbole aus der virtualenv des ausgewählten Projekts für project-x und project-y auflösen, statt aus einer gemeinsam genutzten Python-Installation.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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