atom-community / atom-community/ide-python
Ability for completion/going-to-definition for symbols from virtualenv bound to specific project
- Langage dominant
- JavaScript
- Étoiles
- 238
- Forks
- 40
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par retracer la manière dont IDE-python sélectionne l’interpréteur pour un projet Atom, en utilisant le .python-version et le chemin pyenv de la racine du projet comme configuration de reproduction. C’est terminé lorsque completion et go-to-definition résolvent les symboles depuis le virtualenv du projet sélectionné pour project-x et project-y, plutôt que depuis une installation Python partagée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- developer-experience, tooling
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100