Without `gc.freeze()` and `gc.unfreeze()` afterward, the `gc.collect()`
call within each benchmark often takes much longer than all 100_000
iterations of the location access rule, making it difficult to benchmark
all but the slowest of access rules.
This change enables using `gc.freeze()` by default.
* update the id formatter to use staticmethods to not fake the unused self arg, and then use the formatter for the user session endpoints
* missed an id (ty treble)
* clean up duplicate code
* Update WebHostLib/__init__.py
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
* keep the BaseConverter format
* lol, change all the instances
* revert this
---------
Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
* Add new deprioritized item flag
* 4 retries
* indent
* .
* style
* I think this is nicer
* Nicer
* remove two lines again that I added unnecessarily
* I think this test makes a bit more sense like this
* Idk how to word this lol
* Add progression_deprioritized_skip_balancing bc why not ig
* More text
* Update Fill.py
* Update Fill.py
* I am the big stupid
* Actually collect the other half of progression items into state when filling without them
* More clarity on the descriptions (hopefully)
* visually separate technical description and use cases
* Actually make the call do what the comments say it does
* replace Clique with V6 in unit tests
* no hard mode in V6
* modify regex in copy_world to allow : str
* oops
* I see now
* work around all typing
* there actually needs to be something
* CounterOption
* bring back the negative exception for ItemDict
* Backwards compatibility
* ruff on witness
* fix in calls
* move the contains
* comment
* comment
* Add option min and max values for CounterOption
* Use min 0 for TrapWeights
* This is safe now
* ruff
* This fits on one line again now
* OptionCounter
* Update Options.py
* Couple more typing things
* Update Options.py
* Make StartInventory work again, also make LocationCounter theoretically work
* Docs
* more forceful wording
* forced line break
* Fix unit test (that wasn't breaking?)
* Add trapweights to witness option presets to 'prove' that the unit test passes
* Make it so you can order stuff
* Update macros.html
* Only consider usable exits when calculating whether or not a region is a dead-end
* Update EntranceLookup unit tests
* Add new dead-end test
* Add additional explanation to the new test
* minor formatting tweak
based on review feedback
---------
Co-authored-by: CodeGorilla <3672561+Ars-Ignis@users.noreply.github.com>
* [Core][GER] Allow and require user-provided target name when splitting 1-way entrances
* Move target naming onto a parameter of disconnect_entrance_for_randomization
* Tests: unroll test_multiworlds.TestTwoPlayerMulti
Also adds a helper function that other tests can use to unroll tests.
* Docs: add more details to docs/tests.md
* Explain parametrization, subtests and link to the new helper
* Mention some performance details and work-arounds
* Mention multithreading / pytest-xdist
* Tests: make param.classvar_matrix accept sets
* CI: add test/param.py to type checking
* Tests: add missing typing to test/param.py
* Tests: fix typo in test/param.py doc comment
Co-authored-by: qwint <qwint.42@gmail.com>
* update docs
* Docs: reword note on performance
---------
Co-authored-by: qwint <qwint.42@gmail.com>
* Add test that stage1 ER will not fail due to speculative sweeping an indirect conditioned dead end
* Skip speculative sweep if it's the last entrance placement
* Better implementation of needs_speculative_sweep
* pep8
* CI: ctest: fix trigger on CMakeLists change
* CI: ctest: update cmake version
this removes a warning
and matches gtest
* CI: ctest: remove explicit build mode for MSVC
gtest switched to dynamic libc (/MD), which is default, so this just works now
* uses itempool count vs unfilled location count instead of counting prog_items values which could have custom counters
* move unfilled location check to before can_reach
* add tests for successful minimal GER call with extra collect override prog_items in the pool to regression test issue fixed in this PR
* Tests: massively improve the memory leak test performance
With the growing number of worlds, GC becomes the bottleneck and slows down the test.
* Tests: fix typing in general/test_memory
* unit test that get all state is called with partial entrances before connect_entrances
* fix the two worlds doing it
* lol
* unused import
* Update test/general/test_entrances.py
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
* Update test_entrances.py
---------
Co-authored-by: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com>
* Add connect_entrances
* update ER docs
* fix that test, but also ew
* Add a test that asserts the new finalization
* Rewrite test a bit
* rewrite some more
* blank line
* rewrite rewrite rewrite
* rewrite rewrite rewrite
* RE. WRITE.
* oops
* Bruh
* I guess, while we're at it
* giga oops
* It's been a long day
* Switch KH1 over to this design with permission of GICU
* Revert
* Oops
* Bc I like it
* Update locations.py
* Core: some low-hanging fruit on the strict type check
* bump pyright version
* bump pyright version
* bump pyright and remove file that's no longer easy