pachterlab / seqspec

machine-readable file format for genomic library sequence and structure
MIT License
112 stars 17 forks source link

Testing core object types #4

Closed detrout closed 1 year ago

detrout commented 1 year ago

The first commit adds tests for the Assay & Region objects.

And testing the setters showed that there was disagreement over if the parent reference was named parent or parent_id.

So the second commit renames parent to parent_id.

The set_parent_id test will still fail with this pull request though because as it's currently implemented if you have a nested tree the sub parents wont have their parent_id set.

But I'm going to make a different pull request for that change, since the right answer is more debatable.

detrout commented 1 year ago

Right as it's currently implemented I've been running these tests from the root of the project and running one of these commands

py.test-3 python3 -m pytest

py.test-3 --cov=seqspec --cov-report=html

detrout commented 1 year ago

I add more a more tests and added tox and github actions to run the tests on commits.

It now also tests the validator code

sbooeshaghi commented 1 year ago

Thank you for the PR! A couple of notes: can you add a dev-requirements.txt that has the testing packages needed? Also can you add jsonschema to requirements.txt?

sbooeshaghi commented 1 year ago

Tests passed for me- everything looks great. Thank you again for your contribution :)