Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring, ruff, black, cmake #118

Merged
merged 48 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c6c6522
step 1
xadupre Aug 23, 2023
067bd81
cmake
xadupre Aug 23, 2023
d1a293f
ruff
xadupre Aug 23, 2023
3d3aa33
fix autosignature
xadupre Aug 24, 2023
0737828
fix index
xadupre Aug 24, 2023
ef9faff
fix build
xadupre Aug 24, 2023
134ff3b
remove flog
xadupre Aug 24, 2023
32293ea
style
xadupre Aug 24, 2023
7417c52
fix cython
xadupre Aug 24, 2023
725175f
new examples
xadupre Aug 24, 2023
34b5f42
documentation
xadupre Aug 24, 2023
bc5841a
cmake
xadupre Aug 24, 2023
bda9ebb
fix documentation
xadupre Aug 24, 2023
a936bea
cmake
xadupre Aug 24, 2023
bb5b35d
remove unused tests
xadupre Aug 24, 2023
d934d73
unittest
xadupre Aug 24, 2023
e9da975
fix unit tests
xadupre Aug 24, 2023
3efacf7
remove onnxruntime
xadupre Aug 24, 2023
e2b66d9
disable cuda
xadupre Sep 16, 2023
e679f75
fix cmake
xadupre Sep 16, 2023
a6b5428
fix kmeans
xadupre Sep 17, 2023
49b1cf1
updates
xadupre Sep 17, 2023
04d8d8c
improves compilation
xadupre Sep 17, 2023
8935081
format
xadupre Sep 17, 2023
edc513d
lint
xadupre Sep 17, 2023
2e8d17a
another step
xadupre Sep 17, 2023
23cffbf
try
xadupre Sep 17, 2023
e73c364
lint
xadupre Sep 17, 2023
432942f
skip failing unittests
xadupre Sep 17, 2023
dcf6f7d
fix unit test
xadupre Sep 18, 2023
3365e14
fix examples
xadupre Sep 18, 2023
c0fa599
deps
xadupre Sep 18, 2023
2ba17ff
fix a few unittests
xadupre Sep 18, 2023
c9aee23
conf.py
xadupre Sep 18, 2023
303a918
doc
xadupre Sep 18, 2023
45d6be3
gitignore
xadupre Sep 18, 2023
116caee
documentation
xadupre Sep 19, 2023
74b6b09
fix doc
xadupre Sep 30, 2023
6e3e4ff
km
xadupre Sep 30, 2023
0a7293f
test
xadupre Sep 30, 2023
fcd81c9
test
xadupre Sep 30, 2023
09886d0
fix unit
xadupre Sep 30, 2023
d854fb9
fix unit
xadupre Sep 30, 2023
237977c
setup
xadupre Sep 30, 2023
afcab90
doc
xadupre Sep 30, 2023
f92b9b3
doc
xadupre Sep 30, 2023
0349f90
fix doc
xadupre Oct 1, 2023
ee563d3
fix test
xadupre Oct 1, 2023
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
100 changes: 0 additions & 100 deletions .circleci/config.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/black-ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Black + Ruff Format Checker
on: [push, pull_request]
jobs:
black-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
with:
options: "--diff --check"
src: "."
ruff-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
47 changes: 47 additions & 0 deletions .github/workflows/check-urls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Check URLs

on:
pull_request:
branches: [main]
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '30 1 * * 0'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: urls-checker-code
uses: urlstechie/urlchecker-action@master
with:
subfolder: mlinsights
file_types: .md,.py,.rst,.ipynb
print_all: false
timeout: 2
retry_count# : 2
exclude_urls: https://github.com/microsoft/onnxruntime/blob/
exclude_patterns: https://github.com/microsoft/onnxruntime/blob/
# force_pass : true

- name: urls-checker-docs
uses: urlstechie/urlchecker-action@master
with:
subfolder: _doc
file_types: .md,.py,.rst,.ipynb
print_all: false
timeout: 2
retry_count# : 2
exclude_urls: 64,14: https://github.com/Kitware/CMake/releases/download/v${cmake_version}/cmake-$,https://developer.download.nvidia.com/compute/cuda/$
exclude_patterns: https://www.data.gouv.fr/fr/datasets/r/e3d83ab3-dc52-4c99-abaf-8a38050cc68c,https://dev.azure.com/
# force_pass : true
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.'
91 changes: 91 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Documentation and Code Coverage

on:
push:
pull_request:
types:
- closed
branches:
- main

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

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.11'

- uses: tlylt/install-graphviz@v1

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

- name: Install requirements
run: python -m pip install -r requirements.txt

- name: Install requirements dev
run: python -m pip install -r requirements-dev.txt

- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

- name: Build
run: python setup.py build_ext --inplace

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

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Install
run: python setup.py install

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

- name: Documentation
run: python -m sphinx ./_doc ./dist/html -n -w doc.txt

- name: Summary
run: cat doc.txt

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

- uses: actions/upload-artifact@v3
with:
path: ./dist/html/**
28 changes: 28 additions & 0 deletions .github/workflows/rstcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: RST Check

on: [push, pull_request]

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

steps:
- uses: actions/checkout@v3

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

- name: Install requirements
run: python -m pip install -r requirements.txt

- name: Install rstcheck
run: python -m pip install sphinx tomli rstcheck[toml,sphinx]

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

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@v3

# 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
# to supply options, put them in 'env', like:
#env:
# # CIBW_BUILD: "cp310* cp311*"
# CIBW_SKIP: cp36-* cp37-* cp38-* cp39-*

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Loading
Loading