Skip to content

Add Files to model. Ignore dotfiles in packages - #503

Merged
pehrsoderman merged 7 commits into
Kattis:masterfrom
gkreitz:374_ignore_dotfiles
Oct 13, 2026
Merged

pehrsoderman merged 7 commits into
Kattis:masterfrom
gkreitz:374_ignore_dotfiles

Conversation

@gkreitz

@gkreitz gkreitz commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

This PR adds a Files class to the model of a problem package, keeping track of what files and directories we consider part of the package. This allows us to follow the updated rule in the standard asking us to ignore files and directories starting with a dot.

In this PR, we also move program discovery from run to model, cleaning up a dependency inversion. That code is moved + adjusted to use Files instead of iterating through directories (git diff --color-moved still gets a bit messy due to using files there).

Files have not yet been plugged into statements, as problem2pdf and problem2html don't use the model (yet), so that's for a future PR.

Ignoring dotfiles properly means we no longer give errors for dotfiles, e.g., editing a file in vim. This fixes the actionable parts of #374.

Fixes #374

@pehrsoderman
pehrsoderman merged commit 549fde0 into Kattis:master Oct 13, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

instructions for running versions of problemtools

2 participants