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
Continue src/black refactoring. #1746
Comments
In other words, it's not easy to start contributing to black, because you can't work only with the bug related part! |
Perhaps #1350 should be reopened then? edit: ideally I would rename this issue to finish the refactor but I don't have the required permissions to do that so reopening/creating a new issue is easier. |
Would you like to rename it? |
Could anyone put some useful labels like |
Hello, I'd like to ask about the status of this issue and the state of the development in general.
I'm interested in contributing, because I feel like having a better structured code base could expedite all other development efforts as well. So I'd like to share my initial thoughts, though I recognise that I have no authority here.
In general I think there are two ways of doing this:
What do you think? |
The time to do this was yesterday, but no one on the core team has found enough time to come up with a plan and then discuss with the rest of the team or Black development community.
We are well aware of our PR backlog. It's something the active members (me, Jelle, and Cooper) are working on, but even us are very time limited. We are making progress, it's quite slow, but we are heading closer to 0 PRs.
I'm pretty sure the core team has a few ideas, but we basically never discussed them enough to come up with a concrete plan. One requirement I personally know of is that
Yeah I recognize that contributing to Black is way harder than it should be. It's something we're working on, but as mentioned, no one has time. I'm personally working on rewriting the documentation (especially developer docs!) all while trying to handle PR review and issue triage, which to be honest, is a bit difficult. In all, thanks for your ideas and voicing your thoughts. I think they'll come useful when we eventually get to this some day. I understand how difficult is it when efforts from rest of the Black development community are not given the attention they need. |
I agree with either refactor designs as they are both better than where we are today. I’d like to call on other core contributors to help make a decision. I feel we should start a gdoc (or something better) to get a plan of attack and design fully our desired state then cut it up into chunks we should expect in separate PRs so multiple people can work on this. I’d also like to suggest for each module we make an equivalent test suite is made. I expect some common / shared test libraries to be needed due to this. I’ve always been a fan of group tests to the module they test. Once again I’m all up for ideas here. @JelleZijlstra + @ichard26 - Since you’re both most active should we start a design doc and nut this out and get some context from our users / potential contributors? |
I also think a major design in this refactor should take into account that |
Thanks for the quick responses! Reading between the lines a bit, I gather that PRs are a priority to you - the open ones being actually considered for merges, and that you'd like to get the count close to zero before any drastic maneuvers in the refactoring department. I also fully appreciate that you have other things to do! Better to take some time off than to be another story in the books of burnt-out OSS maintainers. I'm in the fortunate position to have both time and energy at least for a while, so I can't really fault those that don't. Improving documentation is awesome too! I fully second having test suites for each module separately, with shared common components. To the two competing designs: I also think both are valid. I think I prefer the cleanly separated version, but I haven't worked with code bases quite as long as this, not to speak of the largest projects. Perhaps it would be best then to have some sort of open document (at least open for maintainers) to start gathering ideas over some time, while the repo advances in other ways. Would you like this issue to be the place for non-maintainers to express their views, or a separate doc? I'd like to also share something that helped me in finding these potential refactor targets. I'm not aware of the roles of maintainers, and whether everybody is intimately familiar with the code or not. Regardless, it might help and save a bit of time at least. I wrote a small utility to visualise source code structure. I did it because of Black and my desire to contribute to it, so I included that visualisation on the RTD page as well. It's a few commits outdated now, but not too badly. Please view the image along with the legend for explanations. A small disclaimer for the beta product, but most of the ideas I presented are rather obvious examining the visualisation. To conclude, if you don't have the time and you want to trust a stranger, I'd be happy to start formulating a plan with your guidance. Otherwise, I'm content with providing my two cents and observing where this is taken, or anything in between! |
Personally I'm happy to trust you, just please be warned we won't be fast with feedback. Thanks mate! |
Much appreciated! I don't mind at all. Let's do this at your pace. I think we shall do the following:
The doc has comment access enabled for everyone. I'll make sure to address them and transfer any comments from here as well. The reason I thought it would be better to concretize the plan only after your green light is to avoid unnecessary work with the changing source. Thoughts? |
The entire
Black
source code has written insrc/black/__init__.py
which leads to poor maintainability!The text was updated successfully, but these errors were encountered: