I’m having troubles conceptualizing decoupling of testing for existence and content of config files from my local config files setup.
Using the old paradigm with extra test modules, there’ wasn’t an overlap with the actual config filepath, one could use fully temporary filepaths for testing.
But having the working code and test in the same notebook I fail to see how to circumvent below problems:
- Checking for a config file with path
$HOME/.myproject.tomlshould raise at first use of the software and point the user to a set-up routine
- this fails during local test b/c my local set up has that file
- it will work on the GitHub workflow test though
- If I wouldn’t check for raising, it would not fail the local test but obviously fail on GitHub
- Filling the config file path with a random path for testing would over-write my local config file’s content.
Any tips on how I could decouple this with using
nbdev would be appreciated!