Skip to content

Commit

Permalink
Merge branch 'master' into enh/add_caching_action
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz-Alexander-Kern authored Apr 25, 2024
2 parents 6b1e55f + 7d85845 commit eed9062
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 51 deletions.
95 changes: 47 additions & 48 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ jobs:
- name: Get current year-month
id: date
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT

- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3

Expand All @@ -87,7 +92,7 @@ jobs:
- name: Cache test_env
uses: actions/cache@v3
with:
path: /home/runner/.cache/pip
path: ${{ steps.pip-cache.outputs.dir }}
# Look to see if there is a cache hit for the corresponding requirements files
# cache will be reset on changes to any requirements or every month
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements-tests.txt') }}
Expand All @@ -98,10 +103,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install coveralls
pip install -r requirements/requirements-tests.txt
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-extras.txt
pip install -e .
pip install -e .[extras,tests]
- name: List packages
run: |
Expand Down Expand Up @@ -130,7 +132,7 @@ jobs:
matrix:
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [macos-11,macos-12]
python-version: [3.9]
python-version: [3.11]
steps:
- name: Get current year-month
id: date
Expand Down Expand Up @@ -158,9 +160,7 @@ jobs:
shell: bash -l {0}
run: |
python --version
mamba install mpi4py openmpi
mamba install pytest
mamba install pytest-cov coveralls
mamba install pytest pytest-cov coveralls
pip install -e .[extras]
- name: List packages
Expand All @@ -187,25 +187,17 @@ jobs:
strategy:
matrix:
# python versions for elephant: [3.8, 3.9, 3.10, 3.11]
python-version: [3.8,]
python-version: [3.11,]
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [windows-latest]
include:
# - os: ubuntu-latest
# path: ~/.cache/pip
# - os: macos-latest
# path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
# do not cancel all in-progress jobs if any matrix job fails
fail-fast: false

steps:
- name: Get current year-month
id: date
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT

- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -214,19 +206,16 @@ jobs:
- name: Cache pip
uses: actions/cache@v3
with:
path: ${{ matrix.path }}
path: ~\AppData\Local\pip\Cache
# Look to see if there is a cache hit for the corresponding requirements files
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements-tests.txt') }}
-${{ hashFiles('**/requirements-extras.txt') }}-${{ hashFiles('setup.py') }} -${{ hashFiles('**/CI.yml') }}-${{ steps.date.outputs.date }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/requirements-tests.txt
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-extras.txt
pip install pytest-cov coveralls
pip install -e .
pip install -e .[extras,tests]
- name: List packages
run: |
Expand Down Expand Up @@ -267,11 +256,16 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache test_env
uses: actions/cache@v3
with:
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements files
path: ${{ steps.pip-cache.outputs.dir }}
# look to see if there is a cache hit for the corresponding requirements files
# cache will be reset on changes to any requirements or every month
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/requirements-tests.txt') }}
-${{ hashFiles('**/requirements-extras.txt') }}-${{ hashFiles('setup.py') }} -${{ hashFiles('**/CI.yml') }}-${{ steps.date.outputs.date }}
Expand All @@ -283,12 +277,8 @@ jobs:
python -m pip install --upgrade pip
pip install mpi4py
pip install coveralls
pip install -r requirements/requirements-tests.txt
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-extras.txt
pip install pytest-cov coveralls
pip install -e .
pip install -e .[extras,tests]
- name: List packages
run: |
Expand All @@ -313,26 +303,37 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# python versions for elephant: [3.8, 3.9, 3.10, 3.11]
python-version: [3.11]
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]

# do not cancel all in-progress jobs if any matrix job fails
fail-fast: false

steps:
- name: Get current year-month
id: date
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_OUTPUT

- uses: actions/checkout@v3

- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
path: ${{ steps.pip-cache.outputs.dir }}

key: ${{ runner.os }}-pip-${{hashFiles('requirements/environment-tests.yml') }}-${{ hashFiles('**/CI.yml') }}-${{ steps.date.outputs.date }}

- uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # corresponds to v3.0.3
with:
auto-update-conda: true
python-version: 3.11
python-version: ${{ matrix.python-version }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
Expand All @@ -344,8 +345,7 @@ jobs:
run: |
python --version
conda install mpi4py openmpi
mamba install pytest
mamba install pytest-cov coveralls
mamba install pytest pytest-cov coveralls
pip install -e .
- name: List packages
Expand All @@ -372,6 +372,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# python versions for elephant: [3.8, 3.9, 3.10, 3.11, 3.12]
python-version: [3.12]
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]

Expand All @@ -383,18 +385,23 @@ jobs:

- uses: actions/checkout@v3

- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
path: ${{ steps.pip-cache.outputs.dir }}
# Look to see if there is a cache hit for the corresponding requirements files
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-docs.txt') }}-${{ hashFiles('**/requirements-tutorials.txt') }}-${{ hashFiles('**/environment-docs.yml') }}
-${{ hashFiles('**/CI.yml') }}-${{ steps.date.outputs.date }}

- uses: conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # corresponds to v3.0.3
with:
auto-update-conda: true
python-version: 3.11
python-version: ${{ matrix.python-version }}
mamba-version: "*"
activate-environment: elephant
environment-file: requirements/environment.yml
Expand All @@ -408,9 +415,7 @@ jobs:
conda install -c conda-forge openmpi pandoc libstdcxx-ng # fix libstdc++.so.6: version for new scipy versions > 1.9.1
mamba env update --file requirements/environment-docs.yml --name elephant
python -m pip install --upgrade pip
pip install -r requirements/requirements-docs.txt
pip install -r requirements/requirements-tutorials.txt
pip install -e .[extras]
pip install -e .[extras,tutorials,docs]
# run notebooks
sed -i -E "s/nbsphinx_execute *=.*/nbsphinx_execute = 'always'/g" doc/conf.py
Expand Down Expand Up @@ -438,9 +443,6 @@ jobs:
# OS [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]

# do not cancel all in-progress jobs if any matrix job fails
fail-fast: false

steps:
# used to reset cache every month
- name: Get current year-month
Expand All @@ -449,7 +451,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -472,11 +474,8 @@ jobs:
python -m pip install --upgrade pip
pip install mpi4py
pip install -r requirements/requirements-tests.txt
pip install -r requirements/requirements.txt
pip install -r requirements/requirements-extras.txt
pip install pytest-cov coveralls
pip install -e .
pip install -e .[extras,tests]
- name: List packages
run: |
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"license": "https://spdx.org/licenses/BSD-3-Clause",
"codeRepository": "git+https://github.com/NeuralEnsemble/elephant.git",
"contIntegration": "https://github.com/NeuralEnsemble/elephant/actions",
"dateCreated": "2013-17-15",
"dateCreated": "2022-03-14",
"datePublished": "2015-04-08",
"dateModified": "2024-19-03",
"dateModified": "2024-03-19",
"downloadUrl": "https://files.pythonhosted.org/packages/cb/b5/893fadd5505e638a4c8788bf0a2f5a211f59f45203f3dfa3919469e83ed4/elephant-1.0.0.tar.gz",
"issueTracker": "https://github.com/NeuralEnsemble/elephant/issues",
"name": "Elephant",
Expand Down
2 changes: 1 addition & 1 deletion elephant/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0b1
1.2.0b1

0 comments on commit eed9062

Please sign in to comment.