Skip to content

Commit 2bc00c9

Browse files
Dev precommit update testfile (#357)
* adding pre commit config * updating pre commit to remove sensitive file * updating news d
1 parent 560f08f commit 2bc00c9

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

.pre-commit-config.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,20 @@ repos:
4242
language: fail
4343
files: '\.(Rhistory|RData|Rds|rds)$'
4444
exclude: '^tests/testthat/data/.*\.rds$'
45-
# `exclude: <regex>` to allow committing specific files
45+
- id: block-test-parquet
46+
name: Block specific test.parquet file
47+
entry: |
48+
bash -c '
49+
if git diff --cached --name-only | grep -q "tests/testthat/data/2025-04-02_test.parquet"; then
50+
echo "ERROR: tests/testthat/data/2025-04-02_test.parquet is blocked from being committed"
51+
echo " Please remove this file from your commit with: "
52+
echo " git reset HEAD tests/testthat/data/2025-04-02_test.parquet"
53+
exit 1
54+
fi'
55+
language: system
56+
pass_filenames: false
57+
always_run: true
58+
4659
# Secrets
4760
- repo: https://github.com/Yelp/detect-secrets
4861
rev: v1.5.0

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# CFAEpiNow2Pipeline v0.2.0
22

33
## Features
4+
* Updating pre-commit to block specific test.parquet file
45
* Scheduling `make run-prod` on Github Actions Wednesdays at 8 AM ET
56
* Adds facility active proportion information for config runs and re-runs
67
* Removing test data in test-exclusions

0 commit comments

Comments
 (0)