cucapra / pollen

generating hardware accelerators for pangenomic graph queries
MIT License
24 stars 1 forks source link

Better testing infrastructure for slow-odgi #27

Closed anshumanmohan closed 1 year ago

anshumanmohan commented 1 year ago

Two known sources of clunkiness:

I'd super appreciate tips on one or both!

anshumanmohan commented 1 year ago

Testing crush_n properly reveals a couple interesting things!

sampsyo commented 1 year ago

We chatted a bit about Turnt's environment support today! And I linked to it elsewhere; it's possible I should have mentioned that here instead.

Here is the deal with copying test inputs to other directories. The way Turnt works is that it looks for turnt.toml by walking "upward" from where the test file itself lives. That means that Turnt works the same way regardless of where you are "standing": running turnt foo.t and turnt ../../../foo.t and turnt bar/baz/qux/foo.t from different working directories (assuming those are all different paths to the same file) are all guaranteed to do the same thing. That means that the way you associate a turnt.toml with your tests is to put them in the same directory together (or turnt.toml can go in a parent directory).

I mentioned elsewhere that the solution to the duplication is to just put your new turnt.toml directly in test/. Then it will be shared by the files that are already there. And for testing different commands, you use different environments.

anshumanmohan commented 1 year ago

We no longer keep large graphs around in the repo. We fetch graphs from the web, and then use turnt environments to test these graphs against various algorithms. Run make test-slow-odgi to test crush, degree, depth, and emit.

anshumanmohan commented 1 year ago

I've asked on Matrix re: the interesting case, and my most recent commit patches the silly case!

anshumanmohan commented 1 year ago

The headers, segments, and paths are being generated correctly when running chop. As we discussed at the previous meeting, I have dropped links entirely when it comes to this algorithm. To turnt-test this, I have added a flag to emit that lets us disable links in the generated GFA. So far it is only being used for chop.

anshumanmohan commented 1 year ago

Merging this in for now. The Makefile target test-slow-odgi tests the algorithms chop, crush, degree, depth, and our baseline emit. The turnt output is noisy, since the .out files of each algorithm clobber those of the previous. Look for the results of {algorithm}_test, not {algorithm}_oracle.

Once the ODGI folks have a response re: flip, I'll make a separate PR to add that into the test target after making any fixes.