-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify function names in Data classes #201
Comments
Original comment by Giovanni Pizzi (Bitbucket: pizzi, GitHub: giovannipizzi): Mentioned in c198bdc |
Original comment by Leonid Kahle (Bitbucket: leonidkahle, GitHub: lekah): TrajectoryData.set_trajectory(): make setting of steps (or stepids) and cells optional, store symbols in the attributes (easier querying) |
I will keep this issue for the renaming suggestions and split out the general Summary of methods to be renamed:
Summary of proposed other changes:
|
As proposed in issue aiidateam#201 symbols are now stored in a TrajectoryData attribute rather than an array to simplify the query for these symbols
…ired input parameter for TrajectoryData.set_trajectory() method (#2310) * Rename ArrayData.iterarrays() to ArrayData.get_iterarrays() * [TrajectoryData] Rename _get_aiida_structure() -> get_structure() * [TrajectoryData] Rename _get_cif() -> get_cif() * Rename _get_cif() -> get_cit() in tcod.py * [StructureData] Rename _get_cif() -> get_cif() * Make stepid and cells parameter optional Change TrajectoryData to make passing stepids and cells optional. While nothing will be stored for cells if not given a consecutive sequence will be automatically assigned to stepids if missing from the inputs. * Store symbols in TrajectoryData attribute instead of array As proposed in issue #201 symbols are now stored in a TrajectoryData attribute rather than an array to simplify the query for these symbols * Change passed symbols from numpy.ndarray to list in set_structurelist * Change TrajectoryData tests to use symbols attribute rather than symbols array * Make Code.is_hidden() available as class property * Rename Code.full_text_info() method to .get_full_text_info() * Change RemoteData.is_empty() method to class property .is_empty * Change is_alloy() and has_vacancies() methods to properties Make class methods .is_alloy() and .has_vacancies() for StrutureData and Kind classes accessible as class properties .is_alloy and .has_vacancies * Change symbols type from numpy.array to list * Add deprecation warning to renamed methods * Rename code attribute is_hidden to hidden. * Set allowed symbols type to be Iterable rather than list * Ensure symbols are stored as list * Adjust argument ordering in set_trajectory() docstring. * Document introduced changes in concepts/workflows
Added migration and test for django, pushed to https://github.com/asle85/aiida_core/tree/fix_201_method_names_for_data To do: write migration for sqlalchemy |
Fixed in PR #2422 |
Originally reported by: Giovanni Pizzi (Bitbucket: pizzi, GitHub: giovannipizzi)
Some methods are not called intuitively:
Also, we should redesign the node class (and its subclasses) to avoid that there are too many methods 'cluttering' the namespace for every node (to discuss)
The text was updated successfully, but these errors were encountered: