Skip to content
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

👌 IMPROVE: Ensure QueryBuilder is passed Backend #5186

Merged
merged 3 commits into from
Oct 22, 2021

Conversation

chrisjsewell
Copy link
Member

This PR ensures core code always calls QueryBuilder with a specific Backend, as opposed to assuming the loaded Backend.
This will allow for muliple backends to be used at the same time (for example aiida archives), for features including graph traversal and visualisation.

This PR ensures core code always calls `QueryBuilder` with a specific `Backend`, as opposed to assuming the loaded `Backend`.
This will allow for muliple backends to be used at the same time (for example aiida archives), for features including graph traversal and visualisation.
@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #5186 (893d275) into develop (d585d14) will increase coverage by 0.01%.
The diff coverage is 93.94%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5186      +/-   ##
===========================================
+ Coverage    81.01%   81.01%   +0.01%     
===========================================
  Files          535      535              
  Lines        37376    37392      +16     
===========================================
+ Hits         30275    30289      +14     
- Misses        7101     7103       +2     
Flag Coverage Δ
django 75.82% <90.91%> (+0.03%) ⬆️
sqlalchemy 74.94% <90.91%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiida/tools/graph/age_entities.py 82.82% <ø> (+0.65%) ⬆️
aiida/tools/graph/deletions.py 76.75% <75.00%> (ø)
aiida/cmdline/utils/common.py 68.85% <80.00%> (-0.02%) ⬇️
aiida/tools/graph/graph_traversers.py 87.94% <83.34%> (-0.66%) ⬇️
aiida/tools/visualization/graph.py 82.70% <91.67%> (+0.14%) ⬆️
aiida/orm/implementation/django/comments.py 95.95% <100.00%> (ø)
aiida/orm/implementation/django/logs.py 96.16% <100.00%> (ø)
aiida/orm/implementation/sqlalchemy/comments.py 94.67% <100.00%> (ø)
aiida/orm/implementation/sqlalchemy/logs.py 94.74% <100.00%> (ø)
aiida/orm/nodes/data/array/bands.py 77.46% <100.00%> (ø)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d585d14...893d275. Read the comment docs.

Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed prior online, we might want to move to the concept of passing a Profile instance around instead of Backend as the profile concept is more intuitive to a user compared to the backend. However, this required some more discussion and we did more or less agree that having the possibility to pass one of the two explicitly for the querybuilder is necessary, so we are going to merge this PR as is. Thanks @chrisjsewell

@sphuber sphuber merged commit 2f2bdc3 into aiidateam:develop Oct 22, 2021
chrisjsewell added a commit that referenced this pull request Oct 27, 2021
This is a follow-up to #5186,
to ensure `Graph` always uses the initialised `Backend`.
chrisjsewell added a commit that referenced this pull request Oct 27, 2021
This is a follow-up to #5186,
to ensure `Graph` always uses the initialised `Backend`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants