Skip to content

Implement Lazy Loading of Submodules for faster import #3732

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

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
dfee63a
define a `lazy_import` function
arjxn-py Jan 15, 2024
c9ae592
Modify `lazy_import` to have attribute
arjxn-py Jan 16, 2024
40d1994
Implement lazy import to idaklu solver
arjxn-py Jan 16, 2024
2e4bdad
Add handling for `*`
arjxn-py Jan 16, 2024
c7108fc
Start reolving `.util` imports
arjxn-py Jan 17, 2024
26a78d5
Resolve `.util` imports lazily
arjxn-py Jan 17, 2024
258bf3f
Resolve `.logger`, `.settings` & `.citations` imports lazily
arjxn-py Jan 18, 2024
948381b
Resolve `.expression_tree` imports lazily
arjxn-py Jan 18, 2024
05bf354
Resolve remaining operational `.expression_tree` imports lazily
arjxn-py Jan 18, 2024
13ac84c
Resolve model imports lazily
arjxn-py Jan 18, 2024
9b54d71
Resolve submodels imports lazily
arjxn-py Jan 18, 2024
983e0f8
Remaining submodel interfaces
arjxn-py Jan 18, 2024
b48169c
Resolve `.geometry` imports lazily
arjxn-py Jan 18, 2024
bae2485
Resolve `.parameter` imports lazily
arjxn-py Jan 18, 2024
fd9a4e0
Revert breaking imports
arjxn-py Jan 20, 2024
3fe12fd
Try `lazy_loader` instead
arjxn-py Jan 20, 2024
fcdf41d
Revert breaking `.expression_tree`, `.models` & `.submodels` imports
arjxn-py Jan 20, 2024
2b979af
Resolve other utility imports
arjxn-py Jan 20, 2024
9c43ac6
Generate every `__init__` using [mkinit](https://github.com/Erotemic/…
arjxn-py Jan 21, 2024
94a6a9e
Remove existing imports
arjxn-py Jan 21, 2024
5e033d3
Merge branch 'develop' into lazy-imports
arjxn-py Jan 21, 2024
4d0d480
Defined `lazy_import` function is now redundant
arjxn-py Jan 21, 2024
1c0d832
`.logger`, `.settings`, `.citations` causing CI issues
arjxn-py Jan 21, 2024
fb660ec
Resolve error causing imports
arjxn-py Jan 21, 2024
c7e3da2
Set `EAGER_IMPORT` blank for tests
arjxn-py Jan 21, 2024
074616e
Manage to fix import atleeast
arjxn-py Jan 21, 2024
ec571ba
Resolve Min, Max & other imports causing failures
arjxn-py Jan 21, 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
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
PYBAMM_ENV = {
"SUNDIALS_INST": f"{homedir}/.local",
"LD_LIBRARY_PATH": f"{homedir}/.local/lib",
"EAGER_IMPORT": "",
}
VENV_DIR = Path("./venv").resolve()

Expand Down
Loading