Python:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -U pip
python -m pip install -e .[dev] build twineJavaScript:
cd js
npm installRun the Python test suite:
PYTHONPATH=src pytest -qRun the Python live Sourcey integration test against a published docs site:
SOURCEY_TEST_SITE_URL=https://sourcey.com/docs PYTHONPATH=src pytest tests/integration_tests/test_live_retriever.py -qBuild and validate the Python distribution artefacts:
python -m build
python -m twine check dist/*Run the JavaScript checks:
cd js
npm run check
npm run test
npm run buildRun the JavaScript live Sourcey integration test:
cd js
SOURCEY_TEST_SITE_URL=https://sourcey.com/docs npm run test- Keep
pyproject.tomlandsrc/langchain_sourcey/retrievers.pyon the same package version so theUser-Agentstays accurate. - Publish only after the local test suite, live test, build, and
twine checkpass. - If package metadata changes, confirm the public repository and issue tracker URLs resolve before publishing.
- Keep
js/package.jsonandjs/src/retriever.tson the same package version so the JSUser-Agentstays accurate. - Publish the JS package from
js/only afternpm run check,npm run test, the live JS test, andnpm run buildpass.