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
libconda
: uncouple application from library
#13789
Comments
libconda
: uncouple application from librarylibconda
: uncouple application from library
I am generally in favor of having a second dev branch (tracking main) for this kind of work. I've used this strategy in the past and so long as the approval process matches, it will make the big nasty merge PR back to main at the end a little less painful. My only immediate concern is that we should feel confident (enough) in our automated tests before we take on a massive refactor to ensure stability for our users. I've seen so many refactors go south because features broke or got dropped without anyone realizing it. As for the refactoring of module paths, I know VS Code has some ability to do this natively but off the top of my head, I don't know of a script that does this. I'm sure one exists. |
Thanks @schuylermartin45! One thing I want to ensure is that we have a list of all importable symbols at the beginning of the refactor, plus some kind of import checker on CI, so all those "routes" are available at the end of the exercise (similar to the sitemap in a website + a link checker). We can always forward things with |
🌶️ I still don’t think this is needed, at least not this drastic. How does splitting The conda application is already siloed within I completely agree that |
Thanks @kenodegard! I'll reply inline with my current point of view and the constraints/goals I have in mind. I'm open to changing my stance on almost all points provided we can satisfy the desired outcomes. I'm excited about the opportunities this work presents and, to be clear, I don't intend this to be a solo project. I will gladly welcome anyone who wants to participate!
I am not proposing to change versioning schemes or release cadences. All subprojects would be part of the same release cycle and versioning.
The command-line setup is more or less siloed (with the exception of
My intention here is to uncouple the two layers explicitly so there's a namespace boundary. I agree is a complex refactor. I would argue it doesn't reduce complexity, but instead it compartmentalises it. After years of contributions to the projects I still don't know the differences between
My concern with this continuous improvement plan is that it'll be tricky to define when we are done and what the deliverable is. We could leave things in the same package namespace if you want, provided there's a well defined end state we'd like to achieve. However:
All in all, I don't have a strong opinion on how to achieve the following items as long as the situation improves:
|
I had a little time to think through this proposal and have the following feedback for you... First, I like the lines of separation that have been drawn. I've long thought that having config being it's own thing is a good think and will make it easier for plugin authors to use it in the future. My only fear is that the The second thing I worry about with this proposal is that we don't go far enough and fail to properly organize Speaking of phases, it might be nice to create a broad roadmap where we can easily understand what is being done in each phase to see what the critical path is for development and the goal we eventually want to reach. I think you listed the goals of the project in your response to @kenodegard well, but you may want to further elaborate on them in order to get a very clear idea of why this work is important and perhaps even come up with specific examples for the benefits it will bring. Here's my answers to your questions:
I really like how py-rattler has done this, specifically the quick start example in their docs: https://mamba-org.github.io/rattler/py-rattler/ It might help us to start with an example that does something like that and use it to guide our decisions for refactoring/re-organizing
Not sure about this! I also wonder how we deprecate all of this? 🤔 It probably won't be that big of a deal because most stuff will still live in |
Checklist
Summary
This is the meta issue that will list the strategy and ongoing efforts to implement a less coupled library/application separation in
conda
, the Python project.I implemented a rough view on how this repository would "look like" if the different components were already uncoupled. See
jaimergp/conda:libconda
. Note this is just moving files around; the imports were not adjusted or tested. A real world example can also be seen in themamba-org/mamba
project:libmamba
contains the library and API, whilemicromamba
implements a CLI out of the API parts oflibmamba
.The gist of the proposal is to have something like this:
We can also go deeper and split
conda_app
further:We can start small and then split further if deemed necessary.
Challenges
One of the main problems is how to do this without blocking the work on other items that depend on the current layout (just
conda/
). I suggest starting a new branchlibconda
and then create small PRs targeting that branch til everything passes. We should try to be as quick as possible to reduce the amount of rebasing that needs to be done.If possible, the refactor of the layout and imports should be automated in a script so they can be applied in open PRs once merged. This only makes sense if we can guarantee it works well, but it could also involve a lot of work. I'm assuming this is only about "moving files and renaming imports" but I guess we'll also need to move functions and classes from module to module, and other not-so-automatable work.
Questions
libconda
, how does it look like in your head?Linked Issues & PRs
Tasks
The text was updated successfully, but these errors were encountered: