Resolve "test_files solution is temporary"
Compare changes
- Mads M. Pedersen authored
+ 1
− 6
@@ -5,11 +5,8 @@ Created on 20. jul. 2017
@@ -20,14 +17,12 @@ def get_test_file(filename):
Closes #59 (closed)
I have added the toolbox.TestFiles repository as a submodule. I think this means that people can checkout wetb without getting all the test files.
To get the test files you need to git.exe submodule update --init
Test files are accessed via
filename = get_test_files("my_test_file.txt")
get_test_files
will first look for <current folder>/test_files/my_test_file.txt
and return the full filename.
You can also specify the full path
If the file is too big run:
wetb.utils.test_files.move2test_files("my_test_file.txt")
which moves it to the same relative folder inside the ./WindEnergyToolbox/TestFiles/", and it will still be accessible via
filename = get_test_files("my_test_file.txt")
which now returns the new full filename as the old does not exist anymore