I'm working on a project that specifies its dependencies using Poetry and a pyproject.toml file to manage dependencies. The documentation for one of the libraries I need suggests pip-installing with an "extra" option to one of the dependencies, like this:
pip install google-cloud-bigquery[opentelemetry]
How should I reflect this requirement in the pyproject.toml
file? Currently, there are a few lines like this:
[tool.poetry.dependencies]
python = "3.7.10"
apache-beam = "2.31.0"
dynaconf = "3.1.4"
google-cloud-bigquery = "2.20.0"
Changing the last line to
google-cloud-bigquery[opentelemetry] = ">=2.20.0"
yields
Invalid TOML file /home/jupyter/vertex-monitoring/pyproject.toml: Unexpected character: 'o' at line 17 col 22
Other variants that don't seem to be parsed properly:
google-cloud-bigquery["opentelemetry"] = "2.20.0"
There are other StackOverflow questions which look related, as well as several different PEP docs, but my searches are complicated because I'm not sure whether these are "options" or "extras" or something else.