Add adapter power on/off functionality - #31
Conversation
…e/disable for clarity
…ality and handle adapter device state loop
|
First of all, that's not how you split commits. A commit should be a logical change, a step in the development process that leaves the project in a working state. I should be able to build the project successfully at each of your commits. Secondly, since you've mentioned multiple times that you're a beginner and seeing how verbose this PR message is, it is quite obvious that you rely heavily on AI assistance. I don't blame you for that, but it is important to understand everything that's produced, and since as a beginner you probably don't, I don't think handling significant features yourself is the best way to help on open source projects at this point. Filling well-documented issues or providing targeted fixes is a much better way to help, since it avoids introducing bugs, making bad architectural choices, and burdening maintainers with code reviews. Learning through experience is better done in personal projects. I also mentioned to you that device-level control is fine for |
|
Ah apologies. Thank you for the feedback. I aimed to keep the commits buildable. I just learned I should do linting checks prior to commits. I also see I should split them more logically. And yes, this stretched me well beyond my comfort zone. However, I developed this by looking at the existing structures in the project and debugging constantly. So if it appears amature-like, that's because I tried my best to not to stretch beyond what I could reference from given my limited knowledge. Next time I'll stick to documenting an issue first. Would providing a link to a forked branch in an issue be considered inappropriate? |
|
Providing a link to a forked branch would amount to the same thing, you're generating code you don't understand and asking someone qualified to review it. I'm not your teacher; most open-source maintainers already do this in their spare time, you're just adding to their burden. I think you should just study, learn best practices, and gain experience on personal projects. Open pull requests only when you're confident in the quality of the code you're producing and understand every aspect of it. |
I'm submitting a pull request to add adapter power on/off functionality to the project. The pull request is a little large as it was pretty involved and required a degree of modifying existing functionality as well as adding new functionality. I've maintained the existing project patterns the best I can and broke down the commits into reasonable chunks so it's easier to follow.
The general idea for adding this pull request is that
iwdcan control the power of the adapter (physical) and enable/disable the Wi-Fi/AP device (logical). Leaving the adapter power out of the project means the user has toiwctl adapter <name> set-property Powered onoroffmanually. If the project adds this functionality it's a ease-of-use upgrade, helps the project to more comprehensively align withiwctl's functionality and allows iwmenu to operate properly regardless of the adapter and device states.The general approach was as follows :
runto handle launching iwmenu regardless of the adapter and device states.Possible behaviors to address in future commits:
--interactionflag may need some conditionals added (for self.running or stay_in_settings_menu). The functionality works fine, but you may prefer the behavior to exit after "Power Off Adapter" is selected.I'd appreciate any feedback. Let me know if you have any questions about the commits.