Install needed packages and GPTSwarm into the current environment.
poetry install
Install needed and uninstall not listed packages:
poetry install --sync
If dev packages not installed for some reason:
poetry install --with=dev --sync
The following command installs the gptswarm
package as a symbolic link to the current github repo clone. All edits to the repo will be immediately reflected in the "installed" package.
pip insall -e .
To install the package along with the developer's tools:
pip install -e .[dev]
Quick no-API test without logging output:
pytest -m mock_llm test/
Quick no-API test with logging output:
pytest -s -m mock_llm test/
Without logging output:
pytest test/
With logging output:
pytest -s test/
Test specific function:
pytest -s test/swarm/graph/test_swarm.py -k 'test_raises'
Running any of the above commands with poetry will auto activate the virtual environment:
poetry run pytest -m mock_llm
coverage erase
coverage run --source=. -m pytest .
coverage html -i
open htmlcov/index.html
The instructions to work with git LFS (large file storage) can be found here.
The instructions to work with git submodules can be found here.
https://packaging.python.org/en/latest/tutorials/packaging-projects/
poetry config pypi-token.pypi "<your-token>"
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi "<your-token>"
poetry version prerelease
poetry build
poetry publish -r test-pypi
poetry publish
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple gptswarm==0.1.3a1
More see here.