sukeesh / Jarvis

Personal Assistant for Linux and macOS
MIT License
2.91k stars 1.02k forks source link

Password Generator & Sports API Feature Creation #1175

Open mbeaudoin24 opened 2 months ago

mbeaudoin24 commented 2 months ago

Summary:

This pull request enriches our repository with significant updates to two core features: the PasswordGenerator and SoccerScores plugins, encapsulated in the passGen.py and soccerApi.py files respectively. These enhancements aim to boost the reliability and maintainability of our codebase while ensuring the plugins are easy and clear for both users and developers to utilize.

Changes:

Code Enhancements: passGen.py: Implemented enhancements in the password generation logic to include cryptographically secure random generation and a broader set of character types ensuring stronger passwords. soccerApi.py: Updated to improve the handling of API responses and error management, providing more robust and reliable soccer score fetching functionality.

Testing Suites: Added tests/test_password_generator.py for the PasswordGenerator in passGen.py, focusing on the strength, diversity, and adherence to user specifications of the generated passwords. Introduced tests/test_soccer_scores.py for the SoccerScores in soccerApi.py, aimed at verifying API integration, data parsing accuracy, and effective error handling. Documentation: Created detailed documentation in docs/plugins/password_generator.md for passGen.py and docs/plugins/soccer_scores.md for soccerApi.py. These documents provide comprehensive usage instructions, installation guidance, and detailed method descriptions. Updated the README.md to include links to the new documentation for these plugins, making it easily accessible for end-users and developers.

Impact:

Reliability: The updates to the core code and the addition of thorough testing suites help in early detection and resolution of potential issues, thus minimizing the risk of faults in production. Usability: Enhanced documentation clarifies how to use and extend the plugins, thereby improving the experience for new users and contributors. Maintainability: With clear, in-depth documentation and well-structured tests, updating and maintaining the software becomes more straightforward, promoting future enhancements and modifications by developers.

Request for Review:

I invite all project contributors to carefully review the changes made in passGen.py and soccerApi.py, along with their respective tests and documentation. Please focus on the accuracy, completeness, and potential integration issues of these updates. Your feedback is invaluable and greatly appreciated in ensuring the robustness and functionality of our plugins.

pnhofmann commented 2 months ago

Hey!

it's a bit overkill. AI is a very good use case for generating Test Cases. That adds a benefit - even though you should actually run the tests at last once. Plus fix where the AI tells you to adapt:

from your_module import SoccerScores, JarvisAPI  # Adjust import according to your project structure

;)

The md-files add no benefit. If you want to document, use doc-Strings in the python code: https://www.geeksforgeeks.org/python-docstrings/

Do not include random stuff, just because it's no effort. Anyone can ask the AI: Explain this code. Only add documentation, that you think provides a real value for the reader of your code.

Also do not generate PR-Description with AI. It makes a lot harder to understand what you actually want to say. Summaries with view words what you want - probably even the same text you would ask like ChatGPT. If anyone wants to bloat that text, they can use ChatGPT themself ;).

You are adding two distinct features. So it's better (and expected) to create two separate Pull Requests. As a note to the future, right now not that important.

The actually Code looks good to me.