beast icon indicating copy to clipboard operation
beast copied to clipboard

Tools that need tests

Open lea-hagen opened this issue 5 years ago • 5 comments

Lots of the tools need tests. Since I've written/worked on many of them, here's a quick evaluation of what those need for testing. Check the box when tests are merged for that tool.

  • [x] compare_spec_type.py: could use the phat_small example with fake spectrally-typed stars+positions. I made up a couple for the documentation that could be used.
  • [ ] cut_catalogs.py: pretty straightforward, just need to compare to a cached version of the cut file. Could potentially create tests with different combinations of input options (partial_overlap, flagged, etc).
  • [x] read_beast_data.py: contains 3 functions to test. Each function reads in a file and outputs a dictionary (some only with requested keys), so it would probably be easy to make a test for this using the phat_small files.
  • [x] remove_filters.py: this has two different modes of removing filters (either for simulated files or for using a master grid), both of which need testing. I think files would have to be created to run this on.
  • [ ] setup_batch_beast_fit.py and setup_batch_beast_trim.py: These create input files for submitting to a queue. Since they're just text files, they should be easy to test.
  • [ ] split_ast_input_file.py: This file may not be necessary anymore (need to check with @benw1), so this is very low priority for testing.
  • [x] star_type_probability.py: adds up probability from 1D and 2D PDF files and outputs a dictionary or file. Would need to run the BEAST to create 2D PDFs for phat_small and add those to the remote data, as well as adding the output file of probabilities to remote data for comparison.
  • [x] write_sbatch_file.py: just combines the input parameters into a text file, so should be very easy to test

lea-hagen avatar Apr 17 '20 15:04 lea-hagen

I'll work on compare_spec_type.py testing today.

lea-hagen avatar Apr 17 '20 15:04 lea-hagen

I will look into write_sbatch_file.py for this last hour

mdecleir avatar Apr 17 '20 19:04 mdecleir

And I just started on star_type_probability.py!

lea-hagen avatar Apr 17 '20 19:04 lea-hagen

I am working on read_beast_data.py

karllark avatar Apr 18 '20 13:04 karllark

I submitted PR #551 for the write_sbatch_file.py test.

mdecleir avatar Apr 27 '20 17:04 mdecleir