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

Rename reference to local config file #1162

Merged

Conversation

edan-bainglass
Copy link
Member

@edan-bainglass edan-bainglass commented Feb 15, 2025

Changing the reference to .aiidalab/quantum-espresso/qe-config.yml

Copy link

codecov bot commented Feb 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.99%. Comparing base (6294ba7) to head (64d7740).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1162   +/-   ##
=======================================
  Coverage   72.98%   72.99%           
=======================================
  Files          94       94           
  Lines        6523     6524    +1     
=======================================
+ Hits         4761     4762    +1     
  Misses       1762     1762           
Flag Coverage Δ
python-3.11 72.99% <100.00%> (+<0.01%) ⬆️
python-3.9 72.99% <100.00%> (+0.01%) ⬆️

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.

@superstar54
Copy link
Member

Hi @edan-bainglass , why this change is needed? I would prefer to have one config folder for the app.

@edan-bainglass
Copy link
Member Author

Can you comment on what we should put under this folder other than the config file? If indeed there's more things to add, then we keep it a folder. Otherwise, a file would do, no?

@superstar54
Copy link
Member

Each QE app plugin could have its config file under that folder.

@edan-bainglass
Copy link
Member Author

Each QE app plugin could have its config file under that folder.

I see. I guess we can pick these plugin-specific config files via the entry point system? This could work nicely by simply adding a path to the file in the __init__ files. The path can be flexible, but a good place would be .aiidalab/quantum-espresso. I'm okay with this. Thoughts?

@superstar54
Copy link
Member

In this PR, the core app tries to load all plugins config and override the core app's config, this may result an issue: several plugins could override the same parameters, and the order of overridden is not guaranteed.

I would suggest that, the plugin handle their config files. We keep the config folder, and suggest the developers to use the folder, but it depends on the plugin developer whether they want to put the config file in the same folder as the core app or not.

@edan-bainglass
Copy link
Member Author

@superstar54 it is true that one file can override the other, but is this really our concern? I imagine plugin configs are to configure plugin-specific parameters. Since plugins were designed to be independent of one another, there should not be any shared parameters. Now of course this does not prevent one file from setting parameters of another, but that's just erroneous, no? It is unclear to me what you are proposing. Let's discuss later.

@edan-bainglass edan-bainglass force-pushed the rename-config-folder-reference branch from fc49f85 to adab979 Compare February 17, 2025 11:37
@edan-bainglass
Copy link
Member Author

@superstar54 following our discussion, the planned mechanism is not required and is removed from this PR. This PR is then simply a change of reference name to .aiidalab/quantum-espresso/qe-config.yml, with plugin configs left to plugin developers to author and use. We only recommend to use .aiidalab/quantum-espresso/ as config file placement, but not strict.

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.

Could you also provide a help function to return the path of the config folder, so that the plugin developer can use.

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.

LGTM!

@edan-bainglass edan-bainglass force-pushed the rename-config-folder-reference branch from e75cf9b to 64d7740 Compare February 17, 2025 13:23
@edan-bainglass edan-bainglass merged commit b2a7210 into aiidalab:main Feb 17, 2025
7 checks passed
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