pacificclimate / pdp_util

A package supplying numerous apps for running PCIC's data server
GNU General Public License v3.0
0 stars 0 forks source link

Migrate to modelmeta 0.3.0 #16

Closed rod-glover closed 3 years ago

rod-glover commented 4 years ago

Resolves #15

As noted in the issue above, the change to the code that queries the database is trivial.

Adjusting the corresponding tests was more work, and is the bulk of this PR. Specifically, now all modelmeta test database setup is (a) within pdp_util, (b) done in test code, and (c) responsible for by far the largest number of lines of new code (in conftest.py). A lot of redundancy was DRYed up and some dead code was removed from the tests.

rod-glover commented 4 years ago

Why isn't TravisCI running tests?

rod-glover commented 4 years ago

@jameshiebert , thank you for encouraging me to reconsider the modelmeta database test fixtures. This resulted in a big improvement (IMHO) -- considerably more compact and readable code, fewer fixtures, much tighter tests. (This would definitely be worth translating back to the modelmeta test suite at some time.) Ready for further review.

rod-glover commented 4 years ago

@jameshiebert , hold off a little while; I thought of a simplification overnight.

rod-glover commented 4 years ago

@jameshiebert , ok, enough tinkering: ready for review.

jameshiebert commented 4 years ago

Looks much better! Thanks for doing another pass over it!