-
Notifications
You must be signed in to change notification settings - Fork 3
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
python CGSB.py [with no arguments] #10
Comments
I have added your suggested change. I currently haven't written a comprehensive help command but I will add one in a later update. Right now i recommend referring to CGSB_Documentation.pdf or CGSB_Cheat_Sheet.pdf for help. |
Hi Mikkel,
Thanks for taking care of that. It popped up b/c I am mostly using it through CLI and not jupyter ;p.
Thanks for the files indications. I used these, indeed, as sources to test ur program. They are well written.
CGSB is already in great shape and seems to me like a great achievement, congratz. I’m liking it.
I would suggest u to slightly modify it to make it a package. It could still be used w/out any changes in a conda env/jupyter kernel.
The following layout is possible:
CGSB
├── __init__.py
└── __main__.py
where __init__.py exposes the public API (the CGSB constructor) which can be manipulated inside an jupyter notebook (import CGSB from CGSB)
and __main__.py handles arguments management for CLI executions.
Then additional split of code could be performed to manage the future of your projects as it grows (following mostly the separation of concerns principle).
B/c, I’am pretty sure you already have the feeling that, @some point, 6k lines of code will become hard to manage for you ;p
Plz take these as constructive suggestions and not critics at all.
Again, AFAIC your code is perfectly fine for my end user current needs.
Feel free to contact me for these software engineering matters if u feel u need more advices/informations.
Regards,
Guillaume
… Le 30 nov. 2023 à 09:00, MikkelDA ***@***.***> a écrit :
I have added your suggested change. I currently haven't written a comprehensive help command but I will add one in a later update. Right now i recommend referring to CGSB_Documentation.pdf <https://github.com/MikkelDA/CGSB/blob/main/CGSB_Documentation.pdf> or CGSB_Cheat_Sheet.pdf <https://github.com/MikkelDA/CGSB/blob/main/CGSB_Cheat_Sheet.pdf> for help.
—
Reply to this email directly, view it on GitHub <#10 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAO4BHND2JHEMFTDBE4OERTYHA4LFAVCNFSM6AAAAAA77V6MU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZTGI3TIMRZGU>.
You are receiving this because you authored the thread.
|
Thanks for your suggestions Guillaume. I have been considering this, though one thing that has been preventing it somewhat is that i want the program to be usable as a separate .py script (similar to how insane works), such that people could more easily modify it by themselves as many have done for insane. I have however come to reconsider this as it is quite confusing when many different modified scripts are floating around in various research groups and because my goals with CGSB have essentially turned into "it you want a system, then it should be able to make it", meaning that if someone considers it necessary to be able to do some specific thing then i would rather just have it raised as a suggestion so i can implement it into the program for everyone to use. And yes, it is also getting quite unwieldy due to only being a single, nearly 7000 lines long, file. I have made other programs for personal use that i have installed as packages, so i already have some experience with writing those. I am however quite busy in the coming weeks, with some conference stuff and the final implementation of an advanced membrane hole/island tool. Kind regards, Mikkel Dahl Andreasen |
Should display help message from parser object. Instead it throws an error "print_helper function not known".
Simply replaced
L6211: print_helper() by parser.print_help()
The text was updated successfully, but these errors were encountered: