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

CLI quality of life improvements #1640

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

jeremander
Copy link
Contributor

@jeremander jeremander commented Apr 24, 2023

Small quality of life improvements to the command-line interface in main.py:

  • Allow -h as abbreviation for ーhelp
  • Add version subcommand to display the version of mesa
  • Change runserver implementation to use subprocess instead of exec; handle error if run.py doesn't exist

How to Test

  • Once installed, run mesa -h on command-line; this should make help menu appear.
  • Run mesa version and it should display your installed version of mesa.
  • Run mesa runserver within a Mesa project, and it should launch in a browser as usual.
  • Run mesa runserver in a folder that isn't a Mesa project; it should error and exit gracefully.

@jackiekazil
Copy link
Member

Can you add a how to test section?
And start the commit message with verb? :-)

@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch coverage: 53.84% and project coverage change: +0.01 🎉

Comparison is base (78ff484) 81.81% compared to head (f159032) 81.83%.

❗ Current head f159032 differs from pull request most recent head ccf5b02. Consider uploading reports for the commit ccf5b02 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1640      +/-   ##
==========================================
+ Coverage   81.81%   81.83%   +0.01%     
==========================================
  Files          18       18              
  Lines        1386     1393       +7     
  Branches      271      272       +1     
==========================================
+ Hits         1134     1140       +6     
- Misses        206      207       +1     
  Partials       46       46              
Impacted Files Coverage Δ
mesa/main.py 79.41% <53.84%> (+1.63%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jackiekazil
Copy link
Member

This is lovely. Thank you!

@jackiekazil jackiekazil merged commit 2cf8ca3 into projectmesa:main Apr 24, 2023
@tpike3 tpike3 added this to the Mesa 2.0 (Wellton) milestone Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants