Skip to content
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

Refactor smart cli into subparsers #308

Merged
merged 28 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5850734
cli update rough draft
ankona Jun 23, 2023
1a1e54d
remove unused usage method
ankona Jun 26, 2023
94912c0
re-use description text for help responses
ankona Jun 26, 2023
13d2cdc
add clobber
ankona Jun 26, 2023
8185caa
move clean function out of menuitem
ankona Jun 26, 2023
4ee4422
avoid identical configure_parser functions
ankona Jun 26, 2023
36f4f76
clean up menu item specification, remove unused usage func
ankona Jun 26, 2023
4ea0687
clean up imports
ankona Jun 26, 2023
7805adc
move handler func out of CLI definition code
ankona Jun 26, 2023
c61a542
toss static method / protocol class
ankona Jun 26, 2023
9ccb9b9
minor refactor of CLI to enable more testing
ankona Jun 29, 2023
f746ed2
fix poor comment
ankona Jun 29, 2023
9a4dbc3
additional CLI tests
ankona Jul 7, 2023
380039a
re-use logger format string in CLI actions, avoid print
ankona Jul 10, 2023
53eaa66
fix typehint
ankona Jul 10, 2023
452a76c
remove commented code
ankona Jul 10, 2023
2278ca8
fix incorrect change to dbcli/site output (logger vs print)
ankona Jul 10, 2023
186d3fe
unused imports
ankona Jul 10, 2023
b80b026
fix tests for modified argparse outputs for py3.10
ankona Jul 10, 2023
b05d30b
fix format change from original menu behavior
ankona Jul 10, 2023
21561b9
update dbcli test for tweaked get_db_path behavior
ankona Jul 10, 2023
3824f45
apply isort
ankona Jul 18, 2023
89b844b
apply black fmt
ankona Jul 18, 2023
00ceeb4
cleanup per review comments
ankona Jul 18, 2023
f15fe42
remove unnecessary init content
ankona Jul 18, 2023
125b48d
implicit concat
ankona Jul 18, 2023
091ff17
combine conditional
ankona Jul 18, 2023
8cdcf84
fix build_env / as_dict bug in gpu build
ankona Jul 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions smartsim/_core/_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from .utils import get_install_path, MenuItemConfig, smart_logger_format
9 changes: 8 additions & 1 deletion smartsim/_core/_cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from smartsim._core._cli.cli import main
import sys

from smartsim._core._cli.cli import default_cli

def main() -> int:
smart_cli = default_cli()
return smart_cli.execute(sys.argv)


if __name__ == "__main__":
main()
Loading