You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would this more make sense if the source code of function rather than the source of the file is returned?
Besides, if I understand it correctly, every process function will be stored along with a source file in the repository. Is that too redundant to store the same files every time when the ProcessNode call and store?
The text was updated successfully, but these errors were encountered:
Not sure, because the rest of the file can also be important for the process function, for example other functions that may be defined or imports. Of course we can add a method that gives just the source code of the function itself, and potentially rename the current one, that would be possible I would say.
I just noticed by the way that the docstring is incorrect, the :returns: is incorrect as it says the filepath will be returned.
With respect to the duplication of the source code: this is indeed very inefficient, but fortunately with the new repository implementation that will be merged for aiida-core==2.0.0, that will be automatically fixed. That repo implementation will automatically deduplicate content.
I just find that display the source code of the function rather than the whole file is much concise in Material Cloud explore. I propose to add the method to give the source code.
However, It might not be a good idea to store the source of the function as an attribute.
I propose to add the method to give the source code.
That sounds good to me.
However, It might not be a good idea to store the source of the function as an attribute.
I agree that this can be problematic and would advise against it, see also #3714
The basic principle should be to store in the DB what you want to query for and I imagine that querying the source code of workfunctions is not really a use case people have (?)
aiida-core/aiida/orm/utils/mixins.py
Lines 108 to 113 in 06063e7
Would this more make sense if the source code of function rather than the source of the file is returned?
Besides, if I understand it correctly, every process function will be stored along with a source file in the repository. Is that too redundant to store the same files every time when the
ProcessNode
call and store?The text was updated successfully, but these errors were encountered: