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

27 current logic to quit game causes simharness vectorized environment setup to crash #28

Conversation

afennelly-mitre
Copy link
Contributor

This PR adds

  1. num_active_games class variable to the simfire.game.Game class
  2. minor updates to simfire/utils/layers.py that update the retrieval of landfire tif data (used to build the LandfireLatLongBox). The updates help ensure that if the respective output path exists but does not contain any .tif files, the tif data will be pulled as if the directory did not exist.

The addition of 2. resolves #26, which I added to this PR since it was already a very small amount of changes.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 15, 2024
Copy link

github-actions bot commented May 15, 2024

Coverage

Coverage Report
FileStmtsMissCoverMissing
simfire/game
   game.py1982587%50, 76–80, 250–251, 292–293, 311–315, 344, 346, 348, 353, 356–363, 389, 402–403, 406–407
   image.py19289%20, 31
   sprites.py177697%79, 85, 90, 96, 328, 434
simfire/game/managers
   fire.py204598%223, 265–269, 643, 782
   mitigation.py44198%73
simfire/sim
   simulation.py41812271%73, 83, 93, 103, 113, 129, 140, 150, 170, 181, 324, 416–423, 457–478, 549, 615–628, 648–661, 679, 696, 768, 805–806, 808–809, 839, 858, 871, 892–959, 1017–1021, 1040–1051, 1065–1103
simfire/utils
   config.py46512673%68–81, 110, 212, 232, 246–253, 278–298, 309–316, 362–364, 382–384, 386–388, 407–418, 540, 555, 559, 563, 600–647, 666, 677–678, 681, 685, 695, 720, 726, 730, 741, 779–790, 813, 820, 828, 846–870, 964, 977, 1000, 1009–1030
   decorators.py13838%15–23
   generate_cfd_wind_layer.py867117%25–34, 38–56, 60–68, 72–82, 86–122, 126
   graph.py67691%107–108, 113, 119, 227, 252
   layers.py2715779%82, 86–87, 134–139, 180, 198, 205, 346–355, 358–399, 405–412, 595, 624
   log.py321069%11–12, 15–16, 21, 27, 36–38, 41
   terrain.py38879%127–136
   units.py25484%15–16, 29–31
simfire/utils/_tests
   test_layers.py89397%102, 131, 192
simfire/world
   elevation_functions.py24196%100
simfire/world/wind_mechanics
   cfd_wind.py1503974%63–73, 76–95, 130–134, 140–144, 188, 272, 274, 279, 281
   perlin_wind.py35197%42
   wind_controller.py663744%119–146, 157–170, 173, 176, 179, 182, 185
TOTAL364153285% 

Tests Skipped Failures Errors Time
97 0 💤 0 ❌ 0 🔥 8m 11s ⏱️

@afennelly-mitre afennelly-mitre force-pushed the 27-current-logic-to-quit-game-causes-simharness-vectorized-environment-setup-to-crash branch from 14a044b to deebd8f Compare May 15, 2024 23:32
@afennelly-mitre
Copy link
Contributor Author

@doyled-it this PR is ready to go, please review at your leisure.

Copy link
Member

@doyled-it doyled-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. There will be merge conflicts with #24, but we'll cross that bridge over there.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 20, 2024
@doyled-it doyled-it merged commit 1be9924 into main May 20, 2024
6 checks passed
@doyled-it doyled-it deleted the 27-current-logic-to-quit-game-causes-simharness-vectorized-environment-setup-to-crash branch May 20, 2024 15:14
@afennelly-mitre
Copy link
Contributor Author

Looks good to me. There will be merge conflicts with #24, but we'll cross that bridge over there.

Makes sense - hopefully just a quick rebase will be sufficient since there are so few changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
2 participants