-
Notifications
You must be signed in to change notification settings - Fork 20
Allow periods/underscores/non-leading-dashes in files and folders #494
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
base: master
Are you sure you want to change the base?
Conversation
… start of test cases or programs)
Fredrik suggested |
I like that, but it has the potential of being a slightly circular definition, since this implies that spec ignores all dotfiles, which then implies that dotfiles are automatically not relevant to the package. Edit: another question this raises: are there then any dotfiles at all that do affect the package? |
How is that circular? And isn't that what we want? Take |
What is "the behavior of the problem package"? What does it mean for it to "remain the same"? Note for instance that arguably it is possible to add or remove some test cases and submissions without changing "the behavior of the problem package" (the same set of user submissions provably get the same verdict with and without those test cases, etc.) Do we really want to allow dotfile test cases with this property? I couldn't think of any precise way to define these so I went with an explicit rule. |
This implies that the problem package ignores all dotfiles, which then implies this statement itself. Thus, we might as well state But it seems we might want to special-case a few directories where we really do not wany any dotfiles, such as submissions or testcases, which contradicts the above statement. (Well unless you argue that removing Anyway, more direct wording is better. Side note: we used to have a bunch of |
Yeah, this seems to be the most direct way to say what we mean. OTOH, a risk with this is that "dotfiling" now is a way to "comment out" a file, and we don't really want that...
Which directories would this be? And why? |
I think (?) the wording I use was "meaning" or "semantics", rather than behavior, but that it similarly unclear. The intended meaning of this is "removing them changes nothing for how the problem is run or evaluated".
We absolutely don't want that, but I don't think you can do that. Removing or adding a test case clearly (?) changes how a problem is judged. |
Well for instance, a dotfile-testcase that exactly duplicates a non-dotfile-testcase won't change the verdict of any user submission if it is added or removed. I know what you mean---that "how a problem is judged" includes what files the judge implementation reads/executes in the process of determining the verdict, regardless of whether the outcome is affected---but it's not clear how to specify this formally. |
Right. But it does change the running of the problem. I don't think that out definition of "no effect" should be only based on verdict. |
Pushed a revised attempt: now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this formulation.
Co-authored-by: Joshua Bergman Andersson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the small reformulation
Co-authored-by: Jaap Eldering <[email protected]>
@niemela Can we merge this, or discuss remaining issues? |
Added two characters to the regex, based on feedback from judges during problem preparation for the North America Qualifier: |
Nitpick counter-argument: this could potentially lead to issues when these filenames are processed in shell code that doesn't escape things properly and evaluates things as variable names. I guess this is not a strong enough argument though.
Those are backup files, so should never affect the actual problem package, so I'd argue can be excluded with the same reasoning as a leading dot. |
Regarding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at least ~
should be excluded.
I feel like I said this before but I don't see it in this thread here, but I still feel that we're conflating things:
With 1 I'm really fine with whatever, but with 2 it makes sense to be strict (because it's nice to error if there's any files in there that are not recognised by the format). |
The issue is that for judges developing the problem package, there is no difference between (1) and (2). They work in a git repo and pollute the package with all kinds of temporary and development files (that may or may not be filtered out in So if we want a regex that is only checked at installation, I agree that we can go back to something much simpler (we can require that the authors remove all of the .dotfiles; why do we need If we want a regex that is enforced during development (so that authors get early warning that their test case name is non-compliant, etc.) we need it to be lenient enough that they don't get errors from .class files etc. |
Do people typically just zip the directory and upload that? With BAPCtools we pretty much always Does the fact that some metadata files out of our control have |
extend rule for ignoring files and folders to all non-compliant names
Third attempt:
|
Fixes #453
(Based on my interpretation of the consensus there.)