-
Notifications
You must be signed in to change notification settings - Fork 15
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
Adapt modules and files layout for plugin implementation #439
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #439 +/- ##
==========================================
+ Coverage 52.61% 53.42% +0.81%
==========================================
Files 17 26 +9
Lines 2068 2104 +36
==========================================
+ Hits 1088 1124 +36
Misses 980 980
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Using src layout to organize modules (https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/) This change make it directly detect the package_data import issue of "qeapp.yml" (manifest #255) and css/jinja files in static module. bumpver
After aiidalab/aiidalab#382, the `setup.py` is not needed anymore. I remove it.
10e5e3c
to
94890a9
Compare
df072e2
to
c122cdf
Compare
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.
@unkcpz Thanks for the work. LGTM!
One thing we may consider is to remove the app folder and change it to:
~/apps/aiidalab-qe/src/aiidalab_qe$ ls
common __init__.py parameters static submission workflows
configuration __main__.py result structure version.py
so that the configuration
, submission
, and common
are at the same level as the workflow
. @AndresOrtegaGuerrero what do you think?
For the test and ipynb
, I think I have time to do it next week.
No really, see the discussion we had at #379 (comment). Put workflow folder separately will make the workflow import faster without importing anything from app module. |
@superstar54 there are still two things that can be done separately before start introduce the "Panel" concept in:
Can I also do it? This will make me to have a close line-by-line investigation on how you implement tests on every widgets and what are not covered. |
This can be avoided. Just let the |
I only have time to do these until next Monday. If you have time do these before it. Please do it. |
Okay, I see your point. I'll benchmark and change if import workflow still fast. |
Move the modules out and clean the
|
However, I still don't think this is good. This means we cannot/should not put any module to |
In the current from aiidalab_qe.app import QeApp you can not import a module from I think it's better to do it like this:
In the workchain PR, to avoid recursive import, one should not put QeApp class in the |
You miss the goal here, we separate the workflows folder to avoid importing
Neither of them are good, ultimately it is more clear to have
The |
@unkcpz thank you ! , It looks good to me. I am wondering what have you decided about the |
I don't think this is possible, it runs things asynchronously which still uses a single thread, the module load is not ID intense tasks and thus will no benefit from it. Moreover, it is not designed to import the modules. |
This PR is separated and prepared for #428 to avoid mixing changes, especially for moving modules/files without changing any implementations. See #428 (comment) for the design of restructuring the modules. It include following changes: - Move strucute selction to step1 module - Move modules/folders to configuration folder (step2) - Move modules/folders to submission (step3) - Move modules/folders to results (steps) - move modules/widgets to common folder - load registred viewer in __init__ to trigger
e0c545e
to
d2b107a
Compare
Using src layout to organize modules (https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/) This change make it directly detect the package_data import issue of "qeapp.yml" (manifest #255) and css/jinja files in static module. Fix bumpver error.
After aiidalab/aiidalab#382, the `setup.py` is not needed anymore. I remove it.
This PR is separated and prepared for #428 to avoid mixing changes, especially for moving modules/files without changing any implementations. See #428 (comment) for the design of restructuring the modules. It include following changes: - Move strucute selction to step1 module - Move modules/folders to configuration folder (step2) - Move modules/folders to submission (step3) - Move modules/folders to results (steps) - move modules/widgets to common folder - load registred viewer in __init__ to trigger Co-authored-by: Xing Wang <[email protected]>
The rebase of #435 on this are quite light, only 3 files need to solve the conflict. Which means the refactoring is well recognized by git. |
This PR is separated and prepared for #428 to avoid mixing changes, especially for moving modules/files without changing any implementations. See #428 (comment) for the design of restructuring the modules.
Every commit serves its own purpose, so you can basically review it commit by commit.
From #428, there are still more things that should be separated:
But better to use new PRs as well. Do you want to do it yourself @superstar54 (maybe better since it was all your effort and it might not fair to "plagiarise" it by me) or I can do it and put you as co-author.