-
Notifications
You must be signed in to change notification settings - Fork 165
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
Further standardize the layout and packaging #271
Comments
Some of the things I had in mind include
Let me know if any of that looks like it wouldn't be useful. |
There are users who prefer to use sacrebleu without installation like git clone https://github.com/mjpost/sacrebleu
./sacrebleu/sacrebleu/sacrebleu.py [...] So these users will need to switch to
|
It was. I don't know the full history, and honestly it took me a while to get used to having the extra directory there. This isn't the most important change, so we could skip it, especially if you have users who regularly use sacrebleu from a source repo instead of package.
Tox would manage a virtualenv with sacrebleu and its dependencies, then run whatever commands are needed to test that code. Both pytest and test.sh could be run through tox. The main benefit is ensuring you're testing with the right dependencies without having to manually set up those dependencies, but it also provides a nice layer to describe various test scenarios that have to be completely independent. The linter and runtime dependencies don't have to be installed into the same virtualenv, for example. For most of my python projects, I use tox.ini in the way you're using Makefile, to provide a documented set of steps for running a task related to maintaining the project.
Ah, yeah, you have "dev" already, which is effectively the same thing. The name "test" is a common standard. I usually have "test" and leave the build and linter dependencies to either tox or the GitHub action definition. |
I've been trying to keep this change as small as possible, but there seem to be a few non-standard things about the layout and packaging of the source tree. I could go all in and fix all that, if you're interested? I don't want to overstep, though.
Originally posted by @dhellmann in #270 (comment)
The text was updated successfully, but these errors were encountered: