Skip to content

Demos framework, CI gate, and pyproject.toml consolidation (v3.4.0) - #30

Merged
joshlin111 merged 3 commits into
mainfrom
feat/demo-and-ci
Jun 29, 2026
Merged

Demos framework, CI gate, and pyproject.toml consolidation (v3.4.0)#30
joshlin111 merged 3 commits into
mainfrom
feat/demo-and-ci

Conversation

@joshlin111

@joshlin111 joshlin111 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three logical commits on top of main:

  1. refactor(tests): Numbered V3 demo flow (01_register_v320_ws_account_v3) wired through tests/_common.py factories that read config from .env. Legacy V1/V2 demos moved to tests/legacy/. Adds offline smoke tests (every numbered demo AST-parses, factories instantiate) and regression tests pinning two invariants that have broken before (change_pub_key_v3 class membership, lazy-load inside create_order_v3).
  2. build: pyproject.toml becomes the single source of truth for project metadata, dependencies, extras, pytest config, and tool settings. Removes setup.py / setup.cfg / tox.ini / pytest.ini — all silently shadowed by pyproject.toml's [project] table under PEP 621, which made the three-way drift between dep lists invisible. Drops dead pytest / tox / requests-mock / eip712-tools from install_requires. Adds make test gate invoked by both the local .githooks/pre-push hook and .github/workflows/ci.yml so the two cannot drift.
  3. chore: bump to 3.4.0.

Breaking changes (vs 3.3.1)

  • requires-python tightened to >=3.9 (3.6/3.7/3.8 are EOL).
  • pytest / tox / requests-mock removed from install_requires; pytest now lives in the tests extra.
  • eip712-tools==0.1.1 removed — the package is not on PyPI and is never imported by apexomni/, so users pip install apexomni-ing prior versions were hitting a hard error or silently relying on a cached wheel. This restores installability on a clean environment.
  • Wheel tag fixed from py2.py3-none-any (incorrect) to py3-none-any.

Test plan

  • make test passes locally (34/34) on Python 3.9 via the project venv
  • python -m build --wheel produces a wheel with the cleaned-up Requires-Dist list and correct py3-none-any tag
  • Pre-push hook gates the push on a green test run
  • CI matrix passes (Python 3.9 / 3.10 / 3.11 / 3.12) — pending this PR

…st gate

- Numbered V3 demo flow (01_register_v3 → 20_ws_account_v3) wired
  through tests/_common.py factories; each demo reads config from
  .env so users don't edit source files.
- Move V1/V2 demos to tests/legacy/ with their own README.
- tests/test_demos_smoke.py parses every numbered demo and exercises
  the helper factories with no network access.
- tests/test_sdk_regressions.py pins invariants previously broken by
  refactors (change_pub_key_v3 on HttpPrivate_v3, lazy-load of
  accountV3/configV3 inside create_order_v3).
- .env.example documents every variable the demos read.
- README links updated to the new numbered demo paths.
- pyproject.toml is now the single source of truth for project
  metadata, dependencies, extras (demos / tests), pytest config,
  and tool settings.
- Remove setup.py, setup.cfg, tox.ini — all silently shadowed by
  pyproject.toml's [project] table under PEP 621 / modern setuptools,
  which made the previous three-way drift between install_requires
  lists invisible.
- Drop pytest / tox / requests-mock from install_requires (none of
  them are runtime deps); pytest moves to the `tests` extra.
- Drop eip712-tools==0.1.1 — package is not on PyPI and never
  imported by apexomni/.
- Add numpy (used by apexomni/http_private_sign.py — was a phantom
  install_requires miss).
- Add mnemonic (setup.py was missing it).
- Pin setuptools<81 — web3==6.0.0 imports pkg_resources at module
  load, which setuptools 81+ removed. Without this, Python 3.12
  installs fail with ModuleNotFoundError: pkg_resources.
- Tighten requires-python from >=3.6 to >=3.9; drop py36/37/38
  classifiers; wheel now tags py3-none-any instead of the
  incorrect py2.py3-none-any from universal=1.
- Single Makefile gate (make test) is invoked by both the local
  pre-push hook (.githooks/pre-push) and CI
  (.github/workflows/ci.yml) — the two cannot drift apart.
- CI matrix: Python 3.9 / 3.10 / 3.11 / 3.12.
Minor bump for the demos + CI + pyproject.toml consolidation
landed in the previous two commits. Notable user-visible changes
that don't fit a patch bump:

- requires-python tightened to >=3.9 (3.6/3.7/3.8 are EOL)
- pytest / tox / requests-mock removed from install_requires;
  pytest now lives in the `tests` extra
- eip712-tools dropped (phantom dep — never on PyPI)
- numpy and pinned setuptools<81 added so installs actually work
  on a clean environment
- wheel tag fixed to py3-none-any
@joshlin111
joshlin111 merged commit 4d849dd into main Jun 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant