Skip to content

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.

EwoutH added 2 commits July 22, 2024 09:35
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