Closed emilannevelink closed 1 year ago
I don't get what you changed here
It was just some formatting to make functions with lots of arguments neater
It might be good to just have a single parse command line function instead of in each file. Then I think we can make a test for it.
Actually, originally I had the parse_arguments
in utils.py
. It still is there but I figured if only asim_run.py
uses it, it should only be in there. We should pick one or the other.
I added tests for asim_run.py for the singlepoint calculation. I don't know how we would want to test a script that isn't in the repository.
I also added a test for parse_command_line. Let me know if the format of these tests make sense. I am pretty inexperienced when it comes to developing tests, so I don't know if this is the right way of doing them.
tmppath
. It's way nicer and less clunky. Worth doing a short tutorial or following the changes I made. Key is that there are example inputs provided to every test file as fixtures (try pytest --fixtures
and you don't need to delete files after you make them using tmppath
parse_command_line
to only exist in utils.py
It is possible that other scripts might need to use so best to put it somewhere general I think. It is therefore tested in test_utils.py
now as a unit test.
This was just how I knew to add it to the path when it is installed. Is there another way that doesn't require adding the path in your environment.
Whoops, sorry. I hadn't loaded it on arjuna.
Thanks
I don't get what you changed here
I'll work on this tomorrow
It might be good to just have a single parse command line function instead of in each file. Then I think we can make a test for it.