Skip to content

Commit 2ad67a5

Browse files
authored
Merge branch 'master' into spikes-in-nev-2.3
2 parents a2ca303 + dbd2482 commit 2ad67a5

File tree

340 files changed

+54755
-21801
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+54755
-21801
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us fix problems
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behaviour, preferably providing a simple code example (if the error happens in the middle of some complex code, please try to find a simpler, minimal example that demonstrates the error), and showing the full traceback.
15+
16+
If the error occurs when reading a file that you can't share publicly, please let us know, and we'll get in touch to discuss sharing it privately.
17+
18+
**Expected behaviour**
19+
If the bug is incorrect behaviour, rather than an unexpected Exception, please give a clear and concise description of what you expected to happen.
20+
21+
**Environment:**
22+
- OS: [e.g. macOS, Linux, Windows]
23+
- Python version
24+
- Neo version
25+
- NumPy version
26+
27+
**Additional context**
28+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Confusing documentation
3+
about: Let us know if the documentation is confusing or incorrect
4+
title: ''
5+
labels: Documentation
6+
assignees: ''
7+
8+
---
9+
10+
**Which page is the problem on?**
11+
The URL of the documentation page where the problem is, and either copy-paste the confusing text (for a short section of text), or give the first few and last few words (for a long section).
12+
13+
**What is the problem?**
14+
Is the documentation (a) confusing or (b) incorrect? In what way?
15+
16+
**Suggestions for fixing the problem**
17+
If the documentation is confusing, can you suggest an improvement? If the documentation is incorrect, what should it say instead?
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea to improve Neo
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Black formatting
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 12 * * 0" # Weekly at noon UTC on Sundays
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Check black formatting
16+
id: black-check
17+
uses: psf/black@stable
18+
with:
19+
options: "--check --verbose"
20+
continue-on-error: true
21+
22+
- name: Apply black formatting
23+
id: black-apply
24+
uses: psf/black@stable
25+
if : ${{ steps.black-check.outcome == 'failure' }}
26+
with:
27+
options: "--verbose"
28+
29+
- name: Create PR
30+
uses: peter-evans/create-pull-request@v5
31+
if : ${{ steps.black-check.outcome == 'failure' }}
32+
with:
33+
commit-message: black formatting
34+
title: Black formatting
35+
body: Reformatting code with black style
36+
branch: black-formatting
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Create caches for ephy_testing_data and conda env
2+
3+
on:
4+
workflow_dispatch: # Workflow can be triggered manually via GH actions webinterface
5+
push: # When something is pushed into master this checks if caches need to re-created
6+
branches:
7+
- master
8+
schedule:
9+
- cron: "0 12 * * *" # Daily at noon UTC
10+
11+
jobs:
12+
13+
create-conda-env-cache-if-missing:
14+
name: Caching conda env
15+
runs-on: "ubuntu-latest"
16+
strategy:
17+
fail-fast: true
18+
defaults:
19+
# by default run in bash mode (required for conda usage)
20+
run:
21+
shell: bash -l {0}
22+
steps:
23+
- uses: actions/checkout@v3
24+
25+
- name: Get current year-month
26+
id: date
27+
run: |
28+
echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
29+
30+
- name: Get current dependencies hash
31+
id: dependencies
32+
run: |
33+
echo "hash=${{hashFiles('**/pyproject.toml', '**/environment_testing.yml')}}" >> $GITHUB_OUTPUT
34+
35+
- uses: actions/cache@v3
36+
# the cache for python package is reset:
37+
# * every month
38+
# * when package dependencies change
39+
id: cache-conda-env
40+
with:
41+
path: /usr/share/miniconda/envs/neo-test-env
42+
key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }}
43+
44+
- name: Cache found?
45+
run: echo "Cache-hit == ${{steps.cache-conda-env.outputs.cache-hit == 'true'}}"
46+
47+
# activate environment if not restored from cache
48+
- uses: conda-incubator/[email protected]
49+
if: steps.cache-conda-env.outputs.cache-hit != 'true'
50+
with:
51+
activate-environment: neo-test-env
52+
environment-file: environment_testing.yml
53+
python-version: 3.9
54+
55+
- name: Create the conda environment to be cached
56+
if: steps.cache-conda-env.outputs.cache-hit != 'true'
57+
# create conda env, configure git and install pip, neo and test dependencies from master
58+
# for PRs that change dependencies, this environment will be updated in the test workflow
59+
run: |
60+
git config --global user.email "neo_ci@fake_mail.com"
61+
git config --global user.name "neo CI"
62+
python -m pip install -U pip # Official recommended way
63+
pip install --upgrade -e .[test]
64+
65+
create-data-cache-if-missing:
66+
name: Caching data env
67+
runs-on: "ubuntu-latest"
68+
steps:
69+
70+
- name: Get current hash (SHA) of the ephy_testing_data repo
71+
id: ephy_testing_data
72+
run: |
73+
echo "dataset_hash=$(git ls-remote https://gin.g-node.org/NeuralEnsemble/ephy_testing_data.git HEAD | cut -f1)" >> $GITHUB_OUTPUT
74+
75+
- uses: actions/cache@v3
76+
# Loading cache of ephys_testing_dataset
77+
id: cache-datasets
78+
with:
79+
path: ~/ephy_testing_data
80+
key: ${{ runner.os }}-datasets-${{ steps.ephy_testing_data.outputs.dataset_hash }}
81+
82+
- name: Cache found?
83+
run: echo "Cache-hit == ${{steps.cache-datasets.outputs.cache-hit == 'true'}}"
84+
85+
- name: Installing datalad and git-annex
86+
if: steps.cache-datasets.outputs.cache-hit != 'true'
87+
run: |
88+
git config --global user.email "neo_ci@fake_mail.com"
89+
git config --global user.name "neo CI"
90+
python -m pip install -U pip # Official recommended way
91+
pip install datalad-installer
92+
datalad-installer --sudo ok git-annex --method datalad/packages
93+
pip install datalad
94+
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
95+
96+
- name: Download dataset
97+
if: steps.cache-datasets.outputs.cache-hit != 'true'
98+
# Download repository and also fetch data
99+
run: |
100+
cd ~
101+
datalad install --recursive --get-data https://gin.g-node.org/NeuralEnsemble/ephy_testing_data
102+
103+
- name: Show size of the cache to assert data is downloaded
104+
run: |
105+
cd ~
106+
pwd
107+
du -hs ephy_testing_data
108+
cd ephy_testing_data
109+
pwd

.github/workflows/core-test.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ on:
44
pull_request:
55
branches: [master]
66
types: [synchronize, opened, reopened, ready_for_review]
7+
paths:
8+
- 'neo/core/**'
9+
- 'pyproject.toml'
10+
- '.github/workflows/*.yml'
711

812
# run checks on any change of master, including merge of PRs
913
push:
1014
branches: [master]
1115

12-
16+
concurrency: # Cancel previous workflows on the same pull request
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
1319

1420
jobs:
1521
multi-os-python-numpy:
@@ -20,27 +26,25 @@ jobs:
2026
matrix:
2127
os: ["ubuntu-latest", "windows-latest"]
2228
# "macos-latest",
23-
python-version: ['3.7', '3.8', '3.9', '3.10']
24-
numpy-version: ['1.18.5', '1.19.5', '1.20.3', '1.21.6', '1.22.4', '1.23.0']
29+
python-version: ['3.9', '3.10', '3.11', '3.12']
30+
numpy-version: ['1.22.4', '1.23.5', '1.24.1', '1.25.1', '1.26.4']
2531
exclude:
26-
- python-version: '3.7'
32+
- python-version: '3.12'
2733
numpy-version: '1.22.4'
28-
- python-version: '3.7'
29-
numpy-version: '1.23.0'
30-
- python-version: '3.10'
31-
numpy-version: '1.18.5'
32-
- python-version: '3.10'
33-
numpy-version: '1.19.5'
34-
- python-version: '3.10'
35-
numpy-version: '1.20.3'
34+
- python-version: '3.12'
35+
numpy-version: '1.23.5'
36+
- python-version: '3.12'
37+
numpy-version: '1.24.1'
38+
- python-version: '3.12'
39+
numpy-version: '1.25.1'
3640
steps:
3741
- name: Set up Python ${{ matrix.python-version }}
38-
uses: actions/setup-python@v2
42+
uses: actions/setup-python@v4
3943
with:
4044
python-version: ${{ matrix.python-version }}
4145

4246
- name: Checkout repository
43-
uses: actions/checkout@v2
47+
uses: actions/checkout@v3
4448

4549
- name: Install numpy ${{ matrix.numpy-version }}
4650
run: |

.github/workflows/ebrains.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Mirror to EBRAINS
2+
3+
# Configure the events that are going to trigger tha automated update of the mirror
4+
on:
5+
push:
6+
branches: [ master ]
7+
8+
# Configure what will be updated
9+
jobs:
10+
# set the job name
11+
to_ebrains:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# this task will push the master branch of the source_repo (github) to the
15+
# destination_repo (ebrains gitlab)
16+
- name: syncmaster
17+
uses: wei/git-sync@v3
18+
with:
19+
source_repo: https://github.com/NeuralEnsemble/python-neo
20+
source_branch: "master"
21+
destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/NeuralEnsemble/neo.git"
22+
destination_branch: "main"
23+
# this task will push all tags from the source_repo to the destination_repo
24+
- name: synctags
25+
uses: wei/git-sync@v3
26+
with:
27+
source_repo: https://github.com/NeuralEnsemble/python-neo
28+
source_branch: "refs/tags/*"
29+
destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/NeuralEnsemble/neo.git"
30+
destination_branch: "refs/tags/*"

0 commit comments

Comments
 (0)