Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests #7

Closed
mtazzari opened this issue Dec 9, 2019 · 5 comments
Closed

Add tests #7

mtazzari opened this issue Dec 9, 2019 · 5 comments

Comments

@mtazzari
Copy link
Collaborator

mtazzari commented Dec 9, 2019

We would need to add a few tests, at least:

  • to test the package can be imported
  • to test the objects can be initialised correctly

Ideally:

  • to test that Frank produces the same result on the same dataset (perhaps fixing the random seed we can obtain reproducible results to a numerical precision level?)

These tests would be run automatically after any push command.

@mtazzari mtazzari added the tests label Dec 9, 2019
@mtazzari mtazzari added this to the 1.0.beta milestone Dec 9, 2019
@mtazzari
Copy link
Collaborator Author

Some tests placeholders added in #10
Now need to add real code inside them

@rbooth200 rbooth200 mentioned this issue Dec 10, 2019
5 tasks
@mtazzari
Copy link
Collaborator Author

mtazzari commented Dec 13, 2019

2 tests still missing:

  • Test IO
  • Test the full pipeline

@mtazzari mtazzari modified the milestones: 1.0.beta, 1.0 Dec 13, 2019
@jeffjennings
Copy link
Collaborator

For the IO test, in tests.py there's

def test_import_data():
    # TODO
    pass

but how useful is this, as it'll just be checking that np.genfromtxt and np.savetxt / np.save are working?

For the full pipeline test, there are already tests for the geometry fitting and the brightness profile fitting; is there utility in a test for the full pipeline, as it would just additionally be testing that figures can be generated (that np.genfromtxt and plt.savefig are working)?

@mtazzari
Copy link
Collaborator Author

Regarding the IO test, now there is a meaningful test here

def test_import_data():
    """Check the UVTable import function works for a .txt"""
    load_uvtable('tutorials/test_datafile.txt')

@mtazzari
Copy link
Collaborator Author

Regarding the full pipeline test, I agree it would be nice to have it -- indeed I added that in Dec to the todo list above.
However to implement such text will require non-trivial amount of work to check files are created, populated correctly, etc. It could easily take a few days of work.
I've opened #48 to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants