Skip to content

Commit

Permalink
Updated upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhewe-13 committed Feb 20, 2024
2 parents 4f29b93 + eec46fc commit 0f03956
Show file tree
Hide file tree
Showing 253 changed files with 9,158 additions and 3,567 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,3 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

#name: pep8 check

#on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]

#permissions:
# contents: read

#jobs:
# check:

# runs-on: ubuntu-latest

# steps:
# - uses: actions/checkout@v3
# - name: Set up Python 3.10
# uses: actions/setup-python@v3
# with:
# python-version: "3.10"
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# python -m pip install pycodestyle
# - name: Pep8 Check
# run: |
# ls
# pwd
# lscpu
# pycodestyle mcdc
23 changes: 23 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: docs/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: docs/paper.pdf
35 changes: 35 additions & 0 deletions .github/workflows/mpi_numba_reg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Regression Test - Numba and MPI

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] #, "macos-latest"
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - Numba and MPI
run: |
cd test/regression
python run.py --mode=numba --mpiexec=4
35 changes: 35 additions & 0 deletions .github/workflows/mpi_reg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Regression Test - MPI

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] #, "macos-latest"
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - MPI
run: |
cd test/regression
python run.py --mpiexec=4
35 changes: 35 additions & 0 deletions .github/workflows/numba_reg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Regression Test - Numba

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - Numba
run: |
cd test/regression
python run.py --mode=numba
21 changes: 21 additions & 0 deletions .github/workflows/patch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Patch numba
s=$(python -c 'import numba; print(numba.__path__[0])')
s+='/core/types/scalars.py'

line=$(grep -n 'class Boolean(Hashable):' $s | cut -f1 -d:)

head -n $line $s > tmp-scalars.py
cat >> tmp-scalars.py << EOF
def __init__(self, name):
super(Boolean, self).__init__(name)
self.bitwidth = 8
EOF

length=$(wc -l < $s)
let "length -= line"
tail -n $length $s >> tmp-scalars.py

mv tmp-scalars.py $s

48 changes: 48 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# assumming this is being done in a repo with trusted publishing permissions in pypi

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
python --version
python -m pip install --upgrade pip
pip install .
pip install build
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

#with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/python_reg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Regression Test - Python

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v3
- name: Set up python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: debug
run: |
pwd
ls
- uses: mpi4py/setup-mpi@v1
- name: Install dependencies
run: |
#sudo apt-get install libopenmpi-dev
#pip install numpy numba h5py matplotlib scipy pytest colorama mpi4py ngsolve distinctipy
pip list
pip install -e .
- name: Patch Numba
run : |
bash .github/workflows/patch.sh
- name: Regression Test - Python
run: |
cd test/regression
python run.py
82 changes: 0 additions & 82 deletions .github/workflows/tests.yml

This file was deleted.

Loading

0 comments on commit 0f03956

Please sign in to comment.