proud-dentist-22844
05/23/2024, 3:32 AMos.path.isdir()
on each of the directory paths. In the git repo, each leaf of this directory tree has a .gitignore
file with:
*
!.gitignore
Essentially, that preserves the directory structure in git. But how do I get pants to include those directories in the pytest sandbox?
Add a BUILD file with a file()
target for each of the .gitignore
files?
Add some other file and have the file()
target use that in sources?
Or perhaps add a BUILD file with an empty target()
in each of the leaf directories?
Then the test could have an explicit dependency on some target that references the directory structure targets?
Any ideas for how to deal with this somewhat cleanly?broad-processor-92400
05/23/2024, 3:57 AMtarget
won't work (since it won't be connected to any files, there's nothing to prompt being materialized into the sandbox)... but I could be wrong!
file
targets for the existing git ignore files seems plausible, in that it's encoding the existing git convention. Another option would be a files()
target with a glob like files(sources=["**/.gitignore"])
or similar.proud-dentist-22844
05/23/2024, 4:22 AMresources(sources=["**/.gitignore"])
. That seems to be working well enough. 😅