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
refactor: refactored platform assignment into get_platform function #29971
base: master
Are you sure you want to change the base?
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process. ConflictsNo conflicts as of last run. |
return target | ||
|
||
print(f'Not sure which binary to download for {host}') | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. Now there are two functions and more lines of code, so this is harder to read and to maintain
i understand you're only trying to help, but please don't flood the project with small Python script refactorings. We're severely bottlenecked on review, and tend to have a philosophy to not fix what isn't broken. |
I understood but if the philosophy is to not fix what isn't broken, so what "refactor" (for structural changes that do not change behavior) means? I am really trying to start reading the code from easy parts to contribute and refactor codes and update them. Some codes are for more than 4 years ago which are using subprocess for a single curl refrence which is not optimized when python's providing requests built-in library. |
Sure, but for example: if you're going to do things like optimization, consider if speed is important in the process at that point (in many cases it's not, that's why the tool is in Python and not C++). If it is important, we'll also need to see benchmarks that the speed is noticibly faster. If you've been involved for a while and know where the pain points are, this is easier to know. For new contributors I wouldn't really recommend doing refactors at all. If you're looking for something to work on (which is great!), please check the good first issue label. |
I appreciate your response and explanation. I'll take a quick look into it! |
Also: Getting started to contribute to Bitcoin CoreSetting up your development environmentNew developers are very welcome and needed. There are a lot of open issues of any difficulty waiting to be fixed. However, before you start contributing, familiarize yourself with the Bitcoin Core build system and tests. Refer to the documentation in the repository on how to build Bitcoin Core and how to run the unit and functional tests. Once that is done, you are all set. If you need more help getting started, please refer to the following resources:
Pick something to work onIf you are looking for useful contributions to help out with, you can
|
Improved code readability and maintainability by moving platform identifiers into a dictionary.