-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix subdirectory tagging #282
Fix subdirectory tagging #282
Conversation
Is this something that we could easily add a test for? Or would that be a big effort? |
I am not sure how I would easily add a test for it, to be honest. Any test would probably need to go into TagBot/test/action/test_repo.py Lines 209 to 226 in 7ac5878
What is hard to mock, however, is the _git.command(...) . I checked other functions that directly run git commands, and, e.g., _versions_clone is also not tested explicitly as far as I can tell (since it would require a mock git repo somewhere with all the right ingredients. Beside this call to git, there is not really much else that could be checked.
Do have any other suggestions? |
No, I am unfortunately not familiar with the code either, but I totally believe it's hard to test. In that case since the feature is totally broken currently I think it makes sense to fix it still without adding a test. However it would be great if someone more familiar w/ the code could give it a review. |
@christopher-dG it would be great if you could review this. I tested the code manually with our repo that originally caused this error to surface, and it seems like everything has been fixed. As stated above, adding tests for this is hard, since we would have to mock an entire git repo. |
Seems good 👍 |
Thanks a lot for for bearing with me, with TagBot v1.16.1 we finally have our first successful, TagBot-created release for the subdirectory package LibTrixi.jl (which is part of https://github.com/trixi-framework/libtrixi). |
Awesome! FYI, you can now configure Documenter to build stable docs based on tag prefixes, if you want to: https://documenter.juliadocs.org/dev/man/hosting/#Deploying-from-a-monorepo (another subdir feature thanks to @hannahilea!). Although I see you aren't using prefixes on your tags, so maybe that's irrelevant in this case. |
You're right, we don't use prefixes, but thanks for letting me know 👍 |
Fixes #281.
Note that this uses the suggestion by @ericphanson in #281 (comment) to proceed with tagging if the corresponding commit could be identified from the registry PR and if the subdirectory hash of that commit matches the Julia package version tree hash.
cc @bgeihe