SETI / rms-pdsfile

pdsfile Python module
Apache License 2.0
0 stars 0 forks source link

PdsFile.log_path_for_index uses is_index improperly #47

Open rfrenchseti opened 3 months ago

rfrenchseti commented 3 months ago

The function PdsFile.log_path_for_index uses the is_index function to determine if the current file is an index, and that function looks for a file in the _indexshelf directory hierarchy. But this function is used by the maintenance tools to decide if an index should be created in the first place, so there won't be such a file, and no file will be considered to be an index.

I'm not actually sure why any of these functions: set_log_root, log_path_for_volume, log_path_for_volset, log_path_for_index should be in PdsFile in the first place, since they are only used by the maintenance tools. I think we should split these out into a utility module used only by those tools.

@markshowalter has asked to fix the primary bug. Once that's done we can discuss further refactoring and perhaps open a new issue for that task.

rfrenchseti commented 2 months ago

The is_index issue was fixed as part of #48 but there's still the question of whether these functions should be here at all. Downgrading the priority to look at sometime in the future.