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

Moved metadata_store into database and content_discovery #7773

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

qstokkink
Copy link
Contributor

@qstokkink qstokkink commented Dec 12, 2023

Related to #7669, following the plan of #7669 (comment)

The changes of this PR are simply moves and dead code removal.

Unit tests have been added to cover missing lines (in our existing code). The lines in database_component.py that are part of gui_test_mode or chant_testnet are not covered.

@qstokkink qstokkink force-pushed the upd_db_class_locations branch 6 times, most recently from 47ca1d1 to d582312 Compare December 12, 2023 15:29
@qstokkink qstokkink marked this pull request as ready for review December 12, 2023 15:38
@qstokkink qstokkink requested a review from a team as a code owner December 12, 2023 15:38
@qstokkink qstokkink requested review from drew2a and removed request for a team December 12, 2023 15:38
@qstokkink qstokkink changed the title WIP: Moved metadata_store into database and content_discovery READY: Moved metadata_store into database and content_discovery Dec 13, 2023
db_path = ":memory:"

self.db = TriblerDatabase(str(db_path))

# TODO: merge the code below into the TriblerDatabase
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a TODO for the next PR, or is it a forgotten TODO for the current PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the next PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the developers and I in this group consider it bad, or let's say "not good," practice to merge changes with TODOs into the main branch.

I'm not stopping you from doing this by not giving acceptance to the PR. I'm just highlighting that there are many points of view on this practice, some of which consider it to be a bad practice that leads to code quality degradation.

https://www.reddit.com/r/learnprogramming/comments/r25bj7/are_is_committing_code_to_github_with_todos_bad/?rdt=46532

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with them. However, our current linters are configured to allow this. Notably, I did not have to disable any warnings to pass our PR checks.

Once we fix #1722 we can adopt a more strict stance on this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you saying that if you understand there is a bad practice, but there are no configured linter issues, then it is okay for you to commit and merge the code despite its quality?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though I disagree with the practice personally, this is the approach that the team has chosen and I adapt my workflow to it.

If I were the only developer, I would make make own standards and conform to what I would like to see. Sadly, I am not the only developer and I have to conform to the existing rules and linter settings.

Copy link
Collaborator

@drew2a drew2a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@qstokkink qstokkink changed the title READY: Moved metadata_store into database and content_discovery Moved metadata_store into database and content_discovery Dec 14, 2023
@qstokkink qstokkink merged commit 5923954 into Tribler:main Dec 14, 2023
20 checks passed
@qstokkink qstokkink deleted the upd_db_class_locations branch December 14, 2023 08:37
@qstokkink qstokkink mentioned this pull request Dec 14, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants