Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .build_path.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/home/xadupre/github/teachcompute/build/temp.linux-x86_64-cpython-310
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ jobs:
- ./venv
key: v2-dependencies-{{ checksum "requirements-dev.txt" }}

- run:
name: build
command: |
python -m setup.py build_ext --inplace
python -m setup.py install

- run:
name: run tests
command: |
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Check Release
on:
workflow_dispatch:
schedule:
# every first day of the month
- cron: '0 0 1 * *'
# push:

jobs:

release-linux-mac:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
python-version: ['3.11', '3.10']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install teachcompute
run: pip install teachcompute
- name: Version
run: |
python -c "import teachcompute;print(teachcompute.__version__)"
- name: Installation path
run: python -c "import teachcompute;print(teachcompute.__file__)"
- name: git checkout
run: |
git init
git remote add -f origin https://github.com/sdpython/teachcompute.git
git config core.sparsecheckout true
echo _unittests/ >> .git/info/sparse-checkout
echo _doc/examples/ >> .git/info/sparse-checkout
echo pyproject.toml >> .git/info/sparse-checkout
echo requirements-dev.txt >> .git/info/sparse-checkout
git pull origin main
VERSION=$(python -c "import teachcompute;print(teachcompute.__version__)")
git checkout tags/${VERSION} -b thistag
- name: ls
run: ls .
- name: Install requirements
run: pip install -r requirements-dev.txt
- name: Run pytest
run: pytest _unittests --ignore-glob=**LONG*.py

release-windows:
strategy:
matrix:
os: [windows-latest]
python-version: ['3.11', '3.10']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install teachcompute
run: pip install teachcompute
- name: Version
run: |
python -c "import teachcompute;print(teachcompute.__version__)"
- name: Installation path
run: python -c "import teachcompute;print(teachcompute.__file__)"
- name: git checkout
run: |
git init
git remote add -f origin https://github.com/sdpython/teachcompute.git
git config core.sparsecheckout true
echo _unittests/ >> .git\info\sparse-checkout
echo _doc/examples/ >> .git\info\sparse-checkout
echo pyproject.toml >> .git\info\sparse-checkout
echo requirements-dev.txt >> .git/info/sparse-checkout
git pull origin main
git checkout tags/0.2.2 -b thistag
- name: ls
run: ls .
- name: Install requirements
run: pip install -r requirements-dev.txt
- name: Run pytest
run: pytest _unittests --ignore-glob=**LONG*.py
10 changes: 10 additions & 0 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Clang Format Checker
on: [push]
jobs:
clang-format-checking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: RafikFarhad/clang-format-github-action@v3
with:
sources: "src/**/*.h,src/**/*.c,test/**/*.c"
23 changes: 23 additions & 0 deletions .github/workflows/cmakelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Cmake Format Checker

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Format CMake files
id: cmake-format
uses: PuneetMatharu/cmake-format-lint-action@v1.0.0
with:
args: --check

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_user_name: cmake-format-bot
commit_message: 'Automated commit of cmake-format changes.'
33 changes: 19 additions & 14 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: tlylt/install-graphviz@v1

- name: Install pandoc
run: sudo apt-get install -y pandoc protobuf-compiler
run: sudo apt-get install -y pandoc

- name: Install requirements
run: python -m pip install -r requirements.txt
Expand All @@ -43,17 +43,19 @@ jobs:
${{ runner.os }}-pip-
${{ runner.os }}-

- name: protobuf version
run: |
protoc --version
python -c "import google.protobuf as gp;print(gp.__version__)"
- name: Build
run: python setup.py build_ext --inplace --use-cuda=0

- name: cat _config.py
run: cat teachcompute/_config.py

- name: Generate coverage report
run: |
pip install pytest
pip install pytest-cov
export PYTHONPATH=.
pytest --cov=./teachcompute/ --cov-report=xml --durations=10 --ignore-glob=**LONG*.py --ignore-glob=**notebook*.py --ignore-glob=**pygame*.py
export SKIP_UNSTABLE=1
pytest --cov=./teachcompute/ --cov-report=xml --durations=10 --ignore-glob=**LONG*.py --ignore-glob=**notebook*.py
export PYTHONPATH=

- name: Upload coverage reports to Codecov
Expand All @@ -64,10 +66,13 @@ jobs:
- name: Install
run: python setup.py install

- name: Copy license
run: cp LICENSE* ./_doc
- name: Copy changelogs
run: cp CHANGELOGS* ./_doc
- name: HAS_CUDA?
run: python -c "import teachcompute;print('has_cuda:',teachcompute.has_cuda())"

- name: Copy license, changelogs
run: |
cp LICENSE* ./_doc
cp CHANGELOGS* ./_doc

- name: Documentation
run: python -m sphinx ./_doc ./dist/html -n -w doc.txt
Expand All @@ -77,14 +82,14 @@ jobs:

- name: Check for errors and warnings
run: |
if [[ $(grep ERROR doc.txt) ]]; then
if [[ $(grep ERROR doc.txt | grep -v 'validation.cuda') ]]; then
echo "Documentation produces errors."
grep ERROR doc.txt
grep ERROR doc.txt | grep -v 'validation.cuda'
exit 1
fi
if [[ $(grep WARNING doc.txt | grep -v 'download' | grep -v 'CERTIFICATE_VERIFY_FAILED') ]]; then
if [[ $(grep WARNING doc.txt | grep -v 'validation.cuda') ]]; then
echo "Documentation produces warnings."
cat doc.txt | grep WARNING | grep -v 'CERTIFICATE_VERIFY_FAILED' | grep -v 'download'
grep WARNING doc.txt | grep -v 'validation.cuda'
exit 1
fi

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Type annotation with mypy
on: [push, pull_request]
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install mypy
run: pip install mypy
- name: Run mypy
run: mypy
29 changes: 0 additions & 29 deletions .github/workflows/wheels-any.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/wheels-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build Wheel Linux

on:
push:
# branches:
# - main
# - 'releases/**'
pull_request:
# types:
# - closed
# branches:
# - main
#on:
# push:
# branches:
# - main
# - 'releases/**'

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4

# Used to host cibuildwheel
- uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel

- name: python version
run: python -V

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
41 changes: 41 additions & 0 deletions .github/workflows/wheels-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build Wheel MacOS

on:
push:
# branches:
# - main
# - 'releases/**'
pull_request:
# types:
# - closed
# branches:
# - main

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest]

steps:
- uses: actions/checkout@v4

# Used to host cibuildwheel
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel

- name: python version
run: python -V

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
41 changes: 41 additions & 0 deletions .github/workflows/wheels-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build Wheel Windows

on:
push:
# branches:
# - main
# - 'releases/**'
pull_request:
# types:
# - closed
# branches:
# - main

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]

steps:
- uses: actions/checkout@v4

# Used to host cibuildwheel
- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel

- name: python version
run: python -V

- name: Build wheels
run: python -m cibuildwheel

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
3 changes: 2 additions & 1 deletion CHANGELOGS.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Change Logs
===========

0.1.1
0.2.0
+++++

* :pr:`2`: add C++ build
* :pr:`1`: new notebooks on spark

0.1.0
Expand Down
Loading