Conversation
The _vcs module import _git only if a '.git' file is found in the current directory. Otherwise, it provides implementations that operates on the local files only.
7a5649d to
16b7895
Compare
|
Thanks, Christophe for the PR. I would love to see support for HG in In order to merge this PR, it's critical to have all the tests succesfully executed and all new code to be covered by tests. We still support Python 3.8 and Python 3.9 We can remove support for 3.8 ... but in a separate PR. And if supporting Python 3.9 is too much effort, we can also consider removing support for Python 3.9 mypy checkes are part of our standard tests |
|
yep, I am working on getting the tests to pass. The type checking part is a little more problematic for me, but I will find a way. |
|
Thanks for following up with the tests Just a reminder... if supporting Python 3.8 is too hard, we can remove support for it.
Don't worry too much. Just ask for help and we can see how we can fix the mypy part. Thanks again! |
16b7895 to
47becf3
Compare
47becf3 to
36740da
Compare
0678c35 to
f0a27f3
Compare
|
I think the tests and typing are good now, but the tests on Windows fail for an unknown reason. Since I have no easy access to a windows computer, I would be glad if someone could have a look. Thanks! |
|
Thanks for the PR... I only did a quick review. I hope you can fix the Windows issue and then we can get a report for the code coverage. Having good test coverage for the Mergurial code is the only way to guarantee that we will not break hg support in future releases Thanks again! Great job here! |
|
You can get access to GitHub VMs using tmate |
eacfb7a to
581b325
Compare
|
I made a good guess and voilà, the tests pass on all platforms! I will follow your review recommendations shortly, and it should be good. |
581b325 to
58c89d8
Compare
f53b6d2 to
bb102ca
Compare
|
I added comments to match your review recommendations (thanks!). Note that the mercurial tests only test the _hg module itself. No full stack scenario run on a mercurial repository. So the tests are good as long as no change is done to the _vcs API. One thing I will do is adding a test for _vcs that agnostically tests all the possible vcs, which will ensure all the provided vcs are up-to-date. Then we should be good for merging. |
|
Just asking Do we want to support using towncrier without a VCS ? It would be nice to have at least a few end to end tests for The As an initial support I think that the test coverage in this PR is good enough ... is not perfect... but If defects are found in I added a review from Copilot, just as a double check...and to test how good AI can be. thanks again for the updates |
There was a problem hiding this comment.
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Files not reviewed (1)
- src/towncrier/newsfragments/394.feature.rst: Language not supported
Comments suppressed due to low confidence (1)
src/towncrier/_git.py:31
- The removal of the try-except block around the check_output call in remove_files may cause the function to fail in non-Git repositories. Consider reintroducing exception handling (for example, using a try-except block to catch CalledProcessError) to ensure graceful failure.
git_fragments = check_output(["git", "ls-files"] + fragment_filenames, encoding="utf-8").split("\n")
|
In real life the 'without a VCS' case is more likely to be a 'with unsupported VCS', or testing towncrier in a non-versioned directory before adopting it. In the later case I find it more friendly not to throw errors at a potential adopter's face. I added the test I mentioned. On my side it's all good. Thanks for the time spent on my contribution! |
This test is runned on all the known vcs, so they all remain up-to-date.
0ef7ea9 to
7a9a6a5
Compare
|
Oh and of course don't hesitate to ping me if some mercurial related issues come up. |
Co-authored-by: Adi Roiban <[email protected]>
e477606 to
a706bcf
Compare
|
Thanks for the update. People can then use towncrier with I think that the current code is a solid foundation. |
Description
Fixes #394
Add support for mercurial repositories.