Closed carueda closed 1 year ago
Hi @carueda thanks for the effort! Looks good to me, should we do it for all the tests before merging into master?
Great, thank @cparcerisas. For all unit tests, I've just pushed a commit with the tests/
prefix for the data location and with the skipping of plotting if the env var PYPAM_TEST_NO_PLOTS
is defined.
At this point, the complete unit testing behaves as in master (with some failures basically as reported here). I'll try to look into them more closely as well as create an initial GitHub CI workflow.
I've added a CI workflow here but will be refining it in a separate branch.
CI workflow in place, only for python 3.9 while we can fix the pending tests (which, as already mentioned, are failing both in current master and in this PR's branch).
@cparcerisas I'm marking this a ready for your review/merge as the changes basically address the title of this PR ;)
I looked at the failing tests and felt not very confident about proceeding with any attempted fixes at this point, so we could look at those in subsequent PRs. Ok?
Thanks @cparcerisas !
Hi @cparcerisas - In a first commit here, I'm just using test_utils as a basis for suggesting some adjustments and possible next steps that could be considered also for other units tests. (PR mainly for discussion purposes at this point ; )
In general, one would expect the unit tests to be run from the root directory. Of course, this is not forced at all, but that's what one would typically find out there for projects regardless of concrete language. So, I adjusted the path to the relevant files here to start from
tests/
.As unit tests per se, also having some plots generated makes a bit difficult if wishing to also be able to run such tests in a CI server (e.g, via a GitHub Actions workflow, which would be nice to incorporate in this project). To reduce changes at this point, the plots in this particular test continue to be generated by default, but one can define the
PYPAM_TEST_NO_PLOTS
environment variable (value doesn't matter) to skip the plotting part.With the adjustments above, one can then run this particular test, including the plots, from the root as follows:
And, without generating the plots:
What do you think?