-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Move to src-layout. #2798
Move to src-layout. #2798
Conversation
153dc7e
to
d8f152f
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2798 +/- ##
=======================================
Coverage 99.18% 99.18%
=======================================
Files 115 115
Lines 17551 17551
Branches 3149 3149
=======================================
Hits 17408 17408
Misses 99 99
Partials 44 44
|
3476c36
to
80ef0d6
Compare
In CI this is already addressed by changing into a subdirectory when testing. I personally prefer |
Lines 106 to 110 in c16003f
|
@altendky I see, I will still finish this for now and put it up for discussion, because while CI might address it, it can still be pretty much an annoyance. Let's see what the rest says :) |
The intention of this is better isolation. `trio` is no longer accidentally on the (python) path and as such requires an explicit installation for usage, this helps uncover issues in packaging data etc early on (see https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/). This serves as the basis for switching to another build system as well; refs python-trio#2790.
80ef0d6
to
b813917
Compare
I think #274 is the only place where it's been discussed. I personally think the pro's outweigh the cons though, and give another +1 on the |
I definitely agree, a |
@njsmith do you want to weigh in on the matter? |
@A5rocks any opinion on the matter? |
I'm neutral on this change cause while it does align with what most people do, so would e.g. not shipping tests... so I don't think that's a very convincing argument. And while it would take a bit of magic away from the tests it would also mean having an extra "src" folder in the path for every file in trio. (Then of course, I already have to type out trio/trio for the folder...) So yeah arguments for and against but none of them feel strong, so neutral. |
if this makes switching packaging system easier, I think we can just go ahead with it. The PRs been open a month and the only issue that has been brought up are minor workflow ones. |
@apollo13 I would be glad to finish working on getting this merged this if you would like |
@CoolCat467 That would be great, I am currently blocked by personal things. My goal with the PR was to be as minimal as possible. Ie moving |
I guess it doesn't make switching much easier (if at all), tooling can usually handle both. |
I don't want that. |
If I could have access to the repo that would be great, I would prefer not creating another PR if it could be avoided. |
Sent an invite
…On Sat, Oct 21, 2023, at 05:33, CoolCat467 wrote:
> @CoolCat467 <https://github.com/CoolCat467> That would be great, I am currently blocked by personal things. My goal with the PR was to be as minimal as possible. Ie moving `_tests` (if wanted at all) into another top level package would be something done after this PR (same for switching to whatever other tooling). I can give you access to my repo if you want to work on that branch directly or we close this PR and you open your own.
>
If I could have access to the repo that would be great, I would prefer
not creating another PR if it could be avoided.
—
Reply to this email directly, view it on GitHub
<#2798 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAT5C6RZN5VGIK6EIMJQPLYAM67DAVCNFSM6AAAAAA4WQHM42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTGYZTQNBXGA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
OK release is out. Still ambivalent but if people think this would better and there isn't dissent I guess this should happen? Even if we don't end up using a pep 621 backend that requires the (Obviously conflicts need to be fixed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly maybe in warning of "don't review your own PRs" since I've taken over continued work on this, but all the important changes were already made before that point and the tests are passing.
a6651cb
to
dda9935
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might want to wait a day to see if anybody else pipes up about trio 0.23 being broken and needing a hotfix patch, but otherwise I don't see any problems with merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts again :(
But mainly just that new exciting pyproject.toml
changes mean you have to migrate some of the changes here.
.coveragerc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to move this to pyproject.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, you're still creating .coveragerc
Ruff infers what version to enable rules for and autofixes for based on the project supported python versions
@A5rocks How do we fix this error? + coverage report -m --rcfile ../pyproject.toml
No data to report.
Error: Process completed with exit code 1. All the tests pass, but this doesn't. |
Make sure that coverage is outputting its data files in the cwd, maybe? Not sure tbh |
@A5rocks I fixed the coverage report and resolved conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub says I have a pending review so let's see what it is...
Huh posting that before I reloaded was erroring. Strange. But whatever.
Just one concern then let's merge this!
let's not delay this any further and fix any other potential errors as they crop up. 🚀 |
Hey @apollo13, it looks like that was the first time we merged one of your PRs! Thanks so much! 🎉 🎂 If you want to keep contributing, we'd love to have you. So, I just sent you an invitation to join the python-trio organization on Github! If you accept, then here's what will happen:
If you want to read more, here's the relevant section in our contributing guide. Alternatively, you're free to decline or ignore the invitation. You'll still be able to contribute as much or as little as you like, and I won't hassle you about joining again. But if you ever change your mind, just let us know and we'll send another invitation. We'd love to have you, but more importantly we want you to do whatever's best for you. If you have any questions, well... I am just a humble Python script, so I probably can't help. But please do post a comment here, or in our chat, or on our forum, whatever's easiest, and someone will help you out! |
The intention of this is better isolation.
trio
is no longer accidentally on the (python) path and as such requires an explicit installation for usage, this helps uncover issues in packaging data etc early on (seehttps://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/).
This serves as the basis for switching to another build system as well; refs #2790.