Closed dustming closed 3 years ago
@cjauvin add a comment here? or inside the code. thanks
@cjauvin Hi Christian all four option in the first tool of basin maker has been modularized. I am not sure if I did it in the right way. Would you please help me check the overall structure when it is convenient for you? many thanks.
Here is my structure.
Hi @dustming! I'm not sure I understand well what you propose with your 3 points above. What is the "interface function"?
Usually, for a project of that type, a useful way to think about how to organize its structure is to clearly define a command-line interface for your user, and implement it in a "main" module (perhaps with some libraries like argparse
of even Click
to help you manage the CLI arguments and options). In that main module, the different ways of interacting with your program are well defined and easily identifiable, and it will probably help in terms of how to organize the rest of your code.
Hi @dustming! I'm not sure I understand well what you propose with your 3 points above. What is the "interface function"?
Usually, for a project of that type, a useful way to think about how to organize its structure is to clearly define a command-line interface for your user, and implement it in a "main" module (perhaps with some libraries like
argparse
of evenClick
to help you manage the CLI arguments and options). In that main module, the different ways of interacting with your program are well defined and easily identifiable, and it will probably help in terms of how to organize the rest of your code.
Hi @cjauvin , thanks for your comments.
Here is the function in the main module:
https://github.com/dustming/basinmaker/pull/1/files#diff-a8faf72617131bf6d67113128d876029ec2c267446aeede7ac69035b9897c528R240 and here is the function in the sub module
Is it looks reasonable?
Thanks
It will call functions in sub modules, and it will be the interface to the user.