Skip to content

Commit

Permalink
Add Scaphandre Python binding with the first version of the PowercapR…
Browse files Browse the repository at this point in the history
…APL sensor
  • Loading branch information
fvaleye authored and bpetit committed Mar 4, 2023
1 parent 5c8d63c commit b9cbcbe
Show file tree
Hide file tree
Showing 21 changed files with 2,725 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: python_build

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

defaults:
run:
working-directory: ./python

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Check Python
run: |
pip install black isort mypy
make check-python
- name: Install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: stable
override: true
- name: Check Rust
run: make check-rust

test:
name: Python Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v1

- uses: actions/setup-python@v3
with:
python-version: "3.7"

- name: Build and install scaphandre
run: |
pip install virtualenv
virtualenv venv
source venv/bin/activate
make develop
- name: Run tests
run: |
source venv/bin/activate
make unit-test
- name: Build Sphinx documentation
run: |
source venv/bin/activate
make build-documentation
18 changes: 18 additions & 0 deletions python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# venv
venv

# Byte-compiled / optimized / DLL files
__pycache__/
/target

# Unit test / coverage reports
.coverage
.pytest_cache/

# mypy
.mypy_cache/

# sphinx build directory
docs/build

*.so
Loading

0 comments on commit b9cbcbe

Please sign in to comment.