ImperialCollegeLondon / safedata_validator

Python tools to validate and publish datasets using the safedata metadata format.
https://safedata-validator.readthedocs.io/
MIT License
2 stars 4 forks source link

Is taxon_index_to_text() used for anything? #15

Closed jacobcook1995 closed 2 years ago

jacobcook1995 commented 2 years ago

In the taxa.py script the following function is defined: https://github.com/ImperialCollegeLondon/safedata_validator/blob/629fccb99bda005f92fd037f25f42909322bf4db/safedata_validator/taxa.py#L2789 It is then never called by any script within the safedata_validator packages, though maybe it is used by the website or safedata.

zenodo.py defines a similar seeming function: https://github.com/ImperialCollegeLondon/safedata_validator/blob/629fccb99bda005f92fd037f25f42909322bf4db/safedata_validator/zenodo.py#L575

As far as I can make out the two functions have identical functionality aside for the fact that the first function allows text or html to be generated, while the second function only allows hmtl to be generated.

I feel like one function or the other should go, but am not sure which one?

davidorme commented 2 years ago

My mistake - I've solved the same problem twice. I think this belongs in taxa.py - it could applied to any taxon index, and I think the ability to use text as well is worthwhile. Given #18 and #16, we need a strategy to close all 3 issues.

jacobcook1995 commented 2 years ago

Yeah I guess moving the updated functions into taxa.py and restoring their ability to use text makes sense. #18 and #16 definitely require a bit of thought though

jacobcook1995 commented 2 years ago

Closed by #23