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

Implementing lazy-loading #802

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d9fc7a4
Implement lazy loading
edan-bainglass Oct 24, 2024
1a30ba5
Discard old global structure model
edan-bainglass Oct 27, 2024
82af986
Add `model.include` guard on panel refresh
edan-bainglass Oct 27, 2024
767c327
Add `which` parameter to fine-control panel refresh
edan-bainglass Oct 27, 2024
c10166a
Extend `which` parameter use to advanced sub-sections
edan-bainglass Oct 27, 2024
e7a0474
Decouple advanced sub-section models from advanced model
edan-bainglass Oct 28, 2024
86d4402
Emphasize "Step 2.2" in plugin outlines message
edan-bainglass Oct 28, 2024
f5ab93f
Fix `structure.kind`-related bugs
edan-bainglass Oct 28, 2024
99a2507
Implement lazy-loading wrapper on aiida database importer
edan-bainglass Oct 28, 2024
af62531
Fix missing guard on panel reset
edan-bainglass Oct 28, 2024
cc39bb8
Fix missing observation of `override` in advanced subsettings
edan-bainglass Oct 28, 2024
a52e067
Fix issues relating to `kind`s
edan-bainglass Oct 28, 2024
ecbc31a
Handle model linking more cleanly
edan-bainglass Oct 28, 2024
69615ca
Update model variable names
edan-bainglass Oct 29, 2024
b85b515
Modify update specificity handling and add some settings/model docume…
edan-bainglass Oct 29, 2024
10d489f
Fix configuration tab switch bug
edan-bainglass Oct 29, 2024
02c9d87
Fix models
edan-bainglass Oct 29, 2024
6ea3a0b
Silence `ruff` linting error `ARG002: unused method argument`
edan-bainglass Oct 30, 2024
d4588d0
Install sssp and set up qe on startup
edan-bainglass Oct 30, 2024
55e41e4
Run model updates on startup to catch up app to default states
edan-bainglass Oct 30, 2024
aff8ff8
Fix process killing bug
edan-bainglass Oct 30, 2024
c02db41
Handle circular structure link in step 1
edan-bainglass Oct 30, 2024
46c03c8
Add `confirm` methods to structure and configuration models
edan-bainglass Oct 30, 2024
ceff3e3
Enforce panel update on plugin inclusion
edan-bainglass Oct 30, 2024
8448ce6
Implement pytest CLI command to skip slow tests
edan-bainglass Oct 31, 2024
6538bca
Inject structure node instead of ASE object
edan-bainglass Oct 31, 2024
80507cd
Decouple code models from the UI
edan-bainglass Oct 31, 2024
a49cdec
Handle process-loaded structure assignment more cleanly
edan-bainglass Nov 1, 2024
49ee58f
Reduce code duplication with mixins
edan-bainglass Nov 1, 2024
4b6447f
Remove structure relaxation initial options from widget
edan-bainglass Nov 1, 2024
5c54536
Handle step reset on render if a process is loaded (steps already con…
edan-bainglass Nov 1, 2024
0592274
Fix process-node handling by process monitor thread
edan-bainglass Nov 2, 2024
5305d37
Temporarily skip slow tests in CI
edan-bainglass Nov 2, 2024
0c8f3a8
Add `HasInputStructure` mixin to structure step
edan-bainglass Nov 3, 2024
fa19c62
Add hubbard eigenvalues mapping between app/plugin formats
edan-bainglass Nov 3, 2024
ec88790
Add `loaded_from_process` trait to conditionally skip model updates
edan-bainglass Nov 3, 2024
8a0213c
Update naming convension for kinds
edan-bainglass Nov 4, 2024
9485648
Add `has_structure` property to `HasInputStructure` mixin
edan-bainglass Nov 4, 2024
59aa28d
Make pseudos setters always visible
edan-bainglass Nov 4, 2024
03f3251
Fix bug with hubbard eigenvalues widget visibility
edan-bainglass Nov 4, 2024
38a3560
Use generics to improve type hinting
edan-bainglass Nov 4, 2024
fbaf74b
Guard pseudo model updates when loaded from process
edan-bainglass Nov 4, 2024
d18aabb
Clean up unnecessary code
edan-bainglass Nov 5, 2024
877268c
Make un-confirmation more clear
edan-bainglass Nov 5, 2024
f6f57ad
Improve Mediator pattern in `App`
edan-bainglass Nov 5, 2024
c40bbf7
Apply `Confirmable` mixin to submission step
edan-bainglass Nov 6, 2024
9025ba1
Fix lazy-loaded optimade mechanism
edan-bainglass Nov 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
# Only collect code coverage with aiida-core=2.3, to speed up tests
# with higher aiida versions that for some reason run slower, see:
# https://github.com/aiidalab/aiidalab-qe/issues/766
run: pytest -v tests ${{ matrix.aiida-core-version == '2.3' && '--cov=aiidalab_qe' || '' }}
run: pytest -v tests ${{ matrix.aiida-core-version == '2.3' && '--cov=aiidalab_qe' || '' }} --skip-slow

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand Down
31 changes: 15 additions & 16 deletions qe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@
"metadata": {},
"outputs": [],
"source": [
"import urllib.parse as urlparse\n",
"\n",
"from aiidalab_qe.app.main import App\n",
"from aiidalab_widgets_base.bug_report import (\n",
" install_create_github_issue_exception_handler,\n",
Expand All @@ -86,17 +84,23 @@
" labels=(\"bug\", \"automated-report\"),\n",
")\n",
"\n",
"app = App(qe_auto_setup=True)\n",
"\n",
"view.main.children = [app]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import urllib.parse as urlparse\n",
"\n",
"url = urlparse.urlsplit(jupyter_notebook_url) # noqa F821\n",
"query = urlparse.parse_qs(url.query)\n",
"\n",
"app = App(qe_auto_setup=True)\n",
"# if a pk is provided in the query string, set it as the process of the app\n",
"if \"pk\" in query:\n",
" pk = query[\"pk\"][0]\n",
" app.process = pk\n",
"\n",
"view.main.children = [app]\n",
"view.app = app"
" app.process = query[\"pk\"][0]"
]
},
{
Expand All @@ -111,7 +115,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand All @@ -126,11 +130,6 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
},
"vscode": {
"interpreter": {
"hash": "d4d1e4263499bec80672ea0156c357c1ee493ec2b1c70f0acce89fc37c4a6abe"
}
}
},
"nbformat": 4,
Expand Down
Loading
Loading