René's URL Explorer Experiment


Title: Separate model view from view settings for more reliable reload by kkiesling · Pull Request #99 · openmc-dev/plotter · GitHub

Open Graph Title: Separate model view from view settings for more reliable reload by kkiesling · Pull Request #99 · openmc-dev/plotter

X Title: Separate model view from view settings for more reliable reload by kkiesling · Pull Request #99 · openmc-dev/plotter

Description: I am making this a draft because I think it needs work, but it could use another set of eyes. I think this is a bit clunky the way I have it still. The point of this change is to separate the viewer settings from the model settings such that when something is reopened, the view can still be reset even if the model has changed. To do that, I separated the PlotView class into two classes: PlotViewIndependent and PlotView. The latter inherits from the former which contains all the model-independent information for the view settings. When PlotViewIndependent is initialized, there is the option to use a past view (eg currentView from the plot_settings.pkl file and it will set all the parameters based on that view. And then PlotView will still use the cells and mats from the current load of the model. This allows us to remove the checking of the model hashes when we want to load the plot_settings.pkl file because instead of loading all the previous information, we just initialize the current model right off the bat with the last view from that pkl file and do not worry about the cells, mats, etc. that could have changed. Those will still get loaded in from the current model. Question: How important is it to reload the previousViews and subsequentViews from the plot_settings.pkl file? Right now with these changes I don't reload those lists only because the mat/cells could be changed from those views. I do have a workaround for that in mind, but I think it would be time consuming to implement for large models (I'll add what am thinking to an inline comment where it should go). If these things are not important, then we could also greatly reduce the size of the pkl file that is written out by only saving the currentView attributes that are necessary for reloading (and the statepoint file info). FWIW- I have tested this and it does reliably work to reload changed models but keep the view settings. But it could probably be more elegant. fixes #96

Open Graph Description: I am making this a draft because I think it needs work, but it could use another set of eyes. I think this is a bit clunky the way I have it still. The point of this change is to separate the viewe...

X Description: I am making this a draft because I think it needs work, but it could use another set of eyes. I think this is a bit clunky the way I have it still. The point of this change is to separate the viewe...

Opengraph URL: https://github.com/openmc-dev/plotter/pull/99

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:520f5a04-5c66-6a22-b4ed-e6ced409b1bf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAF08:1C6A96:4CE8097:665E975:6A65579F
html-safe-nonce506cf520c0088fa3e8f45f3c2e41e4a58717fe485c94b5fadea623601195f640
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjA4OjFDNkE5Njo0Q0U4MDk3OjY2NUU5NzU6NkE2NTU3OUYiLCJ2aXNpdG9yX2lkIjoiNjIxMzEzNDEyOTIyNjQwNTc5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac51fbfbc58700c7b2ba5e1a3d23f8369a2b2206cef6945a1e41103ff0b6dfd73d
hovercard-subject-tagpull_request:964542251
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
twitter:imagehttps://avatars.githubusercontent.com/u/4060017?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4060017?s=400&v=4
og:image:altI am making this a draft because I think it needs work, but it could use another set of eyes. I think this is a bit clunky the way I have it still. The point of this change is to separate the viewe...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/openmc-dev/plotter git https://github.com/openmc-dev/plotter.git
octolytics-dimension-user_id42039615
octolytics-dimension-user_loginopenmc-dev
octolytics-dimension-repository_id176784178
octolytics-dimension-repository_nwoopenmc-dev/plotter
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id176784178
octolytics-dimension-repository_network_root_nwoopenmc-dev/plotter
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release309153364422b3c499922d1a2a6404910a58ed8e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenmc-dev%2Fplotter%2Fpull%2F99%2Fcommits%2F882540558931d9c4eab98d559eaac77e9959a925
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenmc-dev%2Fplotter%2Fpull%2F99%2Fcommits%2F882540558931d9c4eab98d559eaac77e9959a925
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=openmc-dev%2Fplotter
Reloadhttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
Reloadhttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
Reloadhttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
Please reload this pagehttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
openmc-dev https://github.com/openmc-dev
plotterhttps://github.com/openmc-dev/plotter
Notifications https://github.com/login?return_to=%2Fopenmc-dev%2Fplotter
Fork 25 https://github.com/login?return_to=%2Fopenmc-dev%2Fplotter
Star 73 https://github.com/login?return_to=%2Fopenmc-dev%2Fplotter
Code https://github.com/openmc-dev/plotter
Issues 26 https://github.com/openmc-dev/plotter/issues
Pull requests 4 https://github.com/openmc-dev/plotter/pulls
Actions https://github.com/openmc-dev/plotter/actions
Projects https://github.com/openmc-dev/plotter/projects
Security and quality 0 https://github.com/openmc-dev/plotter/security
Insights https://github.com/openmc-dev/plotter/pulse
Code https://github.com/openmc-dev/plotter
Issues https://github.com/openmc-dev/plotter/issues
Pull requests https://github.com/openmc-dev/plotter/pulls
Actions https://github.com/openmc-dev/plotter/actions
Projects https://github.com/openmc-dev/plotter/projects
Security and quality https://github.com/openmc-dev/plotter/security
Insights https://github.com/openmc-dev/plotter/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fopenmc-dev%2Fplotter%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fopenmc-dev%2Fplotter%2Fissues%2Fnew%2Fchoose
pshriwisehttps://github.com/pshriwise
openmc-dev:develophttps://github.com/openmc-dev/plotter/tree/develop
kkiesling:separate_model_viewhttps://github.com/kkiesling/plotter/tree/separate_model_view
Conversation 54 https://github.com/openmc-dev/plotter/pull/99
Commits 32 https://github.com/openmc-dev/plotter/pull/99/commits
Checks 0 https://github.com/openmc-dev/plotter/pull/99/checks
Files changed https://github.com/openmc-dev/plotter/pull/99/files
Please reload this pagehttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
Separate model view from view settings for more reliable reload https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#top
Show all changes 32 commits https://github.com/openmc-dev/plotter/pull/99/files
e42ecd9 rough draft of only restoring view settings, not model settings - thi… kkiesling Jun 9, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/e42ecd9428ed0b1b8e41e7c4cbe69b0176c02ec4
a253599 remove commented lines and functions that are no longer needed kkiesling Jun 9, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/a2535996b225366941b1618db6db006cd3a5dea3
0c6d89f remove unnecessary import kkiesling Jun 13, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/0c6d89fa2569cb1d88145cc37c92fe9021305476
7ce9e4b remove missed print statement kkiesling Jun 22, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/7ce9e4b0a2b66af773552a7327955cf1e4d497ad
5ee873b more streamlined to use composition over inheritance kkiesling Jun 22, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/5ee873b27ab76eec28e9ef6b614465d9c5e6d25b
1b187f7 trying to asses view equality and populating ids kkiesling Jun 22, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/1b187f79831c72c313edaa5c641affb89ba1746a
748baf8 trying to separate just the view parameters from the rest of view ind… kkiesling Jun 23, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/748baf8923b8801d2a419d35f734b8d39130bebf
b130f62 separate out only the _PlotBase parameters and check those kkiesling Jun 23, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/b130f620f385a03d13b4e78233129a9b91bc1665
95ef00e only store necessary info for reload in pickle file kkiesling Jun 24, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/95ef00e98cff423c82339407019ec1be649ef4b4
4d371be cleaned up docstrings kkiesling Jun 29, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/4d371be9b5908d9289cfd9204edb269521e6d835
e9e92a0 make view params attribute on plotview to simplify kkiesling Jul 6, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/e9e92a0736a7a3d69c32426ae7a2c9064970aef6
3e996c9 remove debugging print statements kkiesling Jul 6, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/3e996c9d62f3486dddc95e8d09e0660697b85df9
eb34f8b need to copy view params from previous view kkiesling Jul 7, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/eb34f8b1d5ee5f43a2e97a33b8606f9597ccb490
ac39180 updated docstrings for new classes kkiesling Jul 7, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/ac39180d32e98685740880dabcd013c6b5b16a63
0ff3ed4 Apply suggestions from code review kkiesling Jul 8, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/0ff3ed4848a2356ca1753bfd6b9fa696e13b810d
ed014f5 issue warning and ignore plot settings if load fails kkiesling Jul 8, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/ed014f51a1eb422d7357b306be62fec93cb71b4b
81b41bb typo kkiesling Jul 8, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/81b41bbe2dc0a16c7ce72a9bf78f7b094e1af8b7
8051d2f remove mistaken imports kkiesling Jul 8, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/8051d2faca90410b3942b39ebe9bc0d625f71ef3
3ab3f4b ids_map and prop_map don't need to be private kkiesling Jul 8, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/3ab3f4be0cdfde96dd7c1de47aefe10b86f5456b
7e3ecd3 wording changes kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/7e3ecd3f21e28c7adf7858b3bb742bf5373fd766
ca2eab5 need to add view_params to list of attributes kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/ca2eab5759edd93ce4a1edcc472eaa4812249cf1
6ad6cde increment plotmodel version kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/6ad6cde1e4070b6cde957363bb360dccb9bda28c
08a9a38 simplify try/except statement kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/08a9a382a7c8e19f94cc1829921a60745d501ee1
635fbf9 use_settings_pkl in docstring kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/635fbf9a86d380079574fba37c04afcbabdcafa5
9990c72 store full currentView so that view_ind and view_params are both saved kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/9990c726dc966c39e393be453a2284093da9c3af
6a5f909 list of attribures as class attribute kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/6a5f909d7fdf94173d38ce4f3fed2656de77b13a
05743d8 restore domain properties if file hashes are unchanged as well kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/05743d80bf00d5f2636879909985430d31d62c89
56e12dd prop_map and properties attributes were redundant kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/56e12dd9b02e575664ff68bd1bc1aef25314a987
90bf435 adopt_plotbase must be in PlotView to be able to set params kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/90bf43501d864c7275100b92dac722e9f7d8bb8f
8825405 make cell_ids, instances, and mat_ids properties kkiesling Jul 11, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
ebe5460 make initial view the currentview and always create a default view kkiesling Jul 13, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/ebe54604a8ab0c9ca1c0f43f636b99c992ba39d0
9ae7a76 compare active and current views before updating current view to chec… kkiesling Jul 13, 2022 https://github.com/openmc-dev/plotter/pull/99/commits/9ae7a7620b14625f1537b9dfc130b09097b02061
Clear filters https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
Please reload this pagehttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
Please reload this pagehttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
Prev https://github.com/openmc-dev/plotter/pull/99/commits/90bf43501d864c7275100b92dac722e9f7d8bb8f
Next https://github.com/openmc-dev/plotter/pull/99/commits/ebe54604a8ab0c9ca1c0f43f636b99c992ba39d0
Please reload this pagehttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925
https://github.com/kkiesling
kkieslinghttps://github.com/openmc-dev/plotter/commits?author=kkiesling
openmc_plotter/plotmodel.pyhttps://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#diff-fb88459f7c5a855933ac8241cb6fa5c3da93c4be09ad74a78914f7ad20700749
View file https://github.com/kkiesling/plotter/blob/882540558931d9c4eab98d559eaac77e9959a925/openmc_plotter/plotmodel.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openmc-dev/plotter/pull/99/commits/{{ revealButtonHref }}
https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#diff-fb88459f7c5a855933ac8241cb6fa5c3da93c4be09ad74a78914f7ad20700749
https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#diff-fb88459f7c5a855933ac8241cb6fa5c3da93c4be09ad74a78914f7ad20700749
https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#diff-fb88459f7c5a855933ac8241cb6fa5c3da93c4be09ad74a78914f7ad20700749
https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#diff-fb88459f7c5a855933ac8241cb6fa5c3da93c4be09ad74a78914f7ad20700749
https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#diff-fb88459f7c5a855933ac8241cb6fa5c3da93c4be09ad74a78914f7ad20700749
https://github.com/openmc-dev/plotter/pull/99/commits/882540558931d9c4eab98d559eaac77e9959a925#diff-fb88459f7c5a855933ac8241cb6fa5c3da93c4be09ad74a78914f7ad20700749
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.