Hello! I am currently looking into implementing p...
# general
k
Hello! I am currently looking into implementing pants on a pre-existing monorepo that already uses poetry. I'm thinking one first step could be to export poetry requirements to requirements.txt files and point to them using
python_requirements
. I want to use multiple resolves, one for each of my poetry "apps". Are there good examples of existing multi-resolves repos using pants? It looks like the docs is pretty scarce on that. For example, when I run mypy it looks like pants installs nothing, and when I use
pants dependencies <file>
, its not listing any of my third-party deps. I am probably doing it wrong, I'd love to see complete examples.
👋 1
n
It doesn't answer your actual question, but in case you missed it there's also a
poetry_requirements
that you can use directly with the Poetry configuration from your
pyproject.toml
:)
k
I decided not to go with poetry_requirements for now for a bunch of reasons, one of them being that my project currently still uses
poetry install
using poetry lockfiles. I wouldn't want pants to pick different library versions. If there was a
poetry_requirements
that took the poetry lockfiles as input, I'd use that.
👍 1
f
@kind-traffic-20936 I have a jq convert file that makes the poetry.lock file from a pants resolve , it's not perfect and it has gaps .. The gap is the poetry is adding all dependencies (mac win linix) but our pants set up only collects linux( the platform on which we.dev)
s
I've recently configured a repo with ~400 poetry projects with separate resolves Maybe you'll find it useful https://github.com/grihabor/llama_index/pull/1 Unfortunately, I didn't manage to run it https://github.com/pantsbuild/pants/issues/20568, but the general idea should work, If you have a reasonable amount of resolves 😂
k
Thanks @square-psychiatrist-19087 I will take a look!