Skip to content

Commit

Permalink
Merge branch 'master' into djs/new_operation_for_SP
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanshs authored Jun 27, 2024
2 parents 1f6a661 + d494e16 commit fe70c72
Show file tree
Hide file tree
Showing 311 changed files with 22,652 additions and 2,845 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If applicable, add screenshots to help explain your problem.
- For mac OS, please specify which BLAS library (OpenBLAS or Accelerate) you use to
install the `mrsimulator` library. This point is only applicable if you installed
the `mrsimulator` library from the source code.
- Python version: [e.g. 3.7.1]
- Python version: [e.g. 3.10.1]
- `mrsimulator` version: [e.g. 0.3]

**Additional context**
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -41,7 +41,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -55,4 +55,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
142 changes: 84 additions & 58 deletions .github/workflows/continuous-integration-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ on:
pull_request:
branches: [master, 'v?.?*']

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
code_lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: ["3.10"]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -36,36 +40,64 @@ jobs:
testing_unix:
needs: [code_lint]
runs-on: "ubuntu-latest"
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
runs-on: ${{ matrix.os }}
python-version: [3.9, "3.10", "3.11", "3.12"]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Install linux system dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install --yes libopenblas-dev libfftw3-dev
gcc -v
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install -r requirements-dev.txt
- name: Build and install package from source
run: python setup.py develop

- name: Test with pytest
run: pytest --cov=./ --cov-report=xml

- name: Upload coverage
uses: codecov/codecov-action@v4.5.0

testing_mac_arm:
needs: [code_lint]
runs-on: "macos-latest"
strategy:
matrix:
python-version: [3.9, "3.10", "3.11", "3.12"]

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install macos system dependencies
if: startsWith(matrix.os, 'mac')
run: brew install openblas fftw

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest cython setuptools pytest-cov sympy sybil
pip install -r requirements.txt
pip install setuptools
pip install -r requirements-dev.txt
- name: Build and install package from source
run: python setup.py develop
Expand All @@ -74,60 +106,54 @@ jobs:
run: pytest --cov=./ --cov-report=xml

- name: Upload coverage
uses: codecov/codecov-action@v3.1.4

# build_windows_test:
# needs: [code_lint]
# strategy:
# matrix:
# os: ["windows-latest"]
# python-version: [3.6, 3.7]
# runs-on: ${{ matrix.os }}

# env:
# LIB: "C:\\Miniconda\\Library\\lib"
# INCLUDE: "C:\\Miniconda\\Library\\include;C:\\Miniconda\\Library\\include\\openblas"
# MRSIM_LIB: "C:\\Miniconda\\Library\\lib"
# steps:
# - name: Checkout
# uses: actions/checkout@v3

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

# - name: Install windows dependencies
# run: |
# C:\Miniconda\Scripts\conda install -c conda-forge openblas fftw

# - name: Install package dependencies
# run: |
# python -m pip install --upgrade pip
# pip install pytest cython setuptools pytest-cov sympy
# pip install -r requirements.txt

# - name: Build and install package from source
# run: python setup.py develop

# - name: Test with pytest
# run: pytest --cov=./ --cov-report=xml

# - name: Upload coverage
# uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.5.0

testing_windows:
testing_mac_intel:
needs: [code_lint]
runs-on: "macos-13"
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: ["3.12"]

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install macos system dependencies
run: brew install openblas fftw

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install -r requirements-dev.txt
- name: Build and install package from source
run: python setup.py develop

- name: Test with pytest
run: pytest --cov=./ --cov-report=xml

- name: Upload coverage
uses: codecov/codecov-action@v4.5.0

testing_windows:
needs: [code_lint]
runs-on: "windows-latest"
strategy:
matrix:
python-version: [3.9, "3.10", "3.11", "3.12"]

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
Expand All @@ -150,4 +176,4 @@ jobs:
shell: pwsh
run: pytest --cov=./ --cov-report=xml
- name: Upload coverage
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.5.0
Loading

0 comments on commit fe70c72

Please sign in to comment.