EDIT: Solved in thread... I'm dumb I want to add ...
# general
b
EDIT: Solved in thread... I'm dumb I want to add Pants to our monorepo for lint/format/check with the lowest amount of boilerplate. I'm thinking people won't like every dir being blasted by
BUILD.pants
to sit next to our Bazel
BUILD
files, so my first attempt was to try a (code) root
BUILD.pants
with:
Copy code
python_sources(name="source", sources=["**/*.py"])
python_tests(name="tests", sources=["**/test_*.py", "**/*_test.py"])
But I'm seeing a hearty dose of
The following imports in a/b/c/d/test_foo.py:../../../../tests have no owners
which points to an import of a module which is just chilling next to the test. --- No source roots at play
Oh wait, is it a double-ownership issue because my first
sources
needs to omit tests 🤔
Yup!
🙂 1
👍 1
b
Glad you were able to solve the problem so fast. You have a bright future in Pants user support! 🤣
😄 2
b
But now i realize if im just doing lint/format/check i should treat everything as a source...
Should this be a page in the getting started guide? Happy to help author/review
b
@hundreds-father-404 you just did that docs audit. Thoughts on how to make this issue clearer for folks? @bitter-ability-32190 what would have made the solution more immediately evident for you?
b
I think the Getting Started guide might need to be split in two: 1. I want to hit the ground running with Pants for everything (including tests) 2. I want to ooch my way in, so let's just start with lint/check/format Right now, I think it assumes 1. because that's the outcome of running
tailor
1
b
Aside: I wish we had a karma awards system here so I could offer mega points right now for excellent use of "ooch my way in".
🌟 1
b
If only I had a bitcoin address...
b
I like the idea of giving two separate entry points. So many people tell us that they started with a proof of concept repo that I wonder if we should explicitly make that one of the entry points: quickstarting a PoC project, vs getting started incrementally adopting Pants into an actively-developed codebase with lots of collaborators.
🙌 2