Introduce a collective library containing all the tools required by hive python tests
Related: haf!211 (merged), HAfAH!56 (merged)
Best to review by commits since there are many changes.
Created hive-local-tools
installable package, which could be installed to provide nice access to all the tools used by hive tests.
Now all things could be imported like from hive_local_tools import run_for
The hive-local-tools
consists of (sub)modules/packages:
- hive_local_tools (package -> all local_tools collected in one package, there are nested subpackages like
hive_local_tools.functional.python.cli_wallet
) - shared-tools (package, maybe in future should be submodule also -> tools shared by different repositories e.g hive, haf)
- test-tools (submodule)
- schemas (submodule)
- hive_utils (package*)
- test_utils(package* located as in previous location - in hive_local_tools.functional.python.beem.decentralized_hive_fund)
- tests_api (package*)
packages with * (hive_utils, test_utils, tests_api) should be probably refactored/rewritten/removed as they do not follow rules present in our current tests (test-tools, shared-tools, local-tools scheme). Probably some of it's parts should be stored in hive_local_tools, but after refactoring, since at first glance it looks like there is a lot of unused code (ft. hive_utils).
Also, hive-local-tools defines its own dependencies like pytest
, pytest-xdist
, and so on...
This MR gives some benefits:
- all test dependencies installable by single line
- absolute imports instead of huge amount of relative dots (
from ......local_tools
) - no need for PYTHONPATH hacks, as everything is pip/poetry* installable
- possibility to introduce some static code analysis tools for tests like automated imports sorter or code formatted (shorter review, faster coding)
*preferable poetry as some of it's features lacks in pip package manager, but pip could also install poetry builds, when no poetry features are configures