-
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
Changes to Data
class attributes and TrajectoryData
data storage
#2422
Merged
sphuber
merged 2 commits into
aiidateam:provenance_redesign
from
elsapassaro:fix_201_method_names_for_data
Feb 8, 2019
Merged
Changes to Data
class attributes and TrajectoryData
data storage
#2422
sphuber
merged 2 commits into
aiidateam:provenance_redesign
from
elsapassaro:fix_201_method_names_for_data
Feb 8, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sphuber
force-pushed
the
fix_201_method_names_for_data
branch
from
February 8, 2019 10:23
90130f2
to
2ef384d
Compare
sphuber
changed the title
[WIP] Fix 201 method names for data
Changes to Feb 8, 2019
Data
class attributes and TrajectoryData
data storage
sphuber
force-pushed
the
fix_201_method_names_for_data
branch
from
February 8, 2019 11:45
2ef384d
to
81c5794
Compare
@giovannipizzi and @asle85 I have cleaned Elsa's commits and squashed them into a single one on top of Andreas'. Since this was quite a complicated process due to various merge actions having created duplicate commits, there may have been some changes that have been lost. I doubt it but it would be good if you guys can check if in the changes everything is still there. |
sphuber
force-pushed
the
fix_201_method_names_for_data
branch
from
February 8, 2019 12:24
81c5794
to
3b8556e
Compare
Methods changed to properties: * `Code.is_hidden` * `RemoteData.is_empty` Name changes: * `ArrayData.iterarrays` to `ArrayData.get_iterarrays` * `Code.full_text_info` to `Code.get_full_text_info` * `Code.is_hidden` to `Code.hidden` * `StructureData._get_cif` to `StructureData.get_cif` * `TrajectoryData._get_aiida_structure` to * `TrajectoryData.get_structure` * `TrajectoryData._get_cif` to `TrajectoryData.get_cif` Data structure storage changes: * Symbols in `TrajectoryData` are now passed as a list instead of * `numpy.ndarray` * Symbols in `TrajectoryData` are now stored as an attribute instead of * an array in the repository * `TrajectoryData.set_trajectory` arguments `stepid` and `cells` are now 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.
sphuber
force-pushed
the
fix_201_method_names_for_data
branch
2 times, most recently
from
February 8, 2019 13:13
f9143b5
to
b515dc6
Compare
In the previous commit, the ORM for `TrajectoryData` was changed to start storing the `symbols` as a list in the attributes of the node instead of a `numpy` array in the repository, to make it possible to query for the symbols. This requires a data migration which is implemented in this commit. Since it involves the deletion of the data from the repository after it has been copied to the database, the migration is performed in two stages. The first will copy the data from the repository to the attributes on the node and the second will delete the data in the repository. In this way, if an exception occurs during the migration, no data will be lost.
sphuber
force-pushed
the
fix_201_method_names_for_data
branch
from
February 8, 2019 13:32
b515dc6
to
5355a8b
Compare
sphuber
approved these changes
Feb 8, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #201
Added migrations and tests for TrajectoryData symbols (from numpy array to attribute).
In sqlalchemy migrations and test I used load_node; to discuss if we want to rewrite it to avoid using aiida functionality (e.g. to get and delete numpy arrays).