Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to ChargeDensityRester (#396)
* Update ChargeDensityRester [...] Ensure it follows examples set from other routes. * Remove charge density patched methods * Move `MPRester` to root level and remove unnecessary methods * Try using Generics for type hints in `BaseRester` * Remove `query_by_task_id` * Add type hint * Add type hints for all routes * Remove all type hint stubs * Remove unnecessary `type: ignore` * Add type hints throughout and propagate `use_document_model` kwarg * Change `query` to `_query_resource_data` to avoid confusion with `search` and old `MPRester.query` Specifically, `_query_resource_data` only returns a single page of results which could be misleading. It's really an internal method. * Allow same instance of `BaseRester` to be used in multiple contexts * Make `use_document_model` and `monty_decode` instance attributes * Add type hints * Remove unimplemented method * Fix client for POST documents * Add tolerances from Emmet to `find_structure` + fix bug * Use Emmet `TaskType`, add user_settings type hint, `NotImplementedError` for `notify_db_version` * Import `UserSettingsRester` * Change `user_settings` to `_user_settings` * Update UserSettingsRester with appropriate metadata * Ensure `tqdm` total document count respects paging * Add `download_for_task_ids` * Add only specific fields * Add `_user_settings` * Update for BaseRester changes, change for `task_id` from `calculation_id` for consistency * Restore code from bad refactor * Change to use attribute from document model * Temporarily remove substrates, surfaces tests FYI @munrojm, think these are superfluous, possibly pending adding the miller index info to the API endpoint * Also comment out get_gb_data * Remove `use_document_model` * Use attributes for surface properties document * Add check for sub-urls * Add better check for suburl * Clarify `find_structure` behavior + add `allow_multiple_results` kwarg * Allow for multiple types of POST that may return a single document or list of documents * Add missing type hint * Try to bugs introduced when refactoring `use_document_model` * Add new Charge Density methods * Fix electronis structure tests * Enable get_by_key for charge density endpoint * Small test fixes * Add chgcar client tests * Linting and temp xfail * mypy fixes * More linting * Fix start imports with flake8 * Clean up mprester test Co-authored-by: Jason Munro <jmunro@lbl.gov>
- Loading branch information