fix(ci): use editable install + ignore live tests at collection - #91
Merged
Conversation
- Removed unnecessary blank lines in various files for cleaner code. - Reformatted import statements for consistency and readability. - Improved comments for clarity in the expiration.py and processor.py files. - Added shared pytest fixtures and configuration for better test organization. - Introduced a minimal replay server for offline integration tests. - Implemented end-to-end integration tests to validate the Quotex client against the replay server. - Enhanced test coverage for various functionalities including connection handling, balance events, and candle retrieval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CI workflow added in # failed on every test job with
ModuleNotFoundError: No module named 'pyquotex'. Three root causes,all fixed here:
Build backend was broken.
pyproject.tomlmixed PEP 621[project]with legacy[tool.poetry]fields (packages = [...],[tool.poetry] include = ...). Withpoetry-core>=2.0this combofails metadata generation:
tool.poetry.dependencies must be object.So
pip install -e .couldn't work at all — neither locally nor on CI.CI never installed the package. The workflow used
pip install -r requirements.txt, which pulls runtime deps but doesnot put
pyquotex/onsys.path. Tests importedfrom pyquotex.…and crashed at collection.
Legacy live tests blocked collection.
tests/test_basic.py(and 8 others) call
credentials()at module import time, whichdoes
input("Enter your account email: ")whensettings/config.iniis absent. On CI stdin is closed, so pytest aborted with
OSError: reading from stdin while output is captured— beforethe live-test skip marker could fire.
Changes
pyproject.toml— migrated tohatchlingas the build backend.Cleaned legacy
[tool.poetry]cruft. Addedtestanddevoptional-dependency extras. Kept the existing ruff/pytest config.
Wheel still ships
py.typed(verified bypython -m build).tests/conftest.py— addedpytest_ignore_collectthat dropsthe legacy live test modules from the collection phase entirely
when
PYQUOTEX_LIVEis unset. They're still discoverable / runnablewith
PYQUOTEX_LIVE=1 pytest..github/workflows/ci.yml— replacedpip install -r requirements.txt …withpip install -e ".[test]"in both the
type-checkandtestjobs. Same change makes theinstall path the same one a downstream user would take, validating
the package is publishable.
Test plan
Locally, from a clean venv:
Result on this branch: