Welcome to <@U04QJ57C7GD> <@U04QNDKR22X> <@U04R4GX...
# welcome
b
Welcome to @rhythmic-kite-17726 @strong-angle-99387 @helpful-library-68992 @witty-laptop-37343 @lemon-helicopter-73409 @breezy-apple-27122 @cool-airport-16415 πŸ‘‹ . We invite you to say a little something about yourself and your organization, and what motivated you to take a closer look at Pants. You’ll be helping us improve future open source outreach, so thanks very much!
l
@busy-vase-39202 Hi! I work for a small startup, and pretty much handle everything BE/devops’ish related. We are reaching a point where we are going to need a handful of micro-services for things like ETL, etc, that share a lot of the same business logic/code and through monorepos might be the way to go. We are a python/django shop, but may go polygot (or at least want to keep it an option), so I thought I would have a look.
πŸ‘‹ 3
Unfortunately, I didn’t have a lot of success converting our existing django monolithic API over to using pants. Although that may be the way we structure things currently as well.
c
there’s quite a bit to learn/get used to; will just say it is supported--coming from a Django based app as well using Pants. πŸ˜‰ although it would be nice with more integrated django-isms in Pants to make things easier.
☝️ 1
l
Or a wiki / documentation for those. For example, the problem (and this probably not the place to post this) I had is our β€œsettings” is outside our django directory, and getting the pythonpaths to line up is… still a work in progress. I might take another go at it this weekend and ask more questions in #general. Thanks for the welcome!
πŸ‘ 1
b
Have you already found the
example-django
repo and @clean-city-64472's tutorial? Unfortunately both are a bit behind at this point, so likely you'll still need to ask questions. The good news is, we always welcome questions in the Slack or on GH Discussions, and we try to be very responsive to those so you can keep moving forward. (By the way, @curved-television-6568 works on the very Django repo that Gordon blogged about, so either of them likely will have good insights.)
l
Yep, I took a look around. Like I said, I think our repo is structured just different enough to be problematic for a noob, but the example and tutorial got me most of the way! I’ll be sure to ask questions, and I’m willing to contribute docs/examples if/when possible. Pants has some nice features that really would like to take advantage of.
b
Contributing docs/examples would be great! We get so busy with working on core that it's hard to keep examples current. Anything you bring to that would be much appreciated.
πŸ‘ 1
Now I'm curious: which Pants features are you most intrigued by?
l
currently our tests take ~40 minutes to complete. Testing only what has changed would be great (and I realize this mostly on designing the tests correctly which isn’t really the purview of pants, but it takes advantage of it). Mostly, though, we are going to have shared code between projects, and having an intelligent build across multiple projects would be very nice.
BTW, I first came across pants from this site: https://monorepo.tools/
b
Yeah, you may need to rewrite a few tests but people typically find that it was stuff that needed to be rewritten anyway, to eliminate side-effects, etc.
πŸ‘ 1
h
FWIW, in my spare time I am noodling on a Django plugin, mostly to get dep inference right
πŸ™ 3
b
(edit: @happy-kitchen-89482) Is that public? I wonder if even the unfinished work might give folks a few more clues in the meantime...
l
Not to get too into it, our current repo looks something like:
Copy code
repo
β”œβ”€β”€ compose
β”œβ”€β”€ config
    β”œβ”€β”€ *asgi.py*
    └── settings
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ manage.py
β”œβ”€β”€ poetry.lock
β”œβ”€β”€ proxy
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ setup.cfg
β”œβ”€β”€ startup.py
β”œβ”€β”€ staticfiles
└── api
    β”œβ”€β”€ accounts
    β”œβ”€β”€ authentication
    β”œβ”€β”€ *celery.py*
    β”œβ”€β”€ common
    β”œβ”€β”€ conftest.py
    β”œβ”€β”€ users
    └── util
And getting imports like
config.settings
and
api.accounts…
to work together. Oh and our tests are in
tests
directories in each of the api/*/ directories. Anyway, it was interesting trying to get it to work with this layout without moving around the whole repo (I’m aware we may have too in the near future anyway)
That deals with dep inference between migration files
b
@lemon-helicopter-73409 Would you repost that question to #general? Absolutely nothing wrong with posting here, but at top-level in #general it will have way more eyes on it than tucked into a thread in welcome.
l
@busy-vase-39202 Yep, definitely will do.
b
Cool! Cheers!
b
Hi! I'm working on a medium size company into the software development branch of it. I started to look at pants because the team wants to build a monorepo and we will need a build tool. My previous experiences with Bazel were terrible and I wanted the monorepo tool to be closer to the developer language (Python) therefore I'm evaluating the usage of Pants.
But today developers are working with the latest version of python (3.11) and this is still generating sometroubles during my evaluation.
b
Are you still using the
./pants
runner, or it this with the new launcher binary? The latter is a very recent development, so you might have missed it. We just put out the official announcement on Friday. https://blog.pantsbuild.org/the-pants-launcher-binary-a-much-simpler-way-to-install-and-run-pants/
b
Made the move some hours ago. It works well! Also opened a PR to fix the installer command for non mac users.
b
Thank you for doing that!
l
wow, nice! I’ll give it a try, hopefully some time this week