IPESE / REHO

Master version of the model
Apache License 2.0
6 stars 10 forks source link

[JOSS review] Tests #22

Closed nmstreethran closed 2 weeks ago

nmstreethran commented 5 months ago

https://github.com/openjournals/joss-reviews/issues/6734

JOSS requires:

Automated tests: Are there automated tests or manual steps described so that the functionality of the software can be verified?

Do you have any tests implemented? I can't seem to find them.

DorsanL commented 5 months ago

The file scripts/examples/test_examples.py can be used to run all the examples and check that they are all functional (cf. Checking proper installation paragraph).

At the moment, there is no automated test directly within the package, but I could add some if you consider it relevant?

hgandhi2411 commented 4 months ago

@DorsanL unit tests are a best practice when creating packages and help detect if code is broken when changes are made. So, I would recommend that you add some tests.

nmstreethran commented 4 months ago

I agree that unit tests are needed. The tests don't need to be automated; manual steps to run them are fine. You can have a look at any recent JOSS papers for suggestions, e.g. pyheatdemand.

DorsanL commented 2 months ago

Entry points for test have been added. https://github.com/IPESE/REHO/commit/4a63b03aec4f85ae097582e4bd1ab2c3b5d03e0c

The "Checking proper installation" section of the documentation has been updated accordingly. https://reho.readthedocs.io/en/main/sections/5_Getting_started.html#checking-proper-installation

nmstreethran commented 1 month ago

I still can't seem to find any tests to verify the functionality and methods in the package, e.g. assertion and exception testing. The tests you currently have only seem to check whether the imports work and if the scripts manage to execute. (Please correct me if I'm wrong.)

The pyheatdemand package I linked in my earlier comment has these tests for example: https://github.com/AlexanderJuestel/pyheatdemand/blob/main/test/test_processing.py.

DorsanL commented 1 month ago

I started implementing some functionality tests with pytest (https://github.com/IPESE/REHO/commit/fda9b0ef9b6ff29f01211cc0b6a6e6cb66a8eca9). This is only a draft, I will extend them in the coming days.

DorsanL commented 4 weeks ago

A folder reho/test/ is now part of the package, containing the following files and functionality tests:

Developments have been pushed in https://github.com/IPESE/REHO/commit/254a8bc1476dc9250208d94b6446b4953017c783

nmstreethran commented 2 weeks ago

@DorsanL Thank you for implementing the tests. I think this is now resolved and I'm happy to finalise my review.