Open ringohoffman opened 9 months ago
Thanks, really good issue + instructions, I was able to repro.
I think the issue is that nerfstudio/nerfstudio/scripts/downloads
is ignored by the .gitignore
, which has this:
downloads/
!nerfstudio/scripts/downloads/
@BurntSushi - is the .gitignore
incorrect, or is the ignore
crate not able to pick that up?
You can add:
[tool.ruff]
respect-gitignore = false
For now as a workaround. (See: https://docs.astral.sh/ruff/settings/#respect-gitignore.)
Just from a quick look on a checkout of nerfstudio
, it looks like the ignore
crate is handling the rules correctly and whitelisting nerfstudio/scripts/downloads
:
$ rg --files --debug 2> /tmp/log | rg nerfstudio/scripts/downloads
nerfstudio/scripts/downloads/download_data.py
nerfstudio/scripts/downloads/__init__.py
$ rg nerfstudio/scripts/downloads /tmp/log
39:rg: DEBUG|ignore::walk|crates/ignore/src/walk.rs:1802: whitelisting ./nerfstudio/scripts/downloads: Whitelist(IgnoreMatch(Gitignore(Glob { from: Some("./.gitignore"), original: "!nerfstudio/scripts/downloads/", actual: "nerfstudio/scripts/downloads", is_whitelist: true, is_only_dir: true })))
$ fd . | rg nerfstudio/scripts/downloads
nerfstudio/scripts/downloads/
nerfstudio/scripts/downloads/__init__.py
nerfstudio/scripts/downloads/download_data.py
Perhaps there is some interaction between ruff and the ignore
crate that is causing the issue here. Or there is some other rule in play. I can dig more into this tomorrow.
I think the issue is that once we exclude a directory, we don't recurse further into it (and so we never test its children). Wouldn't it be really expensive to check all children of all excluded directories?
nerfstudio
.ruff
config:[tool.ruff.lint.isort] combine-as-imports = true known-first-party = ["nerfstudio"] split-on-trailing-comma = false
isort
config:isort
discovers a missed fixor
And also,
ruff
succeeds at finding and fixing other scripts in this folder.