* mypy: Build `mypy.ini` config with exclusions dynamically
* Apply suggestions from code review
* Revert suggested `check=True` because `mypy` is expected to fails here
* Only `read_text` once
* Fix exception message
* Don't `touch`
* More `joinpath`
* Revert `newline="\n"`, its python 3.10 only
See https://bugs.python.org/issue23706
* Apply suggestions
* Fail if new issues get introduced
* Print the newly introduces issues
* Handle error codes
* Add `write_file`
* Use `sys.executable`
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* `mypy_failures[:-1]`
* Add an example comment
* Improve failure check
* Drop exclusions after rebase
* Drop one more exclusion after another rebase
---------
Co-authored-by: Kyle Altendorf <sda@fstab.net>
Moving `black` and `mypy` up a bit, run `flake8` as last. New order:
```
Validate SQL statements
__init__.py files
black
Check Yaml
Fix End of Files
Trim Trailing Whitespace
Check for merge conflicts
Check python ast
Debug Statements (Python)
mypy
isort
flake8
```
* reusable workflow for a single test workflow with coverage collection
* avoid needing typing-extensions to build workflow jobs
* remove incorrect coverage job
* correct enabling of pytest-monitor
* $Env:GITHUB_*
* tweak concurrency
* add explanation for use of the reusable workflow
* name: Generate matrix configuration
* correct timelord installation choice logic
* avoid * to fix coverage combining on windows
* name: Configure matrix
* bring back the conditional run
* less matrix.os.matrix
* hmm
* again
* exclude instead
* fixup JOB_FILE_NAME
* leave the final coverage step for later
* drop configuration.runs in favor of matrix excludes
* fixup os checks
* actions/cache@v3
* Add Windows CI
* rebuild workflows
* rebuild workflows
* try different activation
* catch up windows workflow template
* debug dir
* hard code dev extra on windows
* it is pytest
* .exe
* -m pytest for windows
* --module pytest
* Revert "debug dir"
This reverts commit 74b5bbfd92.
* debug pkg_resources import on windows
* debug tests.conftest import on windows
* rebuild workflows
* debug
* debug oops
* debug more
* debug more
* Update pytest.ini
* Update pytest.ini
* fix it
* Revert "debug more"
This reverts commit 367ed61dfa.
* Revert "debug more"
This reverts commit 772b6707c6.
* Revert "debug oops"
This reverts commit 5065c1e172.
* Revert "debug"
This reverts commit ecf721e453.
* Revert "debug tests.conftest import on windows"
This reverts commit ea71a51625.
* Revert "debug pkg_resources import on windows"
This reverts commit eb6afb1dfb.
* more warning ignore
* they're regexes...
* --numprocesses 0 for windows ci
* specify each test file individually since pytest on windows does not seem to handle the wildcards
* relative...
* select most recent supported python on windows, support INSTALL_PYTHON_VERSION
* sort test files when generating workflows
* report full python version on windows, actually use the selected version for the env
* oops
* debug dir
* skip timelord-requiring jobs on windows
* oops
* handle wildcard expansion for coverage on windows
* rebuild workflows
* download blocks and plots on windows
* correct and and or in yaml
* -d for Install.ps1
* git config --global core.autocrlf false
* add missing windows plot_sync workflow
* no check resource usage on windows
* delete outdated windows workflows that need the timelord
* catch up windows workflow template
* try again without xdist
* rebuild workflows
* Revert "try again without xdist"
This reverts commit 4bedf5f047.
* maybe now no xdist on windows
* maybe now no xdist on windows
* rebuild workflows
* debug chiapos==1.0.9
* Revert "debug chiapos==1.0.9"
This reverts commit 4b374e128a.
* debug blspy==1.0.9
* catch up windows workflow template
* rebuild workflows
* Various windows CI fixes
* Windows CI fixes and workflow updates
* ignore another warning for the keyring
* pre-commit fixup
* rebuild workflows
* catchup windows test workflows with long_lived/** and release/** setup
* Update test_full_sync.py
* Try without parallelization
* Some other tweaks for windows
* some more timeout tweaks
* more timeout tweaks for windows
* rebuild workflows
* Adjusting more timeouts
* Skip ipv6 test on windows
* More timeout tweaks
* More timeout adjustments
* More time out adjustments
* more windows tweaks
* Try running some things with -n 0
* Fix up windows test template and re-gen workflows
* Try this again
* Try all windows tests with -n 0
* misc update
* Undo some timeout changes
* Adjust timeout
* Increase timeout
* Coverage combine should combine the files in the current directory
* Trying retry test on windows
* timeout adjustment
* use tmp_path
* Few minor updates based on review
* lint fix
* Update tests/build-workflows.py
* Update tests/core/server/test_dos.py
* Try windows with pytest xdist n=2
* Check windows with xdist n=3
* Trying n=2 again
* Adjust timeout
* Update testconfig.py
* Update build-workflows.py
* Update testconfig.py
* Update .pre-commit-config.yaml
* Update testconfig.py
* Update build-workflows.py
* Update build-test-macos
* Update build-test-ubuntu
* Update build-test-windows
* skip
* Apply suggestions from code review
* tidy
* Update test_pool_config.py
Co-authored-by: Earle Lowe <e.lowe@chia.net>
Co-authored-by: Earle Lowe <30607889+emlowe@users.noreply.github.com>
https://github.com/pallets/click/issues/2225
Doing this instead of updating since updating black will change several
files due to some formatting change. I would like to take that on
separately from unbreaking CI.
* fix typo in wallet_puzzle_store
* check some SQL statements
* deduplicate name SQL index
* deduplicate wallet_type index
* deduplicate wallet_id index
* Add configuration locking
Extracted from https://github.com/Chia-Network/chia-blockchain/pull/10631
* note that fasteners will likely be replaced by filelock
* Fix test_multiple_writers on macOS
* create_all_ssl() doesn't need to be inside the config access lock
* add warnings about not using async within get_config_lock() get lock contexts
* no need to pre-touch the lock file
* .yaml.lock instead of just .lock
* test_multiple_writers() is sync
* Revert "add warnings about not using async within get_config_lock() get lock contexts"
This reverts commit 681af3835b.
* reduce lock context size in chia_init()
* use an exit stack in load_config()
* avoid config existence precheck
* only lock around the read in load_config()
* do not raise e, just raise
* tidy new imports
* fix queue empty check in test_config.py
* remove commented out code in test_config.py
* remove unused import
Co-authored-by: Jeff Cruikshank <jeff@chia.net>
* black==21.12b0 in pre-commit
Match `setup.py`.
* move black from super linter to upload workflow
* black (updated)
* configure so black . works
* --check --diff for black
* pre-commit: Add a new hook to run `isort`
* contributing: Add hint about `isort`
* add isort to dev deps, ignore existing .py files, use black profile
* long list to lines not comma delimited
* isort: Update and sort ignore list to match latest `main`
* add bash command line to generate isort extend skip list (#3)
* add bash command line to generate extend skip list
* tidy
* isort: More files to ignore after rebase
* tests: Fix `test_wallet_user_store.py` after rebase
* Some fixes after rebase
Co-authored-by: Kyle Altendorf <sda@fstab.net>
* Serialize/deserialize peer data alongside existing sqlite implementation (to be removed)
* Simplified AddressManagerStore. No longer uses sqlite and is no longer async.
* Removed aiosqlite usage from AddressManagerStore.
Added PeerStoreResolver class to determine the appropriate location for "peers.dat"
Updated initial-config.yaml to include "peers_file_path" default, replacing "peer_db_path" (similar change for "wallet_peers_path")
* Minor comment changes/additions
* Added migration from sqlite peer db.
Made AddressManagerStore's serialization async as it was right at the edge of blocking for too long.
* Minor tweaks to checking for migration
* Removed AddressManagerSQLiteStore class scaffolding
* makePeerDataSerialization now returns bytes instead of a PeerDataSerialization object
* Async file I/O for write_file_async using aiofiles
Added more tests
* Separate out the synchronous part of move_file
* Renamed write_file to files since we're opening up the capabilities a bit
* Update references to write_file
* Renamed test_write_file to test_files
* Tests covering move_file and move_file_async
* Minor refinements to behavior and tests
* Use aiofiles for reading peers.dat
* Added missing mypy typing info for aiofiles. Also added types-PyYAML to dev_dependencies so that `mypy chia tests` doesn't require running with --install-types
* Add types-aiofiles to the linting workflow
* Directory perms can now be passed into write_file_async.
Added an explicit f.flush() followed by os.fsync() after writing the temp file contents.
* tests: Move `default_replacements` into `generate_replacements`
* tests: Directly use `root_test_dirs`
Instead of passing it into `subdirs`
* tests: Make `build-workflow.py` callable from everywhere
* tests: Adjust the output of `build-workflows.py`
* tests: Add `-f` to `build-workflows.py` to allow failing on CI
* github: Run `build-workflows.py`
* pre-commit: Run `build-workflows.py` as first hook
* tests: Skip DID wallet tests until they are reliable and fixed
* tests: Skip `test_using_legacy_cryptfilekeyring`
* tests|github: Drop `root_test_dirs` and just search in all directories
This removes the requirement to add new test directories to the
`testconfig.py`. This change uncovered two more tests which were not
enabled on CI because their parent dir's were not added to
`root_test_dirs`.
- `tests/weight_proof/test_weight_proof.py`
- `tests/util/test_struct_stream.py`
* tests|github: Don't list test files, use `tests/dir/tests_*.py` instead
* test: Improve workflow update checks by comparing old vs new
Instead of doing a `git diff` which can lead to false positives if there
are other local changes unlrelated to test workflows. This also fixes
the issue that newly added files were not tracked by `git diff` which
means the script / the CI would trigger an alert.
* tests: Adjust `build-workflows.py` to work as expected on windows
* tests: Read/Write in bytes to avoid and detect unexpected `\r\n`
* tests: Skip `test_pool_cmdline.py`