* Test: add test for unpickling NetUtils enums
This verifies that Utils.ByValue either works or is not required,
and once we drop ByValue, this validates that future Python
versions do not break our Enums again.
* Test: NetUtils enum switch to more direct pickle.dumps
It's probably better to use the direct interface in case
restricted_dumps does some funky stuff in the future.
Co-authored-by: Duck <31627079+duckboycool@users.noreply.github.com>
* Test: NetUtils enum fix import for change
---------
Co-authored-by: Duck <31627079+duckboycool@users.noreply.github.com>
* WebHost: disallow '=' and whitespace in SUUID and append the correct number of '='
This makes Room IDs unambiguous and avoids breaking if b64decode ever becomes strict.
* Tests, WebHost: add SUUID tests
* Tests, WebHost: add edge cases to SUUID tests
* initial commit of rules engine
* implement most of the stuff
* add docs and fill out rest of the functionality
* add in explain functions
* dedupe items and add more docs
* pr feedback and optimization updates
* Self is not in typing on 3.10
* fix test
* Update docs/rule builder.md
Co-authored-by: BadMagic100 <dempsey.sean@outlook.com>
* pr feedback
* love it when CI gives me different results than local
* add composition with bitwise and and or
* strongly typed option filtering
* skip resolving location parent region
* update docs
* update typing and add decorator
* add string explains
* move simplify code to world
* add wrapper rule
* I may need to abandon the generic typing
* missing space for faris
* fix hashing for resolved rules
* thank u typing extensions ilu
* remove bad cacheable check
* add decorator to assign hash and rule name
* more type crimes...
* region access rules are now cached
* break compatibility so new features work
* update docs
* replace decorators with __init_subclass__
* ok now the frozen dataclass is automatic
* one more type fix for the road
* small fixes and caching tests
* play nicer with tests
* ok actually fix the tests
* add item_mapping for faris
* add more state helpers as rules
* fix has from list rules
* fix can reach location caching and add set completion condition
* fix can reach entrance caching
* implement HasGroup and HasGroupUnique
* add more tests and fix some bugs
* Add name arg to create_entrance
Co-authored-by: roseasromeo <11944660+roseasromeo@users.noreply.github.com>
* fix json dumping option filters
* restructure and test serialization
* add prop to disable caching
* switch to __call__ and revert access_rule changes
* update docs and make edge cases match
* ruff has lured me into a false sense of security
* also unused
* fix disabling caching
* move filter function to filter class
* add more docs
* tests for explain functions
* Update docs/rule builder.md
Co-authored-by: roseasromeo <11944660+roseasromeo@users.noreply.github.com>
* chore: Strip out uses of TYPE_CHECKING as much as possible
* chore: add empty webworld for test
* chore: optimize rule evaluations
* remove getattr from hot code paths
* testing new cache flags
* only clear cache for rules cached as false in collect
* update test for new behaviour
* do not have rules inherit from each other
* update docs on caching
* fix name of attribute
* make explain messages more colorful
* fix issue with combining rules with different options
* add convenience functions for filtering
* use an operator with higher precedence
* name conflicts less with optionfilter
* move simplify and instance caching code
* update docs
* kill resolve_rule
* kill true_rule and false_rule
* move helpers to base classes
* update docs
* I really should finish all of my
* fix test
* rename mixin
* fix typos
* refactor rule builder into folder for better imports
* update docs
* do not dupe collectionrule
* docs review feedback
* missed a file
* remove rule_caching_enabled from base World
* update docs on caching
* shuffle around some docs
* use option instead of option.value
* add in operator and more testing
* rm World = object
* test fixes
* move cache to logic mixin
* keep test rule builder world out of global registry
* todone
* call register_dependencies automatically
* move register deps call to call_single
* add filtered_resolution
* allow bool opts on filters
* fix serialization tests
* allow reverse operations
---------
Co-authored-by: BadMagic100 <dempsey.sean@outlook.com>
Co-authored-by: roseasromeo <11944660+roseasromeo@users.noreply.github.com>
* Multiple: resize FR RA network commands screenshot
This is now more in line with the text (and the english version).
* Multiple: optimize EN RA network commands screenshot
The URL has changed, so it's a good time to optimize.
* WebHost, Worlds: fix retroarch images not showing
Implements a src/url replacement for relative paths.
Moves the RA screenshots to worlds/generic since they are shared.
Also now uses the FR version in ffmq.
Also fixes the formatting that resultet in the list breaking.
Also moves imports in render_markdown.
Guides now also properly render on Github.
* Factorio: optimize screenshots
The URL has changed, so it's a good time to optimize.
* Factorio: change guide screenshots to use relative URL
* Test: markdown: fix tests on Windows
We also can't use delete=True, delete_on_close=False
because that's not supported in Py3.11.
* Test: markdown: fix typo
I hope that's it now. *sigh*
* Landstalker: fix doc images not showing
Change to relative img urls.
* Landstalker: optimize doc PNGs
The URL has changed, so it's a good time to optimize.
* Test: check game in world manifest
* Update test/general/test_world_manifest.py
Co-authored-by: Duck <31627079+duckboycool@users.noreply.github.com>
* Test: rework finding expected manifest location
* Test: fix doc comment
* Test: fix wrong custom_worlds path in test_world_manifest
Also simplifies the way we find ./worlds/.
* Test: make test_world_manifest easier to extend
* Test: check world_version in world manifest
according to docs/apworld specification.md
* Test: check no container version in source world manifest
according what was added to docs/apworld specification.md in PR 5509
* Test: better assertion messages in test_world_manifest.py
* Test: fix wording in world source manifest
---------
Co-authored-by: Duck <31627079+duckboycool@users.noreply.github.com>
* Fix webhost argparse with extra args
* accidentally added line
* WebHost: fix some typing
B64 url conversion is used in test/hosting,
so it felt appropriate to include this here.
* Test: Hosting: also test autogen
* Test: Hosting: simplify stop_* and leave a note about Windows compat
* Test: Hosting: fix formatting error
* Test: Hosting: add limitted Windows support
There are actually some differences with MP on Windows
that make it impossible to run this in CI.
---------
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
* WebHost: reset Generator proc title on error
* WebHost: fix shutting down autogen
This is still not perfect but solves some of the issues.
* WebHost: properly propagate JOB_TIME
* WebHost: handle autogen shutdown
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