I'm doing a bit of consulting on a greenfield proj...
# welcome
r
I'm doing a bit of consulting on a greenfield project which may involve some less-experienced programmers, and I'm trying to put automation tools in place to prevent the usual problems. The basic testing, checking, formatting, etc. provided by Pants is very attractive. I've been using Python since the mid-90s but since it didn't have a compile step I never got around to looking at any build systems until now. I'm also starting work on a book, and was frustrated by the standard directory structure where importing a module required that module to be below the importer in the directory structure. This made it hard to have each chapter's examples in its own directory and at the same time provide common modules throughout the book. The fact that Pants solves that problem for me -- and also automatically fetches all dependencies -- will make the end users experience with the example repository much smoother, and that's a big win. I joined the Slack because I'm running into a few oddities while coming up with instructions for setting up and using the two repos, so I'll be asking some (possibly pretty basic) questions.
đź‘‹ 6
h
Yeah, for users of compiled languages we “just” have to explain why Pants might be better fit than other existing tooling, but for Python we have to explain the category itself… But Python has now matured to where it needs tooling like this, especially since the existing idioms implicitly assume that your repo consists of just one package/distribution/deployable/thing with a top-level setup.py or pyproject.toml, and that just won’t scale.
r
Previously, I had gotten stuck trying to see if I could get pytest to solve my "chapter" problem so it was a relief to see that Pants would do this -- plus I like that it's demonstrating the simplifying value of build tools. I'm now trying to create reliable WSL installation instructions for the novice which is requiring a lot of experimentation and I'm wondering if I just accidentally got it to work the first time (because I used the default installation of that older install of WSL which happened to be Python 2.9, and I used the same Python for both running Pants and running the examples). But I'm still deep in the midst of experimenting and when I figure it out hope to have clear installation steps. I don't want people turned away if they cannot install Pants.
a
One of the brilliant design decisions with pants is that the pants script is intended to be included in source control so there is no install pants requirement. For your book examples, you’ll probably want to include some example scripts to get the novice started. I am somebody who has recently moved into Python from other compiled platforms so this Python pathing and packaging thing has been challenging. Pants not only makes things easier to configure and automate, it makes logical sense.
❤️ 1
đź‘– 1