-
Notifications
You must be signed in to change notification settings - Fork 931
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
Stance (or discussion) on src/ directory #320
Comments
Some references on the discussion that support the "pro" argument: |
I don't think there's a consensus on the best practice, and the packaging guide isn't really intended to cover general development practices, which this is. There's no discussion on testing or documentation, for similar reasons. |
Based on the doc plan in #317, this is actually a good candidate for a discussion topic. I would be willing to accept a PR to add this topic. |
Nice, @jonparrott - I hadn't seen that doc plan. Agreed this would make a good discussion topic. Another one I've seen come up in the past is whether to put tests in the package or in a separate test directory. |
@pfmoore for sure, I'd be happy to have that topic as well. |
I'd also be interested in reviewing this. I tried a layout using |
Have you seen https://hynek.me/articles/testing-packaging/ Paul? I hoped to de-fiddle the process there... |
@hynek Yes I have. The problem I had was not with combining coverage, but with the basic coverage output from a single tox environment. It's possible it was just lack of familiarity with running coverage under tox, but from what I recall the output had some rather badly nested directories, when I was after filenames relative to |
Thanks for picking up that topic - happy to contribute although I can't promise to be very responsive at times (busy company and small child make my FLOSS contributions a bit spotty at the moment). I haven't run into the coverage issue before - I usually have both a tox and non-tox pytest setup and ensure my coverage is right in the basic setup. I see the need for checking coverage of Python--version-specific code paths, though. What's the next step for contributing here? |
Distill the source content into a discussion topic and send a pull request.
Or, if you prefer you can author it in Google docs and I can review and
place it here once it's finalized. Happy to help give you guidance on any
step.
…On Tue, Jun 27, 2017, 11:07 PM Christian Theune ***@***.***> wrote:
Thanks for picking up that topic - happy to contribute although I can't
promise to be very responsive at times (busy company and small child make
my FLOSS contributions a bit spotty at the moment).
I haven't run into the coverage issue before - I usually have both a tox
and non-tox pytest setup and ensure my coverage is right in the basic
setup. I see the need for checking coverage of Python--version-specific
code paths, though.
What's the next step for contributing here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#320 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPUc6Er5_1ZDv6GnMBokdAjWC5M7Ed9ks5sIe2igaJpZM4Nyan8>
.
|
Is anyone working on this right now? |
Nope.
…On Fri, Aug 25, 2017, 12:11 AM Pradyun Gedam ***@***.***> wrote:
Is anyone working on this right now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#320 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPUc439KkMZ5j43eujlOvsPxjWR3LNHks5sbnOogaJpZM4Nyan8>
.
|
I really, really dislike this structure. It makes things a bit more complicated than necessary imo. Newcomers should be considered here. |
Beginners who are more likely to make mistakes in their packaging and that would hugely benefit from a more explicit setup that protects them against broken PyPI uploads and deployments? Yes I agree, they should be very much considered over personal preferences. :)
|
@hynek More explicit is worse for beginners when they could rather have a simple |
I feel like we're moving into "explicit self is bad because you have to type more" territory.
Passing a path to find_packages takes away a lot of mystery and perceived magic how it works and I'd argue you should pass it even if it's "." .
And realistically people just copy paste it anyway so I'm having a hard time to see it as a problem at all. OTOH *reading* it later is helpful to understand what's going on without guessing.
|
For beginners we'll likely have a new tutorial using flit as a starting point. Setuptools-style packaging would likely fall under guides, and a separate guide/discussion can be created around this topic. |
I'm not sure whether pushing for flit is the right way as long as it precludes the usage of tox. |
tox does a lot of weird stuff, but how does flit preclude using tox? |
It may have changed (sadly I'm on a very bad Botswanan campsite wifi so I can't double check) but last time I checked tox needed a setup.py to work?
|
I think you can turn that off or use a different install command (though the later affects I definitely plan to try out flit significantly before writing the experimental tutorial and gathering feedback before considering making the experimental tutorial official. So this is really useful. Also, shameless plug that |
No. [tox]
skipsdist = True
[...] ... and you're golden. |
@jonparrott interesting - quite new project also - how come you thought nox is needed? What's missing from tox? I am always interested in seeing how we can improve tox and maybe join forces, if you like open an issue or write on the list. |
@obestwalter mostly just frustrated with using |
That's what I thought :D - also see tox-dev/tox#600 - sorry for hijacking this - I am quiete now ... |
@obestwalter cool. :) I think there's room for both. If you ever want to chat about it feel free to reach out. :) |
This had fallen pretty low on my TODO list, but I finally got to filing the PR today: #1150 |
Is there an official stance on the "src/" directory thing? I'm all for it (and @hynek seems to agree) but I haven't found any discussion or explanation about it from the PyPA. The guide doesn't mention it and the sample project doesn't use it. Even if the stance is "don't use it" (which I would disagree with) then I'd love to see this discussed in the official guide so we can refer to it when people need to make up their mind or argue it.
The text was updated successfully, but these errors were encountered: