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

Make batch_run pytestable by adding main() functions #143

Merged
merged 3 commits into from
Jul 22, 2024
Merged

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Jul 22, 2024

Added a main() function to bank_reserves batch_run.py and sugarscape_g1mt run.py scripts to facilitate testing and script execution.

The main() function encapsulates the primary script logic, allowing for easier modular testing and execution. By defining script operations within main(), we can directly invoke this function in testing environments without relying on command-line execution. This practice enhances code readability, maintainability, and testability, providing a clear entry point for the script's functionality.

Part of projectmesa/mesa#2184 and required for projectmesa/mesa#2185.

Added a main() function to `batch_run.py` script to facilitate testing and script execution.

The `main()` function encapsulates the primary script logic, allowing for easier modular testing and execution. By defining script operations within `main()`, we can directly invoke this function in testing environments without relying on command-line execution. This practice enhances code readability, maintainability, and testability, providing a clear entry point for the script's functionality.
Added a main() function to `run.py` script to facilitate testing and script execution.

The `main()` function encapsulates the primary script logic, allowing for easier modular testing and execution. By defining script operations within `main()`, we can directly invoke this function in testing environments without relying on command-line execution. This practice enhances code readability, maintainability, and testability, providing a clear entry point for the script's functionality.
@EwoutH EwoutH requested review from rht and tpike3 July 22, 2024 07:40
@EwoutH EwoutH merged commit e137a60 into main Jul 22, 2024
4 checks passed
@rht rht deleted the batch_run_main branch July 22, 2024 09:42
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.

1 participant