Skip to content
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

READY: Total dirs renaming #5032

Merged
merged 4 commits into from
Jan 2, 2020
Merged

READY: Total dirs renaming #5032

merged 4 commits into from
Jan 2, 2020

Conversation

ichorid
Copy link
Contributor

@ichorid ichorid commented Dec 31, 2019

!!! ACHTUNG !!!!

Git does not preserve history through file renames. This is a known Git shortcoming. Locally, git blame should still work, but GitHub will forever show yours truly as the sole author of the moved files.

Ok, this is bad. However, considering the amount of refactoring Tribler codebase underwent through the last year, and in the wake of Blackifiyng the whole repository, this is not that bad. Otherwise, we're stuck with 😵 🍄 dRuG-aDdiCt-StyLe 🍄 😵 non-pep8 naming forever.

@ichorid ichorid added this to the V7.5: core refactoring milestone Dec 31, 2019
@ghost
Copy link

ghost commented Dec 31, 2019

DeepCode's analysis on #e89149 found:

  • 1 critical issue. ⚠️ 4 warnings and 42 minor issues. ✔️ 3 issues were fixed.
  • We show critical issues and security vulnerabilities below 👇.

List of critical issues

Description of the issue ❌ Example fixes
Missing call of decode for base64.b64encode. May cause unicode problems. Occurrences: Example fixes 🔧


💬 This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.


☺️ If you want to provide feedback on our bot, here is how to contact us.

@qstokkink
Copy link
Contributor

Could you give us a quick overview of the performed renaming in the OP*? The LOC change is rather.. daunting.

* And any changes that were non-trivial.

@ichorid
Copy link
Contributor Author

ichorid commented Dec 31, 2019

Could you give us a quick overview of the performed renaming in the OP*? The LOC change is rather.. daunting.

  • And any changes that were non-trivial.

Well, the best way to look at the new structure is to browse it: https://github.com/ichorid/tribler/tree/rename_dir
The principal idea of this PR is described in #4953. At this moment, this is still just git mv renames. The next step is to fix the imports with sed magic and make sure everything works. The last step will be the hardest one, as I'll have to adjust the infrastructure (Jenkins builds, etc).

@egbertbouman
Copy link
Member

I have to say, compared to previous versions of your branch, I looks a lot better now that you've cleaned up the root a bit and moved to tests into separate directories.

However, considering the amount of refactoring Tribler codebase underwent through the last year, and in the wake of Blackifiyng the whole repository, this is not that bad.

Just a quick comment on code reformatting, before you make another massive pr. As far as I know blackifying the entire codebase is still up for discussion and we merely agreed it was ok to blackify gui and metadata code.

@ichorid
Copy link
Contributor Author

ichorid commented Jan 1, 2020

Just a quick comment on code reformatting, before you make another massive pr. As far as I know blackifying the entire codebase is still up for discussion and we merely agreed it was ok to blackify gui and metadata code.

Don't worry, I'm not going to do it without every developer's consent 😉

@ichorid ichorid mentioned this pull request Jan 1, 2020
24 tasks
This commit changes the repository dirs structure to conform with
Python standards. Tribler is now split into three Python packages:
 * tribler-core // All Core and modules
 * tribler-gui // All GUI stuff
 * tribler-common // Contains definitions common to GUI and Core
All the packages now reside in ./src directory, as well as other
components, e.g. submodules. Tests are moved inside the corresponding
subpackages directories.
@ichorid ichorid changed the title WIP: Total dirs renaming READY: Total dirs renaming Jan 2, 2020
@ichorid ichorid marked this pull request as ready for review January 2, 2020 16:12
.flake8 Show resolved Hide resolved
@ichorid
Copy link
Contributor Author

ichorid commented Jan 2, 2020

@xoriole, I consider this good and ready for merging.

@ichorid
Copy link
Contributor Author

ichorid commented Jan 2, 2020

run_tribler.py works from PyCharm if individual src/ subdirs are marked as source dirs. This way it is compatible with potential pip packaging. Core tests pass, though Jenkins test runners still have to be adjusted.

@xoriole
Copy link
Contributor

xoriole commented Jan 2, 2020

The main execution file run_tribler.py and the core tests, all seems to work fine. I think we can merge this, and fix the test runners and other issues one by one.
Also with this change, documentation and update to (now outdated) ReadMe become quite important.

@ichorid ichorid merged commit bcf03e0 into Tribler:devel Jan 2, 2020
@ichorid ichorid deleted the rename_dir branch January 2, 2020 20:05
@synctext
Copy link
Member

synctext commented Jan 3, 2020

😮 LoC: "+70,962 -71,584"

@ichorid
Copy link
Contributor Author

ichorid commented Jan 3, 2020

open_mouth LoC: "+70,962 -71,584"

Yep, I'm holding the record for the biggest PR now 😛

@egbertbouman
Copy link
Member

Yes, truly amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants