* Core: downgrade websockets to 13.x
14.x currently doesn't work for MultiServer.
14.x is not supported with py3.8, so updating to 14.x should be scheduled for AP 0.6.0.
* CI: 5min timeout for hosting test
* MultiServer: properly shutdown even if ctx is invalid
* CI: increase hosting test timeout to 10min
this is 4x expected time, just to be safe.
* CI: build: fail fast if setup.py fails on windows
* CI: build: fail for missing uploads, rework compression
Upload-artifact allows setting compression level now.
The change speeds up both upload and extraction.
* CI: match build gz in release
* CI: build: verify worlds all load
* CI: build: generate a game
* Generate: move worlds loaded exception to allow settings to init from worlds
* CI: build: build setup before running tests
* Speedups: remove dependency on c++
* Speedups: intset: handle malloc failing
* Speedups: intset: fix corner case for int64 on 32bit systems
original idea was to only use bucket->val if int<pointer,
but we always have a union now anyway
* Speedups: add size comment to player_set bucket configuration
* test: more tests for LocationStore.find_item
* test: require _speedups in CI
This kind of tests that the build succeeds.
* test: even more tests for LocationStore.find_item
* Speedups: intset uniform comment style
* Speedups: intset: avoid memory leak when realloc fails
* Speedups: intset: make `gcc -pedantic -std=c99 -fanalyzer` without warnings
Unnamed unions are not in C99, this got fixed.
The overhead of setting count=0 is minimal or optimized-out and silences -fanalizer (see comment).
* Speedups: don't leak memory in case of exception
* Speedups: intset: validate alloc and free
This won't happen in our cython, but it's still a good addition.
* CI: add test framework for C/C++ code
* CI: ctest: fix cwd
* Speedups: intset: ignore msvc warning
* Tests: intset: revert attempt at no-asan
We solve this with env vars in ctest now, and this fails for msvc.
* Test: cpp: docs: fix typo
* Test: cpp: docs: fix another typo
* Test: intset: proper bucket count for Negative test
INTxx_MIN % 1 would not produce a negative number, so the test was flawed.
* Test: add hosting simulation test
* WebHost: add weak typing to get_app()
* MultiServer: add typing to auto_saver_thread
* MultiServer: don't cancel task, properly end it
* customserver: stop auto-save thread from saving after shutdown
and make sure it stops, another potential memory leak
* MultiServer, customserver: make datapackage small again
* customserver: collect/finish room tasks
Hopefully fixes the memory leak we are seeing
* CI: test hosting
* Test: hosting: verify autohoster saves on Ctrl+C
* customserver: save when stopping via Ctrl+C
* CI: strict mypy check in github actions
mypy_files.txt is a list of files that will fail the CI if mypy finds errors in them
* don't need these
* `Any` should be a way to silence the type checker
* restrict return Any
* CI: pyright in github actions
* fix mistake in translating from mypy
* missed another change from mypy to pyright
* pin pyright version
* add more paths that should trigger check
* use Python instead of bash
* type error for testing CI
* Revert "type error for testing CI"
This reverts commit 99f65f3dadf67fb18b6bbee90bd77d8dbd10f9f9.
* oops
* don't need to redirect output
* Initial content-based labeling
* Improve labeling rules around docs and /worlds/generic
* Improve labeling rules around docs and webhost
* Formatting
* Update matching for webhost
* back to square 1 on is:docu
* Try a better glob for docs
* Formatting
* Manage PR state labels
* Correct syntax for conditions
* Correct syntax for conditions
* add trigger on reopening
* add trigger on closing
* keep labels in sync as pr updates
* Change edit event to sync
* Restrict only to PRs to main
* address review comments
* apply only to PRs into main
The value of 10 does not really fit some of our world patterns and values
up to 15 may be acceptable. Looking at some worlds, 14 seems to be
achievable without too much work and reduces the noise in test output,
making it more usable.
* Add settings API ("auto settings") for host.yaml
* settings: no BOM when saving
* settings: fix saving / groups resetting themselves
* settings: fix AutoWorldRegister import
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
* Lufia2: settings: clean up imports
* settings: more consistent class naming
* Docs: update world api for settings api refactor
* settings: fix access from World instance
* settings: update migration timeline
* Docs: Apply suggestions from code review
Co-authored-by: Zach Parks <zach@alliware.com>
* Settings: correctly resolve .exe in UserPath and LocalPath
---------
Co-authored-by: el-u <109771707+el-u@users.noreply.github.com>
Co-authored-by: Zach Parks <zach@alliware.com>
* MultiServer: speed up location commands
Adds optimized pure python wrapper around locations dict
Adds optimized cython implementation of the wrapper, saving cpu time and 80% memory use
* Speedups: auto-build on import and build during setup
* Speedups: add requirements
* CI: don't break with build_ext
* Speedups: use C++ compiler for pyximport
* Speedups: cleanup and more validation
* Speedups: add tests for LocationStore
* Setup: delete temp in-place build modules
* Speedups: more tests and safer indices
The change has no security implications, but ensures that entries[IndexEntry.start] is always valid.
* Speedups: add cython3 compatibility
* Speedups: remove unused import
* Speedups: reformat
* Speedup: fix empty set in test
* Speedups: use regular dict in Locations.get_for_player
* CI: run unittests with beta cython
now with 2x nicer names
* CI: add a workflow to show flake8 violations in modified files of a PR
* modify a file to trigger the lint check
* CI: add a workflow to show mypy violations in modified files of a PR
* modify a file to trigger the type check
* Split flake8 and mypy into two parallel jobs; run a variant of the workflow on push event; modify a file to trigger the push workflow
* fail the task if there are syntax errors; remove old lint workflow
* ModuleUpdater/setup: install pkg_resources and check for pip
plus minor cleanup in the github actions
* ModuleUpdate/setup: make flake8 happy
* ModuleUpdate/setup: make mypy happier
* CI: fix and more greedy filtering
* CI: only run lint if *.py changed
* CI: only run CodeQL if supported file changed
* CI: fix unittests still triggering for build.yml
* CI: update CodeQL action
* CI: trigger codeql when changing the workflow
* CI/Doc: use pytest-subtests
* CI: clean up pip installs a bit
* make lint and unittests install the same stuff
* make sure to install wheel, which is a recommended (not required) dependency for everything pip