-
-
Notifications
You must be signed in to change notification settings - Fork 738
Improve time-to-first-solve #5364
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
Open
BradyPlanden
wants to merge
19
commits into
main
Choose a base branch
from
feat/improvements-for-time-to-first-solve
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,610
−295
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
73014e1
feat: easy import fixes, ~20% speedup
BradyPlanden ef53210
feat: next round of imports, another ~40% improvement
BradyPlanden fe48111
feat: hybrid lazy loading for faster cold-start import
BradyPlanden e99b40f
refactor: using lazy-loader
BradyPlanden fa2bdea
infra: stub autogeneration
BradyPlanden d987521
temp commit: lazy.load implementation
BradyPlanden 9b3d2a6
Adds CompositeSolver class
BradyPlanden 4b3241c
refactor: clean up lazy loading implementation
BradyPlanden d949ad3
perf: replace lazy.load() with inline imports for external deps
BradyPlanden 8548137
perf: eagerly import high usage submodules, lazy import posthog
BradyPlanden 4076a9f
fix: IDE stub rendering
BradyPlanden 04b31bc
fix: defer JAX config and add stub export validation
BradyPlanden b85ee6b
refactor: consolidate lazy loading config into single source of truth
BradyPlanden 88c1393
tests: cleanup stale additions, pre-commit
BradyPlanden 8069c32
style: pre-commit fixes
pre-commit-ci[bot] 8e87ec7
fix: docs require full path, remove stale workflow stub check arg
BradyPlanden 92b7831
pre-commit: exclude .pyi stub files
BradyPlanden ba84f2c
Merge branch 'main' into feat/improvements-for-time-to-first-solve
BradyPlanden 25fe12f
Merge branch 'main' into feat/improvements-for-time-to-first-solve
BradyPlanden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Interface Base Model | ||
| ==================== | ||
|
|
||
| .. autoclass:: pybamm.interface.BaseInterface | ||
| .. autoclass:: pybamm.models.submodels.interface.BaseInterface | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
...ource/api/models/submodels/interface/interface_utilisation/base_utilisation.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Utilisation Base Model | ||
| ====================== | ||
|
|
||
| .. autoclass:: pybamm.interface.interface_utilisation.BaseModel | ||
| .. autoclass:: pybamm.models.submodels.interface.interface_utilisation.BaseModel | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
...e/api/models/submodels/interface/interface_utilisation/constant_utilisation.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Constant Utilisation | ||
| ==================== | ||
|
|
||
| .. autoclass:: pybamm.interface.interface_utilisation.Constant | ||
| .. autoclass:: pybamm.models.submodels.interface.interface_utilisation.Constant | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
...models/submodels/interface/interface_utilisation/current_driven_utilisation.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| CurrentDriven Utilisation | ||
| ========================= | ||
|
|
||
| .. autoclass:: pybamm.interface.interface_utilisation.CurrentDriven | ||
| .. autoclass:: pybamm.models.submodels.interface.interface_utilisation.CurrentDriven | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
...ource/api/models/submodels/interface/interface_utilisation/full_utilisation.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Full Utilisation | ||
| ================ | ||
|
|
||
| .. autoclass:: pybamm.interface.interface_utilisation.Full | ||
| .. autoclass:: pybamm.models.submodels.interface.interface_utilisation.Full | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/kinetics/base_kinetics.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Base Kinetics | ||
| ============= | ||
|
|
||
| .. autoclass:: pybamm.kinetics.BaseKinetics | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.BaseKinetics | ||
| :members: |
4 changes: 2 additions & 2 deletions
4
docs/source/api/models/submodels/interface/kinetics/butler_volmer.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| Butler Volmer | ||
| ============= | ||
|
|
||
| .. autoclass:: pybamm.kinetics.SymmetricButlerVolmer | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.SymmetricButlerVolmer | ||
| :members: | ||
|
|
||
| .. autoclass:: pybamm.kinetics.AsymmetricButlerVolmer | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.AsymmetricButlerVolmer | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/kinetics/diffusion_limited.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Diffusion-limited | ||
| ================= | ||
|
|
||
| .. autoclass:: pybamm.kinetics.DiffusionLimited | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.DiffusionLimited | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
...ource/api/models/submodels/interface/kinetics/inverse_kinetics/base_inverse.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Base Inverse Kinetics | ||
| ===================== | ||
|
|
||
| .. autoclass:: pybamm.kinetics.BaseInverseKinetics | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.BaseInverseKinetics | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
.../models/submodels/interface/kinetics/inverse_kinetics/inverse_butler_volmer.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Inverse Butler-Volmer | ||
| ===================== | ||
|
|
||
| .. autoclass:: pybamm.kinetics.InverseButlerVolmer | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.InverseButlerVolmer | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
...rce/api/models/submodels/interface/kinetics/inverse_kinetics/inverse_linear.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Inverse Linear | ||
| ============== | ||
|
|
||
| .. autoclass:: pybamm.kinetics.InverseLinear | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.InverseLinear | ||
| :members: |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Linear | ||
| ====== | ||
|
|
||
| .. autoclass:: pybamm.kinetics.Linear | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.Linear | ||
| :members: |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Marcus | ||
| ====== | ||
|
|
||
| .. autoclass:: pybamm.kinetics.Marcus | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.Marcus | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/kinetics/msmr_butler_volmer.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| MSMR Butler Volmer | ||
| ================== | ||
|
|
||
| .. autoclass:: pybamm.kinetics.MSMRButlerVolmer | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.MSMRButlerVolmer | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/kinetics/no_reaction.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| NoReaction | ||
| ========== | ||
|
|
||
| .. autoclass:: pybamm.kinetics.NoReaction | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.NoReaction | ||
| :members: |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Tafel | ||
| ===== | ||
|
|
||
| .. autoclass:: pybamm.kinetics.ForwardTafel | ||
| .. autoclass:: pybamm.models.submodels.interface.kinetics.ForwardTafel | ||
| :members: |
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/lithium_plating/base_plating.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| Base Plating | ||
| ============ | ||
|
|
||
| .. autoclass:: pybamm.lithium_plating.BasePlating | ||
| .. autoclass:: pybamm.models.submodels.interface.lithium_plating.BasePlating | ||
| :members: | ||
|
|
||
| .. footbibliography:: |
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/lithium_plating/no_plating.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| No Plating | ||
| ========== | ||
|
|
||
| .. autoclass:: pybamm.lithium_plating.NoPlating | ||
| .. autoclass:: pybamm.models.submodels.interface.lithium_plating.NoPlating | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/lithium_plating/plating.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| Plating | ||
| ======= | ||
|
|
||
| .. autoclass:: pybamm.lithium_plating.Plating | ||
| .. autoclass:: pybamm.models.submodels.interface.lithium_plating.Plating | ||
| :members: | ||
|
|
||
| .. footbibliography:: |
4 changes: 2 additions & 2 deletions
4
docs/source/api/models/submodels/interface/open_circuit_potential/base_ocp.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| Base Open Circuit Potential | ||
| =========================== | ||
|
|
||
| .. autoclass:: pybamm.open_circuit_potential.BaseOpenCircuitPotential | ||
| .. autoclass:: pybamm.models.submodels.interface.open_circuit_potential.BaseOpenCircuitPotential | ||
| :members: | ||
|
|
||
| .. autoclass:: pybamm.open_circuit_potential.BaseHysteresisOpenCircuitPotential | ||
| .. autoclass:: pybamm.models.submodels.interface.open_circuit_potential.BaseHysteresisOpenCircuitPotential | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
...e/api/models/submodels/interface/open_circuit_potential/current_sigmoid_ocp.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Current Sigmoid Open Circuit Potential | ||
| ====================================== | ||
|
|
||
| .. autoclass:: pybamm.open_circuit_potential.CurrentSigmoidOpenCircuitPotential | ||
| .. autoclass:: pybamm.models.submodels.interface.open_circuit_potential.CurrentSigmoidOpenCircuitPotential | ||
| :members: |
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
...rface/open_circuit_potential/one_state_differential_capacity_hysteresis_ocp.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| One State Differential Capacity Hysteresis Open Circuit Potential | ||
| ================================================================= | ||
|
|
||
| .. autoclass:: pybamm.open_circuit_potential.OneStateDifferentialCapacityHysteresisOpenCircuitPotential | ||
| .. autoclass:: pybamm.models.submodels.interface.open_circuit_potential.OneStateDifferentialCapacityHysteresisOpenCircuitPotential | ||
| :members: | ||
|
|
||
| .. footbibliography:: |
2 changes: 1 addition & 1 deletion
2
.../models/submodels/interface/open_circuit_potential/one_state_hysteresis_ocp.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| One-state hysteresis open-circuit potential | ||
| =========================================== | ||
|
|
||
| .. autoclass:: pybamm.open_circuit_potential.OneStateHysteresisOpenCircuitPotential | ||
| .. autoclass:: pybamm.models.submodels.interface.open_circuit_potential.OneStateHysteresisOpenCircuitPotential | ||
| :members: | ||
|
|
||
| .. footbibliography:: |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| SEI Base Model | ||
| ============== | ||
|
|
||
| .. autoclass:: pybamm.sei.BaseModel | ||
| .. autoclass:: pybamm.models.submodels.interface.sei.BaseModel | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/sei/constant_sei.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Constant SEI | ||
| ============ | ||
|
|
||
| .. autoclass:: pybamm.sei.ConstantSEI | ||
| .. autoclass:: pybamm.models.submodels.interface.sei.ConstantSEI | ||
| :members: |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| No SEI | ||
| ====== | ||
|
|
||
| .. autoclass:: pybamm.sei.NoSEI | ||
| .. autoclass:: pybamm.models.submodels.interface.sei.NoSEI | ||
| :members: |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| SEI Growth | ||
| ========== | ||
|
|
||
| .. autoclass:: pybamm.sei.SEIGrowth | ||
| .. autoclass:: pybamm.models.submodels.interface.sei.SEIGrowth | ||
| :members: | ||
|
|
||
| .. footbibliography:: |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Total SEI | ||
| ========= | ||
|
|
||
| .. autoclass:: pybamm.sei.TotalSEI | ||
| .. autoclass:: pybamm.models.submodels.interface.sei.TotalSEI | ||
| :members: |
2 changes: 1 addition & 1 deletion
2
docs/source/api/models/submodels/interface/total_interfacial_current.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| Total Interfacial Current Model | ||
| =============================== | ||
|
|
||
| .. autoclass:: pybamm.interface.TotalInterfacialCurrent | ||
| .. autoclass:: pybamm.models.submodels.interface.TotalInterfacialCurrent | ||
| :members: |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,7 @@ dependencies = [ | |
| "posthog", | ||
| "pyyaml", | ||
| "platformdirs", | ||
| "lazy_loader>=0.4", | ||
| ] | ||
|
|
||
| [project.urls] | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add this into the
.pre-commit-config.yamlfile directly as a pre-commit hook? This way we won't need to add another step here and it will be covered byuvx pre-commit run -aabove:Something like this should work (please validate the regex here).