I don't know if we have any poetry experts here, b...
# troubleshooting
s
I don't know if we have any poetry experts here, but I'll shoot my shot: I'm trying to setup a plugin using the EDK that depends on a library that uses `extras`:
Copy code
pip install 'elementary-data[snowflake]'
pip install 'elementary-data[bigquery]'
pip install 'elementary-data[redshift]'
pip install 'elementary-data[databricks]'
My goal would be that when people are using my extension, they can add the pip url as
pip_url: elementary-ext["bigquery"]
Currently, my idea is to create my own
extras
group that references to the elementary-data
extras
, and therefore only installs the required dependencies. To do so, I have currently setup my dependencies like this:
Copy code
[tool.poetry.dependencies]
python = "<3.11,>=3.7"
structlog = "^21.2.0"
PyYAML = "^6.0.0"
pydantic = "^1.9.0"
click = "^8.1.3"
typer = "^0.6.1"
"meltano.edk"= {git = "<https://github.com/meltano/edk.git>", rev="main"}
importlib-resources = "^5.10.0"
elementary-data = {extras = ["bigquery", "snowflake", "redshift", "databricks"], version = "^0.6.4", optional=true}
where we get all dependencies from
elementary-data
and set them as optional. But when I try to reference them while creating my own
extras
, i.e.
Copy code
[tool.poetry.extras]
bigquery = ["elementary-data["bigquery"]"]
I'm getting an error. My guess is it's because I should be creating my dependencies with extras this way. My question is: How could I structure my
pyproject.toml
so that it only installs the dependencies I need?