While I was looking at another issue, I noticed that we are missing parenthesis on one of the .exists function calls. I pointed this out and Jeremy asked me to put in a PR to fix.
I'm going to just put in the single change that I mentioned, but I also noticed that the functions in serve aren't really being tested either (at least in isolation). I was looking at adding some tests, but I think it will be challenging with the current function because we rely on the cfg.config_path. I believe we could make it a lot easier to test by using a cache_path in a similar way to how we use path for nbs currently. If we made that more flexible, we could create a temporary directory and point to that directory and then ensure that the behavior is how we expect it to be. If there is interest in something like that, let me know and I would be happy to work on it, but I didn't want to make this PR murky since it's so straightforward.
While I was looking at another issue, I noticed that we are missing parenthesis on one of the .exists function calls. I pointed this out and Jeremy asked me to put in a PR to fix.
I'm going to just put in the single change that I mentioned, but I also noticed that the functions in serve aren't really being tested either (at least in isolation). I was looking at adding some tests, but I think it will be challenging with the current function because we rely on the cfg.config_path. I believe we could make it a lot easier to test by using a cache_path in a similar way to how we use path for nbs currently. If we made that more flexible, we could create a temporary directory and point to that directory and then ensure that the behavior is how we expect it to be. If there is interest in something like that, let me know and I would be happy to work on it, but I didn't want to make this PR murky since it's so straightforward.