Improve Developer Experience with Zero-Config Auth and Diátaxis Docs - #3
Conversation
- Made `credentials` optional in `PrusaConnectClient`. - Added `PrusaConnectCredentials.load_default()` and `from_env()`. - Rewrote `README.md` using Diátaxis framework. - Added tests for new auth logic. Co-authored-by: dcode <171574+dcode@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Made `credentials` optional in `PrusaConnectClient`. - Added `PrusaConnectCredentials.load_default()` and `from_env()`. - Rewrote `README.md` using Diátaxis framework. - Added tests for new auth logic. - Fixed linting errors in tests. Co-authored-by: dcode <171574+dcode@users.noreply.github.com>
This PR significantly improves the Developer Experience (DX) of the
prusa-connectlibrary.Key Changes:
Zero-Config Authentication:
PrusaConnectClient()can now be instantiated without arguments. It will automatically look for credentials in:PRUSA_TOKENS_JSONorPRUSA_TOKEN).prusa_tokens.jsonfile in the current directory (which is where the CLI saves them).PrusaAuthErrorguiding the user to the CLI.Documentation Overhaul:
README.mdfollowing the Diátaxis framework.DX Improvements:
from_envfactory toPrusaConnectCredentialsto support CI/CD usage more easily.from_fileto acceptstrpaths as well asPathobjects.Verification:
tests/test_dx.pyto verify the auto-loading logic and environment variable support.PR created automatically by Jules for task 15224990671937316957 started by @dcode