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

Lazy-docs #919

Open
wants to merge 49 commits into
base: lazy-loading
Choose a base branch
from
Open

Lazy-docs #919

wants to merge 49 commits into from

Conversation

edan-bainglass
Copy link
Member

@edan-bainglass edan-bainglass commented Nov 8, 2024

This PR provides documentation to accompany the changes made in the lazy-loading PR (#802)

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.15%. Comparing base (9025ba1) to head (aeb56fb).

Additional details and impacted files
@@              Coverage Diff              @@
##           lazy-loading     #919   +/-   ##
=============================================
  Coverage         67.15%   67.15%           
=============================================
  Files                78       78           
  Lines              5392     5392           
=============================================
  Hits               3621     3621           
  Misses             1771     1771           
Flag Coverage Δ
python-3.11 67.15% <ø> (ø)
python-3.9 67.16% <ø> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@superstar54 superstar54 left a comment

Choose a reason for hiding this comment

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

Thanks for the docs, it's very helpful to get the whole picture of the design, and for reviewing the PR.
I added some quick comments. I am going to review the lazy-loading PR, and may add more comments later.

docs/source/development/architecture.rst Outdated Show resolved Hide resolved
Comment on lines +205 to +206
It is also used by the advanced panel to register the sub-sections of the advanced settings (e.g. magnetization, hubbard, etc.).

Copy link
Member

Choose a reason for hiding this comment

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

Could you explain a bit more?

Comment on lines +89 to +93
# Controller methods
# EXAMPLE
def _on_trait_change(self, change):
# Update widgets based on model changes
...
Copy link
Member

Choose a reason for hiding this comment

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

I think you also need to show how the widgets in the UI trigger the model update.

Comment on lines +218 to +221
@tl.observe(tl.All)
def _on_any_change(self, change):
if change and change["name"] != "confirmed":
self._unconfirm()
Copy link
Member

Choose a reason for hiding this comment

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

Could you also explain _on_any_change? What is any?

Copy link
Member Author

Choose a reason for hiding this comment

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

tl.All watches ALL traits. So ANY trait change triggers this, hence _on_any_change 🙂 Will make it more verbose in the docs 👍

@edan-bainglass edan-bainglass force-pushed the lazy-loading branch 2 times, most recently from 4f6a21e to 578a997 Compare November 11, 2024 08:11
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