Skip to content

Adopt src package layout and add dev packaging helpers#5

Merged
srichs merged 1 commit into
mainfrom
codex/move-spot_api-to-src-directory-and-setup-files
Feb 11, 2026
Merged

Adopt src package layout and add dev packaging helpers#5
srichs merged 1 commit into
mainfrom
codex/move-spot_api-to-src-directory-and-setup-files

Conversation

@srichs

@srichs srichs commented Feb 11, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Standardize the project to the common src-layout so installed packages don't accidentally import from the repository root during development.
  • Provide minimal packaging compatibility for tools that expect a setup.py and a convenient way to install development extras.
  • Ensure docs build and tests import the package correctly from the new layout.

Description

  • Moved the spot_api package into src/spot_api to adopt the src layout and left public exports unchanged.
  • Updated pyproject.toml to add [tool.setuptools] package-dir and [tool.setuptools.packages.find] where = ["src"], and added [tool.pytest.ini_options] pythonpath = ["src"] for local test runs.
  • Added a minimal setup.py shim with setup() for compatibility with tools that rely on a setup.py entrypoint.
  • Added requirements-dev.txt containing -e .[docs,test,lint] and updated README.md to document using it, and modified docs/conf.py to insert src on sys.path for Sphinx imports.

Testing

  • Ran pytest which passed all tests (119 passed).
  • Attempted python -m pip install -e . but it failed in this environment because build dependency downloads were blocked by network/proxy restrictions (could not fetch setuptools>=61.0).
  • Verified the package imports locally for tests and documentation generation after updating sys.path in docs/conf.py.

Codex Task

@srichs srichs merged commit 9b2fb97 into main Feb 11, 2026
6 of 8 checks passed
@srichs srichs deleted the codex/move-spot_api-to-src-directory-and-setup-files branch February 11, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant