Closed ashgillman closed 3 years ago
Testing completed:
ran ./scripts/download_data.sh
ran ./scripts/download_data.sh data
ran ./scripts/download_data.sh data ~/tmp
after copying downloaded files to ~/tmp
- they are found correctly
ran all modified notebooks until the cd
command and ensured it ran. Note that notebooks weren't run to completion
I've also tested the PET notebooks (completely here, since they were short). All work well, except MAPEM which runs, but gives some funky results - I presume unrelated.
To explain how this works:
notebook_setup.py
which need to be imported, and which will set the sys.path to point to SIRF-Exercises/libexercises_data_path()
looks for that file, and also checks an ENV var which could be useful in the future but currently never really would be used. If it can't find the path it raises an exception.also a codacy suggestion for quoting and spaces
except MAPEM which runs, but gives some funky results - I presume unrelated.
ah. please create an issue...
Yes, I know I went overboard there... It was easier than checking line-by-line with Codeacy I think it should still be valid
Huh, I did test.. I think that slipped through based on short-circuiting. I've tested with different flags a little more rigorously. Although I also removed those particular line as it is now desirable to be able to run the script without downloading any data, if no flags are specified, if you wanted to just configure the path file.
I have no idea how to please Codeacy! If I put the function docstring to start after ``` it says Multi-line docstring summary should start at the second line (D213)" and if I put a newline it says "Multi-line docstring summary should start at the first line (D212)"!
Hmm, it has conflicting rules! https://stackoverflow.com/questions/45990301/pep257-d212-and-d213-conflicts
I personally prefer
def some_func():
"""A docstring.
more detail.
"""
return
which would mean disabling D213
Hmm, it has conflicting rules! https://stackoverflow.com/questions/45990301/pep257-d212-and-d213-conflicts
yes. I think the idea is that we choose one to enforce style. anyway
Progress on #89:
chdir
is absolute so can be run multiple timesfrom sirf_exercises import exercises_data_path
examples_data_path
->examples_data_path()