Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 1.45 KB

README_SINGLE_LIBRARY.md

File metadata and controls

30 lines (18 loc) · 1.45 KB

Setup for a single library

Generally speaking, a single poetry-backed library should work out of the box with stew with no additional configuration.

However, we cannot assume that all setups will work. To maximize compatibility with stew, setup your project according to one of the two options below.

Option 1: At the root of the repository

This setup is only suitable for single-library repositories.

  1. The pyproject.toml file is at the root of the repository (e.g.: /pyproject.toml)
  2. A folder that matches the name of your import, next to the pyproject.toml file (e.g.: /coveo_stew/)
  3. An __init__.py file inside the importable folder (e.g.: /coveo_stew/__init__.py)

The current repository uses that setup.

Option 2: In a folder

This setup is actually the multiple library setup with just one library:

  1. The pyproject.toml file is contained in a folder somewhere in the repository (e.g.: /src/python/pyproject.toml)
  2. There's a folder that matches the name of your module import, next to the pyproject.toml file (e.g.: /src/python/coveo_systools/*.py)
  3. An __init__.py file inside the importable folder (e.g.: /src/python/coveo_systools/__init__.py)
  4. The tool.stew.pydev setting should be false or not present
  5. The poetry.package-mode setting should be true or not present

As a reference, take a look at the coveo-python-oss repository.