File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed
Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1111 project : diffpy.srxplanar
1212 c_extension : false
1313 headless : false
14+ python_version : " 3.13"
1415 run : |
1516 conda install pre-commit
1617 pre-commit run --all-files
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ maintainers = [
1414description = " Distance Printer, calculate the inter atomic distances. Part of xPDFsuite"
1515keywords = [' diffpy' , ' pdf' , ' data interpretation' ]
1616readme = " README.rst"
17- requires-python = " >=3.12 , <3.15 "
17+ requires-python = " >=3.11 , <3.14 "
1818classifiers = [
1919 ' Development Status :: 5 - Production/Stable' ,
2020 ' Environment :: Console' ,
Original file line number Diff line number Diff line change 1+ import argparse
2+
3+ from diffpy .srxplanar .version import __version__ # noqa
4+
5+
6+ def main ():
7+ parser = argparse .ArgumentParser (
8+ prog = "diffpy.srxplanar" ,
9+ description = (
10+ "Distance Printer, calculate the inter atomic distances."
11+ " Part of xPDFsuite\n \n "
12+ "For more information, visit: "
13+ "https://github.com/diffpy/diffpy.srxplanar/"
14+ ),
15+ formatter_class = argparse .RawDescriptionHelpFormatter ,
16+ )
17+
18+ parser .add_argument (
19+ "--version" ,
20+ action = "store_true" ,
21+ help = "Show the program's version number and exit" ,
22+ )
23+
24+ args = parser .parse_args ()
25+
26+ if args .version :
27+ print (f"diffpy.srxplanar { __version__ } " )
28+ else :
29+ # Default behavior when no arguments are given
30+ parser .print_help ()
31+
32+
33+ if __name__ == "__main__" :
34+ main ()
You can’t perform that action at this time.
0 commit comments