Repository navigation
fix(lara): respect falsy run() overrides in LaraDocumentTranslator - #4169
Conversation
|
Heads-up for maintainers This PR is from a fork and touches integrations whose integration tests require API keys. Affected integrations:
Please run the integration tests locally ( |
Coverage report (lara)Click to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
|
Hi @muthukkumaranb, thanks a lot for your contribution! 🙏 We noticed that the Contributor License Agreement (CLA) check ( To get your PR reviewed, please sign the CLA via the link in the |
|
|
|
Thanks for signing the CLA, @muthukkumaranb! 🎉 This PR is now ready for review again and the reviewer has been re-assigned. |
julian-risch
left a comment
There was a problem hiding this comment.
Thank you @muthukkumaranb !
Related Issues
Proposed Changes:
LaraDocumentTranslator.run()resolved run-time overrides withx or self.x, so falsy values such asreasoning=False,glossaries=[]andadapt_to=[]were silently replaced by the init values.All run-time parameters now use
x if x is not None else self.x, so onlyNonefalls back to the init value.How did you test it?
Added
test_run_falsy_overrides_from_init: it initializes the translator withreasoning=True,glossariesandadapt_to, callsrun(reasoning=False, glossaries=[], adapt_to=[])with a mocked Lara client, and checks that the falsy values reachtranslate(). The test fails before the change and passes after.Ran
hatch run test:unitlocally (23 passed) andruff check/ruff format.Notes for the reviewer
Same pattern as #4084 and #4159.
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.