Skip to content

fix: resolve stellar_asset_id import error in data-processing CI#1012

Open
olalois wants to merge 1 commit into
Pulsefy:mainfrom
olalois:fix/stellar-asset-id-import-path
Open

fix: resolve stellar_asset_id import error in data-processing CI#1012
olalois wants to merge 1 commit into
Pulsefy:mainfrom
olalois:fix/stellar-asset-id-import-path

Conversation

@olalois

@olalois olalois commented Jul 14, 2026

Copy link
Copy Markdown

Summary

Fixes the failing test_stellar_asset_id.py test job in the data-processing CI workflow.

Root Cause

tests/conftest.py was inserting apps/data-processing/src onto sys.path instead of the project root (apps/data-processing). Because all test files use from src.ingestion.xxx import ... style imports, Python needs the parent of src on the path — not src itself.

Changes

tests/conftest.py

  • Fixed sys.path.insert to point to the data-processing root (..) instead of ../src

pytest.ini

  • Added pythonpath = . — pytest 7+ native feature that ensures the working directory is always on sys.path in CI (already requires pytest>=7.0.0 in requirements.txt)

src/ingestion/__init__.py

  • Exported stellar_asset_id symbols (KNOWN_ASSETS, NATIVE_KEY, AssetID, make_asset_key, parse_asset_key, normalize_asset_dict, display_name) from the package public API

Verification

All 52 tests in tests/test_stellar_asset_id.py pass locally.

52 passed in 0.36s

Closes #

The test job was failing because tests/conftest.py added
apps/data-processing/src to sys.path instead of the project
root (apps/data-processing), making 'from src.ingestion...'
imports unresolvable.

Changes:
- tests/conftest.py: insert apps/data-processing root onto
  sys.path (was incorrectly inserting the src/ subdir)
- pytest.ini: add pythonpath = . so pytest 7+ natively adds
  the working directory to sys.path in CI
- src/ingestion/__init__.py: export stellar_asset_id symbols
  (KNOWN_ASSETS, NATIVE_KEY, AssetID, make_asset_key,
  parse_asset_key, normalize_asset_dict, display_name)

All 52 tests in test_stellar_asset_id.py now pass.
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