dspinellis / alexandria3k

Local relational access to openly-available publication data sets
GNU General Public License v3.0
79 stars 14 forks source link

Add initial tests for the datacite module #48

Closed evgepab closed 1 month ago

evgepab commented 1 month ago

SInce FileCache.file_reads wasn't applicable, in some cases I used SELECT DISTINCT container_id FROM dc_works, since each container corresponds to a file. However, one thought was to create a file_tar_cache.py or datacite_tar_cache.py in order to be able to test if the files are always being read properly similarly to the other modules. Do you find this excessive or necessary?

dspinellis commented 1 month ago

SInce FileCache.file_reads wasn't applicable, in some cases I used SELECT DISTINCT container_id FROM dc_works, since each container corresponds to a file. However, one thought was to create a file_tar_cache.py or datacite_tar_cache.py in order to be able to test if the files are always being read properly similarly to the other modules. Do you find this excessive or necessary?

No need for additional caching or verification is needed. Tests don't need to ape the ones of other modules. Use those as guidance on how to implement them, but focus on exercising the functionality of the DataCite code.

dspinellis commented 1 month ago

I merged this, even though it doesn't pass lint to simplify your work and allow you to move forward.