GSoC 2019 [Collect build statistics]

Mojca Miklavec mojca at macports.org
Mon Apr 15 16:16:41 UTC 2019


Dear Arjun,

I'll answer individual questions & provide further suggestion separately.

Given the current state of the app with sufficient complexity, I
believe that it would be wise to introduce some unit tests to be able
to extensively test what happens with data you import, and to prevent
/ detect any breakages in the future.

Some example of a unit test: prepare a small number (for example four)
super simple ports (just enough to make them valid, they could be
simply called portA, portB, portC, portD), add various made-up
maintainers; you may use one github handle with different or missing
email addresses in different ports, or one email address with various
or missing github handles ... Then run portindex, portindex2json,
store the json file, let the unit test import the data into an empty
database, and verify that the database contains exactly the entries
you wanted there. (OK, for the first unit test just one port with
simple valid data. Then something more complicated.)

You could also try to check if you can manage to "dockerize" the
solution (lower priority).

Mojca


More information about the macports-dev mailing list