filetags icon indicating copy to clipboard operation
filetags copied to clipboard

Skip directory emptiness check for known tagtrees directories

Open MyFedora opened this issue 2 years ago • 5 comments

Fixes #55

MyFedora avatar Jul 25 '23 22:07 MyFedora

This makes sense to me.

However, in order to maintain conistency, I'd rename ".filetag_tagtrees" to ".filetags_tagtrees".

Would you modify your pull-request accordingly? I could not find out how to make the change myself ...

novoid avatar Jul 31 '23 12:07 novoid

Sure, I renamed the files accordingly. I also re-added the options.tagtrees_directory condition to ensure that existing users don't have to create a .filetags_tagtrees file manually, oops.

MyFedora avatar Aug 01 '23 16:08 MyFedora

Allowing edits by maintainers If checked, users with write access to novoid/filetags can add new commits to your fix/directory-emptiness-check branch. You can always change this setting later.

I think you'd have to use my fork to make any changes yourself.

MyFedora avatar Aug 01 '23 17:08 MyFedora

I'm writing unit tests for this change, but tests for this are rather flaky. generate_tagtrees always assumes that the directory parameter is the default directory in the test environment. assert_empty_tagfilter_directory skips the check for the default directory based on options.tagtrees_directory, but the tests never set any cli options. generate_tagtrees relies on assert_empty_tagfilter_directory, hence flaky tests.

I'll probably replace the options dependency with a check for the real default directory or smth, not quite sure yet.

MyFedora avatar Aug 01 '23 19:08 MyFedora

I read #42 and wonder whether I should incorporate that into this PR. I'd be weird to create a .filetags-tagtrees file for tagtrees and tagfilters when there's an issue that expects separate files for each in my opinion.

MyFedora avatar Aug 03 '23 06:08 MyFedora