Is there a way to ignore my `experimental` directo...
# general
a
Is there a way to ignore my
experimental
directory when doing, eg
pants --changed-since whenever --changed-dependents=transitive
? or
pants dependees some_lib
? I was hopeful that if I added a tag to the defaults for the dir, and excluded the tag in pants.toml, all my problems would go away. The problem is that code in that directory is subject to rot. Mostly I can just ignore it, but it does interfere with dependency tracking.
g
Hmm,
--pants-ignore
? Or maybe
--filter-address-regex
?
👀 1
a
Copy code
❯ pants --changed-since=HEAD --changed-dependents=transitive --filter-address-regex='-^exp.+' check
18:16:01.58 [ERROR] 1 Exception encountered:

UnownedDependencyError: Pants cannot infer owners for the following imports in the target exp/users/michael/cui/grad_model_on_data.py:

  * exp.users.michael.feature_transforms (line: 41)
so that's a nay on address regex? ignore does work if I stick it in pants.toml, but then i need to work out how I opt back in again. I probably could just specify the ignore on each command cos this is mostly to support ci
darn it michael
g
If it's for ci, put it in pants.ci.toml if you use that 😉
👍 1
a
the great thing about a tag is that if I'm working on code in exp, I can just set the tag and things work again... I'll ponder. Thanks! Fixes the CI issue.
I could just fire michael, i guess, but he's a cool guy
😄 3
😎 1
c
you could get real whacky and conditionally add it to the ignores perhaps..?
Copy code
# .pants.bootstrap

if [ -n $work_on_experimental ]; then
  export PANTS_IGNORE="+['exp/']"
fi
a
ooooh.... that is filth.... I like it,.
🙃 1