-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
development environment wizard #511
Conversation
…issues rather than insist that developers use pyenv and have a pyenv-virtualenv with the name suggested by .python-version, we'll only record this name (with current python version included) here. a subsequent bootstrapper can set this up as before (via symlink) or suggest how to customize (locally)
based on [dssg/install-cli] resolves #444 resolves #456 changes: * the repository no longer insists on a pyenv virtualenv via the file .python-version, and otherwise avoids edge cases wherein this file caused issues * a bootstrap "wizard" script makes recommendations -- heavily reliant on pyenv -- but which the developer may opt in or out of, (and instead use more as an interactive checklist) the script **prompts** to do the following: * install pyenv * install the python version now reflected by .python-version.current (the _check_ does not assume pyenv; but, it does not support _installation_ of the expected python version without pyenv) * install a pyenv virtualenv named like what's in .python-version.current * write a symlink .python-version to enable auto-activation of the virtualenv (if the pyenv virtualenv was created) * pip install all development dependencies * pip install "editable" / in "develop mode" the triage library itself
Codecov Report
@@ Coverage Diff @@
## master #511 +/- ##
==========================================
+ Coverage 82.51% 82.64% +0.12%
==========================================
Files 81 82 +1
Lines 4662 5202 +540
==========================================
+ Hits 3847 4299 +452
- Misses 815 903 +88
Continue to review full report at Codecov.
|
@ivanhigueram Let me know if this really does (appear) to resolve the issues you raised. @thcrock I'm not positive this addresses everything we'd discussed -- and really, everything that's reasonable to document and/or automate here -- but let me know. |
Could you modify CONTRIBUTING.md, especially the 'Triage Development Environment' section, as a part of this PR? You could link to this section of the README instead of duplicating content, or whatever you think would be most clear, but I think the introduction of the new development environment instructions should supercede what was written there. |
There is something inconsistent about how the develop script checks for pyenv and how it expects to use it. My first try using the script, I got this...
In short, it recognized some previous installation of pyenv I had, and so elected not to do the installation part of it, but then was unable to use it on the next step. |
@thcrock I would say there's something inconsistent about your environment... 😸 But yes, because of incomplete installations, I had to make the check a bit funky. This is another datapoint. Lemme see! |
and slightly expanded subsequent pyenv-dependent checks
@thcrock All right, based on a deeper look and some conversation, I think the script now does as thorough a check of your pyenv setup as we would have it do. The check it was doing for the installation was correct, and no less thorough than the check the pyenv-installer does, itself. However, as it was in your situation, it's possible to miss / ignore / lose the required pyenv setup, (in your shell profile), never mind that the installer prompts you for it when you (first) run it. I've added a check that pyenv, if installed, is set up to actually be available; and, if the check fails, it repeats the pyenv set-up instructions, and attempts to bootstrap it s.t. subsequent checks can run. Let me know how that works for y'all.... |
…environment via `develop` script
All right, I think we're good here…! (And we can continue to develop this as we find need.) |
development environment-bootstrapping script
develop
based on dssg/install-cli
resolves #444
resolves #456
changes:
.python-version, and otherwise avoids edge cases wherein this file caused
issues
on pyenv -- but which the developer may opt in or out of, (and instead
use more as an interactive checklist)
the script prompts to do the following:
(the check does not assume pyenv; but, it does not support
installation of the expected python version without pyenv)
virtualenv (if the pyenv virtualenv was created)