pants pet peeve: so tedious setting up a new proje...
# general
a
pants pet peeve: so tedious setting up a new project. done three in the last month or two and every one feels like it's been pulling teeth to get things rolling.
šŸ‘€ 1
b
Can you elaborate on the pain points? Without knowing where the friction is, it's hard to make this simpler/easier šŸ˜Š
āž• 1
h
+1, we're trying to continually lower the barrier for onboarding and created this label: https://github.com/pantsbuild/pants/issues?q=is%3Aopen+is%3Aissue+label%3Aonboarding
b
Thanks for this feedback. Detailed rundown of the flaws you've encountered would be invaluable. We know we want to make onboarding a dramatically better experience, so understanding what to tackle to make gains that are impactful would be a big deal.
šŸ‘ 2
a
things like: ā€¢ adding black, flake8 ... then configuring them to work together. ā€¢ then add in isort, and get it to work nicely with black.
h
were you already using those tools?
a
No, this is a brand new repository
but adding the config files, then pointing pants to tell black about them. it's all just boilerplate
h
OK. It sounds like some of the complications with getting those tools themselves to work? What could pants be doing differently to make this all easier?
then pointing pants to tell black about them.
hm are you manually configuring vs discovery?
a
yeah, a part of it is the tools themselves. I'm guessing I'm manually configuring them into /build-support
šŸ‘ 1
but would be nice there was a leinengen style
./pants startproject +black +isort +flake8
to put files places in an overly opinionated way.
šŸ‘ 1
On the django side, There's a bit of cajoleing making files in the right place, resources/dependencies all resolve etc. The django example is a great help. But there's a few quirks here. like. you need to run
makemigrations
in an exported virtualenv otherwise the migration will be put in the epheremal
.pants
cache folder. And setting your database to a sqlite one, and having
restartable=True
results in
pants run :mange -- migrate
getting stuck in a reboot loop.
and satisfying mypy's insatiable thirst for type annotations is impossible. But that's mostly a mypy issue
b
You might look into to sharing a GitHub template repo or using cookiecutter
a
that could work.
b
I still think there's win-win in getting Pants into some existing cookiecutter repos https://pantsbuild.slack.com/archives/C0D7TNJHL/p1652115137850049
a
that'd be good yeah