-
Notifications
You must be signed in to change notification settings - Fork 9
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
Import start.py using absolute path. #73
Conversation
Previously, the apps folder was considered a python module. Since this is not true anymore [1,2], the loading of the apps' start.py needs to be adapted. [1] aiidateam/aiida-prerequisites#37 [2] aiidalab/aiidalab-docker-stack#213
55d8482
to
1fa6648
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.
Looks good. Could you briefly comment about the motivation to use this particular approach as opposed to importlib.machinery.SourceFileLoader
? I did some cursory search and found the following article: https://www.geeksforgeeks.org/how-to-import-a-python-module-given-the-full-path/
I didn't find the |
The amount of code is the only difference I see between those two approaces. @csadorf are you aware of the other differences? |
No, I am not aware of any differences besides the length and that the currently implemented approach allows one to control the execution of the module. It looks like both approaches are part of the public API and would be equally well-supported. |
ok, then the shorter one wins, I think. |
changed, tested - works. |
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.
Assuming it works, approved! 😃
Previously, the apps folder was considered a python module. Since
this is not true anymore [1,2], the loading of the apps' start.py
needs to be adapted.
[1] aiidateam/aiida-prerequisites#37
[2] aiidalab/aiidalab-docker-stack#213