api
api copied to clipboard
`MPRester` lazily get `endpoint` and `api_key`
Summary
- Lazily get
endpointandapi_key, to close #935 - [x] Add more unit tests
@tschaume This one is ready for review, thanks!
Also try to ping @janosh if you are interested in commenting :)
The test failure is owing to restricted access to repo secret from a fork:
With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.
And is passing locally:
=================================================== test session starts ====================================================
platform darwin -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/yang/developer/api
configfile: pyproject.toml
plugins: typeguard-4.3.0
collected 31 items
tests/test_client.py ............................... [100%]
@DanielYang59 release candidate is out for this 🎉 See https://pypi.org/project/mp-api/0.43.0rc0/
Great! Thanks a lot for reviewing!