Skip to content

Commit ab550c4

Browse files
committed
update action
1 parent f603c1d commit ab550c4

1 file changed

Lines changed: 12 additions & 33 deletions

File tree

.github/workflows/check_for_new_probes.yml

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
name: Clone, Run Scripts, and Create PR
2-
1+
name: Check for new NP probes
32

43
on:
54
schedule:
6-
- cron: '1 0 * * 1' # Every Monday at 00:00 UTC
5+
- cron: '0 1 * * 1' # Every Monday at 01:00 UTC
76
workflow_dispatch:
87

98
# Grant permissions for the job to write to contents (push) and create PRs.
@@ -15,54 +14,34 @@ jobs:
1514
build-and-pr:
1615
runs-on: ubuntu-latest
1716
steps:
18-
# Step 1: Check out the code in your current (local) repository
19-
# We use a Personal Access Token (PAT) so the action has permission
20-
# to push a new branch and open a pull request.
17+
2118
- name: Check out local repository
2219
uses: actions/checkout@v4
23-
# with:
24-
# # --- USER ACTION REQUIRED ---
25-
# # You MUST create a repository secret named GH_PAT.
26-
# # Go to Settings > Secrets and Variables > Actions > New repository secret
27-
# # The token needs the 'repo' (or 'public_repo') and 'workflow' scopes.
28-
# token: ${{ secrets.GH_PAT }}
2920

30-
# Step 2: Set up a Python environment
21+
# Set up a Python environment
3122
- name: Set up Python
3223
uses: actions/setup-python@v5
3324
with:
34-
python-version: '3.10' # Or your preferred version
25+
python-version: '3.10'
3526
cache: 'pip' # Caches dependencies to speed up future runs
3627

37-
# --- (Optional) ---
38-
# If your local script needs libraries, uncomment this step
39-
- name: Install local dependencies
40-
run: pip install probeinterface matplotlib
41-
42-
# Step 3: Clone the *other* repository into a subfolder named './other-repo'
28+
# Clone dev version of probeinterface
4329
- name: Clone external repository
4430
run: |
4531
# --- USER ACTION REQUIRED ---
4632
# Replace this URL with the repository you want to clone.
4733
# If it's a private repo, your GH_PAT must have access.
4834
git clone https://github.com/spikeinterface/probeinterface ./probeinterface
4935
50-
# --- (Optional) ---
51-
# If the external script needs libraries, uncomment this step
52-
# - name: Install external repo dependencies
53-
# run: pip install -r ./other-repo/requirements.txt
36+
- name: Install probeinterface and matplotlib
37+
run: pip install ./probeinterface matplotlib
5438

55-
# Step 4: Run the Python script from the *external* repository
56-
- name: Run external script
39+
- name: Generate full NP library
5740
run: |
58-
# --- USER ACTION REQUIRED ---
59-
# Replace this path with the correct path to the script
60-
# in the repository you just cloned.
6141
cd scripts/
6242
python ../probeinterface/resources/generate_neuropixels_library.py
6343
64-
# Step 5: Run the Python script from your *local* repository
65-
# This is the script that should modify the files you want to PR.
44+
# Check for any new probes
6645
- name: Run local script
6746
run: |
6847
# --- USER ACTION REQUIRED ---
@@ -86,11 +65,11 @@ jobs:
8665
echo "No changes to commit"
8766
echo "changes=false" >> $GITHUB_OUTPUT
8867
else
89-
git commit -m "Update neuropixels_probe_features from ProbeTable"
68+
git commit -m "Update imec library with new probes"
9069
echo "changes=true" >> $GITHUB_OUTPUT
9170
fi
9271
93-
- name: Update imec library with new probes
72+
- name: Create pull request to add probes
9473
if: steps.commit.outputs.changes == 'true'
9574
uses: peter-evans/create-pull-request@v7
9675
with:

0 commit comments

Comments
 (0)