-
Notifications
You must be signed in to change notification settings - Fork 452
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
Improvement Request: Restructure main Tribler folders #6505
Comments
Criticism of this proposal by @ichorid
|
Disclaimer: opinion of former coder.
|
The next step will be to align the structure to the following: build/
tribler/
core/
gui/
scripts/
seedbox/
experiments/
popularity_community/
tunnel_community/
crawler/
exit_node/ |
It's probably best to leave the core and GUI classes separated as much as possible. Qt5 and asyncio don't really work well together (though there are libraries, like qasync, to deal with this). Calling async stuff from Qt5 can lead to weird behavior. I agree with the design of |
Thoughts on the proposed structure:
What about the following structure:
|
@kozlovsky thank you for the proposals, below are my comments:
They are packages.
Sentences like "put something in tribler directory" will be ambiguous in any case, unless we explicitly define the term "tribler directory", so
This assumption is not obvious, moreover, for me personally, it is a bit counterintuitive. |
Does this mean that you agree with the proposed folder's design and disagree with the further fluttering (e.g. merging Or does this mean that this is ok (1): build/
tribler/
core/
tribler-core/
*.py
gui/
tribler-gui/
*.py and this is not ok (2): build/
tribler/
core/
*.py
gui/
*.py |
@drew2a that is exactly right. Both (1) and (2) seem fine with me. I just think the following is bad:
|
@qstokkink thank you for the confirmation, now it is clear :) |
For me, the desire to name directories
Regarding the
Of course, the usual Python guidelines are for packages, and Tribler is not a package, so these guidelines are not directly applicable. Anyway, it may be easier for external developers if the Tribler directory structure resembles a standard Python project's structure. But the above-mentioned problems, while real, are probably not that critical, so if someone insists that we should switch to |
After additional discussion with @drew2a, we come up with the following directory structure:
With this approach, Why the Where to place the @synctext @qstokkink @devos50 @xoriole, what do you think? Can we make |
@kozlovsky Firstly, I see no objections to this proposal. Secondly, intuitively, I'd put the |
The next steps will be:
|
The current structure of Tribler folders is following:
The directory structure was created like this to facilitate PyPI shipping of those 3 directories. (@qstokkink)
But this PyPI packaging never happened. We can restructure it again but that'll require changing other scripts and Jenkins jobs (PATH exports). My opinion at this moment is to keep it as it is for now and revisit it later. (@xoriole)
How to restructure folders
Below I placed suggestions from @kozlovsky:
I don't think it is important to have separate directories for core/gui/common. But it does not hurt much to have them separated, either. As @xoriole said, refactoring may break some scripts. So I also think it may be better to leave it as-is for now.
Also, if we are going to change the directory structure, we need to discuss possible alternatives. I see the following alternatives:
The third option is as deep as the current approach. The only difference is that three subdirectories, tribler-core , tribler-common, and tribler-gui are merged together. So it does not give much simplification of the directory structure.
But with approaches 1 & 2, it is not clear where to put the pyipv8 directory. Note that this directory is not a package; a package ipv8 is placed inside it. So we cannot just add src to PYTHONPATH and import everything from it.
IPv8
But where to place pyipv8 then? It does not feel correct for me to have pyipv8, which is not a package, on the same level as a new package tribler (@kozlovsky)
I have no strong opinion on this, I just wanted to say that you can also choose to handle IPv8 as an external dependency. It is on PyPI: https://pypi.org/project/pyipv8/ (@qstokkink)
The text was updated successfully, but these errors were encountered: