GEUS-Glaciology-and-Climate / pypromice

Process AWS data from L0 (raw logger) through Lx (end user)
https://pypromice.readthedocs.io
GNU General Public License v2.0
12 stars 4 forks source link

Feature/restructure tests #265

Open ladsmund opened 4 days ago

ladsmund commented 4 days ago

Refactored and Organized Test Modules

This comprehensive refactoring improves project organization by clearly separating test code from application code. It facilitates easier test discovery and enhances maintainability by following common best practices.

PennyHow commented 2 days ago

Why is the test module outside of src/pypromice? I would have thought it would be better to be inside pypromice and distributed with the package so that users can also test their installations (and we can test installations on new instances).

PennyHow commented 2 days ago

I've just opened a PR to this branch #'270, just to update the function naming conventions in e2e.

ladsmund commented 2 days ago

Why is the test module outside of src/pypromice? I would have thought it would be better to be inside pypromice and distributed with the package so that users can also test their installations (and we can test installations on new instances).

The tests are located outside the package to maintain a clear separation of concerns. This way, the pypromice package is solely focused on functionalities intended for production and end-users. The tests, run during continuous integration (CI), ensure that the distributed package works as intended. This approach also reduces the package size by excluding test code and data. I understand your point about using tests to verify an installation. The CI script is designed to test scenarios where pypromice is installed in a new environment, addressing this concern.

I am open for discussion, but these are my current thoughts.

PennyHow commented 2 days ago

This approach also reduces the package size by excluding test code and data.

I thought the test datasets were pretty light-weight, so do not make the package particularly bulky.

I understand your point about using tests to verify an installation.

I think this will be useful (to us, and general users) especially now we have the bufr processing tests in here, as the eccodes bindings can sometimes not install correctly. Running the unit tests within the pypromice installation in say, a docker image, would be really useful.

Let's discuss more next time we talk