Skip to content
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

v1.3.1 #289

Merged
merged 6 commits into from
Nov 13, 2024
Merged

v1.3.1 #289

merged 6 commits into from
Nov 13, 2024

Conversation

vincerubinetti
Copy link
Collaborator

@vincerubinetti vincerubinetti commented Nov 7, 2024

Closes #288
Closes #287
Closes #285

New template version checklist:

  • I have updated CITATION and CHANGELOG as appropriate.
  • I have updated lab-website-template-docs as appropriate.
  • I have checked the testbed as appropriate.

  • use latest major version of setup-ruby gh-action
  • run "commit cache" step if citations step fails so that progress (successful citations) will be saved
  • replace xml_escape filter with appropriate escapes for each situation, and slightly modify regex_strip filter to allow some basic punctuation

@vincerubinetti vincerubinetti changed the title V1.3.1 v1.3.1 Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-11-13 22:56 UTC

@vincerubinetti
Copy link
Collaborator Author

Still testing the commit cache step on a personal repo. It doesn't seem to be detecting any change to the cache.

@vincerubinetti
Copy link
Collaborator Author

vincerubinetti commented Nov 11, 2024

For now, I've just removed the /.cache ignoring from .gitignore. I've asked a question here: stefanzweifel/git-auto-commit-action#351

But the very first example block of code I give there is actually a lie. I've never seen the diskcache package I'm using create any file other than cache.db in that folder, so it's not really an issue. I originally put those lines in the gitignore just in case it did, to keep the repo clean. But realistically I've never seen it happen.

@falquaddoomi
Copy link
Contributor

falquaddoomi commented Nov 13, 2024

FWIW, the problem with your .gitignore is that you've ignored the .cache folder so Git doesn't process the !cache.db directive, since it's at the file level and the folder's already been ignored. You can read more about the behavior here: https://git-scm.com/docs/gitignore, specifically this part regarding the ! operator:

An optional prefix "!" which negates the pattern; any matching file excluded by a previous pattern will become included again. It is not possible to re-include a file if a parent directory of that file is excluded.

You can make the un-ignore more specific by specifying its parent folder with it, i.e. !.cache/cache.db, so that it becomes a path-level directive and can successfully override the ignore of .cache.

I think just omitting .cache from your gitignore is fine, since as you said you only ever see a file that you actually want included in there, but I thought you might be curious how to fix it for other cases.

EDIT: Well, never mind; after telling you that, I tested it and it didn't work. Changing .cache from a folder-level ignore to .cache/*, a file-level ignore, and then un-ignoring cache.db via !cache.db did work for me, though. So, in total, this should do what you want:

.cache/*
!cache.db

Copy link
Contributor

@falquaddoomi falquaddoomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me; nice to see you using specific escape functions for specific cases, as that'll definitely be more robust and require less work when it's time to unescape it.

@vincerubinetti vincerubinetti merged commit 2849c60 into main Nov 13, 2024
4 checks passed
@vincerubinetti vincerubinetti deleted the v1.3.1 branch November 13, 2024 22:54
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.

Use better escape filters Always commit citation cache Update ruby/setup-ruby action
2 participants