Materials-Consortia / Materials-Consortia/optimade-python-tools
INFO gives wrong location for loaded config file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 91
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
When no valid config file is present in home/[username]/.optimade.json you sometimes still get the message:
INFO: [optimade] Using: Mock MongoDB (mongomock)
WARNING: [optimade] Invalid config file or no config file provided, running server with default settings. Errors: ['/home/[username]/Optimade/optimade-python-tools/optimade/server/config.py:126: UserWarning: Unable to find config file at /home/[username]/.optimade.json, using the default settings instead.\n']
INFO: [optimade] Loaded settings from /home/[username]/.optimade.json.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in optimade/server/config.py around line 126 and reproduce the startup messages with no valid ~/.optimade.json file. Trace how the configuration status is reported, then verify that the INFO message identifies a file as loaded only when it was actually loaded and that the existing warning remains accurate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100