-
Notifications
You must be signed in to change notification settings - Fork 889
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
Documentation change: easy_install to pip #2104
Comments
A couple notes on how to do this:
One big issue when updating to pip is that Three options (please chime in with some alternatives) I'm aware of that would work alright:
Let's talk about it and come to some conclusions so we can migrate everything consistently. Update: Thanks @mgrbyte I updated the examples with quotes. |
Geez, the number of things I don’t know. .[testing] ? Really? I’ve read all this stuff numerous times. My two cents, for what it’s worth:
That said, I don’t think there’s a strong majority that is doing this a certain way. I personally don’t see many docs out there showing test running via setup.py. I think py.test is perhaps a cooler-kid on the block than nose, but not overwhelmingly (though it does seem more active.) So I vote for (3) with py.test, caveat that it means fixing a lot of docs away from nose. Regarding best practices, any implications on how Travis works? Does it sniff at setup.py to discover what to run, or does it just do what you tell it in the YAML file? —Paul
|
Not being a regular contributor, not sure my vote counts.... One caveat - when using the
(this also works in bash) |
I'm for #3 too. |
@dstufft I'd love to hear your thoughts on test runners and |
I normally do a combination of all three, I define a That being said, the story around a standard interface for running tests (other than a sort of defacto stand off between tox and |
I tend to use |
I would just really love it if package maintainers would simply make a top-level In the past 12 months, I've contributed patches + tests to at least that many python projects. No two projects have taken the same approach to tests, and many people use "bleeding edge" test harnesses that look like they should be invoked one way, but really want to be used another (ie, if you run via So whatever you choose, please please please just make a TESTS.txt file that at least says:
and give a few examples. If you can convey that information (and maybe a few other things) and keep it up-to-date, many people will be exceptionally happy. |
@tseaver 👍 |
@tseaver I've never noticed that before! I really didn't expect it in a "HACKING" file. It would be great if it were somehow pointed to in the README and highlighted at the top of that file (ie, a TOC of what's in that). An example for the individual test would be great too. I'm really biased to this sort of stuff being "super obvious". |
See also https://github.com/Pylons/pyramid/blob/master/contributing.md#prerequisites which appears as a friendly yellow reminder whenever you report an issue or submit a PR. All that said, I agree with @jvanasco. "HACKING" is not an intuitive name. I recall I had the same problem when I was trying to get started with Pyramid. I usually check the README first. I'll add a section to the README, and roll it down to 1.5. |
@stevepiercy maybe something like this in the README ?
|
As a developer on a huge variety of projects over the years. |
Guys, I never used Windows and Python together, you can see if this snippet is correct? c:\\> c:\\Python33\\python -m venv env33
c:\\> env33\\Scripts\\activate
c:\\> pip install "pyramid==\ |release|\ " Snippet in |
@marioidival please don't hijack this ticket, it isn't the appropriate place for support questions (the mailing list is). You can see in http://docs.pylonsproject.org/projects/pyramid/en/1.6-branch/quick_tour.html that the RST source is rendered out as |
@marioidival it renders as: c:\> c:\Python33\python -m venv env33
c:\> env33\Scripts\python ez_setup.py
c:\> env33\Scripts\easy_install "pyramid==1.6" See rendered result: http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tour.html#installation See also the rst directive parsed-literal. |
@mmerickel Here is the correct place so, why am I doing this PR, started programming using UNIX environments and as I said before, never used Windows, I wonder how to do so correctly to proceed. |
|
@mmerickel @dstufft's article suggests a fourth option (NB: I am not a package manager, nor do I play one on television.) # requirements.txt
--index-url https://pypi.python.org/pyramid/
-e . which would be invoked by That pattern could be repeated for I think that's what @Themanwithoutaplan meant. [edited per @Themanwithoutaplan comment below] |
setup.py must still have the packages required for the library. Outside of a testing_requirements.txt which is useful for a test-runner without invoking tox (a very common pattern), I wouldn't want any additional requirements files because everything can be driven by tox, unless tox uses them too. This is a clearer separation of responsibilities. |
What? I hate requirements.txt, I hate the fact that it means now I need to run
|
Whoa, I don't know what I did, but somehow this issue got closed. Reopening. The branch for this work is now https://github.com/Pylons/pyramid/tree/docs/easy-install-to-pip.2104 |
While working on the wiki2 tutorial, I edited the default
|
-1 on testing requirements in setup.py for the usual reasons: a tox config is much more flexible and in any case required for serious testing. If you're going to following the pytest recommendations then add a pytest.ini (norecursedirs is a life-saver) as this makes the test discovery pattern explicit. |
@Themanwithoutaplan I scratched the pytest recommendations because some people like to group tests in a single file, others by folder, and others by feature. Better not to exert an opinion on this one. As far as tox or setup.py is used, I have no opinion other than going with the prevailing opinion, which is currently Option 3, so that's what I'm documenting. Of course, if the wind should change, I can go with tox. |
See PR #2442 for the rough draft of |
I just created a project using that forthcoming scaffold.
|
@Themanwithoutaplan we currently don't provide a tox.ini in our projects, and I don't think we should add that as yet another thing in the scaffold. I am a +1 on option 3, adding testing extra's makes sense, and is a built-in functionality that exists specifically for adding extra dependencies. |
@stevepiercy I do think you should roll them back into the scaffold. |
|
I'm also -1 on tox. Scaffolds are (primarily) for new folks. Handing them another thing to learn and deal with should be kept to a minimum. In JS/Yeoman, a lot of scaffolds have a dozen flavor-of-the-week JS project/tools in them, and the scaffold winds up being brittle magic. |
Even though I introduced it to the discussion, debate about tox is a bit of a red herring. To mix my food metaphors: the old issues of a testing clause versus testing_requirements.txt is really about what kind of cheese people are used to. As I still struggle with writing setup.py but can reliably produce and manage requirements files this is why I'm in favour of them. Adding options to setup.py adds complexity which I think the incantation exposes: try and explain that to anyone new. But I'm happy to be in my minority of one. I usually am. :-) |
…ntly updated scaffold from master and normalize its version to 1.7. See Pylons#2104.
rough draft for wiki2, replace setup.py with pip. See #2104.
I've hit a roadblock on the Installation chapter: installation of setuptools and virtualenv. I could use some clarity from the experienced folks. I'm not sure how to rewrite these two sections. I'm inclined to prioritize Python 3.4+, with exceptions to the priority.
|
A huge, major, ginormous change for Installation of Pyramid is now in PR #2466. I'm going to let this one simmer for a while for discussion. |
I'm DONE! whew! See #2468. |
Closed by #2468 |
Update the documentation to use pip instead of easy_install.
Work should be pushed to the branch docs/easy-install-to-pip.2104.
Branch
docs/easy-install-to-pip.2104
will eventually be merged tomaster
upon completion of the items listed below.Add omitted items to the lists.
List of related issues and PRs.
List of documentation and official tutorials
(Pretty much every step for tutorials needs updating, so only the indices are shown for brevity.)
The text was updated successfully, but these errors were encountered: